decocms 4.579.2 → 4.580.1
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-CTbjWy6O.js → AlertCircle-DuMz-jFi.js} +1 -1
- package/dist/client/assets/{AreaChart-DwuVDkrD.js → AreaChart-BqIC3e-u.js} +1 -1
- package/dist/client/assets/{ArrowLeft-XFXQyKrg.js → ArrowLeft-5NT3k46C.js} +1 -1
- package/dist/client/assets/{ArrowUp-BGhmN6Zx.js → ArrowUp-D5JWz7Yq.js} +1 -1
- package/dist/client/assets/{BookOpen01-BPEekJOY.js → BookOpen01-m1uNXDEc.js} +1 -1
- package/dist/client/assets/{CartesianChart-CyLm4xQH.js → CartesianChart-D9oScPZv.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BaZiYgxE.js → CategoricalChart-BR_4thmy.js} +1 -1
- package/dist/client/assets/{CheckCircle-D_eKfCyb.js → CheckCircle-DAPdRkcW.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-B8yNz6I1.js → ChevronSelectorVertical-5fTMRN5v.js} +1 -1
- package/dist/client/assets/{ChevronUp-DJytO9gL.js → ChevronUp-BaKxA_AU.js} +1 -1
- package/dist/client/assets/{CreditCard01-D8vcOfs6.js → CreditCard01-BU3Icpfr.js} +1 -1
- package/dist/client/assets/{Globe04-B6PnEpLB.js → Globe04-KZ-J2ZUi.js} +1 -1
- package/dist/client/assets/{Key01-CqlMd8Tp.js → Key01-RIzbDsEi.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BrTHjhI6.js → LinkBroken01-IVC8feVZ.js} +1 -1
- package/dist/client/assets/{Minus-O-Diijsb.js → Minus-Dw050KAn.js} +1 -1
- package/dist/client/assets/{Monitor01-CNesz7Zi.js → Monitor01-D7QUQToM.js} +1 -1
- package/dist/client/assets/{Play-DLBGORyf.js → Play-BDSDyO5E.js} +1 -1
- package/dist/client/assets/{Plus-D93afoay.js → Plus-CRqz0c82.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DP5lPOEm.js → ReferenceLine-DKoY4fDh.js} +1 -1
- package/dist/client/assets/{SearchMd-BMSOzTwj.js → SearchMd-CcAFkP0F.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BjOh6InC.js → ShoppingBag01-CspfAlNO.js} +1 -1
- package/dist/client/assets/{Sun-Dwiv3SBK.js → Sun-DRT9bMW5.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-TvywMML0.js → SwitchHorizontal01-D3zx9VNf.js} +1 -1
- package/dist/client/assets/{Tool01-BR0iTy6Z.js → Tool01-D9-ePNaJ.js} +1 -1
- package/dist/client/assets/{Tooltip-CMzIdphO.js → Tooltip-DZ7sGrNE.js} +1 -1
- package/dist/client/assets/{Trash01-DcgAZcrm.js → Trash01-BTZDkUzq.js} +1 -1
- package/dist/client/assets/{Upload01-C4wCuUx0.js → Upload01-BRP1bAMs.js} +1 -1
- package/dist/client/assets/{UserSquare-dl1oayK_.js → UserSquare-Dv0YcmkC.js} +1 -1
- package/dist/client/assets/{Users01-Bfq6gAwi.js → Users01-DKwguy8Z.js} +1 -1
- package/dist/client/assets/{XClose-DN30jgS9.js → XClose-CyHahh4m.js} +1 -1
- package/dist/client/assets/{Zap-C1Evk-yy.js → Zap-Dja9fdMf.js} +1 -1
- package/dist/client/assets/{access-gate-pZVUht52.js → access-gate-VlWUv9j2.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Z992qi1w.js → add-connection-dialog-DJ5sN8e_.js} +1 -1
- package/dist/client/assets/agent-app-C3awWskd.js +1 -0
- package/dist/client/assets/{agent-assets-CFZFbPFI.js → agent-assets-n0l0tFBN.js} +1 -1
- package/dist/client/assets/{agent-automation-CK-VV9xP.js → agent-automation-DETSj7J9.js} +1 -1
- package/dist/client/assets/{agent-automations-csn7BO9I.js → agent-automations-DeXM-DYA.js} +1 -1
- package/dist/client/assets/{agent-blog-DPGRYnCY.js → agent-blog-Dw89uwrE.js} +2 -2
- package/dist/client/assets/{agent-blog-post-Cx_KL21T.js → agent-blog-post-BBh6a8oA.js} +2 -2
- package/dist/client/assets/{agent-calendar-DHfOCkRQ.js → agent-calendar-CMtYd4vL.js} +1 -1
- package/dist/client/assets/{agent-capabilities-4_vEEVov.js → agent-capabilities-BtnZBraK.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-HdEFSoEU.js → agent-connect-sources-CIDxepQB.js} +1 -1
- package/dist/client/assets/agent-deck-CQmtmyYp.js +1 -0
- package/dist/client/assets/{agent-e2e-D3d1Qsqd.js → agent-e2e-CjpTFQWV.js} +1 -1
- package/dist/client/assets/agent-experiments-BNt-4I9S.js +1 -0
- package/dist/client/assets/{agent-file-SpdJvvC2.js → agent-file-Cd74xgom.js} +1 -1
- package/dist/client/assets/{agent-hosting-BZxtmZl8.js → agent-hosting-Dv13VH72.js} +1 -1
- package/dist/client/assets/{agent-icon-BLhMgLPf.js → agent-icon-DvD5kv_K.js} +1 -1
- package/dist/client/assets/agent-library-Ggp4u0Nt.js +1 -0
- package/dist/client/assets/agent-library-file--sN5r5DJ.js +1 -0
- package/dist/client/assets/agent-overview-4OlQ8oKX.js +1 -0
- package/dist/client/assets/{agent-releases-DL4F9_VB.js → agent-releases-BNRiLrFJ.js} +1 -1
- package/dist/client/assets/agent-settings-CVXhUEvS.js +1 -0
- package/dist/client/assets/{agent-site-editor-CqV30Rul.js → agent-site-editor-87vQ9ufh.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DmCPSKgw.js +2 -0
- package/dist/client/assets/agent-site-editor-content-cBVAi7GZ.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-kwoTpAUq.js +1 -0
- package/dist/client/assets/agent-view-BLlyMWQJ.js +1 -0
- package/dist/client/assets/{agent-view-guard-DZvQvKvl.js → agent-view-guard-H1xbnpPJ.js} +1 -1
- package/dist/client/assets/{ai-providers-RlxMy215.js → ai-providers-B9LfkD2O.js} +1 -1
- package/dist/client/assets/{alert-B5Ykyt3T.js → alert-NGt4-O3B.js} +1 -1
- package/dist/client/assets/{analytics-sections-CrpfbEYH.js → analytics-sections-LriChYtf.js} +1 -1
- package/dist/client/assets/api-keys-CN81fd1q.js +1 -0
- package/dist/client/assets/{api-keys-CSc7sP_x.js → api-keys-Dsk0h5qe.js} +1 -1
- package/dist/client/assets/{app-editor-DghRfIjT.js → app-editor-CdNfOH0q.js} +1 -1
- package/dist/client/assets/{asset-utils-BmMj5wge.js → asset-utils-CZ4gg2Dc.js} +1 -1
- package/dist/client/assets/{auth-catchall-D48r6PhG.js → auth-catchall-o-VGmahb.js} +1 -1
- package/dist/client/assets/{auth-entry-C6mHpqQT.js → auth-entry-CvNRh315.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DZ8IOzfV.js → auth-split-layout-Dy80rL_w.js} +1 -1
- package/dist/client/assets/{auth-U9K5aFal.js → auth-ygmhxR7o.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DX8Wh7d9.js → authenticate-and-persist-oauth-Di92Hz1m.js} +1 -1
- package/dist/client/assets/{automation-list-row-DFyb04uK.js → automation-list-row-BtDcNrc_.js} +1 -1
- package/dist/client/assets/{automation-runs-Bq3l9enC.js → automation-runs-dkRISa5B.js} +1 -1
- package/dist/client/assets/{automations-B2SGyI95.js → automations-Be95spA2.js} +1 -1
- package/dist/client/assets/{badge-C5mneqKN.js → badge-DzB3sqoD.js} +1 -1
- package/dist/client/assets/{block-document-DtjqDxVH.js → block-document-DrJlmgeQ.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BddxrpRg.js → blocks-preview-workspace-context-ClN63sTc.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BJKt49qf.js → blocks-tab-states-DQr9dBZQ.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DPwtQPzJ.js → blog-preview-url-BNeiu40F.js} +1 -1
- package/dist/client/assets/{blog-schema-CMQLhziN.js → blog-schema-BSQdtgIY.js} +1 -1
- package/dist/client/assets/{blog-source-gate-WyoFGgE-.js → blog-source-gate-WL-fQwzo.js} +1 -1
- package/dist/client/assets/{blog-view-gate-CS668Ila.js → blog-view-gate-EO5JR8Eq.js} +1 -1
- package/dist/client/assets/{buckets-DeXHPgox.js → buckets-g82zij8V.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DnDGx5OC.js → build-improve-prompt-doc-BdkcM1jX.js} +1 -1
- package/dist/client/assets/{calendar-DbxCxf92.js → calendar-RWRp4FJU.js} +1 -1
- package/dist/client/assets/{capability-load-error-DCozEloC.js → capability-load-error-KmDfOtoP.js} +1 -1
- package/dist/client/assets/{category-editor-BmGhOvZr.js → category-editor-C9uuMYru.js} +1 -1
- package/dist/client/assets/{category-tree-5dEhPnK2.js → category-tree-DJrnPSNg.js} +1 -1
- package/dist/client/assets/{chart-Cy7LFFBX.js → chart-B9PgP-e_.js} +1 -1
- package/dist/client/assets/{chat-context-BOjsomdh.js → chat-context--RKzWa6k.js} +1 -1
- package/dist/client/assets/{chat-draft-CYhwlCHc.js → chat-draft-BGQDbeF5.js} +1 -1
- package/dist/client/assets/{checkbox-Bv8PV_aY.js → checkbox-H8QR9D0_.js} +1 -1
- package/dist/client/assets/{choose-editor-DoyVAhj6.js → choose-editor-WBWd1WOu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DaytSyrs.js → cli-auth-success-C9vCBK1d.js} +1 -1
- package/dist/client/assets/{client-icons-CiAKjxAC.js → client-icons-BKCD3ufp.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-Cuu4FHx1.js → cms-settings-editor-BbDRN695.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-B9MSaBY6.js → cms-store-drafts-BejfL8Fe.js} +1 -1
- package/dist/client/assets/{collapsible-DdHbUgH7.js → collapsible-DbCvR955.js} +1 -1
- package/dist/client/assets/{collection-detail-DyddcB5w.js → collection-detail-C2j-WZ3j.js} +1 -1
- package/dist/client/assets/{collection-display-button-DVJBx_vT.js → collection-display-button-1DK_MMnx.js} +1 -1
- package/dist/client/assets/{collection-search-CwqvBBm4.js → collection-search-DvsK7hSv.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DRrebKp3.js → collection-table-wrapper-bm-LalTq.js} +1 -1
- package/dist/client/assets/{collection-tabs-81bsUeqm.js → collection-tabs-6iiAOwW9.js} +1 -1
- package/dist/client/assets/{combobox-BrOkSbhh.js → combobox-6gjOOlze.js} +1 -1
- package/dist/client/assets/{command-woRMyGZF.js → command-DQleocFC.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-B5-NAK1i.js → companion-mcps-section-CeIGkazX.js} +1 -1
- package/dist/client/assets/{config-CuCmBQuJ.js → config-C2ncmLTD.js} +1 -1
- package/dist/client/assets/{connect-HLDiwDO_.js → connect-DlXzYtCQ.js} +1 -1
- package/dist/client/assets/{connect-layout-CWZCwH8X.js → connect-layout-Boxkt-tt.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CBKuqqHC.js → connect-source-dialog-DYJ40IKC.js} +1 -1
- package/dist/client/assets/{connection-BIE1Vidl.js → connection-CJZ6RQ2g.js} +1 -1
- package/dist/client/assets/{connection-card-gYm1H9XQ.js → connection-card-qoqR63NP.js} +1 -1
- package/dist/client/assets/{connection-detail-QqFuUNuZ.js → connection-detail-BTXE_HXc.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DA9irt8S.js → connection-form-helpers-B9JY5oaH.js} +1 -1
- package/dist/client/assets/{connection-slug-B8jXAB0J.js → connection-slug-CP70si3t.js} +1 -1
- package/dist/client/assets/{connections-JyCHdBZv.js → connections-D8py3O3a.js} +1 -1
- package/dist/client/assets/{content-tab-DRXqlCUR.js → content-tab-lkbVE2xf.js} +3 -3
- package/dist/client/assets/{context-C-ghWKlt.js → context-DH-yMERA.js} +1 -1
- package/dist/client/assets/{context-menu-DZcVKhkc.js → context-menu-Da3prNKL.js} +1 -1
- package/dist/client/assets/{context-shell-Bemo51hp.js → context-shell--6NpIOhl.js} +3 -3
- package/dist/client/assets/{core.esm-Z0qYqKj9.js → core.esm-DJRh9rDF.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D0g-fdvV.js → create-organization-dialog-BJJn8Tn9.js} +1 -1
- package/dist/client/assets/{delete-copy-DJ_GOWB2.js → delete-copy-p7sDnlSk.js} +1 -1
- package/dist/client/assets/{device-hint-DfKyeTjV.js → device-hint-Dz-Lgu6D.js} +1 -1
- package/dist/client/assets/{discover-D7XfOvTK.js → discover-DnaaaTAL.js} +1 -1
- package/dist/client/assets/{domain-settings-DLWYAbIO.js → domain-settings-rt-urBCE.js} +1 -1
- package/dist/client/assets/{drawer-BBqyYfPx.js → drawer-CSA_YXe9.js} +1 -1
- package/dist/client/assets/{editor-D97Qyzcp.js → editor-BDmwWZXW.js} +1 -1
- package/dist/client/assets/{editor-classes-szltcTWs.js → editor-classes-BflxT3Em.js} +1 -1
- package/dist/client/assets/{empty-message-DEKaeblB.js → empty-message-CqeY7z6M.js} +1 -1
- package/dist/client/assets/{empty-state-DpGHzg8-.js → empty-state-BBFh_11d.js} +1 -1
- package/dist/client/assets/{empty-state-wwy36dTA.js → empty-state-Wyw1gzAU.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CbqEz4gO.js → experiments-tab-choice-D-e89e6v.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CXg3fi8w.js → extract-connection-data-Dcbv_gVC.js} +1 -1
- package/dist/client/assets/{feature-gate-CveHfcPr.js → feature-gate-Z7tVIxLA.js} +1 -1
- package/dist/client/assets/{feature-paywall-DFIdKSLH.js → feature-paywall-DtbDRafp.js} +1 -1
- package/dist/client/assets/{file-explorer-OW5FLgme.js → file-explorer-CfNNkZY3.js} +1 -1
- package/dist/client/assets/{file-preview-BFUDJsk9.js → file-preview-BIcXPFXf.js} +1 -1
- package/dist/client/assets/{file-share-button-E0fcfsBv.js → file-share-button-CRptWZ51.js} +1 -1
- package/dist/client/assets/{file-type-icon-hPTLm32j.js → file-type-icon-B8w_B6Ur.js} +1 -1
- package/dist/client/assets/{folder-icon-DxENQi9B.js → folder-icon-DLenjLsE.js} +1 -1
- package/dist/client/assets/{form-Bz_uprQc.js → form-fep7EsZM.js} +1 -1
- package/dist/client/assets/{frame-navigation-EV-98oaL.js → frame-navigation-DuQkTvmc.js} +1 -1
- package/dist/client/assets/{general-DmOZe5tS.js → general-CXgCOcj0.js} +1 -1
- package/dist/client/assets/{github-icon-CR8sfoo5.js → github-icon-BmJmIA35.js} +1 -1
- package/dist/client/assets/{held-block-view-DW-NjX-S.js → held-block-view-L4ScXyc0.js} +1 -1
- package/dist/client/assets/{home-C-1mJg3e.js → home-B8uWiLZ8.js} +1 -1
- package/dist/client/assets/{home-overview-DZ5M4FB8.js → home-overview-B4YOi7ww.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-JJSMDis4.js → hosted-reconcile-TIWxrhyM.js} +1 -1
- package/dist/client/assets/{icon-button-DqWSrNSZ.js → icon-button-y7e4XAeL.js} +1 -1
- package/dist/client/assets/{index-CfMRfSbP.js → index-6bDgVJQF.js} +1 -1
- package/dist/client/assets/{index-BdtGqzV_.js → index-Bvx7roR3.js} +1 -1
- package/dist/client/assets/{index-B2FeU0Zw.js → index-C2ij8p-x.js} +1 -1
- package/dist/client/assets/{index-CUuWKDNH.js → index-CHutq_y1.js} +1 -1
- package/dist/client/assets/{index-aeiz-c5N.js → index-CMmFyekL.js} +1 -1
- package/dist/client/assets/{index-CguuJrFu.js → index-CMsvPj3a.js} +1 -1
- package/dist/client/assets/{index-lrnn1LFo.js → index-CNwv7lrZ.js} +1 -1
- package/dist/client/assets/{index-DE9SDic3.js → index-CVAn8xNL.js} +1 -1
- package/dist/client/assets/{index-B0kMZVmC.js → index-CWyPzcrL.js} +3 -3
- package/dist/client/assets/{index-CyzY-fLE.js → index-ChH0sLX7.js} +1 -1
- package/dist/client/assets/{index-Dpqgfi8_.js → index-CmAlUJfb.js} +1 -1
- package/dist/client/assets/{index-D3FgkNbL.js → index-D19_uhum.js} +1 -1
- package/dist/client/assets/{index-7-4YhBZz.js → index-DVZtQRVw.js} +1 -1
- package/dist/client/assets/{index-CeHQIaZQ.js → index-Dj0a2kN-.js} +1 -1
- package/dist/client/assets/{index-BlRhFO8i.js → index-DvJkVFQT.js} +1 -1
- package/dist/client/assets/{index-2LsnM_Ir.js → index-ixp03eW8.js} +1 -1
- package/dist/client/assets/{index-DJq5XMUI.js → index-pvUDeJng.js} +1 -1
- package/dist/client/assets/{index-redirect-Tqe_ugUp.js → index-redirect-D4F9QPKL.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Bpp7Nde9.js → infiniteQueryObserver-OShuiwgE.js} +1 -1
- package/dist/client/assets/{infra-billing-BVZxcUBX.js → infra-billing-CWpsn-Rt.js} +1 -1
- package/dist/client/assets/{input-ClzrEMuy.js → input-BgfY5gpb.js} +3 -3
- package/dist/client/assets/{input-D3CQKUJv.js → input-DTQsyDJB.js} +1 -1
- package/dist/client/assets/{integration-icon-BNTOj8TI.js → integration-icon-C_WzTScv.js} +1 -1
- package/dist/client/assets/{item-actions-DT1aQMAA.js → item-actions-DXH2d6Fe.js} +1 -1
- package/dist/client/assets/{jira-icon-CUdm8f26.js → jira-icon-D56pw7mD.js} +1 -1
- package/dist/client/assets/{label-C8wqUUzx.js → label-Cf_dlQhi.js} +1 -1
- package/dist/client/assets/{layout-BrcEe09L.js → layout-CtDg9WFK.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-5GoRU8S5.js → legacy-admin-welcome-dialog-Bh63ptd4.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Bf1vCfoJ.js → legacy-agents-deep-j_eDHMz_.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Bh63rUhQ.js → legacy-main-redirect-C9oF56pC.js} +1 -1
- package/dist/client/assets/library-Bl-LzTcJ.js +1 -0
- package/dist/client/assets/{library-tab-BVzgC-sN.js → library-tab-B0xPdiji.js} +1 -1
- package/dist/client/assets/{login-DppNfiAq.js → login-XaVtTkis.js} +1 -1
- package/dist/client/assets/{markdown-ChQfidu_.js → markdown-DCvPsl1N.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Cqipo_fr.js → mcp-app-renderer-DBs207iT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C3I9E6hK.js → mcp-oauth-CciCTLp9.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BW9RlFd8.js → mcp-oauth-DOQO_m1D.js} +1 -1
- package/dist/client/assets/{members-BPvSGNqH.js → members-CL8zrENK.js} +1 -1
- package/dist/client/assets/{memory-CQAa3mHm.js → memory-C0eybouW.js} +1 -1
- package/dist/client/assets/{mock-board-BMaXmonr.js → mock-board-iZzwB0Ec.js} +3 -3
- package/dist/client/assets/{monaco-editor-GCVIle1A.js → monaco-editor-BjOCHD6R.js} +1 -1
- package/dist/client/assets/{monitoring-RTFaXjle.js → monitoring-auJHCqSG.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-h4pC7kD6.js → monitoring-stats-row-D-1eXI4W.js} +1 -1
- package/dist/client/assets/{multi-select-sZG2voKq.js → multi-select-C7KaI7rL.js} +1 -1
- package/dist/client/assets/{mustache-BXaNyEgZ.js → mustache-Dm8yyGpD.js} +1 -1
- package/dist/client/assets/{named-rule-step-EI_qv23D.js → named-rule-step-DLS79yYb.js} +1 -1
- package/dist/client/assets/{named-rule-view-DcHqSDt-.js → named-rule-view-Bgyvi0X-.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B8ntXRJU.js → new-project-dialog-uK1Ixj7a.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-of2OYrpv.js → oauth-callback-ai-provider-xMCIdlQV.js} +1 -1
- package/dist/client/assets/{oauth-callback-p3ywWjTz.js → oauth-callback-xd-D45xF.js} +1 -1
- package/dist/client/assets/{oauth-consent-DpXLchYG.js → oauth-consent-BH8-t4eI.js} +1 -1
- package/dist/client/assets/{onboarding-DKqNWZqa.js → onboarding-C46p79BL.js} +1 -1
- package/dist/client/assets/{openai-conversation-CFoe4Qa0.js → openai-conversation-LX4vhoSF.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-B5MpSmQi.js → optimistic-project-sidebar-views-CQDM5Smz.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DEpjybnZ.js → order-monitor-day-CdZki-hX.js} +1 -1
- package/dist/client/assets/{organization-choice-DP7th0jj.js → organization-choice-C2R9F9mc.js} +1 -1
- package/dist/client/assets/{orgs-DPHlMXcd.js → orgs-HpCUPqLm.js} +1 -1
- package/dist/client/assets/{own-accounts-section-DwQLTK3b.js → own-accounts-section-Bj2ZQcZp.js} +1 -1
- package/dist/client/assets/{pair-BXQ1AL58.js → pair-CZjLWCpF.js} +1 -1
- package/dist/client/assets/{parse-sections-CW6TmrTp.js → parse-sections-C-6WrwoU.js} +2 -2
- package/dist/client/assets/{plan-ladder-B0kBPdzm.js → plan-ladder-K1-uMNFn.js} +1 -1
- package/dist/client/assets/{plan-usage-card-hmzG52qo.js → plan-usage-card-ByfsqyV3.js} +1 -1
- package/dist/client/assets/{plan-DzDjgwtt.js → plan-z7jyUflE.js} +1 -1
- package/dist/client/assets/{popover-CLUI-WCq.js → popover-L7EmpGzG.js} +1 -1
- package/dist/client/assets/{post-calendar-DGbwtgLH.js → post-calendar-CrzSJ4wO.js} +1 -1
- package/dist/client/assets/{post-editor-Cb57gZLf.js → post-editor-D6PvmOkx.js} +1 -1
- package/dist/client/assets/{preview-content-YsDfk6M3.js → preview-content-BdQavgtT.js} +1 -1
- package/dist/client/assets/{preview-dialog-Bz6A7RNp.js → preview-dialog-DRt8NRQg.js} +1 -1
- package/dist/client/assets/{preview-panel-4Ms4IncO.js → preview-panel-C7R9FzB7.js} +1 -1
- package/dist/client/assets/{preview-tab-DEm7tkhA.js → preview-tab-DE998jcM.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-CNlHID1U.js → product-picker-dialog-CasJjhcc.js} +1 -1
- package/dist/client/assets/{profile-Bt00wkq5.js → profile-DaVD3rXx.js} +1 -1
- package/dist/client/assets/{project-app-view-BTWft0P3.js → project-app-view-BgNgayQ9.js} +1 -1
- package/dist/client/assets/{project-apps-XmfSXScr.js → project-apps-9RUwCLHJ.js} +1 -1
- package/dist/client/assets/{project-icon-BkeJc-xp.js → project-icon-DCOepmMu.js} +1 -1
- package/dist/client/assets/{project-index-C3tTBxDV.js → project-index-kHTy1V43.js} +1 -1
- package/dist/client/assets/project-reports-SFE87SXv.js +1 -0
- package/dist/client/assets/project-tasks-CZgEt2Vy.js +1 -0
- package/dist/client/assets/{projects-D_tybxDG.js → projects-Cfrtdtxw.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BN5sLjWv.js → projects-empty-state-BOqzKLFM.js} +1 -1
- package/dist/client/assets/{prompts-CBKakZB5.js → prompts-CeNm4O78.js} +1 -1
- package/dist/client/assets/{record-editor-DF0JyxbJ.js → record-editor-BDc47aTz.js} +1 -1
- package/dist/client/assets/{redirect-editor-DCz9NXOZ.js → redirect-editor-B5YbT02W.js} +1 -1
- package/dist/client/assets/reports-CGHHsIAg.js +1 -0
- package/dist/client/assets/{reports-onboarding-DCAmw-bq.js → reports-onboarding-BF3nb40S.js} +1 -1
- package/dist/client/assets/{reports-tab-RfuGKaQ3.js → reports-tab-CGHZrbkt.js} +2 -2
- package/dist/client/assets/{reports-Df9PLvuX.js → reports-yqXMJIxG.js} +1 -1
- package/dist/client/assets/repositories-CXahUI4R.js +1 -0
- package/dist/client/assets/{repositories-B40Xay0b.js → repositories-Dxg6NBM0.js} +1 -1
- package/dist/client/assets/{repository-binding-DqsJn1Sb.js → repository-binding-SYfLLQPp.js} +1 -1
- package/dist/client/assets/{repository-picker-DjmqKxQp.js → repository-picker-CbFl2YYE.js} +1 -1
- package/dist/client/assets/{require-capability-11VEza5N.js → require-capability-BiwpdxIn.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CnCT_9Qk.js → required-auth-layout-DFuLVB75.js} +1 -1
- package/dist/client/assets/{reset-password-DhGtg5RA.js → reset-password-HUKzr46F.js} +1 -1
- package/dist/client/assets/{resizable-DqI16h9r.js → resizable-CmCl4ei7.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-SqRc32_W.js → resolve-tab-icon-BjnMFr70.js} +1 -1
- package/dist/client/assets/{review-settings-DsCgah9j.js → review-settings-CA-nqHST.js} +1 -1
- package/dist/client/assets/{role-color-Bsnv2ruh.js → role-color-boYo8Hxk.js} +1 -1
- package/dist/client/assets/{roles-CfgNfQ5D.js → roles-B5mCkh61.js} +1 -1
- package/dist/client/assets/{route-YS6zinDQ.js → route-B6oRH5TC.js} +1 -1
- package/dist/client/assets/route-BGFrmL98.js +1 -0
- package/dist/client/assets/{route-CF7rRyVo.js → route-_4HjzOd2.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Cm_5q5SF.js → sandbox-lifecycle-context-Dz7l9f2x.js} +1 -1
- package/dist/client/assets/{save-status-DQIuewYI.js → save-status-C-e1JPTQ.js} +1 -1
- package/dist/client/assets/{schema-BtSfTK7H.js → schema-821-vfww.js} +1 -1
- package/dist/client/assets/{schema-CMu2qDHJ.js → schema-CLtIHsoR.js} +1 -1
- package/dist/client/assets/{scroll-area-CNyj4Q1_.js → scroll-area-Jht8lpyk.js} +1 -1
- package/dist/client/assets/{search-input-DfFZA2x_.js → search-input-B93QU4Dy.js} +1 -1
- package/dist/client/assets/{search-toggle-BMP-t51j.js → search-toggle-tlJ3SbIE.js} +1 -1
- package/dist/client/assets/{secret-picker-Cia0fA6k.js → secret-picker-CAALtPpd.js} +1 -1
- package/dist/client/assets/{secrets-Db72b1dr.js → secrets-C80xJsHQ.js} +1 -1
- package/dist/client/assets/{section-array-field-CItEGXFU.js → section-array-field-CBZsskhA.js} +1 -1
- package/dist/client/assets/{sections-BnvGhIDh.js → sections-B_HR2jtY.js} +1 -1
- package/dist/client/assets/{sections-editor-8kOnY41Y.js → sections-editor-EHDr6zm_.js} +1 -1
- package/dist/client/assets/{select-B-QXEyVH.js → select-e2tvI61e.js} +1 -1
- package/dist/client/assets/{select-model-BM57OK8a.js → select-model-M3nxcPkm.js} +1 -1
- package/dist/client/assets/{seo-editor-DUVQDKfJ.js → seo-editor-DEOahzw6.js} +1 -1
- package/dist/client/assets/{separator-CZVEZSKr.js → separator-BI2slX_5.js} +1 -1
- package/dist/client/assets/settings-tab-CU7bs3DW.js +1 -0
- package/dist/client/assets/{sheet-DFpCUkzK.js → sheet-DvkksJq0.js} +1 -1
- package/dist/client/assets/{shell-layout-3tQDWFJU.js → shell-layout-BCfYpYFh.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BT56hEH5.js → site-draft-actions-qfCZ-0Ms.js} +1 -1
- package/dist/client/assets/{site-draft-view-DaVZ51CU.js → site-draft-view-DVJ5_AAD.js} +1 -1
- package/dist/client/assets/site-editor-Cm6TtNkp.js +1 -0
- package/dist/client/assets/{site-editor-toast-DrPEsDU7.js → site-editor-toast-B030LZGc.js} +1 -1
- package/dist/client/assets/{skills-Bh8g9zPx.js → skills-DU3JvR9H.js} +1 -1
- package/dist/client/assets/{slider-D5-tjvxC.js → slider-BqNz0Q_x.js} +1 -1
- package/dist/client/assets/{sortable.esm-CD7Wn3a-.js → sortable.esm-Dgvk_55x.js} +1 -1
- package/dist/client/assets/{sso-CgVuMvqq.js → sso-B36MJWf3.js} +1 -1
- package/dist/client/assets/{suggestion-BjK1ijWQ.js → suggestion-DjTd4iW-.js} +1 -1
- package/dist/client/assets/{super-agent-icon-D1UApnZ8.js → super-agent-icon-BFe-gjNi.js} +1 -1
- package/dist/client/assets/{switch-YFmb691t.js → switch-CVqJR3dk.js} +1 -1
- package/dist/client/assets/{synced-repos-QaqG0EO3.js → synced-repos-CdEL5OLa.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CjjddmUR.js → tab-icon-glyph-we-DMaKk.js} +1 -1
- package/dist/client/assets/{table-EoWRqCf0.js → table-DyAbyTkr.js} +1 -1
- package/dist/client/assets/{tabs-BPfd6mHK.js → tabs-RDxPTimY.js} +1 -1
- package/dist/client/assets/{task-board-CjAeUa_m.js → task-board-CNxFcEEU.js} +1 -1
- package/dist/client/assets/{task-route-Br2Lpz0h.js → task-route-BY8SQPrf.js} +1 -1
- package/dist/client/assets/{task-status-e2bwwrq0.js → task-status-BQ9l-imv.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Dz_bNdVa.js → taskboard-analytics-D-fKcUTx.js} +1 -1
- package/dist/client/assets/tasks-CWBTMAuG.js +1 -0
- package/dist/client/assets/{tasks-B4uBSKBg.js → tasks-H_163psh.js} +1 -1
- package/dist/client/assets/{textarea-BDeCVCG_.js → textarea-D8L9nIm0.js} +1 -1
- package/dist/client/assets/{thread-analytics-DhaZl6TQ.js → thread-analytics-B6wRhPTZ.js} +1 -1
- package/dist/client/assets/{thread-intent-oRL32U-K.js → thread-intent-BoKpDkXm.js} +1 -1
- package/dist/client/assets/{thread-route-Be5LHqPZ.js → thread-route-CjhH3Hve.js} +1 -1
- package/dist/client/assets/{thread-route-tkHuy51W.js → thread-route-D-qV5LOQ.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-De3nDIYw.js → thread-sheet-body-BmxCKr5-.js} +1 -1
- package/dist/client/assets/{time-range-picker-RqJkhR4f.js → time-range-picker-BI1bqfR0.js} +1 -1
- package/dist/client/assets/{toggle-group-Dyg7Y_bS.js → toggle-group-C9F5Qvi7.js} +1 -1
- package/dist/client/assets/{tool-namespace-pd4DYce0.js → tool-namespace-Cwe3IZ6z.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BxflvD5s.js → tool-set-selector-BIHpKu9L.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-T_NjCrYE.js → toolbar-icon-button-C4QFd50C.js} +1 -1
- package/dist/client/assets/{tooltip-BTKQq4Sy.js → tooltip-C-0kDxkl.js} +1 -1
- package/dist/client/assets/{tooltipContext-B3whzr3K.js → tooltipContext-DjUViqx9.js} +1 -1
- package/dist/client/assets/{track-hg2uNpQa.js → track-DWFP8jCm.js} +1 -1
- package/dist/client/assets/{types-DD9MvS2H.js → types-DrwTBhGr.js} +1 -1
- package/dist/client/assets/{url-slug-CAaHyqrT.js → url-slug-xvxPIesW.js} +1 -1
- package/dist/client/assets/{usage-stats-LrxjpMvT.js → usage-stats-BFAUXiEn.js} +1 -1
- package/dist/client/assets/use-ai-providers-Drq9rd-R.js +1 -0
- package/dist/client/assets/{use-apply-named-rule-CQGJ9Q6I.js → use-apply-named-rule-BqLt_ETT.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DRRgH5qP.js +1 -0
- package/dist/client/assets/{use-automations-CRCU5rUU.js → use-automations-DnYKYkJG.js} +1 -1
- package/dist/client/assets/{use-autosave-HJouXCY9.js → use-autosave-BxcdTX-O.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-Ce_mrKLc.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DZgmLot0.js → use-chat-layout-state-CIpS2ixg.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CQn8AjkF.js → use-cms-publish-actions-CFC3bJmB.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DgTOfpzN.js → use-connect-companion-ortXPeJY.js} +1 -1
- package/dist/client/assets/{use-connection-jMnM0Hiq.js → use-connection-CoSLklxV.js} +1 -1
- package/dist/client/assets/{use-content-sync-DvjyB8U-.js → use-content-sync-BvIburw3.js} +1 -1
- package/dist/client/assets/{use-copy-B36-QB7R.js → use-copy-ChDt5LN5.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CVz_yaSt.js → use-date-fns-locale-6TxnLgf0.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BCwvmx_C.js → use-debounced-autosave-DuzJ4VFK.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Be2K3Tgl.js → use-debounced-value-CPC4qMn_.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B5uE_Z9G.js → use-deco-credits-Cct8YuxZ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-144aPqKs.js → use-decopilot-events-DrQkcg1u.js} +1 -1
- package/dist/client/assets/{use-delete-block-BSTpS7wO.js → use-delete-block-CZz_ptBE.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BIASpF84.js → use-delete-connection-CpvyLSMF.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CK9MBH_P.js → use-deployment-admin-DqLzMbx4.js} +1 -1
- package/dist/client/assets/{use-entitlements-D0Sb8QlP.js → use-entitlements-BTXwUzEe.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-D9g7iX8I.js → use-fast-preview-draft-url-BpU8VWnC.js} +1 -1
- package/dist/client/assets/{use-file-configs-Tkt_AHql.js → use-file-configs-DlI3360C.js} +1 -1
- package/dist/client/assets/{use-id-selection-Cpsai2fK.js → use-id-selection-q64VX8pH.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CUpQJBQD.js → use-inbox-feed-BXQf8xik.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C-wdmvlm.js → use-infinite-scroll-DToG_mXG.js} +1 -1
- package/dist/client/assets/{use-join-requests-D6nkHBhc.js → use-join-requests-BkEJmRDc.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DTIYfLGl.js → use-main-panel-tabs-dGK32Zdd.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-C3bL-6Ja.js → use-mcp-auth-status-CMiOMa1q.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cp7itm-S.js → use-mcp-client-BJYqkCGO.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CF2bE4L8.js → use-mcp-prompts-L17hBbZI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DqfH77AW.js → use-mcp-tools-BmsHVJ_e.js} +1 -1
- package/dist/client/assets/{use-mobile-CMr55W3O.js → use-mobile-BZxtzMj7.js} +1 -1
- package/dist/client/assets/{use-move-blocks-vAC3BNbO.js → use-move-blocks-BhC8Ou_b.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bc47TXuM.js → use-navigate-to-agent-v5tv9KVo.js} +1 -1
- package/dist/client/assets/{use-never-published-622FRxP4.js → use-never-published-ftzoQCEb.js} +1 -1
- package/dist/client/assets/{use-org-fs-CnKWtsx6.js → use-org-fs-DwXaWmOv.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CWan9UEi.js → use-org-repo-syncs-C9CNVJm1.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dx6waIv3.js → use-org-sso-BxQ8a0VK.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C44OxrrF.js → use-organization-settings-DNlKPHFq.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BOiBdd4j.js → use-project-native-view-presence-AFSL4S75.js} +1 -1
- package/dist/client/assets/{use-project-scope-BpnU42cL.js → use-project-scope-Fr7Egb1F.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DIc0b7h6.js → use-recent-apps-BEYnfhfp.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-l8XSuOVG.js → use-reports-diagnostic-2pn_94P0.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BTC_EPGc.js → use-sandbox-events-jMtZqiMa.js} +1 -1
- package/dist/client/assets/{use-secrets-CFtisZrp.js → use-secrets-CBdbQcuQ.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C9SoEJn0.js → use-section-preview-base-J9b63pbx.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-V5_gd1MI.js → use-sidebar-collapsed-BfQVGyVT.js} +1 -1
- package/dist/client/assets/{use-tags-Cxhud9Xt.js → use-tags-BEbkxwEv.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CpAa6pHW.js → use-task-board-analytics-CjF5lq2A.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DspRxQsF.js → use-task-board-events-ube60SA0.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CZVWQT5i.js → use-task-board-item-prs-nU2PcUzp.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CzVlUMOO.js → use-task-board-items-Di-1rSrZ.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-ngKSI_fY.js → use-task-board-prompts-BDQ8kbX2.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DiPyoyq1.js → use-task-metadata-DrDAhZTp.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BT9YWT4X.js → use-thread-outputs-Ch3NEbJD.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BTxfGo3P.js → use-view-draft-kind-C5ojzKhH.js} +1 -1
- package/dist/client/assets/{use-voice-input-D66t9nvu.js → use-voice-input-DHuYIV5W.js} +1 -1
- package/dist/client/assets/useInfiniteQuery--BgI5-DV.js +1 -0
- package/dist/client/assets/{useQueries-M4myONOE.js → useQueries-PCnHBPMW.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B_FBCJuI.js +1 -0
- package/dist/client/assets/{users-BRGauFES.js → users-y7gdQpb2.js} +1 -1
- package/dist/client/assets/{utils-CZf0WW3u.js → utils-DZ4Tq9_F.js} +1 -1
- package/dist/client/assets/{variant-calendar-MTIN2TYC.js → variant-calendar-Jezxzb2B.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-yvSV8zF4.js → variant-matcher-override-R9Ip3akP.js} +1 -1
- package/dist/client/assets/{view-header-D_yXL60l.js → view-header-DQwHRwa3.js} +1 -1
- package/dist/client/assets/{virtual-mcp-D2YHeobd.js → virtual-mcp-BMNTjIAW.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DDOa1h_t.js → watch-sse-pool-CR6i9l-S.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +565 -565
- package/package.json +1 -1
- package/dist/client/assets/agent-app-DzDciOTO.js +0 -1
- package/dist/client/assets/agent-deck-BXpuyyHV.js +0 -1
- package/dist/client/assets/agent-experiments-BL62SJmo.js +0 -1
- package/dist/client/assets/agent-library-BFYPXgq1.js +0 -1
- package/dist/client/assets/agent-library-file-DKeb8aqf.js +0 -1
- package/dist/client/assets/agent-overview-D5jCjQVj.js +0 -1
- package/dist/client/assets/agent-settings-ESG9192X.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BQnTQU7w.js +0 -2
- package/dist/client/assets/agent-site-editor-content-qd-na2CD.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BXjMAtak.js +0 -1
- package/dist/client/assets/agent-view-BLgY0MfR.js +0 -1
- package/dist/client/assets/api-keys-vIp11w3k.js +0 -1
- package/dist/client/assets/library-CdyTGa2g.js +0 -1
- package/dist/client/assets/project-reports-CWeaaEZO.js +0 -1
- package/dist/client/assets/project-tasks-jNfpaaGU.js +0 -1
- package/dist/client/assets/reports-CffaUFeU.js +0 -1
- package/dist/client/assets/repositories-B_3cIxMq.js +0 -1
- package/dist/client/assets/route-DJv7Nx6V.js +0 -1
- package/dist/client/assets/settings-tab-B9XpN8jX.js +0 -1
- package/dist/client/assets/site-editor-DhUm8vlF.js +0 -1
- package/dist/client/assets/tasks-CwupKgpp.js +0 -1
- package/dist/client/assets/use-ai-providers-BnCLnm6i.js +0 -1
- package/dist/client/assets/use-ask-in-chat-Bn7rwpYM.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-Dd6JSEDd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BLIxG3uZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BJmR9zYx.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,b as Z,J as X,a as q,r as z,j as r,aq as re,n as O,a4 as oe,h as ie}from"./index-B0kMZVmC.js";import{C as ne}from"./index-DJq5XMUI.js";import{b as se}from"./input-ClzrEMuy.js";import{D as ae,a as le}from"./chat-context-BOjsomdh.js";import{a as me}from"./use-organization-settings-C44OxrrF.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-DZ5M4FB8.js";import{I as de}from"./icon-button-DqWSrNSZ.js";import{a as he,T as V}from"./toggle-group-Dyg7Y_bS.js";import{O as xe}from"./agent-icon-BLhMgLPf.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-BFUDJsk9.js";import{u as W,a as je}from"./use-org-fs-CnKWtsx6.js";import{L as Se}from"./preview-dialog-Bz6A7RNp.js";import{t as _e,r as we,s as De}from"./use-task-board-items-CzVlUMOO.js";import{N as ke}from"./new-project-dialog-B8ntXRJU.js";import{P as ve}from"./projects-empty-state-BN5sLjWv.js";import{b as Ce}from"./project-index-C3tTBxDV.js";import{u as Ne}from"./use-inbox-feed-CUpQJBQD.js";import{b as Be}from"./use-recent-apps-DIc0b7h6.js";import{s as Pe}from"./use-project-scope-BpnU42cL.js";import{a as $e}from"./repository-binding-DqsJn1Sb.js";import"./use-mobile-CMr55W3O.js";import"./use-sidebar-collapsed-V5_gd1MI.js";import"./use-chat-layout-state-DZgmLot0.js";import"./thread-route-tkHuy51W.js";import"./use-view-draft-kind-BTxfGo3P.js";import"./thread-intent-oRL32U-K.js";import"./use-mcp-client-Cp7itm-S.js";import"./auth-U9K5aFal.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DDOa1h_t.js";import"./task-board-CjAeUa_m.js";import"./schema-CMu2qDHJ.js";import"./tooltip-BTKQq4Sy.js";import"./index-2LsnM_Ir.js";import"./toolbar-icon-button-T_NjCrYE.js";import"./shell-layout-3tQDWFJU.js";import"./Globe04-B6PnEpLB.js";import"./UserSquare-dl1oayK_.js";import"./use-deployment-admin-CK9MBH_P.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-DN30jgS9.js";import"./CheckCircle-D_eKfCyb.js";import"./Monitor01-CNesz7Zi.js";import"./Zap-C1Evk-yy.js";import"./Plus-D93afoay.js";import"./Tool01-BR0iTy6Z.js";import"./command-woRMyGZF.js";import"./index-DE9SDic3.js";import"./SearchMd-BMSOzTwj.js";import"./integration-icon-BNTOj8TI.js";import"./LinkBroken01-BrTHjhI6.js";import"./project-icon-BkeJc-xp.js";import"./use-navigate-to-agent-Bc47TXuM.js";import"./use-debounced-value-Be2K3Tgl.js";import"./legacy-admin-welcome-dialog-5GoRU8S5.js";import"./drawer-BBqyYfPx.js";import"./required-auth-layout-CnCT_9Qk.js";import"./use-org-sso-Dx6waIv3.js";import"./sheet-DFpCUkzK.js";import"./resizable-DqI16h9r.js";import"./usage-stats-LrxjpMvT.js";import"./tool-namespace-pd4DYce0.js";import"./form-Bz_uprQc.js";import"./label-C8wqUUzx.js";import"./utils-CVEq3hMx.js";import"./markdown-ChQfidu_.js";import"./use-copy-B36-QB7R.js";import"./use-entitlements-D0Sb8QlP.js";import"./file-type-icon-hPTLm32j.js";import"./chat-draft-CYhwlCHc.js";import"./use-voice-input-D66t9nvu.js";import"./popover-CLUI-WCq.js";import"./ChevronUp-DJytO9gL.js";import"./use-ai-providers-BnCLnm6i.js";import"./index-B2FeU0Zw.js";import"./checkbox-Bv8PV_aY.js";import"./Minus-O-Diijsb.js";import"./select-B-QXEyVH.js";import"./index-BdQq_4o_.js";import"./ArrowLeft-XFXQyKrg.js";import"./ChevronSelectorVertical-B8yNz6I1.js";import"./Key01-CqlMd8Tp.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./AlertCircle-CTbjWy6O.js";import"./ArrowUp-BGhmN6Zx.js";import"./BookOpen01-BPEekJOY.js";import"./Upload01-C4wCuUx0.js";import"./tabs-BPfd6mHK.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-B5uE_Z9G.js";import"./input-D3CQKUJv.js";import"./suggestion-BjK1ijWQ.js";import"./use-mcp-prompts-CF2bE4L8.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DFIdKSLH.js";import"./plan-ladder-B0kBPdzm.js";import"./add-connection-dialog-Z992qi1w.js";import"./collection-search-CwqvBBm4.js";import"./extract-connection-data-CXg3fi8w.js";import"./metadata-D72DunRR.js";import"./connection-BIE1Vidl.js";import"./url-slug-CAaHyqrT.js";import"./connection-card-gYm1H9XQ.js";import"./useInfiniteQuery-BLIxG3uZ.js";import"./infiniteQueryObserver-Bpp7Nde9.js";import"./connection-slug-B8jXAB0J.js";import"./textarea-BDeCVCG_.js";import"./use-connection-jMnM0Hiq.js";import"./schema-BtSfTK7H.js";import"./connection-form-helpers-DA9irt8S.js";import"./Trash01-DcgAZcrm.js";import"./authenticate-and-persist-oauth-DX8Wh7d9.js";import"./mcp-oauth-C3I9E6hK.js";import"./mcp-oauth-BW9RlFd8.js";import"./collection-tabs-81bsUeqm.js";import"./badge-C5mneqKN.js";import"./use-infinite-scroll-C-wdmvlm.js";import"./useSuspenseInfiniteQuery-BJmR9zYx.js";import"./use-task-board-events-DspRxQsF.js";import"./use-decopilot-events-144aPqKs.js";import"./client-icons-CiAKjxAC.js";import"./chart-Cy7LFFBX.js";import"./CategoricalChart-BaZiYgxE.js";import"./index-CguuJrFu.js";import"./tooltipContext-B3whzr3K.js";import"./CartesianChart-CyLm4xQH.js";import"./project-apps-XmfSXScr.js";import"./config-CuCmBQuJ.js";import"./core.esm-Z0qYqKj9.js";import"./task-route-Br2Lpz0h.js";import"./task-key-BCHdFiOO.js";import"./ReferenceLine-DP5lPOEm.js";import"./CreditCard01-D8vcOfs6.js";import"./SwitchHorizontal01-TvywMML0.js";import"./Sun-Dwiv3SBK.js";import"./Play-DLBGORyf.js";import"./ShoppingBag01-BjOh6InC.js";import"./Users01-Bfq6gAwi.js";import"./utils-CZf0WW3u.js";import"./editor-D97Qyzcp.js";import"./preview-content-YsDfk6M3.js";import"./file-share-button-E0fcfsBv.js";import"./repository-picker-DjmqKxQp.js";import"./github-icon-CR8sfoo5.js";const R="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),m=n&&a.find(o=>K(o.path)===n.name);return n&&m?{scope:e,path:Ee(t,n.day),filename:n.name,size:m.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Oe(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=q.useSession(),a=s?.user?.id,n=W(R,Q),m=a??"";let o;e[0]!==m?(o=ee(m),e[0]=m,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const k=W(R,o,h),p=je(R),[d,v]=z.useState(null),[x,u]=z.useState(!1);let f,l,c,b,g,y,j,C,S,_;if(e[4]!==n.data||e[5]!==k.data||e[6]!==i||e[7]!==p||e[8]!==d||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:k.data??[],org:n.data??[],today:Fe(new Date)});if(l=G.find(T=>T.scope===d)??G[0],!l){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,l.ageDays)," ·"," ",He(i.language,l.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:l.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=l.path,y=l.filename,j=l.size,C=p(l.path)}e[4]=n.data,e[5]=k.data,e[6]=i,e[7]=p,e[8]=d,e[9]=t,e[10]=a,e[11]=f,e[12]=l,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=C,e[19]=S,e[20]=_}else f=e[11],l=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],C=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==C?(w={key:g,filename:y,size:j,downloadUrl:C},e[35]=g,e[36]=y,e[37]=j,e[38]=C,e[39]=w):w=e[39];let N;e[40]!==f||e[41]!==w?(N=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=N):N=e[42];let B;e[43]!==N||e[44]!==S?(B=r.jsx("div",{className:S,children:N}),e[43]=N,e[44]=S,e[45]=B):B=e[45];let $;e[46]!==l||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${R}/${l.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=l,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==B||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,B,$]}),e[49]=c,e[50]=B,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Re(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={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 qe(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Ve(e,t,i,s,a){const n=Ue(i)==="overnight",m=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});m.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&m.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return m.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),m.join(" ")}function We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,m=Z(),{org:o}=oe(),{data:D}=q.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const k=$e(h),p=ce(),d=Ne(),{recent:v}=Be(o.slug);let x,u;if(t[1]!==k||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let B;t[6]!==o.id?(B=P=>P.id!==o.id,t[6]=o.id,t[7]=B):B=t[7];const $=Pe(k).filter(B);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Ce($)}t[1]=k,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let l,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==m||t[13]!==p?(c=_e(p,D?.user?.id),l=Ve(m,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=m,t[13]=p,t[14]=l,t[15]=c):(l=t[14],c=t[15]);const b=l;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let C;t[24]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(Oe,{}),t[24]=C):C=t[24];let S;t[25]!==d.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:d.updates,index:f,orgSlug:o.slug}),t[25]=d.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let N;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(N=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,C,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=N):N=t[40],N}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=me("home_task_intake_enabled"),{data:a}=q.useSession(),{granted:n}=re("agents:manage");let m,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Re(c.getHours());const g=Ze[o];m=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=m,e[4]=o,e[5]=D}else m=e[3],o=e[4],D=e[5];const h=D;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[6]=k):k=e[6];let p;e[7]!==n?(p=n&&r.jsx(ke,{source:"org_home_header"}),e[7]=n,e[8]=p):p=e[8];let d;e[9]!==p?(d=r.jsx(O.Actions,{secondary:k,children:p}),e[9]=p,e[10]=d):d=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(le,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(qe,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==m||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(We,{canManageProjects:n,eyebrow:m,greeting:h,slot:o})}),e[14]=n,e[15]=m,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(O.Content,{children:r.jsxs(O.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let l;return e[22]!==d||e[23]!==f?(l=r.jsxs(O,{children:[d,f]}),e[22]=d,e[23]=f,e[24]=l):l=e[24],l}function Ao(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Ao as default};
|
|
1
|
+
import{c as M,b as Z,J as X,a as q,r as z,j as r,aq as re,n as O,a4 as oe,h as ie}from"./index-CWyPzcrL.js";import{C as ne}from"./index-pvUDeJng.js";import{b as se}from"./input-BgfY5gpb.js";import{D as ae,a as le}from"./chat-context--RKzWa6k.js";import{a as me}from"./use-organization-settings-DNlKPHFq.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-B4YOi7ww.js";import{I as de}from"./icon-button-y7e4XAeL.js";import{a as he,T as V}from"./toggle-group-C9F5Qvi7.js";import{O as xe}from"./agent-icon-DvD5kv_K.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-BIcXPFXf.js";import{u as W,a as je}from"./use-org-fs-DwXaWmOv.js";import{L as Se}from"./preview-dialog-DRt8NRQg.js";import{t as _e,r as we,s as De}from"./use-task-board-items-Di-1rSrZ.js";import{N as ke}from"./new-project-dialog-uK1Ixj7a.js";import{P as ve}from"./projects-empty-state-BOqzKLFM.js";import{b as Ce}from"./project-index-kHTy1V43.js";import{u as Ne}from"./use-inbox-feed-BXQf8xik.js";import{b as Be}from"./use-recent-apps-BEYnfhfp.js";import{s as Pe}from"./use-project-scope-Fr7Egb1F.js";import{a as $e}from"./repository-binding-SYfLLQPp.js";import"./use-mobile-BZxtzMj7.js";import"./use-sidebar-collapsed-BfQVGyVT.js";import"./use-chat-layout-state-CIpS2ixg.js";import"./thread-route-D-qV5LOQ.js";import"./use-view-draft-kind-C5ojzKhH.js";import"./thread-intent-BoKpDkXm.js";import"./use-mcp-client-BJYqkCGO.js";import"./auth-ygmhxR7o.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CR6i9l-S.js";import"./task-board-CNxFcEEU.js";import"./schema-CLtIHsoR.js";import"./tooltip-C-0kDxkl.js";import"./index-ixp03eW8.js";import"./toolbar-icon-button-C4QFd50C.js";import"./shell-layout-BCfYpYFh.js";import"./Globe04-KZ-J2ZUi.js";import"./UserSquare-Dv0YcmkC.js";import"./use-deployment-admin-DqLzMbx4.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-CyHahh4m.js";import"./CheckCircle-DAPdRkcW.js";import"./Monitor01-D7QUQToM.js";import"./Zap-Dja9fdMf.js";import"./Plus-CRqz0c82.js";import"./Tool01-D9-ePNaJ.js";import"./command-DQleocFC.js";import"./index-CVAn8xNL.js";import"./SearchMd-CcAFkP0F.js";import"./integration-icon-C_WzTScv.js";import"./LinkBroken01-IVC8feVZ.js";import"./project-icon-DCOepmMu.js";import"./use-navigate-to-agent-v5tv9KVo.js";import"./use-debounced-value-CPC4qMn_.js";import"./legacy-admin-welcome-dialog-Bh63ptd4.js";import"./drawer-CSA_YXe9.js";import"./required-auth-layout-DFuLVB75.js";import"./use-org-sso-BxQ8a0VK.js";import"./sheet-DvkksJq0.js";import"./resizable-CmCl4ei7.js";import"./usage-stats-BFAUXiEn.js";import"./tool-namespace-Cwe3IZ6z.js";import"./form-fep7EsZM.js";import"./label-Cf_dlQhi.js";import"./utils-CVEq3hMx.js";import"./markdown-DCvPsl1N.js";import"./use-copy-ChDt5LN5.js";import"./use-entitlements-BTXwUzEe.js";import"./file-type-icon-B8w_B6Ur.js";import"./chat-draft-BGQDbeF5.js";import"./use-voice-input-DHuYIV5W.js";import"./popover-L7EmpGzG.js";import"./ChevronUp-BaKxA_AU.js";import"./use-ai-providers-Drq9rd-R.js";import"./index-C2ij8p-x.js";import"./checkbox-H8QR9D0_.js";import"./Minus-Dw050KAn.js";import"./select-e2tvI61e.js";import"./index-BdQq_4o_.js";import"./ArrowLeft-5NT3k46C.js";import"./ChevronSelectorVertical-5fTMRN5v.js";import"./Key01-RIzbDsEi.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./AlertCircle-DuMz-jFi.js";import"./ArrowUp-D5JWz7Yq.js";import"./BookOpen01-m1uNXDEc.js";import"./Upload01-BRP1bAMs.js";import"./tabs-RDxPTimY.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-Cct8YuxZ.js";import"./input-DTQsyDJB.js";import"./suggestion-DjTd4iW-.js";import"./use-mcp-prompts-L17hBbZI.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DtbDRafp.js";import"./plan-ladder-K1-uMNFn.js";import"./add-connection-dialog-DJ5sN8e_.js";import"./collection-search-DvsK7hSv.js";import"./extract-connection-data-Dcbv_gVC.js";import"./metadata-D72DunRR.js";import"./connection-CJZ6RQ2g.js";import"./url-slug-xvxPIesW.js";import"./connection-card-qoqR63NP.js";import"./useInfiniteQuery--BgI5-DV.js";import"./infiniteQueryObserver-OShuiwgE.js";import"./connection-slug-CP70si3t.js";import"./textarea-D8L9nIm0.js";import"./use-connection-CoSLklxV.js";import"./schema-821-vfww.js";import"./connection-form-helpers-B9JY5oaH.js";import"./Trash01-BTZDkUzq.js";import"./authenticate-and-persist-oauth-Di92Hz1m.js";import"./mcp-oauth-CciCTLp9.js";import"./mcp-oauth-DOQO_m1D.js";import"./collection-tabs-6iiAOwW9.js";import"./badge-DzB3sqoD.js";import"./use-infinite-scroll-DToG_mXG.js";import"./useSuspenseInfiniteQuery-B_FBCJuI.js";import"./use-task-board-events-ube60SA0.js";import"./use-decopilot-events-DrQkcg1u.js";import"./client-icons-BKCD3ufp.js";import"./chart-B9PgP-e_.js";import"./CategoricalChart-BR_4thmy.js";import"./index-CMsvPj3a.js";import"./tooltipContext-DjUViqx9.js";import"./CartesianChart-D9oScPZv.js";import"./project-apps-9RUwCLHJ.js";import"./config-C2ncmLTD.js";import"./core.esm-DJRh9rDF.js";import"./task-route-BY8SQPrf.js";import"./task-key-BCHdFiOO.js";import"./ReferenceLine-DKoY4fDh.js";import"./CreditCard01-BU3Icpfr.js";import"./SwitchHorizontal01-D3zx9VNf.js";import"./Sun-DRT9bMW5.js";import"./Play-BDSDyO5E.js";import"./ShoppingBag01-CspfAlNO.js";import"./Users01-DKwguy8Z.js";import"./utils-DZ4Tq9_F.js";import"./editor-BDmwWZXW.js";import"./preview-content-BdQavgtT.js";import"./file-share-button-CRptWZ51.js";import"./repository-picker-CbFl2YYE.js";import"./github-icon-BmJmIA35.js";const R="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),m=n&&a.find(o=>K(o.path)===n.name);return n&&m?{scope:e,path:Ee(t,n.day),filename:n.name,size:m.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Oe(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=q.useSession(),a=s?.user?.id,n=W(R,Q),m=a??"";let o;e[0]!==m?(o=ee(m),e[0]=m,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const k=W(R,o,h),p=je(R),[d,v]=z.useState(null),[x,u]=z.useState(!1);let f,l,c,b,g,y,j,C,S,_;if(e[4]!==n.data||e[5]!==k.data||e[6]!==i||e[7]!==p||e[8]!==d||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:k.data??[],org:n.data??[],today:Fe(new Date)});if(l=G.find(T=>T.scope===d)??G[0],!l){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,l.ageDays)," ·"," ",He(i.language,l.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:l.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=l.path,y=l.filename,j=l.size,C=p(l.path)}e[4]=n.data,e[5]=k.data,e[6]=i,e[7]=p,e[8]=d,e[9]=t,e[10]=a,e[11]=f,e[12]=l,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=C,e[19]=S,e[20]=_}else f=e[11],l=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],C=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==C?(w={key:g,filename:y,size:j,downloadUrl:C},e[35]=g,e[36]=y,e[37]=j,e[38]=C,e[39]=w):w=e[39];let N;e[40]!==f||e[41]!==w?(N=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=N):N=e[42];let B;e[43]!==N||e[44]!==S?(B=r.jsx("div",{className:S,children:N}),e[43]=N,e[44]=S,e[45]=B):B=e[45];let $;e[46]!==l||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${R}/${l.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=l,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==B||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,B,$]}),e[49]=c,e[50]=B,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Re(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={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 qe(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Ve(e,t,i,s,a){const n=Ue(i)==="overnight",m=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});m.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&m.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return m.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),m.join(" ")}function We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,m=Z(),{org:o}=oe(),{data:D}=q.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const k=$e(h),p=ce(),d=Ne(),{recent:v}=Be(o.slug);let x,u;if(t[1]!==k||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let B;t[6]!==o.id?(B=P=>P.id!==o.id,t[6]=o.id,t[7]=B):B=t[7];const $=Pe(k).filter(B);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Ce($)}t[1]=k,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let l,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==m||t[13]!==p?(c=_e(p,D?.user?.id),l=Ve(m,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=m,t[13]=p,t[14]=l,t[15]=c):(l=t[14],c=t[15]);const b=l;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let C;t[24]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(Oe,{}),t[24]=C):C=t[24];let S;t[25]!==d.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:d.updates,index:f,orgSlug:o.slug}),t[25]=d.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let N;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(N=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,C,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=N):N=t[40],N}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=me("home_task_intake_enabled"),{data:a}=q.useSession(),{granted:n}=re("agents:manage");let m,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Re(c.getHours());const g=Ze[o];m=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=m,e[4]=o,e[5]=D}else m=e[3],o=e[4],D=e[5];const h=D;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[6]=k):k=e[6];let p;e[7]!==n?(p=n&&r.jsx(ke,{source:"org_home_header"}),e[7]=n,e[8]=p):p=e[8];let d;e[9]!==p?(d=r.jsx(O.Actions,{secondary:k,children:p}),e[9]=p,e[10]=d):d=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(le,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(qe,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==m||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(We,{canManageProjects:n,eyebrow:m,greeting:h,slot:o})}),e[14]=n,e[15]=m,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(O.Content,{children:r.jsxs(O.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let l;return e[22]!==d||e[23]!==f?(l=r.jsxs(O,{children:[d,f]}),e[22]=d,e[23]=f,e[24]=l):l=e[24],l}function Ao(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Ao as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,b as O,a4 as V,m as B,j as n,L as q,E as ee,ak as te,V as se,h as ne,ae as oe,$ as ae,o as re}from"./index-B0kMZVmC.js";import{i as ie}from"./LinkBroken01-BrTHjhI6.js";import{C as le,a as ce,b as me}from"./client-icons-CiAKjxAC.js";import{u as fe,a as de,b as ue,c as xe,d as pe,e as ge,R as F,f as H}from"./use-task-board-items-CzVlUMOO.js";import{i as he}from"./AlertCircle-CTbjWy6O.js";import{i as Q}from"./CheckCircle-D_eKfCyb.js";import{s as ve}from"./Tool01-BR0iTy6Z.js";import{B as je,A as ke}from"./agent-icon-BLhMgLPf.js";import{C as we,a as be,B as ye,b as Ne,c as Se}from"./chart-Cy7LFFBX.js";import{P as Ie}from"./project-icon-BkeJc-xp.js";import{T as G,P as Ce,A as _e}from"./project-apps-XmfSXScr.js";import{a as Te}from"./config-CuCmBQuJ.js";import{t as Re}from"./task-route-Br2Lpz0h.js";import{p as ze}from"./project-index-C3tTBxDV.js";import{R as $e}from"./ReferenceLine-DP5lPOEm.js";import{C as Ee,X as Me,Y as Ae}from"./CartesianChart-CyLm4xQH.js";const De=[{name:"Claude",Icon:le,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ce,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:me,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function xt(a){const e=A.c(22),{dense:r}=a,t=r===void 0?!0:r,l=O(),{org:s}=V();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];const c=t?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let o;e[2]!==c?(o=B("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=o):o=e[3];let d;e[4]!==l?(d=l("home.orgHome.connectPill"),e[4]=l,e[5]=d):d=e[5];let x;e[6]!==d?(x=n.jsx("span",{className:"font-medium text-foreground",children:d}),e[6]=d,e[7]=x):x=e[7];let u;e[8]!==t?(u=De.map(v=>{const{name:j,Icon:R,size:S,bg:I,fg:z}=v;return n.jsx("span",{title:j,className:B("flex items-center justify-center rounded-full",t?"size-5":"size-6"),style:{backgroundColor:I,color:z},children:n.jsx(R,{size:t?S[0]:S[1]})},j)}),e[8]=t,e[9]=u):u=e[9];let m;e[10]!==u?(m=n.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:u}),e[10]=u,e[11]=m):m=e[11];const f=t?"size-3":"size-3.5";let p;e[12]!==f?(p=B(f,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=f,e[13]=p):p=e[13];let g;e[14]!==p?(g=n.jsx(ie,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==o||e[19]!==x||e[20]!==m?(h=n.jsxs(q,{to:"/$org/settings/connect",params:i,onClick:Le,className:o,children:[x,m,g]}),e[16]=g,e[17]=i,e[18]=o,e[19]=x,e[20]=m,e[21]=h):h=e[21],h}function Le(){return ee("connect_clients_opened",{source:"org_home"})}function pt(){const a=A.c(3),{locator:e}=V(),r=te();fe();let t;a[0]!==e||a[1]!==r?(t=de(e,r),a[0]=e,a[1]=r,a[2]=t):t=a[2];const{data:l}=se(t);return l.items}function gt(a){const e=A.c(16),{recent:r,orgSlug:t}=a,l=O();let s,i,c,o;if(e[0]!==t||e[1]!==r||e[2]!==l){o=Symbol.for("react.early_return_sentinel");e:{let x;e[7]!==t||e[8]!==l?(x=m=>{const f={org:t,agentId:m.projectId};if(m.connection){const{label:g,icon:h,id:v,toolName:j}=m.connection;return[{key:`${v}:${j}:${m.projectId}`,label:g,project:m.projectTitle,link:{to:ae.app,params:{...f,connectionId:v,toolName:j}},glyph:n.jsx(ke,{icon:h,name:g,size:"md",className:G})}]}const p=Ce[m.app];return p?[{key:`${m.app}:${m.projectId}`,label:l(p.labelKey),project:m.projectTitle,link:{to:p.to,params:f},glyph:n.jsx("span",{className:B(G,"flex items-center",p.tone),children:n.jsx(p.Icon,{size:24})})}]:[]},e[7]=t,e[8]=l,e[9]=x):x=e[9];const u=r.slice(0,8).flatMap(x);if(u.length===0){o=null;break e}s=_e,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=u.map(Be)}e[0]=t,e[1]=r,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=o}else s=e[3],i=e[4],c=e[5],o=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;let d;return e[12]!==s||e[13]!==i||e[14]!==c?(d=n.jsx(s,{title:i,children:c}),e[12]=s,e[13]=i,e[14]=c,e[15]=d):d=e[15],d}function Be(a){return n.jsxs(q,{to:a.link.to,params:a.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[a.glyph,n.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[n.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:a.label}),n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:a.project})]})]},a.key)}function Oe(a,e){return{to:oe.tasks,params:{org:a,taskKey:Re(a,e)}}}const Ye={answer:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function Ke(a,e){const r=new Set,t=[],l=(s,i)=>{r.has(s.id)||(r.add(s.id),t.push({task:s,kind:i}))};for(const s of a)l(s,ue(s));for(const s of e){if(s.status==="done"||s.status==="archived")continue;const i=Te(s);i==="failed"?l(s,"failed"):i==="running"&&l(s,"running")}return t.sort((s,i)=>J.indexOf(s.kind)-J.indexOf(i.kind))}function Fe(a,e){const r=new Map;for(const o of e){if(o.action!=="mentioned"&&o.action!=="commented")continue;const d=r.get(o.taskBoardItemId);(!d||d.action!=="mentioned"&&o.action==="mentioned")&&r.set(o.taskBoardItemId,o)}const t=new Set(a.map(o=>o.task.id)),l=[...r.values()].filter(o=>!t.has(o.taskBoardItemId)).map(o=>({kind:"mention",task:null,mention:o})),s=a.map(({task:o,kind:d})=>({kind:d,task:o,mention:r.get(o.id)??null})),i=s.filter(o=>o.kind==="answer"),c=s.filter(o=>o.kind!=="answer");return[...i,...l,...c]}const Pe=7;function X(a){const e=A.c(6),{mention:r}=a,t=O();let l;e[0]!==r.actorName||e[1]!==t?(l=r.actorName??t("home.overview.someone"),e[0]=r.actorName,e[1]=t,e[2]=l):l=e[2];const s=l,i=r.actorImage??void 0;let c;return e[3]!==s||e[4]!==i?(c=n.jsx(re,{url:i,fallback:s,shape:"circle",size:"2xs"}),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Ue(a,e){const r=a.actorName??e("home.overview.someone");return e(a.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:r})}function ht(a){const e=A.c(12),{waiting:r,tasks:t,mentions:l,index:s,orgSlug:i}=a,c=O();let o;if(e[0]!==s||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==t||e[5]!==r){const d=Fe(Ke(r,t),l);let x;e[7]!==c?(x=c("home.overview.forYou"),e[7]=c,e[8]=x):x=e[8];const u=d.length>0&&n.jsx("span",{className:"text-muted-foreground tabular-nums",children:d.length});let m;e[9]!==x||e[10]!==u?(m=n.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[x,u]}),e[9]=x,e[10]=u,e[11]=m):m=e[11],o=n.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[m,d.length===0?n.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[n.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:n.jsx(Q,{size:20})}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),n.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):n.jsx("div",{className:"flex flex-col",children:d.slice(0,Pe).map(f=>{const p=f.kind==="mention"?{id:f.mention.taskBoardItemId,keySeq:f.mention.taskKeySeq,title:f.mention.taskTitle}:f.task,g=f.task?ze(f.task,s):null,h=f.kind==="mention"?null:Ye[f.kind],v=f.mention?Ue(f.mention,c):h?c(h.reasonKey):"";return n.jsxs(q,{...Oe(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[n.jsx("span",{className:B("flex size-4 shrink-0 items-center justify-center",h?.tone),children:f.kind==="mention"?n.jsx(X,{mention:f.mention}):f.kind==="running"?n.jsx(ne,{className:"size-3.5"}):h?n.jsx(h.Icon,{size:16}):null}),n.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),n.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[f.kind!=="mention"&&f.mention&&n.jsx(X,{mention:f.mention}),n.jsx("span",{className:"truncate",children:v})]}),g&&n.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[n.jsx(Ie,{icon:g.icon,name:g.title}),n.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=s,e[1]=l,e[2]=i,e[3]=c,e[4]=t,e[5]=r,e[6]=o}else o=e[6];return o}function Qe(a){if(a<=0)return 1;const e=10**Math.floor(Math.log10(a));for(const r of[1,2,2.5,5,10])if(r*e>=a)return r*e;return 10*e}const qe=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function P(a){const e=A.c(52),{series:r,start:t,format:l,label:s,averageLabel:i}=a,c=Qe(Math.max(...r,0));let o;e[0]!==r?(o=r.length===0?0:r.reduce(Ge,0)/r.length,e[0]=r,e[1]=o):o=e[1];const d=o;let x;if(e[2]!==r||e[3]!==t){let E;e[5]!==t?(E=(W,Z)=>({day:qe.format(new Date(t.getTime()+Z*864e5)),value:W}),e[5]=t,e[6]=E):E=e[6],x=r.map(E),e[2]=r,e[3]=t,e[4]=x}else x=e[4];const u=x,m=Math.max(u.length-1,0),f=u[0]?.day;let p;e[7]!==m||e[8]!==u?(p=u[Math.round(m/2)]?.day,e[7]=m,e[8]=u,e[9]=p):p=e[9];const g=u[m]?.day;let h;e[10]!==f||e[11]!==p||e[12]!==g?(h=[f,p,g].filter(He),e[10]=f,e[11]=p,e[12]=g,e[13]=h):h=e[13];const v=h;let j;e[14]!==s?(j={value:{label:s,color:"var(--chart-1)"}},e[14]=s,e[15]=j):j=e[15];const R=j;let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S={top:8,right:0,bottom:0,left:0},e[16]=S):S=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Ee,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=I):I=e[17];let z,$;e[18]===Symbol.for("react.memo_cache_sentinel")?(z={stroke:"var(--border)"},$={fontSize:12,fill:"var(--muted-foreground)"},e[18]=z,e[19]=$):(z=e[18],$=e[19]);let w;e[20]!==v?(w=n.jsx(Me,{dataKey:"day",ticks:v,interval:"preserveStartEnd",tickLine:!1,axisLine:z,tick:$,tickMargin:8}),e[20]=v,e[21]=w):w=e[21];let _;e[22]!==c?(_=[0,c],e[22]=c,e[23]=_):_=e[23];const T=c/2;let b;e[24]!==c||e[25]!==T?(b=[0,T,c],e[24]=c,e[25]=T,e[26]=b):b=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==_||e[31]!==b||e[32]!==y?(N=n.jsx(Ae,{orientation:"right",domain:_,ticks:b,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=_,e[31]=b,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==s?(k=n.jsx(we,{cursor:C,content:n.jsx(be,{indicator:"line",formatter:E=>n.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[n.jsx("span",{className:"text-muted-foreground",children:s}),n.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=s,e[37]=k):k=e[37];let D;e[38]!==d||e[39]!==i||e[40]!==l?(D=d>0&&n.jsx($e,{y:d,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(d)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=d,e[39]=i,e[40]=l,e[41]=D):D=e[41];let Y;e[42]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=Y):Y=e[42];let L;e[43]!==u||e[44]!==w||e[45]!==N||e[46]!==k||e[47]!==D?(L=n.jsxs(Ne,{data:u,margin:S,barCategoryGap:"30%",children:[I,w,N,k,D,Y]}),e[43]=u,e[44]=w,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let K;return e[49]!==R||e[50]!==L?(K=n.jsx(Se,{config:R,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=R,e[50]=L,e[51]=K):K=e[51],K}function He(a){return!!a}function Ge(a,e){return a+e}function U(a){const e=A.c(10),{label:r,value:t,chart:l}=a;let s;e[0]!==r?(s=n.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=s):s=e[1];let i;e[2]!==t?(i=n.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:t}),e[2]=t,e[3]=i):i=e[3];let c;e[4]!==s||e[5]!==i?(c=n.jsxs("div",{className:"flex flex-col gap-2.5",children:[s,i]}),e[4]=s,e[5]=i,e[6]=c):c=e[6];let o;return e[7]!==l||e[8]!==c?(o=n.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=o):o=e[9],o}function vt(a){const e=A.c(58),{tasks:r}=a,t=O();let l,s,i,c,o,d,x,u,m;if(e[0]!==t||e[1]!==r){const v=xe(r,F),j=pe(r,F);i=ge(r);const R=Xe;let S,I;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;I=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),S=new Date(k.getFullYear(),k.getMonth(),1),e[11]=S,e[12]=I}else S=e[11],I=e[12];c=S;const z=Je;let $;e[13]!==t?($=k=>t("home.overview.average",{value:k}),e[13]=t,e[14]=$):$=e[14],s=$,x="grid gap-4 md:grid-cols-3";let w;e[15]!==t?(w=t("home.overview.delivered"),e[15]=t,e[16]=w):w=e[16];const _=String(R(v));let T;e[17]!==t?(T=t("home.overview.delivered"),e[17]=t,e[18]=T):T=e[18];let b;e[19]!==s||e[20]!==v||e[21]!==T?(b=n.jsx(P,{label:T,series:v,start:I,format:z,averageLabel:s}),e[19]=s,e[20]=v,e[21]=T,e[22]=b):b=e[22],e[23]!==b||e[24]!==w||e[25]!==_?(u=n.jsx(U,{label:w,value:_,chart:b}),e[23]=b,e[24]=w,e[25]=_,e[26]=u):u=e[26];let y;e[27]!==t?(y=t("home.overview.agentRuns"),e[27]=t,e[28]=y):y=e[28];const M=String(R(j));let N;e[29]!==t?(N=t("home.overview.agentRuns"),e[29]=t,e[30]=N):N=e[30];let C;e[31]!==s||e[32]!==j||e[33]!==N?(C=n.jsx(P,{label:N,series:j,start:I,format:z,averageLabel:s}),e[31]=s,e[32]=j,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(m=n.jsx(U,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=m):m=e[38],l=U,e[39]!==t?(o=t("home.overview.agentCost"),e[39]=t,e[40]=o):o=e[40],d=H(R(i)),e[0]=t,e[1]=r,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=o,e[7]=d,e[8]=x,e[9]=u,e[10]=m}else l=e[2],s=e[3],i=e[4],c=e[5],o=e[6],d=e[7],x=e[8],u=e[9],m=e[10];let f;e[41]!==t?(f=t("home.overview.agentCost"),e[41]=t,e[42]=f):f=e[42];let p;e[43]!==s||e[44]!==i||e[45]!==c||e[46]!==f?(p=n.jsx(P,{label:f,series:i,start:c,format:H,averageLabel:s}),e[43]=s,e[44]=i,e[45]=c,e[46]=f,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==o||e[50]!==d||e[51]!==p?(g=n.jsx(l,{label:o,value:d,chart:p}),e[48]=l,e[49]=o,e[50]=d,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==x||e[54]!==u||e[55]!==m||e[56]!==g?(h=n.jsxs("div",{className:x,children:[u,m,g]}),e[53]=x,e[54]=u,e[55]=m,e[56]=g,e[57]=h):h=e[57],h}function Je(a){return String(Math.round(a*10)/10)}function Xe(a){return a.reduce(Ve,0)}function Ve(a,e){return a+e}export{xt as C,ht as F,vt as M,gt as R,pt as u};
|
|
1
|
+
import{c as A,b as O,a4 as V,m as B,j as n,L as q,E as ee,ak as te,V as se,h as ne,ae as oe,$ as ae,o as re}from"./index-CWyPzcrL.js";import{i as ie}from"./LinkBroken01-IVC8feVZ.js";import{C as le,a as ce,b as me}from"./client-icons-BKCD3ufp.js";import{u as fe,a as de,b as ue,c as xe,d as pe,e as ge,R as F,f as H}from"./use-task-board-items-Di-1rSrZ.js";import{i as he}from"./AlertCircle-DuMz-jFi.js";import{i as Q}from"./CheckCircle-DAPdRkcW.js";import{s as ve}from"./Tool01-D9-ePNaJ.js";import{B as je,A as ke}from"./agent-icon-DvD5kv_K.js";import{C as we,a as be,B as ye,b as Ne,c as Se}from"./chart-B9PgP-e_.js";import{P as Ie}from"./project-icon-DCOepmMu.js";import{T as G,P as Ce,A as _e}from"./project-apps-9RUwCLHJ.js";import{a as Te}from"./config-C2ncmLTD.js";import{t as Re}from"./task-route-BY8SQPrf.js";import{p as ze}from"./project-index-kHTy1V43.js";import{R as $e}from"./ReferenceLine-DKoY4fDh.js";import{C as Ee,X as Me,Y as Ae}from"./CartesianChart-D9oScPZv.js";const De=[{name:"Claude",Icon:le,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ce,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:me,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function xt(a){const e=A.c(22),{dense:r}=a,t=r===void 0?!0:r,l=O(),{org:s}=V();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];const c=t?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let o;e[2]!==c?(o=B("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=o):o=e[3];let d;e[4]!==l?(d=l("home.orgHome.connectPill"),e[4]=l,e[5]=d):d=e[5];let x;e[6]!==d?(x=n.jsx("span",{className:"font-medium text-foreground",children:d}),e[6]=d,e[7]=x):x=e[7];let u;e[8]!==t?(u=De.map(v=>{const{name:j,Icon:R,size:S,bg:I,fg:z}=v;return n.jsx("span",{title:j,className:B("flex items-center justify-center rounded-full",t?"size-5":"size-6"),style:{backgroundColor:I,color:z},children:n.jsx(R,{size:t?S[0]:S[1]})},j)}),e[8]=t,e[9]=u):u=e[9];let m;e[10]!==u?(m=n.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:u}),e[10]=u,e[11]=m):m=e[11];const f=t?"size-3":"size-3.5";let p;e[12]!==f?(p=B(f,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=f,e[13]=p):p=e[13];let g;e[14]!==p?(g=n.jsx(ie,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==o||e[19]!==x||e[20]!==m?(h=n.jsxs(q,{to:"/$org/settings/connect",params:i,onClick:Le,className:o,children:[x,m,g]}),e[16]=g,e[17]=i,e[18]=o,e[19]=x,e[20]=m,e[21]=h):h=e[21],h}function Le(){return ee("connect_clients_opened",{source:"org_home"})}function pt(){const a=A.c(3),{locator:e}=V(),r=te();fe();let t;a[0]!==e||a[1]!==r?(t=de(e,r),a[0]=e,a[1]=r,a[2]=t):t=a[2];const{data:l}=se(t);return l.items}function gt(a){const e=A.c(16),{recent:r,orgSlug:t}=a,l=O();let s,i,c,o;if(e[0]!==t||e[1]!==r||e[2]!==l){o=Symbol.for("react.early_return_sentinel");e:{let x;e[7]!==t||e[8]!==l?(x=m=>{const f={org:t,agentId:m.projectId};if(m.connection){const{label:g,icon:h,id:v,toolName:j}=m.connection;return[{key:`${v}:${j}:${m.projectId}`,label:g,project:m.projectTitle,link:{to:ae.app,params:{...f,connectionId:v,toolName:j}},glyph:n.jsx(ke,{icon:h,name:g,size:"md",className:G})}]}const p=Ce[m.app];return p?[{key:`${m.app}:${m.projectId}`,label:l(p.labelKey),project:m.projectTitle,link:{to:p.to,params:f},glyph:n.jsx("span",{className:B(G,"flex items-center",p.tone),children:n.jsx(p.Icon,{size:24})})}]:[]},e[7]=t,e[8]=l,e[9]=x):x=e[9];const u=r.slice(0,8).flatMap(x);if(u.length===0){o=null;break e}s=_e,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=u.map(Be)}e[0]=t,e[1]=r,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=o}else s=e[3],i=e[4],c=e[5],o=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;let d;return e[12]!==s||e[13]!==i||e[14]!==c?(d=n.jsx(s,{title:i,children:c}),e[12]=s,e[13]=i,e[14]=c,e[15]=d):d=e[15],d}function Be(a){return n.jsxs(q,{to:a.link.to,params:a.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[a.glyph,n.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[n.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:a.label}),n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:a.project})]})]},a.key)}function Oe(a,e){return{to:oe.tasks,params:{org:a,taskKey:Re(a,e)}}}const Ye={answer:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function Ke(a,e){const r=new Set,t=[],l=(s,i)=>{r.has(s.id)||(r.add(s.id),t.push({task:s,kind:i}))};for(const s of a)l(s,ue(s));for(const s of e){if(s.status==="done"||s.status==="archived")continue;const i=Te(s);i==="failed"?l(s,"failed"):i==="running"&&l(s,"running")}return t.sort((s,i)=>J.indexOf(s.kind)-J.indexOf(i.kind))}function Fe(a,e){const r=new Map;for(const o of e){if(o.action!=="mentioned"&&o.action!=="commented")continue;const d=r.get(o.taskBoardItemId);(!d||d.action!=="mentioned"&&o.action==="mentioned")&&r.set(o.taskBoardItemId,o)}const t=new Set(a.map(o=>o.task.id)),l=[...r.values()].filter(o=>!t.has(o.taskBoardItemId)).map(o=>({kind:"mention",task:null,mention:o})),s=a.map(({task:o,kind:d})=>({kind:d,task:o,mention:r.get(o.id)??null})),i=s.filter(o=>o.kind==="answer"),c=s.filter(o=>o.kind!=="answer");return[...i,...l,...c]}const Pe=7;function X(a){const e=A.c(6),{mention:r}=a,t=O();let l;e[0]!==r.actorName||e[1]!==t?(l=r.actorName??t("home.overview.someone"),e[0]=r.actorName,e[1]=t,e[2]=l):l=e[2];const s=l,i=r.actorImage??void 0;let c;return e[3]!==s||e[4]!==i?(c=n.jsx(re,{url:i,fallback:s,shape:"circle",size:"2xs"}),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Ue(a,e){const r=a.actorName??e("home.overview.someone");return e(a.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:r})}function ht(a){const e=A.c(12),{waiting:r,tasks:t,mentions:l,index:s,orgSlug:i}=a,c=O();let o;if(e[0]!==s||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==t||e[5]!==r){const d=Fe(Ke(r,t),l);let x;e[7]!==c?(x=c("home.overview.forYou"),e[7]=c,e[8]=x):x=e[8];const u=d.length>0&&n.jsx("span",{className:"text-muted-foreground tabular-nums",children:d.length});let m;e[9]!==x||e[10]!==u?(m=n.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[x,u]}),e[9]=x,e[10]=u,e[11]=m):m=e[11],o=n.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[m,d.length===0?n.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[n.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:n.jsx(Q,{size:20})}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),n.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):n.jsx("div",{className:"flex flex-col",children:d.slice(0,Pe).map(f=>{const p=f.kind==="mention"?{id:f.mention.taskBoardItemId,keySeq:f.mention.taskKeySeq,title:f.mention.taskTitle}:f.task,g=f.task?ze(f.task,s):null,h=f.kind==="mention"?null:Ye[f.kind],v=f.mention?Ue(f.mention,c):h?c(h.reasonKey):"";return n.jsxs(q,{...Oe(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[n.jsx("span",{className:B("flex size-4 shrink-0 items-center justify-center",h?.tone),children:f.kind==="mention"?n.jsx(X,{mention:f.mention}):f.kind==="running"?n.jsx(ne,{className:"size-3.5"}):h?n.jsx(h.Icon,{size:16}):null}),n.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),n.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[f.kind!=="mention"&&f.mention&&n.jsx(X,{mention:f.mention}),n.jsx("span",{className:"truncate",children:v})]}),g&&n.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[n.jsx(Ie,{icon:g.icon,name:g.title}),n.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=s,e[1]=l,e[2]=i,e[3]=c,e[4]=t,e[5]=r,e[6]=o}else o=e[6];return o}function Qe(a){if(a<=0)return 1;const e=10**Math.floor(Math.log10(a));for(const r of[1,2,2.5,5,10])if(r*e>=a)return r*e;return 10*e}const qe=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function P(a){const e=A.c(52),{series:r,start:t,format:l,label:s,averageLabel:i}=a,c=Qe(Math.max(...r,0));let o;e[0]!==r?(o=r.length===0?0:r.reduce(Ge,0)/r.length,e[0]=r,e[1]=o):o=e[1];const d=o;let x;if(e[2]!==r||e[3]!==t){let E;e[5]!==t?(E=(W,Z)=>({day:qe.format(new Date(t.getTime()+Z*864e5)),value:W}),e[5]=t,e[6]=E):E=e[6],x=r.map(E),e[2]=r,e[3]=t,e[4]=x}else x=e[4];const u=x,m=Math.max(u.length-1,0),f=u[0]?.day;let p;e[7]!==m||e[8]!==u?(p=u[Math.round(m/2)]?.day,e[7]=m,e[8]=u,e[9]=p):p=e[9];const g=u[m]?.day;let h;e[10]!==f||e[11]!==p||e[12]!==g?(h=[f,p,g].filter(He),e[10]=f,e[11]=p,e[12]=g,e[13]=h):h=e[13];const v=h;let j;e[14]!==s?(j={value:{label:s,color:"var(--chart-1)"}},e[14]=s,e[15]=j):j=e[15];const R=j;let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S={top:8,right:0,bottom:0,left:0},e[16]=S):S=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Ee,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=I):I=e[17];let z,$;e[18]===Symbol.for("react.memo_cache_sentinel")?(z={stroke:"var(--border)"},$={fontSize:12,fill:"var(--muted-foreground)"},e[18]=z,e[19]=$):(z=e[18],$=e[19]);let w;e[20]!==v?(w=n.jsx(Me,{dataKey:"day",ticks:v,interval:"preserveStartEnd",tickLine:!1,axisLine:z,tick:$,tickMargin:8}),e[20]=v,e[21]=w):w=e[21];let _;e[22]!==c?(_=[0,c],e[22]=c,e[23]=_):_=e[23];const T=c/2;let b;e[24]!==c||e[25]!==T?(b=[0,T,c],e[24]=c,e[25]=T,e[26]=b):b=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==_||e[31]!==b||e[32]!==y?(N=n.jsx(Ae,{orientation:"right",domain:_,ticks:b,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=_,e[31]=b,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==s?(k=n.jsx(we,{cursor:C,content:n.jsx(be,{indicator:"line",formatter:E=>n.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[n.jsx("span",{className:"text-muted-foreground",children:s}),n.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=s,e[37]=k):k=e[37];let D;e[38]!==d||e[39]!==i||e[40]!==l?(D=d>0&&n.jsx($e,{y:d,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(d)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=d,e[39]=i,e[40]=l,e[41]=D):D=e[41];let Y;e[42]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=Y):Y=e[42];let L;e[43]!==u||e[44]!==w||e[45]!==N||e[46]!==k||e[47]!==D?(L=n.jsxs(Ne,{data:u,margin:S,barCategoryGap:"30%",children:[I,w,N,k,D,Y]}),e[43]=u,e[44]=w,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let K;return e[49]!==R||e[50]!==L?(K=n.jsx(Se,{config:R,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=R,e[50]=L,e[51]=K):K=e[51],K}function He(a){return!!a}function Ge(a,e){return a+e}function U(a){const e=A.c(10),{label:r,value:t,chart:l}=a;let s;e[0]!==r?(s=n.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=s):s=e[1];let i;e[2]!==t?(i=n.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:t}),e[2]=t,e[3]=i):i=e[3];let c;e[4]!==s||e[5]!==i?(c=n.jsxs("div",{className:"flex flex-col gap-2.5",children:[s,i]}),e[4]=s,e[5]=i,e[6]=c):c=e[6];let o;return e[7]!==l||e[8]!==c?(o=n.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=o):o=e[9],o}function vt(a){const e=A.c(58),{tasks:r}=a,t=O();let l,s,i,c,o,d,x,u,m;if(e[0]!==t||e[1]!==r){const v=xe(r,F),j=pe(r,F);i=ge(r);const R=Xe;let S,I;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;I=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),S=new Date(k.getFullYear(),k.getMonth(),1),e[11]=S,e[12]=I}else S=e[11],I=e[12];c=S;const z=Je;let $;e[13]!==t?($=k=>t("home.overview.average",{value:k}),e[13]=t,e[14]=$):$=e[14],s=$,x="grid gap-4 md:grid-cols-3";let w;e[15]!==t?(w=t("home.overview.delivered"),e[15]=t,e[16]=w):w=e[16];const _=String(R(v));let T;e[17]!==t?(T=t("home.overview.delivered"),e[17]=t,e[18]=T):T=e[18];let b;e[19]!==s||e[20]!==v||e[21]!==T?(b=n.jsx(P,{label:T,series:v,start:I,format:z,averageLabel:s}),e[19]=s,e[20]=v,e[21]=T,e[22]=b):b=e[22],e[23]!==b||e[24]!==w||e[25]!==_?(u=n.jsx(U,{label:w,value:_,chart:b}),e[23]=b,e[24]=w,e[25]=_,e[26]=u):u=e[26];let y;e[27]!==t?(y=t("home.overview.agentRuns"),e[27]=t,e[28]=y):y=e[28];const M=String(R(j));let N;e[29]!==t?(N=t("home.overview.agentRuns"),e[29]=t,e[30]=N):N=e[30];let C;e[31]!==s||e[32]!==j||e[33]!==N?(C=n.jsx(P,{label:N,series:j,start:I,format:z,averageLabel:s}),e[31]=s,e[32]=j,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(m=n.jsx(U,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=m):m=e[38],l=U,e[39]!==t?(o=t("home.overview.agentCost"),e[39]=t,e[40]=o):o=e[40],d=H(R(i)),e[0]=t,e[1]=r,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=o,e[7]=d,e[8]=x,e[9]=u,e[10]=m}else l=e[2],s=e[3],i=e[4],c=e[5],o=e[6],d=e[7],x=e[8],u=e[9],m=e[10];let f;e[41]!==t?(f=t("home.overview.agentCost"),e[41]=t,e[42]=f):f=e[42];let p;e[43]!==s||e[44]!==i||e[45]!==c||e[46]!==f?(p=n.jsx(P,{label:f,series:i,start:c,format:H,averageLabel:s}),e[43]=s,e[44]=i,e[45]=c,e[46]=f,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==o||e[50]!==d||e[51]!==p?(g=n.jsx(l,{label:o,value:d,chart:p}),e[48]=l,e[49]=o,e[50]=d,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==x||e[54]!==u||e[55]!==m||e[56]!==g?(h=n.jsxs("div",{className:x,children:[u,m,g]}),e[53]=x,e[54]=u,e[55]=m,e[56]=g,e[57]=h):h=e[57],h}function Je(a){return String(Math.round(a*10)/10)}function Xe(a){return a.reduce(Ve,0)}function Ve(a,e){return a+e}export{xt as C,ht as F,vt as M,gt as R,pt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fU as A,ex as T,fV as W,c as K,r as Y,fK as N,fL as S,fQ as J,fM as P,K as V,fN as z,fP as G,fO as X,fI as H}from"./index-
|
|
1
|
+
import{fU as A,ex as T,fV as W,c as K,r as Y,fK as N,fL as S,fQ as J,fM as P,K as V,fN as z,fP as G,fO as X,fI as H}from"./index-CWyPzcrL.js";import{aE as Z,aB as x,aM as ee,aC as te,aD as C,aQ as ne,aF as re,aH as se}from"./site-editor-toast-B030LZGc.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-DQr9dBZQ.js";async function ce(e,t){return e.inDraft?e.value===void 0?T:W(e.value):await A(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const R=new WeakMap;function fe(e){let t=R.get(e);return t||(t=n=>e.get(n)??0,R.set(e,t)),t}function De(e){const t=K.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=Y.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return z({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];_(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||H(t[n])!==H(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!_(t))return null;if(F(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=F(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function Q(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function B(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function q(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await P({kind:"theyDeleted",label:Q(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function L(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:Q(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=L(e);if(r)return{[r.pointer]:await P(r.conflict)};const o=G(e,t);return X(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Me(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await A(i,n[o],N(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(V.decofile(e.cacheKey))??{}}async function Se(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],N(e.queryClient,e.cacheKey,l)));const m=B(r,i,l=>O[l]===T);if(m.length>0){try{if(!S())throw new p(!0);r=await q(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await Z(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!S())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),$=r;w(e,D,u=>({value:$.writes[u]}));const M=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=B(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await q(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=L(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const U=h.pointers.length===0?h.merged:J(h,b),j=he(d,U,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return M(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw M(),u}}}}function w(e,t,n){e.queryClient.setQueryData(V.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function _(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,Q as e,ge as f,Ce as g,ce as h,Se as i,pe as j,Me as k,he as l,we as m,de as p,De as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,j as p,B as h}from"./index-
|
|
1
|
+
import{c as f,j as p,B as h}from"./index-CWyPzcrL.js";import{T as j,a as v,c as T}from"./tooltip-C-0kDxkl.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,a4 as A,aS as le,m as R,j as r,R as ae,r as L,b as $,t as z,h as H,w as U,x as V,v as Q,D as W,d as X,E as G,aT as ne,B as Y}from"./index-B0kMZVmC.js";import{n as oe}from"./ArrowUp-BGhmN6Zx.js";import{d as ie,b as Z,f as ce,u as de,T as me,A as ue,n as fe,o as pe,c as xe,p as he,q as ge,t as be,L as je}from"./chat-context-BOjsomdh.js";import{s as ye,g as J,d as ve}from"./tool-namespace-pd4DYce0.js";import{b as F,T as we,a as Ne,c as Ce}from"./tooltip-BTKQq4Sy.js";import{e as Se,b as Te,a as Pe,D as ke}from"./drawer-BBqyYfPx.js";import{C as Ee}from"./collection-search-CwqvBBm4.js";import{u as De}from"./use-mobile-CMr55W3O.js";import{u as Me}from"./use-mcp-client-Cp7itm-S.js";import{u as _e,g as Be}from"./use-mcp-prompts-CF2bE4L8.js";import{h as Ie,P as Le}from"./usage-stats-LrxjpMvT.js";import{T as Re,c as Oe,b as $e,d as Ae,H as Fe}from"./input-ClzrEMuy.js";import{u as ze,a as He,S as Ge,M as q}from"./pair-BXQ1AL58.js";import{u as qe,i as Ke}from"./thread-intent-oRL32U-K.js";import{b as Ue}from"./use-view-draft-kind-BTxfGo3P.js";import{N as Ve}from"./index-B2FeU0Zw.js";import{i as Qe}from"./LinkBroken01-BrTHjhI6.js";import{f as ee}from"./agent-icon-BLhMgLPf.js";import{d as We}from"./use-entitlements-D0Sb8QlP.js";import{u as Xe}from"./use-deco-credits-B5uE_Z9G.js";import{F as Ye}from"./feature-paywall-DFIdKSLH.js";import{i as Ze}from"./AlertCircle-CTbjWy6O.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",Je="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=I.c(46),{item:l,onSelect:a,isLoading:s,isDisabled:n,variant:m}=t,o=m===void 0?"pill":m,{prompt:i}=l;let d;if(e[0]!==i._meta||e[1]!==i.name||e[2]!==i.title){const P=J(i._meta);d=i.title??ve(i.name,P),e[0]=i._meta,e[1]=i.name,e[2]=i.title,e[3]=d}else d=e[3];const c=d,f=i.description||null;if(o==="card"){let P;e[4]!==a||e[5]!==i?(P=()=>a(i),e[4]=a,e[5]=i,e[6]=P):P=e[6];const M=n||s,_=s&&"bg-accent/40",k=(n||s)&&"cursor-not-allowed opacity-50";let E;e[7]!==_||e[8]!==k?(E=R(Je,"hover:bg-accent text-foreground",_,k),e[7]=_,e[8]=k,e[9]=E):E=e[9];let h;e[10]!==c?(h=r.jsx("span",{className:"font-medium truncate capitalize",children:c}),e[10]=c,e[11]=h):h=e[11];let N;e[12]!==s?(N=s&&r.jsx(H,{size:"xs"}),e[12]=s,e[13]=N):N=e[13];let x;e[14]!==h||e[15]!==N?(x=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h,N]}),e[14]=h,e[15]=N,e[16]=x):x=e[16];let D;e[17]!==f?(D=f&&r.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=D):D=e[18];let B;return e[19]!==x||e[20]!==D||e[21]!==P||e[22]!==M||e[23]!==E?(B=r.jsxs("button",{type:"button",onClick:P,disabled:M,className:E,children:[x,D]}),e[19]=x,e[20]=D,e[21]=P,e[22]=M,e[23]=E,e[24]=B):B=e[24],B}let u;e[25]!==a||e[26]!==i?(u=()=>a(i),e[25]=a,e[26]=i,e[27]=u):u=e[27];const g=n||s,p=s&&"bg-muted/50",w=(n||s)&&"cursor-not-allowed opacity-50";let b;e[28]!==p||e[29]!==w?(b=R(te,"hover:bg-accent hover:text-foreground",p,w),e[28]=p,e[29]=w,e[30]=b):b=e[30];let y;e[31]!==c?(y=r.jsx("span",{className:"capitalize",children:c}),e[31]=c,e[32]=y):y=e[32];let C;e[33]!==s?(C=s&&r.jsx(H,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let v;e[35]!==u||e[36]!==g||e[37]!==b||e[38]!==y||e[39]!==C?(v=r.jsx(we,{asChild:!0,children:r.jsxs("button",{type:"button",onClick:u,disabled:g,className:b,children:[y,C]})}),e[35]=u,e[36]=g,e[37]=b,e[38]=y,e[39]=C,e[40]=v):v=e[40];const S=f??c;let j;e[41]!==S?(j=r.jsx(Ne,{side:"top",className:"max-w-xs",children:r.jsx("p",{className:"text-xs",children:S})}),e[41]=S,e[42]=j):j=e[42];let T;return e[43]!==v||e[44]!==j?(T=r.jsxs(Ce,{delayDuration:400,children:[v,j]}),e[43]=v,e[44]=j,e[45]=T):T=e[45],T}function et(t){const e=I.c(61),{items:l,open:a,onOpenChange:s,onSelect:n,loadingPrompt:m}=t,o=$(),[i,d]=L.useState(""),c=!!m;let f;e[0]!==l||e[1]!==i?(f=i.trim()?l.filter(h=>{const N=i.toLowerCase();return h.prompt.name.toLowerCase().includes(N)||(h.prompt.title??"").toLowerCase().includes(N)||(h.prompt.description??"").toLowerCase().includes(N)}):l,e[0]=l,e[1]=i,e[2]=f):f=e[2];const u=f,g=De();let p;e[3]!==u.length||e[4]!==i||e[5]!==o?(p=u.length===0&&r.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:o("chat.iceBreakers.noPromptsMatch",{search:i})}),e[3]=u.length,e[4]=i,e[5]=o,e[6]=p):p=e[6];let w;if(e[7]!==u||e[8]!==c||e[9]!==m?.name||e[10]!==s||e[11]!==n){let h;e[13]!==c||e[14]!==m?.name||e[15]!==s||e[16]!==n?(h=N=>r.jsx(se,{item:N,variant:"card",onSelect:x=>{s(!1),n(x)},isLoading:m?.name===N.prompt.name,isDisabled:c&&m?.name!==N.prompt.name},N.prompt.name),e[13]=c,e[14]=m?.name,e[15]=s,e[16]=n,e[17]=h):h=e[17],w=u.map(h),e[7]=u,e[8]=c,e[9]=m?.name,e[10]=s,e[11]=n,e[12]=w}else w=e[12];let b;e[18]!==p||e[19]!==w?(b=r.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[p,w]})}),e[18]=p,e[19]=w,e[20]=b):b=e[20];const y=b;let C;e[21]!==o?(C=o("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=o,e[22]=C):C=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=h=>{h.key==="Escape"&&d("")},e[23]=v):v=e[23];let S;e[24]!==i||e[25]!==C?(S=r.jsx(Ee,{value:i,onChange:d,placeholder:C,onKeyDown:v}),e[24]=i,e[25]=C,e[26]=S):S=e[26];const j=S;if(g){let h;e[27]!==o?(h=o("chat.iceBreakers.allPromptsTitle"),e[27]=o,e[28]=h):h=e[28];let N;e[29]!==h?(N=r.jsx(Se,{className:"sr-only",children:r.jsx(Te,{children:h})}),e[29]=h,e[30]=N):N=e[30];let x;e[31]!==o?(x=o("chat.iceBreakers.promptsLabel"),e[31]=o,e[32]=x):x=e[32];let D;e[33]!==x?(D=r.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:r.jsx("span",{className:"text-sm font-medium text-foreground",children:x})}),e[33]=x,e[34]=D):D=e[34];let B;e[35]!==y||e[36]!==j||e[37]!==D||e[38]!==N?(B=r.jsxs(Pe,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[N,D,j,y]}),e[35]=y,e[36]=j,e[37]=D,e[38]=N,e[39]=B):B=e[39];let O;return e[40]!==s||e[41]!==a||e[42]!==B?(O=r.jsx(F,{delayDuration:400,children:r.jsx(ke,{open:a,onOpenChange:s,children:B})}),e[40]=s,e[41]=a,e[42]=B,e[43]=O):O=e[43],O}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=r.jsx(U,{className:"sr-only",children:r.jsx(V,{children:T})}),e[46]=T,e[47]=P):P=e[47];let M;e[48]!==o?(M=o("chat.iceBreakers.promptsLabel"),e[48]=o,e[49]=M):M=e[49];let _;e[50]!==M?(_=r.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:r.jsx("span",{className:"text-sm font-medium text-foreground",children:M})}),e[50]=M,e[51]=_):_=e[51];let k;e[52]!==y||e[53]!==j||e[54]!==_||e[55]!==P?(k=r.jsxs(Q,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[P,_,j,y]}),e[52]=y,e[53]=j,e[54]=_,e[55]=P,e[56]=k):k=e[56];let E;return e[57]!==s||e[58]!==a||e[59]!==k?(E=r.jsx(F,{delayDuration:400,children:r.jsx(W,{open:a,onOpenChange:s,children:k})}),e[57]=s,e[58]=a,e[59]=k,e[60]=E):E=e[60],E}function tt(t){const e=I.c(30),{items:l,onSelect:a,loadingPrompt:s,className:n}=t,m=$(),[o,i]=L.useState(!1);if(l.length===0)return null;let d,c,f,u,g;if(e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==a||e[4]!==m){const y=l.slice(0,K),C=l.slice(K),v=!!s;let S;e[10]!==v||e[11]!==s?.name||e[12]!==a?(S=T=>r.jsx(se,{item:T,onSelect:a,isLoading:s?.name===T.prompt.name,isDisabled:v&&s?.name!==T.prompt.name},T.prompt.name),e[10]=v,e[11]=s?.name,e[12]=a,e[13]=S):S=e[13];const j=y.map(S);d=F,g=400,e[14]!==n?(c=R("w-full flex flex-wrap gap-2 justify-center",n),e[14]=n,e[15]=c):c=e[15],f=j,u=C.length>0&&r.jsx("button",{type:"button",disabled:v,onClick:()=>i(!0),className:R(te,"hover:bg-accent hover:text-foreground",v&&"opacity-50 cursor-not-allowed"),children:m("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=n,e[1]=l,e[2]=s,e[3]=a,e[4]=m,e[5]=d,e[6]=c,e[7]=f,e[8]=u,e[9]=g}else d=e[5],c=e[6],f=e[7],u=e[8],g=e[9];let p;e[16]!==c||e[17]!==f||e[18]!==u?(p=r.jsxs("div",{className:c,children:[f,u]}),e[16]=c,e[17]=f,e[18]=u,e[19]=p):p=e[19];let w;e[20]!==l||e[21]!==s||e[22]!==o||e[23]!==a?(w=r.jsx(et,{items:l,open:o,onOpenChange:i,onSelect:a,loadingPrompt:s}),e[20]=l,e[21]=s,e[22]=o,e[23]=a,e[24]=w):w=e[24];let b;return e[25]!==d||e[26]!==g||e[27]!==p||e[28]!==w?(b=r.jsxs(d,{delayDuration:g,children:[p,w]}),e[25]=d,e[26]=g,e[27]=p,e[28]=w,e[29]=b):b=e[29],b}function st(){return null}function rt(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 lt(t){const e=I.c(31),{connectionId:l}=t,a=$(),{sendMessage:s}=Z(),{org:n}=A();let m;e[0]!==l||e[1]!==n.id||e[2]!==n.slug?(m={connectionId:l,orgId:n.id,orgSlug:n.slug},e[0]=l,e[1]=n.id,e[2]=n.slug,e[3]=m):m=e[3];const o=Me(m);let i;e[4]!==o?(i={client:o,staleTime:6e4},e[4]=o,e[5]=i):i=e[5];const{data:d}=_e(i);let c;e[6]!==d?.prompts?(c=d?.prompts??[],e[6]=d?.prompts,e[7]=c):c=e[7];const f=c;let u;e[8]!==f?(u=f.map(at),e[8]=f,e[9]=u):u=e[9];const g=u;let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p={stage:"idle"},e[10]=p):p=e[10];const[w,b]=L.useReducer(rt,p),[y,C]=L.useState(null);let v;e[11]!==o||e[12]!==s||e[13]!==a?(v=async(x,D)=>{if(!o){z.error(a("chat.iceBreakers.mcpClientNotAvailable")),b({type:"RESET"});return}try{const B=await Be(o,x.name,D);b({type:"RESET"});const O={type:"doc",content:[{type:"paragraph",content:[Ie({id:x.name,name:ye(x.name,J(x._meta)),metadata:B.messages,char:"/",kind:"prompt",args:D}),{type:"text",text:" "}]}]};await s(O)}catch(B){console.error("[ice-breakers] Failed to fetch prompt:",B),z.error(a("chat.iceBreakers.failedToLoadPrompt")),b({type:"RESET"})}},e[11]=o,e[12]=s,e[13]=a,e[14]=v):v=e[14];const S=v;let j;e[15]!==S?(j=async x=>{if(x.arguments&&x.arguments.length>0){b({type:"SELECT_PROMPT",prompt:x}),C(x);return}b({type:"START_LOADING",prompt:x}),await S(x)},e[15]=S,e[16]=j):j=e[16];const T=j;let P;e[17]!==y||e[18]!==S?(P=async x=>{y&&(b({type:"START_LOADING",prompt:y,arguments:x}),C(null),await S(y,x))},e[17]=y,e[18]=S,e[19]=P):P=e[19];const M=P;if(g.length===0)return null;const _=w.stage==="loading"?w.prompt:null;let k;e[20]!==T||e[21]!==g||e[22]!==_?(k=r.jsx(tt,{items:g,onSelect:T,loadingPrompt:_}),e[20]=T,e[21]=g,e[22]=_,e[23]=k):k=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{C(null),b({type:"RESET"})},e[24]=E):E=e[24];let h;e[25]!==y||e[26]!==M?(h=r.jsx(Le,{prompt:y,setPrompt:E,onSubmit:M}),e[25]=y,e[26]=M,e[27]=h):h=e[27];let N;return e[28]!==k||e[29]!==h?(N=r.jsxs(r.Fragment,{children:[k,h]}),e[28]=k,e[29]=h,e[30]=N):N=e[30],N}function at(t){return{prompt:t}}function nt(t){const e=I.c(13),{className:l}=t,{selectedVirtualMcp:a}=ie(),{org:s}=A();let n;e[0]!==s.id?(n=le(s.id),e[0]=s.id,e[1]=n):n=e[1];const m=n.id,o=a?.id??m;let i;e[2]!==l?(i=R("w-full @container",l),e[2]=l,e[3]=i):i=e[3];const d=o??"default";let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(st,{}),e[4]=c):c=e[4];let f;e[5]!==o?(f=r.jsx(lt,{connectionId:o}),e[5]=o,e[6]=f):f=e[6];let u;e[7]!==d||e[8]!==f?(u=r.jsx(ae,{fallback:null,children:r.jsx(L.Suspense,{fallback:c,children:f},d)}),e[7]=d,e[8]=f,e[9]=u):u=e[9];let g;return e[10]!==i||e[11]!==u?(g=r.jsx("div",{className:i,children:u}),e[10]=i,e[11]=u,e[12]=g):g=e[12],g}function ot(t){let e=0;for(const l of t)for(const a of l.parts??[]){const s=a;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function it(){const t=I.c(11),{openPanel:e}=Ue(),l=qe(),a=ce()?.messages??[],s=de(),n=s?.taskId??null,m=s?.currentBranch;let o;t[0]!==m?(o=Ke(m),t[0]=m,t[1]=o):o=t[1];const i=o;let d;t[2]!==a?(d=ot(a),t[2]=a,t[3]=d):d=t[3];const c=d,f=L.useRef(null),u=L.useRef(null);let g,p;t[4]!==i||t[5]!==c||t[6]!==l||t[7]!==e||t[8]!==n?(g=()=>{if(!c||!n)return;const w=`${n}:${c}`;u.current!==w&&(u.current=w,l?.refreshThreadMetadata(n)),f.current!==n&&(f.current=n,i||e("site-editor"))},p=[c,n,e,l,i],t[4]=i,t[5]=c,t[6]=l,t[7]=e,t[8]=n,t[9]=g,t[10]=p):(g=t[9],p=t[10]),L.useEffect(g,p)}function re(t){return`deco-credits-empty-dismissed:${t}`}function zt(t){try{return localStorage.getItem(re(t))==="1"}catch{return!1}}function ct(){const t=I.c(56),e=$(),{org:l}=A(),a=We("credits"),s=X(),{decoKeyId:n}=Xe(),[m,o]=L.useState(!0);let i;t[0]!==l.id?(i=()=>{G("credits_empty_state_dismissed",{organization_id:l.id}),o(!1);try{localStorage.setItem(re(l.id),"1")}catch{}},t[0]=l.id,t[1]=i):i=t[1];const d=i;let c,f;if(t[2]!==m||t[3]!==l.id?(c=()=>{m&&G("credits_empty_state_shown",{organization_id:l.id})},f=[m,l.id],t[2]=m,t[3]=l.id,t[4]=c,t[5]=f):(c=t[4],f=t[5]),L.useEffect(c,f),!m)return null;if(!a){let x;t[6]!==e?(x=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=x):x=t[7];let D;t[8]!==x?(D={title:x},t[8]=x,t[9]=D):D=t[9];let B;return t[10]!==d||t[11]!==D?(B=r.jsx(Ye,{feature:"chat",copy:D,onDismiss:d}),t[10]=d,t[11]=D,t[12]=B):B=t[12],B}let u;t[13]!==d?(u=x=>!x&&d(),t[13]=d,t[14]=u):u=t[14];let g;t[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.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]=g):g=t[15];let p;t[16]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:r.jsx(ee,{size:20,className:"text-warning"})}),t[16]=p):p=t[16];let w;t[17]!==e?(w=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=w):w=t[18];let b;t[19]!==w?(b=r.jsx(V,{className:"text-lg font-semibold",children:w}),t[19]=w,t[20]=b):b=t[20];let y;t[21]!==e?(y=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=y):y=t[22];let C;t[23]!==y?(C=r.jsx(ne,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:y}),t[23]=y,t[24]=C):C=t[24];let v;t[25]!==b||t[26]!==C?(v=r.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[g,r.jsxs(U,{className:"relative gap-3",children:[p,r.jsxs("div",{className:"text-center",children:[b,C]})]})]}),t[25]=b,t[26]=C,t[27]=v):v=t[27];let S;t[28]!==n||t[29]!==d?(S=n&&r.jsx("div",{className:"px-6 pb-5",children:r.jsx(Re,{source:"empty_state",onDone:d})}),t[28]=n,t[29]=d,t[30]=S):S=t[30];let j;t[31]!==d||t[32]!==s||t[33]!==l.slug?(j=()=>{s({to:"/$org/settings/ai-providers",params:{org:l.slug}}),d()},t[31]=d,t[32]=s,t[33]=l.slug,t[34]=j):j=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=r.jsx(Qe,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=P):P=t[37];let M;t[38]!==j||t[39]!==T?(M=r.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:j,children:[T,P]}),t[38]=j,t[39]=T,t[40]=M):M=t[40];let _;t[41]!==e?(_=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=_):_=t[42];let k;t[43]!==d||t[44]!==_?(k=r.jsx(Y,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:d,children:_}),t[43]=d,t[44]=_,t[45]=k):k=t[45];let E;t[46]!==M||t[47]!==k?(E=r.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[M,k]}),t[46]=M,t[47]=k,t[48]=E):E=t[48];let h;t[49]!==v||t[50]!==S||t[51]!==E?(h=r.jsxs(Q,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:dt,children:[v,S,E]}),t[49]=v,t[50]=S,t[51]=E,t[52]=h):h=t[52];let N;return t[53]!==h||t[54]!==u?(N=r.jsx(W,{open:!0,onOpenChange:u,children:h}),t[53]=h,t[54]=u,t[55]=N):N=t[55],N}function dt(t){return t.preventDefault()}function mt(t){const e=I.c(6),{balanceDollars:l}=t;let a;e[0]!==l?(a=l.toFixed(2),e[0]=l,e[1]=a):a=e[1];const s=a;let n,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=R("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"),m=r.jsx(ee,{size:13,className:"text-success"}),e[2]=n,e[3]=m):(n=e[2],m=e[3]);let o;return e[4]!==s?(o=r.jsxs("div",{className:n,children:[m,r.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 ut(){const t=I.c(8),{org:e}=A(),l=X();let a;t[0]!==l||t[1]!==e.slug?(a=()=>l({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=l,t[1]=e.slug,t[2]=a):a=t[2];let s,n,m;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=R("inline-flex items-center gap-1.5 px-3 py-1 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"),n=r.jsx(Ze,{size:13,className:"text-warning"}),m=r.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=n,t[5]=m):(s=t[3],n=t[4],m=t[5]);let o;return t[6]!==a?(o=r.jsxs("button",{type:"button",onClick:a,className:s,children:[n,m]}),t[6]=a,t[7]=o):o=t[7],o}function ft(t){const e=I.c(7),{scrollRef:l,sentinelRef:a,hasMoreOlder:s,isFetchingOlder:n,fetchOlderMessages:m}=t;let o,i;e[0]!==m||e[1]!==s||e[2]!==n||e[3]!==l||e[4]!==a?(o=()=>{const d=a.current,c=l.current;if(!d||!c||!s)return;const f=new IntersectionObserver(async u=>{if(!u[0]?.isIntersecting||n||!s)return;const p=c.scrollHeight,w=c.scrollTop;await m(),requestAnimationFrame(()=>{const b=c.scrollHeight;c.scrollTop=w+(b-p)})},{root:c,rootMargin:"200px 0px 0px 0px"});return f.observe(d),()=>f.disconnect()},i=[l,a,s,n,m],e[0]=m,e[1]=s,e[2]=n,e[3]=l,e[4]=a,e[5]=o,e[6]=i):(o=e[5],i=e[6]),L.useEffect(o,i)}function pt(t){const e=I.c(5),{className:l,children:a}=t;let s;e[0]!==l?(s=R("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",l),e[0]=l,e[1]=s):s=e[1];let n;return e[2]!==a||e[3]!==s?(n=r.jsx("div",{className:s,children:a}),e[2]=a,e[3]=s,e[4]=n):n=e[4],n}function xt(t){const e=I.c(5),{children:l,className:a}=t;let s;e[0]!==a?(s=R("flex-1 min-h-0 overflow-y-auto isolate",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==l||e[3]!==s?(n=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=n):n=e[4],n}function ht(t){const e=I.c(2),{children:l}=t;let a;return e[0]!==l?(a=r.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:l}),e[0]=l,e[1]=a):a=e[1],a}function gt(){const t=$(),{messages:e,status:l,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n,isRunInProgress:m}=Z(),{taskId:o}=xe();it();const i=he(o??""),d=ge(i),c=d.size===0?e:e.filter(j=>!d.has(j.id)),f=be(c,l==="submitted"||l==="streaming"||m),u=f.visible,g=ze(u),p=g.at(-1),b=Ae()*Fe+16,y=L.useRef(null),C=L.useRef(null);ft({scrollRef:y,sentinelRef:C,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n});const v=He({initial:!1}),S=j=>{y.current=j,v.scrollRef(j)};return r.jsx(je.Provider,{value:f,children:r.jsx(Ge,{messages:e,children:r.jsxs("div",{className:"relative h-full w-full min-w-0",children:[r.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:r.jsxs("div",{ref:v.contentRef,className:"overflow-x-clip",children:[r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[r.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&r.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),g.slice(0,-1).map((j,T)=>r.jsx(q,{pair:j,isLastPair:!1,status:T===g.length-1?l:void 0},`pair-${j.user?.id??j.assistant?.id}`))]}),p&&r.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:r.jsx(q,{pair:p,isLastPair:!0,status:l},`pair-${p.user?.id??p.assistant?.id}`)})]})}),!v.isAtBottom&&r.jsx(Y,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{v.scrollToBottom()},children:r.jsx(oe,{size:14})})]})})})}function bt(t){const e=I.c(5),{children:l,className:a}=t;let s;e[0]!==a?(s=R("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==l||e[3]!==s?(n=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=n):n=e[4],n}const Ht=Object.assign(pt,{Main:xt,Messages:gt,EmptyState:ht,Footer:bt,Input:$e,Provider:pe,StreamHost:fe,ActiveTaskStreamSource:ue,ThreadlessStreamSource:me,IceBreakers:nt,NoAiProviderEmptyState:Ve,CreditsEmptyState:ct,CreditsEyebrow:mt,NoCreditsEyebrow:ut,CreditsExhaustedBanner:Oe});export{Ht as C,zt as w};
|
|
1
|
+
import{c as I,a4 as A,aS as le,m as R,j as r,R as ae,r as L,b as $,t as z,h as H,w as U,x as V,v as Q,D as W,d as X,E as G,aT as ne,B as Y}from"./index-CWyPzcrL.js";import{n as oe}from"./ArrowUp-D5JWz7Yq.js";import{d as ie,b as Z,f as ce,u as de,T as me,A as ue,n as fe,o as pe,c as xe,p as he,q as ge,t as be,L as je}from"./chat-context--RKzWa6k.js";import{s as ye,g as J,d as ve}from"./tool-namespace-Cwe3IZ6z.js";import{b as F,T as we,a as Ne,c as Ce}from"./tooltip-C-0kDxkl.js";import{e as Se,b as Te,a as Pe,D as ke}from"./drawer-CSA_YXe9.js";import{C as Ee}from"./collection-search-DvsK7hSv.js";import{u as De}from"./use-mobile-BZxtzMj7.js";import{u as Me}from"./use-mcp-client-BJYqkCGO.js";import{u as _e,g as Be}from"./use-mcp-prompts-L17hBbZI.js";import{h as Ie,P as Le}from"./usage-stats-BFAUXiEn.js";import{T as Re,c as Oe,b as $e,d as Ae,H as Fe}from"./input-BgfY5gpb.js";import{u as ze,a as He,S as Ge,M as q}from"./pair-CZjLWCpF.js";import{u as qe,i as Ke}from"./thread-intent-BoKpDkXm.js";import{b as Ue}from"./use-view-draft-kind-C5ojzKhH.js";import{N as Ve}from"./index-C2ij8p-x.js";import{i as Qe}from"./LinkBroken01-IVC8feVZ.js";import{f as ee}from"./agent-icon-DvD5kv_K.js";import{d as We}from"./use-entitlements-BTXwUzEe.js";import{u as Xe}from"./use-deco-credits-Cct8YuxZ.js";import{F as Ye}from"./feature-paywall-DtbDRafp.js";import{i as Ze}from"./AlertCircle-DuMz-jFi.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",Je="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=I.c(46),{item:l,onSelect:a,isLoading:s,isDisabled:n,variant:m}=t,o=m===void 0?"pill":m,{prompt:i}=l;let d;if(e[0]!==i._meta||e[1]!==i.name||e[2]!==i.title){const P=J(i._meta);d=i.title??ve(i.name,P),e[0]=i._meta,e[1]=i.name,e[2]=i.title,e[3]=d}else d=e[3];const c=d,f=i.description||null;if(o==="card"){let P;e[4]!==a||e[5]!==i?(P=()=>a(i),e[4]=a,e[5]=i,e[6]=P):P=e[6];const M=n||s,_=s&&"bg-accent/40",k=(n||s)&&"cursor-not-allowed opacity-50";let E;e[7]!==_||e[8]!==k?(E=R(Je,"hover:bg-accent text-foreground",_,k),e[7]=_,e[8]=k,e[9]=E):E=e[9];let h;e[10]!==c?(h=r.jsx("span",{className:"font-medium truncate capitalize",children:c}),e[10]=c,e[11]=h):h=e[11];let N;e[12]!==s?(N=s&&r.jsx(H,{size:"xs"}),e[12]=s,e[13]=N):N=e[13];let x;e[14]!==h||e[15]!==N?(x=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h,N]}),e[14]=h,e[15]=N,e[16]=x):x=e[16];let D;e[17]!==f?(D=f&&r.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=D):D=e[18];let B;return e[19]!==x||e[20]!==D||e[21]!==P||e[22]!==M||e[23]!==E?(B=r.jsxs("button",{type:"button",onClick:P,disabled:M,className:E,children:[x,D]}),e[19]=x,e[20]=D,e[21]=P,e[22]=M,e[23]=E,e[24]=B):B=e[24],B}let u;e[25]!==a||e[26]!==i?(u=()=>a(i),e[25]=a,e[26]=i,e[27]=u):u=e[27];const g=n||s,p=s&&"bg-muted/50",w=(n||s)&&"cursor-not-allowed opacity-50";let b;e[28]!==p||e[29]!==w?(b=R(te,"hover:bg-accent hover:text-foreground",p,w),e[28]=p,e[29]=w,e[30]=b):b=e[30];let y;e[31]!==c?(y=r.jsx("span",{className:"capitalize",children:c}),e[31]=c,e[32]=y):y=e[32];let C;e[33]!==s?(C=s&&r.jsx(H,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let v;e[35]!==u||e[36]!==g||e[37]!==b||e[38]!==y||e[39]!==C?(v=r.jsx(we,{asChild:!0,children:r.jsxs("button",{type:"button",onClick:u,disabled:g,className:b,children:[y,C]})}),e[35]=u,e[36]=g,e[37]=b,e[38]=y,e[39]=C,e[40]=v):v=e[40];const S=f??c;let j;e[41]!==S?(j=r.jsx(Ne,{side:"top",className:"max-w-xs",children:r.jsx("p",{className:"text-xs",children:S})}),e[41]=S,e[42]=j):j=e[42];let T;return e[43]!==v||e[44]!==j?(T=r.jsxs(Ce,{delayDuration:400,children:[v,j]}),e[43]=v,e[44]=j,e[45]=T):T=e[45],T}function et(t){const e=I.c(61),{items:l,open:a,onOpenChange:s,onSelect:n,loadingPrompt:m}=t,o=$(),[i,d]=L.useState(""),c=!!m;let f;e[0]!==l||e[1]!==i?(f=i.trim()?l.filter(h=>{const N=i.toLowerCase();return h.prompt.name.toLowerCase().includes(N)||(h.prompt.title??"").toLowerCase().includes(N)||(h.prompt.description??"").toLowerCase().includes(N)}):l,e[0]=l,e[1]=i,e[2]=f):f=e[2];const u=f,g=De();let p;e[3]!==u.length||e[4]!==i||e[5]!==o?(p=u.length===0&&r.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:o("chat.iceBreakers.noPromptsMatch",{search:i})}),e[3]=u.length,e[4]=i,e[5]=o,e[6]=p):p=e[6];let w;if(e[7]!==u||e[8]!==c||e[9]!==m?.name||e[10]!==s||e[11]!==n){let h;e[13]!==c||e[14]!==m?.name||e[15]!==s||e[16]!==n?(h=N=>r.jsx(se,{item:N,variant:"card",onSelect:x=>{s(!1),n(x)},isLoading:m?.name===N.prompt.name,isDisabled:c&&m?.name!==N.prompt.name},N.prompt.name),e[13]=c,e[14]=m?.name,e[15]=s,e[16]=n,e[17]=h):h=e[17],w=u.map(h),e[7]=u,e[8]=c,e[9]=m?.name,e[10]=s,e[11]=n,e[12]=w}else w=e[12];let b;e[18]!==p||e[19]!==w?(b=r.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[p,w]})}),e[18]=p,e[19]=w,e[20]=b):b=e[20];const y=b;let C;e[21]!==o?(C=o("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=o,e[22]=C):C=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=h=>{h.key==="Escape"&&d("")},e[23]=v):v=e[23];let S;e[24]!==i||e[25]!==C?(S=r.jsx(Ee,{value:i,onChange:d,placeholder:C,onKeyDown:v}),e[24]=i,e[25]=C,e[26]=S):S=e[26];const j=S;if(g){let h;e[27]!==o?(h=o("chat.iceBreakers.allPromptsTitle"),e[27]=o,e[28]=h):h=e[28];let N;e[29]!==h?(N=r.jsx(Se,{className:"sr-only",children:r.jsx(Te,{children:h})}),e[29]=h,e[30]=N):N=e[30];let x;e[31]!==o?(x=o("chat.iceBreakers.promptsLabel"),e[31]=o,e[32]=x):x=e[32];let D;e[33]!==x?(D=r.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:r.jsx("span",{className:"text-sm font-medium text-foreground",children:x})}),e[33]=x,e[34]=D):D=e[34];let B;e[35]!==y||e[36]!==j||e[37]!==D||e[38]!==N?(B=r.jsxs(Pe,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[N,D,j,y]}),e[35]=y,e[36]=j,e[37]=D,e[38]=N,e[39]=B):B=e[39];let O;return e[40]!==s||e[41]!==a||e[42]!==B?(O=r.jsx(F,{delayDuration:400,children:r.jsx(ke,{open:a,onOpenChange:s,children:B})}),e[40]=s,e[41]=a,e[42]=B,e[43]=O):O=e[43],O}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=r.jsx(U,{className:"sr-only",children:r.jsx(V,{children:T})}),e[46]=T,e[47]=P):P=e[47];let M;e[48]!==o?(M=o("chat.iceBreakers.promptsLabel"),e[48]=o,e[49]=M):M=e[49];let _;e[50]!==M?(_=r.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:r.jsx("span",{className:"text-sm font-medium text-foreground",children:M})}),e[50]=M,e[51]=_):_=e[51];let k;e[52]!==y||e[53]!==j||e[54]!==_||e[55]!==P?(k=r.jsxs(Q,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[P,_,j,y]}),e[52]=y,e[53]=j,e[54]=_,e[55]=P,e[56]=k):k=e[56];let E;return e[57]!==s||e[58]!==a||e[59]!==k?(E=r.jsx(F,{delayDuration:400,children:r.jsx(W,{open:a,onOpenChange:s,children:k})}),e[57]=s,e[58]=a,e[59]=k,e[60]=E):E=e[60],E}function tt(t){const e=I.c(30),{items:l,onSelect:a,loadingPrompt:s,className:n}=t,m=$(),[o,i]=L.useState(!1);if(l.length===0)return null;let d,c,f,u,g;if(e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==a||e[4]!==m){const y=l.slice(0,K),C=l.slice(K),v=!!s;let S;e[10]!==v||e[11]!==s?.name||e[12]!==a?(S=T=>r.jsx(se,{item:T,onSelect:a,isLoading:s?.name===T.prompt.name,isDisabled:v&&s?.name!==T.prompt.name},T.prompt.name),e[10]=v,e[11]=s?.name,e[12]=a,e[13]=S):S=e[13];const j=y.map(S);d=F,g=400,e[14]!==n?(c=R("w-full flex flex-wrap gap-2 justify-center",n),e[14]=n,e[15]=c):c=e[15],f=j,u=C.length>0&&r.jsx("button",{type:"button",disabled:v,onClick:()=>i(!0),className:R(te,"hover:bg-accent hover:text-foreground",v&&"opacity-50 cursor-not-allowed"),children:m("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=n,e[1]=l,e[2]=s,e[3]=a,e[4]=m,e[5]=d,e[6]=c,e[7]=f,e[8]=u,e[9]=g}else d=e[5],c=e[6],f=e[7],u=e[8],g=e[9];let p;e[16]!==c||e[17]!==f||e[18]!==u?(p=r.jsxs("div",{className:c,children:[f,u]}),e[16]=c,e[17]=f,e[18]=u,e[19]=p):p=e[19];let w;e[20]!==l||e[21]!==s||e[22]!==o||e[23]!==a?(w=r.jsx(et,{items:l,open:o,onOpenChange:i,onSelect:a,loadingPrompt:s}),e[20]=l,e[21]=s,e[22]=o,e[23]=a,e[24]=w):w=e[24];let b;return e[25]!==d||e[26]!==g||e[27]!==p||e[28]!==w?(b=r.jsxs(d,{delayDuration:g,children:[p,w]}),e[25]=d,e[26]=g,e[27]=p,e[28]=w,e[29]=b):b=e[29],b}function st(){return null}function rt(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 lt(t){const e=I.c(31),{connectionId:l}=t,a=$(),{sendMessage:s}=Z(),{org:n}=A();let m;e[0]!==l||e[1]!==n.id||e[2]!==n.slug?(m={connectionId:l,orgId:n.id,orgSlug:n.slug},e[0]=l,e[1]=n.id,e[2]=n.slug,e[3]=m):m=e[3];const o=Me(m);let i;e[4]!==o?(i={client:o,staleTime:6e4},e[4]=o,e[5]=i):i=e[5];const{data:d}=_e(i);let c;e[6]!==d?.prompts?(c=d?.prompts??[],e[6]=d?.prompts,e[7]=c):c=e[7];const f=c;let u;e[8]!==f?(u=f.map(at),e[8]=f,e[9]=u):u=e[9];const g=u;let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p={stage:"idle"},e[10]=p):p=e[10];const[w,b]=L.useReducer(rt,p),[y,C]=L.useState(null);let v;e[11]!==o||e[12]!==s||e[13]!==a?(v=async(x,D)=>{if(!o){z.error(a("chat.iceBreakers.mcpClientNotAvailable")),b({type:"RESET"});return}try{const B=await Be(o,x.name,D);b({type:"RESET"});const O={type:"doc",content:[{type:"paragraph",content:[Ie({id:x.name,name:ye(x.name,J(x._meta)),metadata:B.messages,char:"/",kind:"prompt",args:D}),{type:"text",text:" "}]}]};await s(O)}catch(B){console.error("[ice-breakers] Failed to fetch prompt:",B),z.error(a("chat.iceBreakers.failedToLoadPrompt")),b({type:"RESET"})}},e[11]=o,e[12]=s,e[13]=a,e[14]=v):v=e[14];const S=v;let j;e[15]!==S?(j=async x=>{if(x.arguments&&x.arguments.length>0){b({type:"SELECT_PROMPT",prompt:x}),C(x);return}b({type:"START_LOADING",prompt:x}),await S(x)},e[15]=S,e[16]=j):j=e[16];const T=j;let P;e[17]!==y||e[18]!==S?(P=async x=>{y&&(b({type:"START_LOADING",prompt:y,arguments:x}),C(null),await S(y,x))},e[17]=y,e[18]=S,e[19]=P):P=e[19];const M=P;if(g.length===0)return null;const _=w.stage==="loading"?w.prompt:null;let k;e[20]!==T||e[21]!==g||e[22]!==_?(k=r.jsx(tt,{items:g,onSelect:T,loadingPrompt:_}),e[20]=T,e[21]=g,e[22]=_,e[23]=k):k=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{C(null),b({type:"RESET"})},e[24]=E):E=e[24];let h;e[25]!==y||e[26]!==M?(h=r.jsx(Le,{prompt:y,setPrompt:E,onSubmit:M}),e[25]=y,e[26]=M,e[27]=h):h=e[27];let N;return e[28]!==k||e[29]!==h?(N=r.jsxs(r.Fragment,{children:[k,h]}),e[28]=k,e[29]=h,e[30]=N):N=e[30],N}function at(t){return{prompt:t}}function nt(t){const e=I.c(13),{className:l}=t,{selectedVirtualMcp:a}=ie(),{org:s}=A();let n;e[0]!==s.id?(n=le(s.id),e[0]=s.id,e[1]=n):n=e[1];const m=n.id,o=a?.id??m;let i;e[2]!==l?(i=R("w-full @container",l),e[2]=l,e[3]=i):i=e[3];const d=o??"default";let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(st,{}),e[4]=c):c=e[4];let f;e[5]!==o?(f=r.jsx(lt,{connectionId:o}),e[5]=o,e[6]=f):f=e[6];let u;e[7]!==d||e[8]!==f?(u=r.jsx(ae,{fallback:null,children:r.jsx(L.Suspense,{fallback:c,children:f},d)}),e[7]=d,e[8]=f,e[9]=u):u=e[9];let g;return e[10]!==i||e[11]!==u?(g=r.jsx("div",{className:i,children:u}),e[10]=i,e[11]=u,e[12]=g):g=e[12],g}function ot(t){let e=0;for(const l of t)for(const a of l.parts??[]){const s=a;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function it(){const t=I.c(11),{openPanel:e}=Ue(),l=qe(),a=ce()?.messages??[],s=de(),n=s?.taskId??null,m=s?.currentBranch;let o;t[0]!==m?(o=Ke(m),t[0]=m,t[1]=o):o=t[1];const i=o;let d;t[2]!==a?(d=ot(a),t[2]=a,t[3]=d):d=t[3];const c=d,f=L.useRef(null),u=L.useRef(null);let g,p;t[4]!==i||t[5]!==c||t[6]!==l||t[7]!==e||t[8]!==n?(g=()=>{if(!c||!n)return;const w=`${n}:${c}`;u.current!==w&&(u.current=w,l?.refreshThreadMetadata(n)),f.current!==n&&(f.current=n,i||e("site-editor"))},p=[c,n,e,l,i],t[4]=i,t[5]=c,t[6]=l,t[7]=e,t[8]=n,t[9]=g,t[10]=p):(g=t[9],p=t[10]),L.useEffect(g,p)}function re(t){return`deco-credits-empty-dismissed:${t}`}function zt(t){try{return localStorage.getItem(re(t))==="1"}catch{return!1}}function ct(){const t=I.c(56),e=$(),{org:l}=A(),a=We("credits"),s=X(),{decoKeyId:n}=Xe(),[m,o]=L.useState(!0);let i;t[0]!==l.id?(i=()=>{G("credits_empty_state_dismissed",{organization_id:l.id}),o(!1);try{localStorage.setItem(re(l.id),"1")}catch{}},t[0]=l.id,t[1]=i):i=t[1];const d=i;let c,f;if(t[2]!==m||t[3]!==l.id?(c=()=>{m&&G("credits_empty_state_shown",{organization_id:l.id})},f=[m,l.id],t[2]=m,t[3]=l.id,t[4]=c,t[5]=f):(c=t[4],f=t[5]),L.useEffect(c,f),!m)return null;if(!a){let x;t[6]!==e?(x=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=x):x=t[7];let D;t[8]!==x?(D={title:x},t[8]=x,t[9]=D):D=t[9];let B;return t[10]!==d||t[11]!==D?(B=r.jsx(Ye,{feature:"chat",copy:D,onDismiss:d}),t[10]=d,t[11]=D,t[12]=B):B=t[12],B}let u;t[13]!==d?(u=x=>!x&&d(),t[13]=d,t[14]=u):u=t[14];let g;t[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.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]=g):g=t[15];let p;t[16]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:r.jsx(ee,{size:20,className:"text-warning"})}),t[16]=p):p=t[16];let w;t[17]!==e?(w=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=w):w=t[18];let b;t[19]!==w?(b=r.jsx(V,{className:"text-lg font-semibold",children:w}),t[19]=w,t[20]=b):b=t[20];let y;t[21]!==e?(y=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=y):y=t[22];let C;t[23]!==y?(C=r.jsx(ne,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:y}),t[23]=y,t[24]=C):C=t[24];let v;t[25]!==b||t[26]!==C?(v=r.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[g,r.jsxs(U,{className:"relative gap-3",children:[p,r.jsxs("div",{className:"text-center",children:[b,C]})]})]}),t[25]=b,t[26]=C,t[27]=v):v=t[27];let S;t[28]!==n||t[29]!==d?(S=n&&r.jsx("div",{className:"px-6 pb-5",children:r.jsx(Re,{source:"empty_state",onDone:d})}),t[28]=n,t[29]=d,t[30]=S):S=t[30];let j;t[31]!==d||t[32]!==s||t[33]!==l.slug?(j=()=>{s({to:"/$org/settings/ai-providers",params:{org:l.slug}}),d()},t[31]=d,t[32]=s,t[33]=l.slug,t[34]=j):j=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=r.jsx(Qe,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=P):P=t[37];let M;t[38]!==j||t[39]!==T?(M=r.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:j,children:[T,P]}),t[38]=j,t[39]=T,t[40]=M):M=t[40];let _;t[41]!==e?(_=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=_):_=t[42];let k;t[43]!==d||t[44]!==_?(k=r.jsx(Y,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:d,children:_}),t[43]=d,t[44]=_,t[45]=k):k=t[45];let E;t[46]!==M||t[47]!==k?(E=r.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[M,k]}),t[46]=M,t[47]=k,t[48]=E):E=t[48];let h;t[49]!==v||t[50]!==S||t[51]!==E?(h=r.jsxs(Q,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:dt,children:[v,S,E]}),t[49]=v,t[50]=S,t[51]=E,t[52]=h):h=t[52];let N;return t[53]!==h||t[54]!==u?(N=r.jsx(W,{open:!0,onOpenChange:u,children:h}),t[53]=h,t[54]=u,t[55]=N):N=t[55],N}function dt(t){return t.preventDefault()}function mt(t){const e=I.c(6),{balanceDollars:l}=t;let a;e[0]!==l?(a=l.toFixed(2),e[0]=l,e[1]=a):a=e[1];const s=a;let n,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=R("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"),m=r.jsx(ee,{size:13,className:"text-success"}),e[2]=n,e[3]=m):(n=e[2],m=e[3]);let o;return e[4]!==s?(o=r.jsxs("div",{className:n,children:[m,r.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 ut(){const t=I.c(8),{org:e}=A(),l=X();let a;t[0]!==l||t[1]!==e.slug?(a=()=>l({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=l,t[1]=e.slug,t[2]=a):a=t[2];let s,n,m;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=R("inline-flex items-center gap-1.5 px-3 py-1 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"),n=r.jsx(Ze,{size:13,className:"text-warning"}),m=r.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=n,t[5]=m):(s=t[3],n=t[4],m=t[5]);let o;return t[6]!==a?(o=r.jsxs("button",{type:"button",onClick:a,className:s,children:[n,m]}),t[6]=a,t[7]=o):o=t[7],o}function ft(t){const e=I.c(7),{scrollRef:l,sentinelRef:a,hasMoreOlder:s,isFetchingOlder:n,fetchOlderMessages:m}=t;let o,i;e[0]!==m||e[1]!==s||e[2]!==n||e[3]!==l||e[4]!==a?(o=()=>{const d=a.current,c=l.current;if(!d||!c||!s)return;const f=new IntersectionObserver(async u=>{if(!u[0]?.isIntersecting||n||!s)return;const p=c.scrollHeight,w=c.scrollTop;await m(),requestAnimationFrame(()=>{const b=c.scrollHeight;c.scrollTop=w+(b-p)})},{root:c,rootMargin:"200px 0px 0px 0px"});return f.observe(d),()=>f.disconnect()},i=[l,a,s,n,m],e[0]=m,e[1]=s,e[2]=n,e[3]=l,e[4]=a,e[5]=o,e[6]=i):(o=e[5],i=e[6]),L.useEffect(o,i)}function pt(t){const e=I.c(5),{className:l,children:a}=t;let s;e[0]!==l?(s=R("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",l),e[0]=l,e[1]=s):s=e[1];let n;return e[2]!==a||e[3]!==s?(n=r.jsx("div",{className:s,children:a}),e[2]=a,e[3]=s,e[4]=n):n=e[4],n}function xt(t){const e=I.c(5),{children:l,className:a}=t;let s;e[0]!==a?(s=R("flex-1 min-h-0 overflow-y-auto isolate",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==l||e[3]!==s?(n=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=n):n=e[4],n}function ht(t){const e=I.c(2),{children:l}=t;let a;return e[0]!==l?(a=r.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:l}),e[0]=l,e[1]=a):a=e[1],a}function gt(){const t=$(),{messages:e,status:l,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n,isRunInProgress:m}=Z(),{taskId:o}=xe();it();const i=he(o??""),d=ge(i),c=d.size===0?e:e.filter(j=>!d.has(j.id)),f=be(c,l==="submitted"||l==="streaming"||m),u=f.visible,g=ze(u),p=g.at(-1),b=Ae()*Fe+16,y=L.useRef(null),C=L.useRef(null);ft({scrollRef:y,sentinelRef:C,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n});const v=He({initial:!1}),S=j=>{y.current=j,v.scrollRef(j)};return r.jsx(je.Provider,{value:f,children:r.jsx(Ge,{messages:e,children:r.jsxs("div",{className:"relative h-full w-full min-w-0",children:[r.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:r.jsxs("div",{ref:v.contentRef,className:"overflow-x-clip",children:[r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[r.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&r.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),g.slice(0,-1).map((j,T)=>r.jsx(q,{pair:j,isLastPair:!1,status:T===g.length-1?l:void 0},`pair-${j.user?.id??j.assistant?.id}`))]}),p&&r.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:r.jsx(q,{pair:p,isLastPair:!0,status:l},`pair-${p.user?.id??p.assistant?.id}`)})]})}),!v.isAtBottom&&r.jsx(Y,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{v.scrollToBottom()},children:r.jsx(oe,{size:14})})]})})})}function bt(t){const e=I.c(5),{children:l,className:a}=t;let s;e[0]!==a?(s=R("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==l||e[3]!==s?(n=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=n):n=e[4],n}const Ht=Object.assign(pt,{Main:xt,Messages:gt,EmptyState:ht,Footer:bt,Input:$e,Provider:pe,StreamHost:fe,ActiveTaskStreamSource:ue,ThreadlessStreamSource:me,IceBreakers:nt,NoAiProviderEmptyState:Ve,CreditsEmptyState:ct,CreditsEyebrow:mt,NoCreditsEyebrow:ut,CreditsExhaustedBanner:Oe});export{Ht as C,zt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as H,t as U,a9 as S,C as Z,aa as Q,f as R,ab as X,ac as J,o as z}from"./usage-stats-LrxjpMvT.js";import{gx as M,hj as C,gw as P,hk as x,hl as L,hm as V,hn as K,ho as _,gz as A,eQ as N,r as p,c7 as $}from"./index-B0kMZVmC.js";import{C as k}from"./index-CyzY-fLE.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Q(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return X(t,{textSerializers:J(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
1
|
+
import{A as H,t as U,a9 as S,C as Z,aa as Q,f as R,ab as X,ac as J,o as z}from"./usage-stats-BFAUXiEn.js";import{gx as M,hj as C,gw as P,hk as x,hl as L,hm as V,hn as K,ho as _,gz as A,eQ as N,r as p,c7 as $}from"./index-CWyPzcrL.js";import{C as k}from"./index-ChH0sLX7.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Q(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return X(t,{textSerializers:J(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|