decocms 4.494.0 → 4.495.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/{ActiveShapeUtils-C-buMql8.js → ActiveShapeUtils-h1pqy1tf.js} +1 -1
- package/dist/client/assets/{AlertCircle-xh90NARB.js → AlertCircle-CIcaLchq.js} +1 -1
- package/dist/client/assets/{AreaChart-hhJtx5W4.js → AreaChart-CZ-42bmk.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Xffg7q8p.js → ArrowLeft-DfXjYrQi.js} +1 -1
- package/dist/client/assets/{ArrowUp-4iK8zoCx.js → ArrowUp-B8mx1ol5.js} +1 -1
- package/dist/client/assets/{BarChart-CvyDfHpd.js → BarChart-CEMnTLeo.js} +1 -1
- package/dist/client/assets/{Building02-DAEF4UrO.js → Building02-BPQ9fMgU.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CMQWnNBW.js → CategoricalChart-M1P6vf9W.js} +1 -1
- package/dist/client/assets/{CheckCircle-DUpC1qQ4.js → CheckCircle-ChTvVqPO.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DCkH1mIQ.js → ChevronSelectorVertical-zoEWZ9sC.js} +1 -1
- package/dist/client/assets/{ChevronUp-D_Wjh1Pp.js → ChevronUp-DckC0O5o.js} +1 -1
- package/dist/client/assets/{Copy01-BdyOQaoT.js → Copy01-Corfj4_5.js} +1 -1
- package/dist/client/assets/{CreditCard01-YN58MJQp.js → CreditCard01-DlMgd9ia.js} +1 -1
- package/dist/client/assets/{DotsVertical-C0q218c1.js → DotsVertical-uTiOtqeH.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-thUyR0rx.js → ErrorBarContext-B19L0BAB.js} +1 -1
- package/dist/client/assets/{Globe04-brrhloqP.js → Globe04-CL3-GeAh.js} +1 -1
- package/dist/client/assets/{Image01-Drnu_oTX.js → Image01-gtPlqhVq.js} +1 -1
- package/dist/client/assets/{Key01-DXKey19o.js → Key01-BQnNEHGn.js} +1 -1
- package/dist/client/assets/{Link01-DAwi9mlM.js → Link01-BSAGxXho.js} +1 -1
- package/dist/client/assets/{LinkBroken01-wTJMvAdz.js → LinkBroken01-t0qEt8Lb.js} +1 -1
- package/dist/client/assets/{Monitor01-Bm_bTKyL.js → Monitor01-BIhKjgAf.js} +1 -1
- package/dist/client/assets/{Play-CqIDE5zC.js → Play-Ba5tQ65L.js} +1 -1
- package/dist/client/assets/{Plus-j4aDTi8e.js → Plus-4vFTW30B.js} +1 -1
- package/dist/client/assets/{SearchMd-DhQxjm00.js → SearchMd-DqzvTdT2.js} +1 -1
- package/dist/client/assets/{Sector-Dhm7L79o.js → Sector-CdUfaAFg.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BJ4cJNkc.js → ShoppingBag01-C6V1h_2Z.js} +1 -1
- package/dist/client/assets/{Sun-D0UkgT29.js → Sun-DlWI3pkK.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-6WEEE86B.js → SwitchHorizontal01-DN4m9K18.js} +1 -1
- package/dist/client/assets/{Tool01-DG06N0su.js → Tool01-BJxIe84T.js} +1 -1
- package/dist/client/assets/{Trash01-C9lhbJs7.js → Trash01-Dvqfc9le.js} +1 -1
- package/dist/client/assets/{Upload01-Bt337Shk.js → Upload01-BxWCGLDw.js} +1 -1
- package/dist/client/assets/{User01-DXN8J2dA.js → User01-Dh_l7uq-.js} +1 -1
- package/dist/client/assets/{UserSquare-B7AJhMXA.js → UserSquare-B4EnRc3E.js} +1 -1
- package/dist/client/assets/{Users01-CHS_3A2d.js → Users01-CIo5W1LA.js} +1 -1
- package/dist/client/assets/{XAxis-M9-_1D7_.js → XAxis-B_TwRkrI.js} +1 -1
- package/dist/client/assets/{XClose-pteQuwAH.js → XClose-D59UZ-3l.js} +1 -1
- package/dist/client/assets/{ZoomOut-D4nHzX79.js → ZoomOut-BwebNTOr.js} +1 -1
- package/dist/client/assets/{access-gate-CNFrC5-Q.js → access-gate-gXgyWrzR.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BXB3P-4X.js → add-connection-dialog-BWXm_ufM.js} +1 -1
- package/dist/client/assets/{agent-analytics-C1qxm1L0.js → agent-analytics-C-L1VtQz.js} +1 -1
- package/dist/client/assets/agent-app-DdLgacxL.js +1 -0
- package/dist/client/assets/{agent-assets-Doo6qn_B.js → agent-assets-C7fUNq2M.js} +1 -1
- package/dist/client/assets/{agent-automation-BhXRsqWt.js → agent-automation-Dpa5yDG5.js} +1 -1
- package/dist/client/assets/{agent-automations-B3GOPyc3.js → agent-automations-BP9tDs5d.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Cj-TiW7a.js → agent-connect-sources-DpyMUK1-.js} +1 -1
- package/dist/client/assets/agent-deck-BYEYsFu3.js +1 -0
- package/dist/client/assets/{agent-e2e-CyiK0Nn8.js → agent-e2e-C-WfEm6u.js} +1 -1
- package/dist/client/assets/{agent-experiments-Dero6WeN.js → agent-experiments-eTfavUjm.js} +1 -1
- package/dist/client/assets/{agent-file-Cao_W_me.js → agent-file-DQ-Axvcs.js} +1 -1
- package/dist/client/assets/{agent-hosting-5VKfgGQd.js → agent-hosting-DnmQYnCT.js} +1 -1
- package/dist/client/assets/{agent-icon-CAaO4ypa.js → agent-icon-B6BGlN8Z.js} +1 -1
- package/dist/client/assets/agent-library-587LhhOs.js +1 -0
- package/dist/client/assets/agent-library-file-DYqQlnsg.js +1 -0
- package/dist/client/assets/{agent-monitor-UjHCObOn.js → agent-monitor-DVgP3QNe.js} +1 -1
- package/dist/client/assets/{agent-overview-CARG35t2.js → agent-overview-d4b3y6_i.js} +1 -1
- package/dist/client/assets/agent-settings-Df-14Bch.js +1 -0
- package/dist/client/assets/{agent-site-editor-CXDMfxCU.js → agent-site-editor-BwrjcFt1.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-BS_mQuFD.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-BAjBb750.js → agent-site-editor-content-2sl9AU9q.js} +3 -3
- package/dist/client/assets/agent-site-editor-preview-CXCXzBai.js +518 -0
- package/dist/client/assets/agent-view-BhxMS98G.js +1 -0
- package/dist/client/assets/{agent-view-guard-1XKy1jVJ.js → agent-view-guard-CGvorA84.js} +1 -1
- package/dist/client/assets/{agents-list-BKQ9GkqQ.js → agents-list-DoqG_xIw.js} +1 -1
- package/dist/client/assets/{ai-providers-DQvwi-LI.js → ai-providers-D4PaL9-3.js} +1 -1
- package/dist/client/assets/{alert-dialog-DhiFzLmM.js → alert-dialog-G7y5OQF6.js} +1 -1
- package/dist/client/assets/{alert-DEeNrGpM.js → alert-sNWraY0q.js} +1 -1
- package/dist/client/assets/{analytics-sections-BW-0HIcE.js → analytics-sections-BjxK3DaP.js} +1 -1
- package/dist/client/assets/{api-keys-B6xfTHb9.js → api-keys-DWxZSE3m.js} +1 -1
- package/dist/client/assets/api-keys-Dd4XvmOL.js +1 -0
- package/dist/client/assets/app-editor-D525MffA.js +1 -0
- package/dist/client/assets/{asset-utils-RYK8HJ3w.js → asset-utils-C3b9KJ52.js} +1 -1
- package/dist/client/assets/{auth-CFVKU9If.js → auth-CK5qaIjH.js} +1 -1
- package/dist/client/assets/{auth-catchall-UV-w9rG5.js → auth-catchall-CBQrYLJa.js} +1 -1
- package/dist/client/assets/{auth-entry-DI7FcrqT.js → auth-entry-5fZpsKca.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CuIKSb1N.js → auth-split-layout-_2GxCjhr.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-C4TrLSCm.js → authenticate-and-persist-oauth-BqWfXARS.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dv9cy6ec.js → automation-list-row-DkLqeS2t.js} +1 -1
- package/dist/client/assets/{automation-runs-qbW12Sit.js → automation-runs-KOVQ8ghD.js} +1 -1
- package/dist/client/assets/{automations-CVxx9AvI.js → automations-GiLoIizc.js} +1 -1
- package/dist/client/assets/{autosend-DqvDhR1V.js → autosend-CACWNbxC.js} +1 -1
- package/dist/client/assets/{avatar-DC1Cmzej.js → avatar-CFdg60BT.js} +1 -1
- package/dist/client/assets/{badge-C85ocGTA.js → badge-2H20v0nO.js} +1 -1
- package/dist/client/assets/{block-document-DQft1xyS.js → block-document-BJBufMup.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-6ZMkVqw_.js → blocks-preview-workspace-context-45OWUgi1.js} +1 -1
- package/dist/client/assets/{blog-schema-vO6IoJBM.js → blog-schema-C3v2xT_H.js} +1 -1
- package/dist/client/assets/{board-analytics-DatP--tQ.js → board-analytics-DXWCCmjm.js} +1 -1
- package/dist/client/assets/{buckets-Cczodic8.js → buckets-C4_hXb9P.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BQEdJK2P.js → build-improve-prompt-doc-D_-kPQOz.js} +1 -1
- package/dist/client/assets/{calendar-BUi8IxeZ.js → calendar-BYqJ2k4j.js} +1 -1
- package/dist/client/assets/{capability-load-error-rL1NTtJa.js → capability-load-error-D-0oMipl.js} +1 -1
- package/dist/client/assets/{category-editor-B_XTuKuu.js → category-editor-Bq4nzviJ.js} +1 -1
- package/dist/client/assets/{chart-CjiGuzpk.js → chart-BPIcOkoH.js} +1 -1
- package/dist/client/assets/{chat-context-oLIKqlGE.js → chat-context-Dh5tO9W1.js} +1 -1
- package/dist/client/assets/{chat-draft-Cgc2XQsH.js → chat-draft-Bck3d8Ok.js} +1 -1
- package/dist/client/assets/{checkbox-DZ-_DOro.js → checkbox-BRl2nVIa.js} +1 -1
- package/dist/client/assets/{choose-editor-CryRu8AV.js → choose-editor-BOSYr3Y3.js} +1 -1
- package/dist/client/assets/{claim-phase-copy--pyKC4gk.js → claim-phase-copy-De8hliCj.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DmgEVi8V.js → cli-auth-success-BHU-QcJX.js} +1 -1
- package/dist/client/assets/{client-icons-Dr3qA-pT.js → client-icons-9yzx81xM.js} +1 -1
- package/dist/client/assets/{collapsible-D6DR3zQ4.js → collapsible-CQEd_xSV.js} +1 -1
- package/dist/client/assets/{collection-detail-CDuDEGYz.js → collection-detail-DRnSuti2.js} +1 -1
- package/dist/client/assets/{collection-display-button-DoIjEbJ3.js → collection-display-button-B_HjtsMm.js} +1 -1
- package/dist/client/assets/{collection-search-CacvIdKe.js → collection-search-BPtx8G1f.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-hyzp9jUd.js → collection-table-wrapper-BryChMzP.js} +1 -1
- package/dist/client/assets/{collection-tabs-ywProb31.js → collection-tabs-rDrGFt87.js} +1 -1
- package/dist/client/assets/{column-rules-BK42oUF9.js → column-rules-CBDddx-X.js} +1 -1
- package/dist/client/assets/{combobox-DOrn42oJ.js → combobox-CUJidMCM.js} +1 -1
- package/dist/client/assets/{command-fqp-0b5f.js → command-CdSfLL9P.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CzRe8aZa.js → companion-mcps-section-CapqSyeR.js} +1 -1
- package/dist/client/assets/{config-CIO93PJU.js → config-DYtJAhTs.js} +1 -1
- package/dist/client/assets/{connect-Be6_BDOH.js → connect-DzC_JY0O.js} +1 -1
- package/dist/client/assets/{connect-layout-Dgmc1sNX.js → connect-layout-CwfCc-Yp.js} +1 -1
- package/dist/client/assets/{connection-BCelELHr.js → connection-KGhvUETQ.js} +1 -1
- package/dist/client/assets/{connection-card-BWXrChNc.js → connection-card-CmOjRIm5.js} +1 -1
- package/dist/client/assets/{connection-detail-B7kDdVY9.js → connection-detail-8IXvecot.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DCUMal7M.js → connection-form-helpers-DwH5XcOW.js} +1 -1
- package/dist/client/assets/{connections-BYbkoIDQ.js → connections-Bl-ms1sl.js} +1 -1
- package/dist/client/assets/{context-ByfIilVn.js → context-CQ5RUVRk.js} +1 -1
- package/dist/client/assets/{context-menu-CiGJumcW.js → context-menu-BONDmMvs.js} +1 -1
- package/dist/client/assets/{core.esm-C2_DCN6Y.js → core.esm-gbvtUb0d.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BHthlR2A.js → create-organization-dialog--_vdq0__.js} +1 -1
- package/dist/client/assets/{daily-pulse-E_FUA1NH.js → daily-pulse-BBYJtLUK.js} +1 -1
- package/dist/client/assets/{device-hint-DA_uRg_p.js → device-hint-C3mf2rBk.js} +1 -1
- package/dist/client/assets/{discover-J_sID2RZ.js → discover-Dg3bEYIg.js} +1 -1
- package/dist/client/assets/{domain-settings-BrzCpB_6.js → domain-settings-BLJaGYt5.js} +1 -1
- package/dist/client/assets/{drawer-BMuDp3pZ.js → drawer-C9byc45q.js} +1 -1
- package/dist/client/assets/{editor-Dq4IMcxm.js → editor-vTtvQU6U.js} +1 -1
- package/dist/client/assets/{empty-state-DvEOfDhm.js → empty-state-MzgkrW8i.js} +1 -1
- package/dist/client/assets/{empty-state-BV6Ywh9y.js → empty-state-OuooYiXX.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DU6Jox_T.js → extract-connection-data-DKxAapkS.js} +1 -1
- package/dist/client/assets/{feature-gate-BZc24_E5.js → feature-gate-DthOZE3T.js} +1 -1
- package/dist/client/assets/{feature-paywall-D03mknXg.js → feature-paywall-B43OWr6s.js} +1 -1
- package/dist/client/assets/{file-explorer-Lz97U563.js → file-explorer-BK6CBYkh.js} +1 -1
- package/dist/client/assets/{file-preview-CV8hE6WA.js → file-preview-Cp_wgKZ4.js} +1 -1
- package/dist/client/assets/{file-share-button-Bdi3sj_s.js → file-share-button-BFJJKHR1.js} +1 -1
- package/dist/client/assets/{file-type-icon-OOS78AjU.js → file-type-icon-D_YzVdyI.js} +1 -1
- package/dist/client/assets/flat-project-OqAYQvXi.js +1 -0
- package/dist/client/assets/{folder-icon-B0QLaV9K.js → folder-icon-DDtGpklD.js} +1 -1
- package/dist/client/assets/{form-CZcQhZCa.js → form-CJ_Xz43P.js} +1 -1
- package/dist/client/assets/{general-BMgatBn-.js → general-BZXk3K5d.js} +1 -1
- package/dist/client/assets/{home-D1UZSXtn.js → home-BujtXmg1.js} +1 -1
- package/dist/client/assets/{icon-button-DbTR-7FA.js → icon-button-HZupTrz9.js} +1 -1
- package/dist/client/assets/{index-Box10IZB.js → index-ABTatWfQ.js} +1 -1
- package/dist/client/assets/{index-CX4bp0FC.js → index-BRlpwCN0.js} +1 -1
- package/dist/client/assets/{index-BvTG_LLZ.js → index-BZvXKYts.js} +1 -1
- package/dist/client/assets/{index-Cj4602fN.js → index-BpzCwtjK.js} +1 -1
- package/dist/client/assets/{index-BG5IZjO1.js → index-C-fX0RCG.js} +1 -1
- package/dist/client/assets/{index-DcG5TBas.js → index-C759w8PG.js} +1 -1
- package/dist/client/assets/{index-C9YSJ0Pi.js → index-CcyJ-5NJ.js} +1 -1
- package/dist/client/assets/{index-DYLoE6lZ.js → index-CsOndfWq.js} +3 -3
- package/dist/client/assets/{index-D-F3H3Df.js → index-D3DgX6eB.js} +1 -1
- package/dist/client/assets/{index-BvhG_GL8.js → index-D6j44vfq.js} +3 -3
- package/dist/client/assets/{index-Cql9s2oo.js → index-DLLBoYqS.js} +1 -1
- package/dist/client/assets/{index-BrozBhiV.js → index-DWDW9ng6.js} +1 -1
- package/dist/client/assets/{index-redirect-DnUfmxMQ.js → index-redirect-BQZIR8Rn.js} +1 -1
- package/dist/client/assets/{index-D_2G1SLW.js → index-vXsAhBzz.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C-FPZrNN.js → infiniteQueryObserver-pU9pZci3.js} +1 -1
- package/dist/client/assets/{infra-billing-51h8KhW5.js → infra-billing-CJ1SDWNW.js} +1 -1
- package/dist/client/assets/{input-B0wYSpb2.js → input-D_3UHFsb.js} +1 -1
- package/dist/client/assets/{input-Bv9QfIGh.js → input-EIjvUWwG.js} +3 -3
- package/dist/client/assets/{integration-icon-CDrootbG.js → integration-icon-D2n5_i5E.js} +1 -1
- package/dist/client/assets/{jira-icon-BYFRiv-4.js → jira-icon-BtEsLcr1.js} +1 -1
- package/dist/client/assets/{label-COS7xlc4.js → label-PMOCFxAK.js} +1 -1
- package/dist/client/assets/{layout-CBzBOevY.js → layout-ChMyQ0My.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-MO8oblzi.js → legacy-agents-deep-CPBbZTxM.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CudcgLCq.js → legacy-main-redirect-uv67id5O.js} +1 -1
- package/dist/client/assets/library-C5qrWpgG.js +1 -0
- package/dist/client/assets/{library-tab-BhC4uvZL.js → library-tab-De6d8NXP.js} +1 -1
- package/dist/client/assets/{login-DhV7QjVw.js → login-ew7OWyIA.js} +1 -1
- package/dist/client/assets/{markdown-FpxtcMsE.js → markdown-jtizwWYK.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-oNRSzgIY.js → mcp-app-renderer-URE_9VC7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-_2kQOfTH.js → mcp-oauth-CS7wEky-.js} +1 -1
- package/dist/client/assets/{mcp-oauth-hlA0Q-1K.js → mcp-oauth-CtduGE9o.js} +1 -1
- package/dist/client/assets/{members-NF923Ad9.js → members-4nC3G4fN.js} +1 -1
- package/dist/client/assets/{memory-CkWrgyW6.js → memory-DjFNyy0l.js} +1 -1
- package/dist/client/assets/{mini-report-page-CtUg6esm.js → mini-report-page-SXYfkfsJ.js} +1 -1
- package/dist/client/assets/{mock-board-BbcelWvr.js → mock-board-DOPI9v1n.js} +1 -1
- package/dist/client/assets/{monaco-editor-DOjflLD3.js → monaco-editor--q8pYjVp.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-5gnR_PsS.js → monitoring-stats-row-CEOJr_Mr.js} +1 -1
- package/dist/client/assets/{multi-select-DHbRaRWn.js → multi-select-B5EYUvVe.js} +1 -1
- package/dist/client/assets/{mustache-CUJOpa04.js → mustache-CwOtagWC.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Bytx7uX5.js → new-project-dialog-DNSDpVVm.js} +1 -1
- package/dist/client/assets/{oauth-callback-BOiaAtqL.js → oauth-callback-N9EX0dsT.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DHi7-rTD.js → oauth-callback-ai-provider-DYJWavL1.js} +1 -1
- package/dist/client/assets/{onboarding-BcQ_H-Ta.js → onboarding-Cf4I151E.js} +1 -1
- package/dist/client/assets/{openai-conversation-BgjVhT0d.js → openai-conversation-DGz26UPY.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DuLy3JAN.js → optimistic-project-sidebar-views-7KZes5Aj.js} +1 -1
- package/dist/client/assets/{organization-choice-obmsj85V.js → organization-choice-BjXMGiEn.js} +1 -1
- package/dist/client/assets/{orgs-D5F2hLXP.js → orgs-Co8dpTJE.js} +1 -1
- package/dist/client/assets/{page-seo-form-Ba1SWsx7.js → page-seo-form-BKnLWhFP.js} +1 -1
- package/dist/client/assets/{pair-DfD0HGLO.js → pair-B5n9SRL4.js} +1 -1
- package/dist/client/assets/{plan-ladder-ByxenYnr.js → plan-ladder-Bue-fGj1.js} +1 -1
- package/dist/client/assets/{popover-CsrTLLWE.js → popover-Cz5BF_3m.js} +1 -1
- package/dist/client/assets/{post-calendar-CAVjY12v.js → post-calendar-CEBSrXXn.js} +1 -1
- package/dist/client/assets/{post-editor-CLhXk7zA.js → post-editor-BnKzHRjp.js} +1 -1
- package/dist/client/assets/{preview-content-CcXQsTVX.js → preview-content-B68u7aBy.js} +1 -1
- package/dist/client/assets/{preview-dialog-CuP09SDy.js → preview-dialog-BrKZ8Eye.js} +1 -1
- package/dist/client/assets/{preview-panel-si7dSHQt.js → preview-panel-hieScKI7.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-Ch2ijOSh.js → product-picker-dialog-DI1rZSm9.js} +1 -1
- package/dist/client/assets/{profile-D0l--Bsl.js → profile-DHWmm71D.js} +1 -1
- package/dist/client/assets/{project-app-view-Bz65jJNr.js → project-app-view-DfvTxGtE.js} +1 -1
- package/dist/client/assets/{project-feed-DSA4fOC7.js → project-feed-DZ1W25Hn.js} +1 -1
- package/dist/client/assets/{project-icon-C-N3cJkz.js → project-icon-EnEce15b.js} +1 -1
- package/dist/client/assets/project-reports-DkXaua8h.js +1 -0
- package/dist/client/assets/project-tasks-Bh6cwC6Y.js +1 -0
- package/dist/client/assets/{projects-DvvpjGnZ.js → projects-QOPxi_mI.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DfvyQfpd.js → projects-empty-state-B0ZQBktO.js} +1 -1
- package/dist/client/assets/{prompts-BuofI3_s.js → prompts-CezqR9ud.js} +1 -1
- package/dist/client/assets/record-editor-C_Y1Wo0r.js +1 -0
- package/dist/client/assets/redirect-editor-CjFXK1kC.js +1 -0
- package/dist/client/assets/{reports-DOq1hOqC.js → reports-BG-GKzeu.js} +1 -1
- package/dist/client/assets/reports-BoLey7zx.js +1 -0
- package/dist/client/assets/{reports-onboarding-BC8kmZ8I.js → reports-onboarding-5j0jaaNw.js} +1 -1
- package/dist/client/assets/{reports-tab-3R3ocdaz.js → reports-tab-BkTRSHA7.js} +2 -2
- package/dist/client/assets/{repositories-Bt6nbmSu.js → repositories-BGagF1EN.js} +1 -1
- package/dist/client/assets/{repository-binding-4wb1SqGi.js → repository-binding-CXF8Iqmd.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DgjVp-Rp.js → repository-import-picker-DqDsZx5W.js} +1 -1
- package/dist/client/assets/{repository-picker-Dhir_mBD.js → repository-picker-DLkKyJUN.js} +1 -1
- package/dist/client/assets/{require-capability-BXoL3s4D.js → require-capability-BM6Ybgn3.js} +1 -1
- package/dist/client/assets/{required-auth-layout-rplY5gMF.js → required-auth-layout-CVWrBxoR.js} +1 -1
- package/dist/client/assets/{reset-password-CNXROw6o.js → reset-password-CEx0Ff3M.js} +1 -1
- package/dist/client/assets/{resizable-CYDmoKgw.js → resizable-DyTZr2pU.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CIzsgPiq.js → resolve-tab-icon-DfIQZFlu.js} +1 -1
- package/dist/client/assets/{review-settings-CIijxO9K.js → review-settings-ClvQY-hD.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BlJN8nO0.js → rich-text-link-control-mLwtvxkK.js} +1 -1
- package/dist/client/assets/{roles-rqo1THOy.js → roles-lRXToodJ.js} +1 -1
- package/dist/client/assets/{route-nWQgD8-7.js → route-BhRw08bH.js} +1 -1
- package/dist/client/assets/route-CndEOl6m.js +1 -0
- package/dist/client/assets/{route-D_4e8W74.js → route-DDzvkEDQ.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-Cq2CDyKN.js → runnable-block-editor-Cr3HQlva.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-qUf8Q_Xq.js → sandbox-lifecycle-context-CyWspjuL.js} +1 -1
- package/dist/client/assets/{schema-B7T6zvOr.js → schema-D6ibRSPf.js} +1 -1
- package/dist/client/assets/{scroll-area-C9CkDOV0.js → scroll-area-C8BYcujI.js} +1 -1
- package/dist/client/assets/{search-input-CSa-vO3l.js → search-input-ChI_JhrH.js} +1 -1
- package/dist/client/assets/{search-toggle-CAbpMgN6.js → search-toggle-CUWWqFsW.js} +1 -1
- package/dist/client/assets/{secret-picker-DoaNLSBs.js → secret-picker-CxU-8m-r.js} +1 -1
- package/dist/client/assets/{secrets-byDlZpmy.js → secrets-BmlGwv-i.js} +1 -1
- package/dist/client/assets/{sections-editor-Bhx-Ytw3.js → sections-editor-DTefyMnC.js} +1 -1
- package/dist/client/assets/{select-BTxDOmEz.js → select-CMFCWFoG.js} +1 -1
- package/dist/client/assets/{select-model-DXgRM3p3.js → select-model-BGcA4VFt.js} +1 -1
- package/dist/client/assets/{seo-editor-SjuXgM-3.js → seo-editor-VyAPTq8i.js} +1 -1
- package/dist/client/assets/{separator-i5pMbmNF.js → separator-CF3-tizq.js} +1 -1
- package/dist/client/assets/{settings-tab-CKfMYuwP.js → settings-tab-cuNoLFSI.js} +1 -1
- package/dist/client/assets/{sheet-B-Hh_nak.js → sheet-DDYhwyXr.js} +1 -1
- package/dist/client/assets/{shell-layout-BYblzqjk.js → shell-layout-J-egCYHs.js} +1 -1
- package/dist/client/assets/{skills-D04V2qi_.js → skills-DHf4Wnnh.js} +1 -1
- package/dist/client/assets/{slider-D3apdx8g.js → slider-BiFHboSa.js} +1 -1
- package/dist/client/assets/{sortable.esm-BcPKBoEH.js → sortable.esm-D8MkW_Mj.js} +1 -1
- package/dist/client/assets/{sso-Ba8xYn_P.js → sso-B2O83AEI.js} +1 -1
- package/dist/client/assets/{suggestion-yrhgs0c3.js → suggestion-CzlBu15n.js} +1 -1
- package/dist/client/assets/{switch-Bv7OaKpB.js → switch-CkoldjL2.js} +1 -1
- package/dist/client/assets/{symbol-CotFyP2y.js → symbol-Bd69ZTHX.js} +1 -1
- package/dist/client/assets/{synced-repos-MTGAuYvc.js → synced-repos-Nygw9-io.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-gJ6W_ogl.js → tab-icon-glyph-DPo9bSSl.js} +1 -1
- package/dist/client/assets/{table-CMo_Zd79.js → table-CxKhFuEH.js} +1 -1
- package/dist/client/assets/{tabs-DsQwfF9n.js → tabs-DLw8-jiv.js} +1 -1
- package/dist/client/assets/{task-board-jYYT4T-P.js → task-board-B6zg05l8.js} +1 -1
- package/dist/client/assets/{task-route-CWhoPEpW.js → task-route-Da1wUewT.js} +1 -1
- package/dist/client/assets/{task-status-B1Q1IWuY.js → task-status-ENyxLffS.js} +1 -1
- package/dist/client/assets/taskboard-analytics-Bq1qJL1-.js +1 -0
- package/dist/client/assets/{tasks-sExg1TPS.js → tasks-CIFURdGc.js} +1 -1
- package/dist/client/assets/tasks-DK3Yxxu5.js +1 -0
- package/dist/client/assets/{textarea-CXxxIkE2.js → textarea-DtmaxKHE.js} +1 -1
- package/dist/client/assets/{thread-analytics-CN8JIWoa.js → thread-analytics-DIbC04_x.js} +1 -1
- package/dist/client/assets/{thread-button-BjphGBFn.js → thread-button-VjZAd4E3.js} +1 -1
- package/dist/client/assets/{thread-intent-Cv8T2W7d.js → thread-intent-iex-fi8o.js} +1 -1
- package/dist/client/assets/{thread-route-Y6_0A4lo.js → thread-route-B-vRjZGb.js} +1 -1
- package/dist/client/assets/{thread-route-md0irSaA.js → thread-route-Cl51Xz5G.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-qCnpdPMv.js → thread-sheet-body-C_srY05t.js} +1 -1
- package/dist/client/assets/{time-range-picker-nGk4jkHe.js → time-range-picker-C5iiqrEW.js} +1 -1
- package/dist/client/assets/{toggle-group-MxDdKb-A.js → toggle-group-DlGyqAyH.js} +1 -1
- package/dist/client/assets/{tool-namespace-NA4CQCu7.js → tool-namespace-4DMlS5tP.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DfPVpCUn.js → toolbar-icon-button-D0koaCWD.js} +1 -1
- package/dist/client/assets/{tooltip-D0bgPl8K.js → tooltip-UhT0N_rD.js} +1 -1
- package/dist/client/assets/{tooltipContext-BJ3U7dLG.js → tooltipContext-Cyn3L__C.js} +1 -1
- package/dist/client/assets/{track-BR4OSmkP.js → track-BMoyL32N.js} +1 -1
- package/dist/client/assets/{types-D0iAHfi-.js → types-DHDp1Ix5.js} +1 -1
- package/dist/client/assets/{url-slug-CsF5_jEJ.js → url-slug-QrQmlYwX.js} +1 -1
- package/dist/client/assets/{usage-stats-DMZgLWXn.js → usage-stats-CC8M4nNz.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C1zAqMn5.js → use-ai-providers-Cz8n-q9d.js} +1 -1
- package/dist/client/assets/{use-automations-guIq1Jf8.js → use-automations-C_6nt9Zp.js} +1 -1
- package/dist/client/assets/{use-autosave-KNHbArST.js → use-autosave-BgX70Gz2.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-DiI7M741.js → use-chat-layout-state-C60DGNO2.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-CoFd5UE7.js → use-chat-navigation-CyFm8cEg.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BMgzMfT6.js → use-clock-tick-BKZqeY5S.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BNtTOOiR.js → use-connect-companion-DTmLU6ot.js} +1 -1
- package/dist/client/assets/{use-connection-BlwV3kYC.js → use-connection-UE8r2cKi.js} +1 -1
- package/dist/client/assets/{use-copy-BzyND5sN.js → use-copy-qR80P2m5.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CRjB3w_a.js → use-create-virtual-mcp-DRMHi1dT.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DHjSaunn.js → use-date-fns-locale-CoZazUfP.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DzioetsZ.js → use-debounced-autosave-CYyabydu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Bw9XyFDS.js → use-debounced-value-XS_u63Qy.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BwBAsZjN.js → use-deco-credits-BWgRmbgF.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-LdqK-BR8.js → use-decopilot-events-BatPvp4V.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B1009COB.js → use-delete-connection-VV7G6Dis.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DqRcHfUs.js → use-deployment-admin-DW4_2QbY.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-q_3EwSkl.js → use-ensure-project-folder-D3lq0ueh.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BGVVIo_d.js → use-fast-preview-draft-url-mXiWjLYU.js} +1 -1
- package/dist/client/assets/{use-file-configs-CiMmOBPH.js → use-file-configs-B6MWoy0P.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CFznRnci.js → use-infinite-scroll-BD4__gTJ.js} +1 -1
- package/dist/client/assets/{use-join-requests-LdDd-D1N.js → use-join-requests-IoygYkkX.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BVPkp8pd.js → use-main-panel-tabs-z1NdoakW.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BAmLODpB.js → use-mcp-auth-status-CDCKWbI3.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CyZFCbXf.js → use-mcp-client-DaCLGUbW.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-hbtCEuPx.js → use-mcp-prompts-Cj8TKxv6.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CqwLSwPQ.js → use-mcp-tools-B_v6Xc8f.js} +1 -1
- package/dist/client/assets/{use-members-0uvS2aBL.js → use-members-COPm4P5W.js} +1 -1
- package/dist/client/assets/{use-mobile-DsnBmTih.js → use-mobile-CSIXbJHF.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-e1Fty-W6.js → use-navigate-to-agent-CyIa0H8E.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-CFDJQWsr.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CtVqEeze.js → use-open-billing-url-ByV0ShcL.js} +1 -1
- package/dist/client/assets/{use-org-auth-client--vi1jVLH.js → use-org-auth-client-DYKRjiNi.js} +1 -1
- package/dist/client/assets/{use-org-fs-XuRHX-wd.js → use-org-fs-DcHowQO9.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DIFvvjD1.js → use-org-repo-syncs-CpMqTwr0.js} +1 -1
- package/dist/client/assets/{use-org-sso-BY1EpA2d.js → use-org-sso-Bhc1WrbS.js} +1 -1
- package/dist/client/assets/{use-organization-roles-WaawCXoD.js → use-organization-roles-CPv4-j68.js} +1 -1
- package/dist/client/assets/{use-organization-settings-wIzO33y-.js → use-organization-settings-DxhpqnYO.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BNghtY2T.js → use-panel-navigate-B75ATwR5.js} +1 -1
- package/dist/client/assets/{use-project-scope-kaofAo-2.js → use-project-scope-YpfqNFMB.js} +1 -1
- package/dist/client/assets/{use-releases-DGpmgwQI.js → use-releases-DpsGlymp.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-C5t0yrnl.js → use-reports-diagnostic-BacLoY5G.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DFZHFjJV.js → use-sandbox-events-BnBgyYjB.js} +1 -1
- package/dist/client/assets/{use-secrets-H7WJMT_o.js → use-secrets-CkRBiULT.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-7My4H7me.js → use-section-preview-base-Bzis1rCo.js} +1 -1
- package/dist/client/assets/{use-tags-LkAv2_8e.js → use-tags-D6F6hDK1.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DYzMdhLH.js → use-task-board-analytics-DGP81lZo.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DFFKnQzP.js → use-task-board-events-CMdVOm7R.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DlBSKV0p.js → use-task-board-item-prs-DsMQwqER.js} +1 -1
- package/dist/client/assets/{use-task-board-items-GPnynZhW.js → use-task-board-items-SO19iMil.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Bj-IbI9d.js → use-task-metadata-DSX2LZld.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BaY4EBEv.js → use-thread-analytics-CVouJyNf.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BE4mR7oi.js → use-thread-outputs-PwDDA0de.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C6j7p53s.js +1 -0
- package/dist/client/assets/{useQueries-F64PMR6y.js → useQueries-DYlwY_7i.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-LN6pz4nD.js +1 -0
- package/dist/client/assets/{users-BjFgJ7AD.js → users-CYFJuXuG.js} +1 -1
- package/dist/client/assets/{utils-DgqX0z1b.js → utils-VljhGZNh.js} +1 -1
- package/dist/client/assets/{variant-calendar-DLNhYnQf.js → variant-calendar-CmxcC_ep.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-D3WXi6Ga.js → variant-matcher-override-wPBIsNi7.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-0cm3AkV5.js → view-mode-toggle-Bsl9fIVT.js} +1 -1
- package/dist/client/assets/{virtual-mcp-C_TeGFZa.js → virtual-mcp-DUsuHWMj.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-end_AVWu.js → watch-sse-pool-BxFXPxOj.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BN1xlwca.js +0 -1
- package/dist/client/assets/agent-deck-gN98WSbp.js +0 -1
- package/dist/client/assets/agent-library-CxgcYBSr.js +0 -1
- package/dist/client/assets/agent-library-file-lpnZiokW.js +0 -1
- package/dist/client/assets/agent-settings-7e_XyBHe.js +0 -1
- package/dist/client/assets/agent-site-editor-code-yflTKEXl.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-BgyDrf4u.js +0 -518
- package/dist/client/assets/agent-view-vQcOlN6j.js +0 -1
- package/dist/client/assets/api-keys-LZWLXizN.js +0 -1
- package/dist/client/assets/app-editor-B7dAjCr9.js +0 -1
- package/dist/client/assets/flat-project-Br0qxJS9.js +0 -1
- package/dist/client/assets/library-CMmULIMr.js +0 -1
- package/dist/client/assets/project-reports-iIDLiTtT.js +0 -1
- package/dist/client/assets/project-tasks-D52OJfjJ.js +0 -1
- package/dist/client/assets/record-editor-wVe5Wpmu.js +0 -1
- package/dist/client/assets/redirect-editor-D6yYqLjJ.js +0 -1
- package/dist/client/assets/reports-Bj-OdndV.js +0 -1
- package/dist/client/assets/route-3hj1gfVP.js +0 -1
- package/dist/client/assets/taskboard-analytics-BnPIIn86.js +0 -1
- package/dist/client/assets/tasks-aFMERcVH.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-CGtkQLL-.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D4wBC58J.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ZDUWj1v_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,o as D,K as k,b as L,j as i}from"./index-
|
|
1
|
+
import{c as w,o as D,K as k,b as L,j as i}from"./index-CsOndfWq.js";import{j as P,aq as $,ar as O,q as F,as as q,at as I,au as Q}from"./runnable-block-editor-Cr3HQlva.js";import{L as A}from"./label-PMOCFxAK.js";import{S as K}from"./switch-CkoldjL2.js";import{u as Y}from"./use-new-blocks-editor-CFDJQWsr.js";import{c as z,b as M,a as U,d as W,S as G}from"./select-CMFCWFoG.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function H(c,e,t,d){if(c.kind==="page"){if(!_(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:$(d,h)}}return _(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function re(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function ae(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,a=D(),l=`${t}/${d}/${h}`;let u;e[0]!==h||e[1]!==t||e[2]!==d?(u={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=u):u=e[3];let r;e[4]!==f?(r={onSaved:f},e[4]=f,e[5]=r):r=e[5];const{save:n,flush:m,isPending:p}=P(u,r);let y;e[6]!==l||e[7]!==a||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const S=a.getQueryData(k.decofile(l))?.[s.blockKey];return H(o,s,S,v)})},e[6]=l,e[7]=a,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let x;e[12]!==l||e[13]!==a||e[14]!==s||e[15]!==n||e[16]!==o?(x=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const S=a.getQueryData(k.decofile(l))?.[s.blockKey];return _(S)?{...S,seo:v}:null})},e[12]=l,e[13]=a,e[14]=s,e[15]=n,e[16]=o,e[17]=x):x=e[17];const b=x;let j;return e[18]!==m||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:m,isPending:p},e[18]=m,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const J="https://deco.cx/docs/en/performance/edge-async-render";function V(c){const e=w.c(24),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=L(),f=Y();let a;e[0]!==t?(a=F(t),e[0]=t,e[1]=a):a=e[1];const l=a;let u;e[2]!==t?(u=O(t),e[2]=t,e[3]=u):u=e[3];const r=u;let n;e[4]!==s?(n=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=n):n=e[5];let m;e[6]!==n?(m=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:n}),e[6]=n,e[7]=m):m=e[7];let p;e[8]!==l||e[9]!==d?(p=i.jsx(K,{id:"seo-enable",checked:l,onCheckedChange:d}),e[8]=l,e[9]=d,e[10]=p):p=e[10];let y;e[11]!==m||e[12]!==p?(y=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,p]}),e[11]=m,e[12]=p,e[13]=y):y=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==f||e[17]!==l||e[18]!==h||e[19]!==s?(g=l&&(f?o:i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:s("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:J,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:s("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(K,{id:"seo-async-render",checked:r,onCheckedChange:h,className:"shrink-0"})]})]})),e[14]=r,e[15]=o,e[16]=f,e[17]=l,e[18]=h,e[19]=s,e[20]=g):g=e[20];let x;return e[21]!==y||e[22]!==g?(x=i.jsxs("div",{className:"space-y-4",children:[y,g]}),e[21]=y,e[22]=g,e[23]=x):x=e[23],x}function X(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=L();if(t.length<=1)return null;let s;e[0]!==o?(s=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=s):s=e[1];let f;e[2]!==s?(f=i.jsx(A,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let a;e[4]!==o?(a=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=a):a=e[5];let l;e[6]!==a?(l=i.jsx(M,{className:"w-full",children:i.jsx(U,{placeholder:a})}),e[6]=a,e[7]=l):l=e[7];let u;e[8]!==t?(u=t.filter(B).map(Z),e[8]=t,e[9]=u):u=e[9];let r;e[10]!==u?(r=i.jsx(W,{children:u}),e[10]=u,e[11]=r):r=e[11];let n;e[12]!==h||e[13]!==l||e[14]!==r||e[15]!==d?(n=i.jsxs(G,{value:d,onValueChange:h,children:[l,r]}),e[12]=h,e[13]=l,e[14]=r,e[15]=d,e[16]=n):n=e[16];let m;return e[17]!==f||e[18]!==n?(m=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=m):m=e[19],m}function Z(c){return i.jsx(z,{value:c.resolveType,children:c.title},c.resolveType)}function B(c){return c.resolveType.length>0}function ie(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:a,siteDefaultSeo:l,onBreadcrumbChange:u,onPersistRaw:r,onInnerChange:n,onClearForm:m,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==m||e[3]!==r?(g=C=>{if(C){const N=Q(h);r(N),m(),p();return}r(null),m(),p()},e[0]=h,e[1]=p,e[2]=m,e[3]=r,e[4]=g):g=e[4];const x=g;let b;e[5]!==r||e[6]!==t?(b=C=>{const N=q(C,t);r(N)},e[5]=r,e[6]=t,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let S;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(S=F(t)&&o&&s&&f&&f.length>0&&i.jsx(X,{options:f,value:s,onChange:T}),e[11]=s,e[12]=T,e[13]=t,e[14]=o,e[15]=f,e[16]=S):S=e[16];let R;e[17]!==s||e[18]!==a||e[19]!==d||e[20]!==u||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==l?(R=F(t)&&o&&s&&i.jsx(I,{schema:o,resolveType:s,value:d,formResetKey:a,onChange:C=>n(C),onBreadcrumbChange:u,siteDefaultSeo:l}),e[17]=s,e[18]=a,e[19]=d,e[20]=u,e[21]=n,e[22]=t,e[23]=o,e[24]=l,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==x||e[29]!==t||e[30]!==S||e[31]!==R?(E=i.jsxs(V,{rawSeo:t,onEnableChange:x,onAsyncRenderChange:j,children:[y,S,R]}),e[26]=y,e[27]=j,e[28]=x,e[29]=t,e[30]=S,e[31]=R,e[32]=E):E=e[32],E}export{ie as P,re as a,H as b,ae as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as z,c as P,b as q,j as l,at as Ye,l as K,ah as it,a2 as me,o as Gt,aa as Vt,e as Jt,K as xe,t as Le,m as ct,ak as Qt,H as Xt,h as Yt,B as Be,aU as ut,aj as Zt,aD as es,ep as ts,eq as dt,a6 as ss,z as ns,x as Ue,d as He,er as Ze,ec as as,es as ls}from"./index-DYLoE6lZ.js";import{aS as os,aT as rs,aC as is,T as cs,b as et,as as us,k as ds,a2 as fs,aU as ms,aV as ft,aW as ps,u as Re,aO as gs,aL as xs,aX as mt,A as pt,aY as de,d as hs,H as bs,h as ys}from"./agent-icon-CAaO4ypa.js";import{t as Te,e as js,b as vs}from"./Tool01-DG06N0su.js";import{i as gt}from"./LinkBroken01-wTJMvAdz.js";import{a as Ss}from"./Copy01-BdyOQaoT.js";import{b as be,c as qe,d as tt}from"./format-time-CjIPQhCN.js";import{b as ks,C as Ns,a as ws}from"./collapsible-D6DR3zQ4.js";import{u as _s}from"./use-copy-BzyND5sN.js";import{h as xt,i as Ts,d as Ce,c as Cs,P as Is,j as $s,u as Ms,k as As,F as Ps,s as Es,b as Ls}from"./usage-stats-DMZgLWXn.js";import{m as Rs,u as zs,n as Ds,o as Fs}from"./thread-intent-Cv8T2W7d.js";import{e as ye,x as Os,u as je,y as Bs,a as Us,z as Hs,B as qs}from"./chat-context-oLIKqlGE.js";import{u as We}from"./use-clock-tick-BMgzMfT6.js";import{c as Ws}from"./content-blocks-o63cs2vh.js";import{M as Ks}from"./mcp-app-renderer-oNRSzgIY.js";import{g as ht}from"./types-D0iAHfi-.js";import{o as Gs}from"./omit-sandbox-map-jj4lCB2U.js";import{T as bt,a as yt,b as jt}from"./tooltip-D0bgPl8K.js";import{c as Vs,u as Js,a as Qs}from"./use-mcp-client-CyZFCbXf.js";import{a as vt,g as St,s as kt}from"./tool-namespace-NA4CQCu7.js";import{t as Xs,g as pe,u as Ke}from"./utils-CVEq3hMx.js";import{i as Nt}from"./AlertCircle-xh90NARB.js";import{s as Ys,a as ke}from"./Image01-Drnu_oTX.js";import{s as Zs}from"./XClose-pteQuwAH.js";import{n as ze}from"./ShoppingBag01-BJ4cJNkc.js";import{i as en}from"./SearchMd-DhQxjm00.js";import{a as tn,e as sn}from"./shell-layout-BYblzqjk.js";import{a as Ge}from"./use-panel-navigate-BNghtY2T.js";import{c as wt}from"./use-decopilot-events-LdqK-BR8.js";import{I as nn,M as _t}from"./markdown-FpxtcMsE.js";import{c as an,S as ln,a as on,b as rn}from"./sheet-B-Hh_nak.js";import{I as ve}from"./integration-icon-CDrootbG.js";import{a as Tt}from"./use-connection-BlwV3kYC.js";import{u as Ct}from"./use-navigate-to-agent-e1Fty-W6.js";import{i as Ne}from"./Link01-DAwi9mlM.js";import{s as cn}from"./UserSquare-B7AJhMXA.js";import{g as un}from"./use-mcp-prompts-hbtCEuPx.js";import{i as dn}from"./Monitor01-Bm_bTKyL.js";import{a as fn}from"./use-thread-outputs-BE4mR7oi.js";import{n as mn}from"./ZoomOut-D4nHzX79.js";import{F as pn}from"./file-type-icon-OOS78AjU.js";import{t as gn}from"./ChevronUp-D_Wjh1Pp.js";const xn={damping:.7,stiffness:.05,mass:1.25},hn=70,bn=1e3/60,yn=350;let Ie=!1;globalThis.document?.addEventListener("mousedown",()=>{Ie=!0});globalThis.document?.addEventListener("mouseup",()=>{Ie=!1});globalThis.document?.addEventListener("click",()=>{Ie=!1});const jn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[r,u]=z.useState(!1),i=z.useRef(null);i.current=s;const c=z.useCallback(()=>{if(!Ie)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const N=b.getRangeAt(0);return N.commonAncestorContainer.contains(h.current)||h.current?.contains(N.commonAncestorContainer)},[]),o=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(N){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=N,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:N}=this;if(!s.targetScrollTop)return N;if(b?.targetScrollTop===N)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(N,{scrollElement:h.current,contentElement:y.current}),N),0);return b={targetScrollTop:N,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=hn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const N=Date.now()+(Number(b.wait)||0),j=Ae(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,k=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=N+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,E=performance.now(),M=(E-(d.lastTick??E))/bn;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=E),c()||N>Date.now())return v();if(T<Math.min(k,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*M,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(k=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Ae(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[o,c,d]),p=z.useCallback(()=>{f(!0),o(!1)},[f,o]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:N,ignoreScrollToTop:j}=d;let{lastScrollTop:w=N}=d;d.lastScrollTop=N,d.ignoreScrollToTop=void 0,j&&j>N&&(w=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||N===j)return;if(c()){f(!0),o(!1);return}const S=N>w,k=N<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}k&&(f(!0),o(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[f,o,c,d]),x=z.useCallback(({target:b,deltaY:N})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&N<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),o(!1))},[f,o,d]),h=st(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=st(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let N;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(N??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),S>=0){const k=Ae(i.current,N?i.current.resize:i.current.initial);m({animation:k,wait:!0,preserveScrollPosition:!0,duration:k==="instant"?void 0:yn})}else d.isNearBottom&&(f(!1),o(!0));N=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||r,isNearBottom:r,escapedFromLock:e,state:d}};function st(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Me=new Map;function Ae(...s){const e={...xn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Me.has(n)||Me.set(n,Object.freeze(e)),t?"instant":Me.get(n)}function J({icon:s,title:e,usage:t,summary:n,state:a,detail:r,detailVariant:u="code",forceOpen:i,variant:c="default",trailing:o,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=q(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=_s(),N=a==="loading",j=a==="error",S=!!(r&&r.trim())||!!p,k=c==="subtask",v=(i??!1)||x,_=jn({initial:N?"instant":!1}),T=l.jsxs(ks,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ns,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",N&&"shimmer"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ye,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ye,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):l.jsx("div",{className:"flex-1"}),o&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),l.jsx(xt,{usage:t})]}),S&&l.jsx(ws,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:r})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:r})}),l.jsx("button",{type:"button",onClick:()=>y(r),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(it,{className:"size-3.5"}):l.jsx(Ss,{className:"size-3.5"})})]})})}))})]});return k?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=P.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const It=4;function $t(s){const e=P.c(8),{count:t,noun:n,onClick:a}=s,r=q();let u;e[0]!==t||e[1]!==n||e[2]!==r?(u=r("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=r,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(gt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==u?(c=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=a,e[6]=u,e[7]=c):c=e[7],c}function Mt(s){const e=P.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let r,u,i,c;if(e[0]!==n||e[1]!==a){c=Symbol.for("react.early_return_sentinel");e:{const f=qe(a);if(f===null){c=null;break e}const d=new Date(f);r=d.toLocaleString(),e[6]!==n?(u=K("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=r,e[3]=u,e[4]=i,e[5]=c}else r=e[2],u=e[3],i=e[4],c=e[5];if(c!==Symbol.for("react.early_return_sentinel"))return c;let o;return e[8]!==r||e[9]!==u||e[10]!==i?(o=l.jsx("span",{title:r,className:u,children:i}),e[8]=r,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function De(s){const e=P.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>tt(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,r]=z.useState(n);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>r(tt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),z.useEffect(u,i);const c=a/1e3;let o;e[5]!==c?(o=be(c),e[5]=c,e[6]=o):o=e[6];let f;return e[7]!==o?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=f):f=e[8],f}const At=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function vn(){const s=P.c(5),[e]=z.useState(Sn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=At.map((r,u)=>{const{delay:i}=r;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Sn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return At.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function kn(s){return{planning:{icon:l.jsx(rs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Nn=1200;function Fe(s){const e=P.c(8),{icon:t,title:n,summary:a,detail:r,state:u,detailVariant:i,trailing:c}=s,o=i===void 0?"prose":i;let f;return e[0]!==r||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==a||e[5]!==n||e[6]!==c?(f=l.jsx(J,{icon:t,title:n,summary:a,detail:r,state:u,detailVariant:o,trailing:c}),e[0]=r,e[1]=o,e[2]=t,e[3]=u,e[4]=a,e[5]=n,e[6]=c,e[7]=f):f=e[7],f}function wn(s){const e=P.c(22),{startedAt:t}=s,n=q(),a=ye()?.runStatusStage??null,[r,u]=z.useState("planning");let i,c;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{u("thinking")},Nn);return()=>{clearTimeout(x)}},c=[a],e[0]=a,e[1]=i,e[2]=c):(i=e[1],c=e[2]),z.useEffect(i,c),a!==null){let x;e[3]!==a||e[4]!==n?(x=Rs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Te,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let N;e[7]!==t?(N=t!==null&&l.jsx(De,{since:t}),e[7]=t,e[8]=N):N=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==N?(j=l.jsx(Fe,{icon:y,title:b,summary:h.detail,state:"loading",trailing:N}),e[9]=h.detail,e[10]=b,e[11]=N,e[12]=j):j=e[12],j}let o;e[13]!==n?(o=kn(n),e[13]=n,e[14]=o):o=e[14];const d=o[r],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(De,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Fe,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function _n(s){const e=P.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(vn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(De,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Tn=2e4;function Cn(s){const e=P.c(9),{startedAt:t}=s,n=q(),a=We(1e3),r=ye(),i=(t!==null?a-t:0)>=Tn;let c;e[0]!==t?(c=l.jsx(wn,{startedAt:t}),e[0]=t,e[1]=c):c=e[1];let o;e[2]!==i||e[3]!==r||e[4]!==n?(o=i&&r?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>r.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=r,e[4]=n,e[5]=o):o=e[5];let f;return e[6]!==c||e[7]!==o?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,o]}),e[6]=c,e[7]=o,e[8]=f):f=e[8],f}function In(s){const e=P.c(24),{duration:t,parts:n,isStreaming:a}=s,r=q();let u;e[0]!==n?(u=n.every(An),e[0]=n,e[1]=u):u=e[1];const i=u;let c;e[2]!==t||e[3]!==r?(c=t&&t/1e3>1?r("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):r("chat.thinkingIndicator.thought"),e[2]=t,e[3]=r,e[4]=c):c=e[4];const o=c;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const N=n.map(Mn).join(`
|
|
1
|
+
import{r as z,c as P,b as q,j as l,at as Ye,l as K,ah as it,a2 as me,o as Gt,aa as Vt,e as Jt,K as xe,t as Le,m as ct,ak as Qt,H as Xt,h as Yt,B as Be,aU as ut,aj as Zt,aD as es,ep as ts,eq as dt,a6 as ss,z as ns,x as Ue,d as He,er as Ze,ec as as,es as ls}from"./index-CsOndfWq.js";import{aS as os,aT as rs,aC as is,T as cs,b as et,as as us,k as ds,a2 as fs,aU as ms,aV as ft,aW as ps,u as Re,aO as gs,aL as xs,aX as mt,A as pt,aY as de,d as hs,H as bs,h as ys}from"./agent-icon-B6BGlN8Z.js";import{t as Te,e as js,b as vs}from"./Tool01-BJxIe84T.js";import{i as gt}from"./LinkBroken01-t0qEt8Lb.js";import{a as Ss}from"./Copy01-Corfj4_5.js";import{b as be,c as qe,d as tt}from"./format-time-CjIPQhCN.js";import{b as ks,C as Ns,a as ws}from"./collapsible-CQEd_xSV.js";import{u as _s}from"./use-copy-qR80P2m5.js";import{h as xt,i as Ts,d as Ce,c as Cs,P as Is,j as $s,u as Ms,k as As,F as Ps,s as Es,b as Ls}from"./usage-stats-CC8M4nNz.js";import{m as Rs,u as zs,n as Ds,o as Fs}from"./thread-intent-iex-fi8o.js";import{e as ye,x as Os,u as je,y as Bs,a as Us,z as Hs,B as qs}from"./chat-context-Dh5tO9W1.js";import{u as We}from"./use-clock-tick-BKZqeY5S.js";import{c as Ws}from"./content-blocks-o63cs2vh.js";import{M as Ks}from"./mcp-app-renderer-URE_9VC7.js";import{g as ht}from"./types-DHDp1Ix5.js";import{o as Gs}from"./omit-sandbox-map-jj4lCB2U.js";import{T as bt,a as yt,b as jt}from"./tooltip-UhT0N_rD.js";import{c as Vs,u as Js,a as Qs}from"./use-mcp-client-DaCLGUbW.js";import{a as vt,g as St,s as kt}from"./tool-namespace-4DMlS5tP.js";import{t as Xs,g as pe,u as Ke}from"./utils-CVEq3hMx.js";import{i as Nt}from"./AlertCircle-CIcaLchq.js";import{s as Ys,a as ke}from"./Image01-gtPlqhVq.js";import{s as Zs}from"./XClose-D59UZ-3l.js";import{n as ze}from"./ShoppingBag01-C6V1h_2Z.js";import{i as en}from"./SearchMd-DqzvTdT2.js";import{a as tn,e as sn}from"./shell-layout-J-egCYHs.js";import{a as Ge}from"./use-panel-navigate-B75ATwR5.js";import{c as wt}from"./use-decopilot-events-BatPvp4V.js";import{I as nn,M as _t}from"./markdown-jtizwWYK.js";import{c as an,S as ln,a as on,b as rn}from"./sheet-DDYhwyXr.js";import{I as ve}from"./integration-icon-D2n5_i5E.js";import{a as Tt}from"./use-connection-UE8r2cKi.js";import{u as Ct}from"./use-navigate-to-agent-CyIa0H8E.js";import{i as Ne}from"./Link01-BSAGxXho.js";import{s as cn}from"./UserSquare-B4EnRc3E.js";import{g as un}from"./use-mcp-prompts-Cj8TKxv6.js";import{i as dn}from"./Monitor01-BIhKjgAf.js";import{a as fn}from"./use-thread-outputs-PwDDA0de.js";import{n as mn}from"./ZoomOut-BwebNTOr.js";import{F as pn}from"./file-type-icon-D_YzVdyI.js";import{t as gn}from"./ChevronUp-DckC0O5o.js";const xn={damping:.7,stiffness:.05,mass:1.25},hn=70,bn=1e3/60,yn=350;let Ie=!1;globalThis.document?.addEventListener("mousedown",()=>{Ie=!0});globalThis.document?.addEventListener("mouseup",()=>{Ie=!1});globalThis.document?.addEventListener("click",()=>{Ie=!1});const jn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[r,u]=z.useState(!1),i=z.useRef(null);i.current=s;const c=z.useCallback(()=>{if(!Ie)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const N=b.getRangeAt(0);return N.commonAncestorContainer.contains(h.current)||h.current?.contains(N.commonAncestorContainer)},[]),o=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(N){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=N,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:N}=this;if(!s.targetScrollTop)return N;if(b?.targetScrollTop===N)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(N,{scrollElement:h.current,contentElement:y.current}),N),0);return b={targetScrollTop:N,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=hn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const N=Date.now()+(Number(b.wait)||0),j=Ae(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,k=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=N+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,E=performance.now(),M=(E-(d.lastTick??E))/bn;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=E),c()||N>Date.now())return v();if(T<Math.min(k,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*M,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(k=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Ae(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[o,c,d]),p=z.useCallback(()=>{f(!0),o(!1)},[f,o]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:N,ignoreScrollToTop:j}=d;let{lastScrollTop:w=N}=d;d.lastScrollTop=N,d.ignoreScrollToTop=void 0,j&&j>N&&(w=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||N===j)return;if(c()){f(!0),o(!1);return}const S=N>w,k=N<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}k&&(f(!0),o(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[f,o,c,d]),x=z.useCallback(({target:b,deltaY:N})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&N<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),o(!1))},[f,o,d]),h=st(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=st(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let N;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(N??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),S>=0){const k=Ae(i.current,N?i.current.resize:i.current.initial);m({animation:k,wait:!0,preserveScrollPosition:!0,duration:k==="instant"?void 0:yn})}else d.isNearBottom&&(f(!1),o(!0));N=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||r,isNearBottom:r,escapedFromLock:e,state:d}};function st(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Me=new Map;function Ae(...s){const e={...xn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Me.has(n)||Me.set(n,Object.freeze(e)),t?"instant":Me.get(n)}function J({icon:s,title:e,usage:t,summary:n,state:a,detail:r,detailVariant:u="code",forceOpen:i,variant:c="default",trailing:o,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=q(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=_s(),N=a==="loading",j=a==="error",S=!!(r&&r.trim())||!!p,k=c==="subtask",v=(i??!1)||x,_=jn({initial:N?"instant":!1}),T=l.jsxs(ks,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ns,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",N&&"shimmer"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ye,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ye,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):l.jsx("div",{className:"flex-1"}),o&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),l.jsx(xt,{usage:t})]}),S&&l.jsx(ws,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:r})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:r})}),l.jsx("button",{type:"button",onClick:()=>y(r),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(it,{className:"size-3.5"}):l.jsx(Ss,{className:"size-3.5"})})]})})}))})]});return k?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=P.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const It=4;function $t(s){const e=P.c(8),{count:t,noun:n,onClick:a}=s,r=q();let u;e[0]!==t||e[1]!==n||e[2]!==r?(u=r("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=r,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(gt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==u?(c=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=a,e[6]=u,e[7]=c):c=e[7],c}function Mt(s){const e=P.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let r,u,i,c;if(e[0]!==n||e[1]!==a){c=Symbol.for("react.early_return_sentinel");e:{const f=qe(a);if(f===null){c=null;break e}const d=new Date(f);r=d.toLocaleString(),e[6]!==n?(u=K("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=r,e[3]=u,e[4]=i,e[5]=c}else r=e[2],u=e[3],i=e[4],c=e[5];if(c!==Symbol.for("react.early_return_sentinel"))return c;let o;return e[8]!==r||e[9]!==u||e[10]!==i?(o=l.jsx("span",{title:r,className:u,children:i}),e[8]=r,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function De(s){const e=P.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>tt(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,r]=z.useState(n);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>r(tt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),z.useEffect(u,i);const c=a/1e3;let o;e[5]!==c?(o=be(c),e[5]=c,e[6]=o):o=e[6];let f;return e[7]!==o?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=f):f=e[8],f}const At=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function vn(){const s=P.c(5),[e]=z.useState(Sn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=At.map((r,u)=>{const{delay:i}=r;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Sn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return At.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function kn(s){return{planning:{icon:l.jsx(rs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Nn=1200;function Fe(s){const e=P.c(8),{icon:t,title:n,summary:a,detail:r,state:u,detailVariant:i,trailing:c}=s,o=i===void 0?"prose":i;let f;return e[0]!==r||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==a||e[5]!==n||e[6]!==c?(f=l.jsx(J,{icon:t,title:n,summary:a,detail:r,state:u,detailVariant:o,trailing:c}),e[0]=r,e[1]=o,e[2]=t,e[3]=u,e[4]=a,e[5]=n,e[6]=c,e[7]=f):f=e[7],f}function wn(s){const e=P.c(22),{startedAt:t}=s,n=q(),a=ye()?.runStatusStage??null,[r,u]=z.useState("planning");let i,c;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{u("thinking")},Nn);return()=>{clearTimeout(x)}},c=[a],e[0]=a,e[1]=i,e[2]=c):(i=e[1],c=e[2]),z.useEffect(i,c),a!==null){let x;e[3]!==a||e[4]!==n?(x=Rs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Te,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let N;e[7]!==t?(N=t!==null&&l.jsx(De,{since:t}),e[7]=t,e[8]=N):N=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==N?(j=l.jsx(Fe,{icon:y,title:b,summary:h.detail,state:"loading",trailing:N}),e[9]=h.detail,e[10]=b,e[11]=N,e[12]=j):j=e[12],j}let o;e[13]!==n?(o=kn(n),e[13]=n,e[14]=o):o=e[14];const d=o[r],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(De,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Fe,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function _n(s){const e=P.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(vn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(De,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Tn=2e4;function Cn(s){const e=P.c(9),{startedAt:t}=s,n=q(),a=We(1e3),r=ye(),i=(t!==null?a-t:0)>=Tn;let c;e[0]!==t?(c=l.jsx(wn,{startedAt:t}),e[0]=t,e[1]=c):c=e[1];let o;e[2]!==i||e[3]!==r||e[4]!==n?(o=i&&r?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>r.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=r,e[4]=n,e[5]=o):o=e[5];let f;return e[6]!==c||e[7]!==o?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,o]}),e[6]=c,e[7]=o,e[8]=f):f=e[8],f}function In(s){const e=P.c(24),{duration:t,parts:n,isStreaming:a}=s,r=q();let u;e[0]!==n?(u=n.every(An),e[0]=n,e[1]=u):u=e[1];const i=u;let c;e[2]!==t||e[3]!==r?(c=t&&t/1e3>1?r("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):r("chat.thinkingIndicator.thought"),e[2]=t,e[3]=r,e[4]=c):c=e[4];const o=c;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const N=n.map(Mn).join(`
|
|
2
2
|
`).trim().split(`
|
|
3
3
|
`).filter(Boolean),j=a?N[N.length-1]??"":N[0]??"";f=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=f}else f=e[8];const d=f;let m;if(e[9]!==i||e[10]!==n){const b=n.map($n).join(`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a2 as g,aa as P,K as _,m as y,l as h,j as d}from"./index-
|
|
1
|
+
import{c as f,a2 as g,aa as P,K as _,m as y,l as h,j as d}from"./index-CsOndfWq.js";import{u as A}from"./use-decopilot-events-BatPvp4V.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,by as A,j as c,bA as O,bB as h,bz as _,bv as L,bw as z,bx as G,bE as j,bN as H,dl as w,bI as K,bK as B,bO as J,bJ as Q,bL as U,bM as V,bP as W,bQ as Z,bD as q,c as C,l as X}from"./index-
|
|
1
|
+
import{r as i,by as A,j as c,bA as O,bB as h,bz as _,bv as L,bw as z,bx as G,bE as j,bN as H,dl as w,bI as K,bK as B,bO as J,bJ as Q,bL as U,bM as V,bP as W,bQ as Z,bD as q,c as C,l as X}from"./index-CsOndfWq.js";var m="Popover",[E]=H(m,[j]),x=j(),[Y,v]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,l=x(e),d=i.useRef(null),[p,u]=i.useState(!1),[f,P]=L({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(z,{...l,children:c.jsx(Y,{scope:e,contentId:G(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:p,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=n;return i.useEffect(()=>(a(),()=>l()),[a,l]),c.jsx(_,{...s,...r,ref:e})});y.displayName=F;var S="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(S,o),s=x(o),a=A(e,n.triggerRef),l=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?l:c.jsx(_,{asChild:!0,...s,children:l})});D.displayName=S;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",I=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});I.displayName=g;var te=J("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const l=a.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0,p=l.button===2||d;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return Q(),c.jsx(U,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(V,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:p,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(W,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(k,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(Z,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,le=y,pe=D,ue=M,de=I;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const l=s===void 0?"center":s,d=a===void 0?4:a;let p;e[6]!==o?(p=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==l||e[9]!==n||e[10]!==d||e[11]!==p?(u=c.jsx(de,{"data-slot":"popover-content",align:l,sideOffset:d,translate:"no",className:p,...n}),e[8]=l,e[9]=n,e[10]=d,e[11]=p,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as it,b as pt,r as mt,F as vt,j as e,l as et,B as tt,at as Ct}from"./index-DYLoE6lZ.js";import{_ as Nt,C as Dt}from"./agent-icon-CAaO4ypa.js";import{s as kt}from"./Plus-j4aDTi8e.js";import{S as St}from"./scroll-area-C9CkDOV0.js";import{aF as wt,l as zt,aA as Tt,aB as Et,aG as Pt,az as ct,aD as dt}from"./agent-site-editor-content-BAjBb750.js";import"./AlertCircle-xh90NARB.js";import"./Tool01-DG06N0su.js";import"./ArrowUp-4iK8zoCx.js";import"./ArrowLeft-Xffg7q8p.js";import"./LinkBroken01-wTJMvAdz.js";import"./ShoppingBag01-BJ4cJNkc.js";import"./ZoomOut-D4nHzX79.js";import"./Building02-DAEF4UrO.js";import"./CheckCircle-DUpC1qQ4.js";import"./ChevronUp-D_Wjh1Pp.js";import"./ChevronSelectorVertical-DCkH1mIQ.js";import"./UserSquare-B7AJhMXA.js";import"./Copy01-BdyOQaoT.js";import"./CreditCard01-YN58MJQp.js";import"./DotsVertical-C0q218c1.js";import"./Image01-Drnu_oTX.js";import"./Globe04-brrhloqP.js";import"./SwitchHorizontal01-6WEEE86B.js";import"./Key01-DXKey19o.js";import"./Link01-DAwi9mlM.js";import"./Monitor01-Bm_bTKyL.js";import"./Sun-D0UkgT29.js";import"./Play-CqIDE5zC.js";import"./SearchMd-DhQxjm00.js";import"./Trash01-C9lhbJs7.js";import"./Upload01-Bt337Shk.js";import"./User01-DXN8J2dA.js";import"./Users01-CHS_3A2d.js";import"./XClose-pteQuwAH.js";import"./index-BdQq_4o_.js";import"./agent-view-guard-1XKy1jVJ.js";import"./use-main-panel-tabs-BVPkp8pd.js";import"./use-chat-layout-state-DiI7M741.js";import"./use-file-configs-CiMmOBPH.js";import"./use-organization-settings-wIzO33y-.js";import"./schema-B7T6zvOr.js";import"./task-board-jYYT4T-P.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-4wb1SqGi.js";import"./use-mcp-client-CyZFCbXf.js";import"./auth-CFVKU9If.js";import"./thread-route-md0irSaA.js";import"./use-panel-navigate-BNghtY2T.js";import"./use-project-scope-kaofAo-2.js";import"./thread-intent-Cv8T2W7d.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-end_AVWu.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-BlwV3kYC.js";import"./use-mcp-tools-CqwLSwPQ.js";import"./types-D0iAHfi-.js";import"./utils-CVEq3hMx.js";import"./use-sandbox-events-DFZHFjJV.js";import"./chat-context-oLIKqlGE.js";import"./autosend-DqvDhR1V.js";import"./use-decopilot-events-LdqK-BR8.js";import"./use-ai-providers-C1zAqMn5.js";import"./use-chat-navigation-CoFd5UE7.js";import"./location-BjlyegC2.js";import"./tool-namespace-NA4CQCu7.js";import"./tooltip-D0bgPl8K.js";import"./index-Cql9s2oo.js";import"./drawer-BMuDp3pZ.js";import"./collection-search-CacvIdKe.js";import"./use-mobile-DsnBmTih.js";import"./use-mcp-prompts-hbtCEuPx.js";import"./usage-stats-DMZgLWXn.js";import"./form-CZcQhZCa.js";import"./label-COS7xlc4.js";import"./markdown-FpxtcMsE.js";import"./use-copy-BzyND5sN.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-Bv9QfIGh.js";import"./icon-button-DbTR-7FA.js";import"./file-type-icon-OOS78AjU.js";import"./shell-layout-BYblzqjk.js";import"./avatar-DC1Cmzej.js";import"./use-clock-tick-BMgzMfT6.js";import"./command-fqp-0b5f.js";import"./index-DcG5TBas.js";import"./integration-icon-CDrootbG.js";import"./project-icon-C-N3cJkz.js";import"./new-project-dialog-Bytx7uX5.js";import"./repository-import-picker-DgjVp-Rp.js";import"./use-navigate-to-agent-e1Fty-W6.js";import"./repository-picker-Dhir_mBD.js";import"./useInfiniteQuery-D4wBC58J.js";import"./infiniteQueryObserver-C-FPZrNN.js";import"./use-debounced-value-Bw9XyFDS.js";import"./required-auth-layout-rplY5gMF.js";import"./use-org-sso-BY1EpA2d.js";import"./chat-draft-Cgc2XQsH.js";import"./select-BTxDOmEz.js";import"./tabs-DsQwfF9n.js";import"./use-deco-credits-BwBAsZjN.js";import"./toggle-group-MxDdKb-A.js";import"./use-open-billing-url-CtVqEeze.js";import"./index-C9YSJ0Pi.js";import"./checkbox-DZ-_DOro.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CsrTLLWE.js";import"./input-B0wYSpb2.js";import"./suggestion-yrhgs0c3.js";import"./use-org-fs-XuRHX-wd.js";import"./question-004-sINsf4GQ.js";import"./use-members-0uvS2aBL.js";import"./use-org-auth-client--vi1jVLH.js";import"./feature-paywall-D03mknXg.js";import"./plan-ladder-ByxenYnr.js";import"./add-connection-dialog-BXB3P-4X.js";import"./extract-connection-data-DU6Jox_T.js";import"./metadata-D72DunRR.js";import"./connection-BCelELHr.js";import"./url-slug-CsF5_jEJ.js";import"./connection-card-BWXrChNc.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CXxxIkE2.js";import"./connection-form-helpers-DCUMal7M.js";import"./authenticate-and-persist-oauth-C4TrLSCm.js";import"./mcp-oauth-_2kQOfTH.js";import"./mcp-oauth-hlA0Q-1K.js";import"./collection-tabs-ywProb31.js";import"./badge-C85ocGTA.js";import"./use-infinite-scroll-CFznRnci.js";import"./useSuspenseInfiniteQuery-ZDUWj1v_.js";import"./use-task-board-events-DFFKnQzP.js";import"./pair-DfD0HGLO.js";import"./collapsible-D6DR3zQ4.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-oNRSzgIY.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-B-Hh_nak.js";import"./use-thread-outputs-BE4mR7oi.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-CIzsgPiq.js";import"./use-task-metadata-Bj-IbI9d.js";import"./virtual-mcp-C_TeGFZa.js";import"./feature-gate-BZc24_E5.js";import"./alert-dialog-DhiFzLmM.js";import"./runnable-block-editor-Cq2CDyKN.js";import"./claim-phase-copy--pyKC4gk.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./utils-DgqX0z1b.js";import"./monaco-editor-DOjflLD3.js";import"./editor-Dq4IMcxm.js";import"./calendar-BUi8IxeZ.js";import"./use-new-blocks-editor-CGtkQLL-.js";import"./rich-text-link-control-BlJN8nO0.js";import"./switch-Bv7OaKpB.js";import"./core.esm-C2_DCN6Y.js";import"./sortable.esm-BcPKBoEH.js";import"./combobox-DOrn42oJ.js";import"./search-input-CSa-vO3l.js";import"./asset-utils-RYK8HJ3w.js";import"./sandbox-git-api-C7JbVL7R.js";import"./mustache-CUJOpa04.js";import"./sandbox-lifecycle-context-qUf8Q_Xq.js";import"./empty-state-BV6Ywh9y.js";import"./empty-state-DvEOfDhm.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Bo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:l,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[v,C]=mt.useState(null),[rt]=vt(),[n,f]=mt.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,a,c,j,k,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==l||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);u="flex h-full w-full flex-col";let J;t[24]===Symbol.for("react.memo_cache_sentinel")?(J=()=>f(ct(new Date)),t[24]=J):J=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let _;t[27]!==I?(_=e.jsx(tt,{variant:"outline",size:"sm",onClick:J,children:I}),t[27]=I,t[28]=_):_=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let F;t[30]!==r?(F=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=F):F=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let H;t[33]!==F?(H=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:Q,"aria-label":F,children:V}),t[33]=F,t[34]=H):H=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let U;t[36]!==r?(U=r("sandbox.postCalendar.next"),t[36]=r,t[37]=U):U=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let $;t[39]!==U?($=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:X,"aria-label":U,children:Y}),t[39]=U,t[40]=$):$=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let O;t[43]!==r?(O=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=O):O=t[44];let A;t[45]!==O?(A=e.jsx(lt,{className:ft,label:O}),t[45]=O,t[46]=A):A=t[46];let R;t[47]!==r?(R=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=R):R=t[48];let K;t[49]!==R?(K=e.jsx(lt,{className:xt,label:R}),t[49]=R,t[50]=K):K=t[50];let W;t[51]!==A||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[A,K]}),t[51]=A,t[52]=K,t[53]=W):W=t[53],t[54]!==_||t[55]!==H||t[56]!==$||t[57]!==B||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[_,H,$,B,W]}),t[54]=_,t[55]=H,t[56]=$,t[57]=B,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",x=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let G;t[60]!==r?(G=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=G):G=t[61];let Z;t[62]!==G?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:G}),t[62]=G,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(m=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:ut.format(m)},m.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(m=>{const yt=m.getMonth()===n.getMonth(),jt=ht.get(Pt(m))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");C(null),at&&i(at,m)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",m.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:m.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>l(m),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(m)}),children:e.jsx(kt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},m.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(m=>e.jsx(nt,{entry:m,active:m.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},m.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=l,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=a,t[17]=c,t[18]=j,t[19]=k,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else x=t[14],u=t[15],a=t[16],c=t[17],j=t[18],k=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==k?(E=e.jsxs("div",{className:c,children:[j,k]}),t[64]=c,t[65]=j,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==z?(L=e.jsx(x,{className:z,children:P}),t[72]=x,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:u,children:[a,M]}),t[79]=u,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function lt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let i;return t[4]!==d||t[5]!==l?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,d]}),t[4]=d,t[5]=l,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:l,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==v?(C=D(v),t[0]=D,t[1]=v,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==l||t[9]!==s.key?(p=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==x||t[13]!==u?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{Bo as PostCalendar};
|
|
1
|
+
import{c as it,b as pt,r as mt,F as vt,j as e,l as et,B as tt,at as Ct}from"./index-CsOndfWq.js";import{_ as Nt,C as Dt}from"./agent-icon-B6BGlN8Z.js";import{s as kt}from"./Plus-4vFTW30B.js";import{S as St}from"./scroll-area-C8BYcujI.js";import{aF as wt,l as zt,aA as Tt,aB as Et,aG as Pt,az as ct,aD as dt}from"./agent-site-editor-content-2sl9AU9q.js";import"./AlertCircle-CIcaLchq.js";import"./Tool01-BJxIe84T.js";import"./ArrowUp-B8mx1ol5.js";import"./ArrowLeft-DfXjYrQi.js";import"./LinkBroken01-t0qEt8Lb.js";import"./ShoppingBag01-C6V1h_2Z.js";import"./ZoomOut-BwebNTOr.js";import"./Building02-BPQ9fMgU.js";import"./CheckCircle-ChTvVqPO.js";import"./ChevronUp-DckC0O5o.js";import"./ChevronSelectorVertical-zoEWZ9sC.js";import"./UserSquare-B4EnRc3E.js";import"./Copy01-Corfj4_5.js";import"./CreditCard01-DlMgd9ia.js";import"./DotsVertical-uTiOtqeH.js";import"./Image01-gtPlqhVq.js";import"./Globe04-CL3-GeAh.js";import"./SwitchHorizontal01-DN4m9K18.js";import"./Key01-BQnNEHGn.js";import"./Link01-BSAGxXho.js";import"./Monitor01-BIhKjgAf.js";import"./Sun-DlWI3pkK.js";import"./Play-Ba5tQ65L.js";import"./SearchMd-DqzvTdT2.js";import"./Trash01-Dvqfc9le.js";import"./Upload01-BxWCGLDw.js";import"./User01-Dh_l7uq-.js";import"./Users01-CIo5W1LA.js";import"./XClose-D59UZ-3l.js";import"./index-BdQq_4o_.js";import"./agent-view-guard-CGvorA84.js";import"./use-main-panel-tabs-z1NdoakW.js";import"./use-chat-layout-state-C60DGNO2.js";import"./use-file-configs-B6MWoy0P.js";import"./use-organization-settings-DxhpqnYO.js";import"./schema-D6ibRSPf.js";import"./task-board-B6zg05l8.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-CXF8Iqmd.js";import"./use-mcp-client-DaCLGUbW.js";import"./auth-CK5qaIjH.js";import"./thread-route-Cl51Xz5G.js";import"./use-panel-navigate-B75ATwR5.js";import"./use-project-scope-YpfqNFMB.js";import"./thread-intent-iex-fi8o.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BxFXPxOj.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-UE8r2cKi.js";import"./use-mcp-tools-B_v6Xc8f.js";import"./types-DHDp1Ix5.js";import"./utils-CVEq3hMx.js";import"./use-sandbox-events-BnBgyYjB.js";import"./chat-context-Dh5tO9W1.js";import"./autosend-CACWNbxC.js";import"./use-decopilot-events-BatPvp4V.js";import"./use-ai-providers-Cz8n-q9d.js";import"./use-chat-navigation-CyFm8cEg.js";import"./location-BjlyegC2.js";import"./tool-namespace-4DMlS5tP.js";import"./tooltip-UhT0N_rD.js";import"./index-DLLBoYqS.js";import"./drawer-C9byc45q.js";import"./collection-search-BPtx8G1f.js";import"./use-mobile-CSIXbJHF.js";import"./use-mcp-prompts-Cj8TKxv6.js";import"./usage-stats-CC8M4nNz.js";import"./form-CJ_Xz43P.js";import"./label-PMOCFxAK.js";import"./markdown-jtizwWYK.js";import"./use-copy-qR80P2m5.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-EIjvUWwG.js";import"./icon-button-HZupTrz9.js";import"./file-type-icon-D_YzVdyI.js";import"./shell-layout-J-egCYHs.js";import"./avatar-CFdg60BT.js";import"./use-clock-tick-BKZqeY5S.js";import"./command-CdSfLL9P.js";import"./index-C759w8PG.js";import"./integration-icon-D2n5_i5E.js";import"./project-icon-EnEce15b.js";import"./new-project-dialog-DNSDpVVm.js";import"./repository-import-picker-DqDsZx5W.js";import"./use-navigate-to-agent-CyIa0H8E.js";import"./repository-picker-DLkKyJUN.js";import"./useInfiniteQuery-C6j7p53s.js";import"./infiniteQueryObserver-pU9pZci3.js";import"./use-debounced-value-XS_u63Qy.js";import"./required-auth-layout-CVWrBxoR.js";import"./use-org-sso-Bhc1WrbS.js";import"./chat-draft-Bck3d8Ok.js";import"./select-CMFCWFoG.js";import"./tabs-DLw8-jiv.js";import"./use-deco-credits-BWgRmbgF.js";import"./toggle-group-DlGyqAyH.js";import"./use-open-billing-url-ByV0ShcL.js";import"./index-CcyJ-5NJ.js";import"./checkbox-BRl2nVIa.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-Cz5BF_3m.js";import"./input-D_3UHFsb.js";import"./suggestion-CzlBu15n.js";import"./use-org-fs-DcHowQO9.js";import"./question-004-sINsf4GQ.js";import"./use-members-COPm4P5W.js";import"./use-org-auth-client-DYKRjiNi.js";import"./feature-paywall-B43OWr6s.js";import"./plan-ladder-Bue-fGj1.js";import"./add-connection-dialog-BWXm_ufM.js";import"./extract-connection-data-DKxAapkS.js";import"./metadata-D72DunRR.js";import"./connection-KGhvUETQ.js";import"./url-slug-QrQmlYwX.js";import"./connection-card-CmOjRIm5.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DtmaxKHE.js";import"./connection-form-helpers-DwH5XcOW.js";import"./authenticate-and-persist-oauth-BqWfXARS.js";import"./mcp-oauth-CS7wEky-.js";import"./mcp-oauth-CtduGE9o.js";import"./collection-tabs-rDrGFt87.js";import"./badge-2H20v0nO.js";import"./use-infinite-scroll-BD4__gTJ.js";import"./useSuspenseInfiniteQuery-LN6pz4nD.js";import"./use-task-board-events-CMdVOm7R.js";import"./pair-B5n9SRL4.js";import"./collapsible-CQEd_xSV.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-URE_9VC7.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-DDYhwyXr.js";import"./use-thread-outputs-PwDDA0de.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-DfIQZFlu.js";import"./use-task-metadata-DSX2LZld.js";import"./virtual-mcp-DUsuHWMj.js";import"./feature-gate-DthOZE3T.js";import"./alert-dialog-G7y5OQF6.js";import"./runnable-block-editor-Cr3HQlva.js";import"./claim-phase-copy-De8hliCj.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./utils-VljhGZNh.js";import"./monaco-editor--q8pYjVp.js";import"./editor-vTtvQU6U.js";import"./calendar-BYqJ2k4j.js";import"./use-new-blocks-editor-CFDJQWsr.js";import"./rich-text-link-control-mLwtvxkK.js";import"./switch-CkoldjL2.js";import"./core.esm-gbvtUb0d.js";import"./sortable.esm-D8MkW_Mj.js";import"./combobox-CUJidMCM.js";import"./search-input-ChI_JhrH.js";import"./asset-utils-C3b9KJ52.js";import"./sandbox-git-api-C7JbVL7R.js";import"./mustache-CwOtagWC.js";import"./sandbox-lifecycle-context-CyWspjuL.js";import"./empty-state-OuooYiXX.js";import"./empty-state-MzgkrW8i.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Bo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:l,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[v,C]=mt.useState(null),[rt]=vt(),[n,f]=mt.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,a,c,j,k,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==l||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);u="flex h-full w-full flex-col";let J;t[24]===Symbol.for("react.memo_cache_sentinel")?(J=()=>f(ct(new Date)),t[24]=J):J=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let _;t[27]!==I?(_=e.jsx(tt,{variant:"outline",size:"sm",onClick:J,children:I}),t[27]=I,t[28]=_):_=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let F;t[30]!==r?(F=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=F):F=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let H;t[33]!==F?(H=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:Q,"aria-label":F,children:V}),t[33]=F,t[34]=H):H=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let U;t[36]!==r?(U=r("sandbox.postCalendar.next"),t[36]=r,t[37]=U):U=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let $;t[39]!==U?($=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:X,"aria-label":U,children:Y}),t[39]=U,t[40]=$):$=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let O;t[43]!==r?(O=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=O):O=t[44];let A;t[45]!==O?(A=e.jsx(lt,{className:ft,label:O}),t[45]=O,t[46]=A):A=t[46];let R;t[47]!==r?(R=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=R):R=t[48];let K;t[49]!==R?(K=e.jsx(lt,{className:xt,label:R}),t[49]=R,t[50]=K):K=t[50];let W;t[51]!==A||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[A,K]}),t[51]=A,t[52]=K,t[53]=W):W=t[53],t[54]!==_||t[55]!==H||t[56]!==$||t[57]!==B||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[_,H,$,B,W]}),t[54]=_,t[55]=H,t[56]=$,t[57]=B,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",x=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let G;t[60]!==r?(G=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=G):G=t[61];let Z;t[62]!==G?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:G}),t[62]=G,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(m=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:ut.format(m)},m.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(m=>{const yt=m.getMonth()===n.getMonth(),jt=ht.get(Pt(m))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");C(null),at&&i(at,m)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",m.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:m.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>l(m),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(m)}),children:e.jsx(kt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},m.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(m=>e.jsx(nt,{entry:m,active:m.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},m.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=l,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=a,t[17]=c,t[18]=j,t[19]=k,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else x=t[14],u=t[15],a=t[16],c=t[17],j=t[18],k=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==k?(E=e.jsxs("div",{className:c,children:[j,k]}),t[64]=c,t[65]=j,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==z?(L=e.jsx(x,{className:z,children:P}),t[72]=x,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:u,children:[a,M]}),t[79]=u,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function lt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let i;return t[4]!==d||t[5]!==l?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,d]}),t[4]=d,t[5]=l,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:l,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==v?(C=D(v),t[0]=D,t[1]=v,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==l||t[9]!==s.key?(p=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==x||t[13]!==u?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{Bo as PostCalendar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as Z,aa as st,r as Q,j as t,B as Te,D as ot,q as it,s as lt,v as at,aK as nt,ah as rt,l as Ye,w as ct,t as De,a6 as dt,h as pt,c as Be,I as we}from"./index-
|
|
1
|
+
import{b as Z,aa as st,r as Q,j as t,B as Te,D as ot,q as it,s as lt,v as at,aK as nt,ah as rt,l as Ye,w as ct,t as De,a6 as dt,h as pt,c as Be,I as we}from"./index-CsOndfWq.js";import{u as mt}from"./chat-context-Dh5tO9W1.js";import{i as $e}from"./AlertCircle-CIcaLchq.js";import{a5 as ut,aq as xt,an as ft,t as gt}from"./agent-icon-B6BGlN8Z.js";import{d as ht}from"./UserSquare-B4EnRc3E.js";import{s as bt}from"./Trash01-Dvqfc9le.js";import{s as jt}from"./XClose-D59UZ-3l.js";import{f as vt,e as yt,b as St,A as Et,a as kt,d as Nt,c as Ct,g as Pt}from"./alert-dialog-G7y5OQF6.js";import{L as J}from"./label-PMOCFxAK.js";import{M as Tt}from"./multi-select-B5EYUvVe.js";import{b as Dt,a as Lt,T as Ve,c as Ge}from"./tabs-DLw8-jiv.js";import{S as wt}from"./switch-CkoldjL2.js";import{T as Ke}from"./textarea-DtmaxKHE.js";import{u as Bt,aw as At,d as Ft,ax as Ie,ay as zt,az as It}from"./runnable-block-editor-Cr3HQlva.js";import{f as $t,a as Rt,b as qt,c as Me,B as Ot,R as _t}from"./block-document-BJBufMup.js";import{b as Ht,C as Vt,K as Gt}from"./blog-schema-C3v2xT_H.js";import{b as Mt,l as Ut,u as Wt,g as Yt,a as Kt,s as Qt,h as Jt,c as I,d as Xt,m as Zt,e as Ue,E as es,p as Qe,f as ts,i as Je,R as ss,j as os,k as is,o as ls,A as as,P as ns,q as rs}from"./agent-site-editor-content-2sl9AU9q.js";import{b as Re,T as qe,a as Oe}from"./tooltip-UhT0N_rD.js";import{i as cs}from"./Link01-BSAGxXho.js";import{u as ds}from"./use-ai-providers-Cz8n-q9d.js";import{u as ps}from"./mustache-CwOtagWC.js";import{a as ms}from"./use-fast-preview-draft-url-mXiWjLYU.js";import{u as us}from"./use-autosave-BgX70Gz2.js";import"./use-panel-navigate-B75ATwR5.js";import"./thread-route-Cl51Xz5G.js";import"./use-project-scope-YpfqNFMB.js";import"./repository-binding-CXF8Iqmd.js";import"./use-mcp-client-DaCLGUbW.js";import"./auth-CK5qaIjH.js";import"./autosend-CACWNbxC.js";import"./thread-intent-iex-fi8o.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BxFXPxOj.js";import"./task-board-B6zg05l8.js";import"./schema-D6ibRSPf.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-BatPvp4V.js";import"./use-chat-navigation-CyFm8cEg.js";import"./location-BjlyegC2.js";import"./use-organization-settings-DxhpqnYO.js";import"./Tool01-BJxIe84T.js";import"./ArrowUp-B8mx1ol5.js";import"./ArrowLeft-DfXjYrQi.js";import"./LinkBroken01-t0qEt8Lb.js";import"./ShoppingBag01-C6V1h_2Z.js";import"./ZoomOut-BwebNTOr.js";import"./Building02-BPQ9fMgU.js";import"./CheckCircle-ChTvVqPO.js";import"./ChevronUp-DckC0O5o.js";import"./ChevronSelectorVertical-zoEWZ9sC.js";import"./Copy01-Corfj4_5.js";import"./CreditCard01-DlMgd9ia.js";import"./DotsVertical-uTiOtqeH.js";import"./Image01-gtPlqhVq.js";import"./Globe04-CL3-GeAh.js";import"./SwitchHorizontal01-DN4m9K18.js";import"./Key01-BQnNEHGn.js";import"./Monitor01-BIhKjgAf.js";import"./Sun-DlWI3pkK.js";import"./Play-Ba5tQ65L.js";import"./Plus-4vFTW30B.js";import"./SearchMd-DqzvTdT2.js";import"./Upload01-BxWCGLDw.js";import"./User01-Dh_l7uq-.js";import"./Users01-CIo5W1LA.js";import"./badge-2H20v0nO.js";import"./checkbox-BRl2nVIa.js";import"./command-CdSfLL9P.js";import"./index-C759w8PG.js";import"./popover-Cz5BF_3m.js";import"./input-EIjvUWwG.js";import"./usage-stats-CC8M4nNz.js";import"./tool-namespace-4DMlS5tP.js";import"./form-CJ_Xz43P.js";import"./utils-CVEq3hMx.js";import"./markdown-jtizwWYK.js";import"./use-copy-qR80P2m5.js";import"./use-mobile-CSIXbJHF.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-HZupTrz9.js";import"./file-type-icon-D_YzVdyI.js";import"./shell-layout-J-egCYHs.js";import"./avatar-CFdg60BT.js";import"./use-clock-tick-BKZqeY5S.js";import"./integration-icon-D2n5_i5E.js";import"./project-icon-EnEce15b.js";import"./new-project-dialog-DNSDpVVm.js";import"./repository-import-picker-DqDsZx5W.js";import"./use-navigate-to-agent-CyIa0H8E.js";import"./repository-picker-DLkKyJUN.js";import"./useInfiniteQuery-C6j7p53s.js";import"./infiniteQueryObserver-pU9pZci3.js";import"./collection-search-BPtx8G1f.js";import"./use-debounced-value-XS_u63Qy.js";import"./required-auth-layout-CVWrBxoR.js";import"./use-org-sso-Bhc1WrbS.js";import"./chat-draft-Bck3d8Ok.js";import"./select-CMFCWFoG.js";import"./index-BdQq_4o_.js";import"./index-DLLBoYqS.js";import"./use-deco-credits-BWgRmbgF.js";import"./toggle-group-DlGyqAyH.js";import"./use-open-billing-url-ByV0ShcL.js";import"./index-CcyJ-5NJ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./drawer-C9byc45q.js";import"./input-D_3UHFsb.js";import"./suggestion-CzlBu15n.js";import"./use-chat-layout-state-C60DGNO2.js";import"./use-file-configs-B6MWoy0P.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-Cj8TKxv6.js";import"./use-org-fs-DcHowQO9.js";import"./question-004-sINsf4GQ.js";import"./use-members-COPm4P5W.js";import"./use-org-auth-client-DYKRjiNi.js";import"./feature-paywall-B43OWr6s.js";import"./plan-ladder-Bue-fGj1.js";import"./add-connection-dialog-BWXm_ufM.js";import"./extract-connection-data-DKxAapkS.js";import"./metadata-D72DunRR.js";import"./connection-KGhvUETQ.js";import"./url-slug-QrQmlYwX.js";import"./connection-card-CmOjRIm5.js";import"./connection-slug-CITJ0kGN.js";import"./use-connection-UE8r2cKi.js";import"./connection-form-helpers-DwH5XcOW.js";import"./authenticate-and-persist-oauth-BqWfXARS.js";import"./mcp-oauth-CS7wEky-.js";import"./mcp-oauth-CtduGE9o.js";import"./collection-tabs-rDrGFt87.js";import"./use-infinite-scroll-BD4__gTJ.js";import"./useSuspenseInfiniteQuery-LN6pz4nD.js";import"./use-task-board-events-CMdVOm7R.js";import"./claim-phase-copy-De8hliCj.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-B5n9SRL4.js";import"./collapsible-CQEd_xSV.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-URE_9VC7.js";import"./types-DHDp1Ix5.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-DDYhwyXr.js";import"./use-thread-outputs-PwDDA0de.js";import"./utils-VljhGZNh.js";import"./scroll-area-C8BYcujI.js";import"./monaco-editor--q8pYjVp.js";import"./editor-vTtvQU6U.js";import"./calendar-BYqJ2k4j.js";import"./use-new-blocks-editor-CFDJQWsr.js";import"./rich-text-link-control-mLwtvxkK.js";import"./core.esm-gbvtUb0d.js";import"./sortable.esm-D8MkW_Mj.js";import"./combobox-CUJidMCM.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-ChI_JhrH.js";import"./asset-utils-C3b9KJ52.js";import"./sandbox-git-api-C7JbVL7R.js";import"./section-preview-url-7zfngvgW.js";import"./product-picker-dialog-DI1rZSm9.js";import"./index-BZvXKYts.js";import"./agent-view-guard-CGvorA84.js";import"./use-main-panel-tabs-z1NdoakW.js";import"./use-mcp-tools-B_v6Xc8f.js";import"./use-sandbox-events-BnBgyYjB.js";import"./resolve-tab-icon-DfIQZFlu.js";import"./use-task-metadata-DSX2LZld.js";import"./virtual-mcp-DUsuHWMj.js";import"./feature-gate-DthOZE3T.js";import"./sandbox-lifecycle-context-CyWspjuL.js";import"./empty-state-OuooYiXX.js";import"./empty-state-MzgkrW8i.js";const Le=r=>typeof r=="string"?r:"",xs={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"};function Xe(r){const e=[];let o=0,n=!1;for(;o<r.length;){if(r[o]==="<"){const m=r.indexOf(">",o);o=m<0?r.length:m+1;continue}let s=r[o]??"",c=o+1;if(r[o]==="&"){const m=r.indexOf(";",o);if(m>=0&&m-o<=10){const i=xs[r.slice(o,m+1).toLowerCase()];i!==void 0&&(s=i,c=m+1)}}const a=o;if(o=c,/\s/.test(s)){if(n){const m=e[e.length-1];m&&(m.end=c);continue}e.push({ch:" ",start:a,end:c}),n=!0}else e.push({ch:s,start:a,end:c}),n=!1}return{text:e.map(s=>s.ch).join(""),chars:e}}function fs(r){return Xe(r).text.trim()}function gs(r){const e=[];for(const o of r)switch(Mt(Le(o.__resolveType))){case"Paragraph":e.push(fs(Le(o.html)));break;case"Heading":e.push(Le(o.text));break;case"Quote":e.push(Le(o.quote));break;case"List":e.push(Le(o.items));break}return e.filter(Boolean).join(`
|
|
2
2
|
`)}function hs(r){return r.replace(/&/g,"&").replace(/"/g,""")}function bs(r,e){const o=r.slice(0,e);return o.lastIndexOf("<a")>o.lastIndexOf("</a")}function js(r,e,o){const n=e.trim();if(!n||!o)return{blocks:r,applied:!1};for(let s=0;s<r.length;s++){const c=r[s];if(!c||typeof c.html!="string")continue;const a=c.html,{text:m,chars:i}=Xe(a);let d=m.indexOf(n);for(;d>=0;){const f=i[d],u=i[d+n.length-1];if(f&&u){const l=f.start,j=u.end,p=a.slice(l,j);if(!p.includes("<")&&!bs(a,l)){const g=a.slice(0,l)+`<a href="${hs(o)}">${p}</a>`+a.slice(j),x=r.slice();return x[s]={...c,html:g},{blocks:x,applied:!0}}}d=m.indexOf(n,d+1)}}return{blocks:r,applied:!1}}function vs(r,e){let o=r,n=0;for(const s of e){const c=js(o,s.quote,s.href);c.applied&&(o=c.blocks,n++)}return{blocks:o,applied:n}}function ys({virtualMcpId:r,decofile:e,sections:o,currentKey:n,hasAi:s,onApply:c}){const a=Z(),m=st(),[i,d]=Q.useState(!1),[f,u]=Q.useState(!1),[l,j]=Q.useState([]),[p,g]=Q.useState(new Set),x=$t(e),y=Ut(e).filter(h=>h.key!==n&&h.slug),T=async()=>{u(!0);try{const h=gs(o),E=await m.call("BLOG_SITE_GROUND",{virtualMcpId:r,purpose:"link"}).catch(N=>{console.warn("[linkSuggest] grounding failed",N)}),k=await m.call("BLOG_LINK_SUGGEST",{virtualMcpId:r,body:h,posts:y.map(N=>({title:N.title,slug:N.slug})),grounding:E?{report:E.report,outcome:E.outcome}:void 0}),P=[],L=new Set;for(const N of k.suggestions){const C=y.find($=>$.slug===N.slug);if(!C||!x)continue;const U=Rt(x,{category:C.categorySlugs[0]??"",slug:C.slug});if(!U||!h.includes(N.quote))continue;const B=`${N.quote}→${C.slug}`;L.has(B)||(L.add(B),P.push({quote:N.quote,href:U,title:C.title}))}j(P),g(new Set(P.map((N,C)=>C))),d(!0),P.length===0&&De.info(a("sandbox.linkSuggest.none"))}catch(h){De.error(h instanceof Error?h.message:a("sandbox.linkSuggest.failed"))}finally{u(!1)}},D=h=>g(E=>{const k=new Set(E);return k.has(h)?k.delete(h):k.add(h),k}),b=()=>{const h=l.filter((P,L)=>p.has(L)).map(P=>({quote:P.quote,href:P.href})),{blocks:E,applied:k}=vs(o,h);c(E),d(!1),De.success(a("sandbox.linkSuggest.applied",{count:String(k)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:f||!s||y.length===0,title:s?y.length===0?a("sandbox.linkSuggest.noCandidates"):a("sandbox.linkSuggest.hint"):a("sandbox.autonomous.noAiProvider"),onClick:()=>{T()},children:[f?t.jsx(ut,{size:14,className:"animate-spin"}):t.jsx(cs,{size:14}),a("sandbox.linkSuggest.button")]}),t.jsx(ot,{open:i,onOpenChange:d,children:t.jsxs(it,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(lt,{children:[t.jsx(at,{children:a("sandbox.linkSuggest.title")}),t.jsx(nt,{children:a("sandbox.linkSuggest.description")})]}),l.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:l.map((h,E)=>{const k=p.has(E);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(E),"aria-pressed":k,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-muted/50",children:[t.jsx("span",{className:Ye("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",k?"border-primary bg-primary text-primary-foreground":"border-input"),children:k&&t.jsx(rt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",h.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",h.title]})]})]})},`${h.quote}-${h.href}`)})}),t.jsx(ct,{children:t.jsx(Te,{type:"button",disabled:p.size===0,onClick:b,children:a("sandbox.linkSuggest.apply",{count:String(p.size)})})})]})})]})}function Ss(r){return Array.isArray(r)?r.map(e=>({key:I(e?.key),value:I(e?.value)})):[]}function Vl({orgSlug:r,virtualMcpId:e,branch:o,blockKey:n,block:s,decofile:c,meta:a,previewBaseUrl:m,move:i,onClose:d,expanded:f,onToggleExpand:u}){const l=Z(),j=mt()?.taskId??null,p=Bt({orgSlug:r,virtualMcpId:e,branch:o}),g=ps({orgSlug:r,virtualMcpId:e,branch:o}),x=ds().length>0,y=Wt(),T=ms({orgSlug:r,virtualMcpId:e,branch:o}),D=Yt(s,"posts"),[b,h,E,k]=us(D,v=>{p.mutate({blockKey:n,data:Kt(n,Qt(v))})},{isSaving:p.isPending}),[P,L]=Q.useState(n);P!==n&&(L(n),E(D));const N=v=>{E(b),i.apply(n,v,b)},C=(v,A)=>h({...b,[v]:A}),U=Ht("posts",a,Gt),B=Ft((v,A)=>p.mutate({blockKey:v,data:A})),[$,R]=Q.useState(0),F=qt({decofile:c,post:b,previewBaseUrl:m,draftPointer:T}),q=Jt(c,"posts",n,I(b.title)),O=Xt(b),[_,H]=Q.useState(!1),V=async()=>{E(b);try{await g.mutateAsync({blockKey:n}),De.success(l("sandbox.postEditor.deletePostSuccess",{title:I(b.title)})),H(!1),d?.()}catch(v){De.error(v instanceof Error?v.message:l("sandbox.postEditor.deletePostFailed"))}},w=Zt(b),G=w.length>0,M=w.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:Ue(w,l)}):l("sandbox.postEditor.missingFieldPlural",{fields:Ue(w,l)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(At,{isPending:p.isPending||k,isError:p.isError}),G&&t.jsxs(Re,{children:[t.jsx(qe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx($e,{size:14}),w.length," ",w.length===1?l("sandbox.postEditor.issueSingular"):l("sandbox.postEditor.issuePlural")]})}),t.jsx(Oe,{side:"bottom",children:M})]})]}),(u||d)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[u&&t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:u,title:l(f?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:f?t.jsx(xt,{size:16}):t.jsx(ft,{size:16})}),d&&t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:d,title:l("sandbox.postBoard.close"),children:t.jsx(jt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(es,{value:I(b.title),onChange:v=>C("title",v),placeholder:l("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),q&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx($e,{size:14,className:"mt-px shrink-0"}),l("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(Dt,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(Lt,{children:[t.jsxs(Ve,{value:"content",children:[t.jsx(ht,{}),l("sandbox.postEditor.contentTab")]}),t.jsxs(Ve,{value:"settings",children:[t.jsx(gt,{}),l("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[O&&t.jsxs(Re,{children:[t.jsx(qe,{asChild:!0,children:t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground hover:text-destructive","aria-label":l("sandbox.postEditor.deletePost"),onClick:()=>H(!0),children:t.jsx(bt,{size:14})})}),t.jsx(Oe,{side:"bottom",children:l("sandbox.postEditor.deletePost")})]}),y&&t.jsx(ys,{decofile:c,virtualMcpId:e,sections:Me(b.sections),currentKey:n,hasAi:x,onApply:v=>{C("sections",v),R(A=>A+1)}}),t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:!F,title:l(F?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{F&&window.open(F,"_blank","noopener,noreferrer")},children:[t.jsx(dt,{size:14}),l("sandbox.postEditor.seePreview")]})]})]}),t.jsx(Ge,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Ot,{value:Me(b.sections),onChange:v=>C("sections",v),meta:a,decofile:c,sandboxRef:{orgSlug:r,virtualMcpId:e,branch:o,threadId:j},previewBaseUrl:m,onSaveReferencedBlock:B,emptyMessage:l("sandbox.postEditor.noContentYet")},$)})}),t.jsx(Ge,{value:"settings",children:t.jsxs("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:[t.jsx(ks,{post:b,decofile:c,onChange:C,blockKey:n,move:i,onMoveStatus:N}),t.jsx(Vt,{schema:U,value:b,onChange:h,basePath:"post",meta:a,decofile:c,sandbox:{orgSlug:r,virtualMcpId:e,branch:o,threadId:j},onSaveReferencedBlock:B})]})})]})]})}),t.jsx(vt,{open:_,onOpenChange:v=>{!v&&!g.isPending&&H(!1)},children:t.jsxs(yt,{children:[t.jsxs(St,{children:[t.jsx(Et,{children:l("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(kt,{children:l("sandbox.postEditor.deletePostConfirmBody",{title:I(b.title)||l("sandbox.postBoard.untitled")})})]}),t.jsxs(Nt,{children:[t.jsx(Ct,{disabled:g.isPending,children:l("sandbox.postEditor.deletePostCancel")}),t.jsx(Pt,{onClick:v=>{v.preventDefault(),V()},disabled:g.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g.isPending?t.jsxs(t.Fragment,{children:[t.jsx(pt,{className:"size-3.5"}),l("sandbox.postEditor.deletingPost")]}):l("sandbox.postEditor.deletePost")})]})]})})]})}function Es(r){const e=Be.c(15),{blockKey:o,post:n,move:s,onMoveStatus:c}=r,a=Z();let m;e[0]!==n?(m=Qe(n),e[0]=n,e[1]=m):m=e[1];const i=m;let d,f;if(e[2]!==o||e[3]!==i||e[4]!==s||e[5]!==c||e[6]!==n||e[7]!==a){let l;e[10]!==i?(l=p=>p!=="generating"||i==="generating",e[10]=i,e[11]=l):l=e[11];const j=ns.filter(l);d="flex flex-wrap gap-1.5",f=j.map(p=>{const g=p===i,x=g?null:s.refuse(o,p,n);return t.jsxs(Re,{children:[t.jsx(qe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!x,"aria-pressed":g,onClick:()=>c(p),className:Ye("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",g?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-muted",x&&"cursor-not-allowed opacity-50"),children:a(rs[p])})})}),x&&t.jsx(Oe,{side:"bottom",children:s.reasonText(x)})]},p)}),e[2]=o,e[3]=i,e[4]=s,e[5]=c,e[6]=n,e[7]=a,e[8]=d,e[9]=f}else d=e[8],f=e[9];let u;return e[12]!==d||e[13]!==f?(u=t.jsx("div",{className:d,children:f}),e[12]=d,e[13]=f,e[14]=u):u=e[14],u}function ks(r){const e=Be.c(166),{post:o,decofile:n,onChange:s,blockKey:c,move:a,onMoveStatus:m}=r,i=Z();let d;e[0]!==o?(d=Qe(o),e[0]=o,e[1]=d):d=e[1];const u=d==="scheduled";let l;e[2]!==o.slug?(l=I(o.slug),e[2]=o.slug,e[3]=l):l=e[3];const j=l,[p,g]=Q.useState(j),[x,y]=Q.useState(null),[T,D]=Q.useState(j);T!==j&&(D(j),g(j));let b;e[4]!==c||e[5]!==j||e[6]!==n||e[7]!==s||e[8]!==p||e[9]!==i?(b=()=>{const S=os(p);if(g(S),S===j)return;if(!S){y(null),s("slug","");return}const _e=Je(n,"posts").filter(tt=>tt.key!==c).map(Ps).filter(Boolean);if(!_e.includes(S)){y(null),s("slug",S);return}const ze=is(S,_e),He=i("sandbox.postEditor.slugDeduped",{slug:ze});g(ze),y(He),De.info(He),s("slug",ze)},e[4]=c,e[5]=j,e[6]=n,e[7]=s,e[8]=p,e[9]=i,e[10]=b):b=e[10];const h=b;let E;e[11]!==i?(E=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=E):E=e[12];let k;e[13]!==E?(k=t.jsx(J,{children:E}),e[13]=E,e[14]=k):k=e[14];let P;e[15]!==c||e[16]!==a||e[17]!==m||e[18]!==o?(P=t.jsx(Es,{blockKey:c,post:o,move:a,onMoveStatus:m}),e[15]=c,e[16]=a,e[17]=m,e[18]=o,e[19]=P):P=e[19];let L;e[20]!==k||e[21]!==P?(L=t.jsxs("div",{className:"space-y-2",children:[k,P]}),e[20]=k,e[21]=P,e[22]=L):L=e[22];let N;e[23]!==u||e[24]!==s||e[25]!==o.scheduledDatetime||e[26]!==i?(N=u&&t.jsx(Ie,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:I(o.scheduledDatetime),onChange:S=>s("scheduledDatetime",S),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=u,e[24]=s,e[25]=o.scheduledDatetime,e[26]=i,e[27]=N):N=e[27];let C;e[28]!==L||e[29]!==N?(C=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[L,N]}),e[28]=L,e[29]=N,e[30]=C):C=e[30];let U;e[31]!==i?(U=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=U):U=e[32];let B;e[33]!==U?(B=t.jsx(J,{htmlFor:"post-excerpt",children:U}),e[33]=U,e[34]=B):B=e[34];let $;e[35]!==o.excerpt?($=I(o.excerpt),e[35]=o.excerpt,e[36]=$):$=e[36];let R;e[37]!==s?(R=S=>s("excerpt",S.target.value),e[37]=s,e[38]=R):R=e[38];let F;e[39]!==$||e[40]!==R?(F=t.jsx(Ke,{id:"post-excerpt",value:$,onChange:R,rows:2}),e[39]=$,e[40]=R,e[41]=F):F=e[41];let q;e[42]!==B||e[43]!==F?(q=t.jsxs("div",{className:"space-y-2",children:[B,F]}),e[42]=B,e[43]=F,e[44]=q):q=e[44];let O;e[45]!==i?(O=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=O):O=e[46];let _;e[47]!==O?(_=t.jsx(J,{htmlFor:"post-slug",children:O}),e[47]=O,e[48]=_):_=e[48];let H;e[49]===Symbol.for("react.memo_cache_sentinel")?(H=S=>{y(null),g(ls(S.target.value))},e[49]=H):H=e[49];let V;e[50]!==i?(V=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=V):V=e[51];let w;e[52]!==h||e[53]!==p||e[54]!==V?(w=t.jsx(we,{id:"post-slug",value:p,onChange:H,onBlur:h,placeholder:V,maxLength:80,className:"h-10"}),e[52]=h,e[53]=p,e[54]=V,e[55]=w):w=e[55];let G;e[56]!==x?(G=x&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx($e,{size:14,className:"mt-px shrink-0"}),x]}),e[56]=x,e[57]=G):G=e[57];let M;e[58]!==_||e[59]!==w||e[60]!==G?(M=t.jsxs("div",{className:"space-y-2",children:[_,w,G]}),e[58]=_,e[59]=w,e[60]=G,e[61]=M):M=e[61];let v;e[62]!==i?(v=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=v):v=e[63];let A;e[64]!==v?(A={type:"string",format:"date",title:v},e[64]=v,e[65]=A):A=e[65];let W;e[66]!==o.date?(W=I(o.date),e[66]=o.date,e[67]=W):W=e[67];let Y;e[68]!==s?(Y=S=>s("date",S),e[68]=s,e[69]=Y):Y=e[69];let K;e[70]!==i?(K=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=K):K=e[71];let z;e[72]!==A||e[73]!==W||e[74]!==Y||e[75]!==K?(z=t.jsx(Ie,{schema:A,value:W,onChange:Y,path:"post-date",label:K}),e[72]=A,e[73]=W,e[74]=Y,e[75]=K,e[76]=z):z=e[76];let X;e[77]!==i?(X=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=X):X=e[78];let ee;e[79]!==X?(ee={type:"integer",title:X},e[79]=X,e[80]=ee):ee=e[80];const Fe=typeof o.readTime=="number"?o.readTime:void 0;let te;e[81]!==s?(te=S=>s("readTime",S),e[81]=s,e[82]=te):te=e[82];let se;e[83]!==i?(se=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=se):se=e[84];let oe;e[85]!==ee||e[86]!==Fe||e[87]!==te||e[88]!==se?(oe=t.jsx(zt,{schema:ee,value:Fe,onChange:te,path:"post-read-time",label:se}),e[85]=ee,e[86]=Fe,e[87]=te,e[88]=se,e[89]=oe):oe=e[89];let ie;e[90]!==M||e[91]!==z||e[92]!==oe?(ie=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M,z,oe]}),e[90]=M,e[91]=z,e[92]=oe,e[93]=ie):ie=e[93];const Ze=o.image,et=o.mobileImage;let le,ae;e[94]!==s?(le=S=>s("image",S),ae=S=>s("mobileImage",S),e[94]=s,e[95]=le,e[96]=ae):(le=e[95],ae=e[96]);let ne;e[97]!==o.alt?(ne=I(o.alt),e[97]=o.alt,e[98]=ne):ne=e[98];let re;e[99]!==i?(re=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=re):re=e[100];let ce;e[101]!==o.image||e[102]!==o.mobileImage||e[103]!==le||e[104]!==ae||e[105]!==ne||e[106]!==re?(ce=t.jsx(_t,{value:Ze,mobileValue:et,onChange:le,onMobileChange:ae,alt:ne,label:re}),e[101]=o.image,e[102]=o.mobileImage,e[103]=le,e[104]=ae,e[105]=ne,e[106]=re,e[107]=ce):ce=e[107];let de;e[108]!==i?(de=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=de):de=e[109];let pe;e[110]!==i?(pe=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=pe):pe=e[111];let me;e[112]!==de||e[113]!==pe?(me={type:"string",title:de,description:pe},e[112]=de,e[113]=pe,e[114]=me):me=e[114];let ue;e[115]!==o.alt?(ue=I(o.alt),e[115]=o.alt,e[116]=ue):ue=e[116];let xe;e[117]!==s?(xe=S=>s("alt",S),e[117]=s,e[118]=xe):xe=e[118];let fe;e[119]!==i?(fe=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=fe):fe=e[120];let ge;e[121]!==me||e[122]!==ue||e[123]!==xe||e[124]!==fe?(ge=t.jsx(Ie,{schema:me,value:ue,onChange:xe,path:"post-alt",label:fe}),e[121]=me,e[122]=ue,e[123]=xe,e[124]=fe,e[125]=ge):ge=e[125];let he;e[126]!==ce||e[127]!==ge?(he=t.jsxs("div",{className:"space-y-2",children:[ce,ge]}),e[126]=ce,e[127]=ge,e[128]=he):he=e[128];let be;e[129]!==i?(be=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=be):be=e[130];let je;e[131]!==s?(je=S=>s("authors",S),e[131]=s,e[132]=je):je=e[132];let ve;e[133]!==n||e[134]!==o.authors||e[135]!==be||e[136]!==je?(ve=t.jsx(We,{label:be,decofile:n,kind:"authors",valueField:"email",toRef:Cs,selected:o.authors,onChange:je}),e[133]=n,e[134]=o.authors,e[135]=be,e[136]=je,e[137]=ve):ve=e[137];let ye;e[138]!==i?(ye=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=ye):ye=e[139];let Se;e[140]!==s?(Se=S=>s("categories",S),e[140]=s,e[141]=Se):Se=e[141];let Ee;e[142]!==n||e[143]!==o.categories||e[144]!==ye||e[145]!==Se?(Ee=t.jsx(We,{label:ye,decofile:n,kind:"categories",valueField:"slug",toRef:Ns,selected:o.categories,onChange:Se}),e[142]=n,e[143]=o.categories,e[144]=ye,e[145]=Se,e[146]=Ee):Ee=e[146];let ke;e[147]!==s?(ke=S=>s("extraProps",S),e[147]=s,e[148]=ke):ke=e[148];let Ne;e[149]!==o.extraProps||e[150]!==ke?(Ne=t.jsx(Ds,{value:o.extraProps,onChange:ke}),e[149]=o.extraProps,e[150]=ke,e[151]=Ne):Ne=e[151];let Ce;e[152]!==s?(Ce=S=>s("seo",S),e[152]=s,e[153]=Ce):Ce=e[153];let Pe;e[154]!==o.seo||e[155]!==Ce?(Pe=t.jsx(Ts,{value:o.seo,onChange:Ce}),e[154]=o.seo,e[155]=Ce,e[156]=Pe):Pe=e[156];let Ae;return e[157]!==q||e[158]!==ie||e[159]!==he||e[160]!==ve||e[161]!==Ee||e[162]!==Ne||e[163]!==Pe||e[164]!==C?(Ae=t.jsxs("div",{className:"space-y-5",children:[C,q,ie,he,ve,Ee,Ne,Pe]}),e[157]=q,e[158]=ie,e[159]=he,e[160]=ve,e[161]=Ee,e[162]=Ne,e[163]=Pe,e[164]=C,e[165]=Ae):Ae=e[165],Ae}function Ns(r){return{name:I(r.name),slug:I(r.slug)}}function Cs(r){return{...r}}function Ps(r){return I(r.payload.slug)}function Ts(r){const e=Be.c(93),{value:o,onChange:n}=r,s=Z();let c;e[0]!==o?(c=o&&typeof o=="object"&&!Array.isArray(o)?o:{},e[0]=o,e[1]=c):c=e[1];const a=c;let m;e[2]!==n||e[3]!==a?(m=(z,X)=>n({...a,[z]:X}),e[2]=n,e[3]=a,e[4]=m):m=e[4];const i=m;let d;e[5]!==s?(d=s("sandbox.postEditor.seoSectionLabel"),e[5]=s,e[6]=d):d=e[6];let f;e[7]!==d?(f=t.jsx("p",{className:"text-sm font-medium",children:d}),e[7]=d,e[8]=f):f=e[8];let u;e[9]!==s?(u=s("sandbox.postEditor.seoSectionHint"),e[9]=s,e[10]=u):u=e[10];let l;e[11]!==u?(l=t.jsx("p",{className:"text-xs text-muted-foreground",children:u}),e[11]=u,e[12]=l):l=e[12];let j;e[13]!==f||e[14]!==l?(j=t.jsxs("div",{className:"space-y-1",children:[f,l]}),e[13]=f,e[14]=l,e[15]=j):j=e[15];let p;e[16]!==s?(p=s("sandbox.postEditor.seoTitleLabel"),e[16]=s,e[17]=p):p=e[17];let g;e[18]!==p?(g=t.jsx(J,{htmlFor:"post-seo-title",children:p}),e[18]=p,e[19]=g):g=e[19];let x;e[20]!==a.title?(x=I(a.title),e[20]=a.title,e[21]=x):x=e[21];let y;e[22]!==i?(y=z=>i("title",z.target.value),e[22]=i,e[23]=y):y=e[23];let T;e[24]!==x||e[25]!==y?(T=t.jsx(we,{id:"post-seo-title",value:x,onChange:y,className:"h-10"}),e[24]=x,e[25]=y,e[26]=T):T=e[26];let D;e[27]!==T||e[28]!==g?(D=t.jsxs("div",{className:"space-y-2",children:[g,T]}),e[27]=T,e[28]=g,e[29]=D):D=e[29];let b;e[30]!==s?(b=s("sandbox.postEditor.seoDescriptionLabel"),e[30]=s,e[31]=b):b=e[31];let h;e[32]!==b?(h=t.jsx(J,{htmlFor:"post-seo-description",children:b}),e[32]=b,e[33]=h):h=e[33];let E;e[34]!==a.description?(E=I(a.description),e[34]=a.description,e[35]=E):E=e[35];let k;e[36]!==i?(k=z=>i("description",z.target.value),e[36]=i,e[37]=k):k=e[37];let P;e[38]!==E||e[39]!==k?(P=t.jsx(Ke,{id:"post-seo-description",value:E,onChange:k,rows:2}),e[38]=E,e[39]=k,e[40]=P):P=e[40];let L;e[41]!==h||e[42]!==P?(L=t.jsxs("div",{className:"space-y-2",children:[h,P]}),e[41]=h,e[42]=P,e[43]=L):L=e[43];let N;e[44]!==s?(N=s("sandbox.postEditor.seoImageLabel"),e[44]=s,e[45]=N):N=e[45];let C;e[46]!==N?(C={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=C):C=e[47];const U=a.image;let B;e[48]!==i?(B=z=>i("image",z),e[48]=i,e[49]=B):B=e[49];let $;e[50]!==s?($=s("sandbox.postEditor.seoImageLabel"),e[50]=s,e[51]=$):$=e[51];let R;e[52]!==a.image||e[53]!==C||e[54]!==B||e[55]!==$?(R=t.jsx(It,{schema:C,value:U,onChange:B,path:"post-seo-image",label:$}),e[52]=a.image,e[53]=C,e[54]=B,e[55]=$,e[56]=R):R=e[56];let F;e[57]!==s?(F=s("sandbox.postEditor.seoCanonicalLabel"),e[57]=s,e[58]=F):F=e[58];let q;e[59]!==F?(q=t.jsx(J,{htmlFor:"post-seo-canonical",children:F}),e[59]=F,e[60]=q):q=e[60];let O;e[61]!==a.canonical?(O=I(a.canonical),e[61]=a.canonical,e[62]=O):O=e[62];let _;e[63]!==i?(_=z=>i("canonical",z.target.value),e[63]=i,e[64]=_):_=e[64];let H;e[65]!==s?(H=s("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=s,e[66]=H):H=e[66];let V;e[67]!==O||e[68]!==_||e[69]!==H?(V=t.jsx(we,{id:"post-seo-canonical",value:O,onChange:_,placeholder:H,className:"h-10"}),e[67]=O,e[68]=_,e[69]=H,e[70]=V):V=e[70];let w;e[71]!==q||e[72]!==V?(w=t.jsxs("div",{className:"space-y-2",children:[q,V]}),e[71]=q,e[72]=V,e[73]=w):w=e[73];let G;e[74]!==s?(G=s("sandbox.postEditor.seoNoIndexingLabel"),e[74]=s,e[75]=G):G=e[75];let M;e[76]!==G?(M=t.jsx(J,{htmlFor:"post-seo-no-indexing",children:G}),e[76]=G,e[77]=M):M=e[77];const v=a.noIndexing===!0;let A;e[78]!==i?(A=z=>i("noIndexing",z),e[78]=i,e[79]=A):A=e[79];let W;e[80]!==v||e[81]!==A?(W=t.jsx(wt,{id:"post-seo-no-indexing",checked:v,onCheckedChange:A}),e[80]=v,e[81]=A,e[82]=W):W=e[82];let Y;e[83]!==M||e[84]!==W?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[M,W]}),e[83]=M,e[84]=W,e[85]=Y):Y=e[85];let K;return e[86]!==D||e[87]!==L||e[88]!==R||e[89]!==w||e[90]!==Y||e[91]!==j?(K=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[j,D,L,R,w,Y]}),e[86]=D,e[87]=L,e[88]=R,e[89]=w,e[90]=Y,e[91]=j,e[92]=K):K=e[92],K}function Ds(r){const e=Be.c(24),{value:o,onChange:n}=r,s=Z();let c,a,m,i;if(e[0]!==n||e[1]!==s||e[2]!==o){c=Ss(o);const j=(g,x)=>n(c.map((y,T)=>T===g?{...y,...x}:y));a="space-y-2";let p;e[7]!==s?(p=s("sandbox.postEditor.extraPropsLabel"),e[7]=s,e[8]=p):p=e[8],e[9]!==p?(m=t.jsx(J,{children:p}),e[9]=p,e[10]=m):m=e[10],i=c.length>0&&t.jsx("ul",{className:"space-y-2",children:c.map((g,x)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(we,{value:g.key,onChange:y=>j(x,{key:y.target.value}),placeholder:s("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(we,{value:g.value,onChange:y=>j(x,{value:y.target.value}),placeholder:s("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(ss,{label:s("sandbox.postEditor.removePropLabel"),onClick:()=>n(c.filter((y,T)=>T!==x))})]},x))}),e[0]=n,e[1]=s,e[2]=o,e[3]=c,e[4]=a,e[5]=m,e[6]=i}else c=e[3],a=e[4],m=e[5],i=e[6];let d;e[11]!==s?(d=s("sandbox.postEditor.addPropLabel"),e[11]=s,e[12]=d):d=e[12];let f;e[13]!==c||e[14]!==n?(f=()=>n([...c,{key:"",value:""}]),e[13]=c,e[14]=n,e[15]=f):f=e[15];let u;e[16]!==d||e[17]!==f?(u=t.jsx(as,{label:d,onClick:f}),e[16]=d,e[17]=f,e[18]=u):u=e[18];let l;return e[19]!==a||e[20]!==m||e[21]!==i||e[22]!==u?(l=t.jsxs("div",{className:a,children:[m,i,u]}),e[19]=a,e[20]=m,e[21]=i,e[22]=u,e[23]=l):l=e[23],l}function We(r){const e=Be.c(24),{label:o,decofile:n,kind:s,valueField:c,toRef:a,selected:m,onChange:i}=r,d=Z();let f;e[0]!==n||e[1]!==s||e[2]!==m||e[3]!==a||e[4]!==c?(f=ts({records:Je(n,s),selected:m,valueField:c,toRef:a}),e[0]=n,e[1]=s,e[2]=m,e[3]=a,e[4]=c,e[5]=f):f=e[5];const{options:u,selectedValues:l,refsForValues:j}=f;let p;e[6]!==s||e[7]!==d?(p=d(s==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=s,e[7]=d,e[8]=p):p=e[8];const g=p;let x;e[9]!==s||e[10]!==d?(x=d(s==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=s,e[10]=d,e[11]=x):x=e[11];const y=x;let T;e[12]!==o?(T=t.jsx(J,{children:o}),e[12]=o,e[13]=T):T=e[13];let D;e[14]!==g||e[15]!==i||e[16]!==u||e[17]!==j||e[18]!==y||e[19]!==l?(D=u.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:g}):t.jsx(Tt,{options:u,defaultValue:l,onValueChange:h=>i(j(h)),placeholder:y,maxCount:4}),e[14]=g,e[15]=i,e[16]=u,e[17]=j,e[18]=y,e[19]=l,e[20]=D):D=e[20];let b;return e[21]!==T||e[22]!==D?(b=t.jsxs("div",{className:"space-y-2",children:[T,D]}),e[21]=T,e[22]=D,e[23]=b):b=e[23],b}export{Vl as PostEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,b as O,d as ne,f as re,ae as oe,j as t,B as Q,a6 as ce,n as de,v as W,l as X}from"./index-
|
|
1
|
+
import{c as D,b as O,d as ne,f as re,ae as oe,j as t,B as Q,a6 as ce,n as de,v as W,l as X}from"./index-CsOndfWq.js";import{I as ae}from"./icon-button-HZupTrz9.js";import{b as Y,T as Z,a as ee}from"./tooltip-UhT0N_rD.js";import{n as fe}from"./ZoomOut-BwebNTOr.js";import{k as me,aq as xe,ar as he}from"./agent-icon-B6BGlN8Z.js";import{s as pe}from"./XClose-D59UZ-3l.js";import{F as te,t as V,H as ue}from"./file-share-button-BFJJKHR1.js";import{f as be,F as je,a as ge}from"./file-preview-Cp_wgKZ4.js";import{F as se}from"./file-type-icon-D_YzVdyI.js";import{u as ve,b as we,e as ye}from"./use-org-fs-DcHowQO9.js";import{c as Pe,b as Ce}from"./location-BjlyegC2.js";function Ne(b){const e=D.c(13),{previewPath:l}=b,m=O(),r=ne(),p=re({strict:!1}).org??"";let s;e[0]!==l?(s=l.split("/").slice(0,-1).join("/"),e[0]=l,e[1]=s):s=e[1];const o=s;let a;e[2]!==r||e[3]!==p||e[4]!==o||e[5]!==l?(a=()=>{r({to:oe.library,params:{org:p},search:{path:o||void 0,preview:l}})},e[2]=r,e[3]=p,e[4]=o,e[5]=l,e[6]=a):a=e[6];const c=a;let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(me,{size:14}),e[7]=j):j=e[7];let u;e[8]!==m?(u=m("library.seeInLibrary.label"),e[8]=m,e[9]=u):u=e[9];let x;return e[10]!==c||e[11]!==u?(x=t.jsxs(Q,{variant:"ghost",size:"sm",onClick:c,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[j,u]}),e[10]=c,e[11]=u,e[12]=x):x=e[12],x}const ke=b=>/\.html?$/i.test(b);function le(b){switch(b){case"dialog":return"h-11 py-1 pr-12 pl-2";case"panel":return"h-9 px-2";case"aside":return"h-12 gap-2 px-1.5";default:return b}}function Fe(b){const e=D.c(12),{expanded:l,onToggle:m,placement:r}=b,p=O();let s;e[0]!==r?(s=V(r),e[0]=r,e[1]=s):s=e[1];const o=l?"library.previewContent.collapse":"library.previewContent.expand";let a;e[2]!==p||e[3]!==o?(a=p(o),e[2]=p,e[3]=o,e[4]=a):a=e[4];let c;e[5]!==l?(c=l?t.jsx(xe,{size:14}):t.jsx(he,{size:14}),e[5]=l,e[6]=c):c=e[6];let j;return e[7]!==m||e[8]!==s||e[9]!==a||e[10]!==c?(j=t.jsx(ae,{...s,label:a,tooltipSide:"bottom",onClick:m,children:c}),e[7]=m,e[8]=s,e[9]=a,e[10]=c,e[11]=j):j=e[11],j}function ie(b){const e=D.c(9),{onClose:l,placement:m}=b,r=m===void 0?"bar":m,p=O();let s;e[0]!==r?(s=V(r),e[0]=r,e[1]=s):s=e[1];let o;e[2]!==p?(o=p("library.previewContent.close"),e[2]=p,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(pe,{size:14}),e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==s||e[7]!==o?(c=t.jsx(ae,{...s,label:o,tooltipSide:"bottom",onClick:l,children:a}),e[5]=l,e[6]=s,e[7]=o,e[8]=c):c=e[8],c}function De(b){const e=D.c(92),{previewPath:l,onClose:m,expand:r,showSeeInLibrary:p,variant:s}=b,o=p===void 0?!1:p,a=O();let c;e[0]!==l?(c=Pe(l),e[0]=l,e[1]=c):c=e[1];const j=c,{volume:u,dirPath:x}=j,{data:f,isPending:A}=ve(u,x),H=we(u??"");let w,y,n,d,h,i,P,B;if(e[2]!==H||e[3]!==f||e[4]!==r||e[5]!==x||e[6]!==l||e[7]!==o||e[8]!==s){d=Ce(x),h=s==="dialog",i=r?.expanded?"topbar":s==="aside"?"aside":"bar";let g;e[17]!==i?(g=V(i),e[17]=i,e[18]=g):g=e[18],w=g;let T;e[19]!==r||e[20]!==i?(T=r?.onToggle&&t.jsx(Fe,{expanded:r.expanded,onToggle:r.onToggle,placement:i}),e[19]=r,e[20]=i,e[21]=T):T=e[21],y=T;let v;e[22]!==l||e[23]!==o?(v=o?t.jsx(Ne,{previewPath:l}):null,e[22]=l,e[23]=o,e[24]=v):v=e[24],P=v,n=f&&f.kind==="file"?{key:l,filename:d,size:f.size,downloadUrl:H(f.path)}:null,B=n&&f&&ke(d),e[2]=H,e[3]=f,e[4]=r,e[5]=x,e[6]=l,e[7]=o,e[8]=s,e[9]=w,e[10]=y,e[11]=n,e[12]=d,e[13]=h,e[14]=i,e[15]=P,e[16]=B}else w=e[9],y=e[10],n=e[11],d=e[12],h=e[13],i=e[14],P=e[15],B=e[16];if(B){let g;e[25]!==d||e[26]!==h?(g=h&&t.jsx(W,{className:"sr-only",children:d}),e[25]=d,e[26]=h,e[27]=g):g=e[27];const T=n.downloadUrl;let v;e[28]!==f?(v=ye(f),e[28]=f,e[29]=v):v=e[29];let z;e[30]!==s?(z=s==="aside"?le(s):void 0,e[30]=s,e[31]=z):z=e[31];const R=u==="home"?x:void 0,q=u??"",G=f.shareMode??"private",J=f.effectivePublic??!1,K=window.location.origin+n.downloadUrl;let S;e[32]!==x||e[33]!==i||e[34]!==G||e[35]!==J||e[36]!==K||e[37]!==q?(S=t.jsx(te,{volume:q,path:x,shareMode:G,effectivePublic:J,url:K,placement:i}),e[32]=x,e[33]=i,e[34]=G,e[35]=J,e[36]=K,e[37]=q,e[38]=S):S=e[38];let U;e[39]!==y||e[40]!==h||e[41]!==m||e[42]!==i?(U=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsxs(t.Fragment,{children:[y,t.jsx(ie,{onClose:m,placement:i})]}),e[39]=y,e[40]=h,e[41]=m,e[42]=i,e[43]=U):U=e[43];let I;e[44]!==P||e[45]!==S||e[46]!==U?(I=t.jsxs(t.Fragment,{children:[S,P,U]}),e[44]=P,e[45]=S,e[46]=U,e[47]=I):I=e[47];let L;e[48]!==n.downloadUrl||e[49]!==d||e[50]!==i||e[51]!==l||e[52]!==I||e[53]!==v||e[54]!==z||e[55]!==R?(L=t.jsx(ue,{readUrl:T,marker:v,toolbarClassName:z,title:d,placement:i,savePath:R,trailing:I},l),e[48]=n.downloadUrl,e[49]=d,e[50]=i,e[51]=l,e[52]=I,e[53]=v,e[54]=z,e[55]=R,e[56]=L):L=e[56];let E;return e[57]!==L||e[58]!==g?(E=t.jsxs(t.Fragment,{children:[g,L]}),e[57]=L,e[58]=g,e[59]=E):E=e[59],E}let C;e[60]!==w||e[61]!==f?.effectivePublic||e[62]!==f?.shareMode||e[63]!==n||e[64]!==x||e[65]!==i||e[66]!==a||e[67]!==u?(C=n&&t.jsxs(t.Fragment,{children:[t.jsx(te,{volume:u??"",path:x,shareMode:f?.shareMode??"private",effectivePublic:f?.effectivePublic??!1,url:window.location.origin+n.downloadUrl,placement:i}),t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:w.variant,size:w.size,asChild:!0,children:t.jsx("a",{href:n.downloadUrl,download:n.filename,children:t.jsx(fe,{size:14})})})}),t.jsx(ee,{side:"bottom",children:a("library.previewContent.download")})]}),t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:w.variant,size:w.size,onClick:()=>window.open(n.downloadUrl,"_blank","noopener"),children:t.jsx(ce,{size:14})})}),t.jsx(ee,{side:"bottom",children:a("library.previewContent.openInNewTab")})]})]}),e[60]=w,e[61]=f?.effectivePublic,e[62]=f?.shareMode,e[63]=n,e[64]=x,e[65]=i,e[66]=a,e[67]=u,e[68]=C):C=e[68];let N;e[69]!==y||e[70]!==h||e[71]!==m||e[72]!==i?(N=!h&&t.jsxs(t.Fragment,{children:[y,t.jsx(ie,{onClose:m,placement:i})]}),e[69]=y,e[70]=h,e[71]=m,e[72]=i,e[73]=N):N=e[73];let $;e[74]!==C||e[75]!==N?($=t.jsxs(t.Fragment,{children:[C,N]}),e[74]=C,e[75]=N,e[76]=$):$=e[76];const M=$;let k;e[77]!==M||e[78]!==n||e[79]!==d||e[80]!==h||e[81]!==i||e[82]!==s?(k=i==="topbar"?t.jsx(de.Actions,{children:M}):t.jsxs("div",{className:X("flex shrink-0 items-center gap-1 border-b border-border/60",le(s)),children:[t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[t.jsx(se,{filename:d,className:"h-4.5 w-3.5 shrink-0"}),h?t.jsx(W,{className:"truncate text-xs font-medium text-foreground",children:d}):t.jsx("span",{className:X("truncate font-medium text-foreground",i==="aside"?"text-sm":"text-xs"),children:d}),n&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:be(n.size)})]}),M]}),e[77]=M,e[78]=n,e[79]=d,e[80]=h,e[81]=i,e[82]=s,e[83]=k):k=e[83];let F;e[84]!==n||e[85]!==d||e[86]!==A||e[87]!==a?(F=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:n?t.jsx(je,{file:n}):A?t.jsx(ge,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(se,{filename:d,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("library.previewContent.fileNotAvailable")})]})}),e[84]=n,e[85]=d,e[86]=A,e[87]=a,e[88]=F):F=e[88];let _;return e[89]!==k||e[90]!==F?(_=t.jsxs(t.Fragment,{children:[k,F]}),e[89]=k,e[90]=F,e[91]=_):_=e[91],_}export{De as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,j as n,q as m,D as p}from"./index-
|
|
1
|
+
import{c as f,j as n,q as m,D as p}from"./index-CsOndfWq.js";import{L as w}from"./preview-content-B68u7aBy.js";function d(x){const e=f.c(9),{previewPath:a,onClose:o,showSeeInLibrary:l}=x,t=l===void 0?!1:l;let i;e[0]!==o?(i=c=>{c||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==a||e[4]!==t?(r=n.jsx(m,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:a,onClose:o,showSeeInLibrary:t,variant:"dialog"})}),e[2]=o,e[3]=a,e[4]=t,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(p,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{d as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as c}from"./index-
|
|
1
|
+
import{c as p,j as c}from"./index-CsOndfWq.js";import{L as x}from"./preview-content-B68u7aBy.js";function u(f){const e=p.c(6),{previewPath:i,onClose:o,showSeeInLibrary:n,expand:a,variant:l}=f,s=n===void 0?!1:n,t=l===void 0?"panel":l;let r;return e[0]!==a||e[1]!==o||e[2]!==i||e[3]!==s||e[4]!==t?(r=c.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:c.jsx(x,{previewPath:i,onClose:o,showSeeInLibrary:s,expand:a,variant:t})}),e[0]=a,e[1]=o,e[2]=i,e[3]=s,e[4]=t,e[5]=r):r=e[5],r}export{u as L};
|
package/dist/client/assets/{product-picker-dialog-Ch2ijOSh.js → product-picker-dialog-DI1rZSm9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as ye}from"./thread-intent-Cv8T2W7d.js";import{c as w,K as ie,m as ae,b as se,j as f,h as xe,r as H,l as re,I as le,ah as be,s as je,v as Pe,B as ke,q as ve,D as Ce}from"./index-DYLoE6lZ.js";import{I as Se,C as we}from"./agent-icon-CAaO4ypa.js";import{aK as Ne}from"./runnable-block-editor-Cq2CDyKN.js";const De="https://placeholder.invalid";function Je(s,e){const t=(s??"").trim();if(!t)return"";const o=ye((e??"").trim());if(!o)return"";try{const i=new URL(t,De),a=new URL(o);return a.pathname=i.pathname,a.search=i.search,a.hash=i.hash,a.href}catch{return""}}const fe="vtex/loaders/intelligentSearch/productList.ts",Te="vtex/loaders/categories/tree.ts",Ee=24;function Q(s){return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Le(s){return s.split("/").filter(Boolean).map((t,o)=>`category-${o+1}/${t}`).join("/")}function $e(s,e){const t=e.trim(),o=fe,i=Ee;if(s==="cluster")return t?[{resolveType:o,props:{collection:t,count:i}}]:[];if(s==="category"){if(!t)return[];const d=Le(t);return d?[{resolveType:o,props:{facets:d,count:i}}]:[]}if(!t)return[{resolveType:o,props:{query:"",count:i}}];const a=[];/^\d+$/.test(t)&&a.push({resolveType:o,props:{ids:[t]}});const l=t.includes("-")&&!/\s/.test(t)?t.replace(/-+/g," "):t;return a.push({resolveType:o,props:{query:l,count:i}}),a}function Ie(){return{resolveType:Te,props:{}}}function _e(s){return{resolveType:fe,props:{ids:s}}}function de(s){return typeof s=="string"||typeof s=="number"?String(s):""}function pe(s){const e=Q(s),t=Array.isArray(s)?s:Array.isArray(e?.products)?e.products:[],o=[],i=new Set;for(const a of t){const r=Q(a);if(!r)continue;const l=de(r.productID)||de(r.sku);if(!l||i.has(l))continue;i.add(l);const d=Q(r.isVariantOf),u=typeof d?.name=="string"&&d.name||typeof r.name=="string"&&r.name||l,n=qe(r.image),c=n[0],m=typeof r.url=="string"&&r.url||typeof d?.url=="string"&&d.url||void 0;o.push({id:l,label:u,image:c,images:n,url:m,category:Ae(r.category),description:Fe(r,d)})}return o}function qe(s){if(!Array.isArray(s))return[];const e=[];for(const t of s){const o=Q(t),i=typeof o?.url=="string"?o.url:"";i&&!e.includes(i)&&e.push(i)}return e}function Ae(s){return typeof s!="string"||!s.trim()?void 0:s.split(/[>/]/).map(t=>t.trim()).filter(Boolean).pop()||void 0}function Fe(s,e){const o=(typeof s.description=="string"&&s.description||typeof e?.description=="string"&&e.description||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(o)return o.length>400?`${o.slice(0,400).trimEnd()}…`:o}function Oe(s){if(typeof s!="string"||!s)return null;let e;try{e=new URL(s,"https://placeholder.invalid").pathname}catch{return null}return e.replace(/^\/+|\/+$/g,"")||null}function Re(s){const e=[],t=new Set,o=(i,a)=>{const r=Q(i);if(!r)return;const l=typeof r.name=="string"&&r.name?r.name:"",d=l?[...a,l]:a,u=Oe(r.url);if(u&&!t.has(u)&&(t.add(u),e.push({path:u,label:d.join(" › ")||u,url:typeof r.url=="string"?r.url:`/${u}`})),Array.isArray(r.children))for(const n of r.children)o(n,d)};if(Array.isArray(s))for(const i of s)o(i,[]);return e}function Ke(s,e,t=50){const o=e.trim().toLowerCase();return(o?s.filter(a=>a.label.toLowerCase().includes(o)||a.path.toLowerCase().includes(o)):s).slice(0,t)}const ze=1e4;async function ce(s,{resolveType:e,props:t}){const o=await fetch(Ne(s),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...t}),signal:AbortSignal.timeout(ze)});if(!o.ok)throw new Error(`Failed to fetch (${o.status})`);return o.json()}function We(s,e){const t=w.c(20);let o;t[0]!==e?(o=new Set(e.filter(Boolean)),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==o?(i=[...o],t[2]=o,t[3]=i):i=t[3];const a=i;let r;t[4]!==a||t[5]!==s?(r=ie.sandboxInvoke(s?`${s.orgSlug}/${s.virtualMcpId}/${s.branch}`:"none",`blog-products-by-ids:${a.join(",")}`),t[4]=a,t[5]=s,t[6]=r):r=t[6];let l;t[7]!==a||t[8]!==s?(l=()=>ce(s,_e(a)).then(pe),t[7]=a,t[8]=s,t[9]=l):l=t[9];const d=!!s&&a.length>0;let u;t[10]!==r||t[11]!==l||t[12]!==d?(u={queryKey:r,queryFn:l,enabled:d,staleTime:6e4,retry:1},t[10]=r,t[11]=l,t[12]=d,t[13]=u):u=t[13];const n=ae(u);let c;if(t[14]!==n.data){c=new Map;for(const p of n.data??[])c.set(p.id,p);t[14]=n.data,t[15]=c}else c=t[15];let m;return t[16]!==c||t[17]!==n.isError||t[18]!==n.isLoading?(m={byId:c,isLoading:n.isLoading,isError:n.isError},t[16]=c,t[17]=n.isError,t[18]=n.isLoading,t[19]=m):m=t[19],m}function me(s){return`${s.orgSlug}/${s.virtualMcpId}/${s.branch}`}function ge(s){const e=w.c(9),{query:t,emptyLabel:o,loadingLabel:i}=s,a=se();if(t.isLoading){let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=f.jsx(xe,{size:"xs"}),e[0]=l):l=e[0];let d;return e[1]!==i?(d=f.jsxs("div",{className:"flex items-center gap-2 px-2 py-6 text-sm text-muted-foreground",children:[l,i]}),e[1]=i,e[2]=d):d=e[2],d}if(t.isError){let l;e[3]!==a?(l=a("sandbox.productPickerDialog.couldNotLoad"),e[3]=a,e[4]=l):l=e[4];let d;return e[5]!==l?(d=f.jsx("p",{className:"px-2 py-6 text-sm text-muted-foreground",children:l}),e[5]=l,e[6]=d):d=e[6],d}let r;return e[7]!==o?(r=f.jsx("p",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:o}),e[7]=o,e[8]=r):r=e[8],r}function Be(s){const e=w.c(32),{sandboxRef:t,enabled:o,onSelect:i,className:a}=s,r=se(),[l,d]=H.useState("");let u;e[0]!==t?(u=ie.sandboxInvoke(me(t),"blog-category-tree"),e[0]=t,e[1]=u):u=e[1];let n;e[2]!==t?(n=()=>ce(t,Ie()).then(Re),e[2]=t,e[3]=n):n=e[3];let c;e[4]!==o||e[5]!==u||e[6]!==n?(c={queryKey:u,queryFn:n,enabled:o,staleTime:6e4,retry:1},e[4]=o,e[5]=u,e[6]=n,e[7]=c):c=e[7];const m=ae(c);let p,g,h,P;if(e[8]!==a||e[9]!==l||e[10]!==i||e[11]!==m||e[12]!==r){const S=Ke(m.data??[],l);h="space-y-2";let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=C=>d(C.target.value),e[17]=j):j=e[17];let b;e[18]!==r?(b=r("sandbox.productPickerDialog.filterCategoriesPlaceholder"),e[18]=r,e[19]=b):b=e[19],e[20]!==l||e[21]!==b?(P=f.jsx(le,{value:l,onChange:j,placeholder:b,className:"h-9"}),e[20]=l,e[21]=b,e[22]=P):P=e[22],e[23]!==a?(p=re("overflow-y-auto rounded-md border",a),e[23]=a,e[24]=p):p=e[24],g=S.length===0?f.jsx(ge,{query:m,loadingLabel:r("sandbox.productPickerDialog.loadingCategories"),emptyLabel:r("sandbox.productPickerDialog.noCategories")}):f.jsx("div",{className:"p-1",children:S.map(C=>f.jsx("button",{type:"button",onClick:()=>i(C),className:"block w-full truncate px-2 py-1.5 text-left text-sm hover:bg-muted/60 rounded-lg",children:C.label},C.path))}),e[8]=a,e[9]=l,e[10]=i,e[11]=m,e[12]=r,e[13]=p,e[14]=g,e[15]=h,e[16]=P}else p=e[13],g=e[14],h=e[15],P=e[16];let x;e[25]!==p||e[26]!==g?(x=f.jsx("div",{className:p,children:g}),e[25]=p,e[26]=g,e[27]=x):x=e[27];let v;return e[28]!==h||e[29]!==P||e[30]!==x?(v=f.jsxs("div",{className:h,children:[P,x]}),e[28]=h,e[29]=P,e[30]=x,e[31]=v):v=e[31],v}const Ue=[{id:"search",labelKey:"sandbox.productPickerDialog.modeSearch"},{id:"category",labelKey:"sandbox.productPickerDialog.modeCategory"},{id:"cluster",labelKey:"sandbox.productPickerDialog.modeClusterId"}];async function Me(s,e){if(e.length===0)return[];const t=await Promise.allSettled(e.map(r=>ce(s,r))),o=t.filter(r=>r.status==="fulfilled").map(r=>r.value);if(o.length===0){const r=t.find(l=>l.status==="rejected");throw r?r.reason:new Error("Failed to fetch products")}const i=[],a=new Set;for(const r of o)for(const l of pe(r))a.has(l.id)||(a.add(l.id),i.push(l));return i}function ue(s){const e=w.c(6),[t,o]=H.useState(""),[i,a]=H.useState(""),r=H.useRef(null);let l;e[0]!==s?(l=n=>{o(n),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>a(n),s)},e[0]=s,e[1]=l):l=e[1];const d=l;let u;return e[2]!==i||e[3]!==d||e[4]!==t?(u={value:t,debounced:i,onChange:d},e[2]=i,e[3]=d,e[4]=t,e[5]=u):u=e[5],u}function Ve(s){const e=w.c(23),{option:t,selected:o,onToggle:i}=s,a=o?"border-primary/40 bg-primary/5":"border-transparent hover:bg-muted/60";let r;e[0]!==a?(r=re("flex w-full items-center gap-3 rounded-lg border px-2 py-2 text-left transition-colors",a),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==t.image?(l=f.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:t.image?f.jsx("img",{src:t.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):f.jsx(Se,{size:14,className:"text-muted-foreground"})}),e[2]=t.image,e[3]=l):l=e[3];let d;e[4]!==t.label?(d=f.jsx("span",{className:"line-clamp-2 text-sm",children:t.label}),e[4]=t.label,e[5]=d):d=e[5];let u;e[6]!==t.id?(u=f.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:["ID ",t.id]}),e[6]=t.id,e[7]=u):u=e[7];let n;e[8]!==d||e[9]!==u?(n=f.jsxs("span",{className:"min-w-0 flex-1",children:[d,u]}),e[8]=d,e[9]=u,e[10]=n):n=e[10];const c=o?"border-primary bg-primary text-primary-foreground":"border-border text-transparent";let m;e[11]!==c?(m=re("flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",c),e[11]=c,e[12]=m):m=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=f.jsx(be,{size:12}),e[13]=p):p=e[13];let g;e[14]!==m?(g=f.jsx("span",{className:m,children:p}),e[14]=m,e[15]=g):g=e[15];let h;return e[16]!==i||e[17]!==o||e[18]!==g||e[19]!==r||e[20]!==l||e[21]!==n?(h=f.jsxs("button",{type:"button",onClick:i,"aria-pressed":o,className:r,children:[l,n,g]}),e[16]=i,e[17]=o,e[18]=g,e[19]=r,e[20]=l,e[21]=n,e[22]=h):h=e[22],h}function Ye(s){const e=w.c(20),{sandboxRef:t,open:o,selected:i,onSelect:a}=s,r=se();if(i){let d;e[0]!==a?(d=()=>a(null),e[0]=a,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=f.jsx(we,{size:14}),e[2]=u):u=e[2];let n;e[3]!==r?(n=r("sandbox.productPickerDialog.categoryLabel"),e[3]=r,e[4]=n):n=e[4];let c;e[5]!==i.label?(c=f.jsx("span",{className:"text-foreground",children:i.label}),e[5]=i.label,e[6]=c):c=e[6];let m;e[7]!==r?(m=r("sandbox.productPickerDialog.change"),e[7]=r,e[8]=m):m=e[8];let p;e[9]!==n||e[10]!==c||e[11]!==m?(p=f.jsxs("span",{className:"truncate",children:[n,c," —",m]}),e[9]=n,e[10]=c,e[11]=m,e[12]=p):p=e[12];let g;return e[13]!==d||e[14]!==p?(g=f.jsxs("button",{type:"button",onClick:d,className:"flex items-center gap-1.5 rounded-lg px-2 py-1.5 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[u,p]}),e[13]=d,e[14]=p,e[15]=g):g=e[15],g}let l;return e[16]!==a||e[17]!==o||e[18]!==t?(l=f.jsx(Be,{sandboxRef:t,enabled:o,onSelect:a,className:"h-48"}),e[16]=a,e[17]=o,e[18]=t,e[19]=l):l=e[19],l}function Ze(s){const e=w.c(90),{open:t,onOpenChange:o,sandboxRef:i,selectedIds:a,onChange:r,onPicked:l,multiple:d}=s,u=d===void 0?!0:d,n=se(),[c,m]=H.useState("search"),p=ue(300),g=ue(300),[h,P]=H.useState(null),x=c==="search"?p.debounced:c==="cluster"?g.debounced:h?.path??"";let v;e[0]!==c||e[1]!==x?(v=$e(c,x),e[0]=c,e[1]=x,e[2]=v):v=e[2];const S=v;let j;e[3]!==c||e[4]!==i||e[5]!==x?(j=ie.sandboxInvoke(me(i),`blog-product:${c}:${x}`),e[3]=c,e[4]=i,e[5]=x,e[6]=j):j=e[6];let b;e[7]!==S||e[8]!==i?(b=()=>Me(i,S),e[7]=S,e[8]=i,e[9]=b):b=e[9];const C=t&&S.length>0;let X;e[10]!==j||e[11]!==b||e[12]!==C?(X={queryKey:j,queryFn:b,enabled:C,staleTime:6e4,retry:1},e[10]=j,e[11]=b,e[12]=C,e[13]=X):X=e[13];const N=ae(X);let G;e[14]!==a?(G=new Set(a.filter(Boolean)),e[14]=a,e[15]=G):G=e[15];const k=G;let J;e[16]!==u||e[17]!==r||e[18]!==l||e[19]!==k||e[20]!==a?(J=y=>{const te=y.id,ne=k.has(te);if(l){l(y,!ne);return}r(u?ne?a.filter(he=>he!==te):[...a.filter(Boolean),te]:ne?[]:[te])},e[16]=u,e[17]=r,e[18]=l,e[19]=k,e[20]=a,e[21]=J):J=e[21];const oe=J;let W;e[22]!==N.data?(W=N.data??[],e[22]=N.data,e[23]=W):W=e[23];const Z=W,D=S.length===0;let T;e[24]!==u||e[25]!==n?(T=n(u?"sandbox.productPickerDialog.addProducts":"sandbox.productPickerDialog.chooseProduct"),e[24]=u,e[25]=n,e[26]=T):T=e[26];let E;e[27]!==T?(E=f.jsx(je,{className:"border-b border-border px-4 py-3",children:f.jsx(Pe,{className:"text-sm font-medium",children:T})}),e[27]=T,e[28]=E):E=e[28];let L;e[29]!==c||e[30]!==n?(L=Ue.map(y=>f.jsx("button",{type:"button",onClick:()=>m(y.id),className:re("rounded-lg px-2.5 py-1 text-sm transition-colors",c===y.id?"bg-muted font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:n(y.labelKey)},y.id)),e[29]=c,e[30]=n,e[31]=L):L=e[31];let $;e[32]!==L?($=f.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-4 py-2",children:L}),e[32]=L,e[33]=$):$=e[33];let I;e[34]!==c||e[35]!==p||e[36]!==n?(I=c==="search"&&f.jsx(le,{autoFocus:!0,value:p.value,onChange:y=>p.onChange(y.target.value),placeholder:n("sandbox.productPickerDialog.searchProductsPlaceholder"),className:"h-9"}),e[34]=c,e[35]=p,e[36]=n,e[37]=I):I=e[37];let _;e[38]!==g||e[39]!==c||e[40]!==n?(_=c==="cluster"&&f.jsx(le,{autoFocus:!0,value:g.value,onChange:y=>g.onChange(y.target.value),placeholder:n("sandbox.productPickerDialog.clusterIdPlaceholder"),className:"h-9"}),e[38]=g,e[39]=c,e[40]=n,e[41]=_):_=e[41];let q;e[42]!==h||e[43]!==c||e[44]!==t||e[45]!==i?(q=c==="category"&&f.jsx(Ye,{sandboxRef:i,open:t,selected:h,onSelect:P}),e[42]=h,e[43]=c,e[44]=t,e[45]=i,e[46]=q):q=e[46];let A;e[47]!==I||e[48]!==_||e[49]!==q?(A=f.jsxs("div",{className:"shrink-0 space-y-2 px-4 py-3",children:[I,_,q]}),e[47]=I,e[48]=_,e[49]=q,e[50]=A):A=e[50];let F;e[51]!==Z||e[52]!==N||e[53]!==k||e[54]!==D||e[55]!==n||e[56]!==oe?(F=Z.length>0?Z.map(y=>f.jsx(Ve,{option:y,selected:k.has(y.id),onToggle:()=>oe(y)},y.id)):!D&&f.jsx(ge,{query:N,loadingLabel:n("sandbox.productPickerDialog.loadingProducts"),emptyLabel:n("sandbox.productPickerDialog.noProductsFound")}),e[51]=Z,e[52]=N,e[53]=k,e[54]=D,e[55]=n,e[56]=oe,e[57]=F):F=e[57];let O;e[58]!==c||e[59]!==D||e[60]!==n?(O=D&&f.jsx("p",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:n(c==="category"?"sandbox.productPickerDialog.pickCategoryPrompt":"sandbox.productPickerDialog.enterClusterPrompt")}),e[58]=c,e[59]=D,e[60]=n,e[61]=O):O=e[61];let R;e[62]!==F||e[63]!==O?(R=f.jsxs("div",{className:"min-h-0 flex-1 space-y-1 overflow-y-auto border-t border-border px-3 py-2",children:[F,O]}),e[62]=F,e[63]=O,e[64]=R):R=e[64];let K;e[65]!==k.size||e[66]!==n?(K=k.size===0?n("sandbox.productPickerDialog.noneSelected"):n("sandbox.productPickerDialog.selectedCount",{count:String(k.size)}),e[65]=k.size,e[66]=n,e[67]=K):K=e[67];let z;e[68]!==K?(z=f.jsx("span",{className:"text-xs text-muted-foreground",children:K}),e[68]=K,e[69]=z):z=e[69];let B;e[70]!==o?(B=()=>o(!1),e[70]=o,e[71]=B):B=e[71];let U;e[72]!==n?(U=n("sandbox.productPickerDialog.done"),e[72]=n,e[73]=U):U=e[73];let M;e[74]!==B||e[75]!==U?(M=f.jsx(ke,{size:"sm",onClick:B,children:U}),e[74]=B,e[75]=U,e[76]=M):M=e[76];let V;e[77]!==z||e[78]!==M?(V=f.jsxs("div",{className:"flex shrink-0 items-center justify-between border-t border-border px-4 py-3",children:[z,M]}),e[77]=z,e[78]=M,e[79]=V):V=e[79];let Y;e[80]!==E||e[81]!==$||e[82]!==A||e[83]!==R||e[84]!==V?(Y=f.jsxs(ve,{className:"flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[560px] sm:max-w-[560px]",children:[E,$,A,R,V]}),e[80]=E,e[81]=$,e[82]=A,e[83]=R,e[84]=V,e[85]=Y):Y=e[85];let ee;return e[86]!==o||e[87]!==t||e[88]!==Y?(ee=f.jsx(Ce,{open:t,onOpenChange:o,children:Y}),e[86]=o,e[87]=t,e[88]=Y,e[89]=ee):ee=e[89],ee}export{Be as C,Ze as P,$e as b,ce as i,pe as p,Je as r,We as u};
|
|
1
|
+
import{s as ye}from"./thread-intent-iex-fi8o.js";import{c as w,K as ie,m as ae,b as se,j as f,h as xe,r as H,l as re,I as le,ah as be,s as je,v as Pe,B as ke,q as ve,D as Ce}from"./index-CsOndfWq.js";import{I as Se,C as we}from"./agent-icon-B6BGlN8Z.js";import{aK as Ne}from"./runnable-block-editor-Cr3HQlva.js";const De="https://placeholder.invalid";function Je(s,e){const t=(s??"").trim();if(!t)return"";const o=ye((e??"").trim());if(!o)return"";try{const i=new URL(t,De),a=new URL(o);return a.pathname=i.pathname,a.search=i.search,a.hash=i.hash,a.href}catch{return""}}const fe="vtex/loaders/intelligentSearch/productList.ts",Te="vtex/loaders/categories/tree.ts",Ee=24;function Q(s){return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Le(s){return s.split("/").filter(Boolean).map((t,o)=>`category-${o+1}/${t}`).join("/")}function $e(s,e){const t=e.trim(),o=fe,i=Ee;if(s==="cluster")return t?[{resolveType:o,props:{collection:t,count:i}}]:[];if(s==="category"){if(!t)return[];const d=Le(t);return d?[{resolveType:o,props:{facets:d,count:i}}]:[]}if(!t)return[{resolveType:o,props:{query:"",count:i}}];const a=[];/^\d+$/.test(t)&&a.push({resolveType:o,props:{ids:[t]}});const l=t.includes("-")&&!/\s/.test(t)?t.replace(/-+/g," "):t;return a.push({resolveType:o,props:{query:l,count:i}}),a}function Ie(){return{resolveType:Te,props:{}}}function _e(s){return{resolveType:fe,props:{ids:s}}}function de(s){return typeof s=="string"||typeof s=="number"?String(s):""}function pe(s){const e=Q(s),t=Array.isArray(s)?s:Array.isArray(e?.products)?e.products:[],o=[],i=new Set;for(const a of t){const r=Q(a);if(!r)continue;const l=de(r.productID)||de(r.sku);if(!l||i.has(l))continue;i.add(l);const d=Q(r.isVariantOf),u=typeof d?.name=="string"&&d.name||typeof r.name=="string"&&r.name||l,n=qe(r.image),c=n[0],m=typeof r.url=="string"&&r.url||typeof d?.url=="string"&&d.url||void 0;o.push({id:l,label:u,image:c,images:n,url:m,category:Ae(r.category),description:Fe(r,d)})}return o}function qe(s){if(!Array.isArray(s))return[];const e=[];for(const t of s){const o=Q(t),i=typeof o?.url=="string"?o.url:"";i&&!e.includes(i)&&e.push(i)}return e}function Ae(s){return typeof s!="string"||!s.trim()?void 0:s.split(/[>/]/).map(t=>t.trim()).filter(Boolean).pop()||void 0}function Fe(s,e){const o=(typeof s.description=="string"&&s.description||typeof e?.description=="string"&&e.description||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(o)return o.length>400?`${o.slice(0,400).trimEnd()}…`:o}function Oe(s){if(typeof s!="string"||!s)return null;let e;try{e=new URL(s,"https://placeholder.invalid").pathname}catch{return null}return e.replace(/^\/+|\/+$/g,"")||null}function Re(s){const e=[],t=new Set,o=(i,a)=>{const r=Q(i);if(!r)return;const l=typeof r.name=="string"&&r.name?r.name:"",d=l?[...a,l]:a,u=Oe(r.url);if(u&&!t.has(u)&&(t.add(u),e.push({path:u,label:d.join(" › ")||u,url:typeof r.url=="string"?r.url:`/${u}`})),Array.isArray(r.children))for(const n of r.children)o(n,d)};if(Array.isArray(s))for(const i of s)o(i,[]);return e}function Ke(s,e,t=50){const o=e.trim().toLowerCase();return(o?s.filter(a=>a.label.toLowerCase().includes(o)||a.path.toLowerCase().includes(o)):s).slice(0,t)}const ze=1e4;async function ce(s,{resolveType:e,props:t}){const o=await fetch(Ne(s),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...t}),signal:AbortSignal.timeout(ze)});if(!o.ok)throw new Error(`Failed to fetch (${o.status})`);return o.json()}function We(s,e){const t=w.c(20);let o;t[0]!==e?(o=new Set(e.filter(Boolean)),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==o?(i=[...o],t[2]=o,t[3]=i):i=t[3];const a=i;let r;t[4]!==a||t[5]!==s?(r=ie.sandboxInvoke(s?`${s.orgSlug}/${s.virtualMcpId}/${s.branch}`:"none",`blog-products-by-ids:${a.join(",")}`),t[4]=a,t[5]=s,t[6]=r):r=t[6];let l;t[7]!==a||t[8]!==s?(l=()=>ce(s,_e(a)).then(pe),t[7]=a,t[8]=s,t[9]=l):l=t[9];const d=!!s&&a.length>0;let u;t[10]!==r||t[11]!==l||t[12]!==d?(u={queryKey:r,queryFn:l,enabled:d,staleTime:6e4,retry:1},t[10]=r,t[11]=l,t[12]=d,t[13]=u):u=t[13];const n=ae(u);let c;if(t[14]!==n.data){c=new Map;for(const p of n.data??[])c.set(p.id,p);t[14]=n.data,t[15]=c}else c=t[15];let m;return t[16]!==c||t[17]!==n.isError||t[18]!==n.isLoading?(m={byId:c,isLoading:n.isLoading,isError:n.isError},t[16]=c,t[17]=n.isError,t[18]=n.isLoading,t[19]=m):m=t[19],m}function me(s){return`${s.orgSlug}/${s.virtualMcpId}/${s.branch}`}function ge(s){const e=w.c(9),{query:t,emptyLabel:o,loadingLabel:i}=s,a=se();if(t.isLoading){let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=f.jsx(xe,{size:"xs"}),e[0]=l):l=e[0];let d;return e[1]!==i?(d=f.jsxs("div",{className:"flex items-center gap-2 px-2 py-6 text-sm text-muted-foreground",children:[l,i]}),e[1]=i,e[2]=d):d=e[2],d}if(t.isError){let l;e[3]!==a?(l=a("sandbox.productPickerDialog.couldNotLoad"),e[3]=a,e[4]=l):l=e[4];let d;return e[5]!==l?(d=f.jsx("p",{className:"px-2 py-6 text-sm text-muted-foreground",children:l}),e[5]=l,e[6]=d):d=e[6],d}let r;return e[7]!==o?(r=f.jsx("p",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:o}),e[7]=o,e[8]=r):r=e[8],r}function Be(s){const e=w.c(32),{sandboxRef:t,enabled:o,onSelect:i,className:a}=s,r=se(),[l,d]=H.useState("");let u;e[0]!==t?(u=ie.sandboxInvoke(me(t),"blog-category-tree"),e[0]=t,e[1]=u):u=e[1];let n;e[2]!==t?(n=()=>ce(t,Ie()).then(Re),e[2]=t,e[3]=n):n=e[3];let c;e[4]!==o||e[5]!==u||e[6]!==n?(c={queryKey:u,queryFn:n,enabled:o,staleTime:6e4,retry:1},e[4]=o,e[5]=u,e[6]=n,e[7]=c):c=e[7];const m=ae(c);let p,g,h,P;if(e[8]!==a||e[9]!==l||e[10]!==i||e[11]!==m||e[12]!==r){const S=Ke(m.data??[],l);h="space-y-2";let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=C=>d(C.target.value),e[17]=j):j=e[17];let b;e[18]!==r?(b=r("sandbox.productPickerDialog.filterCategoriesPlaceholder"),e[18]=r,e[19]=b):b=e[19],e[20]!==l||e[21]!==b?(P=f.jsx(le,{value:l,onChange:j,placeholder:b,className:"h-9"}),e[20]=l,e[21]=b,e[22]=P):P=e[22],e[23]!==a?(p=re("overflow-y-auto rounded-md border",a),e[23]=a,e[24]=p):p=e[24],g=S.length===0?f.jsx(ge,{query:m,loadingLabel:r("sandbox.productPickerDialog.loadingCategories"),emptyLabel:r("sandbox.productPickerDialog.noCategories")}):f.jsx("div",{className:"p-1",children:S.map(C=>f.jsx("button",{type:"button",onClick:()=>i(C),className:"block w-full truncate px-2 py-1.5 text-left text-sm hover:bg-muted/60 rounded-lg",children:C.label},C.path))}),e[8]=a,e[9]=l,e[10]=i,e[11]=m,e[12]=r,e[13]=p,e[14]=g,e[15]=h,e[16]=P}else p=e[13],g=e[14],h=e[15],P=e[16];let x;e[25]!==p||e[26]!==g?(x=f.jsx("div",{className:p,children:g}),e[25]=p,e[26]=g,e[27]=x):x=e[27];let v;return e[28]!==h||e[29]!==P||e[30]!==x?(v=f.jsxs("div",{className:h,children:[P,x]}),e[28]=h,e[29]=P,e[30]=x,e[31]=v):v=e[31],v}const Ue=[{id:"search",labelKey:"sandbox.productPickerDialog.modeSearch"},{id:"category",labelKey:"sandbox.productPickerDialog.modeCategory"},{id:"cluster",labelKey:"sandbox.productPickerDialog.modeClusterId"}];async function Me(s,e){if(e.length===0)return[];const t=await Promise.allSettled(e.map(r=>ce(s,r))),o=t.filter(r=>r.status==="fulfilled").map(r=>r.value);if(o.length===0){const r=t.find(l=>l.status==="rejected");throw r?r.reason:new Error("Failed to fetch products")}const i=[],a=new Set;for(const r of o)for(const l of pe(r))a.has(l.id)||(a.add(l.id),i.push(l));return i}function ue(s){const e=w.c(6),[t,o]=H.useState(""),[i,a]=H.useState(""),r=H.useRef(null);let l;e[0]!==s?(l=n=>{o(n),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>a(n),s)},e[0]=s,e[1]=l):l=e[1];const d=l;let u;return e[2]!==i||e[3]!==d||e[4]!==t?(u={value:t,debounced:i,onChange:d},e[2]=i,e[3]=d,e[4]=t,e[5]=u):u=e[5],u}function Ve(s){const e=w.c(23),{option:t,selected:o,onToggle:i}=s,a=o?"border-primary/40 bg-primary/5":"border-transparent hover:bg-muted/60";let r;e[0]!==a?(r=re("flex w-full items-center gap-3 rounded-lg border px-2 py-2 text-left transition-colors",a),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==t.image?(l=f.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:t.image?f.jsx("img",{src:t.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):f.jsx(Se,{size:14,className:"text-muted-foreground"})}),e[2]=t.image,e[3]=l):l=e[3];let d;e[4]!==t.label?(d=f.jsx("span",{className:"line-clamp-2 text-sm",children:t.label}),e[4]=t.label,e[5]=d):d=e[5];let u;e[6]!==t.id?(u=f.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:["ID ",t.id]}),e[6]=t.id,e[7]=u):u=e[7];let n;e[8]!==d||e[9]!==u?(n=f.jsxs("span",{className:"min-w-0 flex-1",children:[d,u]}),e[8]=d,e[9]=u,e[10]=n):n=e[10];const c=o?"border-primary bg-primary text-primary-foreground":"border-border text-transparent";let m;e[11]!==c?(m=re("flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",c),e[11]=c,e[12]=m):m=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=f.jsx(be,{size:12}),e[13]=p):p=e[13];let g;e[14]!==m?(g=f.jsx("span",{className:m,children:p}),e[14]=m,e[15]=g):g=e[15];let h;return e[16]!==i||e[17]!==o||e[18]!==g||e[19]!==r||e[20]!==l||e[21]!==n?(h=f.jsxs("button",{type:"button",onClick:i,"aria-pressed":o,className:r,children:[l,n,g]}),e[16]=i,e[17]=o,e[18]=g,e[19]=r,e[20]=l,e[21]=n,e[22]=h):h=e[22],h}function Ye(s){const e=w.c(20),{sandboxRef:t,open:o,selected:i,onSelect:a}=s,r=se();if(i){let d;e[0]!==a?(d=()=>a(null),e[0]=a,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=f.jsx(we,{size:14}),e[2]=u):u=e[2];let n;e[3]!==r?(n=r("sandbox.productPickerDialog.categoryLabel"),e[3]=r,e[4]=n):n=e[4];let c;e[5]!==i.label?(c=f.jsx("span",{className:"text-foreground",children:i.label}),e[5]=i.label,e[6]=c):c=e[6];let m;e[7]!==r?(m=r("sandbox.productPickerDialog.change"),e[7]=r,e[8]=m):m=e[8];let p;e[9]!==n||e[10]!==c||e[11]!==m?(p=f.jsxs("span",{className:"truncate",children:[n,c," —",m]}),e[9]=n,e[10]=c,e[11]=m,e[12]=p):p=e[12];let g;return e[13]!==d||e[14]!==p?(g=f.jsxs("button",{type:"button",onClick:d,className:"flex items-center gap-1.5 rounded-lg px-2 py-1.5 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[u,p]}),e[13]=d,e[14]=p,e[15]=g):g=e[15],g}let l;return e[16]!==a||e[17]!==o||e[18]!==t?(l=f.jsx(Be,{sandboxRef:t,enabled:o,onSelect:a,className:"h-48"}),e[16]=a,e[17]=o,e[18]=t,e[19]=l):l=e[19],l}function Ze(s){const e=w.c(90),{open:t,onOpenChange:o,sandboxRef:i,selectedIds:a,onChange:r,onPicked:l,multiple:d}=s,u=d===void 0?!0:d,n=se(),[c,m]=H.useState("search"),p=ue(300),g=ue(300),[h,P]=H.useState(null),x=c==="search"?p.debounced:c==="cluster"?g.debounced:h?.path??"";let v;e[0]!==c||e[1]!==x?(v=$e(c,x),e[0]=c,e[1]=x,e[2]=v):v=e[2];const S=v;let j;e[3]!==c||e[4]!==i||e[5]!==x?(j=ie.sandboxInvoke(me(i),`blog-product:${c}:${x}`),e[3]=c,e[4]=i,e[5]=x,e[6]=j):j=e[6];let b;e[7]!==S||e[8]!==i?(b=()=>Me(i,S),e[7]=S,e[8]=i,e[9]=b):b=e[9];const C=t&&S.length>0;let X;e[10]!==j||e[11]!==b||e[12]!==C?(X={queryKey:j,queryFn:b,enabled:C,staleTime:6e4,retry:1},e[10]=j,e[11]=b,e[12]=C,e[13]=X):X=e[13];const N=ae(X);let G;e[14]!==a?(G=new Set(a.filter(Boolean)),e[14]=a,e[15]=G):G=e[15];const k=G;let J;e[16]!==u||e[17]!==r||e[18]!==l||e[19]!==k||e[20]!==a?(J=y=>{const te=y.id,ne=k.has(te);if(l){l(y,!ne);return}r(u?ne?a.filter(he=>he!==te):[...a.filter(Boolean),te]:ne?[]:[te])},e[16]=u,e[17]=r,e[18]=l,e[19]=k,e[20]=a,e[21]=J):J=e[21];const oe=J;let W;e[22]!==N.data?(W=N.data??[],e[22]=N.data,e[23]=W):W=e[23];const Z=W,D=S.length===0;let T;e[24]!==u||e[25]!==n?(T=n(u?"sandbox.productPickerDialog.addProducts":"sandbox.productPickerDialog.chooseProduct"),e[24]=u,e[25]=n,e[26]=T):T=e[26];let E;e[27]!==T?(E=f.jsx(je,{className:"border-b border-border px-4 py-3",children:f.jsx(Pe,{className:"text-sm font-medium",children:T})}),e[27]=T,e[28]=E):E=e[28];let L;e[29]!==c||e[30]!==n?(L=Ue.map(y=>f.jsx("button",{type:"button",onClick:()=>m(y.id),className:re("rounded-lg px-2.5 py-1 text-sm transition-colors",c===y.id?"bg-muted font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:n(y.labelKey)},y.id)),e[29]=c,e[30]=n,e[31]=L):L=e[31];let $;e[32]!==L?($=f.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-4 py-2",children:L}),e[32]=L,e[33]=$):$=e[33];let I;e[34]!==c||e[35]!==p||e[36]!==n?(I=c==="search"&&f.jsx(le,{autoFocus:!0,value:p.value,onChange:y=>p.onChange(y.target.value),placeholder:n("sandbox.productPickerDialog.searchProductsPlaceholder"),className:"h-9"}),e[34]=c,e[35]=p,e[36]=n,e[37]=I):I=e[37];let _;e[38]!==g||e[39]!==c||e[40]!==n?(_=c==="cluster"&&f.jsx(le,{autoFocus:!0,value:g.value,onChange:y=>g.onChange(y.target.value),placeholder:n("sandbox.productPickerDialog.clusterIdPlaceholder"),className:"h-9"}),e[38]=g,e[39]=c,e[40]=n,e[41]=_):_=e[41];let q;e[42]!==h||e[43]!==c||e[44]!==t||e[45]!==i?(q=c==="category"&&f.jsx(Ye,{sandboxRef:i,open:t,selected:h,onSelect:P}),e[42]=h,e[43]=c,e[44]=t,e[45]=i,e[46]=q):q=e[46];let A;e[47]!==I||e[48]!==_||e[49]!==q?(A=f.jsxs("div",{className:"shrink-0 space-y-2 px-4 py-3",children:[I,_,q]}),e[47]=I,e[48]=_,e[49]=q,e[50]=A):A=e[50];let F;e[51]!==Z||e[52]!==N||e[53]!==k||e[54]!==D||e[55]!==n||e[56]!==oe?(F=Z.length>0?Z.map(y=>f.jsx(Ve,{option:y,selected:k.has(y.id),onToggle:()=>oe(y)},y.id)):!D&&f.jsx(ge,{query:N,loadingLabel:n("sandbox.productPickerDialog.loadingProducts"),emptyLabel:n("sandbox.productPickerDialog.noProductsFound")}),e[51]=Z,e[52]=N,e[53]=k,e[54]=D,e[55]=n,e[56]=oe,e[57]=F):F=e[57];let O;e[58]!==c||e[59]!==D||e[60]!==n?(O=D&&f.jsx("p",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:n(c==="category"?"sandbox.productPickerDialog.pickCategoryPrompt":"sandbox.productPickerDialog.enterClusterPrompt")}),e[58]=c,e[59]=D,e[60]=n,e[61]=O):O=e[61];let R;e[62]!==F||e[63]!==O?(R=f.jsxs("div",{className:"min-h-0 flex-1 space-y-1 overflow-y-auto border-t border-border px-3 py-2",children:[F,O]}),e[62]=F,e[63]=O,e[64]=R):R=e[64];let K;e[65]!==k.size||e[66]!==n?(K=k.size===0?n("sandbox.productPickerDialog.noneSelected"):n("sandbox.productPickerDialog.selectedCount",{count:String(k.size)}),e[65]=k.size,e[66]=n,e[67]=K):K=e[67];let z;e[68]!==K?(z=f.jsx("span",{className:"text-xs text-muted-foreground",children:K}),e[68]=K,e[69]=z):z=e[69];let B;e[70]!==o?(B=()=>o(!1),e[70]=o,e[71]=B):B=e[71];let U;e[72]!==n?(U=n("sandbox.productPickerDialog.done"),e[72]=n,e[73]=U):U=e[73];let M;e[74]!==B||e[75]!==U?(M=f.jsx(ke,{size:"sm",onClick:B,children:U}),e[74]=B,e[75]=U,e[76]=M):M=e[76];let V;e[77]!==z||e[78]!==M?(V=f.jsxs("div",{className:"flex shrink-0 items-center justify-between border-t border-border px-4 py-3",children:[z,M]}),e[77]=z,e[78]=M,e[79]=V):V=e[79];let Y;e[80]!==E||e[81]!==$||e[82]!==A||e[83]!==R||e[84]!==V?(Y=f.jsxs(ve,{className:"flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[560px] sm:max-w-[560px]",children:[E,$,A,R,V]}),e[80]=E,e[81]=$,e[82]=A,e[83]=R,e[84]=V,e[85]=Y):Y=e[85];let ee;return e[86]!==o||e[87]!==t||e[88]!==Y?(ee=f.jsx(Ce,{open:t,onOpenChange:o,children:Y}),e[86]=o,e[87]=t,e[88]=Y,e[89]=ee):ee=e[89],ee}export{Be as C,Ze as P,$e as b,ce as i,pe as p,Je as r,We as u};
|