decocms 4.372.3 → 4.373.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-CMjsP_Tk.js → AlertCircle-3PzOAmGf.js} +1 -1
- package/dist/client/assets/{AreaChart-Bh_grNQZ.js → AreaChart-7E6DaaEO.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CjYy5Nhj.js → ArrowLeft-JCMxLp8E.js} +1 -1
- package/dist/client/assets/{ArrowRight-CLncCNat.js → ArrowRight-Cl3bzAIC.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cii1LHW7.js → ArrowUp-Bmd2w7Fx.js} +1 -1
- package/dist/client/assets/{CartesianChart-CD-5y_pX.js → CartesianChart-D-MpJhL1.js} +1 -1
- package/dist/client/assets/{CheckCircle-DHXQFnpK.js → CheckCircle-Co3IBXeH.js} +1 -1
- package/dist/client/assets/{ChevronUp-DiYhGG4T.js → ChevronUp-Djmy8s04.js} +1 -1
- package/dist/client/assets/{Copy01-nMxlBfeT.js → Copy01-BYK2zIkj.js} +1 -1
- package/dist/client/assets/{CreditCard01-CWXVH3ZM.js → CreditCard01-C7PO4dVs.js} +1 -1
- package/dist/client/assets/DotsVertical-BozfeMf6.js +1 -0
- package/dist/client/assets/{Download01-BRrSA3Yx.js → Download01-Z6w2IrLj.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-fXvhmekg.js → ErrorBarContext-G3lO5Hsl.js} +1 -1
- package/dist/client/assets/{Eye-Dyg2WPG4.js → Eye-ChO6k3fk.js} +1 -1
- package/dist/client/assets/{Globe01-D6FaaFR2.js → Globe01-D3UtmZtY.js} +1 -1
- package/dist/client/assets/{Users03-Y0Jco4zL.js → Globe04-CCIm2Cf2.js} +1 -1
- package/dist/client/assets/{Image01-CxnjAzbb.js → Image01-Dx7ea-3O.js} +1 -1
- package/dist/client/assets/{Key01-CIXwHMRo.js → Key01-B8q0d-op.js} +1 -1
- package/dist/client/assets/LayoutLeft-DUo3bbMr.js +1 -0
- package/dist/client/assets/{Line-YO4Ozgbt.js → Line-DC3wc0Zn.js} +1 -1
- package/dist/client/assets/{Link01-C0FvgZZB.js → Link01-C-mBEv93.js} +1 -1
- package/dist/client/assets/{LinkExternal01-AWlhN5o7.js → LinkExternal01-uHE64k_w.js} +1 -1
- package/dist/client/assets/{Monitor01-Ccs1gh2Z.js → Monitor01-CevElukI.js} +1 -1
- package/dist/client/assets/{Package-nTbucmaQ.js → Package-C6yqPbb7.js} +1 -1
- package/dist/client/assets/{Palette-DSdn1Xis.js → Palette-B2v8R7_D.js} +1 -1
- package/dist/client/assets/{Play-lMuWOObF.js → Play-D26LBNWf.js} +1 -1
- package/dist/client/assets/{Plus-CVauOqLT.js → Plus-CoGTSnEd.js} +1 -1
- package/dist/client/assets/{SearchLg-BrrPVuXr.js → SearchLg-BvCfRAbg.js} +1 -1
- package/dist/client/assets/{SearchMd-C45D2PMI.js → SearchMd-C0e2gT30.js} +1 -1
- package/dist/client/assets/{Sector-9mXbxJ9i.js → Sector-Cztbz-wz.js} +5 -5
- package/dist/client/assets/{Settings02-Cyf85ea0.js → Settings02-azWHb0MO.js} +1 -1
- package/dist/client/assets/{Share07-wC47qn2E.js → Share07-CW1RSVqD.js} +1 -1
- package/dist/client/assets/{Stars01-oAh9h5b5.js → Stars01-Ch2E4B6o.js} +1 -1
- package/dist/client/assets/{Sun-0Ied-kyZ.js → Sun-Cx4zdBZx.js} +1 -1
- package/dist/client/assets/Tool01-DbFf2Je1.js +1 -0
- package/dist/client/assets/{Tool02-CATStXCy.js → Tool02-Hh7HLEzm.js} +1 -1
- package/dist/client/assets/{Trash01-nl-t4IoV.js → Trash01-D8ICnU7E.js} +1 -1
- package/dist/client/assets/{TrendUp01-BFAEMx9E.js → TrendUp01-ZTgT_kdi.js} +1 -1
- package/dist/client/assets/{Upload01-B4Fqdkae.js → Upload01-BoLmU8be.js} +1 -1
- package/dist/client/assets/{User01-ClMaVCaJ.js → User01-CQXsOD6P.js} +1 -1
- package/dist/client/assets/{UserSquare-B2lKdt4w.js → UserSquare-C4_QxRGQ.js} +1 -1
- package/dist/client/assets/{Users01-BFhxJVhO.js → Users01-mzXfNn0j.js} +1 -1
- package/dist/client/assets/{X-CFCE4a-Q.js → X-BmPcW1eb.js} +1 -1
- package/dist/client/assets/{XCircle-CleKT0Id.js → XCircle-jpeASVbU.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DpXsFGyJ.js → XClose-BhXJw65F.js} +1 -1
- package/dist/client/assets/{Zap-B6zkqKWB.js → Zap-Cc5rEM6R.js} +1 -1
- package/dist/client/assets/ZoomOut-DtzZmmbM.js +1 -0
- package/dist/client/assets/{access-gate-Ds4n25mC.js → access-gate-C720AIcS.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DqhI8LLv.js +1 -0
- package/dist/client/assets/agent-analytics-CEaAXQWf.js +2 -0
- package/dist/client/assets/agent-app-DZehCYZl.js +1 -0
- package/dist/client/assets/agent-assets-QG4QLYi4.js +1 -0
- package/dist/client/assets/agent-automation-C9l9hEWB.js +20 -0
- package/dist/client/assets/agent-automations-7OvEQ1VY.js +1 -0
- package/dist/client/assets/agent-connect-sources-D4Eixo2_.js +1 -0
- package/dist/client/assets/agent-deck-BVRxo7rJ.js +1 -0
- package/dist/client/assets/agent-e2e-Dhn8AUR2.js +1 -0
- package/dist/client/assets/agent-experiments-DXXxqvO5.js +1 -0
- package/dist/client/assets/agent-file-CoPjYzW3.js +1 -0
- package/dist/client/assets/{agent-git-D4IYczGa.js → agent-git-Dz0OC5zZ.js} +2 -2
- package/dist/client/assets/agent-hosting-h_IXMzav.js +1 -0
- package/dist/client/assets/agent-icon-DbgbaBWC.js +1 -0
- package/dist/client/assets/agent-library-file-DLEwy6vn.js +1 -0
- package/dist/client/assets/agent-monitor-K9XcbQ8_.js +1 -0
- package/dist/client/assets/agent-overview-CHDp8hoe.js +1 -0
- package/dist/client/assets/agent-settings-Cw8w6Gap.js +1 -0
- package/dist/client/assets/{agent-site-editor-DJSdtoNU.js → agent-site-editor-DQY9pg4H.js} +13 -13
- package/dist/client/assets/agent-site-editor-code-B1APLc6I.js +2 -0
- package/dist/client/assets/agent-site-editor-content-N2XOogCr.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-Dt5NU6JJ.js +518 -0
- package/dist/client/assets/agent-view-DVRDYkCo.js +1 -0
- package/dist/client/assets/{agent-view-guard-DHJpzCVR.js → agent-view-guard-DJyWI4yF.js} +1 -1
- package/dist/client/assets/agents-list-CLIUc54V.js +1 -0
- package/dist/client/assets/{ai-providers-jxGd6MbV.js → ai-providers-Dq0uWBim.js} +2 -2
- package/dist/client/assets/{alert-U2IStW1f.js → alert-D9Xs8r1J.js} +1 -1
- package/dist/client/assets/{alert-dialog-BI-B_8hq.js → alert-dialog-CMdGVc5y.js} +2 -2
- package/dist/client/assets/api-keys-BaELtPjJ.js +1 -0
- package/dist/client/assets/api-keys-DMJLQGyU.js +1 -0
- package/dist/client/assets/app-editor-CxVdHjkp.js +1 -0
- package/dist/client/assets/asset-utils-B2xrnUou.js +1 -0
- package/dist/client/assets/{auth-DhzAq_9m.js → auth-DvTDuEnH.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dar7OygY.js → auth-catchall-CE_y-mnY.js} +1 -1
- package/dist/client/assets/auth-entry-BWD0wZ2A.js +1 -0
- package/dist/client/assets/{auth-split-layout-DLFqjvPt.js → auth-split-layout-tneb1o26.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DkJ4g-X5.js → authenticate-and-persist-oauth-CyEJ3ZKP.js} +1 -1
- package/dist/client/assets/automation-list-row-CJ0AVjPL.js +1 -0
- package/dist/client/assets/automation-runs-CbMZ10A-.js +1 -0
- package/dist/client/assets/automations-kGGjILm8.js +1 -0
- package/dist/client/assets/{autosend-BberXmli.js → autosend-CESqNA2a.js} +1 -1
- package/dist/client/assets/{avatar-C9HiP4eS.js → avatar-CsDZ0T22.js} +1 -1
- package/dist/client/assets/badge-BMuU0t5h.js +1 -0
- package/dist/client/assets/block-document-BydU2jcx.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-Bwmvvd4S.js → blocks-preview-workspace-context-CuzoVyh9.js} +1 -1
- package/dist/client/assets/breadcrumb-CV5rO8sh.js +1 -0
- package/dist/client/assets/{buckets-BndbOAGO.js → buckets-Dm9YtrYe.js} +1 -1
- package/dist/client/assets/build-improve-prompt-doc-EvTa14jr.js +2 -0
- package/dist/client/assets/bulk-category-panel-CY3h3K-9.js +1 -0
- package/dist/client/assets/calendar-BhMl9dZ9.js +1 -0
- package/dist/client/assets/capability-load-error-HRK6520w.js +1 -0
- package/dist/client/assets/category-editor-z_l9WPAc.js +1 -0
- package/dist/client/assets/{chart-8nXuVw9P.js → chart-pALnZlqd.js} +5 -5
- package/dist/client/assets/{chat-context-tZCX_cqt.js → chat-context-CHZ5Yehn.js} +6 -6
- package/dist/client/assets/{chat-draft-BCeqPSxA.js → chat-draft-CZ4LRf6I.js} +1 -1
- package/dist/client/assets/checkbox-BoN76eap.js +1 -0
- package/dist/client/assets/choose-editor-DHr5QgoP.js +1 -0
- package/dist/client/assets/{cli-auth-success-D39z_FO3.js → cli-auth-success-BOpU9sA8.js} +1 -1
- package/dist/client/assets/{client-icons-DpcP1bht.js → client-icons-BPRdY54C.js} +1 -1
- package/dist/client/assets/collapsible-D3vKPIBT.js +1 -0
- package/dist/client/assets/collection-detail-B44G83q8.js +1 -0
- package/dist/client/assets/collection-display-button-BndwflUf.js +1 -0
- package/dist/client/assets/{collection-search-J9Bt25gS.js → collection-search-BmT0oV8g.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DBeauaNS.js → collection-table-wrapper-UMxhNoR0.js} +1 -1
- package/dist/client/assets/collection-tabs-D6Sk9riW.js +1 -0
- package/dist/client/assets/combobox-BXOISFpW.js +1 -0
- package/dist/client/assets/command-bqq51nHs.js +1 -0
- package/dist/client/assets/{companion-mcps-section-xmRpNJBK.js → companion-mcps-section-7NiZEsE1.js} +1 -1
- package/dist/client/assets/connect-gdFpiJzg.js +8 -0
- package/dist/client/assets/connect-layout-BNcHFw2B.js +1 -0
- package/dist/client/assets/{connection-DD0omVHZ.js → connection-DlOqhGn3.js} +1 -1
- package/dist/client/assets/connection-card-Dh4yj-V8.js +1 -0
- package/dist/client/assets/connection-detail-Cjp3fFqG.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CHlcdgAK.js → connection-form-helpers-DoXq4oCN.js} +1 -1
- package/dist/client/assets/connections-BTo7AfIR.js +1 -0
- package/dist/client/assets/{create-organization-dialog-1mI4Ad1B.js → create-organization-dialog-CjRZ3hmF.js} +1 -1
- package/dist/client/assets/{decofile-api-BNWbEMR6.js → decofile-api-DlO_JJTI.js} +1 -1
- package/dist/client/assets/{decopilot-BvepxP_-.js → decopilot-BbHxwoKU.js} +2 -2
- package/dist/client/assets/dialog-yUWKJPsU.js +1 -0
- package/dist/client/assets/discover-_mwx3kHk.js +1 -0
- package/dist/client/assets/domain-settings-DWfJmRnt.js +1 -0
- package/dist/client/assets/download-app-dialog-CnJNRM3l.js +1 -0
- package/dist/client/assets/{drawer-BIjkXMV3.js → drawer-CFueQivP.js} +1 -1
- package/dist/client/assets/{editor-D4Ls62vg.js → editor-9_pChBN4.js} +1 -1
- package/dist/client/assets/{empty-state-CyICQznD.js → empty-state-1TOptJ4i.js} +1 -1
- package/dist/client/assets/{empty-state-BdiOfgle.js → empty-state-DTENIvqH.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dbm_cKaX.js → extract-connection-data-B7yRd0El.js} +1 -1
- package/dist/client/assets/{feature-gate-Bp7Cydio.js → feature-gate-DmyzkRdC.js} +1 -1
- package/dist/client/assets/feature-paywall-CFcsZgv5.js +1 -0
- package/dist/client/assets/file-explorer-BPttIqTX.js +2 -0
- package/dist/client/assets/{file-preview-CARebwHJ.js → file-preview-h8_PuEm0.js} +1 -1
- package/dist/client/assets/file-share-button-CYWl5jll.js +3 -0
- package/dist/client/assets/{file-type-icon-C9Qn36v4.js → file-type-icon-C7b31Eu-.js} +1 -1
- package/dist/client/assets/{folder-icon-BLBZBD_a.js → folder-icon-Cp3UZ2f7.js} +1 -1
- package/dist/client/assets/{form-CSXgIHLz.js → form-D4fabgxt.js} +1 -1
- package/dist/client/assets/{gateway-client-BuiOykcN.js → gateway-client-BqcIzR1f.js} +1 -1
- package/dist/client/assets/general-BVFviafD.js +1 -0
- package/dist/client/assets/{github-icon-huXDOAgf.js → github-icon-BJ-JIGKg.js} +1 -1
- package/dist/client/assets/home-D_wLSsVp.js +1 -0
- package/dist/client/assets/{hooks-BoX5BC-f.js → hooks-CzhqOgxt.js} +2 -2
- package/dist/client/assets/{hooks-DZOMRp7D.js → hooks-GmRpr8h8.js} +1 -1
- package/dist/client/assets/icon-button-BtmumYDv.js +1 -0
- package/dist/client/assets/index-BIAbKV8r.js +1 -0
- package/dist/client/assets/index-BiU3YmQL.js +235 -0
- package/dist/client/assets/{index-BD213WLU.js → index-Bxbv_23l.js} +1 -1
- package/dist/client/assets/index-CFPoNDBi.js +1 -0
- package/dist/client/assets/{index-Bb-Re5q8.js → index-CLccaHLm.js} +1 -1
- package/dist/client/assets/{index-BWpNlf6e.js → index-CLlrN2I7.js} +1 -1
- package/dist/client/assets/{index-DiULBiX9.js → index-CuhH8P7u.js} +1 -1
- package/dist/client/assets/index-CxyF2W3e.js +1 -0
- package/dist/client/assets/{index-DWw5wi2G.js → index-DAWDSRE3.js} +1 -1
- package/dist/client/assets/index-DEoa7bfP.js +5 -0
- package/dist/client/assets/index-DaUTlKSt.css +1 -0
- package/dist/client/assets/{index-DqT4mG5l.js → index-DmozmqiR.js} +1 -1
- package/dist/client/assets/{index-2gtoysbs.js → index-DyLXwR4J.js} +1 -1
- package/dist/client/assets/index-PXtwpYFZ.js +26 -0
- package/dist/client/assets/{index-redirect-BQTLrDGT.js → index-redirect-C_mVUP1U.js} +1 -1
- package/dist/client/assets/{index-tj4CWdxr.js → index-ui6lA5FC.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CjWlcBHD.js → infiniteQueryObserver-QHtAxfIQ.js} +1 -1
- package/dist/client/assets/infra-billing-BUNh4stc.js +1 -0
- package/dist/client/assets/input-4CSpUSQl.js +1 -0
- package/dist/client/assets/input-BGhe0a85.js +8 -0
- package/dist/client/assets/input-CRD8MdDS.js +1 -0
- package/dist/client/assets/{integration-icon-BeEdjsn9.js → integration-icon-1ySWGOUX.js} +1 -1
- package/dist/client/assets/{label-BMxIRiEr.js → label-BNElcQf4.js} +1 -1
- package/dist/client/assets/{last-preview-page-B_H0ubHa.js → last-preview-page-CriZ3Ybr.js} +1 -1
- package/dist/client/assets/layout-JObct3sA.js +1 -0
- package/dist/client/assets/legacy-agents-deep-Be8TTzCS.js +1 -0
- package/dist/client/assets/legacy-main-redirect-B7vEff38.js +1 -0
- package/dist/client/assets/library-DiWyPd02.js +161 -0
- package/dist/client/assets/{login-C4Dx9xMO.js → login-Cp8tUb0B.js} +1 -1
- package/dist/client/assets/{markdown-DGWjAeXL.js → markdown-Cyp9lJ5l.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-BTjC7Gse.js → mcp-app-renderer-swczxBq4.js} +2 -2
- package/dist/client/assets/{mcp-oauth-C4khbNJJ.js → mcp-oauth-S1Th8e_4.js} +1 -1
- package/dist/client/assets/members--h5oznU6.js +1 -0
- package/dist/client/assets/message-templates-B7sm0uFT.js +1 -0
- package/dist/client/assets/{mini-report-page-Ci4cxCz8.js → mini-report-page-gIgc_0u6.js} +1 -1
- package/dist/client/assets/mock-board-BgLaLM9b.js +90 -0
- package/dist/client/assets/{monaco-editor-CMRYkmyb.js → monaco-editor-BTTiRg3C.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-PncjnNwy.js → monitoring-stats-row-SqX44qyF.js} +1 -1
- package/dist/client/assets/multi-select-DlCEHd3Z.js +1 -0
- package/dist/client/assets/{mustache-CPZS2ebG.js → mustache-CgVU0pmm.js} +1 -1
- package/dist/client/assets/{oauth-callback-CETK2WZB.js → oauth-callback-DVF3P0k_.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DqbbngEF.js → oauth-callback-ai-provider-DnZgYvOg.js} +1 -1
- package/dist/client/assets/{onboarding-B5zAGi2B.js → onboarding-KuoWylVw.js} +1 -1
- package/dist/client/assets/optimistic-project-sidebar-views-DbOixNPz.js +1 -0
- package/dist/client/assets/{org-file-open-context-BCUpiY_R.js → org-file-open-context-ZSKUsYTL.js} +1 -1
- package/dist/client/assets/{organization-choice-BNulT5zU.js → organization-choice-xHSL_jFs.js} +1 -1
- package/dist/client/assets/orgs-BZ30h814.js +1 -0
- package/dist/client/assets/{page-seo-form-BrHgBXF1.js → page-seo-form-uvAq8WeJ.js} +1 -1
- package/dist/client/assets/{pair-B46EBBjF.js → pair-TxCwxPu7.js} +8 -8
- package/dist/client/assets/plan-ladder-Jef48mB3.js +1 -0
- package/dist/client/assets/{popover-yk_ePqAA.js → popover-QnaOlHhb.js} +1 -1
- package/dist/client/assets/post-calendar-iJnYrJKe.js +1 -0
- package/dist/client/assets/post-editor-Bo6bvTrf.js +1 -0
- package/dist/client/assets/{preview-content-CfbsbElk.js → preview-content-BZw1CdZv.js} +1 -1
- package/dist/client/assets/{preview-dialog-CA2C3DS4.js → preview-dialog-CW8lM0wY.js} +1 -1
- package/dist/client/assets/primitives-K6663FBF.js +1 -0
- package/dist/client/assets/profile-SyCdTPAI.js +1 -0
- package/dist/client/assets/project-app-view-LEql7xV5.js +1 -0
- package/dist/client/assets/project-feed-B-N2eAAK.js +1 -0
- package/dist/client/assets/{project-icon-MWmzrrm8.js → project-icon-DeL96Npe.js} +1 -1
- package/dist/client/assets/project-reports-bArXCdyS.js +1 -0
- package/dist/client/assets/project-tasks-CK2bx81L.js +1 -0
- package/dist/client/assets/{prompts-4lILOzK9.js → prompts-xGBFLFgt.js} +1 -1
- package/dist/client/assets/record-editor-Bf769MFv.js +1 -0
- package/dist/client/assets/redirect-editor-DXB_8yBv.js +1 -0
- package/dist/client/assets/registry-lIOKlNUJ.js +2 -0
- package/dist/client/assets/registry-layout-hsve34X8.js +27 -0
- package/dist/client/assets/reports-CXzE7a39.js +1 -0
- package/dist/client/assets/{reports-BpxYdv2_.js → reports-cM3vPGFG.js} +2 -2
- package/dist/client/assets/reports-onboarding-VXLjX7pO.js +1 -0
- package/dist/client/assets/reports-tab-D8TZTv9m.js +2 -0
- package/dist/client/assets/repositories-CPa6SZ5V.js +1 -0
- package/dist/client/assets/repository-import-picker-IY5VTzNS.js +1 -0
- package/dist/client/assets/repository-picker-BZKrcN4Y.js +1 -0
- package/dist/client/assets/{require-capability-CmtOZnXt.js → require-capability-CimSbmsz.js} +1 -1
- package/dist/client/assets/{required-auth-layout-RoMNnMPO.js → required-auth-layout-C1pT7wzX.js} +1 -1
- package/dist/client/assets/{reset-password-BeUL8IgX.js → reset-password-BjWIunWT.js} +1 -1
- package/dist/client/assets/resizable-YNqh8MUH.js +1 -0
- package/dist/client/assets/review-settings-Be2fdXif.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CHsxXHIo.js → rich-text-link-control-BExHOMAv.js} +2 -2
- package/dist/client/assets/roles-0e4U7If5.js +1 -0
- package/dist/client/assets/route-B5ZmPhcw.js +1 -0
- package/dist/client/assets/route-FGDifUW3.js +1 -0
- package/dist/client/assets/route-ajAF3k6E.js +1 -0
- package/dist/client/assets/route-page-header-DEpOaETW.js +1 -0
- package/dist/client/assets/runnable-block-editor-MngLlGqF.js +16 -0
- package/dist/client/assets/{sandbox-lifecycle-context-C7VKOJoV.js → sandbox-lifecycle-context-BfUCaKZp.js} +2 -2
- package/dist/client/assets/{schema-1zAO-l7e.js → schema-C2CxTC2d.js} +1 -1
- package/dist/client/assets/{scroll-area-C-wtbVS1.js → scroll-area-IfiqBxp0.js} +1 -1
- package/dist/client/assets/search-input-_eiEHUe0.js +1 -0
- package/dist/client/assets/search-toggle-Stpj_aWt.js +1 -0
- package/dist/client/assets/secrets-CDqpILuq.js +1 -0
- package/dist/client/assets/sections-editor-BBGWhCb9.js +2 -0
- package/dist/client/assets/select-47N7H1PV.js +1 -0
- package/dist/client/assets/select-model-BCgtIi3z.js +1 -0
- package/dist/client/assets/seo-editor-BrPfy2aB.js +1 -0
- package/dist/client/assets/separator-BlNapRt2.js +1 -0
- package/dist/client/assets/settings-tab-Dx5o1dO5.js +5 -0
- package/dist/client/assets/{sheet-i72Qx7sL.js → sheet-CvV2x5yz.js} +1 -1
- package/dist/client/assets/shell-layout-BMyUKhgs.js +1 -0
- package/dist/client/assets/{shell-layout-CuFt8bor.css → shell-layout-CE2Eihra.css} +1 -1
- package/dist/client/assets/sidebar-BMWTk3Ss.js +1 -0
- package/dist/client/assets/{skill-preview-gfYVdSdM.js → skill-preview-CqDKvwdL.js} +1 -1
- package/dist/client/assets/skills-CXSauL5l.js +1 -0
- package/dist/client/assets/sso-yxBZIEQo.js +1 -0
- package/dist/client/assets/store-registry-BsImLhdC.js +2 -0
- package/dist/client/assets/store-t7yAo4iS.js +1 -0
- package/dist/client/assets/{switch-BQFtt3BH.js → switch-DUPW32_G.js} +1 -1
- package/dist/client/assets/synced-repos-DWXwM86N.js +1 -0
- package/dist/client/assets/{table-6I6YKvFY.js → table-D1-dnD05.js} +1 -1
- package/dist/client/assets/{tabs-CLziM0Ww.js → tabs-uJDG1LT-.js} +1 -1
- package/dist/client/assets/{task-board-DrUf5p-Z.js → task-board-iF-5OywY.js} +1 -1
- package/dist/client/assets/task-route-D4VqZZFU.js +1 -0
- package/dist/client/assets/task-status-CUfsYmVV.js +1 -0
- package/dist/client/assets/taskboard-analytics-C0r-zgde.js +1 -0
- package/dist/client/assets/tasks-C5Yiiaae.js +1 -0
- package/dist/client/assets/{tasks-Drgd6az8.js → tasks-Dig9WuPL.js} +4 -4
- package/dist/client/assets/textarea-DbE6fIU0.js +1 -0
- package/dist/client/assets/thread-button-DcS2EMEc.js +1 -0
- package/dist/client/assets/{thread-intent-F-sZEflj.js → thread-intent-CnRICyzb.js} +1 -1
- package/dist/client/assets/thread-route-CTwlz0m2.js +1 -0
- package/dist/client/assets/thread-route-D_e3Th_q.js +1 -0
- package/dist/client/assets/thread-sheet-body-BPOqWNL-.js +1 -0
- package/dist/client/assets/toggle-group-ofCffann.js +1 -0
- package/dist/client/assets/toolbar-icon-button-DPZ8v-BD.js +1 -0
- package/dist/client/assets/{tooltip-DV2xHesQ.js → tooltip-BGb6Kdym.js} +1 -1
- package/dist/client/assets/{track-ZuOMvhd2.js → track-BtbUodA4.js} +1 -1
- package/dist/client/assets/{types-27TVsPN_.js → types-CyZPxJ7C.js} +3 -3
- package/dist/client/assets/usage-stats-UqDPk1rl.js +1 -0
- package/dist/client/assets/use-ai-providers-Cxi0vxkS.js +1 -0
- package/dist/client/assets/use-automations-CbK79XsB.js +1 -0
- package/dist/client/assets/{use-autosave-DOzyZumC.js → use-autosave-BEIVrcUg.js} +1 -1
- package/dist/client/assets/use-connect-companion-B3ql1eAJ.js +1 -0
- package/dist/client/assets/use-connection-C2XMAF5j.js +1 -0
- package/dist/client/assets/{use-copy-C_ctOeuP.js → use-copy-BhRM5JUh.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D1w9d4ex.js → use-create-virtual-mcp-CZM9_2b6.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-onM9TTf8.js → use-date-fns-locale-bOp1dUM9.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DqyNKPJM.js → use-debounced-autosave-DwFjgR25.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B9nG3bW5.js → use-debounced-value-CoGGtS8x.js} +1 -1
- package/dist/client/assets/use-deco-credits-CKQJlHZi.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BpuQrfKN.js → use-decopilot-events-CuJ7CkFw.js} +1 -1
- package/dist/client/assets/use-delete-connection-BF9eR-10.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BVfgEagI.js → use-deployment-admin-5L_GV7bf.js} +1 -1
- package/dist/client/assets/{use-entitlements-Dl7pAsQ5.js → use-entitlements-BGdUcutE.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-mcfOeAAq.js → use-fast-preview-draft-url-JPVt7oTt.js} +1 -1
- package/dist/client/assets/use-file-configs-CrAdkDbm.js +1 -0
- package/dist/client/assets/use-in-settings-CaGFgkXe.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-PhBGPm8H.js → use-infinite-scroll-LXktD04_.js} +1 -1
- package/dist/client/assets/use-join-requests-Cju9AeLh.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-C86PuGT_.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-g0Tk-Phb.js +1 -0
- package/dist/client/assets/{use-mcp-client-e_hCatGm.js → use-mcp-client-Br7XFHza.js} +6 -6
- package/dist/client/assets/{use-mcp-prompts-DJRXjL4_.js → use-mcp-prompts-C6590AFl.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-g86k4oib.js → use-mcp-tools-DpaWZTAA.js} +1 -1
- package/dist/client/assets/use-members-buh6Kqlm.js +1 -0
- package/dist/client/assets/{use-mobile-hIijCK0k.js → use-mobile-DVkjqQzh.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-LXQlcEnV.js +1 -0
- package/dist/client/assets/use-open-billing-url-Bage8zng.js +1 -0
- package/dist/client/assets/use-org-auth-client-cknSmCL5.js +1 -0
- package/dist/client/assets/use-org-fs-CJMhF9AL.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-D2u9tZI_.js +8 -0
- package/dist/client/assets/{use-org-sso-BvfIL0yq.js → use-org-sso-zl0gtui9.js} +1 -1
- package/dist/client/assets/use-organization-roles-DUhOIBRz.js +1 -0
- package/dist/client/assets/use-organization-settings-DalrVcZ1.js +1 -0
- package/dist/client/assets/{use-panel-navigate-WrD0KEYx.js → use-panel-navigate-DMG8fP2m.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-DB5jQXqg.js +1 -0
- package/dist/client/assets/use-project-scope-_WcnrAA6.js +1 -0
- package/dist/client/assets/use-registry-connections-BQknTkkv.js +1 -0
- package/dist/client/assets/use-releases-CKVB62Nw.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-BezpL0wm.js +1 -0
- package/dist/client/assets/{use-route-default-main-Djaj_cL9.js → use-route-default-main-fIaACxCL.js} +1 -1
- package/dist/client/assets/use-secrets-BN4lI9QI.js +1 -0
- package/dist/client/assets/{use-section-preview-base-BOFovHh4.js → use-section-preview-base-UXUDJdZU.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BR1aW1y5.js → use-session-runtime-CGqfWswP.js} +1 -1
- package/dist/client/assets/use-tags-DUoR_C2Q.js +1 -0
- package/dist/client/assets/use-task-board-analytics-C5PpaVy-.js +1 -0
- package/dist/client/assets/use-task-metadata-Cd-4aUjL.js +1 -0
- package/dist/client/assets/use-thread-outputs-B1ptcJGL.js +1 -0
- package/dist/client/assets/{use-view-mode-B0LeaJg7.js → use-view-mode-IY2Xk-sG.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-CmFx7CJY.js +1 -0
- package/dist/client/assets/useInfiniteQuery-KPKjfQBF.js +1 -0
- package/dist/client/assets/{useQueries-C-SV8tD7.js → useQueries-D09LYNgo.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-97L-Gf2j.js +1 -0
- package/dist/client/assets/{users-BiOPZ43X.js → users-Cd0bupzj.js} +1 -1
- package/dist/client/assets/utils-Bn3HByb8.js +4 -0
- package/dist/client/assets/variant-calendar-BKkugrKM.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BFQoXu82.js → variant-matcher-override-dOY9vOi0.js} +1 -1
- package/dist/client/assets/view-mode-toggle-HCiL8YHS.js +1 -0
- package/dist/client/assets/{virtual-mcp-ldxphi5G.js → virtual-mcp-BaEt1QHH.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/Check-B3RSsr_D.js +0 -1
- package/dist/client/assets/ChevronRight-USKkhEpL.js +0 -1
- package/dist/client/assets/ChevronSelectorVertical-DpRb2z1l.js +0 -1
- package/dist/client/assets/Database01-C0YJpjc3.js +0 -1
- package/dist/client/assets/DotsVertical-CsjwfYzf.js +0 -1
- package/dist/client/assets/File02-BvR-HYxK.js +0 -1
- package/dist/client/assets/GitBranch01-rWb2SJK9.js +0 -1
- package/dist/client/assets/HardDrive-DNTPLPT4.js +0 -1
- package/dist/client/assets/MessageCircle01-DBcg2aiD.js +0 -1
- package/dist/client/assets/Printer-CvyxF9Jo.js +0 -1
- package/dist/client/assets/Shield01-CqB4I7qm.js +0 -1
- package/dist/client/assets/Tool01-DouqPjim.js +0 -1
- package/dist/client/assets/XClose-BgzK-Dwz.js +0 -1
- package/dist/client/assets/ZoomOut-BPxprY2s.js +0 -1
- package/dist/client/assets/add-connection-dialog-DZjTm9W3.js +0 -1
- package/dist/client/assets/agent-analytics-DmvdLg8B.js +0 -2
- package/dist/client/assets/agent-app-BvmFdS4C.js +0 -1
- package/dist/client/assets/agent-assets-czUGY90q.js +0 -1
- package/dist/client/assets/agent-automation-C5Kr5Oj3.js +0 -20
- package/dist/client/assets/agent-automations-D-3-Opoc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CjhmYssY.js +0 -1
- package/dist/client/assets/agent-deck-BC5MWVm-.js +0 -1
- package/dist/client/assets/agent-e2e-DkL4Ltr6.js +0 -1
- package/dist/client/assets/agent-experiments--rXT-2aB.js +0 -1
- package/dist/client/assets/agent-file-C3XkHLMm.js +0 -1
- package/dist/client/assets/agent-hosting-DaIfm8Hu.js +0 -1
- package/dist/client/assets/agent-icon-CczrFEe7.js +0 -1
- package/dist/client/assets/agent-library-file-Dji653pU.js +0 -1
- package/dist/client/assets/agent-monitor-C-HIyaF_.js +0 -1
- package/dist/client/assets/agent-overview-cm15sxNU.js +0 -1
- package/dist/client/assets/agent-settings-XmhY1FOi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DOAcxz0t.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-mg5Q6hoW.js +0 -518
- package/dist/client/assets/agent-view-ClMILC98.js +0 -1
- package/dist/client/assets/agents-list-rKFF5b3o.js +0 -1
- package/dist/client/assets/anchors-yqDzZN4K.js +0 -1
- package/dist/client/assets/api-keys-AIfL76r6.js +0 -1
- package/dist/client/assets/api-keys-B6ry5Bc6.js +0 -1
- package/dist/client/assets/app-editor-BZKFeBmU.js +0 -1
- package/dist/client/assets/asset-utils-DhbLEVKo.js +0 -1
- package/dist/client/assets/auth-entry-CwWjlqGu.js +0 -1
- package/dist/client/assets/automation-list-row-Btr-Kty6.js +0 -1
- package/dist/client/assets/automation-runs-CnOOOwZJ.js +0 -1
- package/dist/client/assets/automations-CtLmB1Eo.js +0 -1
- package/dist/client/assets/badge-Bu51Hlti.js +0 -1
- package/dist/client/assets/block-document-BLCekKXO.js +0 -3
- package/dist/client/assets/breadcrumb-Dhdru7Jh.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Cedp3vV1.js +0 -2
- package/dist/client/assets/bulk-category-panel-D3c_qJDk.js +0 -1
- package/dist/client/assets/calendar-DIQx67oO.js +0 -1
- package/dist/client/assets/capability-load-error-CJMvYDf4.js +0 -1
- package/dist/client/assets/cards-BVw8sRdW.js +0 -8
- package/dist/client/assets/category-editor-C7sRrVfl.js +0 -1
- package/dist/client/assets/checkbox-jLf7fBuW.js +0 -1
- package/dist/client/assets/choose-editor-Cbu3-nVC.js +0 -1
- package/dist/client/assets/collapsible-CTgXdVQa.js +0 -1
- package/dist/client/assets/collection-detail-BF7WM7Gn.js +0 -1
- package/dist/client/assets/collection-display-button-C-4xB6xx.js +0 -1
- package/dist/client/assets/collection-tabs-CrXIJeNf.js +0 -1
- package/dist/client/assets/combobox-BHrqHmge.js +0 -1
- package/dist/client/assets/command-B-XD29Nx.js +0 -1
- package/dist/client/assets/command-palette-store-DK-56E2K.js +0 -1
- package/dist/client/assets/connect-D4qCE3TM.js +0 -8
- package/dist/client/assets/connect-layout-DGO84ImO.js +0 -1
- package/dist/client/assets/connection-card-fcMCwbTh.js +0 -1
- package/dist/client/assets/connection-detail-DS015J4e.js +0 -1
- package/dist/client/assets/connections-C98FMYyY.js +0 -1
- package/dist/client/assets/dialog-llvhXw2o.js +0 -1
- package/dist/client/assets/discover-DNPHmIfF.js +0 -1
- package/dist/client/assets/domain-settings-CXxEmIjB.js +0 -1
- package/dist/client/assets/download-app-dialog-D_4eQbbs.js +0 -1
- package/dist/client/assets/dropdown-menu-C5iafa8S.js +0 -1
- package/dist/client/assets/feature-paywall-DEy2mpV2.js +0 -1
- package/dist/client/assets/file-explorer-Bs7B2-rr.js +0 -2
- package/dist/client/assets/file-share-button-Dk1ugrdV.js +0 -3
- package/dist/client/assets/general-BYFfG0fF.js +0 -1
- package/dist/client/assets/home-DTaaCW3K.js +0 -1
- package/dist/client/assets/index-2eKztu7k.js +0 -5
- package/dist/client/assets/index-BH7uCYoT.js +0 -1
- package/dist/client/assets/index-CSd_k8Np.js +0 -1
- package/dist/client/assets/index-CiMUXLco.js +0 -26
- package/dist/client/assets/index-CpNTsElB.css +0 -1
- package/dist/client/assets/index-D4RUT3q0.js +0 -1
- package/dist/client/assets/index-D_X-LIyA.js +0 -1
- package/dist/client/assets/index-Dc7hzqoi.js +0 -235
- package/dist/client/assets/infra-billing-D6jrbNxA.js +0 -1
- package/dist/client/assets/input-DXlaTX4w.js +0 -1
- package/dist/client/assets/input-D_FfvHr0.js +0 -8
- package/dist/client/assets/input-uIV5S_EX.js +0 -1
- package/dist/client/assets/layout-Dli4i2a0.js +0 -1
- package/dist/client/assets/legacy-agents-deep-CoiLV3QJ.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BZ4nzqkQ.js +0 -1
- package/dist/client/assets/library-Dste3SFA.js +0 -161
- package/dist/client/assets/members-CRtKrUle.js +0 -1
- package/dist/client/assets/message-templates-B8kOo0Kk.js +0 -1
- package/dist/client/assets/mock-board-DRa60E6i.js +0 -90
- package/dist/client/assets/multi-select-DzAZ8Rb8.js +0 -1
- package/dist/client/assets/optimistic-project-sidebar-views-CrZ9OeIk.js +0 -1
- package/dist/client/assets/orgs-B1TBklWZ.js +0 -1
- package/dist/client/assets/plan-ladder-B2pv9Y73.js +0 -1
- package/dist/client/assets/post-calendar-Bx8YiCbs.js +0 -1
- package/dist/client/assets/post-editor-B1fD7o8C.js +0 -1
- package/dist/client/assets/primitives-JiGRyPkw.js +0 -1
- package/dist/client/assets/profile-CDR0JVtv.js +0 -1
- package/dist/client/assets/project-app-view-8VWdrWMf.js +0 -1
- package/dist/client/assets/project-feed-ChJRKxhk.js +0 -1
- package/dist/client/assets/project-reports-D31utlHg.js +0 -1
- package/dist/client/assets/project-tasks-D2AAgqxo.js +0 -1
- package/dist/client/assets/record-editor-DPAL8Tq5.js +0 -1
- package/dist/client/assets/redirect-editor-EPs_GX-_.js +0 -1
- package/dist/client/assets/registry-Dw8UrRRZ.js +0 -2
- package/dist/client/assets/registry-layout-CC2lewiS.js +0 -27
- package/dist/client/assets/reports-Ch9UvBcS.js +0 -1
- package/dist/client/assets/reports-onboarding-Dhm8IBuD.js +0 -1
- package/dist/client/assets/reports-tab-BJWrZp37.js +0 -2
- package/dist/client/assets/repositories-CMIGVJwC.js +0 -1
- package/dist/client/assets/repository-import-picker-DhVniDI2.js +0 -1
- package/dist/client/assets/repository-picker-BkoSI-jm.js +0 -1
- package/dist/client/assets/resizable-Bt7dvMCc.js +0 -1
- package/dist/client/assets/review-settings-Cx_Yzx40.js +0 -1
- package/dist/client/assets/roles-BNleKwt9.js +0 -1
- package/dist/client/assets/route-CHqG9ihd.js +0 -1
- package/dist/client/assets/route-DqJoK5dW.js +0 -1
- package/dist/client/assets/route-x8jgkj5T.js +0 -1
- package/dist/client/assets/runnable-block-editor-xmOnaiFL.js +0 -16
- package/dist/client/assets/search-input-Pobww52G.js +0 -1
- package/dist/client/assets/secrets-BF5nuoR4.js +0 -1
- package/dist/client/assets/sections-editor-B1LpXw4X.js +0 -2
- package/dist/client/assets/select-BkKPcZFe.js +0 -1
- package/dist/client/assets/select-model-DPv-zVVj.js +0 -1
- package/dist/client/assets/seo-editor-9G7mQFJ5.js +0 -1
- package/dist/client/assets/settings-tab-D1V5Uszb.js +0 -5
- package/dist/client/assets/shell-layout-Ce0aCJuX.js +0 -1
- package/dist/client/assets/sidebar-C5KRz1Pj.js +0 -1
- package/dist/client/assets/skills-CgTiBPyO.js +0 -1
- package/dist/client/assets/sso-BK-aRT5P.js +0 -1
- package/dist/client/assets/store-Nm6KtwbD.js +0 -1
- package/dist/client/assets/store-registry-Cs6bPPkP.js +0 -2
- package/dist/client/assets/synced-repos-B1z4DDCt.js +0 -1
- package/dist/client/assets/task-route-BCTCy27Q.js +0 -1
- package/dist/client/assets/task-status-DhCT2ly_.js +0 -1
- package/dist/client/assets/taskboard-analytics-Cf1r1f7I.js +0 -1
- package/dist/client/assets/tasks-BNvHI7hJ.js +0 -1
- package/dist/client/assets/textarea-BU6xemAP.js +0 -1
- package/dist/client/assets/thread-route-BBf64Mwk.js +0 -1
- package/dist/client/assets/thread-route-BSYRqZDg.js +0 -1
- package/dist/client/assets/thread-sheet-body-B4OUWlMn.js +0 -1
- package/dist/client/assets/toggle-group-BiU_UDOq.js +0 -1
- package/dist/client/assets/toolbar-icon-button-PuQFE8Y9.js +0 -1
- package/dist/client/assets/usage-stats-vMRDbAUM.js +0 -1
- package/dist/client/assets/use-ai-providers-BnF5Rw_n.js +0 -1
- package/dist/client/assets/use-automations-Bo0S3g8m.js +0 -1
- package/dist/client/assets/use-connect-companion-CClQCUMS.js +0 -1
- package/dist/client/assets/use-connection-Ba04fHwa.js +0 -1
- package/dist/client/assets/use-deco-credits-BGBshlLi.js +0 -1
- package/dist/client/assets/use-delete-connection-Cns6x8UC.js +0 -1
- package/dist/client/assets/use-file-configs-DYGSdjth.js +0 -1
- package/dist/client/assets/use-join-requests-DjeVFQr9.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-sSRGo66A.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-I377R0Kg.js +0 -1
- package/dist/client/assets/use-members-DPYHJDe2.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-C8pu0B4z.js +0 -1
- package/dist/client/assets/use-open-billing-url-Df7K1DCF.js +0 -1
- package/dist/client/assets/use-org-auth-client-DbPU3bA-.js +0 -1
- package/dist/client/assets/use-org-fs-Du-ErRPs.js +0 -1
- package/dist/client/assets/use-org-notice-CyiiFkRG.js +0 -1
- package/dist/client/assets/use-organization-roles-FAEtbpE5.js +0 -1
- package/dist/client/assets/use-organization-settings-CKbX2SdA.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DWzPH-Sc.js +0 -1
- package/dist/client/assets/use-project-scope-DU0-JxYr.js +0 -1
- package/dist/client/assets/use-registry-connections-SLFMHpqj.js +0 -1
- package/dist/client/assets/use-releases-CFNTwgY3.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-8BvW2in8.js +0 -1
- package/dist/client/assets/use-secrets-DVry--sz.js +0 -1
- package/dist/client/assets/use-tags-CZXCbbwL.js +0 -1
- package/dist/client/assets/use-task-board-analytics-Ci1AhxvH.js +0 -1
- package/dist/client/assets/use-task-metadata-Dt9l5S_a.js +0 -1
- package/dist/client/assets/use-thread-outputs-Dq-RN0P_.js +0 -1
- package/dist/client/assets/use-virtual-mcp-DkK7ErtB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +0 -1
- package/dist/client/assets/utils-DsvmRe8M.js +0 -4
- package/dist/client/assets/variant-calendar-DImnsJnP.js +0 -1
- package/dist/client/assets/view-mode-toggle-DvGhnpsV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as x,u as d,j as l,aP as m}from"./index-BiU3YmQL.js";import{F as j}from"./feature-paywall-CFcsZgv5.js";import{d as v,e as F}from"./use-entitlements-BGdUcutE.js";import{a as S}from"./use-panel-navigate-DMG8fP2m.js";function g(f){const e=x.c(10),{feature:a,backdrop:o,children:u}=f,{openPanel:c}=S();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const{mainpanel:p}=d(r),h=v(a);if(!F()){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3 p-4",children:[l.jsx(m,{className:"h-8 w-48"}),l.jsx(m,{className:"min-h-0 flex-1 w-full"})]}),e[1]=i):i=e[1],i}if(h)return u;if(p===!1)return null;let s;e[2]!==c?(s=()=>c("overview"),e[2]=c,e[3]=s):s=e[3];let t;e[4]!==a||e[5]!==s?(t=l.jsx(j,{feature:a,onDismiss:s,onSeePlans:w}),e[4]=a,e[5]=s,e[6]=t):t=e[6];let n;return e[7]!==o||e[8]!==t?(n=l.jsxs("div",{className:"relative h-full min-h-0",children:[o,t]}),e[7]=o,e[8]=t,e[9]=n):n=e[9],n}function w(){}export{g as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as $,l as B,j as t,b as F,d as S,a0 as O,x as H,R as M,a9 as W,B as U}from"./index-BiU3YmQL.js";import{d as q,h as G,c as I,b as J,D as K}from"./dialog-yUWKJPsU.js";import{u as Q,a as V,p as X,b as Y,c as Z,P as ee,f as te}from"./plan-ladder-Jef48mB3.js";import{a as se}from"./use-entitlements-BGdUcutE.js";function le(N){const e=$.c(37),{open:a,onDismiss:n,accentClassName:i,icon:k,title:s,description:P,highlights:D,price:v,action:C,dismissAction:E}=N,A=a===void 0?!0:a,w=i??"text-muted-foreground";let c;e[0]!==n?(c=T=>!T&&n?.(),e[0]=n,e[1]=c):c=e[1];let o;e[2]!==w?(o=B("pointer-events-none",w),e[2]=w,e[3]=o):o=e[3];let h,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"absolute inset-x-0 top-0 h-60 opacity-60 dark:opacity-30",style:{background:"radial-gradient(ellipse 70% 100% at 50% 0%, currentColor 0%, transparent 72%)"}}),b=t.jsx("div",{className:"absolute inset-x-8 top-0 h-px bg-gradient-to-r from-transparent via-current to-transparent opacity-80 dark:opacity-60"}),e[4]=h,e[5]=b):(h=e[4],b=e[5]);let r;e[6]!==o?(r=t.jsxs("div",{"aria-hidden":"true",className:o,children:[h,b]}),e[6]=o,e[7]=r):r=e[7];let p;e[8]!==k?(p=t.jsx("div",{className:"mb-7",children:k}),e[8]=k,e[9]=p):p=e[9];let m;e[10]!==s?(m=t.jsx(q,{className:"text-2xl font-semibold leading-tight tracking-tight text-balance",children:s}),e[10]=s,e[11]=m):m=e[11];let d;e[12]!==P?(d=P&&t.jsx(G,{className:"mx-auto max-w-[32ch] text-sm leading-relaxed text-pretty",children:P}),e[12]=P,e[13]=d):d=e[13];let g;e[14]!==m||e[15]!==d?(g=t.jsxs(I,{className:"gap-2",children:[m,d]}),e[14]=m,e[15]=d,e[16]=g):g=e[16];let u;e[17]!==D?(u=D&&t.jsx("div",{className:"mt-6 w-fit",children:D}),e[17]=D,e[18]=u):u=e[18];let x;e[19]!==v?(x=v&&t.jsx("div",{className:"mt-7",children:v}),e[19]=v,e[20]=x):x=e[20];let f;e[21]!==C||e[22]!==E?(f=t.jsxs("div",{className:"mt-8 flex w-full flex-col items-center gap-2",children:[C,E]}),e[21]=C,e[22]=E,e[23]=f):f=e[23];let j;e[24]!==g||e[25]!==u||e[26]!==x||e[27]!==f||e[28]!==p?(j=t.jsxs("div",{className:"flex flex-col items-center px-8 pt-10 pb-8 text-center",children:[p,g,u,x,f]}),e[24]=g,e[25]=u,e[26]=x,e[27]=f,e[28]=p,e[29]=j):j=e[29];let y;e[30]!==j||e[31]!==r?(y=t.jsxs(J,{className:"gap-0 overflow-hidden p-0 sm:max-w-[480px]",onOpenAutoFocus:ae,children:[r,j]}),e[30]=j,e[31]=r,e[32]=y):y=e[32];let l;return e[33]!==A||e[34]!==y||e[35]!==c?(l=t.jsx(K,{open:A,onOpenChange:c,children:y}),e[33]=A,e[34]=y,e[35]=c,e[36]=l):l=e[36],l}function ae(N){return N.preventDefault()}function ne(N,e){if(!N||!e)return null;const a=N.findIndex(i=>i.id===e)+1,n=a>0?N[a]:void 0;return n?{plan:n,index:a}:null}const _={kanban:["settings.paywall.bullets.kanban.1","settings.paywall.bullets.kanban.2","settings.paywall.bullets.kanban.3"],cms:["settings.paywall.bullets.cms.1","settings.paywall.bullets.cms.2","settings.paywall.bullets.cms.3"],monitoring:["settings.paywall.bullets.monitoring.1","settings.paywall.bullets.monitoring.2","settings.paywall.bullets.monitoring.3"]},ie=["settings.paywall.bullets.allowance.1","settings.paywall.bullets.allowance.2","settings.paywall.bullets.allowance.3"];function me(N){const e=$.c(42),{feature:a,copy:n,onDismiss:i,onSeePlans:k}=N,s=F(),P=S(),{org:D}=O(),{data:v}=Q(),{data:C}=se(),{data:E}=V(),[A]=H();let w,c,o,h,b,r,p,m;if(e[0]!==n||e[1]!==C?.plan||e[2]!==a||e[3]!==i||e[4]!==v||e[5]!==A||e[6]!==E||e[7]!==s){const y=s(`settings.planUsage.feature.${a}`),l=n?ne(v,C?.plan.id):X(v,a),T=l?Y(l.index):void 0,z=l?Z(E,l.plan.id):void 0,L=n?ie:a in _?_[a]:null;w=le,c=i,o=T,h=l?t.jsx(ee,{index:l.index,className:"size-20"}):t.jsx(M,{className:"size-12 text-muted-foreground"}),b=n?.title??(l?s("settings.paywall.upgradeTitle",{plan:l.plan.name,feature:y}):y),r=n?.description??(L?void 0:l?s("settings.paywall.upgradeDescription"):s("settings.paywall.description",{feature:y})),p=L&&t.jsx("ul",{className:"flex flex-col gap-2.5 text-left",children:L.map(R=>t.jsxs("li",{className:"flex items-center gap-3 text-sm",children:[t.jsx(W,{size:16,className:B("shrink-0",T)}),t.jsx("span",{children:s(R)})]},R))}),m=z!==void 0?t.jsxs("span",{className:"flex items-baseline justify-center gap-1.5",children:[t.jsx("span",{className:"text-2xl font-semibold tabular-nums tracking-tight",children:te(z,A.language)}),t.jsx("span",{className:"text-sm text-muted-foreground",children:s("settings.plans.perMonth")})]}):void 0,e[0]=n,e[1]=C?.plan,e[2]=a,e[3]=i,e[4]=v,e[5]=A,e[6]=E,e[7]=s,e[8]=w,e[9]=c,e[10]=o,e[11]=h,e[12]=b,e[13]=r,e[14]=p,e[15]=m}else w=e[8],c=e[9],o=e[10],h=e[11],b=e[12],r=e[13],p=e[14],m=e[15];let d;e[16]!==P||e[17]!==i||e[18]!==k||e[19]!==D.slug?(d=()=>{P({to:"/$org/settings/ai-providers",params:{org:D.slug}}),(k??i)?.()},e[16]=P,e[17]=i,e[18]=k,e[19]=D.slug,e[20]=d):d=e[20];let g;e[21]!==s?(g=s("settings.paywall.seePlans"),e[21]=s,e[22]=g):g=e[22];let u;e[23]!==d||e[24]!==g?(u=t.jsx(U,{size:"lg",className:"w-full",onClick:d,children:g}),e[23]=d,e[24]=g,e[25]=u):u=e[25];let x;e[26]!==s?(x=s("settings.paywall.dismiss"),e[26]=s,e[27]=x):x=e[27];let f;e[28]!==i||e[29]!==x?(f=t.jsx(U,{variant:"ghost",size:"lg",className:"w-full",onClick:i,children:x}),e[28]=i,e[29]=x,e[30]=f):f=e[30];let j;return e[31]!==w||e[32]!==c||e[33]!==u||e[34]!==f||e[35]!==o||e[36]!==h||e[37]!==b||e[38]!==r||e[39]!==p||e[40]!==m?(j=t.jsx(w,{onDismiss:c,accentClassName:o,icon:h,title:b,description:r,highlights:p,price:m,action:u,dismissAction:f}),e[31]=w,e[32]=c,e[33]=u,e[34]=f,e[35]=o,e[36]=h,e[37]=b,e[38]=r,e[39]=p,e[40]=m,e[41]=j):j=e[41],j}export{me as F};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as se,b as Te,r as d,j as r,h as pe,B as Re,fz as en,bo as tn,bp as ge,fA as nn,fB as rn,fC as on,fD as sn,by as an,fE as ln,fF as dt,bF as cn,fG as dn,fH as un,fI as fn,fJ as pn,fK as xn,fL as mn,fM as hn,fN as gn,fO as bn,l as le,an as yn,o as vn,t as te,K as tt}from"./index-BiU3YmQL.js";import{v as Cn,bk as wn,bl as Nn}from"./agent-icon-DbgbaBWC.js";import{s as jn}from"./XClose-BhXJw65F.js";import{S as En}from"./scroll-area-IfiqBxp0.js";import{c as nt,T as rt,a as ot}from"./tooltip-BGb6Kdym.js";import{a as Sn}from"./chat-context-CHZ5Yehn.js";import{F as Dn}from"./editor-9_pChBN4.js";import{a as Mn}from"./shell-layout-BMyUKhgs.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{o as st,f as Rn}from"./sandbox-git-api-CMdpE2TE.js";import{d as Tn,h as Pn,c as Fn,e as kn,b as An,D as Ln}from"./dialog-yUWKJPsU.js";import{I as at}from"./input-4CSpUSQl.js";import{A as On,a as In,b as Kn,c as zn,g as $n,d as _n,e as Gn,f as Bn}from"./alert-dialog-CMdGVc5y.js";import{t as Vn}from"./ChevronUp-Djmy8s04.js";import{i as Hn}from"./Share07-CW1RSVqD.js";import{b as Un}from"./sandbox-url-D3mC8qhT.js";import{i as qn,E as Wn,c as Oe,e as Qn,f as Xn,h as Yn,j as Jn,t as re,k as Ee,l as Ie,m as Se,g as Ke,n as ze,o as Zn,s as er,v as tr,p as $e,q as De,r as _e,u as nr,w as rr,x as or,y as sr}from"./utils-Bn3HByb8.js";import"./AlertCircle-3PzOAmGf.js";import"./Tool01-DbFf2Je1.js";import"./ArrowUp-Bmd2w7Fx.js";import"./ArrowLeft-JCMxLp8E.js";import"./Tool02-Hh7HLEzm.js";import"./ArrowRight-Cl3bzAIC.js";import"./TrendUp01-ZTgT_kdi.js";import"./ZoomOut-DtzZmmbM.js";import"./Globe04-CCIm2Cf2.js";import"./CheckCircle-Co3IBXeH.js";import"./UserSquare-C4_QxRGQ.js";import"./Copy01-BYK2zIkj.js";import"./CreditCard01-C7PO4dVs.js";import"./DotsVertical-BozfeMf6.js";import"./Download01-Z6w2IrLj.js";import"./Settings02-azWHb0MO.js";import"./Eye-ChO6k3fk.js";import"./Globe01-D3UtmZtY.js";import"./Image01-Dx7ea-3O.js";import"./Key01-B8q0d-op.js";import"./LayoutLeft-DUo3bbMr.js";import"./Link01-C-mBEv93.js";import"./LinkExternal01-uHE64k_w.js";import"./Monitor01-CevElukI.js";import"./Sun-Cx4zdBZx.js";import"./Package-C6yqPbb7.js";import"./Palette-B2v8R7_D.js";import"./Play-D26LBNWf.js";import"./Plus-CoGTSnEd.js";import"./SearchLg-BvCfRAbg.js";import"./SearchMd-C0e2gT30.js";import"./Stars01-Ch2E4B6o.js";import"./Trash01-D8ICnU7E.js";import"./Upload01-BoLmU8be.js";import"./User01-CQXsOD6P.js";import"./Users01-mzXfNn0j.js";import"./XCircle-jpeASVbU.js";import"./X-BmPcW1eb.js";import"./Zap-Cc5rEM6R.js";import"./select-47N7H1PV.js";import"./index-DAWDSRE3.js";import"./use-panel-navigate-DMG8fP2m.js";import"./thread-route-CTwlz0m2.js";import"./use-project-scope-_WcnrAA6.js";import"./use-virtual-mcp-CmFx7CJY.js";import"./use-mcp-client-Br7XFHza.js";import"./auth-DvTDuEnH.js";import"./github-repo-BknN0SVI.js";import"./autosend-CESqNA2a.js";import"./thread-intent-CnRICyzb.js";import"./slugify-CEUa2lfQ.js";import"./hooks-GmRpr8h8.js";import"./backoff-8mStPHYB.js";import"./task-board-iF-5OywY.js";import"./schema-C2CxTC2d.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-BGdUcutE.js";import"./use-ai-providers-Cxi0vxkS.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CuJ7CkFw.js";import"./use-organization-settings-DalrVcZ1.js";import"./avatar-CsDZ0T22.js";import"./download-app-dialog-CnJNRM3l.js";import"./command-bqq51nHs.js";import"./index-Bxbv_23l.js";import"./integration-icon-1ySWGOUX.js";import"./project-icon-DeL96Npe.js";import"./required-auth-layout-C1pT7wzX.js";import"./use-org-sso-zl0gtui9.js";const ar={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function ir(a){const e=se.c(71),{open:s,mode:i,initialName:l,parentLabel:x,isPending:y,onSubmit:u,onOpenChange:b}=a,E=l===void 0?"":l,h=y===void 0?!1:y,m=Te(),[f,O]=d.useState(E),[X,I]=d.useState(s),C=ar[i];s!==X&&(I(s),s&&O(E));let g;e[0]!==h||e[1]!==b?(g=Q=>{!Q&&!h&&b(!1)},e[0]=h,e[1]=b,e[2]=g):g=e[2];const R=g;let z;e[3]!==h||e[4]!==f||e[5]!==u?(z=async Q=>{Q.preventDefault();const ne=f.trim();!ne||h||await u(ne)},e[3]=h,e[4]=f,e[5]=u,e[6]=z):z=e[6];const L=z;let T;e[7]!==C.titleKey||e[8]!==m?(T=m(C.titleKey),e[7]=C.titleKey,e[8]=m,e[9]=T):T=e[9];let P;e[10]!==T?(P=r.jsx(Tn,{children:T}),e[10]=T,e[11]=P):P=e[11];let D;e[12]!==C.descriptionKey||e[13]!==m?(D=m(C.descriptionKey),e[12]=C.descriptionKey,e[13]=m,e[14]=D):D=e[14];let S;e[15]!==D?(S=r.jsx(Pn,{children:D}),e[15]=D,e[16]=S):S=e[16];let N;e[17]!==P||e[18]!==S?(N=r.jsxs(Fn,{children:[P,S]}),e[17]=P,e[18]=S,e[19]=N):N=e[19];let M;e[20]!==x||e[21]!==m?(M=x&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sandbox.fileExplorerNameDialog.location")}),r.jsx(at,{value:x,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=x,e[21]=m,e[22]=M):M=e[22];let j;e[23]!==m?(j=m("sandbox.fileExplorerNameDialog.name"),e[23]=m,e[24]=j):j=e[24];let k;e[25]!==j?(k=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:j}),e[25]=j,e[26]=k):k=e[26];let U;e[27]===Symbol.for("react.memo_cache_sentinel")?(U=Q=>O(Q.target.value),e[27]=U):U=e[27];let $;e[28]!==C.placeholderKey||e[29]!==m?($=m(C.placeholderKey),e[28]=C.placeholderKey,e[29]=m,e[30]=$):$=e[30];let Y;e[31]!==h||e[32]!==f||e[33]!==$?(Y=r.jsx(at,{id:"file-explorer-name",value:f,onChange:U,placeholder:$,autoFocus:!0,disabled:h}),e[31]=h,e[32]=f,e[33]=$,e[34]=Y):Y=e[34];let J;e[35]!==k||e[36]!==Y?(J=r.jsxs("div",{className:"space-y-1.5",children:[k,Y]}),e[35]=k,e[36]=Y,e[37]=J):J=e[37];let ee;e[38]!==M||e[39]!==J?(ee=r.jsxs("div",{className:"space-y-4 py-4",children:[M,J]}),e[38]=M,e[39]=J,e[40]=ee):ee=e[40];let _;e[41]!==b?(_=()=>b(!1),e[41]=b,e[42]=_):_=e[42];let A;e[43]!==m?(A=m("sandbox.fileExplorerNameDialog.cancel"),e[43]=m,e[44]=A):A=e[44];let q;e[45]!==h||e[46]!==_||e[47]!==A?(q=r.jsx(Re,{type:"button",variant:"outline",onClick:_,disabled:h,children:A}),e[45]=h,e[46]=_,e[47]=A,e[48]=q):q=e[48];let K;e[49]!==h||e[50]!==f?(K=!f.trim()||h,e[49]=h,e[50]=f,e[51]=K):K=e[51];let W;e[52]!==C.submitKey||e[53]!==h||e[54]!==m?(W=h?r.jsxs(r.Fragment,{children:[r.jsx(pe,{className:"size-3.5"}),m("sandbox.fileExplorerNameDialog.saving")]}):m(C.submitKey),e[52]=C.submitKey,e[53]=h,e[54]=m,e[55]=W):W=e[55];let G;e[56]!==K||e[57]!==W?(G=r.jsx(Re,{type:"submit",disabled:K,children:W}),e[56]=K,e[57]=W,e[58]=G):G=e[58];let F;e[59]!==q||e[60]!==G?(F=r.jsxs(kn,{children:[q,G]}),e[59]=q,e[60]=G,e[61]=F):F=e[61];let B;e[62]!==L||e[63]!==ee||e[64]!==F||e[65]!==N?(B=r.jsx(An,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:L,children:[N,ee,F]})}),e[62]=L,e[63]=ee,e[64]=F,e[65]=N,e[66]=B):B=e[66];let V;return e[67]!==R||e[68]!==s||e[69]!==B?(V=r.jsx(Ln,{open:s,onOpenChange:R,children:B}),e[67]=R,e[68]=s,e[69]=B,e[70]=V):V=e[70],V}function lr(a){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:i,fsActionPending:l,onOpenChange:x,onConfirm:y}=a,u=Te(),b=s?.kind==="directory",E=s!==null,h=b?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let m;e[0]!==u||e[1]!==h?(m=u(h),e[0]=u,e[1]=h,e[2]=m):m=e[2];let f;e[3]!==m?(f=r.jsx(On,{children:m}),e[3]=m,e[4]=f):f=e[4];let O;e[5]!==u?(O=u("sandbox.fileExplorerDeleteDialog.description"),e[5]=u,e[6]=O):O=e[6];const X=s?.name;let I;e[7]!==X?(I=r.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=I):I=e[8];let C;e[9]!==b||e[10]!==u?(C=b?u("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=b,e[10]=u,e[11]=C):C=e[11];let g;e[12]!==i.length||e[13]!==u?(g=i.length>0&&r.jsxs(r.Fragment,{children:[" ",i.length===1?u("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):u("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:i.length})]}),e[12]=i.length,e[13]=u,e[14]=g):g=e[14];let R;e[15]!==O||e[16]!==I||e[17]!==C||e[18]!==g?(R=r.jsxs(In,{children:[O," ",I,C,g]}),e[15]=O,e[16]=I,e[17]=C,e[18]=g,e[19]=R):R=e[19];let z;e[20]!==R||e[21]!==f?(z=r.jsxs(Kn,{children:[f,R]}),e[20]=R,e[21]=f,e[22]=z):z=e[22];let L;e[23]!==u?(L=u("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=u,e[24]=L):L=e[24];let T;e[25]!==l||e[26]!==L?(T=r.jsx(zn,{disabled:l,children:L}),e[25]=l,e[26]=L,e[27]=T):T=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==y?(D=U=>{U.preventDefault(),s&&y(s)},e[28]=s,e[29]=y,e[30]=D):D=e[30];let S;e[31]!==u?(S=u("sandbox.fileExplorerDeleteDialog.delete"),e[31]=u,e[32]=S):S=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==S?(N=r.jsx($n,{disabled:P,onClick:D,children:S}),e[33]=P,e[34]=D,e[35]=S,e[36]=N):N=e[36];let M;e[37]!==T||e[38]!==N?(M=r.jsxs(_n,{children:[T,N]}),e[37]=T,e[38]=N,e[39]=M):M=e[39];let j;e[40]!==z||e[41]!==M?(j=r.jsxs(Gn,{children:[z,M]}),e[40]=z,e[41]=M,e[42]=j):j=e[42];let k;return e[43]!==x||e[44]!==E||e[45]!==j?(k=r.jsx(Bn,{open:E,onOpenChange:x,children:j}),e[43]=x,e[44]=E,e[45]=j,e[46]=k):k=e[46],k}var Ge="ContextMenu",[cr]=cn(Ge,[dt]),Z=dt(),[dr,ut]=cr(Ge),ft=a=>{const{__scopeContextMenu:e,children:s,onOpenChange:i,dir:l,modal:x=!0}=a,[y,u]=d.useState(!1),b=Z(e),E=an(i),h=d.useCallback(m=>{u(m),E(m)},[E]);return r.jsx(dr,{scope:e,open:y,onOpenChange:h,modal:x,children:r.jsx(ln,{...b,dir:l,open:y,onOpenChange:h,modal:x,children:s})})};ft.displayName=Ge;var pt="ContextMenuTrigger",xt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,disabled:i=!1,...l}=a,x=ut(pt,s),y=Z(s),u=d.useRef({x:0,y:0}),b=d.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),E=d.useRef(0),h=d.useCallback(()=>window.clearTimeout(E.current),[]),m=f=>{u.current={x:f.clientX,y:f.clientY},x.onOpenChange(!0)};return d.useEffect(()=>h,[h]),d.useEffect(()=>{i&&h()},[i,h]),r.jsxs(r.Fragment,{children:[r.jsx(en,{...y,virtualRef:b}),r.jsx(tn.span,{"data-state":x.open?"open":"closed","data-disabled":i?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...a.style},onContextMenu:i?a.onContextMenu:ge(a.onContextMenu,f=>{h(),m(f),f.preventDefault()}),onPointerDown:i?a.onPointerDown:ge(a.onPointerDown,Me(f=>{h(),E.current=window.setTimeout(()=>m(f),700)})),onPointerMove:i?a.onPointerMove:ge(a.onPointerMove,Me(h)),onPointerCancel:i?a.onPointerCancel:ge(a.onPointerCancel,Me(h)),onPointerUp:i?a.onPointerUp:ge(a.onPointerUp,Me(h))})]})});xt.displayName=pt;var ur="ContextMenuPortal",mt=a=>{const{__scopeContextMenu:e,...s}=a,i=Z(e);return r.jsx(on,{...i,...s})};mt.displayName=ur;var ht="ContextMenuContent",gt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=ut(ht,s),x=Z(s),y=d.useRef(!1);return r.jsx(sn,{...x,...i,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{a.onCloseAutoFocus?.(u),!u.defaultPrevented&&y.current&&u.preventDefault(),y.current=!1},onInteractOutside:u=>{a.onInteractOutside?.(u),!u.defaultPrevented&&!l.modal&&(y.current=!0)},style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gt.displayName=ht;var fr="ContextMenuGroup",pr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(dn,{...l,...i,ref:e})});pr.displayName=fr;var xr="ContextMenuLabel",mr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(un,{...l,...i,ref:e})});mr.displayName=xr;var hr="ContextMenuItem",bt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(nn,{...l,...i,ref:e})});bt.displayName=hr;var gr="ContextMenuCheckboxItem",br=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(fn,{...l,...i,ref:e})});br.displayName=gr;var yr="ContextMenuRadioGroup",vr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(pn,{...l,...i,ref:e})});vr.displayName=yr;var Cr="ContextMenuRadioItem",wr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(xn,{...l,...i,ref:e})});wr.displayName=Cr;var Nr="ContextMenuItemIndicator",jr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(mn,{...l,...i,ref:e})});jr.displayName=Nr;var Er="ContextMenuSeparator",yt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(rn,{...l,...i,ref:e})});yt.displayName=Er;var Sr="ContextMenuArrow",Dr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(hn,{...l,...i,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubTrigger",Rr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(gn,{...l,...i,ref:e})});Rr.displayName=Mr;var Tr="ContextMenuSubContent",Pr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(bn,{...l,...i,ref:e,style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pr.displayName=Tr;function Me(a){return e=>e.pointerType!=="mouse"?a(e):void 0}var Fr=ft,kr=xt,Ar=mt,Lr=gt,Or=bt,Ir=yt;function Kr(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Fr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=i):i=e[3],i}function zr(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(kr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=i):i=e[3],i}function $r(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let x;return e[5]!==i||e[6]!==l?(x=r.jsx(Ar,{children:r.jsx(Lr,{"data-slot":"context-menu-content",translate:"no",className:l,...i})}),e[5]=i,e[6]=l,e[7]=x):x=e[7],x}function fe(a){const e=se.c(12);let s,i,l,x;e[0]!==a?({className:s,inset:i,variant:x,...l}=a,e[0]=a,e[1]=s,e[2]=i,e[3]=l,e[4]=x):(s=e[1],i=e[2],l=e[3],x=e[4]);const y=x===void 0?"default":x;let u;e[5]!==s?(u=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=u):u=e[6];let b;return e[7]!==i||e[8]!==l||e[9]!==u||e[10]!==y?(b=r.jsx(Or,{"data-slot":"context-menu-item","data-inset":i,"data-variant":y,className:u,...l}),e[7]=i,e[8]=l,e[9]=u,e[10]=y,e[11]=b):b=e[11],b}function it(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let x;return e[5]!==i||e[6]!==l?(x=r.jsx(Ir,{"data-slot":"context-menu-separator",className:l,...i}),e[5]=i,e[6]=l,e[7]=x):x=e[7],x}const _r="#d9a441";function Gr(a){const e=se.c(63),{node:s,depth:i,isExpanded:l,isSelected:x,isLoading:y,fileVisual:u,onOpen:b,onSelect:E,onNewFile:h,onNewFolder:m,onCopyPath:f,onCopyRelativePath:O,onRename:X,onDelete:I}=a,C=y===void 0?!1:y,g=Te(),R=s.kind==="directory",{Icon:z,color:L}=u,T=x&&"bg-accent";let P;e[0]!==T?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",T),e[0]=T,e[1]=P):P=e[1];const D=`${i*14+8}px`;let S;e[2]!==D?(S={paddingLeft:D},e[2]=D,e[3]=S):S=e[3];let N;e[4]!==b||e[5]!==E?(N=()=>{E(),b()},e[4]=b,e[5]=E,e[6]=N):N=e[6];let M;e[7]!==z||e[8]!==L||e[9]!==R||e[10]!==l||e[11]!==C?(M=R?r.jsxs(r.Fragment,{children:[C?r.jsx(pe,{className:"size-3.5 shrink-0 text-muted-foreground"}):l?r.jsx(Vn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(yn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Hn,{size:16,className:"shrink-0",style:{color:_r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(z,{size:16,className:"shrink-0",style:{color:L}})]}),e[7]=z,e[8]=L,e[9]=R,e[10]=l,e[11]=C,e[12]=M):M=e[12];let j;e[13]!==s.name?(j=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=j):j=e[14];let k;e[15]!==P||e[16]!==S||e[17]!==N||e[18]!==M||e[19]!==j?(k=r.jsx(zr,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:S,onClick:N,children:[M,j]})}),e[15]=P,e[16]=S,e[17]=N,e[18]=M,e[19]=j,e[20]=k):k=e[20];let U;e[21]!==g?(U=g("sandbox.fileTreeRow.newFile"),e[21]=g,e[22]=U):U=e[22];let $;e[23]!==h||e[24]!==U?($=r.jsx(fe,{onSelect:h,children:U}),e[23]=h,e[24]=U,e[25]=$):$=e[25];let Y;e[26]!==g?(Y=g("sandbox.fileTreeRow.newFolder"),e[26]=g,e[27]=Y):Y=e[27];let J;e[28]!==m||e[29]!==Y?(J=r.jsx(fe,{onSelect:m,children:Y}),e[28]=m,e[29]=Y,e[30]=J):J=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(it,{}),e[31]=ee):ee=e[31];let _;e[32]!==g?(_=g("sandbox.fileTreeRow.copyPath"),e[32]=g,e[33]=_):_=e[33];let A;e[34]!==f||e[35]!==_?(A=r.jsx(fe,{onSelect:f,children:_}),e[34]=f,e[35]=_,e[36]=A):A=e[36];let q;e[37]!==g?(q=g("sandbox.fileTreeRow.copyRelativePath"),e[37]=g,e[38]=q):q=e[38];let K;e[39]!==O||e[40]!==q?(K=r.jsx(fe,{onSelect:O,children:q}),e[39]=O,e[40]=q,e[41]=K):K=e[41];let W;e[42]===Symbol.for("react.memo_cache_sentinel")?(W=r.jsx(it,{}),e[42]=W):W=e[42];let G;e[43]!==g?(G=g("sandbox.fileTreeRow.rename"),e[43]=g,e[44]=G):G=e[44];let F;e[45]!==X||e[46]!==G?(F=r.jsx(fe,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=F):F=e[47];let B;e[48]!==g?(B=g("sandbox.fileTreeRow.delete"),e[48]=g,e[49]=B):B=e[49];let V;e[50]!==I||e[51]!==B?(V=r.jsx(fe,{variant:"destructive",onSelect:I,children:B}),e[50]=I,e[51]=B,e[52]=V):V=e[52];let Q;e[53]!==$||e[54]!==J||e[55]!==A||e[56]!==K||e[57]!==F||e[58]!==V?(Q=r.jsxs($r,{className:"w-52",children:[$,J,ee,A,K,W,F,V]}),e[53]=$,e[54]=J,e[55]=A,e[56]=K,e[57]=F,e[58]=V,e[59]=Q):Q=e[59];let ne;return e[60]!==Q||e[61]!==k?(ne=r.jsxs(Kr,{children:[k,Q]}),e[60]=Q,e[61]=k,e[62]=ne):ne=e[62],ne}const lt=200,Br=2,Vr=250,ct=200;function Hr(a,e){return Un(a,e)}function Ur(a){const e=se.c(9),{text:s,query:i}=a;let l,x,y;if(e[0]!==i||e[1]!==s){const{leadingEllipsis:b,segments:E}=Zn(s,i);l="truncate font-mono text-muted-foreground",x=b&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),y=E.map(qr),e[0]=i,e[1]=s,e[2]=l,e[3]=x,e[4]=y}else l=e[2],x=e[3],y=e[4];let u;return e[5]!==l||e[6]!==x||e[7]!==y?(u=r.jsxs("span",{className:l,children:[x,y]}),e[5]=l,e[6]=x,e[7]=y,e[8]=u):u=e[8],u}function qr(a,e){return a.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:a.text},e):r.jsx("span",{children:a.text},e)}function Ds({orgSlug:a,virtualMcpId:e,branch:s,threadId:i,openPath:l}){const x={orgSlug:a,virtualMcpId:e,branch:s,threadId:i},[y,u]=d.useState({files:[],directories:[],truncated:!1}),{files:b,directories:E}=y,[h,m]=d.useState(new Set),[f,O]=d.useState(null),[X,I]=d.useState(null),[C,g]=d.useState([]),[R,z]=d.useState(""),[L,T]=d.useState(null),[P,D]=d.useState(null),[S,N]=d.useState(!1),[M,j]=d.useState(!1),[k,U]=d.useState(!1),[$,Y]=d.useState(!1),[,J]=d.useState(new Set),[ee,_]=d.useState(new Set),A=d.useRef(0),q=d.useRef(null),K=d.useRef(new Set),W=d.useRef(new Map),G=d.useRef(null),F=d.useRef(0),B=d.useRef(null),V=d.useRef(null),Q=d.useRef(null);function ne(t){J(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[xe,de]=d.useState(new Map),Pe=d.useRef(null),[ae,be]=d.useState(null),{sendMessage:vt}=Sn(),{openSidePanel:Ct}=Mn(),ye=vn(),[H,oe]=d.useState(null),[Fe,ke]=d.useState(null),[ve,Ce]=d.useState(!1);async function ie(t,n){const o=await fetch(Hr(x,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function we(){ye.invalidateQueries({queryKey:st(x)})}function Be(t,n,o){navigator.clipboard.writeText(o).then(()=>te.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>te.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function wt(t){const n=or(t);if(!n)return;const o=`${a}/${e}/${s}`;ye.setQueryData(tt.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ye.invalidateQueries({queryKey:tt.liveMeta(a,e,s)})}function Nt(t){const n=t.kind==="file"?[t.path]:b.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ee(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)wt(o)}function jt(t){const n=Ee(t);return C.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=xe.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ve(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),O(n=>n&&t(n)),de(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),I(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Et(t){const n=Ee(t);I(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ve(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function St(t,n){if(!H)return;const o=De(H.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await me(),await we(),oe(null),he(o)}async function Dt(t,n){if(!H)return;const o=De(H.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),u(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await me(),await we(),oe(null),m(p=>{const v=new Set(p);for(const ce of ze(o))v.add(ce);return v.add(o),v}),I({name:n,path:o,kind:"directory",children:[]})}async function Mt(t,n){if(!H)return;const o=H.node.path,c=Se(o),p=De(c,n);if(p===o){oe(null);return}if(_e(p,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ve(v=>v===o?p:v.startsWith(`${o}/`)?De(p,v.slice(o.length+1)):v),await me(),await we(),oe(null)}async function Rt(t,n){Ce(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Nt(n),Et(n.path),await me(),await we(),ke(null),te.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){te.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{Ce(!1)}}async function Tt(t,n){const o=tr(n);if(o){te.error(o);return}Ce(!0);try{H?.mode==="new-file"?(await St(t,n),te.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Dt(t,n),te.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await Mt(t,n),te.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){te.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{Ce(!1)}}const He=d.useRef(!1);He.current||(He.current=!0,q.current=me());const[Pt,Ft]=d.useState(null),w=Te();if(l&&l!==Pt){Ft(l);const t=l;queueMicrotask(()=>{qn(t)&&he(t)})}async function Ae(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ue(t,n,o){if(o!==A.current)return!1;let c=!1;return u(p=>{const v=n?sr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&te.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function kt(t){const n=W.current.get(t);if(n)return n;const o=A.current,c=(async()=>{const p=await Ae({pattern:"**/*",path:re(t),limit:Oe}),v=Ue(p,!0,o);return!v&&o===A.current&&ne(ce=>{const Ne=new Set(ce);return Ne.add(t),Ne}),v})();W.current.set(t,c);try{return await c}finally{W.current.delete(t)}}async function qe(t){if(!$e(t,K.current))return!1;_(n=>new Set(n).add(t));try{return await kt(t)}finally{_(n=>{const o=new Set(n);return o.delete(t),o})}}async function At(t,n){const o=new Set(K.current);for(const c of ze(n)){if(!$e(c,o))continue;if(await qe(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function me(){const t=++A.current;B.current=null,V.current=null,W.current.clear(),U(!0),ne(new Set),m(new Set),_(new Set);try{const n=await Ae({pattern:"**/*",limit:Oe,maxDepth:Wn});Ue(n,!1,t),Y(!0)}catch{$&&te.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{U(!1)}}async function We(t){if(!xe.get(t)?.loaded){de(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=er(o.content??"");de(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Lt(){F.current++,T(null),D(null),N(!1),j(!1)}async function Ot(){const t=A.current,n=B.current;if(n&&n.generation===t)return n.files;const o=V.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Ae({pattern:"**/*",limit:Oe});return A.current===t&&(B.current={generation:t,files:p.files}),p.files})();V.current={generation:t,promise:c};try{return await c}finally{V.current?.generation===t&&(V.current=null)}}async function It(t,n){try{const o=await Ot();if(n!==F.current)return;T(nr(o,t,ct))}catch{if(n!==F.current)return;T([])}}async function Kt(t,n){N(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:lt});if(n!==F.current)return;D(rr(o.results??"")),j((o.matchCount??0)>=lt)}catch{if(n!==F.current)return;D([]),j(!1)}finally{n===F.current&&N(!1)}}function zt(t){const n=t.trim(),o=++F.current;It(n,o),n.length<Br?(D(null),N(!1),j(!1)):Kt(n,o)}function $t(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){Lt();return}G.current=setTimeout(()=>{zt(t)},Vr)}function Qe(t){const n=Q.current;if(!n||n.path!==f)return;Q.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function _t(t){Q.current={path:t.path,line:t.line};const n=f===t.path&&xe.get(t.path)?.loaded;he(t.path),n&&Pe.current&&Qe(Pe.current)}async function Gt(t,n){try{await ie("write",{path:re(t),content:n}),je("file saved via sandbox /write",{path:t}),ye.invalidateQueries({queryKey:st(x)});try{const o=await Rn(x);je("git status after save",o)}catch(o){je("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}de(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){je("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function Bt(t){O(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),be(null),C.includes(t)||g(n=>[...n,t]),We(t)}function Vt(t){g(n=>{const o=n.filter(c=>c!==t);return f===t&&O(o[o.length-1]??null),o}),de(n=>{const o=new Map(n);return o.delete(t),o})}function Xe(t){m(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Ht(t){if($e(t,K.current))try{if(await qe(t))return}catch(n){te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}Xe(t)}async function Ut(t,n){if(n){Xe(t);return}await Ht(t)}async function qt(t){await q.current,await At(w,t);const n=ze(t);m(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),Bt(t)}function he(t){qt(t).catch(n=>{te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Wt(){return X?.kind==="directory"?X.path:X?.kind==="file"?Se(X.path):f?Se(f):"/"}function Ye(t){const n=Wt();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Qt=Qn(b,E),Je=Xn(Qt,h),Le=L?.length??0,Ze=Yn(P??[]),et=P?.length??0,ue=f?xe.get(f):null,Xt=ue?.loaded&&ue.editorValue!==ue.savedContent,Yt=Fe?jt(Fe.path):[],Jt=(t,n)=>{Pe.current=t,Qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!f)return;const o=t.getValue();await Gt(f,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!f)return;const p=c.getValueInRange(o);be({filePath:f,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Zt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Ke(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),Ct(),vt({parts:[{type:"text",text:n.join(`
|
|
2
|
+
`)}]}),be(null)}return k&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{className:"size-5 text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Cn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:R,onChange:t=>$t(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(nt,{children:[r.jsx(rt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Ye("new-file"),children:r.jsx(wn,{size:14})})}),r.jsx(ot,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(nt,{children:[r.jsx(rt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Ye("new-folder"),children:r.jsx(Nn,{size:14})})}),r.jsx(ot,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(En,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!R&&Je.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=h.has(n.path),v=X?.path===n.path,ce=Jn(n.path,n.kind),Ne=c&&ee.has(n.path);return r.jsx(Gr,{node:n,depth:o,isExpanded:p,isSelected:v,isLoading:Ne,fileVisual:Ie(n.name),onSelect:()=>I(n),onOpen:()=>{c?Ut(n.path,p):he(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>Be(w,"Path",Ee(n.path)),onCopyRelativePath:()=>Be(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>ke(n)},n.path)}),!R&&$&&Je.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),R&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Le>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=ct?"+":""]})]}),L!==null&&L.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),L?.map(t=>{const n=t.split("/").pop()??t,o=Se(t),{Icon:c,color:p}=Ie(n),v=f===t;return r.jsxs("button",{type:"button",onClick:()=>he(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),R&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),et>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[et,M?"+":""]}),S&&r.jsx(pe,{className:"size-[10px]"})]}),!S&&P!==null&&Ze.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ze.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Ie(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>_t(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Ur,{text:p.text,query:R})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[C.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:C.map(t=>{const n=xe.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=f===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{O(t),We(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 classic:rounded p-0.5 hover:bg-accent-foreground/10 compact:rounded-lg",onClick:v=>{v.stopPropagation(),Vt(t)},children:r.jsx(jn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Zt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&be(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center classic:rounded-full compact:rounded-lg bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:f&&ue?.loaded?r.jsx(Dn,{language:Ke(f),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ue.editorValue,path:f,onChange:t=>{const n=f;n&&de(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Jt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{className:"size-5 text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},f):f&&!ue?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{className:"size-5 text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),f&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:f}),r.jsxs("span",{children:[w(Xt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(f)]})]})]}),r.jsx(ir,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:ve,onSubmit:t=>Tt(w,t),onOpenChange:t=>{!t&&!ve&&oe(null)}}),r.jsx(lr,{deleteTarget:Fe,deleteDirtyPaths:Yt,fsActionPending:ve,onOpenChange:t=>{!t&&!ve&&ke(null)},onConfirm:t=>{Rt(w,t)}})]})}export{Ds as FileExplorer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,
|
|
1
|
+
import{c as x,x as g,j as s,h as v,B as b,aP as w}from"./index-BiU3YmQL.js";import{n as y}from"./Download01-Z6w2IrLj.js";import{c as N}from"./use-org-fs-CJMhF9AL.js";import{g as S}from"./utils-Bn3HByb8.js";import{F as _}from"./editor-9_pChBN4.js";import{F as k}from"./file-type-icon-C7b31Eu-.js";import{M as z}from"./markdown-Cyp9lJ5l.js";function U(n){const e=x.c(11),{value:l,filename:o}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let i;e[0]!==o?(i=S(o),e[0]=o,e[1]=i):i=e[1];const f=c?"vs-dark":"light";let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(v,{className:"size-5 text-muted-foreground"})}),e[2]=a):a=e[2];let r,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(r={enabled:!1},d={top:12,bottom:12},e[3]=r,e[4]=d):(r=e[3],d=e[4]);let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:r,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=m):m=e[5];let u;return e[6]!==o||e[7]!==i||e[8]!==f||e[9]!==l?(u=s.jsx(_,{path:o,language:i,value:l,theme:f,loading:a,options:m},o),e[6]=o,e[7]=i,e[8]=f,e[9]=l,e[10]=u):u=e[10],u}function E(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const F=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),T=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),h=2*1024*1024;function $(n,e){const l=n.split(".").pop()?.toLowerCase()??"";return F.has(l)?"image":l==="pdf"?"pdf":l==="html"||l==="htm"?"html":l==="md"||l==="markdown"?e<=h?"markdown":"download":T.has(l)&&e<=h?"text":"download"}function M(){const n=x.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let l;return n[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(w,{className:"h-3 w-full"}),s.jsx(w,{className:"h-3 w-5/6"}),s.jsx(w,{className:"h-3 w-2/3"})]})]})}),n[1]=l):l=n[1],l}function j(n){const e=x.c(20),{file:l,note:o}=n;let t;e[0]!==l.filename?(t=s.jsx(k,{filename:l.filename,className:"h-12 w-10"}),e[0]=l.filename,e[1]=t):t=e[1];let c;e[2]!==l.filename?(c=s.jsx("span",{className:"text-sm font-medium text-foreground",children:l.filename}),e[2]=l.filename,e[3]=c):c=e[3];let i;e[4]!==l.size?(i=E(l.size),e[4]=l.size,e[5]=i):i=e[5];const f=o?` · ${o}`:"";let a;e[6]!==i||e[7]!==f?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[i,f]}),e[6]=i,e[7]=f,e[8]=a):a=e[8];let r;e[9]!==c||e[10]!==a?(r=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=r):r=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(y,{size:14}),e[12]=d):d=e[12];let m;e[13]!==l.downloadUrl||e[14]!==l.filename?(m=s.jsx(b,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:l.downloadUrl,download:l.filename,children:[d,"Download"]})}),e[13]=l.downloadUrl,e[14]=l.filename,e[15]=m):m=e[15];let u;return e[16]!==t||e[17]!==r||e[18]!==m?(u=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[t,r,m]})}),e[16]=t,e[17]=r,e[18]=m,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:o}=n,{data:t,isPending:c,isError:i}=N(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(M,{}),e[0]=a):a=e[0],a}if(i||!t){let a;return e[1]!==l?(a=s.jsx(j,{file:l,note:"preview unavailable"}),e[1]=l,e[2]=a):a=e[2],a}if(o){const a=`file-preview-${l.key}`;let r;return e[3]!==t||e[4]!==a?(r=s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:s.jsx(z,{id:a,text:t})})}),e[3]=t,e[4]=a,e[5]=r):r=e[5],r}let f;return e[6]!==t||e[7]!==l.filename?(f=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=f):f=e[8],f}function I(n){const e=x.c(15),{file:l}=n;switch($(l.filename,l.size)){case"image":{let t;return e[0]!==l.downloadUrl||e[1]!==l.filename?(t=s.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:s.jsx("img",{src:l.downloadUrl,alt:l.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=l.downloadUrl,e[1]=l.filename,e[2]=t):t=e[2],t}case"pdf":{let t;return e[3]!==l.downloadUrl||e[4]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,className:"block h-full w-full bg-white"}),e[3]=l.downloadUrl,e[4]=l.filename,e[5]=t):t=e[5],t}case"html":{let t;return e[6]!==l.downloadUrl||e[7]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=t):t=e[8],t}case"markdown":{let t;return e[9]!==l?(t=s.jsx(p,{file:l,markdown:!0}),e[9]=l,e[10]=t):t=e[10],t}case"text":{let t;return e[11]!==l?(t=s.jsx(p,{file:l,markdown:!1}),e[11]=l,e[12]=t):t=e[12],t}default:{let t;return e[13]!==l?(t=s.jsx(j,{file:l}),e[13]=l,e[14]=t):t=e[14],t}}}export{I as F,M as a,E as f};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as ee,b as te,j as t,B as R,aH as de,l as se,I as ue,F as fe,H as he,G as re,a0 as me,o as pe,r as S,t as Z,K as ie,a9 as xe,R as be}from"./index-BiU3YmQL.js";import{c as Q,T as Y,a as G}from"./tooltip-BGb6Kdym.js";import{n as oe}from"./Download01-Z6w2IrLj.js";import{a4 as we,aI as ke,i as ge}from"./agent-icon-DbgbaBWC.js";import{i as ve}from"./LayoutLeft-DUo3bbMr.js";import{n as ye}from"./LinkExternal01-uHE64k_w.js";import{d as Se,e as je,g as Te,u as Me}from"./use-org-fs-CJMhF9AL.js";import{c as Ce,d as De,b as Pe,D as Ne}from"./dialog-yUWKJPsU.js";import{I as Ee}from"./input-4CSpUSQl.js";import{a as Oe,b as $e,P as Be}from"./popover-QnaOlHhb.js";import{a as ze}from"./Copy01-BYK2zIkj.js";import{i as ae}from"./Globe01-D3UtmZtY.js";import{i as Re}from"./Key01-B8q0d-op.js";import{a as Ie}from"./Share07-CW1RSVqD.js";function Le(a){const e=ee.c(52),{readUrl:d,editor:i,downloadName:p,trailing:m}=a,r=te();let u;e[0]!==d?(u=new URL(d,window.location.origin).toString(),e[0]=d,e[1]=u):u=e[1];const s=u;let n;e[2]!==i||e[3]!==r?(n=i.deckDetected&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(R,{variant:i.railOpen?"secondary":"ghost",size:"icon","aria-label":i.railOpen?r("deck.deckToolbar.hideSlideList"):r("deck.deckToolbar.showSlideList"),onClick:()=>i.setRailOpen(!i.railOpen),children:t.jsx(ve,{size:14})})}),t.jsx(G,{side:"bottom",children:i.railOpen?r("deck.deckToolbar.hideSlideList"):r("deck.deckToolbar.showSlideList")})]}),e[2]=i,e[3]=r,e[4]=n):n=e[4];let f;e[5]!==s?(f=()=>window.open(s,"_blank","noopener"),e[5]=s,e[6]=f):f=e[6];let h;e[7]!==s?(h=t.jsx("span",{className:"truncate",children:s}),e[7]=s,e[8]=h):h=e[8];let g;e[9]!==s||e[10]!==f||e[11]!==h?(g=t.jsx("button",{type:"button",onClick:f,className:"flex min-w-0 flex-1 items-center classic:rounded-md compact:rounded-lg px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:s,children:h}),e[9]=s,e[10]=f,e[11]=h,e[12]=g):g=e[12];let k;e[13]!==i.agentUpdated||e[14]!==i.reload||e[15]!==r?(k=i.agentUpdated&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:i.reload,children:[t.jsx(de,{size:12}),r("deck.deckToolbar.agentUpdatedReload")]})}),t.jsx(G,{side:"bottom",children:r("deck.deckToolbar.agentRewriteWarning")})]}),e[13]=i.agentUpdated,e[14]=i.reload,e[15]=r,e[16]=k):k=e[16];let x;e[17]!==i.saving||e[18]!==r?(x=i.saving&&t.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:r("deck.deckToolbar.saving")}),e[17]=i.saving,e[18]=r,e[19]=x):x=e[19];let b;e[20]!==i||e[21]!==r?(b=i.deckDetected&&i.writable&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(R,{variant:i.editMode?"secondary":"ghost",size:"icon","aria-label":i.editMode?r("deck.deckToolbar.doneEditing"):r("deck.deckToolbar.editInline"),className:se(i.editMode&&"text-primary"),onClick:()=>i.setEditMode(!i.editMode),children:t.jsx(we,{size:14})})}),t.jsx(G,{side:"bottom",children:i.editMode?r("deck.deckToolbar.doneEditing"):r("deck.deckToolbar.editInlineTooltip")})]}),e[20]=i,e[21]=r,e[22]=b):b=e[22];let C;e[23]!==s||e[24]!==p||e[25]!==i.deckDetected||e[26]!==r?(C=i.deckDetected?t.jsxs(ue,{children:[t.jsx(fe,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon","aria-label":r("deck.deckToolbar.download"),children:t.jsx(oe,{size:14})})}),t.jsxs(he,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${s}#print`,"_blank","noopener"),children:[t.jsx(ke,{size:14}),r("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:s,download:p,children:[t.jsx(ge,{size:14}),r("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon","aria-label":r("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:s,download:p,children:t.jsx(oe,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("deck.deckToolbar.download")})]}),e[23]=s,e[24]=p,e[25]=i.deckDetected,e[26]=r,e[27]=C):C=e[27];let j;e[28]!==r?(j=r("deck.deckToolbar.openInNewTab"),e[28]=r,e[29]=j):j=e[29];let v;e[30]!==s?(v=()=>window.open(s,"_blank","noopener"),e[30]=s,e[31]=v):v=e[31];let P;e[32]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(ye,{size:14}),e[32]=P):P=e[32];let D;e[33]!==j||e[34]!==v?(D=t.jsx(Y,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon","aria-label":j,onClick:v,children:P})}),e[33]=j,e[34]=v,e[35]=D):D=e[35];let N;e[36]!==r?(N=r("deck.deckToolbar.openInNewTab"),e[36]=r,e[37]=N):N=e[37];let M;e[38]!==N?(M=t.jsx(G,{side:"bottom",children:N}),e[38]=N,e[39]=M):M=e[39];let l;e[40]!==D||e[41]!==M?(l=t.jsxs(Q,{children:[D,M]}),e[40]=D,e[41]=M,e[42]=l):l=e[42];let E;return e[43]!==l||e[44]!==n||e[45]!==g||e[46]!==k||e[47]!==x||e[48]!==b||e[49]!==C||e[50]!==m?(E=t.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[n,g,k,x,b,C,l,m]}),e[43]=l,e[44]=n,e[45]=g,e[46]=k,e[47]=x,e[48]=b,e[49]=C,e[50]=m,e[51]=E):E=e[51],E}const X=1;function Ue(a){if(typeof a!="object"||a===null||a.v!==X||a.source!=="deck-viewer")return null;const e=a;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class U extends Error{constructor(e,d){super(e),this.code=d,this.name="DeckOpError"}code}function le(a){return[...a.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Ae(a){const d=new DOMParser().parseFromString(a,"text/html").querySelector("deck-viewer");return d?le(d).length:null}function Fe(a,e){const d=new DOMParser().parseFromString(a,"text/html"),i=d.querySelector("deck-viewer");if(!i)throw new U("no <deck-viewer> element in source","no-viewer");const p=le(i),m=e.kind==="move"?e.from:e.at,r=p[m];if(!r)throw new U(`slide index ${m} out of range (${p.length})`,"stale-index");switch(e.kind){case"remove":{if(p.length<=1)throw new U("cannot remove the last slide","bad-op");r.remove();break}case"duplicate":{const s=r.cloneNode(!0);s.removeAttribute("id");for(const n of s.querySelectorAll("[id]"))n.removeAttribute("id");r.after(s);break}case"move":{if(e.to<0||e.to>=p.length)throw new U(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const s=e.to<e.from?p[e.to]:p[e.to].nextSibling;i.insertBefore(r,s)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new U(`invalid attribute name: ${e.name}`,"bad-op");r.setAttribute(e.name,e.value);break}case"remove-attr":{r.removeAttribute(e.name);break}case"replace":{const n=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!n)throw new U("replace html has no root element","bad-op");r.replaceWith(d.importNode(n,!0));break}default:throw new U(`unknown op kind: ${e.kind}`,"bad-op")}return`${a.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
2
|
+
`:""}${d.documentElement.outerHTML}
|
|
3
|
+
`}const ne="home",_e=400,qe=800;function He(a){const e=a.savePath!==void 0,{org:d}=me(),i=pe(),p=Se(ne),[m,r]=S.useState(!1),[u,s]=S.useState(!1),[n,f]=S.useState(!1),[h,g]=S.useState(!1),[k,x]=S.useState(!1),[b,C]=S.useState(!1),[j,v]=S.useState(null),[P,D]=S.useState(null),[N,M]=S.useState(0),[l]=S.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),E=m||b||k,F=()=>{a.savePath!==void 0&&(i.invalidateQueries({queryKey:ie.orgFsStat(d.id,ne,a.savePath)}),i.invalidateQueries({queryKey:ie.orgFsRecent(d.id)}))},y=o=>{l.iframe?.contentWindow?.postMessage(o,"*")},$=()=>{l.source=null,g(!1),P&&v(P),M(o=>o+1),F()};a.statMarker!==P&&(D(a.statMarker),a.statMarker!==null&&(j===null?v(a.statMarker):l.selfMarkers.has(a.statMarker)||a.statMarker!==j&&(E?g(!0):(l.source=null,v(a.statMarker)))));const _=async()=>{l.saveTimer=null;const o=l.source;if(o===null){C(!1);return}x(!0);try{const c=await p.mutateAsync({path:a.savePath,body:o});l.selfMarkers.add(je(c)),F()}catch(c){console.error("[deck-editor] save failed",c),Z.error("Couldn't save deck edits — reloading the preview."),T.current.reload()}finally{x(!1),C(!1)}},q=o=>{C(!0),l.saveTimer&&clearTimeout(l.saveTimer),l.saveTimer=setTimeout(()=>{T.current.flushSave()},o)},O=(o,c,w)=>{y({v:X,type:"ack",opId:o,ok:c,error:w})},B=async o=>{if(!e){O(o.opId,!1,"read-only preview");return}try{if(l.source===null){const w=await fetch(a.readUrl,{credentials:"include"});if(!w.ok)throw new Error(`HTTP ${w.status}`);l.source=await w.text()}const c=Ae(l.source);if(c===null||c!==o.witness.childCount)throw new U(`slide count drifted (source ${c}, iframe ${o.witness.childCount})`,"stale-index");l.source=Fe(l.source,o.op),O(o.opId,!0),q(o.op.kind==="replace"?qe:_e)}catch(c){console.error("[deck-editor] op failed",o.op,c),O(o.opId,!1,c instanceof Error?c.message:String(c)),Z.error("That edit couldn't be saved — reloading the preview."),T.current.reload()}},z=o=>{if(!l.iframe||o.source!==l.iframe.contentWindow)return;const c=Ue(o.data);if(c){if(c.type==="ready"){s(!0),T.current.editMode?y({v:X,type:"set-edit-mode",enabled:!0}):T.current.railOpen&&y({v:X,type:"set-rail",open:!0});return}c.type==="op"&&(l.queue=l.queue.then(()=>T.current.handleOp(c)).catch(()=>{}))}},T=S.useRef({onMessage:z,handleOp:B,flushSave:_,reload:$,editMode:m,railOpen:n});T.current={onMessage:z,handleOp:B,flushSave:_,reload:$,editMode:m,railOpen:n};const[I]=S.useState(()=>{let o=null;return c=>{if(c){l.iframe=c;const w=A=>T.current.onMessage(A);window.addEventListener("message",w),o=()=>window.removeEventListener("message",w)}else o?.(),o=null,l.iframe=null}}),L=o=>{f(o),y({v:X,type:"set-rail",open:o})},H=o=>{r(o),y({v:X,type:"set-edit-mode",enabled:o}),o&&f(!0),!o&&h&&!b&&!k&&$()};return{iframeRef:I,deckDetected:u,writable:e,displayedMarker:j===null?null:`${j}.${N}`,editMode:m,setEditMode:H,railOpen:n,setRailOpen:L,saving:k,agentUpdated:h,reload:$,postToIframe:y}}const Ke=300;function at({readUrl:a,marker:e,title:d,savePath:i,trailing:p}){const m=He({readUrl:a,statMarker:e,savePath:i}),[r,u]=S.useState(null);if(m.displayedMarker===null)return null;const s=a.includes("?")?"&":"?",n=`${a}${s}v=${encodeURIComponent(m.displayedMarker)}`,f=r===n;return t.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[t.jsx(Le,{readUrl:a,editor:m,downloadName:d.split("/").pop()??d,trailing:p}),t.jsx("div",{className:"relative flex-1",children:t.jsx("iframe",{ref:m.iframeRef,src:n,onLoad:()=>u(n),sandbox:"allow-scripts allow-downloads",className:se("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",f?"opacity-100":"opacity-0"),style:{transitionDuration:`${Ke}ms`},title:d},n)})]})}const We=[{mode:"private",labelKey:"library.fileShareButton.modeOrgOnly",Icon:be},{mode:"public",labelKey:"library.fileShareButton.modePublic",Icon:ae},{mode:"password",labelKey:"library.fileShareButton.modePassword",Icon:Re}];function ce(a){const e=ee.c(56),{volume:d,path:i,kind:p,shareMode:m,effectivePublic:r,url:u}=a,s=te(),n=Te(d),{data:f}=Me(d,i),h=f?.shareMode??m,k=(f?.effectivePublic??r)&&h==="private",x=p==="dir",b=x?"folder":"file",[C,j]=S.useState(!1),[v,P]=S.useState(""),[D,N]=S.useState(!1);let M;e[0]!==i||e[1]!==n||e[2]!==b||e[3]!==s?(M=(o,c)=>{n.mutate({path:i,mode:o,password:c},{onSuccess:()=>{j(!1),P(""),Z.success(o==="private"?s("library.fileShareButton.toastOrgOnly",{subject:b}):o==="public"?s("library.fileShareButton.toastPublic",{subject:b}):s("library.fileShareButton.toastPassword",{subject:b}))},onError:w=>Z.error(w instanceof Error?w.message:s("library.fileShareButton.failedUpdateSharing"))})},e[0]=i,e[1]=n,e[2]=b,e[3]=s,e[4]=M):M=e[4];const l=M;let E;e[5]!==l?(E=o=>{if(o==="password"){j(!0);return}j(!1),l(o)},e[5]=l,e[6]=E):E=e[6];const F=E,y=C?"password":h;let $;e[7]!==s||e[8]!==u?($=async()=>{u&&(await navigator.clipboard.writeText(u),N(!0),Z.success(s("library.fileShareButton.linkCopied")),setTimeout(()=>N(!1),2e3))},e[7]=s,e[8]=u,e[9]=$):$=e[9];const _=$;let q;e[10]!==D||e[11]!==_||e[12]!==s||e[13]!==u?(q=u?t.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[t.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:u}),t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:_,"aria-label":s("library.fileShareButton.copyLink"),children:D?t.jsx(xe,{size:12,className:"text-success"}):t.jsx(ze,{size:12})})]}):null,e[10]=D,e[11]=_,e[12]=s,e[13]=u,e[14]=q):q=e[14];const O=q;if(k){let o;e[15]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(ae,{size:16})}),e[15]=o):o=e[15];let c;e[16]!==s?(c=s("library.fileShareButton.sharedViaParent"),e[16]=s,e[17]=c):c=e[17];let w;e[18]!==c?(w=t.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),e[18]=c,e[19]=w):w=e[19];const A=x?"files in this folder":"this file";let K;e[20]!==s||e[21]!==A?(K=s("library.fileShareButton.inheritedDescription",{target:A}),e[20]=s,e[21]=A,e[22]=K):K=e[22];let W;e[23]!==K?(W=t.jsx("span",{className:"text-xs text-muted-foreground",children:K}),e[23]=K,e[24]=W):W=e[24];let V;e[25]!==W||e[26]!==w?(V=t.jsxs("div",{className:"flex items-start gap-3",children:[o,t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[w,W]})]}),e[25]=W,e[26]=w,e[27]=V):V=e[27];let J;return e[28]!==O||e[29]!==V?(J=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[V,O]}),e[28]=O,e[29]=V,e[30]=J):J=e[30],J}let B;e[31]!==y||e[32]!==F||e[33]!==n.isPending||e[34]!==s?(B=We.map(o=>{const{mode:c,labelKey:w,Icon:A}=o;return t.jsxs("button",{type:"button",disabled:n.isPending,onClick:()=>F(c),className:se("flex flex-col items-center gap-1 classic:rounded-md compact:rounded-lg px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",y===c?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[t.jsx(A,{size:15}),s(w)]},c)}),e[31]=y,e[32]=F,e[33]=n.isPending,e[34]=s,e[35]=B):B=e[35];let z;e[36]!==B?(z=t.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:B}),e[36]=B,e[37]=z):z=e[37];let T;e[38]!==y||e[39]!==x||e[40]!==s?(T=y==="private"?s("library.fileShareButton.privateDescription",{target:x?"these files":"this link"}):y==="public"?s(x?"library.fileShareButton.publicFolderDescription":"library.fileShareButton.publicFileDescription"):s("library.fileShareButton.passwordDescription",{target:x?"files in this folder":"this file"}),e[38]=y,e[39]=x,e[40]=s,e[41]=T):T=e[41];let I;e[42]!==T?(I=t.jsx("p",{className:"text-xs text-muted-foreground",children:T}),e[42]=T,e[43]=I):I=e[43];let L;e[44]!==y||e[45]!==l||e[46]!==h||e[47]!==v||e[48]!==n.isPending||e[49]!==s?(L=y==="password"&&t.jsxs("form",{className:"flex items-center gap-2",onSubmit:o=>{o.preventDefault(),v&&l("password",v)},children:[t.jsx(Ee,{type:"password",value:v,onChange:o=>P(o.target.value),placeholder:s(h==="password"?"library.fileShareButton.newPasswordPlaceholder":"library.fileShareButton.passwordPlaceholder"),autoComplete:"new-password",className:"h-8 text-xs"}),t.jsx(R,{type:"submit",size:"sm",className:"shrink-0",disabled:!v||n.isPending,children:s(h==="password"?"library.fileShareButton.buttonUpdate":"library.fileShareButton.buttonSet")})]}),e[44]=y,e[45]=l,e[46]=h,e[47]=v,e[48]=n.isPending,e[49]=s,e[50]=L):L=e[50];let H;return e[51]!==O||e[52]!==z||e[53]!==I||e[54]!==L?(H=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[z,I,L,O]}),e[51]=O,e[52]=z,e[53]=I,e[54]=L,e[55]=H):H=e[55],H}function lt(a){const e=ee.c(21),{volume:d,path:i,shareMode:p,effectivePublic:m,url:r}=a,u=te();let s;e[0]!==u?(s=u("library.fileShareButton.share"),e[0]=u,e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ie,{size:14}),e[2]=n):n=e[2];let f;e[3]!==s?(f=t.jsx(Y,{asChild:!0,children:t.jsx(Oe,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon","aria-label":s,children:n})})}),e[3]=s,e[4]=f):f=e[4];let h;e[5]!==u?(h=u("library.fileShareButton.share"),e[5]=u,e[6]=h):h=e[6];let g;e[7]!==h?(g=t.jsx(G,{side:"bottom",children:h}),e[7]=h,e[8]=g):g=e[8];let k;e[9]!==f||e[10]!==g?(k=t.jsxs(Q,{children:[f,g]}),e[9]=f,e[10]=g,e[11]=k):k=e[11];let x;e[12]!==m||e[13]!==i||e[14]!==p||e[15]!==r||e[16]!==d?(x=t.jsx($e,{align:"end",className:"w-80 p-3",children:t.jsx(ce,{volume:d,path:i,kind:"file",shareMode:p,effectivePublic:m,url:r})}),e[12]=m,e[13]=i,e[14]=p,e[15]=r,e[16]=d,e[17]=x):x=e[17];let b;return e[18]!==k||e[19]!==x?(b=t.jsxs(Be,{children:[k,x]}),e[18]=k,e[19]=x,e[20]=b):b=e[20],b}function ct(a){const e=ee.c(14),{target:d,onOpenChange:i}=a,p=te(),m=!!d,r=d?.kind==="dir"?"folder":"file";let u;e[0]!==p||e[1]!==r?(u=p("library.fileShareButton.shareDialogTitle",{type:r}),e[0]=p,e[1]=r,e[2]=u):u=e[2];let s;e[3]!==u?(s=t.jsx(Ce,{children:t.jsx(De,{children:u})}),e[3]=u,e[4]=s):s=e[4];let n;e[5]!==d?(n=d&&t.jsx(ce,{...d}),e[5]=d,e[6]=n):n=e[6];let f;e[7]!==s||e[8]!==n?(f=t.jsxs(Pe,{className:"sm:max-w-md",children:[s,n]}),e[7]=s,e[8]=n,e[9]=f):f=e[9];let h;return e[10]!==i||e[11]!==m||e[12]!==f?(h=t.jsx(Ne,{open:m,onOpenChange:i,children:f}),e[10]=i,e[11]=m,e[12]=f,e[13]=h):h=e[13],h}export{lt as F,at as H,ct as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as o}from"./index-
|
|
1
|
+
import{c as g,j as o}from"./index-BiU3YmQL.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,r as D,j as o}from"./index-
|
|
1
|
+
import{c as A,r as D,j as o}from"./index-BiU3YmQL.js";import{s as $}from"./Eye-ChO6k3fk.js";const v={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}};function U(w){const t=A.c(46);let s,r,l,j;t[0]!==w?({glyph:s,readOnly:l,tone:j,...r}=w,t[0]=w,t[1]=s,t[2]=r,t[3]=l,t[4]=j):(s=t[1],r=t[2],l=t[3],j=t[4]);const e=v[j===void 0?"default":j],E=D.useId(),k=`${E}-back`,b=`${E}-front`,C=`url(#${k})`;let i;t[5]!==C?(i=o.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:C}),t[5]=C,t[6]=i):i=t[6];const B=`url(#${b})`;let n;t[7]!==B?(n=o.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:B}),t[7]=B,t[8]=n):n=t[8];let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),t[9]=u):u=t[9];let c,f;t[10]!==e.stripe?(c=o.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:e.stripe}),f=o.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:e.stripe}),t[10]=e.stripe,t[11]=c,t[12]=f):(c=t[11],f=t[12]);let a;t[13]!==s||t[14]!==e.glyph?(a=s&&o.jsx(s,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:e.glyph,opacity:.55}}),t[13]=s,t[14]=e.glyph,t[15]=a):a=t[15];let d;t[16]!==l?(d=l&&o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),o.jsx($,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),t[16]=l,t[17]=d):d=t[17];let h;t[18]!==e.backFrom?(h=o.jsx("stop",{offset:"0.3",stopColor:e.backFrom}),t[18]=e.backFrom,t[19]=h):h=t[19];let p;t[20]!==e.backTo?(p=o.jsx("stop",{offset:"1",stopColor:e.backTo}),t[20]=e.backTo,t[21]=p):p=t[21];let x;t[22]!==k||t[23]!==h||t[24]!==p?(x=o.jsxs("linearGradient",{id:k,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[h,p]}),t[22]=k,t[23]=h,t[24]=p,t[25]=x):x=t[25];let m;t[26]!==e.frontFrom?(m=o.jsx("stop",{stopColor:e.frontFrom}),t[26]=e.frontFrom,t[27]=m):m=t[27];let F;t[28]!==e.frontTo?(F=o.jsx("stop",{offset:"1",stopColor:e.frontTo}),t[28]=e.frontTo,t[29]=F):F=t[29];let y;t[30]!==b||t[31]!==m||t[32]!==F?(y=o.jsxs("radialGradient",{id:b,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[m,F]}),t[30]=b,t[31]=m,t[32]=F,t[33]=y):y=t[33];let g;t[34]!==x||t[35]!==y?(g=o.jsxs("defs",{children:[x,y]}),t[34]=x,t[35]=y,t[36]=g):g=t[36];let T;return t[37]!==r||t[38]!==d||t[39]!==g||t[40]!==i||t[41]!==n||t[42]!==c||t[43]!==f||t[44]!==a?(T=o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...r,children:[i,n,u,c,f,a,d,g]}),t[37]=r,t[38]=d,t[39]=g,t[40]=i,t[41]=n,t[42]=c,t[43]=f,t[44]=a,t[45]=T):T=t[45],T}export{U as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dd as C,c as d,j as c,aU as j,r as f,l as p,bd as b,de as v,df as h}from"./index-BiU3YmQL.js";import{L as N}from"./label-BNElcQf4.js";const E=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-BiU3YmQL.js";function i(t){let r=2166136261;for(let e=0;e<t.length;e++)r=Math.imul(r^t.charCodeAt(e),16777619);return`a${(r>>>0).toString(36).padStart(6,"0").slice(-6)}`}function l(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function o(t,r){if(!r)return t;const e=`${i(r)}_`;return t.startsWith(e)?t.slice(e.length):t}function a(t,r){return o(t,r).replace(/[_-]/g," ").toLowerCase()}export{a as d,l as g,o as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ao as re,ap as J,b as M,a0 as ie,o as le,ar as ce,aq as ge,e as ne,q as H,t as B,K as ee,j as i,dW as se,dX as oe,dY as V,aU as de,c as Y,r as X,a6 as me,$ as te,bQ as ue,bR as fe,y as pe,B as he,n as U,e_ as xe}from"./index-BiU3YmQL.js";import{u as je}from"./use-org-auth-client-cknSmCL5.js";import{u as ze}from"./use-debounced-autosave-DwFjgR25.js";import{A as Se}from"./avatar-CsDZ0T22.js";import{I as ae}from"./input-4CSpUSQl.js";import{C as ve}from"./review-settings-Be2fdXif.js";import{D as Oe}from"./domain-settings-DWfJmRnt.js";import{A as be,a as ye,b as Ce,c as _e,g as Ae,d as De,e as Fe,f as we}from"./alert-dialog-CMdGVc5y.js";import{R as Ne}from"./require-capability-CimSbmsz.js";import"./User01-CQXsOD6P.js";import"./switch-DUPW32_G.js";import"./UserSquare-C4_QxRGQ.js";import"./SearchLg-BvCfRAbg.js";import"./use-organization-settings-DalrVcZ1.js";import"./schema-C2CxTC2d.js";import"./task-board-iF-5OywY.js";import"./use-connection-C2XMAF5j.js";import"./use-mcp-client-Br7XFHza.js";import"./auth-DvTDuEnH.js";import"./badge-BMuU0t5h.js";import"./select-47N7H1PV.js";import"./index-DAWDSRE3.js";import"./ChevronUp-Djmy8s04.js";import"./access-gate-C720AIcS.js";import"./capability-load-error-HRK6520w.js";const Te=re({name:J().min(1,"Name is required").max(255,"Name is too long"),logo:J().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=M(),m=X.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=W=>{const z=W.target.files?.[0];if(!z)return;if(z.size>2097152){B.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>B.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Le(){const e=M(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{H("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),B.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{H("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),B.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(V,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(V,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(V,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Pe(){const e=Y.c(86),t=M(),{org:n}=ie(),[g,r]=X.useState(!1),[l,d]=X.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{H("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),B.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{B.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const W=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:W,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(V,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let G;e[35]===Symbol.for("react.memo_cache_sentinel")?(G=v=>{r(v),v||d("")},e[35]=G):G=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=v=>d(v.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:K,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let L;e[63]!==E?(L=i.jsx(_e,{children:E}),e[63]=E,e[64]=L):L=e[64];let P;e[65]!==o?(P=()=>o.mutate(),e[65]=o,e[66]=P):P=e[66];const Z=l!==n.name||o.isPending;let R;e[67]!==o.isPending||e[68]!==t?(R=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=R):R=e[69];let k;e[70]!==P||e[71]!==Z||e[72]!==R?(k=i.jsx(Ae,{onClick:P,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R}),e[70]=P,e[71]=Z,e[72]=R,e[73]=k):k=e[73];let q;e[74]!==L||e[75]!==k?(q=i.jsxs(De,{children:[L,k]}),e[74]=L,e[75]=k,e[76]=q):q=e[76];let I;e[77]!==T||e[78]!==q?(I=i.jsxs(Fe,{children:[T,q]}),e[77]=T,e[78]=q,e[79]=I):I=e[79];let $;e[80]!==g||e[81]!==I?($=i.jsx(we,{open:g,onOpenChange:G,children:I}),e[80]=g,e[81]=I,e[82]=$):$=e[82];let Q;return e[83]!==b||e[84]!==$?(Q=i.jsxs(i.Fragment,{children:[b,$]}),e[83]=b,e[84]=$,e[85]=Q):Q=e[85],Q}function Re(){const e=Y.c(10),t=M();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx(U.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Le,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Pe,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx(U,{children:i.jsx(U.Content,{children:i.jsx(U.Container,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function lt(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(Re,{})}),e[0]=t):t=e[0],t}export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as o}from"./index-
|
|
1
|
+
import{c as n,j as o}from"./index-BiU3YmQL.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as S,b as $,a0 as B,j as o,L as Y,q as z,B as q,ag as U,a6 as V,K as W,m as X,Z,a as ee,r as F,af as te,n as R,aj as oe,h as re}from"./index-BiU3YmQL.js";import{C as ie}from"./index-CxyF2W3e.js";import{s as se}from"./Plus-CoGTSnEd.js";import{i as ne}from"./SearchLg-BvCfRAbg.js";import{C as le}from"./input-BGhe0a85.js";import{D as me,C as ae}from"./chat-context-CHZ5Yehn.js";import{a as ce}from"./use-organization-settings-DalrVcZ1.js";import{E as pe}from"./empty-state-1TOptJ4i.js";import{R as fe}from"./repository-import-picker-IY5VTzNS.js";import{o as de}from"./shell-layout-BMyUKhgs.js";import{i as J}from"./ArrowRight-Cl3bzAIC.js";import{C as ue,a as ge,b as xe}from"./client-icons-BPRdY54C.js";import{u as he,b as je,P as be}from"./project-feed-B-N2eAAK.js";import{A as _e}from"./agent-icon-DbgbaBWC.js";import{u as ye}from"./use-navigate-to-agent-LXQlcEnV.js";import{b as Ce}from"./task-route-D4VqZZFU.js";import{s as Ne}from"./use-project-scope-_WcnrAA6.js";import{b as Se}from"./use-virtual-mcp-CmFx7CJY.js";import"./use-mobile-DVkjqQzh.js";import"./thread-button-DcS2EMEc.js";import"./sidebar-BMWTk3Ss.js";import"./LayoutLeft-DUo3bbMr.js";import"./sheet-CvV2x5yz.js";import"./X-BmPcW1eb.js";import"./tooltip-BGb6Kdym.js";import"./index-DAWDSRE3.js";import"./thread-route-CTwlz0m2.js";import"./use-panel-navigate-DMG8fP2m.js";import"./use-route-default-main-fIaACxCL.js";import"./hooks-GmRpr8h8.js";import"./use-mcp-client-Br7XFHza.js";import"./auth-DvTDuEnH.js";import"./backoff-8mStPHYB.js";import"./task-board-iF-5OywY.js";import"./schema-C2CxTC2d.js";import"./toolbar-icon-button-DPZ8v-BD.js";import"./use-in-settings-CaGFgkXe.js";import"./resizable-YNqh8MUH.js";import"./route-page-header-DEpOaETW.js";import"./index-CuhH8P7u.js";import"./gateway-client-BqcIzR1f.js";import"./dialog-yUWKJPsU.js";import"./form-D4fabgxt.js";import"./label-BNElcQf4.js";import"./input-4CSpUSQl.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-ZSKUsYTL.js";import"./autosend-CESqNA2a.js";import"./chat-draft-CZ4LRf6I.js";import"./use-session-runtime-CGqfWswP.js";import"./thread-intent-CnRICyzb.js";import"./slugify-CEUa2lfQ.js";import"./ArrowUp-Bmd2w7Fx.js";import"./Image01-Dx7ea-3O.js";import"./Upload01-BoLmU8be.js";import"./AlertCircle-3PzOAmGf.js";import"./Copy01-BYK2zIkj.js";import"./select-47N7H1PV.js";import"./ChevronUp-Djmy8s04.js";import"./ArrowLeft-JCMxLp8E.js";import"./usage-stats-UqDPk1rl.js";import"./use-copy-BhRM5JUh.js";import"./markdown-Cyp9lJ5l.js";import"./Download01-Z6w2IrLj.js";import"./ZoomOut-DtzZmmbM.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-entitlements-BGdUcutE.js";import"./tabs-uJDG1LT-.js";import"./Tool02-Hh7HLEzm.js";import"./use-deco-credits-CKQJlHZi.js";import"./use-ai-providers-Cxi0vxkS.js";import"./toggle-group-ofCffann.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-Bage8zng.js";import"./XClose-BhXJw65F.js";import"./decopilot-BbHxwoKU.js";import"./checkbox-BoN76eap.js";import"./Tool01-DbFf2Je1.js";import"./Key01-B8q0d-op.js";import"./Settings02-azWHb0MO.js";import"./SearchMd-C0e2gT30.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-CevElukI.js";import"./avatar-CsDZ0T22.js";import"./User01-CQXsOD6P.js";import"./Eye-ChO6k3fk.js";import"./download-app-dialog-CnJNRM3l.js";import"./use-is-desktop-app-BNujXJc_.js";import"./Stars01-Ch2E4B6o.js";import"./popover-QnaOlHhb.js";import"./drawer-CFueQivP.js";import"./index-CLccaHLm.js";import"./input-CRD8MdDS.js";import"./hooks-CzhqOgxt.js";import"./use-mcp-prompts-C6590AFl.js";import"./use-org-fs-CJMhF9AL.js";import"./Link01-C-mBEv93.js";import"./question-004-sINsf4GQ.js";import"./use-members-buh6Kqlm.js";import"./use-org-auth-client-cknSmCL5.js";import"./feature-paywall-CFcsZgv5.js";import"./plan-ladder-Jef48mB3.js";import"./add-connection-dialog-DqhI8LLv.js";import"./collection-search-BmT0oV8g.js";import"./extract-connection-data-B7yRd0El.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DlOqhGn3.js";import"./connection-card-Dh4yj-V8.js";import"./use-registry-connections-BQknTkkv.js";import"./use-connection-C2XMAF5j.js";import"./useInfiniteQuery-KPKjfQBF.js";import"./infiniteQueryObserver-QHtAxfIQ.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-1ySWGOUX.js";import"./textarea-DbE6fIU0.js";import"./UserSquare-C4_QxRGQ.js";import"./connection-form-helpers-DoXq4oCN.js";import"./Trash01-D8ICnU7E.js";import"./authenticate-and-persist-oauth-CyEJ3ZKP.js";import"./mcp-oauth-S1Th8e_4.js";import"./collection-tabs-D6Sk9riW.js";import"./badge-BMuU0t5h.js";import"./use-infinite-scroll-LXktD04_.js";import"./useSuspenseInfiniteQuery-97L-Gf2j.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CuJ7CkFw.js";import"./repository-picker-BZKrcN4Y.js";import"./LinkExternal01-uHE64k_w.js";import"./github-icon-BJ-JIGKg.js";import"./use-debounced-value-CoGGtS8x.js";import"./Globe04-CCIm2Cf2.js";import"./CheckCircle-Co3IBXeH.js";import"./Zap-Cc5rEM6R.js";import"./Share07-CW1RSVqD.js";import"./command-bqq51nHs.js";import"./index-Bxbv_23l.js";import"./project-icon-DeL96Npe.js";import"./required-auth-layout-C1pT7wzX.js";import"./use-org-sso-zl0gtui9.js";import"./get-initials-D-f_fDFw.js";import"./TrendUp01-ZTgT_kdi.js";import"./CreditCard01-C7PO4dVs.js";import"./DotsVertical-BozfeMf6.js";import"./Globe01-D3UtmZtY.js";import"./Sun-Cx4zdBZx.js";import"./Package-C6yqPbb7.js";import"./Palette-B2v8R7_D.js";import"./Play-D26LBNWf.js";import"./Users01-mzXfNn0j.js";import"./XCircle-jpeASVbU.js";import"./github-repo-BknN0SVI.js";const ke=[{name:"Claude",Icon:ue,size:14,bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ge,size:12,bg:"#000",fg:"#fff"},{name:"Codex",Icon:xe,size:12,bg:"#4F46E5",fg:"#fff"}];function ve(){const e=S.c(11),t=$(),{org:s}=B();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let i;e[2]!==t?(i=t("home.orgHome.connectPill"),e[2]=t,e[3]=i):i=e[3];let n;e[4]!==i?(n=o.jsx("span",{className:"font-medium text-foreground",children:i}),e[4]=i,e[5]=n):n=e[5];let l,a;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ke.map(Te)}),a=o.jsx(J,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[6]=l,e[7]=a):(l=e[6],a=e[7]);let m;return e[8]!==r||e[9]!==n?(m=o.jsxs(Y,{to:"/$org/settings/connect",params:r,onClick:Ae,className:"group hidden max-w-full md:inline-flex flex-wrap items-center justify-center gap-x-3 gap-y-2 rounded-full border border-border bg-card py-1.5 pl-4 pr-2.5 text-sm transition-colors hover:bg-accent/60",children:[n,l,a]}),e[8]=r,e[9]=n,e[10]=m):m=e[10],m}function Te(e){const{name:t,Icon:s,size:r,bg:i,fg:n}=e;return o.jsx("span",{title:t,className:"flex size-6 items-center justify-center rounded-full",style:{backgroundColor:i,color:n},children:o.jsx(s,{size:r})},t)}function Ae(){return z("connect_clients_opened",{source:"org_home"})}function He(e){return e<12?"morning":e<18?"afternoon":"evening"}function Pe(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}const D=6;function we(e){const t=S.c(13),{project:s}=e,r=ye();let i;t[0]!==r||t[1]!==s.id||t[2]!==s.metadata?.ui?.layout?(i=()=>{z("org_home_project_clicked"),r(s.id,{panel:U(s.metadata?.ui?.layout)})},t[0]=r,t[1]=s.id,t[2]=s.metadata?.ui?.layout,t[3]=i):i=t[3];let n;t[4]!==s.icon||t[5]!==s.title?(n=o.jsx(_e,{icon:s.icon,name:s.title,size:"sm+"}),t[4]=s.icon,t[5]=s.title,t[6]=n):n=t[6];let l;t[7]!==s.title?(l=o.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.title}),t[7]=s.title,t[8]=l):l=t[8];let a;return t[9]!==i||t[10]!==n||t[11]!==l?(a=o.jsxs("button",{type:"button",onClick:i,className:"flex min-w-0 items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-accent/60",children:[n,l]}),t[9]=i,t[10]=n,t[11]=l,t[12]=a):a=t[12],a}function Ie(e){const t=S.c(31),{projects:s,action:r}=e,i=$(),{org:n}=B();let l,a,m,c,p,f;if(t[0]!==r||t[1]!==s||t[2]!==i){const _=[...s].sort(ze).slice(0,D);l=s.length>D,p="flex flex-col gap-4";let j;t[9]!==i?(j=i("home.projects.heading"),t[9]=i,t[10]=j):j=t[10];let h;t[11]!==j?(h=o.jsx("h2",{className:"text-lg font-medium text-foreground",children:j}),t[11]=j,t[12]=h):h=t[12],t[13]!==r||t[14]!==h?(f=o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h,r]}),t[13]=r,t[14]=h,t[15]=f):f=t[15],c="@container",a="grid grid-cols-1 gap-1 @lg:grid-cols-2",m=_.map($e),t[0]=r,t[1]=s,t[2]=i,t[3]=l,t[4]=a,t[5]=m,t[6]=c,t[7]=p,t[8]=f}else l=t[3],a=t[4],m=t[5],c=t[6],p=t[7],f=t[8];let d;t[16]!==a||t[17]!==m?(d=o.jsx("div",{className:a,children:m}),t[16]=a,t[17]=m,t[18]=d):d=t[18];let u;t[19]!==c||t[20]!==d?(u=o.jsx("div",{className:c,children:d}),t[19]=c,t[20]=d,t[21]=u):u=t[21];let g;t[22]!==l||t[23]!==n||t[24]!==i?(g=l&&o.jsx("div",{children:o.jsx(q,{asChild:!0,variant:"ghost",size:"sm",children:o.jsx(Y,{to:"/$org/settings/agents",params:{org:n.slug},children:i("home.projects.seeAll")})})}),t[22]=l,t[23]=n,t[24]=i,t[25]=g):g=t[25];let x;return t[26]!==p||t[27]!==f||t[28]!==u||t[29]!==g?(x=o.jsxs("section",{className:p,children:[f,u,g]}),t[26]=p,t[27]=f,t[28]=u,t[29]=g,t[30]=x):x=t[30],x}function $e(e){return o.jsx(we,{project:e},e.id)}function ze(e,t){return(t.updated_at??"").localeCompare(e.updated_at??"")}function Ee(){const e=S.c(10),{org:t}=B(),s=V();let r;e[0]!==t.id?(r=W.orgHasSite(t.id),e[0]=t.id,e[1]=r):r=e[1];const i=!!t.id;let n;e[2]!==s?(n=()=>s.call("ORGANIZATION_HAS_SITE",{}),e[2]=s,e[3]=n):n=e[3];let l;e[4]!==r||e[5]!==i||e[6]!==n?(l={queryKey:r,staleTime:3e5,enabled:i,queryFn:n},e[4]=r,e[5]=i,e[6]=n,e[7]=l):l=e[7];const{data:a}=X(l),m=a?.hasSite??!1;let c;return e[8]!==m?(c={hasSite:m},e[8]=m,e[9]=c):c=e[9],c}const Le="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function Oe(e){const t=S.c(4),{className:s}=e;let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),i=o.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let n;return t[2]!==s?(n=o.jsxs("svg",{viewBox:"0 0 28 20",className:s,"aria-hidden":"true",focusable:"false",children:[r,i]}),t[2]=s,t[3]=n):n=t[3],n}function Re(){const e=S.c(27),t=$(),{hasSite:s}=Ee();if(!s)return null;let r;e[0]!==t?(r=t("home.orgHome.trainingThumbnailAlt"),e[0]=t,e[1]=r):r=e[1];let i;e[2]!==r?(i=o.jsx("img",{src:"/cms-training.jpg",alt:r,className:"size-full object-cover"}),e[2]=r,e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:o.jsx(Oe,{className:"w-9"})}),e[4]=n):n=e[4];let l;e[5]!==i?(l=o.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[i,n]}),e[5]=i,e[6]=l):l=e[6];let a;e[7]!==t?(a=t("home.orgHome.trainingEyebrow"),e[7]=t,e[8]=a):a=e[8];let m;e[9]!==a?(m=o.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e[9]=a,e[10]=m):m=e[10];let c;e[11]!==t?(c=t("home.orgHome.trainingTitle"),e[11]=t,e[12]=c):c=e[12];let p;e[13]!==c?(p=o.jsx("h3",{className:"text-sm font-medium text-foreground",children:c}),e[13]=c,e[14]=p):p=e[14];let f;e[15]!==t?(f=t("home.orgHome.trainingDescription"),e[15]=t,e[16]=f):f=e[16];let d;e[17]!==f?(d=o.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:f}),e[17]=f,e[18]=d):d=e[18];let u;e[19]!==m||e[20]!==p||e[21]!==d?(u=o.jsxs("div",{className:"min-w-0 flex-1",children:[m,p,d]}),e[19]=m,e[20]=p,e[21]=d,e[22]=u):u=e[22];let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(J,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[23]=g):g=e[23];let x;return e[24]!==u||e[25]!==l?(x=o.jsxs("a",{href:Le,target:"_blank",rel:"noreferrer",onClick:Be,className:"group card-shadow flex w-full items-center gap-4 rounded-xl bg-card p-3 text-left transition-colors hover:bg-accent/60",children:[l,u,g]}),e[24]=u,e[25]=l,e[26]=x):x=e[26],x}function Be(){return z("cms_training_opened",{source:"org_home"})}const Fe={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Me(){const e=S.c(8),t=$();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(ne,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=s):s=e[0];let r;e[1]!==t?(r=t("home.orgHome.searchPlaceholder"),e[1]=t,e[2]=r):r=e[2];let i;e[3]!==r?(i=o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:r}),e[3]=r,e[4]=i):i=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:"⌘K"}),e[5]=n):n=e[5];let l;return e[6]!==i?(l=o.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:Ge,className:"card-shadow flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent/60",children:[s,i,n]}),e[6]=i,e[7]=l):l=e[7],l}function Ge(){z("command_palette_opened",{source:"org_home_search"}),de()}function K(){const e=S.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(re,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function De(e){const t=S.c(40),{canManageAgents:s,importButton:r}=e,i=Z(),n=$(),{org:l}=B();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={pageSize:1e3},t[0]=a):a=t[0];const m=Se(a),c=he();let p,f,d;if(t[1]!==m||t[2]!==s||t[3]!==i||t[4]!==r||t[5]!==l||t[6]!==n||t[7]!==c){d=Symbol.for("react.early_return_sentinel");e:{let h;if(t[11]!==l?(h=b=>b.id!==l.id,t[11]=l,t[12]=h):h=t[12],p=Ne(m).filter(h),p.length===0){let b;t[13]!==s||t[14]!==i||t[15]!==r?(b=!i&&s&&r("org_home_empty"),t[13]=s,t[14]=i,t[15]=r,t[16]=b):b=t[16];let y;t[17]!==n?(y=n("routes.agentsList.noAgentsYet"),t[17]=n,t[18]=y):y=t[18];let C;t[19]!==s||t[20]!==n?(C=n(s?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),t[19]=s,t[20]=n,t[21]=C):C=t[21];let N;t[22]!==b||t[23]!==y||t[24]!==C?(N=o.jsx("div",{className:"flex items-center justify-center py-10",children:o.jsx(pe,{actions:b,image:null,title:y,description:C})}),t[22]=b,t[23]=y,t[24]=C,t[25]=N):N=t[25],d=N;break e}f=je(Ce(p),c,null)}t[1]=m,t[2]=s,t[3]=i,t[4]=r,t[5]=l,t[6]=n,t[7]=c,t[8]=p,t[9]=f,t[10]=d}else p=t[8],f=t[9],d=t[10];if(d!==Symbol.for("react.early_return_sentinel"))return d;const u=f.length>0;let g;t[26]!==s||t[27]!==i||t[28]!==r?(g=!i&&s&&r("org_home"),t[26]=s,t[27]=i,t[28]=r,t[29]=g):g=t[29];let x;t[30]!==p||t[31]!==g?(x=o.jsx(Ie,{projects:p,action:g}),t[30]=p,t[31]=g,t[32]=x):x=t[32];let _;t[33]!==p||t[34]!==u||t[35]!==c?(_=u&&o.jsx(be,{projects:p,tasks:c}),t[33]=p,t[34]=u,t[35]=c,t[36]=_):_=t[36];let j;return t[37]!==x||t[38]!==_?(j=o.jsxs("div",{className:"flex flex-col gap-12",children:[x,_]}),t[37]=x,t[38]=_,t[39]=j):j=t[39],j}function Ke(){const e=S.c(63),t=Z(),s=t?"h2":"h1",r=$(),i=ce("home_task_intake_enabled"),{data:n}=ee.useSession(),[l,a]=F.useState(!1),{granted:m}=te("agents:manage");let c,p,f,d,u,g,x,_,j,h,b,y,C,N;if(e[0]!==s||e[1]!==m||e[2]!==t||e[3]!==n?.user?.name||e[4]!==r){const M=Pe(n?.user?.name),G=Fe[He(new Date().getHours())];let O;e[19]!==t||e[20]!==r?(O=Q=>o.jsxs(q,{size:"sm",variant:t?"default":"outline",onClick:()=>{z("agent_create_clicked",{source:Q,method:"github"}),a(!0)},children:[t?o.jsx(se,{size:14}):o.jsx(oe,{size:14}),r(t?"home.orgAgents.importFromGitHub":"common.githubRepoPicker.importFromGitHub")]}),e[19]=t,e[20]=r,e[21]=O):O=e[21],u=O,d=R,e[22]!==m||e[23]!==t||e[24]!==u?(N=t&&m&&o.jsx(R.Actions,{children:u("org_home")}),e[22]=m,e[23]=t,e[24]=u,e[25]=N):N=e[25],f=R.Content,p=R.Container,y="reading",C="flex flex-col gap-12 classic:pt-0 classic:md:pt-0",j="flex flex-col items-center gap-12 text-center",e[26]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ve,{}),b=o.jsx(Re,{}),e[26]=h,e[27]=b):(h=e[26],b=e[27]),_="flex w-full flex-col items-center gap-5",c=s,g="text-3xl font-medium tracking-tight text-foreground",x=M?r(G.named,{name:M}):r(G.bare),e[0]=s,e[1]=m,e[2]=t,e[3]=n?.user?.name,e[4]=r,e[5]=c,e[6]=p,e[7]=f,e[8]=d,e[9]=u,e[10]=g,e[11]=x,e[12]=_,e[13]=j,e[14]=h,e[15]=b,e[16]=y,e[17]=C,e[18]=N}else c=e[5],p=e[6],f=e[7],d=e[8],u=e[9],g=e[10],x=e[11],_=e[12],j=e[13],h=e[14],b=e[15],y=e[16],C=e[17],N=e[18];let k;e[28]!==c||e[29]!==g||e[30]!==x?(k=o.jsx(c,{className:g,children:x}),e[28]=c,e[29]=g,e[30]=x,e[31]=k):k=e[31];let v;e[32]!==i?(v=i?o.jsx(F.Suspense,{fallback:o.jsx(K,{}),children:o.jsx(me,{children:o.jsx(ae,{children:o.jsx(le,{homeTaskComposer:!0})})})}):o.jsx(Me,{}),e[32]=i,e[33]=v):v=e[33];let T;e[34]!==v||e[35]!==_||e[36]!==k?(T=o.jsxs("div",{className:_,children:[k,v]}),e[34]=v,e[35]=_,e[36]=k,e[37]=T):T=e[37];let A;e[38]!==T||e[39]!==j||e[40]!==h||e[41]!==b?(A=o.jsxs("div",{className:j,children:[h,b,T]}),e[38]=T,e[39]=j,e[40]=h,e[41]=b,e[42]=A):A=e[42];let E;e[43]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(K,{}),e[43]=E):E=e[43];let H;e[44]!==m||e[45]!==u?(H=o.jsx(F.Suspense,{fallback:E,children:o.jsx(De,{canManageAgents:m,importButton:u})}),e[44]=m,e[45]=u,e[46]=H):H=e[46];let P;e[47]!==p||e[48]!==A||e[49]!==H||e[50]!==y||e[51]!==C?(P=o.jsxs(p,{width:y,className:C,children:[A,H]}),e[47]=p,e[48]=A,e[49]=H,e[50]=y,e[51]=C,e[52]=P):P=e[52];let w;e[53]!==f||e[54]!==P?(w=o.jsx(f,{children:P}),e[53]=f,e[54]=P,e[55]=w):w=e[55];let I;e[56]!==l?(I=o.jsx(fe,{open:l,onOpenChange:a}),e[56]=l,e[57]=I):I=e[57];let L;return e[58]!==d||e[59]!==w||e[60]!==I||e[61]!==N?(L=o.jsxs(d,{children:[N,w,I]}),e[58]=d,e[59]=w,e[60]=I,e[61]=N,e[62]=L):L=e[62],L}function Rr(){const e=S.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(ie.Content,{children:o.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Rr as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as X,h as U,j as
|
|
2
|
-
`);return/\s/.test(t)}):!1}function se(n){return()=>{const e=n.state.selection.$anchor.pos,{top:o,right:t,bottom:s,left:i}=n.view.coordsAtPos(e);try{return new DOMRect(i,o,t-i,s-o)}catch{return null}}}function le(n,e,o,t){return o?()=>{const s=t.getState(n.state),i=s?.decorationId,a=e.dom.querySelector(`[data-decoration-id="${i}"]`);return a?.getBoundingClientRect()||null}:se(n)}function ae({match:n,dismissedRange:e,state:o,transaction:t,editor:s,shouldResetDismissed:i,effectiveAllowSpaces:a}){return i?.({editor:s,state:o,range:e,match:n,transaction:t,allowSpaces:a})?!1:a?n.range.from===e.from:n.range.from===e.from&&!oe(t)}function ie({view:n,pluginKeyRef:e}){const o=n.state.tr.setMeta(e,{exit:!0});n.dispatch(o)}function re({pluginKey:n,decorationTag:e,decorationClass:o,decorationContent:t,decorationEmptyClass:s,renderer:i,dispatchExit:a}){return{handleKeyDown(r,d){var f;const g=n.getState(r.state);if(!g.active)return!1;if(d.key==="Escape"||d.key==="Esc"){var u;return i==null||(u=i.onKeyDown)===null||u===void 0||u.call(i,{view:r,event:d,range:g.range}),a(r),!0}return(i==null||(f=i.onKeyDown)===null||f===void 0?void 0:f.call(i,{view:r,event:d,range:g.range}))||!1},decorations(r){const{active:d,range:f,decorationId:g,query:u}=n.getState(r);if(!d)return null;const m=!u?.length,h=[o];return m&&h.push(s),V.create(r.doc,[H.inline(f.from,f.to,{nodeName:e,class:h.join(" "),"data-decoration-id":g||void 0,"data-decoration-content":t})])}}}function ue({editor:n,char:e,effectiveAllowSpaces:o,allowToIncludeChar:t,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:a,allow:r,shouldShow:d,shouldKeepDismissed:f,pluginKey:g}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,m,h,p){const{isEditable:y}=n,{composing:c}=n.view,{selection:S}=u,{empty:v,from:w}=S,l={...m},D=u.getMeta(g);if(D&&D.exit)return l.active=!1,l.decorationId=null,l.range={from:0,to:0},l.query=null,l.text=null,l.dismissedRange=m.active?{...m.range}:m.dismissedRange,l;if(l.composing=c,u.docChanged&&l.dismissedRange!==null&&(l.dismissedRange={from:u.mapping.map(l.dismissedRange.from),to:u.mapping.map(l.dismissedRange.to)}),y&&(v||n.view.composing)){(w<m.range.from||w>m.range.to)&&!c&&!m.composing&&(l.active=!1);const x=a({char:e,allowSpaces:o,allowToIncludeChar:t,allowedPrefixes:s,startOfLine:i,$position:S.$from}),C=`id_${Math.floor(Math.random()*4294967295)}`;x&&r({editor:n,state:p,range:x.range,isActive:m.active})&&(!d||d({editor:n,range:x.range,query:x.query,text:x.text,transaction:u}))?(l.dismissedRange!==null&&!f({match:x,dismissedRange:l.dismissedRange,state:p,transaction:u})&&(l.dismissedRange=null),l.dismissedRange===null?(l.active=!0,l.decorationId=m.decorationId||C,l.range=x.range,l.query=x.query,l.text=x.text):l.active=!1):(x||(l.dismissedRange=null),l.active=!1)}else l.active=!1;return l.active||(l.decorationId=null,l.range={from:0,to:0},l.query=null,l.text=null),l}}}function ce({editor:n,items:e}){let o=null,t=null,s=null;const i=()=>{t!==null&&(clearTimeout(t),t=null),s?.(),s=null},a=f=>new Promise(g=>{s=g,t=setTimeout(()=>{t=null;const u=s;s=null,u?.()},f)}),r=()=>{o?.abort(),i(),o=null};return{abort:r,fetch:async(f,g)=>{r(),o=new AbortController;const u=o;if(g>0&&await a(g),o!==u||u.signal.aborted)return{status:"aborted"};try{const m=await e({editor:n,query:f,signal:u.signal});return o!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:m}}catch{return o!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function de({placement:n,offset:e,flip:o,floatingUi:t}){var s,i,a,r;const d=[Y({mainAxis:(s=e.mainAxis)!==null&&s!==void 0?s:4,crossAxis:(i=e.crossAxis)!==null&&i!==void 0?i:0})];return o&&d.push(G()),!(t==null||(a=t.middleware)===null||a===void 0)&&a.length&&d.push(...t.middleware),{placement:n,strategy:(r=t?.strategy)!==null&&r!==void 0?r:"absolute",middleware:d}}function fe(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function ge({getReferenceRect:n,contextElement:e,config:o,container:t,dismissOnOutsideClick:s,dismiss:i}){return(a,r={})=>{const d={getBoundingClientRect:()=>{var p;return(p=n())!==null&&p!==void 0?p:new DOMRect},contextElement:e};let f=!1;const g=!a.isConnected;g&&fe(t).appendChild(a),r.onPosition||(a.style.visibility="hidden",a.style.width="max-content");const m=J(d,a,()=>{Z(d,a,{placement:o.placement,strategy:o.strategy,middleware:o.middleware}).then(({x:p,y,placement:c,strategy:S})=>{if(r.onPosition){r.onPosition({x:p,y,placement:c,strategy:S});return}Object.assign(a.style,{position:S,left:`${p}px`,top:`${y}px`}),f||(f=!0,a.style.visibility="")})},r.autoUpdate);let h;return s&&(h=p=>{const y=p.target;!(y instanceof Node)||a.contains(y)||e.contains(y)||i()},document.addEventListener("pointerdown",h,!0)),()=>{m(),h&&document.removeEventListener("pointerdown",h,!0),g&&a.remove()}}}function me({editor:n,pluginKey:e,items:o,renderer:t,minQueryLength:s,debounce:i,initialItems:a,placement:r,offset:d,container:f,flip:g,floatingUi:u,dismissOnOutsideClick:m,command:h,clientRectFor:p,dispatchExit:y}){let c;const S=ce({editor:n,items:o}),v=de({placement:r,offset:d,flip:g,floatingUi:u});function w(l,D){switch(l){case"started":var x;t==null||(x=t.onStart)===null||x===void 0||x.call(t,D);break;case"updated":var C;t==null||(C=t.onUpdate)===null||C===void 0||C.call(t,D);break;case"stopped":var R;t==null||(R=t.onExit)===null||R===void 0||R.call(t,D)}}return{update:async(l,D)=>{var x,C;const R=e.getState(D),A=e.getState(l.state);if(!R||!A)return;let E=null;const P=R.query!==A.query,_=R.text!==A.text,N=R.range.from!==A.range.from||R.range.to!==A.range.to,O=P||_||N;if(!R.active&&A.active)E="started";else if(R.active&&!A.active)E="stopped";else if(A.active&&O)E="updated";else return;const T=E==="stopped"?R:A,$=l.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`),b=p(l,$),M=s===0||(T.query?T.query.length>=s:!1),F=(E==="started"||E==="updated")&&M;if(c={editor:n,range:T.range,query:T.query||"",text:T.text||"",items:a??[],command:L=>h({editor:n,range:T.range,props:L}),decorationNode:$,clientRect:b,loading:F,placement:r,offset:{mainAxis:(x=d.mainAxis)!==null&&x!==void 0?x:4,crossAxis:(C=d.crossAxis)!==null&&C!==void 0?C:0},container:f,flip:g,floatingUi:v,mount:ge({getReferenceRect:b,contextElement:l.dom,config:v,container:f,dismissOnOutsideClick:m,dismiss:()=>y(n.view)})},E==="started"){var k;t==null||(k=t.onBeforeStart)===null||k===void 0||k.call(t,c)}if(E==="updated"){var I;t==null||(I=t.onBeforeUpdate)===null||I===void 0||I.call(t,c)}if(E==="started"&&w(E,c),E==="started"||E==="updated")if(!F)S.abort(),c={...c,items:a??[],loading:!1};else{c={...c,items:a??[],loading:!0},E="updated",w(E,c);const L=await S.fetch(T.query||"",i);if(L.status==="aborted")return;const K=e.getState(l.state);if(!K?.active){S.abort();return}c=L.status==="resolved"?{...c,items:L.items,loading:!1}:{...c,loading:!1}}if(E==="stopped"){S.abort(),w(E,c),c=void 0;return}E==="updated"&&w(E,c)},destroy:()=>{var l;S.abort(),c&&(t==null||(l=t.onExit)===null||l===void 0||l.call(t,c))}}}const j=new U("suggestion");function Q({pluginKey:n=j,editor:e,char:o="@",allowSpaces:t=!1,allowToIncludeChar:s=!1,allowedPrefixes:i=[" "],startOfLine:a=!1,decorationTag:r="span",decorationClass:d="suggestion",decorationContent:f="",decorationEmptyClass:g="is-empty",command:u=()=>null,items:m=()=>[],minQueryLength:h=0,debounce:p=0,initialItems:y,placement:c="bottom-start",offset:S={},container:v,flip:w=!0,floatingUi:l,dismissOnOutsideClick:D=!0,render:x=()=>({}),allow:C=()=>!0,findSuggestionMatch:R=ne,shouldShow:A,shouldResetDismissed:E}){const P=x?.(),_=t&&!s,N=($,b)=>le(e,$,b,n);function O($){return ae({...$,editor:e,shouldResetDismissed:E,effectiveAllowSpaces:_})}const T=$=>ie({view:$,pluginKeyRef:n});return new z({key:n,view:()=>me({editor:e,pluginKey:n,items:m,renderer:P,minQueryLength:h,debounce:p,initialItems:y,placement:c,offset:S,container:v,flip:w,floatingUi:l,dismissOnOutsideClick:D,command:u,clientRectFor:N,dispatchExit:T}),state:ue({editor:e,char:o,effectiveAllowSpaces:_,allowToIncludeChar:s,allowedPrefixes:i,startOfLine:a,findSuggestionMatch:R,allow:C,shouldShow:A,shouldKeepDismissed:O,pluginKey:n}),props:re({pluginKey:n,decorationTag:r,decorationClass:d,decorationContent:f,decorationEmptyClass:g,renderer:P,dispatchExit:T})})}function Re(n,e=j){const o=n.state.tr.setMeta(e,{exit:!0});n.dispatch(o)}var qe=Q;function pe(n){const e=B.c(24),{editor:o,query:t,items:s,onSelect:i,onClose:a}=n,[r,d]=q.useState(0),f=q.useRef(s),g=q.useRef(r),u=q.useRef(i),m=q.useRef(a),h=q.useDeferredValue(t);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(0)},e[0]=p):p=e[0];let y;e[1]!==h?(y=[h],e[1]=h,e[2]=y):y=e[2],q.useEffect(p,y);let c,S;e[3]!==s.length||e[4]!==r?(c=()=>{r>=s.length&&s.length>0&&d(0)},S=[s.length,r],e[3]=s.length,e[4]=r,e[5]=c,e[6]=S):(c=e[5],S=e[6]),q.useEffect(c,S);let v,w;e[7]!==s?(v=()=>{f.current=s},w=[s],e[7]=s,e[8]=v,e[9]=w):(v=e[8],w=e[9]),q.useEffect(v,w);let l,D;e[10]!==r?(l=()=>{g.current=r},D=[r],e[10]=r,e[11]=l,e[12]=D):(l=e[11],D=e[12]),q.useEffect(l,D);let x,C;e[13]!==i?(C=()=>{u.current=i},x=[i],e[13]=i,e[14]=x,e[15]=C):(x=e[14],C=e[15]),q.useEffect(C,x);let R,A;e[16]!==a?(R=()=>{m.current=a},A=[a],e[16]=a,e[17]=R,e[18]=A):(R=e[17],A=e[18]),q.useEffect(R,A);let E,P;e[19]!==o?(E=()=>{if(o?.isDestroyed)return;let O;try{O=o.view.dom}catch{return}if(!O)return;const T=b=>{const M=f.current;if(!M.length)return!1;const F=()=>d(I=>(I+1)%M.length),k=()=>d(I=>(I-1+M.length)%M.length);switch(b.key){case"ArrowUp":return b.preventDefault(),k(),!0;case"ArrowDown":return b.preventDefault(),F(),!0;case"Tab":return b.preventDefault(),b.shiftKey?k():F(),!0;case"Home":return b.preventDefault(),d(0),!0;case"End":return b.preventDefault(),d(M.length-1),!0;case"Enter":{if(b.isComposing)return!1;b.preventDefault();const I=g.current;return I!==-1&&M[I]&&u.current?.(M[I],I),!0}case"Escape":return b.preventDefault(),m.current?.(),!0;default:return!1}},$=b=>{T(b)};return O.addEventListener("keydown",$,!0),()=>{O?.removeEventListener("keydown",$,!0)}},P=[o],e[19]=o,e[20]=E,e[21]=P):(E=e[20],P=e[21]),q.useEffect(E,P);const _=s.length?r:void 0;let N;return e[22]!==_?(N={selectedIndex:_,setSelectedIndex:d},e[22]=_,e[23]=N):N=e[23],N}function ye(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const ve=q.createContext(void 0);function xe(){const n=q.useContext(ve);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function be(n){const e=B.c(16),{editor:o,char:t,pluginKey:s,allow:i,onOpenChange:a}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=r):r=e[0];const[d,f]=q.useReducer(ye,r);let g;e[1]!==a?(g=y=>{a?.(y)},e[1]=a,e[2]=g):g=e[2];const u=q.useEffectEvent(g);let m;e[3]!==t||e[4]!==i||e[5]!==o||e[6]!==u||e[7]!==s?(m=()=>{if(o?.isDestroyed)return;const y=s instanceof U?s:new U(s);o.state.plugins.find(v=>v.spec.key===y)&&o.unregisterPlugin(y);const S=Q({pluginKey:y,editor:o,char:t,allow(v){const w=o.state.doc.resolve(v.range.from);for(let l=w.depth;l>0;l--)if(w.node(l).type.name==="image")return!1;return!(i&&!i(v))},command(){},render:()=>({onStart:v=>{f({type:"ON_START",payload:{element:v.decorationNode??null,query:v.query,range:v.range}}),u(!0)},onUpdate:v=>{f({type:"ON_UPDATE",payload:{element:v.decorationNode??null,query:v.query,range:v.range}})},onKeyDown:v=>v.event.key==="Escape"?(f({type:"ON_EXIT"}),!0):!1,onExit:()=>{f({type:"ON_EXIT"}),u(!1)}}),items:he});return o.registerPlugin(S),()=>{o?.isDestroyed||o.unregisterPlugin(y)}},e[3]=t,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=m):m=e[8];let h;e[9]!==t||e[10]!==i||e[11]!==o||e[12]!==s?(h=[o,s,t,f,i],e[9]=t,e[10]=i,e[11]=o,e[12]=s,e[13]=h):h=e[13],q.useEffect(m,h);let p;return e[14]!==d?(p={state:d,dispatch:f},e[14]=d,e[15]=p):p=e[15],p}function he(){return[]}function Ce({editor:n,queryKey:e,queryFn:o,onSelect:t}){const{state:s,dispatch:i}=xe(),a=q.useDeferredValue(s.query),{data:r}=ee({queryKey:te.suggestionItems(e,s.open,a),queryFn:()=>s.open?o({query:a}):[]}),d=()=>{i({type:"ON_EXIT"})},f=async(u,m)=>{if(!(s.selectedItem!==null||!s.range)){i({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,y=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),c=s.range?{...s.range}:{from:0,to:0};y&&s.range&&(c.to+=1),await t({range:c,item:u})===!1?i({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:g}=pe({editor:n,query:a,items:r,onSelect:f,onClose:d});return{selectedItem:s.selectedItem,items:r,selectedIndex:g,close:d,onSelect:f}}export{ve as S,xe as a,Ce as b,qe as c,Re as e,we as s,be as u};
|
|
1
|
+
import{o as X,h as U,j as V,D as H,p as W,q as z}from"./index-CuhH8P7u.js";import{eI as J,eJ as Y,en as G,eK as Z,r as q,c as B,D as ee,K as te}from"./index-BiU3YmQL.js";var we=X;function ne(n){var e;const{char:o,allowSpaces:t,allowToIncludeChar:s,allowedPrefixes:i,startOfLine:a,$position:r}=n,d=t&&!s,f=z(o),g=new RegExp(`\\s${f}$`),u=a?"^":"",m=s?"":f,h=d?new RegExp(`${u}${f}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${u}(?:^)?${f}[^\\s${m}]*`,"gm"),p=((e=r.nodeBefore)===null||e===void 0?void 0:e.isText)&&r.nodeBefore.text;if(!p)return null;const y=r.pos-p.length,c=Array.from(p.matchAll(h)).pop();if(!c||c.input===void 0||c.index===void 0)return null;const S=c.input.slice(Math.max(0,c.index-1),c.index),v=new RegExp(`^[${i?.join("")}\0]?$`).test(S);if(i!==null&&!v)return null;const w=y+c.index;let l=w+c[0].length;return d&&g.test(p.slice(l-1,l+1))&&(c[0]+=" ",l+=1),w<r.pos&&l>=r.pos?{range:{from:w,to:l},query:c[0].slice(o.length),text:c[0]}:null}function oe(n){return n.docChanged?n.steps.some(e=>{const o=e.slice;if(!o?.content)return!1;const t=o.content.textBetween(0,o.content.size,`
|
|
2
|
+
`);return/\s/.test(t)}):!1}function se(n){return()=>{const e=n.state.selection.$anchor.pos,{top:o,right:t,bottom:s,left:i}=n.view.coordsAtPos(e);try{return new DOMRect(i,o,t-i,s-o)}catch{return null}}}function le(n,e,o,t){return o?()=>{const s=t.getState(n.state),i=s?.decorationId,a=e.dom.querySelector(`[data-decoration-id="${i}"]`);return a?.getBoundingClientRect()||null}:se(n)}function ae({match:n,dismissedRange:e,state:o,transaction:t,editor:s,shouldResetDismissed:i,effectiveAllowSpaces:a}){return i?.({editor:s,state:o,range:e,match:n,transaction:t,allowSpaces:a})?!1:a?n.range.from===e.from:n.range.from===e.from&&!oe(t)}function ie({view:n,pluginKeyRef:e}){const o=n.state.tr.setMeta(e,{exit:!0});n.dispatch(o)}function re({pluginKey:n,decorationTag:e,decorationClass:o,decorationContent:t,decorationEmptyClass:s,renderer:i,dispatchExit:a}){return{handleKeyDown(r,d){var f;const g=n.getState(r.state);if(!g.active)return!1;if(d.key==="Escape"||d.key==="Esc"){var u;return i==null||(u=i.onKeyDown)===null||u===void 0||u.call(i,{view:r,event:d,range:g.range}),a(r),!0}return(i==null||(f=i.onKeyDown)===null||f===void 0?void 0:f.call(i,{view:r,event:d,range:g.range}))||!1},decorations(r){const{active:d,range:f,decorationId:g,query:u}=n.getState(r);if(!d)return null;const m=!u?.length,h=[o];return m&&h.push(s),H.create(r.doc,[W.inline(f.from,f.to,{nodeName:e,class:h.join(" "),"data-decoration-id":g||void 0,"data-decoration-content":t})])}}}function ue({editor:n,char:e,effectiveAllowSpaces:o,allowToIncludeChar:t,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:a,allow:r,shouldShow:d,shouldKeepDismissed:f,pluginKey:g}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,m,h,p){const{isEditable:y}=n,{composing:c}=n.view,{selection:S}=u,{empty:v,from:w}=S,l={...m},A=u.getMeta(g);if(A&&A.exit)return l.active=!1,l.decorationId=null,l.range={from:0,to:0},l.query=null,l.text=null,l.dismissedRange=m.active?{...m.range}:m.dismissedRange,l;if(l.composing=c,u.docChanged&&l.dismissedRange!==null&&(l.dismissedRange={from:u.mapping.map(l.dismissedRange.from),to:u.mapping.map(l.dismissedRange.to)}),y&&(v||n.view.composing)){(w<m.range.from||w>m.range.to)&&!c&&!m.composing&&(l.active=!1);const x=a({char:e,allowSpaces:o,allowToIncludeChar:t,allowedPrefixes:s,startOfLine:i,$position:S.$from}),C=`id_${Math.floor(Math.random()*4294967295)}`;x&&r({editor:n,state:p,range:x.range,isActive:m.active})&&(!d||d({editor:n,range:x.range,query:x.query,text:x.text,transaction:u}))?(l.dismissedRange!==null&&!f({match:x,dismissedRange:l.dismissedRange,state:p,transaction:u})&&(l.dismissedRange=null),l.dismissedRange===null?(l.active=!0,l.decorationId=m.decorationId||C,l.range=x.range,l.query=x.query,l.text=x.text):l.active=!1):(x||(l.dismissedRange=null),l.active=!1)}else l.active=!1;return l.active||(l.decorationId=null,l.range={from:0,to:0},l.query=null,l.text=null),l}}}function ce({editor:n,items:e}){let o=null,t=null,s=null;const i=()=>{t!==null&&(clearTimeout(t),t=null),s?.(),s=null},a=f=>new Promise(g=>{s=g,t=setTimeout(()=>{t=null;const u=s;s=null,u?.()},f)}),r=()=>{o?.abort(),i(),o=null};return{abort:r,fetch:async(f,g)=>{r(),o=new AbortController;const u=o;if(g>0&&await a(g),o!==u||u.signal.aborted)return{status:"aborted"};try{const m=await e({editor:n,query:f,signal:u.signal});return o!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:m}}catch{return o!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function de({placement:n,offset:e,flip:o,floatingUi:t}){var s,i,a,r;const d=[J({mainAxis:(s=e.mainAxis)!==null&&s!==void 0?s:4,crossAxis:(i=e.crossAxis)!==null&&i!==void 0?i:0})];return o&&d.push(Y()),!(t==null||(a=t.middleware)===null||a===void 0)&&a.length&&d.push(...t.middleware),{placement:n,strategy:(r=t?.strategy)!==null&&r!==void 0?r:"absolute",middleware:d}}function fe(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function ge({getReferenceRect:n,contextElement:e,config:o,container:t,dismissOnOutsideClick:s,dismiss:i}){return(a,r={})=>{const d={getBoundingClientRect:()=>{var p;return(p=n())!==null&&p!==void 0?p:new DOMRect},contextElement:e};let f=!1;const g=!a.isConnected;g&&fe(t).appendChild(a),r.onPosition||(a.style.visibility="hidden",a.style.width="max-content");const m=G(d,a,()=>{Z(d,a,{placement:o.placement,strategy:o.strategy,middleware:o.middleware}).then(({x:p,y,placement:c,strategy:S})=>{if(r.onPosition){r.onPosition({x:p,y,placement:c,strategy:S});return}Object.assign(a.style,{position:S,left:`${p}px`,top:`${y}px`}),f||(f=!0,a.style.visibility="")})},r.autoUpdate);let h;return s&&(h=p=>{const y=p.target;!(y instanceof Node)||a.contains(y)||e.contains(y)||i()},document.addEventListener("pointerdown",h,!0)),()=>{m(),h&&document.removeEventListener("pointerdown",h,!0),g&&a.remove()}}}function me({editor:n,pluginKey:e,items:o,renderer:t,minQueryLength:s,debounce:i,initialItems:a,placement:r,offset:d,container:f,flip:g,floatingUi:u,dismissOnOutsideClick:m,command:h,clientRectFor:p,dispatchExit:y}){let c;const S=ce({editor:n,items:o}),v=de({placement:r,offset:d,flip:g,floatingUi:u});function w(l,A){switch(l){case"started":var x;t==null||(x=t.onStart)===null||x===void 0||x.call(t,A);break;case"updated":var C;t==null||(C=t.onUpdate)===null||C===void 0||C.call(t,A);break;case"stopped":var R;t==null||(R=t.onExit)===null||R===void 0||R.call(t,A)}}return{update:async(l,A)=>{var x,C;const R=e.getState(A),D=e.getState(l.state);if(!R||!D)return;let E=null;const P=R.query!==D.query,_=R.text!==D.text,N=R.range.from!==D.range.from||R.range.to!==D.range.to,O=P||_||N;if(!R.active&&D.active)E="started";else if(R.active&&!D.active)E="stopped";else if(D.active&&O)E="updated";else return;const T=E==="stopped"?R:D,$=l.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`),b=p(l,$),M=s===0||(T.query?T.query.length>=s:!1),F=(E==="started"||E==="updated")&&M;if(c={editor:n,range:T.range,query:T.query||"",text:T.text||"",items:a??[],command:K=>h({editor:n,range:T.range,props:K}),decorationNode:$,clientRect:b,loading:F,placement:r,offset:{mainAxis:(x=d.mainAxis)!==null&&x!==void 0?x:4,crossAxis:(C=d.crossAxis)!==null&&C!==void 0?C:0},container:f,flip:g,floatingUi:v,mount:ge({getReferenceRect:b,contextElement:l.dom,config:v,container:f,dismissOnOutsideClick:m,dismiss:()=>y(n.view)})},E==="started"){var k;t==null||(k=t.onBeforeStart)===null||k===void 0||k.call(t,c)}if(E==="updated"){var I;t==null||(I=t.onBeforeUpdate)===null||I===void 0||I.call(t,c)}if(E==="started"&&w(E,c),E==="started"||E==="updated")if(!F)S.abort(),c={...c,items:a??[],loading:!1};else{c={...c,items:a??[],loading:!0},E="updated",w(E,c);const K=await S.fetch(T.query||"",i);if(K.status==="aborted")return;const L=e.getState(l.state);if(!L?.active){S.abort();return}c=K.status==="resolved"?{...c,items:K.items,loading:!1}:{...c,loading:!1}}if(E==="stopped"){S.abort(),w(E,c),c=void 0;return}E==="updated"&&w(E,c)},destroy:()=>{var l;S.abort(),c&&(t==null||(l=t.onExit)===null||l===void 0||l.call(t,c))}}}const j=new U("suggestion");function Q({pluginKey:n=j,editor:e,char:o="@",allowSpaces:t=!1,allowToIncludeChar:s=!1,allowedPrefixes:i=[" "],startOfLine:a=!1,decorationTag:r="span",decorationClass:d="suggestion",decorationContent:f="",decorationEmptyClass:g="is-empty",command:u=()=>null,items:m=()=>[],minQueryLength:h=0,debounce:p=0,initialItems:y,placement:c="bottom-start",offset:S={},container:v,flip:w=!0,floatingUi:l,dismissOnOutsideClick:A=!0,render:x=()=>({}),allow:C=()=>!0,findSuggestionMatch:R=ne,shouldShow:D,shouldResetDismissed:E}){const P=x?.(),_=t&&!s,N=($,b)=>le(e,$,b,n);function O($){return ae({...$,editor:e,shouldResetDismissed:E,effectiveAllowSpaces:_})}const T=$=>ie({view:$,pluginKeyRef:n});return new V({key:n,view:()=>me({editor:e,pluginKey:n,items:m,renderer:P,minQueryLength:h,debounce:p,initialItems:y,placement:c,offset:S,container:v,flip:w,floatingUi:l,dismissOnOutsideClick:A,command:u,clientRectFor:N,dispatchExit:T}),state:ue({editor:e,char:o,effectiveAllowSpaces:_,allowToIncludeChar:s,allowedPrefixes:i,startOfLine:a,findSuggestionMatch:R,allow:C,shouldShow:D,shouldKeepDismissed:O,pluginKey:n}),props:re({pluginKey:n,decorationTag:r,decorationClass:d,decorationContent:f,decorationEmptyClass:g,renderer:P,dispatchExit:T})})}function Re(n,e=j){const o=n.state.tr.setMeta(e,{exit:!0});n.dispatch(o)}var qe=Q;function pe(n){const e=B.c(24),{editor:o,query:t,items:s,onSelect:i,onClose:a}=n,[r,d]=q.useState(0),f=q.useRef(s),g=q.useRef(r),u=q.useRef(i),m=q.useRef(a),h=q.useDeferredValue(t);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(0)},e[0]=p):p=e[0];let y;e[1]!==h?(y=[h],e[1]=h,e[2]=y):y=e[2],q.useEffect(p,y);let c,S;e[3]!==s.length||e[4]!==r?(c=()=>{r>=s.length&&s.length>0&&d(0)},S=[s.length,r],e[3]=s.length,e[4]=r,e[5]=c,e[6]=S):(c=e[5],S=e[6]),q.useEffect(c,S);let v,w;e[7]!==s?(v=()=>{f.current=s},w=[s],e[7]=s,e[8]=v,e[9]=w):(v=e[8],w=e[9]),q.useEffect(v,w);let l,A;e[10]!==r?(l=()=>{g.current=r},A=[r],e[10]=r,e[11]=l,e[12]=A):(l=e[11],A=e[12]),q.useEffect(l,A);let x,C;e[13]!==i?(C=()=>{u.current=i},x=[i],e[13]=i,e[14]=x,e[15]=C):(x=e[14],C=e[15]),q.useEffect(C,x);let R,D;e[16]!==a?(R=()=>{m.current=a},D=[a],e[16]=a,e[17]=R,e[18]=D):(R=e[17],D=e[18]),q.useEffect(R,D);let E,P;e[19]!==o?(E=()=>{if(o?.isDestroyed)return;let O;try{O=o.view.dom}catch{return}if(!O)return;const T=b=>{const M=f.current;if(!M.length)return!1;const F=()=>d(I=>(I+1)%M.length),k=()=>d(I=>(I-1+M.length)%M.length);switch(b.key){case"ArrowUp":return b.preventDefault(),k(),!0;case"ArrowDown":return b.preventDefault(),F(),!0;case"Tab":return b.preventDefault(),b.shiftKey?k():F(),!0;case"Home":return b.preventDefault(),d(0),!0;case"End":return b.preventDefault(),d(M.length-1),!0;case"Enter":{if(b.isComposing)return!1;b.preventDefault();const I=g.current;return I!==-1&&M[I]&&u.current?.(M[I],I),!0}case"Escape":return b.preventDefault(),m.current?.(),!0;default:return!1}},$=b=>{T(b)};return O.addEventListener("keydown",$,!0),()=>{O?.removeEventListener("keydown",$,!0)}},P=[o],e[19]=o,e[20]=E,e[21]=P):(E=e[20],P=e[21]),q.useEffect(E,P);const _=s.length?r:void 0;let N;return e[22]!==_?(N={selectedIndex:_,setSelectedIndex:d},e[22]=_,e[23]=N):N=e[23],N}function ye(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const ve=q.createContext(void 0);function xe(){const n=q.useContext(ve);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function be(n){const e=B.c(16),{editor:o,char:t,pluginKey:s,allow:i,onOpenChange:a}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=r):r=e[0];const[d,f]=q.useReducer(ye,r);let g;e[1]!==a?(g=y=>{a?.(y)},e[1]=a,e[2]=g):g=e[2];const u=q.useEffectEvent(g);let m;e[3]!==t||e[4]!==i||e[5]!==o||e[6]!==u||e[7]!==s?(m=()=>{if(o?.isDestroyed)return;const y=s instanceof U?s:new U(s);o.state.plugins.find(v=>v.spec.key===y)&&o.unregisterPlugin(y);const S=Q({pluginKey:y,editor:o,char:t,allow(v){const w=o.state.doc.resolve(v.range.from);for(let l=w.depth;l>0;l--)if(w.node(l).type.name==="image")return!1;return!(i&&!i(v))},command(){},render:()=>({onStart:v=>{f({type:"ON_START",payload:{element:v.decorationNode??null,query:v.query,range:v.range}}),u(!0)},onUpdate:v=>{f({type:"ON_UPDATE",payload:{element:v.decorationNode??null,query:v.query,range:v.range}})},onKeyDown:v=>v.event.key==="Escape"?(f({type:"ON_EXIT"}),!0):!1,onExit:()=>{f({type:"ON_EXIT"}),u(!1)}}),items:he});return o.registerPlugin(S),()=>{o?.isDestroyed||o.unregisterPlugin(y)}},e[3]=t,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=m):m=e[8];let h;e[9]!==t||e[10]!==i||e[11]!==o||e[12]!==s?(h=[o,s,t,f,i],e[9]=t,e[10]=i,e[11]=o,e[12]=s,e[13]=h):h=e[13],q.useEffect(m,h);let p;return e[14]!==d?(p={state:d,dispatch:f},e[14]=d,e[15]=p):p=e[15],p}function he(){return[]}function Ce({editor:n,queryKey:e,queryFn:o,onSelect:t}){const{state:s,dispatch:i}=xe(),a=q.useDeferredValue(s.query),{data:r}=ee({queryKey:te.suggestionItems(e,s.open,a),queryFn:()=>s.open?o({query:a}):[]}),d=()=>{i({type:"ON_EXIT"})},f=async(u,m)=>{if(!(s.selectedItem!==null||!s.range)){i({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,y=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),c=s.range?{...s.range}:{from:0,to:0};y&&s.range&&(c.to+=1),await t({range:c,item:u})===!1?i({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:g}=pe({editor:n,query:a,items:r,onSelect:f,onClose:d});return{selectedItem:s.selectedItem,items:r,selectedIndex:g,close:d,onSelect:f}}export{ve as S,xe as a,Ce as b,qe as c,Re as e,we as s,be as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cN as Pt,cO as Dt,cP as P,ap as d,cQ as ce,cR as He,cS as Lt,cT as kt,aI as jt,bK as x,bM as W,bL as oe,ao as T,cU as m,bO as F,cV as Zt,cW as A,bN as $t,t as ye,r as J,c as we,a0 as Ut,z as Ft,j as Bt}from"./index-BiU3YmQL.js";import{u as Vt}from"./use-mcp-client-Br7XFHza.js";import{d as zt,e as Ye}from"./backoff-8mStPHYB.js";import{T as Ge,a as qe,b as Xe}from"./task-board-iF-5OywY.js";const Qe={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},Ke=Object.values(Qe);var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Oe;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Oe||(Oe={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class de extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof de))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}de.create=t=>new de(t);var Re;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Re||(Re={}));var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));class Z{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var et="vercel.ai.error",Jt=Symbol.for(et),Ne,xe,$=class tt extends(xe=Error,Ne=Jt,xe){constructor({name:e,message:a,cause:r}){super(a),this[Ne]=!0,this.name=e,this.cause=r}static isInstance(e){return tt.hasMarker(e,et)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function at(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var rt="AI_InvalidArgumentError",st=`vercel.ai.error.${rt}`,Wt=Symbol.for(st),Pe,De,Ht=class extends(De=$,Pe=Wt,De){constructor({message:t,cause:e,argument:a}){super({name:rt,message:t,cause:e}),this[Pe]=!0,this.argument=a}static isInstance(t){return $.hasMarker(t,st)}},nt="AI_JSONParseError",ot=`vercel.ai.error.${nt}`,Yt=Symbol.for(ot),Le,ke,je=class extends(ke=$,Le=Yt,ke){constructor({text:t,cause:e}){super({name:nt,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${at(e)}`,cause:e}),this[Le]=!0,this.text=t}static isInstance(t){return $.hasMarker(t,ot)}},it="AI_TypeValidationError",lt=`vercel.ai.error.${it}`,Gt=Symbol.for(lt),Ze,$e,q=class be extends($e=$,Ze=Gt,$e){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:it,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${at(a)}`,cause:a}),this[Ze]=!0,this.value=e,this.context=r}static isInstance(e){return $.hasMarker(e,lt)}static wrap({value:e,cause:a,context:r}){var s,n,i;return be.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new be({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Ht({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var qt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Xt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ue(t){const e=JSON.parse(t);return e===null||typeof e!="object"||qt.test(t)===!1&&Xt.test(t)===!1?e:Qt(e)}function Qt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Kt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ue(t)}try{return Ue(t)}finally{Error.stackTraceLimit=e}}function Ae(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=V(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(V):V(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(V)),t.allOf!=null&&(t.allOf=t.allOf.map(V)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(V));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=V(e[a]);return t}function V(t){return typeof t=="boolean"?t:Ae(t)}var ea=Symbol("Let zodToJsonSchema decide on which parser to use"),Fe={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},ta=t=>typeof t=="string"?{...Fe,name:t}:{...Fe,...t};function L(){return{}}function aa(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==g.ZodAny&&(n.items=E(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function ra(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function sa(){return{type:"boolean"}}function ut(t,e){return E(t.type._def,e)}var na=(t,e)=>E(t.innerType._def,e);function ct(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>ct(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return oa(t)}}var oa=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function ia(t,e){return{...E(t.innerType._def,e),default:t.defaultValue()}}function la(t,e){return e.effectStrategy==="input"?E(t.schema._def,e):L()}function ua(t){return{type:"string",enum:Array.from(t.values)}}var ca=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function da(t,e){const a=[E(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),E(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ca(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function pa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var ge=void 0,k={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ge===void 0&&(ge=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ge),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function dt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":j(a,"email",r.message,e);break;case"format:idn-email":j(a,"idn-email",r.message,e);break;case"pattern:zod":N(a,k.email,r.message,e);break}break;case"url":j(a,"uri",r.message,e);break;case"uuid":j(a,"uuid",r.message,e);break;case"regex":N(a,r.regex,r.message,e);break;case"cuid":N(a,k.cuid,r.message,e);break;case"cuid2":N(a,k.cuid2,r.message,e);break;case"startsWith":N(a,RegExp(`^${ve(r.value,e)}`),r.message,e);break;case"endsWith":N(a,RegExp(`${ve(r.value,e)}$`),r.message,e);break;case"datetime":j(a,"date-time",r.message,e);break;case"date":j(a,"date",r.message,e);break;case"time":j(a,"time",r.message,e);break;case"duration":j(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{N(a,RegExp(ve(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&j(a,"ipv4",r.message,e),r.version!=="v4"&&j(a,"ipv6",r.message,e);break}case"base64url":N(a,k.base64url,r.message,e);break;case"jwt":N(a,k.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&N(a,k.ipv4Cidr,r.message,e),r.version!=="v4"&&N(a,k.ipv6Cidr,r.message,e);break}case"emoji":N(a,k.emoji(),r.message,e);break;case"ulid":{N(a,k.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{j(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{N(a,k.base64,r.message,e);break}}break}case"nanoid":N(a,k.nanoid,r.message,e)}return a}function ve(t,e){return e.patternStrategy==="escape"?ha(t):t}var fa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ha(t){let e="";for(let a=0;a<t.length;a++)fa.has(t[a])||(e+="\\"),e+=t[a];return e}function j(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function N(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Be(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Be(e,r)}function Be(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as f,j as p,B as h}from"./index-BiU3YmQL.js";import{T as j,a as v,c as T}from"./tooltip-BGb6Kdym.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B,a0 as A,au as re,l as L,j as l,E as ne,r as O,b as $,t as z,h as H,d as U,q as G,B as V}from"./index-BiU3YmQL.js";import{n as ae}from"./ArrowUp-Bmd2w7Fx.js";import{c as oe,a as Q,f as ie,u as ce,T as de,A as me,h as ue,b as fe,i as pe,j as xe}from"./chat-context-CHZ5Yehn.js";import{s as he,g as W,d as ge}from"./gateway-client-BqcIzR1f.js";import{b as F,T as be,a as je,c as ye}from"./tooltip-BGb6Kdym.js";import{c as X,d as Y,b as Z,D as J,h as ve}from"./dialog-yUWKJPsU.js";import{d as we,b as Ne,a as Ce,D as Se}from"./drawer-CFueQivP.js";import{C as Te}from"./collection-search-BmT0oV8g.js";import{u as Pe}from"./use-mobile-DVkjqQzh.js";import{u as ke}from"./use-mcp-client-Br7XFHza.js";import{u as Ee,g as De}from"./use-mcp-prompts-C6590AFl.js";import{c as _e,P as Ie}from"./index-CuhH8P7u.js";import{T as Me,a as Be,C as Oe,u as Le,H as Re}from"./input-BGhe0a85.js";import{a as $e,b as Ae,S as Fe,M as q}from"./pair-TxCwxPu7.js";import{a as ze}from"./use-panel-navigate-DMG8fP2m.js";import{u as He}from"./hooks-GmRpr8h8.js";import{N as Ge}from"./decopilot-BbHxwoKU.js";import{i as qe}from"./ArrowRight-Cl3bzAIC.js";import{c as ee}from"./agent-icon-DbgbaBWC.js";import{d as Ke}from"./use-entitlements-BGdUcutE.js";import{u as Ue}from"./use-deco-credits-CKQJlHZi.js";import{F as Ve}from"./feature-paywall-CFcsZgv5.js";import{i as Qe}from"./AlertCircle-3PzOAmGf.js";const K=3,te="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",We="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function se(t){const e=B.c(46),{item:r,onSelect:n,isLoading:s,isDisabled:a,variant:d}=t,o=d===void 0?"pill":d,{prompt:i}=r;let m;if(e[0]!==i._meta||e[1]!==i.name||e[2]!==i.title){const P=W(i._meta);m=i.title??ge(i.name,P),e[0]=i._meta,e[1]=i.name,e[2]=i.title,e[3]=m}else m=e[3];const c=m,u=i.description||null;if(o==="card"){let P;e[4]!==n||e[5]!==i?(P=()=>n(i),e[4]=n,e[5]=i,e[6]=P):P=e[6];const _=a||s,I=s&&"bg-accent/40",k=(a||s)&&"cursor-not-allowed opacity-50";let E;e[7]!==I||e[8]!==k?(E=L(We,"hover:bg-accent/60 text-foreground",I,k),e[7]=I,e[8]=k,e[9]=E):E=e[9];let h;e[10]!==c?(h=l.jsx("span",{className:"font-medium truncate capitalize",children:c}),e[10]=c,e[11]=h):h=e[11];let v;e[12]!==s?(v=s&&l.jsx(H,{size:"xs"}),e[12]=s,e[13]=v):v=e[13];let p;e[14]!==h||e[15]!==v?(p=l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h,v]}),e[14]=h,e[15]=v,e[16]=p):p=e[16];let D;e[17]!==u?(D=u&&l.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:u}),e[17]=u,e[18]=D):D=e[18];let M;return e[19]!==p||e[20]!==D||e[21]!==P||e[22]!==_||e[23]!==E?(M=l.jsxs("button",{type:"button",onClick:P,disabled:_,className:E,children:[p,D]}),e[19]=p,e[20]=D,e[21]=P,e[22]=_,e[23]=E,e[24]=M):M=e[24],M}let f;e[25]!==n||e[26]!==i?(f=()=>n(i),e[25]=n,e[26]=i,e[27]=f):f=e[27];const w=a||s,j=s&&"bg-muted/50",y=(a||s)&&"cursor-not-allowed opacity-50";let x;e[28]!==j||e[29]!==y?(x=L(te,"hover:bg-muted/70 hover:text-foreground",j,y),e[28]=j,e[29]=y,e[30]=x):x=e[30];let b;e[31]!==c?(b=l.jsx("span",{className:"capitalize",children:c}),e[31]=c,e[32]=b):b=e[32];let g;e[33]!==s?(g=s&&l.jsx(H,{size:"xs"}),e[33]=s,e[34]=g):g=e[34];let N;e[35]!==f||e[36]!==w||e[37]!==x||e[38]!==b||e[39]!==g?(N=l.jsx(be,{asChild:!0,children:l.jsxs("button",{type:"button",onClick:f,disabled:w,className:x,children:[b,g]})}),e[35]=f,e[36]=w,e[37]=x,e[38]=b,e[39]=g,e[40]=N):N=e[40];const C=u??c;let S;e[41]!==C?(S=l.jsx(je,{side:"top",className:"max-w-xs",children:l.jsx("p",{className:"text-xs",children:C})}),e[41]=C,e[42]=S):S=e[42];let T;return e[43]!==N||e[44]!==S?(T=l.jsxs(ye,{delayDuration:400,children:[N,S]}),e[43]=N,e[44]=S,e[45]=T):T=e[45],T}function Xe(t){const e=B.c(61),{items:r,open:n,onOpenChange:s,onSelect:a,loadingPrompt:d}=t,o=$(),[i,m]=O.useState(""),c=!!d;let u;e[0]!==r||e[1]!==i?(u=i.trim()?r.filter(h=>{const v=i.toLowerCase();return h.prompt.name.toLowerCase().includes(v)||(h.prompt.title??"").toLowerCase().includes(v)||(h.prompt.description??"").toLowerCase().includes(v)}):r,e[0]=r,e[1]=i,e[2]=u):u=e[2];const f=u,w=Pe();let j;e[3]!==f.length||e[4]!==i||e[5]!==o?(j=f.length===0&&l.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:o("chat.iceBreakers.noPromptsMatch",{search:i})}),e[3]=f.length,e[4]=i,e[5]=o,e[6]=j):j=e[6];let y;if(e[7]!==f||e[8]!==c||e[9]!==d?.name||e[10]!==s||e[11]!==a){let h;e[13]!==c||e[14]!==d?.name||e[15]!==s||e[16]!==a?(h=v=>l.jsx(se,{item:v,variant:"card",onSelect:p=>{s(!1),a(p)},isLoading:d?.name===v.prompt.name,isDisabled:c&&d?.name!==v.prompt.name},v.prompt.name),e[13]=c,e[14]=d?.name,e[15]=s,e[16]=a,e[17]=h):h=e[17],y=f.map(h),e[7]=f,e[8]=c,e[9]=d?.name,e[10]=s,e[11]=a,e[12]=y}else y=e[12];let x;e[18]!==j||e[19]!==y?(x=l.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[j,y]})}),e[18]=j,e[19]=y,e[20]=x):x=e[20];const b=x;let g;e[21]!==o?(g=o("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=o,e[22]=g):g=e[22];let N;e[23]===Symbol.for("react.memo_cache_sentinel")?(N=h=>{h.key==="Escape"&&m("")},e[23]=N):N=e[23];let C;e[24]!==i||e[25]!==g?(C=l.jsx(Te,{value:i,onChange:m,placeholder:g,onKeyDown:N}),e[24]=i,e[25]=g,e[26]=C):C=e[26];const S=C;if(w){let h;e[27]!==o?(h=o("chat.iceBreakers.allPromptsTitle"),e[27]=o,e[28]=h):h=e[28];let v;e[29]!==h?(v=l.jsx(we,{className:"sr-only",children:l.jsx(Ne,{children:h})}),e[29]=h,e[30]=v):v=e[30];let p;e[31]!==o?(p=o("chat.iceBreakers.promptsLabel"),e[31]=o,e[32]=p):p=e[32];let D;e[33]!==p?(D=l.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:l.jsx("span",{className:"text-sm font-medium text-foreground",children:p})}),e[33]=p,e[34]=D):D=e[34];let M;e[35]!==b||e[36]!==S||e[37]!==D||e[38]!==v?(M=l.jsxs(Ce,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[v,D,S,b]}),e[35]=b,e[36]=S,e[37]=D,e[38]=v,e[39]=M):M=e[39];let R;return e[40]!==s||e[41]!==n||e[42]!==M?(R=l.jsx(F,{delayDuration:400,children:l.jsx(Se,{open:n,onOpenChange:s,children:M})}),e[40]=s,e[41]=n,e[42]=M,e[43]=R):R=e[43],R}let T;e[44]!==o?(T=o("chat.iceBreakers.allPromptsTitle"),e[44]=o,e[45]=T):T=e[45];let P;e[46]!==T?(P=l.jsx(X,{className:"sr-only",children:l.jsx(Y,{children:T})}),e[46]=T,e[47]=P):P=e[47];let _;e[48]!==o?(_=o("chat.iceBreakers.promptsLabel"),e[48]=o,e[49]=_):_=e[49];let I;e[50]!==_?(I=l.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:l.jsx("span",{className:"text-sm font-medium text-foreground",children:_})}),e[50]=_,e[51]=I):I=e[51];let k;e[52]!==b||e[53]!==S||e[54]!==I||e[55]!==P?(k=l.jsxs(Z,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[P,I,S,b]}),e[52]=b,e[53]=S,e[54]=I,e[55]=P,e[56]=k):k=e[56];let E;return e[57]!==s||e[58]!==n||e[59]!==k?(E=l.jsx(F,{delayDuration:400,children:l.jsx(J,{open:n,onOpenChange:s,children:k})}),e[57]=s,e[58]=n,e[59]=k,e[60]=E):E=e[60],E}function Ye(t){const e=B.c(30),{items:r,onSelect:n,loadingPrompt:s,className:a}=t,d=$(),[o,i]=O.useState(!1);if(r.length===0)return null;let m,c,u,f,w;if(e[0]!==a||e[1]!==r||e[2]!==s||e[3]!==n||e[4]!==d){const b=r.slice(0,K),g=r.slice(K),N=!!s;let C;e[10]!==N||e[11]!==s?.name||e[12]!==n?(C=T=>l.jsx(se,{item:T,onSelect:n,isLoading:s?.name===T.prompt.name,isDisabled:N&&s?.name!==T.prompt.name},T.prompt.name),e[10]=N,e[11]=s?.name,e[12]=n,e[13]=C):C=e[13];const S=b.map(C);m=F,w=400,e[14]!==a?(c=L("w-full flex flex-wrap gap-2 justify-center",a),e[14]=a,e[15]=c):c=e[15],u=S,f=g.length>0&&l.jsx("button",{type:"button",disabled:N,onClick:()=>i(!0),className:L(te,"hover:bg-muted/70 hover:text-foreground",N&&"opacity-50 cursor-not-allowed"),children:d("chat.iceBreakers.moreButton",{count:g.length})}),e[0]=a,e[1]=r,e[2]=s,e[3]=n,e[4]=d,e[5]=m,e[6]=c,e[7]=u,e[8]=f,e[9]=w}else m=e[5],c=e[6],u=e[7],f=e[8],w=e[9];let j;e[16]!==c||e[17]!==u||e[18]!==f?(j=l.jsxs("div",{className:c,children:[u,f]}),e[16]=c,e[17]=u,e[18]=f,e[19]=j):j=e[19];let y;e[20]!==r||e[21]!==s||e[22]!==o||e[23]!==n?(y=l.jsx(Xe,{items:r,open:o,onOpenChange:i,onSelect:n,loadingPrompt:s}),e[20]=r,e[21]=s,e[22]=o,e[23]=n,e[24]=y):y=e[24];let x;return e[25]!==m||e[26]!==w||e[27]!==j||e[28]!==y?(x=l.jsxs(m,{delayDuration:w,children:[j,y]}),e[25]=m,e[26]=w,e[27]=j,e[28]=y,e[29]=x):x=e[29],x}function Ze(){return null}function Je(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function et(t){const e=B.c(31),{connectionId:r}=t,n=$(),{sendMessage:s}=Q(),{org:a}=A();let d;e[0]!==r||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:r,orgId:a.id,orgSlug:a.slug},e[0]=r,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const o=ke(d);let i;e[4]!==o?(i={client:o,staleTime:6e4},e[4]=o,e[5]=i):i=e[5];const{data:m}=Ee(i);let c;e[6]!==m?.prompts?(c=m?.prompts??[],e[6]=m?.prompts,e[7]=c):c=e[7];const u=c;let f;e[8]!==u?(f=u.map(tt),e[8]=u,e[9]=f):f=e[9];const w=f;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j={stage:"idle"},e[10]=j):j=e[10];const[y,x]=O.useReducer(Je,j),[b,g]=O.useState(null);let N;e[11]!==o||e[12]!==s||e[13]!==n?(N=async(p,D)=>{if(!o){z.error(n("chat.iceBreakers.mcpClientNotAvailable")),x({type:"RESET"});return}try{const M=await De(o,p.name,D);x({type:"RESET"});const R={type:"doc",content:[{type:"paragraph",content:[_e({id:p.name,name:he(p.name,W(p._meta)),metadata:M.messages,char:"/",kind:"prompt",args:D}),{type:"text",text:" "}]}]};await s(R)}catch(M){console.error("[ice-breakers] Failed to fetch prompt:",M),z.error(n("chat.iceBreakers.failedToLoadPrompt")),x({type:"RESET"})}},e[11]=o,e[12]=s,e[13]=n,e[14]=N):N=e[14];const C=N;let S;e[15]!==C?(S=async p=>{if(p.arguments&&p.arguments.length>0){x({type:"SELECT_PROMPT",prompt:p}),g(p);return}x({type:"START_LOADING",prompt:p}),await C(p)},e[15]=C,e[16]=S):S=e[16];const T=S;let P;e[17]!==b||e[18]!==C?(P=async p=>{b&&(x({type:"START_LOADING",prompt:b,arguments:p}),g(null),await C(b,p))},e[17]=b,e[18]=C,e[19]=P):P=e[19];const _=P;if(w.length===0)return null;const I=y.stage==="loading"?y.prompt:null;let k;e[20]!==T||e[21]!==w||e[22]!==I?(k=l.jsx(Ye,{items:w,onSelect:T,loadingPrompt:I}),e[20]=T,e[21]=w,e[22]=I,e[23]=k):k=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{g(null),x({type:"RESET"})},e[24]=E):E=e[24];let h;e[25]!==b||e[26]!==_?(h=l.jsx(Ie,{prompt:b,setPrompt:E,onSubmit:_}),e[25]=b,e[26]=_,e[27]=h):h=e[27];let v;return e[28]!==k||e[29]!==h?(v=l.jsxs(l.Fragment,{children:[k,h]}),e[28]=k,e[29]=h,e[30]=v):v=e[30],v}function tt(t){return{prompt:t}}function st(t){const e=B.c(13),{className:r}=t,{selectedVirtualMcp:n}=oe(),{org:s}=A();let a;e[0]!==s.id?(a=re(s.id),e[0]=s.id,e[1]=a):a=e[1];const d=a.id,o=n?.id??d;let i;e[2]!==r?(i=L("w-full @container",r),e[2]=r,e[3]=i):i=e[3];const m=o??"default";let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(Ze,{}),e[4]=c):c=e[4];let u;e[5]!==o?(u=l.jsx(et,{connectionId:o}),e[5]=o,e[6]=u):u=e[6];let f;e[7]!==m||e[8]!==u?(f=l.jsx(ne,{fallback:null,children:l.jsx(O.Suspense,{fallback:c,children:u},m)}),e[7]=m,e[8]=u,e[9]=f):f=e[9];let w;return e[10]!==i||e[11]!==f?(w=l.jsx("div",{className:i,children:f}),e[10]=i,e[11]=f,e[12]=w):w=e[12],w}function lt(t){let e=0;for(const r of t)for(const n of r.parts??[]){const s=n;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function rt(){const t=B.c(8),{openPanel:e}=ze(),r=He(),n=ie()?.messages??[],s=ce()?.taskId??null;let a;t[0]!==n?(a=lt(n),t[0]=n,t[1]=a):a=t[1];const d=a,o=O.useRef(null),i=O.useRef(null);let m,c;t[2]!==d||t[3]!==r||t[4]!==e||t[5]!==s?(m=()=>{if(!d||!s)return;const u=`${s}:${d}`;i.current!==u&&(i.current=u,r?.refreshThreadMetadata(s)),o.current!==s&&(o.current=s,e("site-editor"))},c=[d,s,e,r],t[2]=d,t[3]=r,t[4]=e,t[5]=s,t[6]=m,t[7]=c):(m=t[6],c=t[7]),O.useEffect(m,c)}function le(t){return`deco-credits-empty-dismissed:${t}`}function $t(t){try{return localStorage.getItem(le(t))==="1"}catch{return!1}}function nt(){const t=B.c(56),e=$(),{org:r}=A(),n=Ke("credits"),s=U(),{decoKeyId:a}=Ue(),[d,o]=O.useState(!0);let i;t[0]!==r.id?(i=()=>{G("credits_empty_state_dismissed",{organization_id:r.id}),o(!1);try{localStorage.setItem(le(r.id),"1")}catch{}},t[0]=r.id,t[1]=i):i=t[1];const m=i;let c,u;if(t[2]!==d||t[3]!==r.id?(c=()=>{d&&G("credits_empty_state_shown",{organization_id:r.id})},u=[d,r.id],t[2]=d,t[3]=r.id,t[4]=c,t[5]=u):(c=t[4],u=t[5]),O.useEffect(c,u),!d)return null;if(!n){let p;t[6]!==e?(p=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=p):p=t[7];let D;t[8]!==p?(D={title:p},t[8]=p,t[9]=D):D=t[9];let M;return t[10]!==m||t[11]!==D?(M=l.jsx(Ve,{feature:"chat",copy:D,onDismiss:m}),t[10]=m,t[11]=D,t[12]=M):M=t[12],M}let f;t[13]!==m?(f=p=>!p&&m(),t[13]=m,t[14]=f):f=t[14];let w;t[15]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=w):w=t[15];let j;t[16]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(ee,{size:20,className:"text-warning"})}),t[16]=j):j=t[16];let y;t[17]!==e?(y=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=y):y=t[18];let x;t[19]!==y?(x=l.jsx(Y,{className:"text-lg font-semibold",children:y}),t[19]=y,t[20]=x):x=t[20];let b;t[21]!==e?(b=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=b):b=t[22];let g;t[23]!==b?(g=l.jsx(ve,{className:"mt-2 text-[13px] leading-relaxed max-w-[320px] mx-auto",children:b}),t[23]=b,t[24]=g):g=t[24];let N;t[25]!==x||t[26]!==g?(N=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[w,l.jsxs(X,{className:"relative gap-3",children:[j,l.jsxs("div",{className:"text-center",children:[x,g]})]})]}),t[25]=x,t[26]=g,t[27]=N):N=t[27];let C;t[28]!==a||t[29]!==m?(C=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(Me,{source:"empty_state",onDone:m})}),t[28]=a,t[29]=m,t[30]=C):C=t[30];let S;t[31]!==m||t[32]!==s||t[33]!==r.slug?(S=()=>{s({to:"/$org/settings/ai-providers",params:{org:r.slug}}),m()},t[31]=m,t[32]=s,t[33]=r.slug,t[34]=S):S=t[34];let T;t[35]!==e?(T=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=T):T=t[36];let P;t[37]===Symbol.for("react.memo_cache_sentinel")?(P=l.jsx(qe,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=P):P=t[37];let _;t[38]!==S||t[39]!==T?(_=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[T,P]}),t[38]=S,t[39]=T,t[40]=_):_=t[40];let I;t[41]!==e?(I=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=I):I=t[42];let k;t[43]!==m||t[44]!==I?(k=l.jsx(V,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:m,children:I}),t[43]=m,t[44]=I,t[45]=k):k=t[45];let E;t[46]!==_||t[47]!==k?(E=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[_,k]}),t[46]=_,t[47]=k,t[48]=E):E=t[48];let h;t[49]!==N||t[50]!==C||t[51]!==E?(h=l.jsxs(Z,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:at,children:[N,C,E]}),t[49]=N,t[50]=C,t[51]=E,t[52]=h):h=t[52];let v;return t[53]!==h||t[54]!==f?(v=l.jsx(J,{open:!0,onOpenChange:f,children:h}),t[53]=h,t[54]=f,t[55]=v):v=t[55],v}function at(t){return t.preventDefault()}function ot(t){const e=B.c(6),{balanceDollars:r}=t;let n;e[0]!==r?(n=r.toFixed(2),e[0]=r,e[1]=n):n=e[1];const s=n;let a,d;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=L("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),d=l.jsx(ee,{size:13,className:"text-success"}),e[2]=a,e[3]=d):(a=e[2],d=e[3]);let o;return e[4]!==s?(o=l.jsxs("div",{className:a,children:[d,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=o):o=e[5],o}function it(){const t=B.c(8),{org:e}=A(),r=U();let n;t[0]!==r||t[1]!==e.slug?(n=()=>r({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=r,t[1]=e.slug,t[2]=n):n=t[2];let s,a,d;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=L("inline-flex items-center gap-1.5 px-3 py-1 classic:rounded-full compact:rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Qe,{size:13,className:"text-warning"}),d=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=a,t[5]=d):(s=t[3],a=t[4],d=t[5]);let o;return t[6]!==n?(o=l.jsxs("button",{type:"button",onClick:n,className:s,children:[a,d]}),t[6]=n,t[7]=o):o=t[7],o}function ct(t){const e=B.c(7),{scrollRef:r,sentinelRef:n,hasMoreOlder:s,isFetchingOlder:a,fetchOlderMessages:d}=t;let o,i;e[0]!==d||e[1]!==s||e[2]!==a||e[3]!==r||e[4]!==n?(o=()=>{const m=n.current,c=r.current;if(!m||!c||!s)return;const u=new IntersectionObserver(async f=>{if(!f[0]?.isIntersecting||a||!s)return;const j=c.scrollHeight,y=c.scrollTop;await d(),requestAnimationFrame(()=>{const x=c.scrollHeight;c.scrollTop=y+(x-j)})},{root:c,rootMargin:"200px 0px 0px 0px"});return u.observe(m),()=>u.disconnect()},i=[r,n,s,a,d],e[0]=d,e[1]=s,e[2]=a,e[3]=r,e[4]=n,e[5]=o,e[6]=i):(o=e[5],i=e[6]),O.useEffect(o,i)}function dt(t){const e=B.c(5),{className:r,children:n}=t;let s;e[0]!==r?(s=L("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",r),e[0]=r,e[1]=s):s=e[1];let a;return e[2]!==n||e[3]!==s?(a=l.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=a):a=e[4],a}function mt(t){const e=B.c(5),{children:r,className:n}=t;let s;e[0]!==n?(s=L("flex-1 min-h-0 overflow-y-auto isolate",n),e[0]=n,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=l.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}function ut(t){const e=B.c(2),{children:r}=t;let n;return e[0]!==r?(n=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:r}),e[0]=r,e[1]=n):n=e[1],n}function ft(){const t=$(),{messages:e,status:r,hasMoreOlder:n,isFetchingOlder:s,fetchOlderMessages:a}=Q(),{taskId:d}=fe();rt();const o=pe(d??""),i=xe(o),m=i.size===0?e:e.filter(g=>!i.has(g.id)),c=$e(m),u=c.at(-1),w=Le()*Re+16,j=O.useRef(null),y=O.useRef(null);ct({scrollRef:j,sentinelRef:y,hasMoreOlder:n,isFetchingOlder:s,fetchOlderMessages:a});const x=Ae({initial:!1}),b=g=>{j.current=g,x.scrollRef(g)};return l.jsx(Fe,{messages:e,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:b,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:w},children:l.jsxs("div",{ref:x.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:y,"aria-hidden":!0,className:"h-px"}),s&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),c.slice(0,-1).map((g,N)=>l.jsx(q,{pair:g,isLastPair:!1,status:N===c.length-1?r:void 0},`pair-${g.user?.id??g.assistant?.id}`))]}),u&&l.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:l.jsx(q,{pair:u,isLastPair:!0,status:r},`pair-${u.user?.id??u.assistant?.id}`)})]})}),!x.isAtBottom&&l.jsx(V,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 classic:rounded-full shadow-md animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:w+8},onClick:()=>{x.scrollToBottom()},children:l.jsx(ae,{size:14})})]})})}function pt(t){const e=B.c(5),{children:r,className:n}=t;let s;e[0]!==n?(s=L("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",n),e[0]=n,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=l.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}const At=Object.assign(dt,{Main:mt,Messages:ft,EmptyState:ut,Footer:pt,Input:Oe,Provider:ue,ActiveTaskProvider:me,ThreadlessProvider:de,IceBreakers:st,NoAiProviderEmptyState:Ge,CreditsEmptyState:nt,CreditsEyebrow:ot,NoCreditsEyebrow:it,CreditsExhaustedBanner:Be});export{At as C,$t as w};
|