decocms 4.576.2 → 4.576.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CQW1P7_R.js → AlertCircle-CsPTcN_S.js} +1 -1
- package/dist/client/assets/{AreaChart-BEgOgZZj.js → AreaChart-CPcUCL9A.js} +1 -1
- package/dist/client/assets/{ArrowLeft-sSY9Zm-O.js → ArrowLeft-BYhfnAa5.js} +1 -1
- package/dist/client/assets/{ArrowUp-VZphHDPw.js → ArrowUp-Cv1SmuzD.js} +1 -1
- package/dist/client/assets/{CartesianChart-Bku6CBeN.js → CartesianChart-1SsRQdZi.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CI96Ht0A.js → CategoricalChart-B9nv4p9e.js} +1 -1
- package/dist/client/assets/{CheckCircle-BAqlx5xq.js → CheckCircle-LO8Q7KlB.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CAw9AQRt.js → ChevronSelectorVertical-Bo1EsiyQ.js} +1 -1
- package/dist/client/assets/{ChevronUp-RQuomTlc.js → ChevronUp-Dh24Sq_k.js} +1 -1
- package/dist/client/assets/{CreditCard01-uW1Nq0L7.js → CreditCard01-B0xYA-L3.js} +1 -1
- package/dist/client/assets/{Globe04-1JEh9zst.js → Globe04-ceJSWDa3.js} +1 -1
- package/dist/client/assets/{Key01-B-MK6puk.js → Key01-D9P3FMiY.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ArAKWl5D.js → LinkBroken01-B3rPhu7D.js} +1 -1
- package/dist/client/assets/{Minus-y3rEkH4O.js → Minus-BP4M5eUu.js} +1 -1
- package/dist/client/assets/{Monitor01-DkdtFPE6.js → Monitor01-BIy7Jnq0.js} +1 -1
- package/dist/client/assets/{Play-BtmesR9D.js → Play-C4cdDhC3.js} +1 -1
- package/dist/client/assets/{Plus-BhSB1FAc.js → Plus-Bcl7avNA.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CguuPF_F.js → ReferenceLine-CZfceFos.js} +1 -1
- package/dist/client/assets/{SearchMd-CTCaP47C.js → SearchMd-DRs-Ld4Z.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DEtqIAKG.js → ShoppingBag01-BcBJW8Ry.js} +1 -1
- package/dist/client/assets/{Sun-DhrY2nq7.js → Sun-oVWnfq_E.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DTDSJnjG.js → SwitchHorizontal01-BTdsV_bI.js} +1 -1
- package/dist/client/assets/{Tool01-CE4RsL2T.js → Tool01-BWMOxR8v.js} +1 -1
- package/dist/client/assets/{Tooltip-DzoIZZA-.js → Tooltip-DHjHeuys.js} +1 -1
- package/dist/client/assets/{Trash01-DQCE9WJt.js → Trash01-CgWosjFE.js} +1 -1
- package/dist/client/assets/{Upload01-C8pH3Rp-.js → Upload01-DAMBCMxP.js} +1 -1
- package/dist/client/assets/{UserSquare-DfCEdLMW.js → UserSquare-BjqAifU8.js} +1 -1
- package/dist/client/assets/{Users01-RbJbPNL4.js → Users01-Bt0rcyOL.js} +1 -1
- package/dist/client/assets/{XClose-B9seet19.js → XClose-TMdj_yIm.js} +1 -1
- package/dist/client/assets/{Zap-B2TeJ3jk.js → Zap-BJ5eCR1y.js} +1 -1
- package/dist/client/assets/{access-gate-B3-8eUAT.js → access-gate-DbqD_EAv.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BZazlImL.js → add-connection-dialog-DigMA6Jw.js} +1 -1
- package/dist/client/assets/agent-app-z2dEAE0c.js +1 -0
- package/dist/client/assets/{agent-assets-D6n5n_j9.js → agent-assets-B50PlEch.js} +1 -1
- package/dist/client/assets/{agent-automation-BDFDUDqF.js → agent-automation-ZC5pUe0X.js} +1 -1
- package/dist/client/assets/{agent-automations-CTb19iEo.js → agent-automations-BqJwcAQY.js} +1 -1
- package/dist/client/assets/{agent-calendar-dOBBocaZ.js → agent-calendar-6cFcqsTq.js} +1 -1
- package/dist/client/assets/{agent-capabilities-D8RyEQle.js → agent-capabilities-DODsAfWG.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Cv_HfEov.js → agent-connect-sources-BMcGkScg.js} +1 -1
- package/dist/client/assets/agent-deck-oSNNh6Oq.js +1 -0
- package/dist/client/assets/{agent-e2e-UuVTzQty.js → agent-e2e-qon8RqKT.js} +1 -1
- package/dist/client/assets/agent-experiments-DSDO0e_Q.js +1 -0
- package/dist/client/assets/{agent-file-BxTgqKD4.js → agent-file-BDrgchCG.js} +1 -1
- package/dist/client/assets/{agent-hosting-SFnhs_AJ.js → agent-hosting-lyen0G2R.js} +1 -1
- package/dist/client/assets/{agent-icon-DmYd33Zd.js → agent-icon-CMiKlX_f.js} +1 -1
- package/dist/client/assets/agent-library-BL3gqRVT.js +1 -0
- package/dist/client/assets/agent-library-file-qyRRAu7t.js +1 -0
- package/dist/client/assets/agent-overview-D-M__QCC.js +1 -0
- package/dist/client/assets/{agent-releases-Nv7L0dpy.js → agent-releases-CDlgQRKx.js} +1 -1
- package/dist/client/assets/agent-settings-J3n5UPp_.js +1 -0
- package/dist/client/assets/{agent-site-editor-DLrFF0Rn.js → agent-site-editor-Z6rBuS35.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-BaufV44m.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BZesN91A.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-n4h_ozj2.js +1 -0
- package/dist/client/assets/{agent-view-guard-D0qWi85T.js → agent-view-guard-DGsM3j-h.js} +1 -1
- package/dist/client/assets/agent-view-xa9IiygI.js +1 -0
- package/dist/client/assets/{ai-providers-CjPCR-pK.js → ai-providers-CAe-vRzr.js} +1 -1
- package/dist/client/assets/{alert-C5FPaAXQ.js → alert-TFdEDT2O.js} +1 -1
- package/dist/client/assets/{analytics-sections-BGMxhZwl.js → analytics-sections-CopwZcAF.js} +1 -1
- package/dist/client/assets/api-keys-B7PbIf1K.js +1 -0
- package/dist/client/assets/{api-keys-p6Xw6r8B.js → api-keys-BRzjuZvx.js} +1 -1
- package/dist/client/assets/{app-editor-DQwdeZHJ.js → app-editor-CUySEecw.js} +1 -1
- package/dist/client/assets/{asset-utils-BW1FTT9q.js → asset-utils-B4QYhZxH.js} +1 -1
- package/dist/client/assets/{auth-DeNsOsKX.js → auth-TL5_hJeY.js} +1 -1
- package/dist/client/assets/{auth-catchall-C3auT4P_.js → auth-catchall-na7siRgx.js} +1 -1
- package/dist/client/assets/{auth-entry-BBIyDdU5.js → auth-entry-BGo8_cbu.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CpPst90z.js → auth-split-layout-BISVCxy2.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Ca1G6bWy.js → authenticate-and-persist-oauth-CUE7ik09.js} +1 -1
- package/dist/client/assets/{automation-list-row-GTaw28qY.js → automation-list-row-DpSl9UM5.js} +1 -1
- package/dist/client/assets/{automation-runs-e7UMBmIy.js → automation-runs-BfKHSay9.js} +1 -1
- package/dist/client/assets/{automations-DVHIEzYX.js → automations-Dg2lSOc5.js} +1 -1
- package/dist/client/assets/{autosend-0p4cszrD.js → autosend-CGJPJD3U.js} +1 -1
- package/dist/client/assets/{badge-fJOJmdQG.js → badge-D7MkXlu5.js} +1 -1
- package/dist/client/assets/{block-document-D6lQw_Sn.js → block-document-BAvIRwEs.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CevYm8XG.js → blocks-preview-workspace-context-DFEoJmhw.js} +1 -1
- package/dist/client/assets/blocks-tab-states-DASlUdvo.js +1 -0
- package/dist/client/assets/{blog-schema-CW6OwOTr.js → blog-schema-D7LUSvhR.js} +1 -1
- package/dist/client/assets/{buckets-DJjTeJ67.js → buckets-DWZ0uMIH.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-Bz_NuW8p.js → build-improve-prompt-doc-Cp4dU57k.js} +1 -1
- package/dist/client/assets/{calendar-BN8LK6az.js → calendar-J9rCuEM0.js} +1 -1
- package/dist/client/assets/{capability-load-error-BwSdaWc5.js → capability-load-error-cDMC87PI.js} +1 -1
- package/dist/client/assets/{category-editor-B2fU3l2-.js → category-editor-B6mXBz4W.js} +1 -1
- package/dist/client/assets/{chart-TbvRqjuj.js → chart-sO-wf7w_.js} +1 -1
- package/dist/client/assets/{chat-context-BwoQSegQ.js → chat-context-DgCR75CY.js} +1 -1
- package/dist/client/assets/{chat-draft-DH581p83.js → chat-draft-B_pQlOo7.js} +1 -1
- package/dist/client/assets/{checkbox-BYltfk17.js → checkbox-CDdGUfxj.js} +1 -1
- package/dist/client/assets/{choose-editor-CF8pbtbx.js → choose-editor-DOwdvoLE.js} +1 -1
- package/dist/client/assets/{cli-auth-success-8VRhz3fQ.js → cli-auth-success-BAsObd7a.js} +1 -1
- package/dist/client/assets/{client-icons-azPimjhr.js → client-icons-Bp0n81sC.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-Dh2cgMIJ.js → cms-settings-editor-B6ALhYaf.js} +1 -1
- package/dist/client/assets/cms-store-drafts-CZfXb7jx.js +1 -0
- package/dist/client/assets/{collapsible-DMIxs55h.js → collapsible-BF7fiKEY.js} +1 -1
- package/dist/client/assets/{collection-detail-BNTXyqsr.js → collection-detail-DHIJx408.js} +1 -1
- package/dist/client/assets/{collection-display-button-DlPhjc6E.js → collection-display-button-D3cSy-rU.js} +1 -1
- package/dist/client/assets/{collection-search-DFoNgd1T.js → collection-search-DmyrNuWr.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-OwJoF9HU.js → collection-table-wrapper-BVBFYCyq.js} +1 -1
- package/dist/client/assets/{collection-tabs-DTr38V1c.js → collection-tabs-CzJgsFmP.js} +1 -1
- package/dist/client/assets/{combobox-B8pIOucr.js → combobox-Cy1ac_Va.js} +1 -1
- package/dist/client/assets/{command-8eo7blzl.js → command-Bh995x5J.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-OBc1XSiN.js → companion-mcps-section-DHnNnyh5.js} +1 -1
- package/dist/client/assets/{config-CZxXYayZ.js → config-C1KKnNPa.js} +1 -1
- package/dist/client/assets/{connect-BDnlsqF3.js → connect-DN6GB1WI.js} +1 -1
- package/dist/client/assets/{connect-layout-f8wmYpiF.js → connect-layout-DllpY2qm.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-BnoBKHvg.js → connect-source-dialog-C4jdSJZP.js} +1 -1
- package/dist/client/assets/{connection-B4VgNpkK.js → connection-S1Y-z6Ze.js} +1 -1
- package/dist/client/assets/{connection-card-Cp7AJMDR.js → connection-card-GbDbFKHX.js} +1 -1
- package/dist/client/assets/{connection-detail-BYR-qeWG.js → connection-detail-Bt9fqrdv.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DqULERyx.js → connection-form-helpers-DwQM2AXJ.js} +1 -1
- package/dist/client/assets/{connection-slug-CK9E8VRg.js → connection-slug-CQeaB-ii.js} +1 -1
- package/dist/client/assets/{connections-D1yKPCTH.js → connections-023t3K8C.js} +1 -1
- package/dist/client/assets/{content-tab-D-PBLIve.js → content-tab-DnZUk0R_.js} +3 -3
- package/dist/client/assets/{context-Ciehk0ao.js → context-BviRKxpu.js} +1 -1
- package/dist/client/assets/{context-menu-SmukJNMU.js → context-menu-_4SjkJP2.js} +1 -1
- package/dist/client/assets/{context-shell-CO4fTNNJ.js → context-shell-2FHUOtQh.js} +3 -3
- package/dist/client/assets/{core.esm-B_Pr2KZA.js → core.esm-Cx2tI-v0.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-8e7uLr8k.js → create-organization-dialog-DztBZJfG.js} +1 -1
- package/dist/client/assets/{device-hint-_3UpNo1y.js → device-hint-DiJItdVl.js} +1 -1
- package/dist/client/assets/{discover-j-WmLzAr.js → discover-CZ-mJztz.js} +1 -1
- package/dist/client/assets/{domain-settings-nzh2Xqh2.js → domain-settings-DEAsOpnU.js} +1 -1
- package/dist/client/assets/{drawer-BiZQd3jF.js → drawer-BcaULeep.js} +1 -1
- package/dist/client/assets/{editor-B5BFg8L4.js → editor-DXF9rwVo.js} +1 -1
- package/dist/client/assets/{editor-classes-DxfrzHp8.js → editor-classes-DEwbN0MI.js} +1 -1
- package/dist/client/assets/{empty-state-CPhGFwFG.js → empty-state-Ccl8OC-j.js} +1 -1
- package/dist/client/assets/{empty-state-D5FGRI4e.js → empty-state-Cfajk5TO.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-5NNTmJRW.js → experiments-tab-choice-BVL1j6B7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-lBAlP3pz.js → extract-connection-data-biKUq-5E.js} +1 -1
- package/dist/client/assets/{feature-gate-Djob_jbU.js → feature-gate-TKaLsYFc.js} +1 -1
- package/dist/client/assets/{feature-paywall-DWnzqDkt.js → feature-paywall-DasxziSs.js} +1 -1
- package/dist/client/assets/{file-explorer-B7HqI107.js → file-explorer-DgzFCGgU.js} +1 -1
- package/dist/client/assets/{file-preview-CVLvq53I.js → file-preview-Dmy5YhII.js} +1 -1
- package/dist/client/assets/{file-share-button-Ug-zwu4d.js → file-share-button-Cl-IgS5x.js} +1 -1
- package/dist/client/assets/{file-type-icon-BZTtX6EK.js → file-type-icon-D75nksOt.js} +1 -1
- package/dist/client/assets/{folder-icon-C2EzD8if.js → folder-icon-C5I9OzDM.js} +1 -1
- package/dist/client/assets/{form-Bhgzwnyp.js → form-CIThj_T9.js} +1 -1
- package/dist/client/assets/{general-CPLHJuRp.js → general-Cz8UZeQh.js} +1 -1
- package/dist/client/assets/{github-icon-Buu0H1v4.js → github-icon--dnMj3-y.js} +1 -1
- package/dist/client/assets/{home-BCYh-a3a.js → home-Dxjl17s5.js} +1 -1
- package/dist/client/assets/{home-overview-DTtXcEkG.js → home-overview-g3rcNgW7.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-BdwyWhOE.js → hosted-reconcile-D236FadC.js} +1 -1
- package/dist/client/assets/{icon-button-Dls6AzVP.js → icon-button-CyNmKrzV.js} +1 -1
- package/dist/client/assets/{index-DJy_S3Mn.js → index-B57dAAxD.js} +1 -1
- package/dist/client/assets/{index-CQIKg7tc.js → index-BCZy-897.js} +1 -1
- package/dist/client/assets/{index-CJKJ4WN3.js → index-BF9ePDqU.js} +1 -1
- package/dist/client/assets/{index-CMl-YIkn.js → index-BVHbGN5c.js} +1 -1
- package/dist/client/assets/{index-D_HCIUjf.js → index-B_wKEr5f.js} +1 -1
- package/dist/client/assets/{index-B6eHz5VS.js → index-BrihqSoi.js} +1 -1
- package/dist/client/assets/{index-B4tnBHnb.js → index-BtqPZIqH.js} +1 -1
- package/dist/client/assets/{index-0xCVweSM.js → index-CRog5tFp.js} +1 -1
- package/dist/client/assets/{index-BJqMJFEL.js → index-CXMGhRs4.js} +1 -1
- package/dist/client/assets/{index-CtJa8hR9.js → index-DJZmV4c9.js} +1 -1
- package/dist/client/assets/{index-XdUWZF5g.js → index-Dd5hidCj.js} +3 -3
- package/dist/client/assets/{index-C8i-vHCI.js → index-DgYBSkMj.js} +1 -1
- package/dist/client/assets/{index-CKuu5BgI.js → index-DjpHvK_4.js} +1 -1
- package/dist/client/assets/{index-DAFka6tK.js → index-DrqsNFYR.js} +1 -1
- package/dist/client/assets/{index-B3BrFVGB.js → index-_nd_1JQz.js} +1 -1
- package/dist/client/assets/{index-BJrkqMqs.js → index-nO2S2V0T.js} +1 -1
- package/dist/client/assets/{index-UxIaE43S.js → index-ozu548h3.js} +1 -1
- package/dist/client/assets/{index-redirect-ZoX0Nmet.js → index-redirect-DUi7z5TL.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DgQQHW6Y.js → infiniteQueryObserver-C1uWfhgO.js} +1 -1
- package/dist/client/assets/{infra-billing-CbpAOQ7f.js → infra-billing-DWMi-9eg.js} +1 -1
- package/dist/client/assets/{input-BneF5n5F.js → input-B-TiyPUk.js} +3 -3
- package/dist/client/assets/{input-BBwM3ir1.js → input-DKlZJGf0.js} +1 -1
- package/dist/client/assets/{integration-icon-DpoZYM7e.js → integration-icon-DHvbSqTM.js} +1 -1
- package/dist/client/assets/{jira-icon-CfXcnbRW.js → jira-icon-CUlCkXDM.js} +1 -1
- package/dist/client/assets/{label-CUqIqnOS.js → label-BZoCdZa0.js} +1 -1
- package/dist/client/assets/{layout-CZKu8-AR.js → layout-C4bx239O.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-D12aat8e.js → legacy-admin-welcome-dialog-BgMnIQY9.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-C46PUrrS.js → legacy-agents-deep-BELlTHpx.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-si54JTxO.js → legacy-main-redirect-CxAuaPrB.js} +1 -1
- package/dist/client/assets/library-D_ryD5pc.js +1 -0
- package/dist/client/assets/{library-tab-EiyuBjPa.js → library-tab-CnjcP9yb.js} +1 -1
- package/dist/client/assets/{login-D0eYUue3.js → login-CA5_HXz3.js} +1 -1
- package/dist/client/assets/{markdown-A06Oe1_p.js → markdown-ZlzKtNkL.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Dkj1yLIG.js → mcp-app-renderer-CRFiwN6n.js} +1 -1
- package/dist/client/assets/{mcp-oauth-L4CbK4hz.js → mcp-oauth-Cq-Z82WC.js} +1 -1
- package/dist/client/assets/{mcp-oauth-u5RBmpff.js → mcp-oauth-VaMDOw7T.js} +1 -1
- package/dist/client/assets/{members-D2W9FUHb.js → members-CHUd-Ol1.js} +1 -1
- package/dist/client/assets/{memory-nZuh_3HW.js → memory-CltSbzPH.js} +1 -1
- package/dist/client/assets/{mock-board-DkI2cfk-.js → mock-board-TQVQrJy0.js} +3 -3
- package/dist/client/assets/{monaco-editor-DoTBOc-e.js → monaco-editor-BZNPSifL.js} +1 -1
- package/dist/client/assets/{monitoring-DZ1uqyFT.js → monitoring-D-eHzsjl.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Be_-YMn8.js → monitoring-stats-row-C7sD_prp.js} +1 -1
- package/dist/client/assets/{multi-select-CzoYfyvg.js → multi-select-DL8hrKQv.js} +1 -1
- package/dist/client/assets/{mustache-BctGjQ5L.js → mustache-DZix8TV9.js} +1 -1
- package/dist/client/assets/{named-rule-view-DUsv8g0V.js → named-rule-view-xs5Ukf19.js} +1 -1
- package/dist/client/assets/{new-project-dialog-151PED_m.js → new-project-dialog-BDUp1HsF.js} +1 -1
- package/dist/client/assets/{oauth-callback-DrwI5ATg.js → oauth-callback-D-Igsrh7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D9pLn0-_.js → oauth-callback-ai-provider-Yifk_dmU.js} +1 -1
- package/dist/client/assets/{oauth-consent-o6k0sIQ6.js → oauth-consent-DlsvLpih.js} +1 -1
- package/dist/client/assets/{onboarding-BMQJZ4PX.js → onboarding-CyvbU-47.js} +1 -1
- package/dist/client/assets/{openai-conversation-CWam_Ql8.js → openai-conversation-CKtOG2f6.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Dx-3KOhR.js → optimistic-project-sidebar-views-DMLee7lV.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DGR3iDef.js → order-monitor-day-D_UJY8n7.js} +1 -1
- package/dist/client/assets/{organization-choice-1Lr2hM9B.js → organization-choice-11vPd3Oe.js} +1 -1
- package/dist/client/assets/{orgs-CbmN-Uo3.js → orgs-CO5mj27b.js} +1 -1
- package/dist/client/assets/{own-accounts-section-DPfUOm23.js → own-accounts-section-VOVPBP5x.js} +1 -1
- package/dist/client/assets/{pair-BCJ5sFP0.js → pair-D5jYRLOi.js} +1 -1
- package/dist/client/assets/{parse-sections-DxG18Udv.js → parse-sections-BqIle9mt.js} +3 -3
- package/dist/client/assets/{plan-BaYlHrHs.js → plan-BkqYlxrI.js} +1 -1
- package/dist/client/assets/{plan-ladder-LKl9l3TA.js → plan-ladder-42sSWoBs.js} +1 -1
- package/dist/client/assets/{plan-usage-card-wDWYSVHD.js → plan-usage-card-DawnbwSf.js} +1 -1
- package/dist/client/assets/{popover-DmqBIPKi.js → popover-4z9eDM-9.js} +1 -1
- package/dist/client/assets/{post-calendar-C4TZhDJz.js → post-calendar-DXSJQozg.js} +1 -1
- package/dist/client/assets/{post-editor-DGrj-qXP.js → post-editor-BOGWSxB3.js} +1 -1
- package/dist/client/assets/{preview-content-8R1QUim7.js → preview-content-DAApomFo.js} +1 -1
- package/dist/client/assets/{preview-dialog-ZNHmoyI1.js → preview-dialog-BYfDupos.js} +1 -1
- package/dist/client/assets/{preview-panel-DbX8A-HE.js → preview-panel-BnTSUu1W.js} +1 -1
- package/dist/client/assets/{preview-tab-DglGrCFS.js → preview-tab-DoF3705n.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-B84p2GNz.js → product-picker-dialog-CtVVJBu_.js} +1 -1
- package/dist/client/assets/{profile-Bhqnq92W.js → profile-Cespz5EQ.js} +1 -1
- package/dist/client/assets/{project-app-view-BH2u01TO.js → project-app-view-BZhEHrBD.js} +1 -1
- package/dist/client/assets/{project-apps-CTuZm-1a.js → project-apps-C1L1P3Il.js} +1 -1
- package/dist/client/assets/{project-icon-BhWIi9DN.js → project-icon-BC5BTHqT.js} +1 -1
- package/dist/client/assets/{project-index-_-BCnGMR.js → project-index-Cov2uCEL.js} +1 -1
- package/dist/client/assets/project-reports-C2rrdScO.js +1 -0
- package/dist/client/assets/project-tasks-BIUh6BbU.js +1 -0
- package/dist/client/assets/{projects-CbLcC2Cm.js → projects-Dp44Mtfj.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DgeHjyWl.js → projects-empty-state-BKHYkH3g.js} +1 -1
- package/dist/client/assets/{prompts-CIAk1CWx.js → prompts-Bf1h2RZu.js} +1 -1
- package/dist/client/assets/{record-editor-Cqt0X6zj.js → record-editor-Du-SgLkC.js} +1 -1
- package/dist/client/assets/{redirect-editor-DrfUg_M2.js → redirect-editor-Diqw7Nkh.js} +1 -1
- package/dist/client/assets/{reports-BqGiKAfm.js → reports-DRRYJcxd.js} +1 -1
- package/dist/client/assets/{reports-onboarding-LZjQ8G8T.js → reports-onboarding-C4BoLN-j.js} +1 -1
- package/dist/client/assets/reports-qs02DwnV.js +1 -0
- package/dist/client/assets/{reports-tab-B55dyiL7.js → reports-tab-Cr_0nAF2.js} +2 -2
- package/dist/client/assets/{repositories-0RznNRUX.js → repositories-B4lUSmlm.js} +1 -1
- package/dist/client/assets/repositories-CHJClbl6.js +1 -0
- package/dist/client/assets/{repository-binding-Cfy_YQIZ.js → repository-binding-DV3kkbZ_.js} +1 -1
- package/dist/client/assets/{repository-picker-BKWo-jhF.js → repository-picker-DhcwcPzc.js} +1 -1
- package/dist/client/assets/{require-capability-Bpnmr0un.js → require-capability-Dlaolf-u.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CRKzQVpv.js → required-auth-layout-lVrZieBu.js} +1 -1
- package/dist/client/assets/{reset-password-DVKc7osA.js → reset-password-H302zhc9.js} +1 -1
- package/dist/client/assets/{resizable-w4diu4pE.js → resizable-D6Bvwzfl.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DY3vlmxg.js → resolve-tab-icon-JhqhoNvw.js} +1 -1
- package/dist/client/assets/{review-settings-D7Ld59mb.js → review-settings-D1OJYsDt.js} +1 -1
- package/dist/client/assets/{role-color-DfOmE7Fu.js → role-color-CxM5Kzh7.js} +1 -1
- package/dist/client/assets/{roles-RQS02DUg.js → roles-C3sEk6Ey.js} +1 -1
- package/dist/client/assets/{route-BRvX0p-n.js → route-AzUNCIcU.js} +1 -1
- package/dist/client/assets/{route-B-HA2s4_.js → route-CKIi5OR7.js} +1 -1
- package/dist/client/assets/route-xJV1Kwll.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-D-PaTa6M.js → sandbox-lifecycle-context-2RE5Jlvg.js} +1 -1
- package/dist/client/assets/{schema-Dq7led26.js → schema-CINYRcKK.js} +1 -1
- package/dist/client/assets/{schema-CJ9UcSNs.js → schema-paIXrOCY.js} +1 -1
- package/dist/client/assets/{scroll-area-PZSCT0ow.js → scroll-area-BwaclrCR.js} +1 -1
- package/dist/client/assets/{search-input-DO66exG7.js → search-input-BG8rdrCe.js} +1 -1
- package/dist/client/assets/{search-toggle-DaBbNP1T.js → search-toggle-CShA1wOK.js} +1 -1
- package/dist/client/assets/{secret-picker-bljsK2mV.js → secret-picker-C6s_jvhV.js} +1 -1
- package/dist/client/assets/{secrets-CBAb9cvk.js → secrets-Bz4L84Vo.js} +1 -1
- package/dist/client/assets/{section-array-field-CPrkBgr3.js → section-array-field-B8BsNXRT.js} +1 -1
- package/dist/client/assets/{sections-T2vi-zI4.js → sections-CnLSarWD.js} +1 -1
- package/dist/client/assets/{sections-editor-DQwNUlLv.js → sections-editor-2QTriBkM.js} +1 -1
- package/dist/client/assets/{select-BABowMoY.js → select-iwVnUZSM.js} +1 -1
- package/dist/client/assets/{select-model-CbEyJ33x.js → select-model-DhxdeY5p.js} +1 -1
- package/dist/client/assets/{seo-editor-C9V4Y_YB.js → seo-editor-BPqT6KgW.js} +1 -1
- package/dist/client/assets/{separator-CM0d_WPE.js → separator-C1bonuaY.js} +1 -1
- package/dist/client/assets/settings-tab-S0xeJTM-.js +1 -0
- package/dist/client/assets/{sheet-BSCF-nmk.js → sheet-DUtlbS4K.js} +1 -1
- package/dist/client/assets/{shell-layout-d2Ief2ja.js → shell-layout-Dcfsytx-.js} +1 -1
- package/dist/client/assets/site-draft-actions-B5A2QjjI.js +3 -0
- package/dist/client/assets/{site-draft-view-CbKyFhEM.js → site-draft-view-DsHq6hEs.js} +1 -1
- package/dist/client/assets/site-editor-BUp_Zz62.js +1 -0
- package/dist/client/assets/{site-editor-toast-CluWI-yZ.js → site-editor-toast-DL4aC3pF.js} +1 -1
- package/dist/client/assets/{skills-BOpgUaHZ.js → skills-5rkbKVfD.js} +1 -1
- package/dist/client/assets/{slider-QcqvUsSI.js → slider-Cmkjh66S.js} +1 -1
- package/dist/client/assets/{sortable.esm-0yomt8g2.js → sortable.esm-C7rI9jHM.js} +1 -1
- package/dist/client/assets/{sso-CbSeZ9e5.js → sso-BEfIFSWt.js} +1 -1
- package/dist/client/assets/{suggestion-C9bDFuOo.js → suggestion-DGz7gtzE.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DMm0_lmO.js → super-agent-icon-Dq4U-BQv.js} +1 -1
- package/dist/client/assets/{switch-CRe3xUPs.js → switch-BZMVD_xA.js} +1 -1
- package/dist/client/assets/{synced-repos-D900mhEv.js → synced-repos-MBV_b16M.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-D5lXXFkj.js → tab-icon-glyph-CeBm3H92.js} +1 -1
- package/dist/client/assets/{table-C-Iqqanf.js → table-C9boQ5tZ.js} +1 -1
- package/dist/client/assets/{tabs-CPwYT_wy.js → tabs-CFdE2LmD.js} +1 -1
- package/dist/client/assets/{task-board-B-Jl-DnQ.js → task-board-BZ6FZl9j.js} +1 -1
- package/dist/client/assets/{task-route-C-boE7jG.js → task-route-WWLMyAp6.js} +1 -1
- package/dist/client/assets/{task-status-Dg7JusRR.js → task-status-CLkNYnsS.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DwDfRDQC.js → taskboard-analytics-WayyDOd5.js} +1 -1
- package/dist/client/assets/tasks-B6kmgmmz.js +1 -0
- package/dist/client/assets/{tasks-ElocVpWd.js → tasks-DOLkXzI6.js} +1 -1
- package/dist/client/assets/{textarea-DSiKrnTK.js → textarea-hEv7rKyL.js} +1 -1
- package/dist/client/assets/{thread-analytics-BtdCUFGw.js → thread-analytics-CM8gvu0V.js} +1 -1
- package/dist/client/assets/{thread-intent-DnduoWYb.js → thread-intent-DMhB2sy4.js} +1 -1
- package/dist/client/assets/{thread-route-DSQLBJ4Y.js → thread-route-B_swkleJ.js} +1 -1
- package/dist/client/assets/{thread-route-D0P3i7B7.js → thread-route-Ce3yplCj.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BHjT7Rlx.js → thread-sheet-body-DTCZxxw9.js} +1 -1
- package/dist/client/assets/{time-range-picker-B0Xtja-D.js → time-range-picker-VzZM-nq4.js} +1 -1
- package/dist/client/assets/{toggle-group-CO1s8gR-.js → toggle-group-DDk8xPXe.js} +1 -1
- package/dist/client/assets/{tool-namespace-BskMFdfX.js → tool-namespace-EVeG8Fs5.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DbHsII-W.js → tool-set-selector-DuVmSXqq.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DQHnJFhG.js → toolbar-icon-button-99r2aG4V.js} +1 -1
- package/dist/client/assets/{tooltip-C1oPRuFg.js → tooltip-Dyh2h0NV.js} +1 -1
- package/dist/client/assets/{tooltipContext-Dk4Jh8sf.js → tooltipContext-CQdoW9wa.js} +1 -1
- package/dist/client/assets/{track-DQNlgsAd.js → track-B5m4mxJj.js} +1 -1
- package/dist/client/assets/{types-sVhbGxrT.js → types-Mb9DEKKQ.js} +1 -1
- package/dist/client/assets/{url-slug-kny4-Gd8.js → url-slug-Cli-NAkj.js} +1 -1
- package/dist/client/assets/{usage-stats-CkprzoQA.js → usage-stats-iRJ2oM0y.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BmwnG2L7.js → use-ai-providers-DQAzIwY2.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-QQXumPyC.js → use-apply-named-rule-qGNe9B-Q.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-4DqUxBJG.js +1 -0
- package/dist/client/assets/{use-automations-pGpYlQfd.js → use-automations-akR-tcRi.js} +1 -1
- package/dist/client/assets/{use-autosave-C1VLdEbv.js → use-autosave-ClND9MZU.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DHH8umJ9.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Ep7OkPup.js → use-chat-layout-state-BsOGOEOo.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-Cls9mAWe.js → use-cms-publish-actions-CntIxbra.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B0uthGiU.js → use-connect-companion-FU7Yjyv3.js} +1 -1
- package/dist/client/assets/{use-connection-DFsrW4Mv.js → use-connection-e-hq9vT7.js} +1 -1
- package/dist/client/assets/{use-content-sync-BYcD8LZk.js → use-content-sync-tJgGPJpi.js} +1 -1
- package/dist/client/assets/{use-copy-9wHvlEmg.js → use-copy-DJs5balG.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CfiWZhP7.js → use-date-fns-locale-DytcjJ4v.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CK8e7jku.js → use-debounced-autosave-CY6fvvGj.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Cs49dczG.js → use-debounced-value-CezJqVSj.js} +1 -1
- package/dist/client/assets/{use-deco-credits-ChuCrYAR.js → use-deco-credits-CHRRrI8G.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CR7NJgme.js → use-decopilot-events-CtnAXgLl.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dq2UKTpz.js → use-delete-connection-Cbnv8IDj.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CALPlo_8.js → use-deployment-admin-mLJFncG4.js} +1 -1
- package/dist/client/assets/{use-entitlements-DzfUP8ON.js → use-entitlements-mX8bg5XG.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B0ysxeQy.js → use-fast-preview-draft-url-DrTS3dt5.js} +1 -1
- package/dist/client/assets/{use-file-configs-CfNCrD6y.js → use-file-configs-z22DUi0c.js} +1 -1
- package/dist/client/assets/{use-id-selection-BeGsI2-X.js → use-id-selection-Bg3vd8Ma.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-HViitByF.js → use-inbox-feed-r_crN8AB.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DdKcODzJ.js → use-infinite-scroll-CvgjtV8K.js} +1 -1
- package/dist/client/assets/{use-join-requests-Dg5vHh8i.js → use-join-requests-DQ56VmKG.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DZH6Z-sf.js → use-main-panel-tabs-BzQUBql-.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-C13HkQ9w.js → use-mcp-auth-status-D0LzrG1g.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B9_8tfCL.js → use-mcp-client-CNXpOf52.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-NcFGfyZU.js → use-mcp-prompts-COb2l8gW.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-wrSWiD0P.js → use-mcp-tools-fDABrIOV.js} +1 -1
- package/dist/client/assets/{use-mobile-DSmr8Fj3.js → use-mobile-DDy9Znlf.js} +1 -1
- package/dist/client/assets/{use-move-blocks-gne4gzCh.js → use-move-blocks-D7WfYgve.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-ycEqYJX7.js → use-navigate-to-agent-B-iTaYhm.js} +1 -1
- package/dist/client/assets/{use-org-fs-C57fsXyq.js → use-org-fs-8086pm93.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BcOvlKwo.js → use-org-repo-syncs-BqoQhBbI.js} +1 -1
- package/dist/client/assets/{use-org-sso-B5c0saDF.js → use-org-sso-DNEWwtoA.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B0lt5dXR.js → use-organization-settings-488vpN0c.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BBRyl28q.js → use-project-native-view-presence-C27ltBxd.js} +1 -1
- package/dist/client/assets/{use-project-scope-C1eT4xwT.js → use-project-scope-Dqnjf5Fg.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CU27r377.js → use-recent-apps-2cMLzs_u.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-QLTyI1c7.js → use-reports-diagnostic-JXB8tUrM.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BNcBCK9X.js → use-sandbox-events-D9uSNLH2.js} +1 -1
- package/dist/client/assets/{use-secrets-Dh7bZZgD.js → use-secrets-Bj9oVJrr.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-53RIdpth.js → use-section-preview-base-DoOLobhv.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-XX5WdYs3.js → use-sidebar-collapsed-CSXlwHC3.js} +1 -1
- package/dist/client/assets/{use-tags-Cbxwh1yu.js → use-tags-CZ8FU88Q.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BseFgQx7.js → use-task-board-analytics-S9D-SUGj.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CMb3Vjy2.js → use-task-board-events-CuH-inlF.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-2_-y1IH5.js → use-task-board-item-prs-DuTkhVPp.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CnG0LR-k.js → use-task-board-items-BNRTDOsU.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DschKVPr.js → use-task-board-prompts-CTcrXcvj.js} +1 -1
- package/dist/client/assets/{use-task-metadata-KJjG2-5j.js → use-task-metadata-BvTVrzAT.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-B6Mbzgsq.js → use-thread-outputs-COaP8znq.js} +1 -1
- package/dist/client/assets/{use-voice-input-BVeAO01v.js → use-voice-input-miWnQR-2.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DqQNqcJl.js +1 -0
- package/dist/client/assets/{useQueries-COskgQPI.js → useQueries-BYTcJkC-.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-0A6saVT8.js +1 -0
- package/dist/client/assets/{users-D9U38Uiq.js → users-CkCjBxij.js} +1 -1
- package/dist/client/assets/{utils-C07I_8BL.js → utils-Cugj1NVM.js} +1 -1
- package/dist/client/assets/{variant-calendar-B1xF-pvj.js → variant-calendar-CumR4poM.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-O46bQvi2.js → variant-matcher-override-CA2qg3Y9.js} +1 -1
- package/dist/client/assets/{view-header-CB8g9i8I.js → view-header-CNnF9Sbv.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DkEy_7-s.js → virtual-mcp-NII7Lu6q.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BUtg06cI.js → watch-sse-pool-2U2aYEEI.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +643 -643
- package/package.json +1 -1
- package/dist/client/assets/agent-app-S0Wudwb2.js +0 -1
- package/dist/client/assets/agent-deck-Cp4W6NYg.js +0 -1
- package/dist/client/assets/agent-experiments-DqEDCkUD.js +0 -1
- package/dist/client/assets/agent-library-D-dnSVJn.js +0 -1
- package/dist/client/assets/agent-library-file-S8fMrNmL.js +0 -1
- package/dist/client/assets/agent-overview-DTBRMEQ0.js +0 -1
- package/dist/client/assets/agent-settings-BiadK6yu.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CYv63Bju.js +0 -2
- package/dist/client/assets/agent-site-editor-content-hqsSwJg4.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-YV7jDYx1.js +0 -1
- package/dist/client/assets/agent-view-X2daaOWI.js +0 -1
- package/dist/client/assets/api-keys-D-r93aBn.js +0 -1
- package/dist/client/assets/blocks-tab-states-BLBUtwwS.js +0 -1
- package/dist/client/assets/cms-store-drafts-DOqjCS5l.js +0 -1
- package/dist/client/assets/library-bWgDO9u6.js +0 -1
- package/dist/client/assets/project-reports-yDx2KIN5.js +0 -1
- package/dist/client/assets/project-tasks-CZ24XPn7.js +0 -1
- package/dist/client/assets/reports-BeqJdfY-.js +0 -1
- package/dist/client/assets/repositories-BoB8X409.js +0 -1
- package/dist/client/assets/route-59M5FlvK.js +0 -1
- package/dist/client/assets/settings-tab-DUqPlhAE.js +0 -1
- package/dist/client/assets/site-draft-actions-CH7jTGTc.js +0 -3
- package/dist/client/assets/site-editor-CX53l3C_.js +0 -1
- package/dist/client/assets/tasks-DMBPC4PI.js +0 -1
- package/dist/client/assets/use-ask-in-chat-C56CHpt0.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DSiCCdEB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BvhkDMwv.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CHeSvNyF.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as B,b as ge,r as q,j as a,B as xe,m as K,K as os,ak as Ra,t as et,fb as Ta,ar as hr,ej as fr,Y as rs,c8 as Da,aG as Ts,aH as Ds,aI as Bs,aJ as Is,bj as $s,aK as Fs,aL as Ls,aM as Os,X as qs,Z as Hs,_ as Ks,a as Vs,a4 as gs,cy as Ba,h as as,fc as mr,fd as fn,bK as Ia,b7 as $a,bh as Un,fe as Fa,c2 as La,al as Oa,I as Ma,a7 as _a,ff as Ea,V as pr,i as dt,eW as mn,q as br,J as gr,D as xr,x as vr,v as yr,Q as jr,R as wr,fg as za,bk as Pr,a5 as pn,b2 as bn,e as qn,E as Ua,T as qa}from"./index-Dd5hidCj.js";import{S as Ha}from"./separator-C1bonuaY.js";import{f as Ka,u as cs,r as Sr,l as kr,c as Nr,b as Va}from"./chat-context-DgCR75CY.js";import{u as It,at as Ga,au as Cr,av as Ar,c as gn,b as xn,M as vn,aw as Wa,L as Qa,ax as Ja,ah as Ya,ay as Xa,l as yn,S as Rr,az as Za,a1 as Tr,G as el,aA as tl,aB as sl,D as Dr}from"./site-editor-toast-DL4aC3pF.js";import{j as nl,L as rl,g as al}from"./shell-layout-Dcfsytx-.js";import{I as Br}from"./toolbar-icon-button-99r2aG4V.js";import{b as ll,P as il,a as ol}from"./popover-4z9eDM-9.js";import{c as tt,T as st,a as nt,b as Gs}from"./tooltip-Dyh2h0NV.js";import{f as cl,a as dl,c as ul,C as Hn,e as Kn,b as Vn}from"./command-Bh995x5J.js";import{T as Dt,a as Ir,c as $r}from"./tabs-CFdE2LmD.js";import{t as Fr}from"./ChevronUp-Dh24Sq_k.js";import{Y as Lr,aH as Ws,F as hl,a as Or,aI as fl,b as ml,aJ as Mr,M as pl}from"./agent-icon-CMiKlX_f.js";import{a as _r}from"./SwitchHorizontal01-BTdsV_bI.js";import{c as Er,s as Ms}from"./Tool01-BWMOxR8v.js";import{s as zr}from"./Plus-Bcl7avNA.js";import{s as Qs}from"./Trash01-CgWosjFE.js";import{u as ds}from"./use-voice-input-miWnQR-2.js";import{l as bl,d as Ur}from"./thread-intent-DMhB2sy4.js";import{h as qr,r as Hr,u as xs,g as gl,e as Me,f as Kr}from"./repository-binding-DV3kkbZ_.js";import{u as xl}from"./use-debounced-value-CezJqVSj.js";import{u as vl}from"./useInfiniteQuery-DqQNqcJl.js";import{d as yl,b as jl,p as wl,e as Vr,g as Gr,h as Wr}from"./use-navigate-to-agent-B-iTaYhm.js";import{u as Js,g as jn,n as ps,b as Qr,a as Pl,d as Sl,e as kl,r as ms,f as Nl,s as Cl,h as Ps,j as Al,c as wn}from"./cms-store-drafts-CZfXb7jx.js";import{a as _s}from"./virtual-mcp-NII7Lu6q.js";import{u as Pn}from"./use-blocks-v8-project-DHH8umJ9.js";import{G as Jr}from"./github-icon--dnMj3-y.js";import{u as Rl,a as Tl}from"./use-fast-preview-draft-url-DrTS3dt5.js";import{a6 as ss,a7 as Yr,D as Es,o as Sn,a8 as Dl,a9 as Bl,G as Il,aa as $l,ab as Fl,p as Ll,y as St,f as kn,ac as Ol}from"./blocks-tab-states-DASlUdvo.js";import"./index-CRog5tFp.js";import{T as Ml}from"./textarea-hEv7rKyL.js";import{i as Nn}from"./CheckCircle-LO8Q7KlB.js";import{n as _l,s as El,C as zl,a as Ul,b as ql,M as Hl,c as Kl,d as Vl,m as Gl,u as Wl}from"./use-cms-publish-actions-CntIxbra.js";import{a as Ql,g as Jl}from"./UserSquare-BjqAifU8.js";import{i as Cn,b as An,m as Yl,h as Xl,c as Xr,f as Zr,d as Zl,r as Rn,e as ei,n as ti,g as si,j as ni,k as ri,l as Tn,o as ai,p as ea,q as li,s as Dn,t as tn}from"./sandbox-git-api-DcqI6XE4.js";import{b as ii,g as oi}from"./utils-Cugj1NVM.js";import{i as ci}from"./Monitor01-BIy7Jnq0.js";import{w as Bn,R as ta}from"./device-hint-DiJItdVl.js";import{w as Gn}from"./editor-DXF9rwVo.js";import{x as di,C as ui}from"./section-array-field-B8BsNXRT.js";import{s as sa}from"./save-changes-debug-nBi-n9eV.js";import{u as hi}from"./use-mcp-client-CNXpOf52.js";import{u as fi}from"./use-sandbox-events-D9uSNLH2.js";import{b as mi,a as pi}from"./sandbox-lifecycle-context-2RE5Jlvg.js";import{b as bi}from"./agent-capabilities-DODsAfWG.js";import{b as gi}from"./thread-route-B_swkleJ.js";function xi(t){const{value:e,baseBranch:s,releases:r,baseIsDraft:n=!1,storeDrafts:o=[]}=t,d=!n&&!!e&&e===s,l=r.find(c=>c.branch===e),i=d||l?void 0:o.find(c=>c.name===e),u=!d&&!l&&!i&&!!e;return i?{isBase:d,current:l,storeDraft:i,unlisted:u}:{isBase:d,current:l,unlisted:u}}const vi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},Wn=1114111;function Qn(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const r=Number.parseInt(s.slice(2),16);return!Number.isFinite(r)||r>Wn?e:String.fromCodePoint(r)}if(s.startsWith("#")){const r=Number.parseInt(s.slice(1),10);return!Number.isFinite(r)||r>Wn?e:String.fromCodePoint(r)}return vi[s]??e}):""}function yi(t){const e=B.c(39),{url:s,onSave:r}=t,n=ge(),[o,d]=q.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let u;e[2]!==r||e[3]!==i?(u=()=>r(i?bl(i):null),e[2]=r,e[3]=i,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=a.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=N=>d(N.target.value),e[13]=m):m=e[13];let g;e[14]!==c||e[15]!==i?(g=N=>{N.key==="Enter"&&i&&c()},e[14]=c,e[15]=i,e[16]=g):g=e[16];let x;e[17]!==b||e[18]!==f||e[19]!==g||e[20]!==o?(x=a.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:m,onKeyDown:g,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=g,e[20]=o,e[21]=x):x=e[21];let P;e[22]!==r||e[23]!==n||e[24]!==s?(P=s?a.jsx(xe,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>r(null),children:n("thread.branchPicker.localTurnOff")}):a.jsx("span",{}),e[22]=r,e[23]=n,e[24]=s,e[25]=P):P=e[25];const j=!i;let y;e[26]!==n?(y=n("thread.branchPicker.save"),e[26]=n,e[27]=y):y=e[27];let S;e[28]!==c||e[29]!==j||e[30]!==y?(S=a.jsx(xe,{size:"sm",disabled:j,onClick:c,children:y}),e[28]=c,e[29]=j,e[30]=y,e[31]=S):S=e[31];let w;e[32]!==P||e[33]!==S?(w=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[P,S]}),e[32]=P,e[33]=S,e[34]=w):w=e[34];let k;return e[35]!==w||e[36]!==p||e[37]!==x?(k=a.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,x,w]}),e[35]=w,e[36]=p,e[37]=x,e[38]=k):k=e[38],k}function ji(t){const e=B.c(8),{virtualMcpId:s,branch:r,serve:n,rowRef:o,onPicked:d}=t,l=It(s,r),i=!!n.connection,u=i&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>wi(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==c?(h=a.jsx(Pi,{rowRef:o,selected:i,connected:u,onSelect:c}),e[3]=o,e[4]=i,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function wi(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??Ga})}function Pi(t){const e=B.c(19),{rowRef:s,selected:r,connected:n,onSelect:o}=t,d=ge(),l=r?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=K("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==o||e[11]!==r||e[12]!==h||e[13]!==p?(b=a.jsxs("button",{type:"button","aria-pressed":r,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=o,e[11]=r,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=a.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Si=10080*60*1e3;function ki({sandboxMap:t,userId:e,rawBranches:s,now:r}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const g of Object.values(f??{})){const x=g?.createdAt??0;x>m.lastActiveAt&&(m.lastActiveAt=x)}}const o=r-Si,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),u=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const Ni=100,Ci=50,Ai=300;function on(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Ri(t){const e=B.c(39),{orgId:s,orgSlug:r,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=xl(f,Ai);let g;e[2]!==o?(g=qr(o),e[2]=o,e[3]=g):g=e[3];const x=g,P=f.length>0;let j;e[4]!==m||e[5]!==s||e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==o?(j=os.githubBranchSearch(s,r,Hr(o),l,i,m),e[4]=m,e[5]=s,e[6]=r,e[7]=l,e[8]=i,e[9]=o,e[10]=j):j=e[10];const y=p&&x;let S;e[11]!==m||e[12]!==r||e[13]!==o?(S=D=>{const{pageParam:Z}=D;return Ra(r,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Ci:Ni,cursor:Z})},e[11]=m,e[12]=r,e[13]=o,e[14]=S):S=e[14];let w;e[15]!==m?(w=D=>m?void 0:D.nextCursor??void 0,e[15]=m,e[16]=w):w=e[16];let k;e[17]!==j||e[18]!==y||e[19]!==S||e[20]!==w?(k={queryKey:j,enabled:y,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:S,getNextPageParam:w},e[17]=j,e[18]=y,e[19]=S,e[20]=w,e[21]=k):k=e[21];const{data:N,isLoading:C,isError:v,isFetching:A,hasNextPage:T,isFetchingNextPage:I,fetchNextPage:M}=vl(k),$=P&&(m!==f||A),H=(N?.pages??[]).flatMap(Ti),O=nl(6e4),G=ki({sandboxMap:d,userId:n,rawBranches:H,now:O});let E;e[22]!==f?(E=D=>on(D.name,f),e[22]=f,e[23]=E):E=e[23];const W=G.recent.filter(E);let F;e[24]!==f?(F=D=>on(D.name,f),e[24]=f,e[25]=F):F=e[25];const V=G.yours.filter(F),te=G.others,Y=N?.pages[0],re=P&&Y&&!$?Math.max(0,Y.totalCount-Y.branches.length):0,le=!P&&T;let _;e[26]!==M?(_=()=>{M()},e[26]=M,e[27]=_):_=e[27];let X;return e[28]!==re||e[29]!==v||e[30]!==I||e[31]!==C||e[32]!==$||e[33]!==te||e[34]!==W||e[35]!==le||e[36]!==_||e[37]!==V?(X={recent:W,yours:V,others:te,isLoading:C,isError:v,isSearching:$,hiddenMatchCount:re,hasMore:le,isFetchingMore:I,fetchMore:_},e[28]=re,e[29]=v,e[30]=I,e[31]=C,e[32]=$,e[33]=te,e[34]=W,e[35]=le,e[36]=_,e[37]=V,e[38]=X):X=e[38],X}function Ti(t){return t.branches}function Di(t){const e=B.c(7),s=ge(),{releases:r,createRelease:n}=Js(t.virtualMcpId),o=xs(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.userId||e[2]!==t.userLabel||e[3]!==o||e[4]!==r||e[5]!==s?(d=()=>{if(r.length>=_s)return et.error(s("thread.branchPicker.capReached",{max:_s})),null;const l=jn(t.userLabel);return n({branch:l,name:Qr(r,s("thread.branchPicker.defaultVersionName")),color:ps(r.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:Ur(o.metadata)}:{}}).catch(i=>{et.error(s("thread.branchPicker.saveError"),{description:Cr(s,Ar(i))})}),l},e[0]=n,e[1]=t.userId,e[2]=t.userLabel,e[3]=o,e[4]=r,e[5]=s,e[6]=d):d=e[6],d}const zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function Bi(t){const e=B.c(112),{virtualMcpId:s,isV8:r,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:x,disabled:P,spawnsNewChat:j,placement:y}=t,S=r===void 0?!1:r,w=l===void 0?!1:l,k=P===void 0?!1:P,N=j===void 0?!1:j,C=y===void 0?"chat":y,v=ge(),A=C==="header",[T,I]=q.useState(!1),[M,$]=q.useState(!1),[H,O]=q.useState("branches"),[G,E]=q.useState(null),[W,F]=q.useState(""),[V,te]=q.useState(null),[Y,re]=q.useState(null),le=q.useRef(null),{releases:_,createRelease:X,renameRelease:D,deleteRelease:Z}=Js(s);let se;e[0]!==c||e[1]!==n||e[2]!==s?(se={virtualMcpId:s,userLabel:n,userId:c},e[0]=c,e[1]=n,e[2]=s,e[3]=se):se=e[3];const ie=Di(se),{projectDefault:ue}=ds(s);let he;e[4]!==ue?(he=R=>Al(R,ue)==="sandbox",e[4]=ue,e[5]=he):he=e[5];const ne=he,oe=Pl(s,S),fe=S?Sl(_,oe.data):[],z=oe.refetch,ce=kl(s),{url:Pe,setUrl:Q,clear:ee}=gn(s),ve=xn(s),J=S&&!!ve.connection,me=S?ve.connection?.endpoint??null:Pe,we=!!me;let rt;e[6]!==ee||e[7]!==S||e[8]!==ve?(rt=()=>{ee(),S&&ve.clear()},e[6]=ee,e[7]=S,e[8]=ve,e[9]=rt):rt=e[9];const ye=rt;let _e;e[10]!==T?(_e={enabled:T},e[10]=T,e[11]=_e):_e=e[11];const{data:Ee}=Ta(_e);let Ne;e[12]!==Ee?.data?.members?(Ne=R=>R?Ee?.data?.members?.find(be=>be.userId===R)?.user?.name??void 0:void 0,e[12]=Ee?.data?.members,e[13]=Ne):Ne=e[13];const De=Ne,Le=_.length>=_s,Ce=_.length>1,ut=v("thread.branchPicker.capReached",{max:_s}),{isBase:Oe,current:Qe,storeDraft:ze,unlisted:Ue}=xi({value:o,baseBranch:d,releases:_,baseIsDraft:w,storeDrafts:fe}),L=Oe?v("thread.branchPicker.live"):Qe?.name??ze?.name??v("thread.branchPicker.defaultVersionName"),pe=J?v("thread.branchPicker.localhost.label"):we?v("thread.branchPicker.localLabel"):o?L:v("thread.branchPicker.selectVersion"),Ae=J?"bg-foreground":we?"bg-special":Oe?"bg-success":ze?ms(void 0):ms(Qe?.color??"orange"),Be=!J&&!we&&!Oe&&!!Qe&&ne(Qe),Te=R=>{ye();const be=fe.some(Ve=>Ve.name===R)?{runtime:"cms"}:_.find(Ve=>Ve.branch===R);m(R,be&&{runtime:be.runtime}),I(!1)};let qe;e[14]!==v?(qe=R=>{et.error(v("thread.branchPicker.saveError"),{description:Cr(v,Ar(R))})},e[14]=v,e[15]=qe):qe=e[15];const Ie=qe;let at;e[16]!==Q?(at=R=>{Q(R),$(!1),I(!1)},e[16]=Q,e[17]=at):at=e[17];const us=at,hs=(R,be)=>{if(ye(),x){x(R),$(!1),I(!1);return}if(!_.some(Ve=>Ve.branch===R)){if(Le){et.error(ut);return}X({branch:R,name:be.trim()||R,color:ps(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Ie)}m(R),$(!1),I(!1)};let ht;e[18]!==ye||e[19]!==m||e[20]!==g||e[21]!==ie?(ht=()=>{const R=ie();R&&(ye(),(g??m)(R),I(!1))},e[18]=ye,e[19]=m,e[20]=g,e[21]=ie,e[22]=ht):ht=e[22];const Ft=ht;let Se;e[23]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{E(null),F(""),$(!1),O("branches")},e[23]=Se):Se=e[23];const Lt=Se;let lt;e[24]===Symbol.for("react.memo_cache_sentinel")?(lt=R=>{O(R),$(!0)},e[24]=lt):lt=e[24];const Nt=lt;let Ot;e[25]===Symbol.for("react.memo_cache_sentinel")?(Ot=R=>{E(R.branch),F(R.name)},e[25]=Ot):Ot=e[25];const fs=Ot;let Je;e[26]!==W||e[27]!==D||e[28]!==Ie?(Je=R=>{const be=W.trim();be&&D(R,be).catch(Ie),E(null),F("")},e[26]=W,e[27]=D,e[28]=Ie,e[29]=Je):Je=e[29];const Ct=Je,Mt=R=>{const be=R===void 0?o:R,Ve=W.trim();if(Ve&&be){if(Le){et.error(ut),E(null),F("");return}X({branch:be,name:Ve,color:ps(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Ie)}E(null),F("")};let it;e[30]===Symbol.for("react.memo_cache_sentinel")?(it=()=>{E(null),F("")},e[30]=it):it=e[30];const At=it,ft=()=>{const R=V;if(te(null),!(!R||!Ce)){if(R.branch===o){const be=_.filter(en=>en.branch!==R.branch),Ve=be.find(en=>!ne(en))??be[0];Ve?Te(Ve.branch):I(!1)}else I(!1);Z(R.branch).catch(Ie)}},mt=Nl(_,ue),_t=(mt.content.length>0||fe.length>0)&&mt.code.length>0,Rt=R=>G===R.branch?a.jsx(sn,{value:W,onChange:F,onSave:()=>Ct(R.branch),onCancel:At},R.branch):a.jsx(nn,{rowRef:!we&&R.branch===o?le:void 0,dot:ms(R.color),codeIcon:ne(R)?Ps(R.color):void 0,label:R.name,creator:De(R.createdBy),originTooltip:S?v("thread.branchPicker.viaStudioUi"):void 0,branch:!S||ne(R)?R.branch:void 0,selected:!we&&R.branch===o,onSelect:()=>Te(R.branch),onRename:()=>fs(R),onDelete:()=>te(R),deleteBlocked:!Ce},R.branch),Tt=()=>{const R=Y;if(re(null),!(!R||R.name===o&&_.length===0)){if(R.name===o){const be=_[0];be?Te(be.branch):I(!1)}ce.mutateAsync(R.name).catch(be=>{et.error(v("thread.branchPicker.discardStoreDraftError"),{description:be instanceof Error?be.message:void 0})})}},pt=fe.map((R,be)=>G===R.name?a.jsx(sn,{value:W,onChange:F,onSave:()=>Mt(R.name),onCancel:At},`store:${R.name}`):a.jsx(nn,{rowRef:!we&&R.name===o?le:void 0,dot:ms(void 0),label:R.name,creator:De(R.createdBy),agentIcon:Ps(ps(be)),originTooltip:v("thread.branchPicker.storeDraftVia",{via:Cl(R.via)}),selected:!we&&R.name===o,onSelect:()=>Te(R.name),onRename:()=>{E(R.name),F(R.name)},onDelete:()=>re(R),deleteBlocked:R.name===o&&_.length===0},`store:${R.name}`));let bt;e[31]!==k||e[32]!==S||e[33]!==z?(bt=k?void 0:R=>{R?S&&z():Lt(),I(R)},e[31]=k,e[32]=S,e[33]=z,e[34]=bt):bt=e[34];const gt=A?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let xt;e[35]!==gt?(xt=K("shrink min-w-0 max-w-[220px] gap-2",gt,Br),e[35]=gt,e[36]=xt):xt=e[36];let vt;e[37]!==k?(vt=!k&&a.jsx(Fr,{size:12,className:"opacity-60 shrink-0"}),e[37]=k,e[38]=vt):vt=e[38];let yt;e[39]!==pe?(yt=a.jsx(nt,{children:pe}),e[39]=pe,e[40]=yt):yt=e[40];const Ye=ll,jt="w-[min(300px,calc(100vw-2rem))] p-1.5",wt="start";let $e;e[41]===Symbol.for("react.memo_cache_sentinel")?($e=R=>{R.preventDefault(),le.current?.scrollIntoView({block:"nearest"})},e[41]=$e):$e=e[41];let Fe;e[42]!==N||e[43]!==v?(Fe=N&&a.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:v("thread.branchPicker.newChatHint")}),e[42]=N,e[43]=v,e[44]=Fe):Fe=e[44];const Xe=M?a.jsx($i,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:T,tab:H,onTabChange:O,isV8:S,localUrl:Pe,onSaveLocal:us,onBack:()=>$(!1),onAdopt:hs}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:K("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",S&&"gap-1"),children:[!S&&we&&me&&a.jsx(Ii,{rowRef:le,url:me,onSelect:()=>Nt("local"),onEdit:()=>Nt("local"),onTurnOff:()=>ye()}),Ue&&o&&(G===o?a.jsx(sn,{value:W,onChange:F,onSave:()=>Mt(),onCancel:At}):a.jsx(nn,{rowRef:we?void 0:le,dot:ms("orange"),label:v("thread.branchPicker.defaultVersionName"),branch:S?void 0:o,originTooltip:S?v("thread.branchPicker.viaStudioUi"):void 0,selected:!we,onSelect:()=>Te(o),onRename:()=>{E(o),F(Qr(_,v("thread.branchPicker.defaultVersionName")))}})),_t?a.jsxs(a.Fragment,{children:[a.jsx(Jn,{children:v("thread.branchPicker.groupContent")}),mt.content.map(Rt),pt,a.jsx(Jn,{divided:!0,children:v("thread.branchPicker.groupCode")}),mt.code.map(Rt)]}):a.jsxs(a.Fragment,{children:[_.map(Rt),pt]}),S&&a.jsx(ji,{virtualMcpId:s,branch:o,serve:ve,rowRef:J?le:void 0,onPicked:()=>I(!1)})]}),(Ue||_.length>0||fe.length>0||S)&&a.jsx("div",{className:"my-1 border-t"}),a.jsxs("button",{type:"button",onClick:()=>{Ft()},disabled:Le,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[a.jsx(zr,{className:"h-4 w-4 shrink-0"}),v("thread.branchPicker.newVersion")]}),Le&&a.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ut}),a.jsxs("button",{type:"button",onClick:()=>Nt("branches"),className:K("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",S&&"mt-1"),children:[v("thread.branchPicker.advanced"),a.jsx(hr,{className:"h-4 w-4 shrink-0"})]})]});let He;e[45]!==Ye||e[46]!==$e||e[47]!==Fe||e[48]!==Xe?(He=a.jsxs(Ye,{className:jt,align:wt,onOpenAutoFocus:$e,children:[Fe,Xe]}),e[45]=Ye,e[46]=$e,e[47]=Fe,e[48]=Xe,e[49]=He):He=e[49];const Pt=a.jsxs(il,{open:T,onOpenChange:bt,children:[a.jsxs(tt,{children:[a.jsx(st,{asChild:!0,children:a.jsx("span",{className:"inline-flex min-w-0 shrink",children:a.jsx(ol,{asChild:!0,children:a.jsxs(xe,{"data-tour":rl.branchPicker,variant:A?"outline":"ghost",size:A?"sm":"default","aria-label":pe,disabled:k,className:xt,children:[Be?a.jsx(Lr,{className:K(zs,Ps(Qe?.color))}):ze&&!we?a.jsx(fr,{className:K(zs,Ps(ps(fe.indexOf(ze))))}):a.jsx("span",{className:K("h-2 w-2 shrink-0 rounded-full",o||we?Ae:"bg-muted-foreground")}),a.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:pe}),vt]})})})}),yt]}),He]}),Ze=V!==null;let ot;e[50]===Symbol.for("react.memo_cache_sentinel")?(ot=R=>{R||te(null)},e[50]=ot):ot=e[50];let U;e[51]!==v?(U=v("thread.branchPicker.deleteTitle"),e[51]=v,e[52]=U):U=e[52];let ae;e[53]!==U?(ae=a.jsx(Ts,{children:U}),e[53]=U,e[54]=ae):ae=e[54];let de;e[55]!==V||e[56]!==v?(de=V&&v("thread.branchPicker.deleteConfirm",{name:V.name}),e[55]=V,e[56]=v,e[57]=de):de=e[57];let je;e[58]!==de?(je=a.jsx(Ds,{children:de}),e[58]=de,e[59]=je):je=e[59];let Re;e[60]!==ae||e[61]!==je?(Re=a.jsxs(Bs,{children:[ae,je]}),e[60]=ae,e[61]=je,e[62]=Re):Re=e[62];let Ke;e[63]!==v?(Ke=v("thread.branchPicker.cancel"),e[63]=v,e[64]=Ke):Ke=e[64];let Et;e[65]!==Ke?(Et=a.jsx(Is,{children:Ke}),e[65]=Ke,e[66]=Et):Et=e[66];let zt;e[67]!==v?(zt=v("thread.branchPicker.delete"),e[67]=v,e[68]=zt):zt=e[68];let Ut;e[69]!==ft||e[70]!==zt?(Ut=a.jsx($s,{onClick:ft,variant:"destructive",children:zt}),e[69]=ft,e[70]=zt,e[71]=Ut):Ut=e[71];let qt;e[72]!==Et||e[73]!==Ut?(qt=a.jsxs(Fs,{children:[Et,Ut]}),e[72]=Et,e[73]=Ut,e[74]=qt):qt=e[74];let Ht;e[75]!==Re||e[76]!==qt?(Ht=a.jsxs(Ls,{children:[Re,qt]}),e[75]=Re,e[76]=qt,e[77]=Ht):Ht=e[77];let ys;e[78]!==Ze||e[79]!==Ht?(ys=a.jsx(Os,{open:Ze,onOpenChange:ot,children:Ht}),e[78]=Ze,e[79]=Ht,e[80]=ys):ys=e[80];const Zs=Y!==null;let js;e[81]===Symbol.for("react.memo_cache_sentinel")?(js=R=>{R||re(null)},e[81]=js):js=e[81];let Kt;e[82]!==v?(Kt=v("thread.branchPicker.deleteTitle"),e[82]=v,e[83]=Kt):Kt=e[83];let Vt;e[84]!==Kt?(Vt=a.jsx(Ts,{children:Kt}),e[84]=Kt,e[85]=Vt):Vt=e[85];let Gt;e[86]!==Y||e[87]!==v?(Gt=Y&&v("thread.branchPicker.discardStoreDraftConfirm",{name:Y.name}),e[86]=Y,e[87]=v,e[88]=Gt):Gt=e[88];let Wt;e[89]!==Gt?(Wt=a.jsx(Ds,{children:Gt}),e[89]=Gt,e[90]=Wt):Wt=e[90];let Qt;e[91]!==Vt||e[92]!==Wt?(Qt=a.jsxs(Bs,{children:[Vt,Wt]}),e[91]=Vt,e[92]=Wt,e[93]=Qt):Qt=e[93];let Jt;e[94]!==v?(Jt=v("thread.branchPicker.cancel"),e[94]=v,e[95]=Jt):Jt=e[95];let Yt;e[96]!==Jt?(Yt=a.jsx(Is,{children:Jt}),e[96]=Jt,e[97]=Yt):Yt=e[97];let Xt;e[98]!==v?(Xt=v("thread.branchPicker.delete"),e[98]=v,e[99]=Xt):Xt=e[99];let Zt;e[100]!==Tt||e[101]!==Xt?(Zt=a.jsx($s,{onClick:Tt,variant:"destructive",children:Xt}),e[100]=Tt,e[101]=Xt,e[102]=Zt):Zt=e[102];let es;e[103]!==Yt||e[104]!==Zt?(es=a.jsxs(Fs,{children:[Yt,Zt]}),e[103]=Yt,e[104]=Zt,e[105]=es):es=e[105];let ts;e[106]!==Qt||e[107]!==es?(ts=a.jsxs(Ls,{children:[Qt,es]}),e[106]=Qt,e[107]=es,e[108]=ts):ts=e[108];let ws;return e[109]!==Zs||e[110]!==ts?(ws=a.jsx(Os,{open:Zs,onOpenChange:js,children:ts}),e[109]=Zs,e[110]=ts,e[111]=ws):ws=e[111],a.jsxs(a.Fragment,{children:[Pt,ys,ws]})}function sn(t){const e=B.c(20),{value:s,onChange:r,onSave:n,onCancel:o}=t,d=ge();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==r?(i=f=>r(f.target.value),e[2]=r,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=a.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=a.jsx(xe,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=a.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function Jn(t){const e=B.c(5),{divided:s,children:r}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=K("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==r||e[3]!==d?(l=a.jsx("p",{className:d,children:r}),e[2]=r,e[3]=d,e[4]=l):l=e[4],l}function nn(t){const e=B.c(53),{rowRef:s,dot:r,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=ge();let x;e[0]!==o||e[1]!==n||e[2]!==r?(x=n?a.jsx(Lr,{className:K(zs,n)}):o?a.jsx(fr,{className:K(zs,o)}):a.jsx("span",{className:K("h-2 w-2 shrink-0 rounded-full",r)}),e[0]=o,e[1]=n,e[2]=r,e[3]=x):x=e[3];let P;e[4]!==i?(P=i&&a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=P):P=e[5];let j;e[6]!==l||e[7]!==P?(j=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,P]}),e[6]=l,e[7]=P,e[8]=j):j=e[8];let y;e[9]!==h||e[10]!==c||e[11]!==x||e[12]!==j?(y=a.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[x,j]}),e[9]=h,e[10]=c,e[11]=x,e[12]=j,e[13]=y):y=e[13];const S=y,w=c?"bg-accent":"hover:bg-accent";let k;e[14]!==w?(k=K("group flex items-center rounded-lg",w),e[14]=w,e[15]=k):k=e[15];let N;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==S||e[20]!==g?(N=u||d?a.jsxs(tt,{children:[a.jsx(st,{asChild:!0,children:S}),a.jsxs(nt,{side:"bottom",className:"text-xs",children:[n&&a.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&a.jsx("p",{children:d}),u&&a.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):S,e[16]=u,e[17]=n,e[18]=d,e[19]=S,e[20]=g,e[21]=N):N=e[21];let C;e[22]!==g?(C=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=C):C=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(_r,{className:"h-4 w-4"}),e[24]=v):v=e[24];let A;e[25]!==C?(A=a.jsx(qs,{asChild:!0,children:a.jsx(xe,{variant:"ghost",size:"icon","aria-label":C,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:v})}),e[25]=C,e[26]=A):A=e[26];let T;e[27]===Symbol.for("react.memo_cache_sentinel")?(T=a.jsx(Er,{className:"h-4 w-4"}),e[27]=T):T=e[27];let I;e[28]!==g?(I=g("thread.branchPicker.rename"),e[28]=g,e[29]=I):I=e[29];let M;e[30]!==p||e[31]!==I?(M=a.jsxs(rs,{onSelect:p,children:[T,I]}),e[30]=p,e[31]=I,e[32]=M):M=e[32];let $;e[33]!==m||e[34]!==b||e[35]!==g?($=b&&a.jsxs(rs,{onSelect:b,disabled:m,className:"text-destructive focus:text-destructive",children:[a.jsx(Qs,{className:"h-4 w-4"}),g("thread.branchPicker.delete")]}),e[33]=m,e[34]=b,e[35]=g,e[36]=$):$=e[36];let H;e[37]!==m||e[38]!==b||e[39]!==g?(H=b&&m&&a.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:g("thread.branchPicker.keepOneDraft")}),e[37]=m,e[38]=b,e[39]=g,e[40]=H):H=e[40];let O;e[41]!==M||e[42]!==$||e[43]!==H?(O=a.jsxs(Hs,{align:"end",children:[M,$,H]}),e[41]=M,e[42]=$,e[43]=H,e[44]=O):O=e[44];let G;e[45]!==A||e[46]!==O?(G=a.jsxs(Ks,{children:[A,O]}),e[45]=A,e[46]=O,e[47]=G):G=e[47];let E;return e[48]!==s||e[49]!==G||e[50]!==k||e[51]!==N?(E=a.jsxs("div",{ref:s,className:k,children:[N,G]}),e[48]=s,e[49]=G,e[50]=k,e[51]=N,e[52]=E):E=e[52],E}function Ii(t){const e=B.c(40),{rowRef:s,url:r,onSelect:n,onEdit:o,onTurnOff:d}=t,l=ge();let i;try{let A;e[0]!==r?(A=new URL(r),e[0]=r,e[1]=A):A=e[1],i=A.host}catch{i=r}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=a.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(_r,{className:"h-4 w-4"}),e[15]=g):g=e[15];let x;e[16]!==m?(x=a.jsx(qs,{asChild:!0,children:a.jsx(xe,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=x):x=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=a.jsx(Er,{className:"h-4 w-4"}),e[18]=P):P=e[18];let j;e[19]!==l?(j=l("thread.branchPicker.rename"),e[19]=l,e[20]=j):j=e[20];let y;e[21]!==o||e[22]!==j?(y=a.jsxs(rs,{onSelect:o,children:[P,j]}),e[21]=o,e[22]=j,e[23]=y):y=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx(Qs,{className:"h-4 w-4"}),e[24]=S):S=e[24];let w;e[25]!==l?(w=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=w):w=e[26];let k;e[27]!==d||e[28]!==w?(k=a.jsxs(rs,{onSelect:d,className:"text-destructive focus:text-destructive",children:[S,w]}),e[27]=d,e[28]=w,e[29]=k):k=e[29];let N;e[30]!==y||e[31]!==k?(N=a.jsxs(Hs,{align:"end",children:[y,k]}),e[30]=y,e[31]=k,e[32]=N):N=e[32];let C;e[33]!==N||e[34]!==x?(C=a.jsxs(Ks,{children:[x,N]}),e[33]=N,e[34]=x,e[35]=C):C=e[35];let v;return e[36]!==s||e[37]!==C||e[38]!==f?(v=a.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,C]}),e[36]=s,e[37]=C,e[38]=f,e[39]=v):v=e[39],v}function $i(t){const e=B.c(73),{orgId:s,orgSlug:r,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g}=t,x=ge(),[P,j]=q.useState(""),y=c==="branches"?P:"",S=u&&c==="branches";let w;e[0]!==s||e[1]!==r||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==y||e[6]!==S||e[7]!==o||e[8]!==n?(w={orgId:s,orgSlug:r,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:y,enabled:S},e[0]=s,e[1]=r,e[2]=d,e[3]=l,e[4]=i,e[5]=y,e[6]=S,e[7]=o,e[8]=n,e[9]=w):w=e[9];const{recent:k,yours:N,others:C,isLoading:v,hasMore:A,isFetchingMore:T,fetchMore:I}=Ri(w),M=u&&c==="prs";let $;e[10]!==s||e[11]!==r||e[12]!==d||e[13]!==l||e[14]!==M||e[15]!==o?($={orgId:s,orgSlug:r,target:o,owner:d,repo:l,enabled:M},e[10]=s,e[11]=r,e[12]=d,e[13]=l,e[14]=M,e[15]=o,e[16]=$):$=e[16];const{data:H,isLoading:O}=yl($);let G;if(e[17]!==I||e[18]!==A||e[19]!==T||e[20]!==v||e[21]!==p||e[22]!==b||e[23]!==g||e[24]!==m||e[25]!==f||e[26]!==h||e[27]!==C||e[28]!==d||e[29]!==O||e[30]!==k||e[31]!==l||e[32]!==P||e[33]!==x||e[34]!==H||e[35]!==c||e[36]!==N){const E=H===void 0?[]:H,W=`${d}/${l}`;let F;e[38]!==W?(F=W.toLowerCase(),e[38]=W,e[39]=F):F=e[39];const V=F;let te;e[40]!==V?(te=z=>z.headRepoFullName?.toLowerCase()===V,e[40]=V,e[41]=te):te=e[41];const Y=E.filter(te);let re;if(e[42]!==C||e[43]!==k||e[44]!==N){const z=new Set;re=[...k,...N,...C].filter(ce=>z.has(ce.name)?!1:(z.add(ce.name),!0)),e[42]=C,e[43]=k,e[44]=N,e[45]=re}else re=e[45];const le=re;let _;e[46]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsx(hl,{className:"h-4 w-4 shrink-0"}),e[46]=_):_=e[46];let X;e[47]!==x?(X=x("thread.branchPicker.advancedBack"),e[47]=x,e[48]=X):X=e[48];let D;e[49]!==m||e[50]!==X?(D=a.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[_,X]}),e[49]=m,e[50]=X,e[51]=D):D=e[51];let Z;e[52]!==h?(Z=z=>{h(z),j("")},e[52]=h,e[53]=Z):Z=e[53];let se;e[54]!==x?(se=x("thread.branchPicker.branchesTab"),e[54]=x,e[55]=se):se=e[55];let ie;e[56]!==se?(ie=a.jsx(Dt,{value:"branches",className:"h-6 px-2.5 text-xs",children:se}),e[56]=se,e[57]=ie):ie=e[57];let ue;e[58]!==x?(ue=x("thread.branchPicker.prsTab"),e[58]=x,e[59]=ue):ue=e[59];let he;e[60]!==ue?(he=a.jsx(Dt,{value:"prs",className:"h-6 px-2.5 text-xs",children:ue}),e[60]=ue,e[61]=he):he=e[61];let ne;e[62]!==p||e[63]!==x?(ne=!p&&a.jsx(Dt,{value:"local",className:"h-6 px-2.5 text-xs",children:x("thread.branchPicker.localTab")}),e[62]=p,e[63]=x,e[64]=ne):ne=e[64];let oe;e[65]!==ie||e[66]!==he||e[67]!==ne?(oe=a.jsxs(Ir,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[ie,he,ne]}),e[65]=ie,e[66]=he,e[67]=ne,e[68]=oe):oe=e[68];let fe;e[69]!==Z||e[70]!==oe||e[71]!==c?(fe=a.jsx($r,{className:"px-2 pt-2 pb-1",value:c,onValueChange:Z,children:oe}),e[69]=Z,e[70]=oe,e[71]=c,e[72]=fe):fe=e[72],G=a.jsxs("div",{className:"flex flex-col",children:[D,fe,c==="local"&&!p?a.jsx(yi,{url:b,onSave:f}):a.jsxs(cl,{filter:c==="branches"?Fi:void 0,children:[a.jsx(dl,{placeholder:x(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:P,onValueChange:j}),a.jsx(ul,{onScroll:z=>{const ce=z.currentTarget;c==="branches"&&ce.scrollHeight-ce.scrollTop-ce.clientHeight<48&&I()},children:c==="branches"?a.jsxs(a.Fragment,{children:[v&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:x("thread.branchPicker.loadingMore")}),!v&&le.length===0&&a.jsx(Hn,{children:x("thread.branchPicker.noBranchesFound")}),le.length>0&&a.jsx(Kn,{children:le.map(z=>a.jsxs(Vn,{value:z.name,className:"cursor-pointer",onSelect:()=>g(z.name,z.name),children:[a.jsx(Da,{className:"mr-2 h-4 w-4 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:z.name})]},z.name))}),A&&a.jsx("div",{className:"p-2",children:a.jsx(xe,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:T,onClick:I,children:x(T?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):a.jsxs(a.Fragment,{children:[O&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:x("thread.branchPicker.loadingPullRequests")}),!O&&Y.length===0&&a.jsx(Hn,{children:x("thread.branchPicker.noOpenPullRequests")}),Y.length>0&&a.jsx(Kn,{children:Y.map(z=>a.jsxs(Vn,{value:`#${z.number} ${z.title} ${z.head}`,className:"cursor-pointer",onSelect:()=>g(z.head,Qn(z.title)),children:[a.jsx(Ws,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsx("span",{className:"truncate",children:Qn(z.title)}),a.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",z.number," · ",z.head]})]})]},z.number))})]})})]})]}),e[17]=I,e[18]=A,e[19]=T,e[20]=v,e[21]=p,e[22]=b,e[23]=g,e[24]=m,e[25]=f,e[26]=h,e[27]=C,e[28]=d,e[29]=O,e[30]=k,e[31]=l,e[32]=P,e[33]=x,e[34]=H,e[35]=c,e[36]=N,e[37]=G}else G=e[37];return G}function Fi(t,e){return on(t,e)?1:0}function Li(t){const e=B.c(19),{locked:s,placement:r,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:g,owner:x,repo:P,sandboxMap:j}=t;let y;return e[0]!==i||e[1]!==u||e[2]!==d||e[3]!==s||e[4]!==p||e[5]!==c||e[6]!==h||e[7]!==b||e[8]!==f||e[9]!==x||e[10]!==r||e[11]!==P||e[12]!==j||e[13]!==g||e[14]!==m||e[15]!==l||e[16]!==n||e[17]!==o?(y=a.jsx(Bi,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:g,owner:x,repo:P,sandboxMap:j,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:r}),e[0]=i,e[1]=u,e[2]=d,e[3]=s,e[4]=p,e[5]=c,e[6]=h,e[7]=b,e[8]=f,e[9]=x,e[10]=r,e[11]=P,e[12]=j,e[13]=g,e[14]=m,e[15]=l,e[16]=n,e[17]=o,e[18]=y):y=e[18],y}function Oi(t){const e=B.c(2),{branchPill:s}=t;if(!s)return null;let r;return e[0]!==s?(r=a.jsx(a.Fragment,{children:s}),e[0]=s,e[1]=r):r=e[1],r}function Mi(t){const{locked:e,sessionRuntime:s,projectRuntime:r,draftRuntime:n,current:o}=t;return t.contentOnly&&n==="cms"?s==="cms"&&!e?{kind:"switch"}:{kind:"new-chat",runtime:"cms"}:n==="sandbox"&&s!=="sandbox"?{kind:"new-chat",runtime:"sandbox"}:n==="cms"&&s==="sandbox"&&r==="cms"&&!o?{kind:"new-chat"}:e?s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}:{kind:"switch"}}function _i(t){const e=B.c(25),{virtualMcp:s,currentBranch:r}=t,n=Ka(),o=cs();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,u=o?.createTask,c=ds(s?.id),h=c.runtime,p=s?.metadata;let b;e[3]!==p?(b=Ur(p),e[3]=p,e[4]=b):b=e[4];const f=b,m=f==="cms"&&h==="sandbox",g=gl(s),x=Me(g),{data:P}=Vs.useSession(),j=P?.user;let y;e[5]!==j?(y=wn(j),e[5]=j,e[6]=y):y=e[6];const S=y,w=P?.user?.id??"",{org:k}=gs(),N=jl(s,r),C=Pn(s?.id),v=C&&h==="cms";let A;e[7]!==u||e[8]!==r||e[9]!==l||e[10]!==f||e[11]!==h||e[12]!==c.resolved||e[13]!==i||e[14]!==C?(A=(E,W)=>{const F=Mi({locked:l,sessionRuntime:c.resolved?h:null,projectRuntime:f,draftRuntime:W&&(W.runtime??f),current:E===r,contentOnly:C});F.kind==="new-chat"&&u?u({branch:E,...F.runtime?{runtime:F.runtime}:{}}):i&&i(E)},e[7]=u,e[8]=r,e[9]=l,e[10]=f,e[11]=h,e[12]=c.resolved,e[13]=i,e[14]=C,e[15]=A):A=e[15];const T=A;let I;e[16]!==m||e[17]!==u||e[18]!==l||e[19]!==i?(I=E=>{(l||m)&&u?u({branch:E}):i&&i(E)},e[16]=m,e[17]=u,e[18]=l,e[19]=i,e[20]=I):I=e[20];const M=I;let $;e[21]!==u?($=u?E=>u({runtime:"sandbox",branch:E}):void 0,e[21]=u,e[22]=$):$=e[22];const H=$,O=g&&qr(x)?a.jsx(Li,{userLabel:S,virtualMcpId:s?.id??"",isV8:C,value:r,baseBranch:N,baseIsDraft:v,orgId:k.id,orgSlug:k.slug,userId:w,target:x,owner:g.owner,repo:g.name,sandboxMap:s?.metadata?.sandboxMap,onChange:T,onCreateBranch:M,onAdoptBranch:H,locked:l,placement:"chat"},`${Hr(x)}:${g.owner}/${g.name}`):null;let G;return e[23]!==O?(G=a.jsx(Oi,{branchPill:O}),e[23]=O,e[24]=G):G=e[24],G}const Ei=Ba("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function zi(t){const e=B.c(11);let s,r,n;e[0]!==t?({className:s,orientation:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==s||e[5]!==r?(o=K(Ei({orientation:r}),s),e[4]=s,e[5]=r,e[6]=o):o=e[6];let d;return e[7]!==r||e[8]!==n||e[9]!==o?(d=a.jsx("div",{role:"group","data-slot":"button-group","data-orientation":r,className:o,...n}),e[7]=r,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function Ui(t){const e=B.c(14),{item:s}=t;let r;e[0]!==s?(r=()=>{s.onSelect()},e[0]=s,e[1]=r):r=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==r?(n=a.jsxs(rs,{disabled:s.disabled,onSelect:r,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=r,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=a.jsx(st,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=a.jsx(nt,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=a.jsxs(tt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function na(t){const e=B.c(20),{label:s,onClick:r,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=o===void 0?"default":o,g=d===void 0?!1:d,x=l===void 0?!1:l,P=i===void 0?!1:i,j=(h?.length??0)>0;let y;if(e[0]!==b||e[1]!==g||e[2]!==j||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==x||e[7]!==p||e[8]!==r||e[9]!==P||e[10]!==m||e[11]!==u||e[12]!==f){const S=K(Br,f==="default"&&"focus-visible:inset-ring-current");let w;e[14]!==c||e[15]!==x?(w=x?a.jsx(as,{size:"xs"}):c,e[14]=c,e[15]=x,e[16]=w):w=e[16];const k=a.jsxs(xe,{type:"button",variant:f,size:m,disabled:g,"aria-busy":x||void 0,onClick:x?void 0:r,className:K(S,j&&"rounded-r-none border-r border-current/20"),children:[w,s]}),N=P&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let C;e[17]!==b||e[18]!==N?(C=K(N,b),e[17]=b,e[18]=N,e[19]=C):C=e[19],y=a.jsxs(zi,{className:C,children:[u?a.jsxs(tt,{children:[a.jsx(st,{asChild:!0,children:a.jsx("span",{className:K("inline-flex rounded-lg outline-none",S,g&&"cursor-not-allowed"),tabIndex:g?0:void 0,role:g?"button":void 0,"aria-disabled":g||void 0,children:k})}),a.jsx(nt,{children:u})]}):k,j?a.jsxs(Ks,{children:[a.jsx(qs,{asChild:!0,children:a.jsx(xe,{type:"button",variant:f,size:m,"aria-label":p,className:K("has-[>svg]:px-2",S),children:a.jsx(Fr,{className:"size-3.5"})})}),a.jsx(Hs,{align:"end",children:h?.map(qi)})]}):null]}),e[0]=b,e[1]=g,e[2]=j,e[3]=c,e[4]=h,e[5]=s,e[6]=x,e[7]=p,e[8]=r,e[9]=P,e[10]=m,e[11]=u,e[12]=f,e[13]=y}else y=e[13];return y}function qi(t){return a.jsx(Ui,{item:t},t.key)}async function Hi(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function Ki(t,e,{hosted:s}){return s&&t!==null?t:e}function Vi(t,e){const s=B.c(11),[r,n]=q.useState(null);let o;s[0]!==r||s[1]!==t||s[2]!==e?(o=Ki(r,t,e),s[0]=r,s[1]=t,s[2]=e,s[3]=o):o=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let i;return s[8]!==o||s[9]!==d?(i={shown:o,hold:d,release:l},s[8]=o,s[9]=d,s[10]=i):i=s[10],i}function Gi({open:t,hosted:e}){return t||e}function ra(t){return _l({userName:t?.name,userEmail:t?.email})??void 0}function Ys(t){const e=B.c(18),{state:s,header:r,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let u;e[0]!==r?(u=a.jsx("div",{className:"space-y-0.5 px-4 py-3",children:r}),e[0]=r,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==o?(h=o?a.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=a.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==u||e[15]!==p||e[16]!==f?(m=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function bs(t){const e=B.c(2),{children:s}=t;let r;return e[0]!==s?(r=a.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=r):r=e[1],r}function aa(t){const e=B.c(10);let s,r,n;e[0]!==t?({className:r,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==r?(o=K("rounded-lg border bg-card px-3 py-2.5",r),e[4]=r,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=a.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function We(t){const e=B.c(4),{className:s}=t;let r;e[0]!==s?(r=K("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=r):r=e[1];let n;return e[2]!==r?(n=a.jsx("div",{className:r}),e[2]=r,e[3]=n):n=e[3],n}function Bt(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(aa,{children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx(We,{className:"size-4 rounded-md"}),a.jsx(We,{className:"h-3 w-24"}),a.jsx(We,{className:"h-2.5 w-16"}),a.jsx(We,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const Wi="secret";function la(t){return t.kind!=="block"?null:t.namedRule??null}function Qi(t,e){const s=e.find(r=>r&&typeof r=="object");return s?Il(s.__resolveType):$l(t)}const Ji=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function In(t){const e=Ji.exec(t)?.[1];return e?ii(e):null}function Us(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function Yi(t,e){return t===null?"new":e===null?"removed":"edited"}function ia(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function ns(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const r=t.__resolveType;if(typeof r=="string"&&r.trim()){if(s)return Ia(r);const o=(r.split("/").pop()??r).replace(/\.[jt]sx?$/,"");return ia(o)||o}}return`Section ${e+1}`}function $n(t){if(mr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&$a(e)?t.section??null:null}const oa=6;function As(t,e=0){if(e>oa||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>As(n,e+1));const s=t;if(fn(s.__resolveType))return cn(s).flatMap(n=>As(n?.value,e+1));const r=$n(s);return r!==null?As(r,e+1):[s]}function cn(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function Yn(t){let e=t;for(let s=0;s<oa;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const r=e;if(fn(r.__resolveType))return r;const n=$n(r);if(n===null)return null;e=n}return null}function Xi(t,e,s){const r=cn(Yn(t)),n=e?cn(Yn(e)):[],o=e?Array.from({length:Math.max(r.length,n.length)},(i,u)=>u).filter(i=>!Xs(r[i],n[i])):[],l=[...o.map(i=>r[i]??n[i]),...r.filter((i,u)=>!o.includes(u))].flatMap(i=>As(i?.value)).map(i=>ns(i,s,!0));return[...new Set(l)]}function rn(t,e,s,r,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const u=o;if(fn(u.__resolveType)){d=!0;break}const c=$n(u);if(c===null)break;o=c}const l=d?Xi(t,n,e):[];return{name:ns(d?t:o,e,!0),kind:"section",status:s,fields:r,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function dn(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((r,n)=>r&&typeof r=="object"&&!Array.isArray(r)?[{section:r,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const r=s.variants;if(Array.isArray(r))return r.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&mr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const u=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function Xn(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const r=s;return Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{})}return s})}function Xs(t,e){return t===void 0&&e===void 0?!0:Xn(t)===Xn(e)}function kt(t,e,s,r=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||r.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;Xs(l,i)||o.push({label:ia(d),path:[...s,d],from:l,to:i})}return o}function Zi(t,e){const s=e.find(r=>r&&typeof r=="object");return s?s.__resolveType===zl:t===Ul}function eo(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),r=[];for(const n of kt(t,e,[])){const o=String(n.path[0]);s(n.from)&&s(n.to)?r.push(...kt(n.from??{},n.to??{},[o])):r.push(n)}return r}const to=new Set(["sections"]);function Fn(t,e,s=!1){const r=t?dn(t,s):[],n=e?dn(e,s):[],o=[],d=Math.max(r.length,n.length);for(let i=0;i<d;i++){const u=r[i],c=n[i];if(!s){const h=so(u,c,i);h&&o.push(h);continue}if(u&&c){if(Xs(u.section,c.section))continue;o.push(rn(c.section,i,"edited",kt(u.section,c.section,c.basePath),u.section))}else c?o.push(rn(c.section,i,"new",[])):u&&o.push(rn(u.section,i,"removed",[]))}const l=kt(t,e,[],to);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function so(t,e,s){return t&&e?Xs(t.section,e.section)?null:{name:ns(e.section,s),kind:"section",status:"edited",fields:kt(t.section,e.section,e.basePath)}:e?{name:ns(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:ns(t.section,s),kind:"section",status:"removed",fields:[]}:null}function un(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function no(t){const e=[],s=[],r=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(Cn(o)){n.push(o);continue}const l=Yi(d.from,d.to),i=In(o);if(!i){r.push(un(o,l));continue}const u=Us(d.from),c=Us(d.to),h=c??u;if(!h){r.push(un(o,l));continue}const p=ss(i,h);if(p){e.push({kind:"page",blockKey:i,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Fn(u,c):[],fromJson:u,toJson:c});continue}const b=Sn(i,h);s.push({kind:"block",blockKey:i,name:Es(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Es(i,h),kind:"section",status:"edited",fields:kt(u,c,[])}].filter(f=>f.fields.length>0):[],fromJson:u,toJson:c})}return ca({pages:e,blocks:s,other:r,generated:n})}function an(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function ca(t){const{pages:e,blocks:s,other:r,generated:n}=t;return e.sort(an),s.sort(an),r.sort(an),{pages:e,blocks:s,other:r,generated:n,count:e.length+s.length+r.length}}function ro(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function da(t){return t.startsWith("pages-")}function ua(t){const{files:e,lookup:s,diff:r}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Cn(u)){l.push(u);continue}const c=ro(i.status),h=In(u);if(!h){d.push(un(u,c));continue}const p=r?.diffs[u],b=Us(p?.from??null),f=Us(p?.to??null),m=ha(s,h),g=m??f??b;if((m?ss(h,m):null)??(!m&&da(h))){const j=g?ss(h,g):null;n.push({kind:"page",blockKey:h,name:j?.name??Yr(h),pagePath:j?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Fn(b,f):[],fromJson:b,toJson:f??(c==="new"?m:null)});continue}const P=Es(h,g??{});o.push({kind:"block",blockKey:h,name:P,pagePath:null,isSiteApp:Sn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:P,kind:"section",status:"edited",fields:kt(b,f,[])}].filter(j=>j.fields.length>0):[],fromJson:b,toJson:f})}return ca({pages:n,blocks:o,other:d,generated:l})}function ha(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function ao(t,e){return t??e}function fa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const ln=3;function Ss(t){if(t.length<=ln)return fa(t);const e=t.length-ln;return`${t.slice(0,ln).join(", ")} and ${e} more`}function lo(t,e){if(!e){const r=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return r.length>0?`${t.name} (${r.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(r=>r.kind==="section").flatMap(r=>r.wrapper?r.held??[]:[r.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function io(t){const e=la(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function oo(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),r=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${Ss(s.map(l=>lo(l,!!t.v8)))}`),r.length>0){const l=r.length===1?"page":"pages";e.push(`added the ${Ss(r.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${Ss(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(io);if(o.length>0&&e.push(`changed ${Ss(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=fa(e);return El(d.charAt(0).toUpperCase()+d.slice(1))}function co(t,e){return t?dn(t,e).length:0}function uo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?co(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const r of t.sections){if(r.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=r.fields.length}return s}const Zn="••••••";function ls(t){if(Array.isArray(t))return t.map(ls);if(!t||typeof t!="object")return t;const e=t,s={};for(const[r,n]of Object.entries(e))s[r]=ls(n);return e.__resolveType===Wi&&"ciphertext"in e&&(s.ciphertext=Zn),La(e)&&"encrypted"in e&&(s.encrypted=Zn),s}function er(t){return t.map(e=>({...e,from:ls(e.from),to:ls(e.to)}))}function ho(t){const{changes:e,sides:s,lookup:r,meta:n,hosted:o}=t,d=[],l=[],i=c=>[...new Set((s?.diagnostics??[]).filter(h=>Un(Fa(h.file))===Un(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=ha(r,c),x=g??m??f,P=i(c),j={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...P.length>0?{unreadable:P}:{},fromJson:ls(f),toJson:ls(m??(p==="new"?g:null))},y=g?ss(c,g,n):null,S=!g&&x?ss(c,x,n):null;if(y??S??(!x&&da(c))){const v=x?ss(c,x,n):null;d.push({...j,kind:"page",name:v?.name??Yr(c),pagePath:v?.path??null,isSiteApp:!1,sections:p==="edited"?Fn(f,m,!0).map(A=>({...A,fields:er(A.fields)})):[]});continue}const w=o?Dl(c,x,g,m,f):null,k=w?Bl(w,[x,g,m,f]):Es(c,x??{}),N=Qi(c,[g,m,f]),C=Zi(c,[g,m,f]);l.push({...j,kind:"block",name:C?"Settings":k,...C?{cmsSettings:!0}:{},...w?{blogKind:w}:{},...N?{namedRule:N}:{},pagePath:null,isSiteApp:Sn(c,g??x??{}),sections:p==="edited"?[{name:C?"Settings":k,kind:"section",status:"edited",fields:er(C?eo(f,m):kt(f,m,[]))}].filter(v=>v.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function ke(t){return t.filepaths[0]??t.blockKey??t.name}function fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function mo(t,e){const s=t.kind==="block"?Ql:Or;return a.jsx("span",{title:fo(t.status,e),className:"flex shrink-0",children:a.jsx(s,{className:K("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function po(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return Fl(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=la(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function bo(t,e,s){const r=uo(t,s);if(r.newPageSections!==null)return[r.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:r.newPageSections})];const n=[];return r.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):r.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:r.sections})),r.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):r.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:r.fields})),r.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function ma(t){const e=B.c(46),{change:s,bodyPending:r,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:u,isDiscarding:c,v8:h}=t,p=r===void 0?!1:r,b=h===void 0?!1:h,f=ge();let m;e[0]!==s||e[1]!==f?(m=po(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const g=m;let x;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==g||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const P=bo(s,f,b),j=p&&P.length===0&&s.status==="edited",y=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let S;e[16]!==y?(S=K("cursor-pointer transition-colors hover:bg-accent",y),e[16]=y,e[17]=S):S=e[17];let w;e[18]!==s?(w=ke(s),e[18]=s,e[19]=w):w=e[19];let k;e[20]!==s||e[21]!==f?(k=mo(s,f),e[20]=s,e[21]=f,e[22]=k):k=e[22];let N;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(N=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=N):N=e[26];let C;e[27]!==N?(C=a.jsx("span",{className:"truncate text-sm font-medium",children:N}),e[27]=N,e[28]=C):C=e[28];let v;e[29]!==g?(v=g?a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:g}):null,e[29]=g,e[30]=v):v=e[30];let A;e[31]!==n||e[32]!==C||e[33]!==v?(A=a.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[C,v]}),e[31]=n,e[32]=C,e[33]=v,e[34]=A):A=e[34];let T;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==i||e[40]!==f?(T=d?a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[a.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:M=>{M.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),a.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:M=>{M.stopPropagation(),l(!1),i?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):i?a.jsx(Gs,{children:a.jsxs(tt,{children:[a.jsx(st,{asChild:!0,children:a.jsx(xe,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:M=>{M.stopPropagation(),l(!0)},disabled:u||c,children:a.jsx(Qs,{className:"size-3.5"})})}),a.jsx(nt,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=i,e[40]=f,e[41]=T):T=e[41];let I;e[42]!==A||e[43]!==T||e[44]!==k?(I=a.jsxs("div",{className:"flex items-center gap-2.5",children:[k,A,T]}),e[42]=A,e[43]=T,e[44]=k,e[45]=I):I=e[45],x=a.jsxs(aa,{className:S,"data-change-id":w,onClick:o,children:[I,P.length>0?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:P.map(go)}):j?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:a.jsx(We,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=g,e[7]=c,e[8]=u,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=x}else x=e[15];return x}function go(t,e){return a.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function pa(){const t=B.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,r]=q.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>r(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});i();const u=new ResizeObserver(i);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function xo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const vo=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function tr(t){const e=B.c(10),{height:s}=t,r=ge();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=vo.map(yo),e[2]=o):o=e[2];let d;e[3]!==r?(d=r("thread.publishDialog.openingComparison"),e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=a.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function yo(t,e){return a.jsxs("div",{className:K("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[a.jsx("div",{className:K("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),a.jsx("div",{className:K("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const ba={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},jo={...ba,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function wo(t){const e=B.c(11),{diff:s,emptyMessage:r,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=r===void 0?"No file changes in the working tree":r,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=q.useState(null),[f,m]=q.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=xo(),e[0]=g):g=e[0];const x=g;if(!s||Object.keys(s.diffs).length===0){let j;return e[1]!==i?(j=a.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=j):j=e[2],j}let P;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==o||e[9]!==u?(P=a.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(j=>{const[y,S]=j,{from:w,to:k}=S,N=p===y,C=w===null,v=k===null,A=y.startsWith("/")?y.slice(1):y,T=A.lastIndexOf("/"),I=T>=0?A.slice(T+1):A,M=T>=0?A.slice(0,T):null,$=oi(y),H=C?"bg-success":v?"bg-destructive":"bg-warning";return c?a.jsx("div",{children:a.jsx(Gn,{original:w??"",modified:k??"",language:$,theme:x,height:h,loading:a.jsx(tr,{height:h}),options:jo})},y):a.jsxs("div",{children:[a.jsxs("div",{className:K("flex items-center gap-3 py-3 hover:bg-accent",u),children:[a.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(N?null:y),children:a.jsx(hr,{className:K("h-3.5 w-3.5 transition-transform",N&&"rotate-90")})}),a.jsx("div",{className:K("h-2.5 w-2.5 shrink-0 rounded-full",H)}),a.jsx(Or,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:I}),M&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:M}),o?a.jsxs(Ks,{children:[a.jsx(qs,{asChild:!0,children:a.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:a.jsx(Oa,{className:"h-3.5 w-3.5"})})}),a.jsx(Hs,{align:"end",children:a.jsx(rs,{className:"text-destructive focus:text-destructive",onSelect:()=>m(y),children:"Discard changes"})})]}):null]}),f===y&&o?a.jsxs("div",{className:K("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[a.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",a.jsx("span",{className:"font-medium",children:I}),"? This cannot be undone."]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[a.jsx(xe,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),a.jsx(xe,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),o(y)},children:"Discard"})]})]}):null,N&&a.jsx("div",{className:"border-t",children:a.jsx(Gn,{original:w??"",modified:k??"",language:$,theme:x,height:h,loading:a.jsx(tr,{height:h}),options:ba})})]},y)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=o,e[9]=u,e[10]=P):P=e[10],P}function Po(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&di(e)?t.blockKey:null}function So(t){return t.kind!=="page"?!0:!t.pagePath||St(t.pagePath).length>0}function ko(t,e){try{return Wa(t,Ol,e)}catch{return null}}function No(t,e,s){if(!e)return;const r=Ll(e,t);if(!r)return null;if(St(r.path).length===0||s?.path!==r.path)return r.path;const n=kn(r.path,s.params);return St(n).length===0?n:r.path}function Co(t){return t.sectionKey&&!t.v8?ko(t.previewServerUrl,t.sectionKey):Ro(t.previewServerUrl,t.path)}function Ao(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(St(s).length===0)return s;if(e?.path!==s)return"";const r=kn(s,e.params);return St(r).length===0?r:""}function Ro(t,e){const s=e.trim();if(!s||St(s).length>0)return null;try{const r=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,r);return n.origin===r.origin?n:null}catch{return null}}function To(t,e){return e?.kind==="pointer"&&e.link?vn(t.toString(),e.link):ga(t,e)}function ga(t,e){if(!e)return null;if(e.kind==="pointer")return vn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Do(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function Bo(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const xa=q.createContext(!0),Io=["split","before","after","code"];function $o(t){return Io.includes(t)}const va={desktop:1280,mobile:412};function Fo(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
2
|
+
`:null,r=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return r===null&&n===null?{diffs:{}}:t.status==="edited"&&(r===null||n===null)?{diffs:{}}:{diffs:{[Ea(t.entry.name)]:{from:r,to:n}}}}function ya(t){const e=B.c(76),{change:s,diff:r,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:u}=t,c=ge(),h=q.use(xa),p=Po(s),b=i?null:p,f=i?p:null,m=f?No(f,i?.blocks,l):void 0,g=f!==null&&m===null,x=Do(s.kind,o,d)&&(f===null||typeof m=="string"),[P,j]=q.useState(null),y=x?P??"split":"code",[S,w]=q.useState("desktop"),[k,N]=q.useState(null),C=k??(f?m??"":Ao(s,l));let v;e[0]!==s?(v=So(s),e[0]=s,e[1]=v):v=e[1];const A=v,T=o?Co({previewServerUrl:o,sectionKey:p,path:C,v8:!!i}):null,I=T?vn(T.toString(),Qa):null,M=T?ga(T,d):null,$=T?To(T,d):null;let H;e[2]!==s||e[3]!==r?.diffs||e[4]!==c?(H=s.entry?Fo(s,c("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(J=>{const me=r?.diffs[J];return me?[[J,me]]:[]}))},e[2]=s,e[3]=r?.diffs,e[4]=c,e[5]=H):H=e[5];const O=H;let G;e[6]!==O.diffs?(G=Object.keys(O.diffs),e[6]=O.diffs,e[7]=G):G=e[7];const E=G.length>0;let W;e:{if(b!==null){W=null;break e}if(f!==null){const me=C.trim();if(!me){W=null;break e}W=St(me).length>0?c("thread.publishCompare.dynamicHint",{template:me}):c("thread.publishCompare.blockHint",{path:me});break e}if(s.kind!=="page"){let me;e[8]!==c?(me=c("thread.publishCompare.globalHint"),e[8]=c,e[9]=me):me=e[9],W=me;break e}let J;e[10]!==s.pagePath||e[11]!==c?(J=s.pagePath&&St(s.pagePath).length>0?c("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[10]=s.pagePath,e[11]=c,e[12]=J):J=e[12],W=J}const F=W,V=Bo(s,!!i),[te,Y]=q.useState(Lo);let re;e[13]===Symbol.for("react.memo_cache_sentinel")?(re=J=>Y(me=>me.has(J)?me:new Set(me).add(J)),e[13]=re):re=e[13];const le=re;let _;e[14]!==i?(_=J=>i?a.jsx(_o,{...J,onLoaded:le}):a.jsx(Mo,{...J}),e[14]=i,e[15]=_):_=e[15];const X=_,Z=(x?[V.before==="new"?null:I,V.after==="removed"?null:M].flatMap(J=>J?[Bn(J,S)]:[]):[]).every(J=>te.has(J));let se;e[16]!==u||e[17]!==Z?(se=Z&&u?J=>{J&&u()}:void 0,e[16]=u,e[17]=Z,e[18]=se):se=e[18];const ie=se,ue=V.before==="new"?a.jsx(ks,{icon:a.jsx(zr,{className:"size-5 text-brand"}),title:c("thread.publishCompare.newTitle"),description:c("thread.publishCompare.newDescription")}):X({url:I,device:S,title:c("thread.publishCompare.before"),missing:c("thread.publishCompare.enterPath")}),he=V.after==="removed"?a.jsx(ks,{icon:a.jsx(Qs,{className:"size-5 text-destructive"}),title:c("thread.publishCompare.removedTitle"),description:c("thread.publishCompare.removedDescription")}):X({url:M,device:S,title:c("thread.publishCompare.after"),missing:c(T?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let ne;e[19]!==x||e[20]!==j||e[21]!==h||e[22]!==c||e[23]!==y?(ne=x||h?a.jsx($r,{value:y,onValueChange:J=>{$o(J)&&j(J)},children:a.jsxs(Ir,{className:"h-8 w-auto",variant:"pill",children:[x?a.jsxs(a.Fragment,{children:[a.jsx(Dt,{value:"split",className:"px-3 text-xs",children:c("thread.publishCompare.sideBySide")}),a.jsx(Dt,{value:"before",className:"px-3 text-xs",children:c("thread.publishCompare.before")}),a.jsx(Dt,{value:"after",className:"px-3 text-xs",children:c("thread.publishCompare.after")})]}):null,h?a.jsx(Dt,{value:"code",className:"px-3 text-xs",children:c("thread.publishCompare.code")}):null]})}):null,e[19]=x,e[20]=j,e[21]=h,e[22]=c,e[23]=y,e[24]=ne):ne=e[24];let oe;e[25]!==$||e[26]!==x||e[27]!==s.pagePath||e[28]!==S||e[29]!==C||e[30]!==A||e[31]!==b||e[32]!==w||e[33]!==N||e[34]!==c||e[35]!==y?(oe=x&&y!=="code"?a.jsxs(a.Fragment,{children:[b?null:A?a.jsx(Ma,{value:C,onChange:J=>N(J.target.value),placeholder:s.pagePath??"/","aria-label":c("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):a.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:C}),a.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[a.jsx(sr,{active:S==="desktop",label:c("thread.publishCompare.desktop"),onClick:()=>w("desktop"),children:a.jsx(ci,{className:"size-3.5"})}),a.jsx(sr,{active:S==="mobile",label:c("thread.publishCompare.mobile"),onClick:()=>w("mobile"),children:a.jsx(fl,{className:"size-3.5"})})]}),$?a.jsxs("a",{href:$,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[a.jsx(_a,{className:"size-3.5"}),c("thread.publishCompare.openDraft")]}):null]}):null,e[25]=$,e[26]=x,e[27]=s.pagePath,e[28]=S,e[29]=C,e[30]=A,e[31]=b,e[32]=w,e[33]=N,e[34]=c,e[35]=y,e[36]=oe):oe=e[36];let fe;e[37]!==ne||e[38]!==oe?(fe=a.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[ne,oe]}),e[37]=ne,e[38]=oe,e[39]=fe):fe=e[39];let z;e[40]!==x||e[41]!==F||e[42]!==y?(z=F&&x&&y!=="code"?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:F}):null,e[40]=x,e[41]=F,e[42]=y,e[43]=z):z=e[43];let ce;e[44]!==g||e[45]!==h||e[46]!==c?(ce=g&&h?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:c("thread.publishCompare.notOnAnyPage")}):null,e[44]=g,e[45]=h,e[46]=c,e[47]=ce):ce=e[47];let Pe;e[48]!==o||e[49]!==h||e[50]!==c||e[51]!==f||e[52]!==m||e[53]!==y?(Pe=y==="code"&&!h?f!==null&&m===void 0?a.jsx(We,{className:"m-4 h-64 rounded"}):o===null?a.jsx(ks,{icon:a.jsx(Ms,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):a.jsx(ks,{icon:a.jsx(Ms,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.noPreviewTitle"),description:c("thread.publishCompare.noPreviewDescription")}):null,e[48]=o,e[49]=h,e[50]=c,e[51]=f,e[52]=m,e[53]=y,e[54]=Pe):Pe=e[54];let Q;e[55]!==n||e[56]!==E||e[57]!==O||e[58]!==h||e[59]!==c||e[60]!==y?(Q=y==="code"&&h?a.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:E?a.jsx(wo,{diff:O,hideFileRows:!0,editorHeight:"70vh"}):n?a.jsx(We,{className:"m-4 h-64 rounded"}):a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:c("thread.publishPopover.detailsUnavailable")})}):null,e[55]=n,e[56]=E,e[57]=O,e[58]=h,e[59]=c,e[60]=y,e[61]=Q):Q=e[61];let ee;e[62]!==he||e[63]!==ue||e[64]!==x||e[65]!==c||e[66]!==y?(ee=x?a.jsxs("div",{className:K("flex min-h-0 flex-1 gap-3 p-3",y==="code"&&"hidden"),children:[a.jsx(nr,{label:c("thread.publishCompare.before"),hidden:y==="after",children:ue}),a.jsx(nr,{label:c("thread.publishCompare.after"),highlight:!0,hidden:y==="before",children:he})]}):null,e[62]=he,e[63]=ue,e[64]=x,e[65]=c,e[66]=y,e[67]=ee):ee=e[67];let ve;return e[68]!==ie||e[69]!==fe||e[70]!==z||e[71]!==ce||e[72]!==Pe||e[73]!==Q||e[74]!==ee?(ve=a.jsxs("div",{ref:ie,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[fe,z,ce,Pe,Q,ee]}),e[68]=ie,e[69]=fe,e[70]=z,e[71]=ce,e[72]=Pe,e[73]=Q,e[74]=ee,e[75]=ve):ve=e[75],ve}function Lo(){return new Set}function sr(t){const e=B.c(8),{active:s,label:r,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=K("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let i;return e[2]!==s||e[3]!==o||e[4]!==r||e[5]!==n||e[6]!==l?(i=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":s,title:r,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=r,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function nr(t){const e=B.c(18),{label:s,highlight:r,hidden:n,children:o}=t,d=r===void 0?!1:r,i=(n===void 0?!1:n)&&"hidden";let u;e[0]!==i?(u=K("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=u):u=e[1];const c=d&&"bg-brand";let h;e[2]!==c?(h=K("size-1.5 rounded-full bg-muted-foreground/50",c),e[2]=c,e[3]=h):h=e[3];let p;e[4]!==h?(p=a.jsx("span",{className:h}),e[4]=h,e[5]=p):p=e[5];let b;e[6]!==s||e[7]!==p?(b=a.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[p,s]}),e[6]=s,e[7]=p,e[8]=b):b=e[8];const f=d&&"border-brand/60";let m;e[9]!==f?(m=K("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=m):m=e[10];let g;e[11]!==o||e[12]!==m?(g=a.jsx("div",{className:m,children:o}),e[11]=o,e[12]=m,e[13]=g):g=e[13];let x;return e[14]!==g||e[15]!==u||e[16]!==b?(x=a.jsxs("div",{className:u,children:[b,g]}),e[14]=g,e[15]=u,e[16]=b,e[17]=x):x=e[17],x}function ks(t){const e=B.c(10),{icon:s,title:r,description:n}=t;let o;e[0]!==s?(o=a.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==r?(d=a.jsx("p",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=d):d=e[3];let l;e[4]!==n?(l=a.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==l?(i=a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[o,d,l]}),e[6]=o,e[7]=d,e[8]=l,e[9]=i):i=e[9],i}function Oo(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function Mo(t){const e=B.c(24),{url:s,device:r,title:n,missing:o}=t,[d,l]=pa(),[i,u]=q.useState(null);if(!s){let w;return e[0]!==o?(w=a.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=w):w=e[1],w}let c;e[2]!==r||e[3]!==s?(c=Bn(s,r),e[2]=r,e[3]=s,e[4]=c):c=e[4];const h=c,p=va[r],b=d.width>0?Math.min(d.width/p,1):1,f=d.width>0?Math.max((d.width-p*b)/2,0):0;let m;e[5]!==h?(m=()=>u(h),e[5]=h,e[6]=m):m=e[6];const g=d.height>0?d.height/b:"100%",x=`scale(${b})`;let P;e[7]!==p||e[8]!==f||e[9]!==g||e[10]!==x?(P={left:f,width:p,height:g,transform:x,transformOrigin:"top left"},e[7]=p,e[8]=f,e[9]=g,e[10]=x,e[11]=P):P=e[11];let j;e[12]!==h||e[13]!==m||e[14]!==P||e[15]!==n?(j=a.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:m,className:"absolute top-0 border-0 bg-white",style:P},h),e[12]=h,e[13]=m,e[14]=P,e[15]=n,e[16]=j):j=e[16];let y;e[17]!==i||e[18]!==h?(y=i!==h?a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(as,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=y):y=e[19];let S;return e[20]!==l||e[21]!==j||e[22]!==y?(S=a.jsxs("div",{ref:l,className:"absolute inset-0",children:[j,y]}),e[20]=l,e[21]=j,e[22]=y,e[23]=S):S=e[23],S}function _o(t){const e=B.c(21),{url:s,device:r,title:n,missing:o,onLoaded:d}=t,[l,i]=pa(),[u,c]=q.useState(null),[h,p]=q.useState(null),b=l.width>0&&l.height>0;b&&(u?.width!==l.width||u?.height!==l.height)&&c(l);const f=b?l:u;if(!s){let S;return e[0]!==o?(S=a.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=S):S=e[1],S}let m,g,x,P;if(e[2]!==f||e[3]!==r||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const S=Bn(s,r),w=va[r];m=h?.src!==S;const k=[...h&&m?[h]:[],{src:S,logicalWidth:w}];g=i,x="absolute inset-0",P=k.map(N=>{const C=N.src===S&&m;return a.jsx("iframe",{src:N.src,title:n,"aria-hidden":C&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{N.src===S&&(p(N),d?.(N.src))},className:K("absolute top-0 border-0 bg-white",C&&"pointer-events-none opacity-0"),style:Oo(f,N.logicalWidth)},N.src)}),e[2]=f,e[3]=r,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=m,e[10]=g,e[11]=x,e[12]=P}else m=e[9],g=e[10],x=e[11],P=e[12];let j;e[13]!==m||e[14]!==h?(j=m?h?a.jsx(as,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(as,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=m,e[14]=h,e[15]=j):j=e[15];let y;return e[16]!==g||e[17]!==x||e[18]!==P||e[19]!==j?(y=a.jsxs("div",{ref:g,className:x,children:[P,j]}),e[16]=g,e[17]=x,e[18]=P,e[19]=j,e[20]=y):y=e[20],y}const Eo=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function zo(t){if(!t)return null;const e=Eo.exec(t)?.[1]?.trim();return e||null}function Uo(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function qo(t){const e=zo(t.body);if(e)return e;const s=t.author.trim();return!s||Uo(s)?null:s}function Ho(t,e,s,r,n,o){return["cms-publish-bodies",t,e,s,r,n,o]}const Ko=6e4;function Vo(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
|
|
3
|
+
`)}function Go(t,e,s){const r=B.c(6);let n;r[0]!==s||r[1]!==t||r[2]!==e?(n=os.decofile(`${t}/${e}/${s}`),r[0]=s,r[1]=t,r[2]=e,r[3]=n):n=r[3];let o;r[4]!==n?(o={queryKey:n,queryFn:mn},r[4]=n,r[5]=o):o=r[5];const{data:d}=dt(o);return d}function ja(t){const{orgSlug:e,virtualMcpId:s,branch:r,threadId:n,baseBranch:o,fastPreview:d,recoverSandbox:l}=t,i={orgSlug:e,virtualMcpId:s,branch:r,threadId:n},u=d?{fastPreview:!0}:void 0,c=q.useRef(null),h=async S=>{try{return await S()}catch(w){if(!l||!Xr(w))throw w;return c.current??=l(),await c.current,S()}},p=pr({...An(i),queryFn:()=>h(()=>Zr(i))}),b=p.data,f=b.changedFiles??null,m=b.headSha??null,g=f?f.length>0:Yl(b)||Xl(b),x=dt({queryKey:Ho(e,s,r,o,m,Vo(b,d)),queryFn:()=>h(()=>Zl(i,b,o,u)),enabled:g,staleTime:d?Ko:0,gcTime:d?void 0:0,throwOnError:(S,w)=>!f&&w.state.data===void 0}),P=Go(e,s,r),j=x.data??null,y=f?ua({files:f,lookup:P,diff:j}):no(j);return{status:b,summary:y,allPaths:f?f.map(S=>S.path):Object.keys(j?.diffs??{}),discardablePaths:d?null:new Set(b.files.map(S=>S.path)),changedFilesTotal:b.changedFilesTotal??y.count,changedFilesTruncated:b.changedFilesTruncated??!1,headSha:m,diff:j,bodiesPending:g&&x.isPending,bodiesFailed:x.isError,cardsPending:!f&&g&&x.isPending,refresh:()=>Promise.all([p.refetch(),d?null:x.refetch()])}}function Wo(t){const e=B.c(4);let s;e[0]!==t?(s=os.decofile(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==s?(r={queryKey:s,queryFn:mn},e[2]=s,e[3]=r):r=e[3];const{data:n}=dt(r);return n}function Qo(t,e){const s=B.c(5);let r;s[0]!==t||s[1]!==e?(r=e?Ya(e,t):os.liveMeta("","no-scope"),s[0]=t,s[1]=e,s[2]=r):r=s[2];let n;s[3]!==r?(n={queryKey:r,queryFn:mn},s[3]=r,s[4]=n):n=s[4];const{data:o}=dt(n);return o}function Ln(t){const e=B.c(27),{backend:s,cacheKey:r,scope:n}=t,o=br();let d;e[0]!==r?(d=os.contentChanges(r),e[0]=r,e[1]=d):d=e[1];let l;e[2]!==s.client||e[3]!==r||e[4]!==o?(l=()=>Xa(o,s.client,r),e[2]=s.client,e[3]=r,e[4]=o,e[5]=l):l=e[5];let i;e[6]!==d||e[7]!==l?(i={queryKey:d,queryFn:l,staleTime:0},e[6]=d,e[7]=l,e[8]=i):i=e[8];const u=pr(i),c=u.data,h=Ja(s,r,c),p=Wo(r),b=Qo(s,n),f=h.data??null,m=s.source==="github";let g;e[9]!==c.changes||e[10]!==p||e[11]!==b||e[12]!==f||e[13]!==m?(g=ho({changes:c.changes,sides:f,lookup:p,meta:b,hosted:m}),e[9]=c.changes,e[10]=p,e[11]=b,e[12]=f,e[13]=m,e[14]=g):g=e[14];const x=g;let P;e[15]!==c.changes?(P=Object.entries(c.changes).map(Jo),e[15]=c.changes,e[16]=P):P=e[16];const j=x.count>0&&h.isPending,y=p??null;let S;e[17]!==u?(S=()=>u.refetch(),e[17]=u,e[18]=S):S=e[18];let w;return e[19]!==c||e[20]!==h.isError||e[21]!==x||e[22]!==P||e[23]!==j||e[24]!==y||e[25]!==S?(w={changes:c,summary:x,entries:P,sidesPending:j,sidesFailed:h.isError,blocks:y,refresh:S},e[19]=c,e[20]=h.isError,e[21]=x,e[22]=P,e[23]=j,e[24]=y,e[25]=S,e[26]=w):w=e[26],w}function Jo(t){const[e,s]=t;return{name:e,version:s.version}}function Yo(t){return["smart-review-verdict",t.orgSlug,t.virtualMcpId,t.branch,t.threadId,t.fastPreview?"fast-preview-upstream":"sandbox",t.signature,t.language]}function Xo(t){const e=B.c(27),{orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:u}=t,[c]=gr(),{language:h}=c;let p,b,f;if(e[0]!==n||e[1]!==i||e[2]!==u||e[3]!==d||e[4]!==h||e[5]!==s||e[6]!==l||e[7]!==o||e[8]!==r){const S=i?Rn(i):"";p=u&&!!n&&!!l&&!!i&&S!=="",f=dt,b=Yo({orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,signature:S,language:h}),e[0]=n,e[1]=i,e[2]=u,e[3]=d,e[4]=h,e[5]=s,e[6]=l,e[7]=o,e[8]=r,e[9]=p,e[10]=b,e[11]=f}else p=e[9],b=e[10],f=e[11];let m;e[12]!==n||e[13]!==i||e[14]!==h||e[15]!==s||e[16]!==l||e[17]!==o||e[18]!==r?(m=()=>ei({orgSlug:s,virtualMcpId:r,branch:n,threadId:o},{status:l,diff:i,language:h}),e[12]=n,e[13]=i,e[14]=h,e[15]=s,e[16]=l,e[17]=o,e[18]=r,e[19]=m):m=e[19];let g;e[20]!==p||e[21]!==b||e[22]!==m?(g={queryKey:b,queryFn:m,enabled:p,staleTime:1/0,gcTime:6e5,retry:Zo},e[20]=p,e[21]=b,e[22]=m,e[23]=g):g=e[23];const x=f(g),P=x.data??null,j=p&&x.isFetching&&!x.data;let y;return e[24]!==P||e[25]!==j?(y={verdict:P,loading:j},e[24]=P,e[25]=j,e[26]=y):y=e[26],y}function Zo(t,e){return!Xr(e)&&t<1}function wa(t){const e=B.c(30),{orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,policy:u,judgeEnabled:c,paths:h}=t,p=c===void 0?!0:c,b=h===void 0?null:h;let f;e[0]!==i||e[1]!==p||e[2]!==u?(f=p&&ti(i,u),e[0]=i,e[1]=p,e[2]=u,e[3]=f):f=e[3];const m=f;let g;e[4]!==n||e[5]!==i||e[6]!==d||e[7]!==m||e[8]!==s||e[9]!==l||e[10]!==o||e[11]!==r?(g={orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:m},e[4]=n,e[5]=i,e[6]=d,e[7]=m,e[8]=s,e[9]=l,e[10]=o,e[11]=r,e[12]=g):g=e[12];const{verdict:x,loading:P}=Xo(g);if(!i&&b){let w;e[13]!==b||e[14]!==u?(w=si(b,u),e[13]=b,e[14]=u,e[15]=w):w=e[15];let k;return e[16]!==w?(k={gate:w,ready:!1},e[16]=w,e[17]=k):k=e[17],k}if(!i){let w;return e[18]===Symbol.for("react.memo_cache_sentinel")?(w={gate:{allowed:!0,reason:null},ready:!1},e[18]=w):w=e[18],w}if(!m){let w;e[19]!==i||e[20]!==u?(w=ni(i,u),e[19]=i,e[20]=u,e[21]=w):w=e[21];let k;return e[22]!==w?(k={gate:w,ready:!0},e[22]=w,e[23]=k):k=e[23],k}let j;e[24]!==P||e[25]!==x?(j=ri(x,P),e[24]=P,e[25]=x,e[26]=j):j=e[26];const y=!P;let S;return e[27]!==j||e[28]!==y?(S={gate:j,ready:y},e[27]=j,e[28]=y,e[29]=S):S=e[29],S}function ec(t){return["main","master"].includes(t.trim().toLowerCase())}function tc(t,e,s,r){return t===0?r("thread.publishPopover.publish"):s||!ec(e)?t===1?r("thread.publishPopover.publishOne"):r("thread.publishPopover.publishCount",{count:t}):t===1?r("thread.publishPopover.publishOneInProduction"):r("thread.publishPopover.publishCountInProduction",{count:t})}const sc=2500;function nc(t){const{selectedId:e,readyIds:s,lastShownId:r,liveIds:n}=t;return e===null||s.has(e)?e:r!==null&&r!==e&&n.includes(r)?r:e}function Pa(t){const e=B.c(16),s=q.useRef(!1),r=ge();let n;e[0]!==t?(n=h=>{!h&&s.current||t.onOpenChange(h)},e[0]=t,e[1]=n):n=e[1];const o=n;let d;e[2]!==t.mode||e[3]!==r?(d=t.mode==="review"?r("thread.publishPopover.submitForReview"):r("thread.publishPopover.publish"),e[2]=t.mode,e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx(vr,{className:"sr-only",children:d}),e[5]=d,e[6]=l):l=e[6];let i;e[7]!==t?(i=a.jsx(rc,{...t,publishLockRef:s}),e[7]=t,e[8]=i):i=e[8];let u;e[9]!==l||e[10]!==i?(u=a.jsxs(yr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[l,i]}),e[9]=l,e[10]=i,e[11]=u):u=e[11];let c;return e[12]!==o||e[13]!==t.open||e[14]!==u?(c=a.jsx(xr,{open:t.open,onOpenChange:o,children:u}),e[12]=o,e[13]=t.open,e[14]=u,e[15]=c):c=e[15],c}function rc(t){const e=B.c(3),s=It(t.virtualMcpId,t.branch),r=s.kind==="protocol"&&s.source==="github";let n;return e[0]!==r||e[1]!==t?(n=Gi({open:t.open,hosted:r})?a.jsx(ic,{...t}):null,e[0]=r,e[1]=t,e[2]=n):n=e[2],n}const ac=4,is="flex h-[45%] min-h-0 min-w-0 shrink-0 md:h-auto md:flex-1";function vs(t){const e=B.c(5),{list:s,pane:r}=t;let n;e[0]!==s?(n=a.jsx("div",{className:"flex min-h-0 w-full flex-1 flex-col max-md:border-t md:w-[380px] md:flex-none md:shrink-0 md:border-l md:[&>[data-publish-state]>:first-child]:pr-12",children:s}),e[0]=s,e[1]=n):n=e[1];let o;return e[2]!==r||e[3]!==n?(o=a.jsxs(a.Fragment,{children:[r,n]}),e[2]=r,e[3]=n,e[4]=o):o=e[4],o}function On(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:K(is,"bg-muted/40 p-3"),children:a.jsx(We,{className:"h-full w-full rounded-lg"})}),t[0]=e):e=t[0],e}function Mn(t){const e=B.c(11),{mode:s,title:r,subLine:n,trailing:o}=t,d=s==="review"?Ws:ml;let l;e[0]!==d?(l=a.jsx(d,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==l||e[3]!==r||e[4]!==o?(i=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[l,r,o]}),e[2]=l,e[3]=r,e[4]=o,e[5]=i):i=e[5];let u;e[6]!==n?(u=n?a.jsx("div",{className:"pl-6 text-xs text-muted-foreground",children:n}):null,e[6]=n,e[7]=u):u=e[7];let c;return e[8]!==i||e[9]!==u?(c=a.jsxs(a.Fragment,{children:[i,u]}),e[8]=i,e[9]=u,e[10]=c):c=e[10],c}function _n(t){const e=B.c(9),{draftPreviewUrl:s,t:r}=t;let n;e[0]!==s?(n=()=>{s&&window.open(s,"_blank","noopener,noreferrer")},e[0]=s,e[1]=n):n=e[1];const o=!s;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(Ms,{className:"size-4"}),e[2]=d):d=e[2];let l;e[3]!==r?(l=r("thread.publishPopover.preview"),e[3]=r,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==o||e[7]!==l?(i=a.jsxs(xe,{type:"button",variant:"outline",onClick:n,disabled:o,children:[d,l]}),e[5]=n,e[6]=o,e[7]=l,e[8]=i):i=e[8],i}function Sa(t){const e=B.c(21),{mode:s,draftPreviewUrl:r}=t,n=ge();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(On,{}),e[0]=o):o=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(We,{className:"h-3.5 w-48"}),e[1]=d):d=e[1];let l;e[2]!==s?(l=a.jsx(Mn,{mode:s,title:d}),e[2]=s,e[3]=l):l=e[3];let i,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bs,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Bt,{}),a.jsx(Bt,{}),a.jsx(Bt,{})]})}),u=a.jsxs(a.Fragment,{children:[a.jsx(We,{className:"h-3 w-20"}),a.jsx(We,{className:"h-14 w-full rounded-lg"})]}),e[4]=i,e[5]=u):(i=e[4],u=e[5]);let c;e[6]!==r||e[7]!==n?(c=a.jsx(_n,{draftPreviewUrl:r,t:n}),e[6]=r,e[7]=n,e[8]=c):c=e[8];const h=s==="review"?"default":"brand";let p;e[9]!==s||e[10]!==n?(p=n(s==="review"?"thread.publishPopover.submitForReview":"thread.publishPopover.publish"),e[9]=s,e[10]=n,e[11]=p):p=e[11];let b;e[12]!==h||e[13]!==p?(b=a.jsx(xe,{type:"button",variant:h,className:"flex-1",disabled:!0,children:p}),e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;e[15]!==c||e[16]!==b?(f=a.jsxs("div",{className:"flex gap-2",children:[c,b]}),e[15]=c,e[16]=b,e[17]=f):f=e[17];let m;return e[18]!==f||e[19]!==l?(m=a.jsx(vs,{pane:o,list:a.jsx(Ys,{state:"loading",header:l,body:i,note:u,footer:f})}),e[18]=f,e[19]=l,e[20]=m):m=e[20],m}function lc(t){const e=B.c(26),{mode:s,draftPreviewUrl:r,message:n,onRetry:o}=t,d=ge();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("div",{className:K(is,"bg-muted/40")}),e[0]=l):l=e[0];let i;e[1]!==d?(i=d("thread.publishPopover.loadFailed"),e[1]=d,e[2]=i):i=e[2];let u;e[3]!==i?(u=a.jsx("span",{className:"truncate",children:i}),e[3]=i,e[4]=u):u=e[4];let c;e[5]!==s||e[6]!==u?(c=a.jsx(Mn,{mode:s,title:u}),e[5]=s,e[6]=u,e[7]=c):c=e[7];let h;e[8]!==n?(h=a.jsx("p",{className:"px-4 py-6 text-xs text-destructive",children:n}),e[8]=n,e[9]=h):h=e[9];let p;e[10]!==r||e[11]!==d?(p=a.jsx(_n,{draftPreviewUrl:r,t:d}),e[10]=r,e[11]=d,e[12]=p):p=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(bn,{className:"size-4"}),e[13]=b):b=e[13];let f;e[14]!==d?(f=d("thread.publishPopover.retry"),e[14]=d,e[15]=f):f=e[15];let m;e[16]!==o||e[17]!==f?(m=a.jsxs(xe,{type:"button",variant:"outline",className:"flex-1",onClick:o,children:[b,f]}),e[16]=o,e[17]=f,e[18]=m):m=e[18];let g;e[19]!==p||e[20]!==m?(g=a.jsxs("div",{className:"flex gap-2",children:[p,m]}),e[19]=p,e[20]=m,e[21]=g):g=e[21];let x;return e[22]!==g||e[23]!==c||e[24]!==h?(x=a.jsx(vs,{pane:l,list:a.jsx(Ys,{state:"ready",header:c,body:h,footer:g})}),e[22]=g,e[23]=c,e[24]=h,e[25]=x):x=e[25],x}function ic(t){const e=B.c(3),s=t.mode??"publish";let r;return e[0]!==s||e[1]!==t?(r=a.jsx(jr,{children:n=>{const{reset:o}=n;return a.jsx(wr,{fallback:d=>{const{error:l,resetError:i}=d;return a.jsx(lc,{mode:s,draftPreviewUrl:t.draftPreviewUrl,message:l?.message??"",onRetry:()=>{o(),i()}})},children:a.jsx(q.Suspense,{fallback:a.jsx(Sa,{mode:s,draftPreviewUrl:t.draftPreviewUrl}),children:a.jsx(oc,{...t})})})}}),e[0]=s,e[1]=t,e[2]=r):r=e[2],r}function oc(t){const e=B.c(13),s=It(t.virtualMcpId,t.branch);let r;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=r):r=e[3];const n=yn(r);if(s.kind==="protocol"&&n){let d;return e[4]!==s||e[5]!==n||e[6]!==t?(d=s.source==="sandbox"?a.jsx(uc,{...t,backend:s,cacheKey:n}):a.jsx(dc,{...t,backend:s,cacheKey:n}),e[4]=s,e[5]=n,e[6]=t,e[7]=d):d=e[7],d}if(s.kind!=="legacy"){const d=t.mode??"publish";let l;return e[8]!==t.draftPreviewUrl||e[9]!==d?(l=a.jsx(Sa,{mode:d,draftPreviewUrl:t.draftPreviewUrl}),e[8]=t.draftPreviewUrl,e[9]=d,e[10]=l):l=e[10],l}let o;return e[11]!==t?(o=a.jsx(cc,{...t}),e[11]=t,e[12]=o):o=e[12],o}function cc(t){const e=B.c(52),s=cs()?.taskId??null;let r;e[0]!==t.baseBranch||e[1]!==t.branch||e[2]!==t.fastPreview||e[3]!==t.orgSlug||e[4]!==t.recoverSandbox||e[5]!==t.virtualMcpId||e[6]!==s?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,baseBranch:t.baseBranch,fastPreview:t.fastPreview,recoverSandbox:t.recoverSandbox},e[0]=t.baseBranch,e[1]=t.branch,e[2]=t.fastPreview,e[3]=t.orgSlug,e[4]=t.recoverSandbox,e[5]=t.virtualMcpId,e[6]=s,e[7]=r):r=e[7];const n=ja(r),o=t.mode!=="review";let d;e[8]!==t.branch||e[9]!==t.fastPreview||e[10]!==t.orgSlug||e[11]!==t.publishPolicy||e[12]!==t.virtualMcpId||e[13]!==n.allPaths||e[14]!==n.diff||e[15]!==n.status||e[16]!==o||e[17]!==s?(d={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,fastPreview:t.fastPreview,status:n.status,diff:n.diff,paths:n.allPaths,policy:t.publishPolicy,judgeEnabled:o},e[8]=t.branch,e[9]=t.fastPreview,e[10]=t.orgSlug,e[11]=t.publishPolicy,e[12]=t.virtualMcpId,e[13]=n.allPaths,e[14]=n.diff,e[15]=n.status,e[16]=o,e[17]=s,e[18]=d):d=e[18];const{gate:l}=wa(d),i=n.discardablePaths;let u;e[19]!==i?(u=P=>i===null||P.every(j=>i.has(j)),e[19]=i,e[20]=u):u=e[20];const c=u;let h;e[21]!==c?(h=P=>c(P.filepaths),e[21]=c,e[22]=h):h=e[22];let p;e[23]!==c||e[24]!==n.allPaths||e[25]!==n.changedFilesTruncated?(p=!n.changedFilesTruncated&&c(n.allPaths),e[23]=c,e[24]=n.allPaths,e[25]=n.changedFilesTruncated,e[26]=p):p=e[26];let b;e[27]!==t.branch||e[28]!==n.status?(b=Tn(n.status)??t.branch,e[27]=t.branch,e[28]=n.status,e[29]=b):b=e[29];const f=n.headSha??void 0;let m;e[30]!==t.fastPreview||e[31]!==n.diff?(m=!t.fastPreview&&n.diff?{expectedDiffSignature:Rn(n.diff)}:{},e[30]=t.fastPreview,e[31]=n.diff,e[32]=m):m=e[32];let g;e[33]!==l||e[34]!==n.allPaths||e[35]!==n.bodiesFailed||e[36]!==n.bodiesPending||e[37]!==n.cardsPending||e[38]!==n.changedFilesTotal||e[39]!==n.changedFilesTruncated||e[40]!==n.diff||e[41]!==n.refresh||e[42]!==n.summary||e[43]!==h||e[44]!==p||e[45]!==b||e[46]!==f||e[47]!==m?(g={summary:n.summary,allPaths:n.allPaths,canDiscard:h,canDiscardAll:p,changedFilesTotal:n.changedFilesTotal,changedFilesTruncated:n.changedFilesTruncated,diff:n.diff,bodiesPending:n.bodiesPending,bodiesFailed:n.bodiesFailed,cardsPending:n.cardsPending,refresh:n.refresh,gate:l,headBranch:b,expectedHeadSha:f,...m,hosted:!1,otherWork:!1},e[33]=l,e[34]=n.allPaths,e[35]=n.bodiesFailed,e[36]=n.bodiesPending,e[37]=n.cardsPending,e[38]=n.changedFilesTotal,e[39]=n.changedFilesTruncated,e[40]=n.diff,e[41]=n.refresh,e[42]=n.summary,e[43]=h,e[44]=p,e[45]=b,e[46]=f,e[47]=m,e[48]=g):g=e[48];let x;return e[49]!==t||e[50]!==g?(x=a.jsx(En,{...t,source:g}),e[49]=t,e[50]=g,e[51]=x):x=e[51],x}function ka(t,e){return{summary:t.summary,allPaths:[],canDiscard:()=>!0,canDiscardAll:!0,changedFilesTotal:t.summary.count,changedFilesTruncated:!1,diff:null,bodiesPending:t.sidesPending,bodiesFailed:t.sidesFailed,cardsPending:!1,refresh:t.refresh,protocol:{backend:e,entries:t.entries},v8:{blocks:t.blocks}}}function dc(t){const e=B.c(23);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(o={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=o):o=e[7];let d;e[8]!==s||e[9]!==r||e[10]!==o?(d={backend:s,cacheKey:r,scope:o},e[8]=s,e[9]=r,e[10]=o,e[11]=d):d=e[11];const l=Ln(d),i=s.source==="github";let u;e[12]!==s||e[13]!==l?(u=ka(l,s),e[12]=s,e[13]=l,e[14]=u):u=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c={allowed:!0,reason:null},e[15]=c):c=e[15];let h;e[16]!==i||e[17]!==n.branch||e[18]!==u?(h={...u,gate:c,headBranch:n.branch,hosted:i,otherWork:!1},e[16]=i,e[17]=n.branch,e[18]=u,e[19]=h):h=e[19];let p;return e[20]!==n||e[21]!==h?(p=a.jsx(En,{...n,source:h}),e[20]=n,e[21]=h,e[22]=p):p=e[22],p}function uc(t){const e=B.c(58);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);const o=cs()?.taskId??null;let d;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(d={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=d):d=e[7];let l;e[8]!==s||e[9]!==r||e[10]!==d?(l={backend:s,cacheKey:r,scope:d},e[8]=s,e[9]=r,e[10]=d,e[11]=l):l=e[11];const i=Ln(l);let u;e[12]!==n.baseBranch||e[13]!==n.branch||e[14]!==n.fastPreview||e[15]!==n.orgSlug||e[16]!==n.recoverSandbox||e[17]!==n.virtualMcpId||e[18]!==o?(u={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,baseBranch:n.baseBranch,fastPreview:n.fastPreview,recoverSandbox:n.recoverSandbox},e[12]=n.baseBranch,e[13]=n.branch,e[14]=n.fastPreview,e[15]=n.orgSlug,e[16]=n.recoverSandbox,e[17]=n.virtualMcpId,e[18]=o,e[19]=u):u=e[19];const c=ja(u),h=n.mode!=="review";let p;e[20]!==c.allPaths||e[21]!==c.diff||e[22]!==c.status||e[23]!==n.branch||e[24]!==n.fastPreview||e[25]!==n.orgSlug||e[26]!==n.publishPolicy||e[27]!==n.virtualMcpId||e[28]!==h||e[29]!==o?(p={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,fastPreview:n.fastPreview,status:c.status,diff:c.diff,paths:c.allPaths,policy:n.publishPolicy,judgeEnabled:h},e[20]=c.allPaths,e[21]=c.diff,e[22]=c.status,e[23]=n.branch,e[24]=n.fastPreview,e[25]=n.orgSlug,e[26]=n.publishPolicy,e[27]=n.virtualMcpId,e[28]=h,e[29]=o,e[30]=p):p=e[30];const{gate:b}=wa(p);let f;if(e[31]!==c.allPaths||e[32]!==i){let k;e[34]!==i?(k=N=>{const C=In(N);return C===null?!Cn(N):!Object.hasOwn(i.changes.changes,C)},e[34]=i,e[35]=k):k=e[35],f=c.allPaths.some(k),e[31]=c.allPaths,e[32]=i,e[33]=f}else f=e[33];const m=f;let g;e[36]!==s||e[37]!==i?(g=ka(i,s),e[36]=s,e[37]=i,e[38]=g):g=e[38];let x;e[39]!==c||e[40]!==i?(x=()=>Promise.all([i.refresh(),c.refresh()]),e[39]=c,e[40]=i,e[41]=x):x=e[41];let P;e[42]!==c.status||e[43]!==n.branch?(P=Tn(c.status)??n.branch,e[42]=c.status,e[43]=n.branch,e[44]=P):P=e[44];const j=c.headSha??void 0;let y;e[45]!==c.diff?(y=c.diff?{expectedDiffSignature:Rn(c.diff)}:{},e[45]=c.diff,e[46]=y):y=e[46];let S;e[47]!==b||e[48]!==m||e[49]!==j||e[50]!==y||e[51]!==g||e[52]!==x||e[53]!==P?(S={...g,refresh:x,gate:b,headBranch:P,expectedHeadSha:j,...y,hosted:!1,otherWork:m},e[47]=b,e[48]=m,e[49]=j,e[50]=y,e[51]=g,e[52]=x,e[53]=P,e[54]=S):S=e[54];let w;return e[55]!==n||e[56]!==S?(w=a.jsx(En,{...n,source:S}),e[55]=n,e[56]=S,e[57]=w):w=e[57],w}function En(t){const e=B.c(130),{source:s,publishLockRef:r,onOpenChange:n,mode:o,fastPreview:d,orgSlug:l,virtualMcpId:i,branch:u,baseBranch:c,repoTarget:h,owner:p,repo:b,draftPreviewUrl:f,destinationHost:m,previewServerUrl:g,compareDraft:x,lastPublishedPr:P,onRequestApproval:j,openPullRequest:y,onPullRequestChanged:S,onPublished:w}=t,k=o===void 0?"publish":o,N=P===void 0?null:P,C=y===void 0?null:y,v=ge(),[A]=gr(),{language:T}=A,I=cs()?.taskId??null,{data:M}=Vs.useSession(),$=Sr(kr(l,i,u)),{allPaths:H,changedFilesTotal:O,changedFilesTruncated:G,diff:E,bodiesFailed:W,refresh:F,gate:V,hosted:te,otherWork:Y}=s;let re;e[0]!==x||e[1]!==s.bodiesPending||e[2]!==s.cardsPending||e[3]!==s.summary?(re={summary:s.summary,cardsPending:s.cardsPending,bodiesPending:s.bodiesPending,compareDraft:x},e[0]=x,e[1]=s.bodiesPending,e[2]=s.cardsPending,e[3]=s.summary,e[4]=re):re=e[4];const le=re;let _;e[5]!==te?(_={hosted:te},e[5]=te,e[6]=_):_=e[6];const X=Vi(le,_),{summary:D,cardsPending:Z,bodiesPending:se,compareDraft:ie}=X.shown,[ue,he]=q.useState(null),[ne,oe]=q.useState(!1),[fe,z]=q.useState(hc);let ce;e[7]===Symbol.for("react.memo_cache_sentinel")?(ce=U=>z(ae=>ae.has(U)?ae:new Set(ae).add(U)),e[7]=ce):ce=e[7];const Pe=ce,[Q,ee]=q.useState(null);let ve;e[8]===Symbol.for("react.memo_cache_sentinel")?(ve=[],e[8]=ve):ve=e[8];const[J,me]=q.useState(ve);let we;e[9]!==s.v8?(we=U=>{ee(U),me(ae=>[U,...ae.filter(de=>de!==U)]),s.v8&&setTimeout(()=>Pe(U),sc)},e[9]=s.v8,e[10]=we):we=e[10];const rt=we,[ye,_e]=q.useState(null);let Ee;e[11]!==ue||e[12]!==D?(Ee=ao(ue,oo(D)),e[11]=ue,e[12]=D,e[13]=Ee):Ee=e[13];const Ne=Ee,De=[...D.pages,...D.blocks,...D.other],Le=De.find(U=>ke(U)===Q)??De[0]??null,Ce=Le?ke(Le):null,ut=[...new Set([...Ce?[Ce]:[],...J,...De.map(ke)])].filter(U=>De.some(ae=>ke(ae)===U)).slice(0,ac),Oe=!!s.v8,[Qe,ze]=q.useState(null),Ue=Oe?nc({selectedId:Ce,readyIds:fe,lastShownId:Qe,liveIds:ut}):Ce;Oe&&Ue===Ce&&Ue!==Qe&&ze(Ue);const L=k==="review"&&!te,pe=Z?"loading":se?"manifest":"ready",Ae=C?.state==="open",Be=s.headBranch,Te=M?.user;let qe;e[14]!==Te?(qe=ra(Te),e[14]=Te,e[15]=qe):qe=e[15];let Ie;e[16]!==s.expectedDiffSignature?(Ie=s.expectedDiffSignature?{expectedDiffSignature:s.expectedDiffSignature}:{},e[16]=s.expectedDiffSignature,e[17]=Ie):Ie=e[17];let at;e[18]!==c||e[19]!==u||e[20]!==d||e[21]!==l||e[22]!==p||e[23]!==b||e[24]!==h||e[25]!==s.expectedHeadSha||e[26]!==s.headBranch||e[27]!==qe||e[28]!==Ie||e[29]!==I||e[30]!==i?(at={orgSlug:l,virtualMcpId:i,branch:u,threadId:I,fastPreview:d,baseBranch:c,target:h,owner:p,repo:b,headBranch:Be,coAuthor:qe,expectedHeadSha:s.expectedHeadSha,...Ie},e[18]=c,e[19]=u,e[20]=d,e[21]=l,e[22]=p,e[23]=b,e[24]=h,e[25]=s.expectedHeadSha,e[26]=s.headBranch,e[27]=qe,e[28]=Ie,e[29]=I,e[30]=i,e[31]=at):at=e[31];const us=at,hs=L?"review":"publish",ht=M?.user?.name;let Ft;e[32]!==H||e[33]!==m||e[34]!==te||e[35]!==Ne||e[36]!==n||e[37]!==w||e[38]!==S||e[39]!==r||e[40]!==F||e[41]!==s.protocol||e[42]!==hs||e[43]!==ht||e[44]!==us?(Ft={mode:hs,target:us,note:Ne,allPaths:H,destinationHost:m,publishLockRef:r,onOpenChange:n,refresh:F,onPullRequestChanged:S,onPublished:w,hosted:te,authorName:ht,protocol:s.protocol},e[32]=H,e[33]=m,e[34]=te,e[35]=Ne,e[36]=n,e[37]=w,e[38]=S,e[39]=r,e[40]=F,e[41]=s.protocol,e[42]=hs,e[43]=ht,e[44]=us,e[45]=Ft):Ft=e[45];const{isPublishing:Se,publishError:Lt,publishErrorDetail:lt,submit:Nt,discardChange:Ot,discardAll:fs}=ql(Ft),Je=Rr(l,i).phase==="saving",Ct=D.count>0||Y,Mt=!Se&&Ct&&(L||V.allowed);let it;e[46]!==c||e[47]!==L||e[48]!==s.v8||e[49]!==D.count||e[50]!==v?(it=L?D.count===0?v("thread.publishPopover.submitForReview"):D.count===1?v("thread.publishPopover.submitOneForReview"):v("thread.publishPopover.submitCountForReview",{count:D.count}):tc(D.count,c,!!s.v8,v),e[46]=c,e[47]=L,e[48]=s.v8,e[49]=D.count,e[50]=v,e[51]=it):it=e[51];const At=it;let ft;e:{if(L&&Ae){let de;e[52]!==C.number||e[53]!==v?(de=v("thread.publishPopover.updatesPullRequest",{number:C.number}),e[52]=C.number,e[53]=v,e[54]=de):de=e[54],ft=de;break e}const U=N;if(!U?.mergedAt){ft=null;break e}let ae;if(e[55]!==T||e[56]!==U||e[57]!==v){const de=za(new Date(U.mergedAt),T),je=qo(U);ae=je?v("thread.publishPopover.lastPublishedBy",{when:de,name:je}):v("thread.publishPopover.lastPublished",{when:de}),e[55]=T,e[56]=U,e[57]=v,e[58]=ae}else ae=e[58];ft=ae}const mt=ft;let _t;e[59]!==L||e[60]!==D.count||e[61]!==v?(_t=L?v("thread.publishPopover.submitForReview"):D.count===1?v("thread.publishPopover.publishOne"):D.count>1?v("thread.publishPopover.publishCount",{count:D.count}):v("thread.publishPopover.publish"),e[59]=L,e[60]=D.count,e[61]=v,e[62]=_t):_t=e[62];const Rt=_t,Tt=(U,ae)=>ae.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:U}),ae.map(de=>{const je=ke(de);return a.jsx(ma,{change:de,bodyPending:se,selected:Le!==null&&ke(Le)===je,onSelect:()=>rt(je),confirming:ye===je,onConfirmingChange:Re=>_e(Re?je:null),onDiscard:s.canDiscard(de)?()=>{Ot(de)}:void 0,isPublishing:Se,isDiscarding:Je,v8:!!s.v8},je)})]});let pt;e:{if(L||!Ct){pt=null;break e}if(V.pending){let je;e[63]===Symbol.for("react.memo_cache_sentinel")?(je=a.jsx(as,{className:"size-3.5 motion-reduce:animate-none"}),e[63]=je):je=e[63];let Re;e[64]!==v?(Re=v("thread.publishPopover.reviewing"),e[64]=v,e[65]=Re):Re=e[65];let Ke;e[66]!==Re?(Ke=a.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-2.5 text-xs text-muted-foreground",children:[je,Re]}),e[66]=Re,e[67]=Ke):Ke=e[67],pt=Ke;break e}if(V.allowed){pt=null;break e}let U;e[68]===Symbol.for("react.memo_cache_sentinel")?(U=a.jsx(pn,{className:"mt-0.5 size-3.5 shrink-0"}),e[68]=U):U=e[68];let ae;e[69]!==V.reason||e[70]!==v?(ae=V.reason??v("thread.publishPopover.needsReviewGeneric"),e[69]=V.reason,e[70]=v,e[71]=ae):ae=e[71];let de;e[72]!==ae?(de=a.jsxs("div",{className:"flex items-start gap-2 border-t px-4 py-2.5 text-xs text-warning",children:[U,a.jsx("span",{children:ae})]}),e[72]=ae,e[73]=de):de=e[73],pt=de}const bt=pt;let gt;e[74]!==fs||e[75]!==ne||e[76]!==Je||e[77]!==Se||e[78]!==s.canDiscardAll||e[79]!==D.count||e[80]!==v?(gt=D.count<=1||!s.canDiscardAll?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>oe(!0),disabled:Se||Je,children:v("thread.publishPopover.discardAll")}),a.jsx(Os,{open:ne,onOpenChange:oe,children:a.jsxs(Ls,{children:[a.jsxs(Bs,{children:[a.jsx(Ts,{children:v("thread.publishPopover.discardAllTitle")}),a.jsx(Ds,{children:v("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(Fs,{children:[a.jsx(Is,{children:v("thread.publishDialog.cancel")}),a.jsx($s,{onClick:()=>{fs()},disabled:Je,className:K(Pr({variant:"destructive"})),children:v("thread.publishPopover.discardAll")})]})]})})]}),e[74]=fs,e[75]=ne,e[76]=Je,e[77]=Se,e[78]=s.canDiscardAll,e[79]=D.count,e[80]=v,e[81]=gt):gt=e[81];const xt=gt,vt=Z?a.jsx(bs,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Bt,{}),a.jsx(Bt,{})]})}):D.count===0&&Y?a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:v("thread.publishPopover.onlyOtherWork")}):D.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(Nn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:v(L?"thread.publishPopover.nothingToSubmit":"thread.publishPopover.everythingLive")}),a.jsx("p",{className:"text-xs text-muted-foreground",children:v(L?"thread.publishPopover.submitEmptyHint":"thread.publishPopover.emptyHint")})]}):a.jsxs(bs,{children:[G?a.jsx("p",{className:"text-2xs text-muted-foreground",children:v("thread.publishPopover.showingFirst",{shown:D.count,total:O})}):null,Tt(v("thread.publishPopover.pagesGroup"),D.pages),Tt(v("thread.publishPopover.blocksGroup"),D.blocks),Tt(v("thread.publishPopover.otherGroup"),D.other),W?a.jsx("p",{className:"text-2xs text-muted-foreground",children:v("thread.publishPopover.detailsUnavailable")}):null,Y?a.jsx("p",{className:"text-2xs text-muted-foreground",children:v("thread.publishPopover.alsoOtherWork")}):null]}),yt=Z?a.jsx(On,{}):Le?a.jsx("div",{className:K(is,"relative"),children:De.filter(U=>ut.includes(ke(U))).map(U=>a.jsx("div",{className:K("absolute inset-0 flex",Oe?ke(U)===Ue?"z-10":"pointer-events-none opacity-0":ke(U)!==Ce&&"hidden"),inert:Oe&&ke(U)!==Ue,"aria-hidden":Oe&&ke(U)!==Ue?!0:void 0,children:a.jsx(ya,{change:U,diff:E,bodyPending:se,previewServerUrl:g,draft:ie,lastPage:$,v8:s.v8,onReady:Oe?()=>Pe(ke(U)):void 0})},ke(U)))}):a.jsx("div",{className:K(is,"bg-muted/40")});let Ye;e[82]!==At?(Ye=a.jsx("span",{className:"truncate",children:At}),e[82]=At,e[83]=Ye):Ye=e[83];let jt;e[84]!==xt||e[85]!==k||e[86]!==mt||e[87]!==Ye?(jt=a.jsx(Mn,{mode:k,title:Ye,subLine:mt,trailing:xt}),e[84]=xt,e[85]=k,e[86]=mt,e[87]=Ye,e[88]=jt):jt=e[88];let wt;e[89]!==Se||e[90]!==L||e[91]!==Ne||e[92]!==D.count||e[93]!==v?(wt=D.count===0?null:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-sm font-medium",children:v(L?"thread.publishPopover.reviewNote":"thread.publishPopover.versionNote")}),a.jsx(Ml,{value:Ne,onChange:U=>he(U.target.value),placeholder:v(L?"thread.publishPopover.reviewNotePlaceholder":"thread.publishPopover.versionNotePlaceholder"),rows:2,maxLength:Hl,className:"resize-none text-sm",disabled:Se})]}),e[89]=Se,e[90]=L,e[91]=Ne,e[92]=D.count,e[93]=v,e[94]=wt):wt=e[94];let $e;e[95]!==f||e[96]!==v?($e=a.jsx(_n,{draftPreviewUrl:f,t:v}),e[95]=f,e[96]=v,e[97]=$e):$e=e[97];let Fe;e[98]!==Mt||e[99]!==V||e[100]!==Ct||e[101]!==te||e[102]!==Se||e[103]!==L||e[104]!==j||e[105]!==Rt||e[106]!==X||e[107]!==Nt||e[108]!==v?(Fe=!L&&!te&&Ct&&!V.allowed&&!V.pending?a.jsx(xe,{type:"button",className:"flex-1",onClick:j,disabled:Se,children:v("thread.publishPopover.requestApproval")}):a.jsxs(xe,{type:"button",variant:L?"default":"brand",className:"flex-1",onClick:()=>{X.hold(),Nt().then(U=>{U===!1&&X.release()})},disabled:!Mt,children:[Se?a.jsx(as,{className:"size-4 motion-reduce:animate-none"}):null,Se?v(L?"thread.publishPopover.submitting":"thread.publishPopover.publishing"):Rt]}),e[98]=Mt,e[99]=V,e[100]=Ct,e[101]=te,e[102]=Se,e[103]=L,e[104]=j,e[105]=Rt,e[106]=X,e[107]=Nt,e[108]=v,e[109]=Fe):Fe=e[109];let Xe;e[110]!==$e||e[111]!==Fe?(Xe=a.jsxs("div",{className:"flex gap-2",children:[$e,Fe]}),e[110]=$e,e[111]=Fe,e[112]=Xe):Xe=e[112];let He;e[113]!==Lt||e[114]!==lt||e[115]!==v?(He=Lt?a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-destructive",children:Lt}),lt?a.jsx(Za,{label:v("siteEditor.details"),detail:lt}):null]}):null,e[113]=Lt,e[114]=lt,e[115]=v,e[116]=He):He=e[116];let Pt;e[117]!==Xe||e[118]!==He?(Pt=a.jsxs(a.Fragment,{children:[Xe,He]}),e[117]=Xe,e[118]=He,e[119]=Pt):Pt=e[119];let Ze;e[120]!==vt||e[121]!==bt||e[122]!==pe||e[123]!==jt||e[124]!==wt||e[125]!==Pt?(Ze=a.jsx(Ys,{state:pe,header:jt,body:vt,note:wt,gate:bt,footer:Pt}),e[120]=vt,e[121]=bt,e[122]=pe,e[123]=jt,e[124]=wt,e[125]=Pt,e[126]=Ze):Ze=e[126];let ot;return e[127]!==yt||e[128]!==Ze?(ot=a.jsx(vs,{pane:yt,list:Ze}),e[127]=yt,e[128]=Ze,e[129]=ot):ot=e[129],ot}function hc(){return new Set}function fc(t){if(!(t==="claiming"||t==="ready"||t==="failed"))return ui[t].short}const mc=new Set(["failure","timed_out","cancelled","action_required"]);function Na(t){return t.status==="completed"&&mc.has(t.conclusion)}function zn(t){return t.status==="queued"||t.status==="in_progress"}function Rs(t){return t.isPending&&t.fetchStatus!=="idle"}function pc(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr-page"}}function ct(t,e,s){return e?[...t,pc(s)]:t}function Ge(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"sync",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function rr(t){return{key:"submit-for-review",label:t("thread.headerActions.submitForReview"),action:"create-pr"}}function Ns(t,e,s){if(e.filter(zn).length===0)return t;const n=e.filter(o=>o.status==="completed").length;return{...t,tooltip:s("thread.cmsActions.checksRunning",{done:n,total:e.length})}}function bc(t){const{lifecycle:e,branch:s,pr:r,checks:n,reviews:o,loading:d,t:l}=t;if(d)return{label:l("thread.headerActions.loading"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.loadingBranchTooltip"),menu:[]};switch(e.phase){case"idle":return{label:t.claimPhase&&fc(t.claimPhase.kind)||l("thread.headerActions.startingSandbox"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForDaemonTooltip"),menu:[]};case"cloning":return{label:l("thread.headerActions.cloningRepo"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.cloningRepoTooltip"),menu:[]};case"clone-failed":return{label:l("thread.headerActions.cloneFailed"),disabled:!0,variant:"outline",tooltip:e.error||l("thread.headerActions.cloneFailedDefaultTooltip"),menu:[]};case"checking-out":return{label:l("thread.headerActions.switchingTo",{branch:e.to}),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.checkingOutTooltip",{branch:e.to}),menu:[]};case"installing":return{label:l("thread.headerActions.installingPackages"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.installingPackagesTooltip"),menu:[]};case"starting":{if(!(s.kind==="ready"&&(s.workingTreeDirty||s.aheadOfBase>0||s.unpushed>0))&&!t.noReviewableDiff)return{label:l("thread.headerActions.startingApp"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.startingAppTooltip"),menu:[]};break}}if(s.kind!=="ready")return{label:l("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForBranchTooltip"),menu:[]};const i=s,u=i.unpushed>0&&!(r&&i.headSha&&r.headSha&&i.headSha===r.headSha);if(t.noReviewableDiff&&!r)return{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:Ge([],i,l)};if(i.workingTreeDirty||u)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Ge(ct([rr(l)],r,l),i,l)};if(sa("no local work — checking PR/sync state",{workingTreeDirty:i.workingTreeDirty,unpushed:i.unpushed,aheadOfBase:i.aheadOfBase,behindBase:i.behindBase,branch:i.branch,base:i.base,prMerged:r?.merged??null,prState:r?.state??null}),r?.merged)return!!i.headSha&&!!r.headSha&&i.headSha!==r.headSha?{label:l("thread.headerActions.continue"),action:"create-pr",variant:"special",tooltip:l("thread.headerActions.openNewPrTooltip"),menu:Ge(ct([],r,l),i,l)}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.prMergedTooltip",{prNumber:String(r.number),base:r.base}),menu:Ge(ct([],r,l),i,l)};if(i.aheadOfBase>0){if(r&&r.state==="closed"&&!r.merged)return{label:l("thread.headerActions.reopenPr"),action:"reopen",variant:"default",tooltip:l("thread.headerActions.reopenPrTooltip",{prNumber:String(r.number)}),menu:Ge(ct([],r,l),i,l)};if(!r)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Ge([rr(l)],i,l)};if((o?.mergeableState??"unknown")==="dirty")return{label:l("thread.cmsActions.getLatest"),action:"rebase",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:l("thread.cmsActions.resolveOnProvider"),action:"open-pr-page"}]};const h=n.filter(zn).length,p=n.filter(Na).map(f=>f.name);if(h===0&&p.length>0)return{label:l("thread.headerActions.fixChecks"),action:"fix-checks",variant:"default",tooltip:l("thread.headerActions.failingChecksTooltip",{checks:p.join(", ")}),meta:{failingChecks:p},menu:Ge(ct([{key:"publish-anyway",label:l("thread.headerActions.publishAnyway"),action:"merge",tooltip:l("thread.headerActions.squashMergeTooltip",{prNumber:String(r.number),base:r.base})}],r,l),i,l)};if(o?.draft)return Ns({label:l("thread.headerActions.markReady"),action:"mark-ready",variant:"default",tooltip:l("thread.headerActions.markDraftReadyTooltip"),menu:Ge(ct([],r,l),i,l)},n,l);const b=o?.unresolvedConversations??0;return b>0?Ns({label:l("thread.headerActions.addressFeedback"),action:"resolve-comments",variant:"default",tooltip:l("thread.headerActions.unresolvedConversationsTooltip",{count:String(b)}),menu:Ge(ct([],r,l),i,l)},n,l):o?.missingRequiredApprovals?Ns({label:l("thread.cmsActions.waitingForReview"),action:"open-pr-page",variant:"outline",tooltip:l("thread.headerActions.waitingForApprovalsTooltip"),menu:Ge(ct([],r,l),i,l)},n,l):Ns({label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",meta:{publishPolicyOverride:"open"},menu:Ge(ct([{key:"review",label:l("thread.headerActions.review"),action:"review"}],r,l),i,l)},n,l)}return i.behindBase>0?{label:l("thread.cmsActions.getLatest"),action:"sync",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[]}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:[]}}function ar(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr"}}function Cs(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"get-latest",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function lr(t,e,s,r){const n=e.length;if(n===0)return t;if(e.filter(zn).length>0){const l=e.filter(u=>u.status==="completed").length,i=r("thread.cmsActions.checksRunning",{done:l,total:n});return s==="loading"?{...t,loading:!0,tooltip:i}:{...t,tooltip:i}}const d=e.filter(Na).length;return d>0?{...t,variant:"warning",tooltip:r("thread.cmsActions.checksFailing",{failed:d,total:n})}:t}function gc(t,e){return!!(t?.merged&&t.headSha&&e.kind==="ready"&&!e.workingTreeDirty&&e.headSha===t.headSha)}function xc(t){return Rs(t.prQuery)?!0:t.pr?.state!=="open"||t.pr.merged?!1:Rs(t.checksQuery)||Rs(t.reviewsQuery)}function vc(t,e){return t.workingTreeDirty?!0:e!==null?e>0:t.aheadOfBase>0}function yc(t,e){if(!t)return{branchMeta:{kind:"unknown"},publishableChangeCount:null};const s=Object.keys(t.changes).length;return{branchMeta:{kind:"ready",branch:e,base:t.base.resolvedRef??"main",workingTreeDirty:!1,unpushed:0,aheadOfBase:s,behindBase:0,headSha:t.revision},publishableChangeCount:s}}function jc(t){return{...t,menu:[]}}function wc(t){const{branch:e,pr:s,checks:r,reviews:n,publishing:o,saving:d,loading:l,publishableChangeCount:i,t:u}=t;if(e.kind!=="ready"&&t.statusError)return{label:u("thread.cmsActions.retry"),action:"retry-status",variant:"outline",disabled:t.statusRetrying,loading:t.statusRetrying,tooltip:t.statusError,menu:[]};if(l||e.kind!=="ready")return{label:u("thread.headerActions.loading"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(o)return{label:u("thread.cmsActions.publishing"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(t.syncing)return{label:u("thread.cmsActions.gettingLatest"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(d)return{label:u("thread.headerActions.saving"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(s&&s.state==="open"&&!s.merged?s:null){const h=n?.mergeableState??"unknown";return h==="dirty"?{label:u("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:u("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:u("thread.cmsActions.resolveOnProvider"),action:"open-pr"}]}:h==="blocked"||n?.draft?lr({label:u("thread.cmsActions.waitingForReview"),action:"open-pr",variant:"outline",menu:Cs([ar(u)],e,u)},r,"loading",u):lr({label:u("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Cs([ar(u)],e,u)},r,"none",u)}return gc(s,e)?{label:u("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:Cs([],e,u)}:vc(e,i)?{label:u("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Cs([{key:"request-approval",label:u("thread.headerActions.submitForReview"),action:"request-approval"}],e,u)}:e.behindBase>0?{label:u("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:u("thread.cmsActions.getLatestTooltip"),menu:[],autoRun:e.aheadOfBase===0}:{label:u("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:[]}}function Pc(t){return t.conflicting===!0?"dirty":t.conflicting===null?"unknown":t.reviewBlocked||t.unresolvedConversations>0?"blocked":"clean"}function Ca(t){const e=B.c(4);let s;e[0]!==t?(s=wl(t),e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r={...s,select:Sc},e[2]=s,e[3]=r):r=e[3],dt(r)}function Sc(t){const e=t.changeRequest;return e?{draft:e.draft,mergeableState:Pc(e),unresolvedConversations:e.unresolvedConversations,missingRequiredApprovals:e.reviewBlocked}:null}function ir(t,e){return t==="open-pr"||e==="resolve-on-provider"?a.jsx(Jr,{size:16}):t==="publish"?a.jsx(Mr,{className:"size-4"}):t==="get-latest"||t==="retry-status"?a.jsx(bn,{className:"size-4"}):a.jsx(Ws,{className:"size-4"})}function kc(t){const e=B.c(63),{virtualMcpId:s}=t,r=ge(),{org:n}=gs(),o=br(),d=xs(s),{data:l}=Vs.useSession(),{deleteRelease:i}=Js(s),{currentBranch:u,setCurrentTaskBranch:c,taskId:h,createTask:p}=Nr();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={open:!1,mode:"publish"},e[0]=b):b=e[0];const[f,m]=q.useState(b);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=L=>m({open:!0,mode:L}),e[1]=g):g=e[1];const x=g,P=Kr(d),j=P.status==="attached"||P.status==="public-clone"?P.repo:null,{previewServerUrl:y}=ds(s),S=u?Sr(kr(n.slug,s,u)):null,w=S?kn(S.path,S.params):"/",k=Rl(u?{orgSlug:n.slug,virtualMcpId:s,branch:u,previewServerUrl:y,path:w}:null);let N;e[2]!==u||e[3]!==n.slug||e[4]!==s?(N=u?{orgSlug:n.slug,virtualMcpId:s,branch:u}:null,e[2]=u,e[3]=n.slug,e[4]=s,e[5]=N):N=e[5];const C=Tl(N),v=It(s,u),A=v.kind==="protocol"&&v.source==="github";let T;e[6]!==u||e[7]!==n.slug||e[8]!==s?(T=u?{orgSlug:n.slug,virtualMcpId:s,branch:u}:null,e[6]=u,e[7]=n.slug,e[8]=s,e[9]=T):T=e[9];const I=yn(T),M=Tr(A?v:null,I);let $;e[10]!==n.slug||e[11]!==s?($=el(n.slug,s),e[10]=n.slug,e[11]=s,e[12]=$):$=e[12];const H=tl($,A?C:null),O=A?sl(y,w,H):k.url,G=u??"",E=h??null;let W;e[13]!==n.slug||e[14]!==G||e[15]!==E||e[16]!==s?(W=An({orgSlug:n.slug,virtualMcpId:s,branch:G,threadId:E}),e[13]=n.slug,e[14]=G,e[15]=E,e[16]=s,e[17]=W):W=e[17];const F=!!u&&v.kind!=="pending"&&!A;let V;e[18]!==W||e[19]!==F?(V={...W,enabled:F},e[18]=W,e[19]=F,e[20]=V):V=e[20];const te=dt(V),Y=A?null:te.data??null,re=A?yc(M.data,u??""):null,le=re?re.branchMeta:Y?{kind:"ready",branch:Tn(Y)??u??"",base:Y.base??"main",workingTreeDirty:ai(Y),unpushed:Y.unpushed??0,aheadOfBase:Y.aheadOfBase??0,behindBase:Y.behindBase??0,headSha:Y.headSha??""}:{kind:"unknown"},_=re?re.publishableChangeCount:Y?.changedFiles?ua({files:Y.changedFiles}).count:null,X=A?M:te,D=(le.kind==="ready"?le.branch:null)??u??null,Z=le.kind==="ready"?le.base:"main",se=Vr({orgId:n.id,orgSlug:n.slug,target:Me(j),owner:j?.owner??"",repo:j?.name??"",branch:D}),ie=se.data??null,ue=Gr({orgId:n.id,orgSlug:n.slug,target:Me(j),owner:j?.owner??"",repo:j?.name??"",base:Z}),he=Wr({orgId:n.id,orgSlug:n.slug,target:Me(j),owner:j?.owner??"",repo:j?.name??"",branch:D}),ne=Ca({orgId:n.id,orgSlug:n.slug,target:Me(j),owner:j?.owner??"",repo:j?.name??"",branch:D});let oe;e[21]!==he||e[22]!==ie||e[23]!==se||e[24]!==ne?(oe=xc({pr:ie,prQuery:se,checksQuery:he,reviewsQuery:ne}),e[21]=he,e[22]=ie,e[23]=se,e[24]=ne,e[25]=oe):oe=e[25];const fe=oe;let z;e[26]!==se?(z=async()=>{await se.refetch()},e[26]=se,e[27]=z):z=e[27];const ce=z,Pe=qn({mutationFn:()=>Hi({hosted:A,branch:u,baseBranch:Z,nextBranch:()=>jn(wn(l?.user)),setCurrentTaskBranch:c,deleteRelease:i}),onError:Ac});let Q;e[28]!==n.slug||e[29]!==h||e[30]!==s?(Q=async L=>(await li({orgSlug:n.slug,virtualMcpId:s,branch:L.branch,threadId:h??null},L.base),L),e[28]=n.slug,e[29]=h,e[30]=s,e[31]=Q):Q=e[31];let ee;e[32]!==u||e[33]!==n.slug||e[34]!==o||e[35]!==r||e[36]!==h||e[37]!==s?(ee=async L=>{et.success(r("thread.headerActions.syncedWithBase",{base:L.base})),await Promise.all([o.invalidateQueries({queryKey:Dn({orgSlug:n.slug,virtualMcpId:s,branch:u??L.branch,threadId:h??null})}),o.invalidateQueries({queryKey:os.decofile(`${n.slug}/${s}/${L.branch}`)})])},e[32]=u,e[33]=n.slug,e[34]=o,e[35]=r,e[36]=h,e[37]=s,e[38]=ee):ee=e[38];let ve;e[39]!==Q||e[40]!==ee?(ve={mutationFn:Q,onSuccess:ee,onError:Cc},e[39]=Q,e[40]=ee,e[41]=ve):ve=e[41];const J=qn(ve),me=Dr(n.slug,s),we=Pe.isPending,rt=wc({branch:le,pr:ie,checks:he.data??[],reviews:ne.data??null,publishing:we,saving:me,syncing:J.isPending,statusRetrying:X.isFetching&&!!X.error,statusError:X.error instanceof Error?X.error.message:X.error?String(X.error):null,loading:!!fe,publishableChangeCount:_,t:r}),ye=A?jc(rt):rt,_e=ye.autoRun&&le.kind==="ready"&&j&&y?`${D}@${le.headSha}`:null,Ee=q.useRef(null);if(q.useEffect(()=>{!_e||!D||Ee.current!==_e&&(Ee.current=_e,J.mutate({branch:D,base:Z}))},[_e,D,Z,J]),P.status==="detached"){let L;e[42]!==r?(L=r("thread.headerActions.reconnectGithub"),e[42]=r,e[43]=L):L=e[43];let pe;e[44]!==L?(pe=a.jsx(st,{asChild:!0,children:a.jsx("span",{children:a.jsx(xe,{size:"sm",variant:"outline",disabled:!0,children:L})})}),e[44]=L,e[45]=pe):pe=e[45];let Ae;e[46]!==r?(Ae=r("thread.headerActions.githubConnectionRemoved"),e[46]=r,e[47]=Ae):Ae=e[47];let Be;e[48]!==Ae?(Be=a.jsx(nt,{children:Ae}),e[48]=Ae,e[49]=Be):Be=e[49];let Te;return e[50]!==pe||e[51]!==Be?(Te=a.jsx(Gs,{children:a.jsxs(tt,{children:[pe,Be]})}),e[50]=pe,e[51]=Be,e[52]=Te):Te=e[52],Te}if(!d)return null;if(!j||!y){const L=j?"noPreviewServer":"noRepo";let pe;e[53]!==u||e[54]!==p?(pe=u?()=>{const Be=p?.({runtime:"sandbox",branch:u});Be&&Ua("coding_session_started",{thread_id:Be})}:void 0,e[53]=u,e[54]=p,e[55]=pe):pe=e[55];let Ae;return e[56]!==L||e[57]!==pe?(Ae=a.jsx(Rc,{reason:L,onStartCodingSession:pe}),e[56]=L,e[57]=pe,e[58]=Ae):Ae=e[58],Ae}if(!u)return null;const Ne=L=>{switch(L){case"publish":{x("publish");return}case"request-approval":{x("review");return}case"get-latest":{if(!D||J.isPending)return;J.mutate({branch:D,base:Z});return}case"retry-status":{X.refetch();return}case"open-pr":{ie?.htmlUrl&&window.open(ie.htmlUrl,"_blank","noopener,noreferrer");return}}};let De;e[59]!==Ne?(De=L=>({key:L.key,label:L.label,icon:ir(L.action,L.key),...L.tooltip?{tooltip:L.tooltip}:{},onSelect:()=>Ne(L.action)}),e[59]=Ne,e[60]=De):De=e[60];const Le=ye.menu.map(De),Ce=ye.action,ut=ye.label,Oe=ye.variant,Qe=!!ye.loading;let ze;e[61]!==r?(ze=r("thread.cmsActions.moreActionsAriaLabel"),e[61]=r,e[62]=ze):ze=e[62];const Ue=a.jsx(na,{size:"sm",label:ut,variant:Oe,disabled:!!ye.disabled||!Ce,loading:Qe,...Ce&&!ye.loading?{icon:ir(Ce)}:{},...ye.tooltip?{tooltip:ye.tooltip}:{},items:Le,menuAriaLabel:ze,onClick:Ce?()=>Ne(Ce):void 0});return a.jsxs(a.Fragment,{children:[ye.status?a.jsx("span",{className:"mr-1 hidden shrink-0 text-xs text-muted-foreground sm:inline",children:ye.status}):null,Ue,u?a.jsx(Pa,{open:f.open,mode:f.mode,fastPreview:!0,onOpenChange:L=>{L||m(Nc)},orgSlug:n.slug,virtualMcpId:s,branch:u,baseBranch:Z,repoTarget:Me(j),owner:j.owner,repo:j.name,publishPolicy:ea(d?.metadata?.publishPolicy),draftPreviewUrl:O,destinationHost:k.host,previewServerUrl:y,compareDraft:C?{kind:"pointer",pointer:C,...H?{link:H}:{}}:null,lastPublishedPr:ue.data??null,onRequestApproval:()=>x("review"),openPullRequest:ie?.state==="open"?ie:null,onPullRequestChanged:ce,onPublished:()=>Pe.mutateAsync()}):null]})}function Nc(t){return{...t,open:!1}}function Cc(t){et.error(t instanceof Error?t.message:String(t))}function Ac(t){console.error("site editor: settling after publish failed",t)}function Rc(t){const e=B.c(14),{reason:s,onStartCodingSession:r}=t,n=ge(),o=!r;let d;e[0]!==n?(d=n("sandbox.cmsUnavailable.startCodingSession"),e[0]=n,e[1]=d):d=e[1];let l;e[2]!==r||e[3]!==o||e[4]!==d?(l=a.jsx(st,{asChild:!0,children:a.jsx("span",{children:a.jsx(xe,{size:"sm",variant:"outline",disabled:o,onClick:r,children:d})})}),e[2]=r,e[3]=o,e[4]=d,e[5]=l):l=e[5];let i;e[6]!==s||e[7]!==n?(i=n(s==="noPreviewServer"?"sandbox.cmsUnavailable.noPreviewServer":"sandbox.cmsUnavailable.noRepo"),e[6]=s,e[7]=n,e[8]=i):i=e[8];let u;e[9]!==i?(u=a.jsx(nt,{children:i}),e[9]=i,e[10]=u):u=e[10];let c;return e[11]!==l||e[12]!==u?(c=a.jsx(Gs,{children:a.jsxs(tt,{children:[l,u]})}),e[11]=l,e[12]=u,e[13]=c):c=e[13],c}const $t="The user clicked this action deliberately — execute directly. Do not call user_ask unless you hit an actual problem outside the scope of this intent (missing auth, unresolvable conflict, a check with multiple plausible fixes).";function Tc(t){return`Reopen PR #${t.prNumber}. ${$t}`}function Dc(t){return`Rebase \`${t.branch}\` on the latest base and force-push with --force-with-lease. ${$t}`}function Bc(t){return`Sync \`${t.branch}\` with everyone else's work: \`git add -A\`, commit any pending local changes with a concise conventional-commit message (skip if the working tree is clean), \`git pull --rebase\` to bring in anything pushed directly to \`origin/${t.branch}\`, then \`git rebase origin/${t.base}\` to catch up with the base branch. Resolve any conflicts that come up, then push the result (force-with-lease only if the rebase rewrote commits already on the remote). ${$t}`}function Ic(t){const e=(t.failingChecks??[]).map(s=>`\`${s}\``).join(", ");return`PR #${t.prNumber} has failing checks: ${e}. For each: read the logs, diagnose the root cause, apply the smallest fix that makes it pass, commit, and push. ${$t}`}function $c(t){return`Mark PR #${t.prNumber} ready for review. ${$t}`}function Fc(t){return`Read the unresolved review threads on PR #${t.prNumber}. For each thread: understand the reviewer's ask, apply the needed changes, commit, push, reply explaining what changed, and resolve the thread. If a comment is a question that doesn't need a code change, reply with the answer and resolve. ${$t}`}function Lc(t){return`Review PR #${t.prNumber}. Read the full diff, analyze every changed file for correctness, security, code quality, and alignment with the repo's patterns. Post specific line-level review comments on concerns, then submit an overall review (approve / request changes / comment) with a concise summary. Do not modify the code — this is a read-and-comment pass. ${$t}`}function or(t){switch(t){case"publish":return a.jsx(Mr,{className:"size-4"});case"create-pr":case"reopen":return a.jsx(Ws,{className:"size-4"});case"rebase":case"sync":return a.jsx(bn,{className:"size-4"});case"fix-checks":return a.jsx(pn,{className:"size-4"});case"mark-ready":return a.jsx(Nn,{className:"size-4"});case"resolve-comments":return a.jsx(pl,{className:"size-4"});case"merge":return a.jsx(Jl,{className:"size-4"});case"review":return a.jsx(Ms,{className:"size-4"});case"open-pr-page":return a.jsx(Jr,{size:16})}}const cr=new Set(["reopen","rebase","fix-checks","mark-ready","resolve-comments","review","sync"]),dr=new Set(["publish","create-pr"]);function Oc(t){const e=B.c(44),{t:s,button:r,actionBusy:n,changeRequestPending:o,savePending:d,onAction:l}=t,i=r.action;let u;e[0]!==i||e[1]!==n?(u=n&&i!==void 0&&cr.has(i),e[0]=i,e[1]=n,e[2]=u):u=e[2];const c=u,h=o&&i==="merge";let p;e[3]!==i||e[4]!==d?(p=d&&i!==void 0&&dr.has(i),e[3]=i,e[4]=d,e[5]=p):p=e[5];const b=p,f=!!r.disabled||c||h||b||!i,m=!!r.loading||h;let g;e[6]!==r.tooltip||e[7]!==c||e[8]!==b||e[9]!==s?(g=c?s("thread.headerActions.chatIsRunning"):b?s("thread.headerActions.saving"):r.tooltip,e[6]=r.tooltip,e[7]=c,e[8]=b,e[9]=s,e[10]=g):g=e[10];const x=g;let P;if(e[11]!==n||e[12]!==r.menu||e[13]!==o||e[14]!==l||e[15]!==d||e[16]!==s){let A;e[18]!==n||e[19]!==o||e[20]!==l||e[21]!==d||e[22]!==s?(A=T=>{const I=n&&cr.has(T.action),M=d&&dr.has(T.action),$=T.action==="merge"&&o,H=M?s("thread.headerActions.saving"):I?s("thread.headerActions.chatIsRunning"):T.tooltip;return{key:T.key,label:T.label,icon:or(T.action),disabled:!!(I||M||$),...H?{tooltip:H}:{},onSelect:()=>l(T.action)}},e[18]=n,e[19]=o,e[20]=l,e[21]=d,e[22]=s,e[23]=A):A=e[23],P=r.menu.map(A),e[11]=n,e[12]=r.menu,e[13]=o,e[14]=l,e[15]=d,e[16]=s,e[17]=P}else P=e[17];const j=P,y=r.label,S=r.variant;let w;e[24]!==i||e[25]!==m?(w=i&&!m?{icon:or(i)}:{},e[24]=i,e[25]=m,e[26]=w):w=e[26];let k;e[27]!==x?(k=x?{tooltip:x}:{},e[27]=x,e[28]=k):k=e[28];let N;e[29]!==s?(N=s("thread.headerActions.moreActionsAriaLabel"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==i||e[32]!==l?(C=i?()=>l(i):void 0,e[31]=i,e[32]=l,e[33]=C):C=e[33];let v;return e[34]!==r.label||e[35]!==r.variant||e[36]!==f||e[37]!==j||e[38]!==m||e[39]!==w||e[40]!==k||e[41]!==N||e[42]!==C?(v=a.jsx(na,{size:"sm",label:y,variant:S,disabled:f,loading:m,...w,...k,items:j,menuAriaLabel:N,onClick:C}),e[34]=r.label,e[35]=r.variant,e[36]=f,e[37]=j,e[38]=m,e[39]=w,e[40]=k,e[41]=N,e[42]=C,e[43]=v):v=e[43],v}function ur(t){const e=B.c(9),{label:s,children:r}=t;if(!s){let l;return e[0]!==r?(l=a.jsx(a.Fragment,{children:r}),e[0]=r,e[1]=l):l=e[1],l}let n;e[2]!==r?(n=a.jsx(st,{asChild:!0,children:a.jsx("span",{children:r})}),e[2]=r,e[3]=n):n=e[3];let o;e[4]!==s?(o=a.jsx(nt,{children:s}),e[4]=s,e[5]=o):o=e[5];let d;return e[6]!==n||e[7]!==o?(d=a.jsx(Gs,{children:a.jsxs(tt,{children:[n,o]})}),e[6]=n,e[7]=o,e[8]=d):d=e[8],d}function Mc(t){return{label:t("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:t("thread.headerActions.waitingForSandboxBranchTooltip"),menu:[]}}function _c({virtualMcpId:t}){const e=ge(),{org:s}=gs(),{data:r}=Vs.useSession(),n=xs(t),{deleteRelease:o}=Js(t),{currentBranch:d,setCurrentTaskBranch:l,createTask:i,taskId:u}=Nr(),c=Va(),{openSidePanel:h}=al(),[p,b]=q.useState({open:!1,mode:"publish",policyOverride:null}),f=hi({connectionId:qa,orgId:s.id,orgSlug:s.slug}),m=mi(f),[g,x]=q.useState(!1),P=q.useRef(""),j=Kr(n),y=j.status==="attached"||j.status==="public-clone"?j.repo:null,{lifecycle:S,branch:w,phase:k}=fi(),N={orgSlug:s.slug,virtualMcpId:t,branch:d??"",threadId:u??null},v=dt({queryKey:Dn(N),queryFn:()=>Zr(N),enabled:!!d,staleTime:15e3,refetchInterval:Q=>tn(Q.state.data)?5e3:!1}).data??null,A=w,T=S,I=A.kind==="ready"?A.branch:null,M=d??I??void 0,$=(A.kind==="ready"?A.branch:null)??M??null,H=Vr({orgId:s.id,orgSlug:s.slug,target:Me(y),owner:y?.owner??"",repo:y?.name??"",branch:$}),O=H.data??null,G=Wr({orgId:s.id,orgSlug:s.slug,target:Me(y),owner:y?.owner??"",repo:y?.name??"",branch:$}),E=Ca({orgId:s.id,orgSlug:s.slug,target:Me(y),owner:y?.owner??"",repo:y?.name??"",branch:$}),W=Gr({orgId:s.id,orgSlug:s.slug,target:Me(y),owner:y?.owner??"",repo:y?.name??"",base:A.kind==="ready"?A.base:null}),F=A,V=ea(n?.metadata?.publishPolicy),te=Dr(s.slug,t),{previewUrl:Y}=pi(),{previewServerUrl:re,projectDefault:le}=ds(t);if(j.status==="detached")return a.jsx(ur,{label:e("thread.headerActions.githubConnectionRemoved"),children:a.jsx(xe,{size:"sm",variant:"outline",disabled:!0,children:e("thread.headerActions.reconnectGithub")})});if(!y)return null;const _=$?bc({lifecycle:T,branch:F,claimPhase:k,pr:O,checks:G.data??[],reviews:E.data??null,noReviewableDiff:tn(v),loading:Rs(H),t:e}):Mc(e),X=JSON.stringify({label:_.label,branchKind:F.kind,workingTreeDirty:F.kind==="ready"?F.workingTreeDirty:null,unpushed:F.kind==="ready"?F.unpushed:null,aheadOfBase:F.kind==="ready"?F.aheadOfBase:null,lifecycle:T.phase,headBranch:$,noReviewableDiff:tn(v)});P.current!==X&&(P.current=X,sa("header button",{label:_.label,tooltip:_.tooltip,action:_.action,chatBranch:d,sandboxBranch:I,sandboxRouteBranch:M,headBranch:$,branchMeta:A,effectiveBranchMeta:F,lifecyclePhase:T.phase,prNumber:O?.number??null,prState:O?.state??null}));const D=Q=>(h(),c.sendMessage({parts:[{type:"text",text:Q}]})),Z=c.isStreaming,se=F.kind==="ready"?F.base:"main",ie=async()=>{await H.refetch()},ue=async()=>{const Q=d,ee=jn(wn(r?.user));le==="cms"?i({runtime:"cms",branch:ee}):await l(ee),Q&&Q!==se&&await o(Q)},he=async Q=>{if(!(!y||g)){x(!0);try{const ee=ra(r?.user);await Kl(s.slug,Me(y),{number:Q,coAuthor:ee}),et.success(e("thread.headerActions.publishedPr",{prNumber:String(Q)})),await ie(),await ue()}catch(ee){et.error(ee instanceof Vl?ee.detail??Gl(ee.reason,e):ee instanceof Error?ee.message:e("thread.headerActions.failedToMergePullRequest"))}finally{x(!1)}}},ne=(Q,ee)=>b({open:!0,mode:Q,policyOverride:ee}),oe=Q=>{if($)switch(Q){case"publish":ne("publish",_.meta?.publishPolicyOverride??null);return;case"create-pr":ne("review",null);return;case"merge":O&&he(O.number);return;case"sync":if(Z)return;D(Bc({branch:$,base:se}));return;case"open-pr-page":O?.htmlUrl&&window.open(O.htmlUrl,"_blank","noopener,noreferrer");return;case"review":if(Z)return;O&&D(Lc({prNumber:O.number}));return;case"reopen":if(Z)return;O&&D(Tc({prNumber:O.number}));return;case"rebase":if(Z)return;D(Dc({branch:$}));return;case"fix-checks":if(Z)return;O&&D(Ic({prNumber:O.number,failingChecks:_.meta?.failingChecks??[]}));return;case"mark-ready":if(Z)return;O&&D($c({prNumber:O.number}));return;case"resolve-comments":if(Z)return;O&&D(Fc({prNumber:O.number}));return}},fe=g||Z,z=a.jsx(Oc,{t:e,button:_,actionBusy:fe,changeRequestPending:g,savePending:te,onAction:oe}),ce=F.kind==="ready"&&F.pushError&&F.pushFailingSince?e("thread.headerActions.pushFailing",{since:new Date(F.pushFailingSince).toLocaleString(),error:F.pushError}):null,Pe=ce?a.jsx(ur,{label:ce,children:a.jsx(pn,{role:"img","aria-label":ce,className:"size-4 text-warning"})}):null;return M?a.jsxs(a.Fragment,{children:[Pe,z,a.jsx(Pa,{open:p.open,mode:p.mode,fastPreview:!1,recoverSandbox:()=>m.mutateAsync({virtualMcpId:t,branch:M,...u?{threadId:u}:{}}),onOpenChange:Q=>{Q||b(ee=>({...ee,open:!1}))},orgSlug:s.slug,virtualMcpId:t,branch:M,baseBranch:se,repoTarget:Me(y),owner:y.owner,repo:y.name,publishPolicy:p.policyOverride??V,draftPreviewUrl:Y,destinationHost:null,previewServerUrl:re,compareDraft:Y?{kind:"sandbox",previewUrl:Y}:null,lastPublishedPr:W.data??null,onRequestApproval:()=>b(Q=>({...Q,open:!0,mode:"review"})),openPullRequest:O?.state==="open"?O:null,onPullRequestChanged:ie,onPublished:ue})]}):a.jsxs(a.Fragment,{children:[Pe,z]})}function Ec(t){const e=B.c(33),{orgSlug:s,virtualMcpId:r,branch:n}=t,o=ge(),[d,l]=q.useState(!1),i=It(r,n),u=i.kind==="protocol"&&i.source==="local"?i:null;let c;e[0]!==n||e[1]!==s||e[2]!==r?(c=n?{orgSlug:s,virtualMcpId:r,branch:n}:null,e[0]=n,e[1]=s,e[2]=r,e[3]=c):c=e[3];const h=yn(c),{data:p}=Tr(u,h);if(!u||!h||!n)return null;let b;e[4]!==p?(b=p?Object.keys(p.changes).length:0,e[4]=p,e[5]=b):b=e[5];const f=b;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>l(!0),e[6]=m):m=e[6];let g;e[7]!==f||e[8]!==o?(g=f>0?o("decoServe.changes.buttonCount",{count:f}):o("decoServe.changes.button"),e[7]=f,e[8]=o,e[9]=g):g=e[9];let x;e[10]!==g?(x=a.jsx(xe,{size:"sm",variant:"outline","data-testid":"local-changes-button",onClick:m,children:g}),e[10]=g,e[11]=x):x=e[11];let P;e[12]!==o?(P=o("decoServe.changes.title"),e[12]=o,e[13]=P):P=e[13];let j;e[14]!==P?(j=a.jsx(vr,{className:"sr-only",children:P}),e[14]=P,e[15]=j):j=e[15];let y;e[16]!==n||e[17]!==h||e[18]!==u||e[19]!==d||e[20]!==s||e[21]!==o||e[22]!==r?(y=d?a.jsx(jr,{children:N=>{const{reset:C}=N;return a.jsx(wr,{fallback:v=>{const{resetError:A}=v;return a.jsx(hn,{title:o("decoServe.changes.title"),body:a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:o("decoServe.changes.loadFailed")}),onClose:()=>{C(),A(),l(!1)}})},children:a.jsx(q.Suspense,{fallback:a.jsx(vs,{pane:a.jsx(On,{}),list:a.jsx(hn,{title:o("decoServe.changes.title"),loading:!0,body:a.jsx(bs,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Bt,{}),a.jsx(Bt,{})]})}),onClose:()=>l(!1)})}),children:a.jsx(zc,{orgSlug:s,virtualMcpId:r,branch:n,backend:u,cacheKey:h,onClose:()=>l(!1)})})})}}):null,e[16]=n,e[17]=h,e[18]=u,e[19]=d,e[20]=s,e[21]=o,e[22]=r,e[23]=y):y=e[23];let S;e[24]!==j||e[25]!==y?(S=a.jsxs(yr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[j,y]}),e[24]=j,e[25]=y,e[26]=S):S=e[26];let w;e[27]!==d||e[28]!==S?(w=a.jsx(xr,{open:d,onOpenChange:l,children:S}),e[27]=d,e[28]=S,e[29]=w):w=e[29];let k;return e[30]!==w||e[31]!==x?(k=a.jsxs(a.Fragment,{children:[x,w]}),e[30]=w,e[31]=x,e[32]=k):k=e[32],k}function hn(t){const e=B.c(22),{title:s,trailing:r,body:n,loading:o,onClose:d}=t,l=o===void 0?!1:o,i=ge(),u=l?"loading":"ready";let c;e[0]!==s?(c=a.jsx("span",{className:"truncate",children:s}),e[0]=s,e[1]=c):c=e[1];let h;e[2]!==c||e[3]!==r?(h=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[c,r]}),e[2]=c,e[3]=r,e[4]=h):h=e[4];let p;e[5]!==i?(p=i("decoServe.changes.hint"),e[5]=i,e[6]=p):p=e[6];let b;e[7]!==p?(b=a.jsx("p",{className:"text-2xs text-muted-foreground",children:a.jsx(ta,{text:p})}),e[7]=p,e[8]=b):b=e[8];let f;e[9]!==i?(f=i("decoServe.changes.close"),e[9]=i,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==f?(m=a.jsx(xe,{type:"button",variant:"outline",className:"w-full",onClick:d,children:f}),e[11]=d,e[12]=f,e[13]=m):m=e[13];let g;e[14]!==b||e[15]!==m?(g=a.jsxs(a.Fragment,{children:[b,m]}),e[14]=b,e[15]=m,e[16]=g):g=e[16];let x;return e[17]!==n||e[18]!==u||e[19]!==h||e[20]!==g?(x=a.jsx(Ys,{state:u,header:h,body:n,footer:g}),e[17]=n,e[18]=u,e[19]=h,e[20]=g,e[21]=x):x=e[21],x}function zc(t){const e=B.c(54),{orgSlug:s,virtualMcpId:r,branch:n,backend:o,cacheKey:d,onClose:l}=t,i=ge();let u;e[0]!==n||e[1]!==s||e[2]!==r?(u={orgSlug:s,virtualMcpId:r,branch:n},e[0]=n,e[1]=s,e[2]=r,e[3]=u):u=e[3];let c;e[4]!==o||e[5]!==d||e[6]!==u?(c={backend:o,cacheKey:d,scope:u},e[4]=o,e[5]=d,e[6]=u,e[7]=c):c=e[7];const h=Ln(c);let p;e[8]!==n||e[9]!==s||e[10]!==h.refresh||e[11]!==r?(p={orgSlug:s,virtualMcpId:r,branch:n,refresh:h.refresh},e[8]=n,e[9]=s,e[10]=h.refresh,e[11]=r,e[12]=p):p=e[12];const b=Wl(p),f=Rr(s,r).phase==="saving",m=o.describe.readOnly,[g,x]=q.useState(null),[P,j]=q.useState(null),[y,S]=q.useState(!1),{summary:w}=h;let k,N,C,v,A;if(e[13]!==g||e[14]!==o||e[15]!==P||e[16]!==b||e[17]!==y||e[18]!==f||e[19]!==m||e[20]!==h.blocks||e[21]!==h.entries||e[22]!==h.sidesFailed||e[23]!==h.sidesPending||e[24]!==w.blocks||e[25]!==w.count||e[26]!==w.pages||e[27]!==i){const M=[...w.pages,...w.blocks],$=M.find(E=>ke(E)===g)??M[0]??null;let H;e[33]!==w.count||e[34]!==i?(H=w.count===0?i("decoServe.changes.title"):w.count===1?i("decoServe.changes.titleOne"):i("decoServe.changes.titleCount",{count:w.count}),e[33]=w.count,e[34]=i,e[35]=H):H=e[35],A=H;const O=(E,W)=>W.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:E}),W.map(F=>{const V=ke(F);return a.jsx(ma,{change:F,bodyPending:h.sidesPending,v8:!0,selected:$!==null&&ke($)===V,onSelect:()=>x(V),confirming:P===V,onConfirmingChange:te=>j(te?V:null),onDiscard:m||!F.entry?void 0:()=>{b(o,[F.entry],i("thread.publishPopover.discarded",{name:F.name}))},isPublishing:!1,isDiscarding:f},V)})]});let G;e[36]!==o||e[37]!==b||e[38]!==y||e[39]!==f||e[40]!==m||e[41]!==h.entries||e[42]!==w.count||e[43]!==i?(G=m||w.count<=1?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>S(!0),disabled:f,children:i("thread.publishPopover.discardAll")}),a.jsx(Os,{open:y,onOpenChange:S,children:a.jsxs(Ls,{children:[a.jsxs(Bs,{children:[a.jsx(Ts,{children:i("thread.publishPopover.discardAllTitle")}),a.jsx(Ds,{children:i("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(Fs,{children:[a.jsx(Is,{children:i("thread.publishDialog.cancel")}),a.jsx($s,{onClick:()=>{b(o,h.entries,i("thread.publishDialog.allChangesDiscarded"))},disabled:f,className:K(Pr({variant:"destructive"})),children:i("thread.publishPopover.discardAll")})]})]})})]}),e[36]=o,e[37]=b,e[38]=y,e[39]=f,e[40]=m,e[41]=h.entries,e[42]=w.count,e[43]=i,e[44]=G):G=e[44],C=G,N=w.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(Nn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:i("decoServe.changes.empty")})]}):a.jsxs(bs,{children:[O(i("thread.publishPopover.pagesGroup"),w.pages),O(i("thread.publishPopover.blocksGroup"),w.blocks),h.sidesFailed?a.jsx("p",{className:"text-2xs text-muted-foreground",children:i("thread.publishPopover.detailsUnavailable")}):null]}),k=vs,v=$?a.jsx("div",{className:K(is,"relative flex"),children:a.jsx(ya,{change:$,diff:null,bodyPending:h.sidesPending,previewServerUrl:null,draft:null,lastPage:null,v8:{blocks:h.blocks}},ke($))}):a.jsx("div",{className:K(is,"bg-muted/40")}),e[13]=g,e[14]=o,e[15]=P,e[16]=b,e[17]=y,e[18]=f,e[19]=m,e[20]=h.blocks,e[21]=h.entries,e[22]=h.sidesFailed,e[23]=h.sidesPending,e[24]=w.blocks,e[25]=w.count,e[26]=w.pages,e[27]=i,e[28]=k,e[29]=N,e[30]=C,e[31]=v,e[32]=A}else k=e[28],N=e[29],C=e[30],v=e[31],A=e[32];let T;e[45]!==N||e[46]!==C||e[47]!==l||e[48]!==A?(T=a.jsx(hn,{title:A,trailing:C,body:N,onClose:l}),e[45]=N,e[46]=C,e[47]=l,e[48]=A,e[49]=T):T=e[49];let I;return e[50]!==k||e[51]!==v||e[52]!==T?(I=a.jsx(k,{pane:v,list:T}),e[50]=k,e[51]=v,e[52]=T,e[53]=I):I=e[53],I}function Uc(t){const e=B.c(5),{virtualMcpId:s,branch:r}=t,n=ge(),o=It(s,r);if(!qc(o))return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(st,{asChild:!0,children:a.jsx("span",{"data-testid":"content-version-badge",className:"shrink-0 rounded border border-border px-1.5 py-px font-mono text-2xs leading-4 text-muted-foreground",children:"v8"})}),e[0]=d):d=e[0];let l;e[1]!==n?(l=n("decoServe.version.v8"),e[1]=n,e[2]=l):l=e[2];let i;return e[3]!==l?(i=a.jsxs(tt,{children:[d,a.jsx(nt,{side:"bottom",className:"max-w-xs",children:l})]}),e[3]=l,e[4]=i):i=e[4],i}function qc(t){return t.kind==="protocol"?t.hasSchema!==!1:t.kind==="unavailable"&&t.source!=="local"}function Hc(t){const e=B.c(11),{virtualMcpId:s,branch:r}=t,n=ge(),o=It(s,r);if(!(o.kind==="protocol"&&o.source==="local"&&o.describe.readOnly))return null;let l;e[0]!==n?(l=n("decoServe.readOnly.label"),e[0]=n,e[1]=l):l=e[1];let i;e[2]!==l?(i=a.jsx(st,{asChild:!0,children:a.jsx("span",{tabIndex:0,"data-testid":"deco-serve-read-only",className:"shrink-0 rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-foreground",children:l})}),e[2]=l,e[3]=i):i=e[3];let u;e[4]!==n?(u=n("decoServe.readOnly.tooltip"),e[4]=n,e[5]=u):u=e[5];let c;e[6]!==u?(c=a.jsx(nt,{side:"bottom",className:"max-w-xs",children:a.jsx(ta,{text:u})}),e[6]=u,e[7]=c):c=e[7];let h;return e[8]!==i||e[9]!==c?(h=a.jsxs(tt,{children:[i,c]}),e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function Kc(t){return t.servingLocally||t.localPreview?"open":t.runtimeResolved?t.runtime!=="cms"?"open":t.branch?t.blocksV8?"open":t.defaultBranch?t.defaultBranch===t.branch?"blocked":"open":t.listedDraft||t.defaultBranch===null?"open":"pending":"pending":"pending"}function Vc(){const t=B.c(27),e=cs(),{org:s}=gs(),r=xs(e?.virtualMcpId),n=r?.id??e?.virtualMcpId??"",o=e?.currentBranch??null,{runtime:d,resolved:l}=ds(r?.id),i=Pn(r?.id),{url:u}=gn(r?.id),{connection:c}=xn(n||null),h=!!r&&!!o&&l&&d==="cms"&&!i&&!u,p=o??"",b=e?.taskId??null;let f,m,g,x;t[0]!==s.slug||t[1]!==p||t[2]!==b||t[3]!==n?(m={orgSlug:s.slug,virtualMcpId:n,branch:p,threadId:b},f=Gc,x=dt,g=An(m),t[0]=s.slug,t[1]=p,t[2]=b,t[3]=n,t[4]=f,t[5]=m,t[6]=g,t[7]=x):(f=t[4],m=t[5],g=t[6],x=t[7]);let P;t[8]!==f||t[9]!==m?(P=(T,I)=>f(I?.queryKey)===f(Dn(m))?T:void 0,t[8]=f,t[9]=m,t[10]=P):P=t[10];let j;t[11]!==h||t[12]!==g||t[13]!==P?(j={...g,enabled:h,placeholderData:P},t[11]=h,t[12]=g,t[13]=P,t[14]=j):j=t[14];const y=x(j),S=!!u,w=!!c;let k;if(t[15]!==i||t[16]!==o||t[17]!==r?.metadata?.releases||t[18]!==l||t[19]!==d||t[20]!==y.data||t[21]!==y.isError||t[22]!==S||t[23]!==w){let T;t[25]!==o?(T=I=>I.branch===o,t[25]=o,t[26]=T):T=t[26],k=Kc({runtime:d,runtimeResolved:l,blocksV8:i,localPreview:S,servingLocally:w,branch:o,listedDraft:(r?.metadata?.releases??[]).some(T),defaultBranch:y.data?y.data.base??null:y.isError?null:void 0}),t[15]=i,t[16]=o,t[17]=r?.metadata?.releases,t[18]=l,t[19]=d,t[20]=y.data,t[21]=y.isError,t[22]=S,t[23]=w,t[24]=k}else k=t[24];const N=k,C=`${n}:${o??""}`,[v,A]=q.useState(null);return N!=="pending"&&(v?.key!==C||v.gate!==N)&&A({key:C,gate:N}),N==="pending"&&v?.key===C?v.gate:N}function Gc(t){return t?.[2]}function Wc(t){const e=!t.hasEntity&&!t.servingLocally,s=t.hasEntity&&!t.localPreview&&!t.servingLocally&&!t.onProduction&&t.showsRepositoryActions;return{hidden:e,localFiles:!e&&t.servingLocally,draftSelect:!e&&t.hasEntity,publish:e||!s?null:t.runtime==="cms"?"cms":"code"}}function zd(t){const e=B.c(2),{blocksOnly:s}=t;let r;return e[0]!==s?(r=s?a.jsx(Qc,{}):a.jsx(Aa,{}),e[0]=s,e[1]=r):r=e[1],r}function Qc(){return Pn(gi())?a.jsx(xa,{value:!1,children:a.jsx(Aa,{})}):null}function Aa(){const t=B.c(32),e=cs(),{org:s}=gs(),r=xs(e?.virtualMcpId),n=e?.currentBranch??null,o=ds(r?.id).runtime,{url:d}=gn(r?.id),{connection:l}=xn(r?.id??e?.virtualMcpId),i=r?.id??e?.virtualMcpId,u=Vc()!=="open",c=!!r,h=!!l,p=!!d;let b;t[0]!==r||t[1]!==u||t[2]!==o||t[3]!==c||t[4]!==h||t[5]!==p?(b=Wc({hasEntity:c,servingLocally:h,localPreview:p,showsRepositoryActions:!!r&&bi(r),runtime:o,onProduction:u}),t[0]=r,t[1]=u,t[2]=o,t[3]=c,t[4]=h,t[5]=p,t[6]=b):b=t[6];const f=b;if(!i||f.hidden)return null;let m;t[7]!==n||t[8]!==i?(m=a.jsx(Uc,{virtualMcpId:i,branch:n}),t[7]=n,t[8]=i,t[9]=m):m=t[9];let g;t[10]!==n||t[11]!==f.localFiles||t[12]!==i?(g=f.localFiles&&a.jsx(Hc,{virtualMcpId:i,branch:n}),t[10]=n,t[11]=f.localFiles,t[12]=i,t[13]=g):g=t[13];let x;t[14]!==n||t[15]!==s||t[16]!==f.localFiles||t[17]!==i?(x=f.localFiles&&a.jsx(Ec,{orgSlug:s.slug,virtualMcpId:i,branch:n}),t[14]=n,t[15]=s,t[16]=f.localFiles,t[17]=i,t[18]=x):x=t[18];let P;t[19]!==n||t[20]!==r||t[21]!==f.draftSelect?(P=r&&f.draftSelect&&a.jsx("div",{className:"flex min-w-0 shrink items-center justify-end",children:a.jsx(_i,{virtualMcp:r,currentBranch:n})}),t[19]=n,t[20]=r,t[21]=f.draftSelect,t[22]=P):P=t[22];let j;t[23]!==r||t[24]!==f.publish?(j=r&&f.publish&&a.jsxs(a.Fragment,{children:[a.jsx(Ha,{orientation:"vertical",className:"mx-1 data-[orientation=vertical]:h-4"}),a.jsx("div",{className:"flex shrink-0 items-center justify-end gap-1",children:f.publish==="cms"?a.jsx(kc,{virtualMcpId:r.id}):a.jsx(_c,{virtualMcpId:r.id})})]}),t[23]=r,t[24]=f.publish,t[25]=j):j=t[25];let y;return t[26]!==m||t[27]!==g||t[28]!==x||t[29]!==P||t[30]!==j?(y=a.jsxs(a.Fragment,{children:[m,g,x,P,j]}),t[26]=m,t[27]=g,t[28]=x,t[29]=P,t[30]=j,t[31]=y):y=t[31],y}export{zd as S,Vc as a,Di as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,j as r,n as v,b as M,a4 as P,bi as R}from"./index-
|
|
1
|
+
import{c as I,j as r,n as v,b as M,a4 as P,bi as R}from"./index-Dd5hidCj.js";import{E as T}from"./empty-state-Ccl8OC-j.js";import{u as w}from"./chat-context-DgCR75CY.js";import{u as B,k as L,t as _}from"./site-editor-toast-DL4aC3pF.js";import{i as $,u as A,j as Q,S as U}from"./blocks-tab-states-DASlUdvo.js";import{a as G}from"./autosend-CGJPJD3U.js";function H(C){const e=I.c(7),{icon:l,title:i,description:t,action:n}=C;let a;e[0]!==n?(a=n?{children:n.label,onClick:n.onClick,disabled:n.disabled}:void 0,e[0]=n,e[1]=a):a=e[1];let o;return e[2]!==t||e[3]!==l||e[4]!==a||e[5]!==i?(o=r.jsx(v,{children:r.jsx(v.Content,{children:r.jsx(v.Container,{children:r.jsx(T,{icon:l,title:i,description:t,buttonProps:a})})})}),e[2]=t,e[3]=l,e[4]=a,e[5]=i,e[6]=o):o=e[6],o}function Y(C){const e=I.c(33),{virtualMcpId:l,icon:i,copy:t,skeleton:n,children:a}=C,o=M(),{org:p}=P(),k=w(),u=k?.currentBranch??null,g=B(l,u);R(g.kind==="protocol"&&g.source==="github");const{openPanel:D}=G();if(!u){const s=t.noDraftTitle,F=t.noDraftDesc;let d;e[0]!==o?(d=o("sectionsEditor.namedRules.openEditor"),e[0]=o,e[1]=d):d=e[1];let f;e[2]!==D?(f=()=>D("content"),e[2]=D,e[3]=f):f=e[3];let m;e[4]!==d||e[5]!==f?(m={label:d,onClick:f},e[4]=d,e[5]=f,e[6]=m):m=e[6];let j;return e[7]!==t.noDraftDesc||e[8]!==t.noDraftTitle||e[9]!==i||e[10]!==m?(j=r.jsx(H,{icon:i,title:s,description:F,action:m}),e[7]=t.noDraftDesc,e[8]=t.noDraftTitle,e[9]=i,e[10]=m,e[11]=j):j=e[11],j}if($(g)){let s;return e[12]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(U,{}),e[12]=s):s=e[12],s}if(g.kind==="pending"){let s;return e[13]!==n?(s=r.jsx(r.Fragment,{children:n}),e[13]=n,e[14]=s):s=e[14],s}if(g.kind!=="protocol"){let s;return e[15]!==t.loadFailed||e[16]!==t.loadFailedHint||e[17]!==i?(s=r.jsx(H,{icon:i,title:t.loadFailed,description:t.loadFailedHint}),e[15]=t.loadFailed,e[16]=t.loadFailedHint,e[17]=i,e[18]=s):s=e[18],s}let c;e[19]!==u||e[20]!==p.slug||e[21]!==l?(c=JSON.stringify([p.slug,l,u]),e[19]=u,e[20]=p.slug,e[21]=l,e[22]=c):c=e[22];const h=k?.taskId??null;let x;return e[23]!==u||e[24]!==a||e[25]!==t||e[26]!==i||e[27]!==p.slug||e[28]!==n||e[29]!==c||e[30]!==h||e[31]!==l?(x=r.jsx(J,{orgSlug:p.slug,virtualMcpId:l,branch:u,threadId:h,icon:i,copy:t,skeleton:n,children:a},c),e[23]=u,e[24]=a,e[25]=t,e[26]=i,e[27]=p.slug,e[28]=n,e[29]=c,e[30]=h,e[31]=l,e[32]=x):x=e[32],x}function J(C){const e=I.c(35),{orgSlug:l,virtualMcpId:i,branch:t,threadId:n,icon:a,copy:o,skeleton:p,children:k}=C,u=M();let g;e[0]!==t||e[1]!==l||e[2]!==n||e[3]!==i?(g={orgSlug:l,virtualMcpId:i,branch:t,threadId:n,previewUrl:null},e[0]=t,e[1]=l,e[2]=n,e[3]=i,e[4]=g):g=e[4];const D=g,c=L(D),h=A(D),x=c.data,s=h.data;let F;e[5]!==t||e[6]!==l||e[7]!==i?(F={orgSlug:l,virtualMcpId:i,branch:t},e[5]=t,e[6]=l,e[7]=i,e[8]=F):F=e[8];const d=_(F,Q);if(!x||!s||!d.ready){if(c.isError||h.isError||d.failed){const N=o.loadFailed,O=o.loadFailedHint;let b;e[9]!==u?(b=u("sectionsEditor.namedRules.tryAgain"),e[9]=u,e[10]=b):b=e[10];let E;e[11]!==c||e[12]!==d||e[13]!==h?(E=()=>{c.isError&&c.refetch(),h.isError&&h.refetch(),d.failed&&d.retry()},e[11]=c,e[12]=d,e[13]=h,e[14]=E):E=e[14];let S;e[15]!==b||e[16]!==E?(S={label:b,onClick:E},e[15]=b,e[16]=E,e[17]=S):S=e[17];let y;return e[18]!==o.loadFailed||e[19]!==o.loadFailedHint||e[20]!==a||e[21]!==S?(y=r.jsx(H,{icon:a,title:N,description:O,action:S}),e[18]=o.loadFailed,e[19]=o.loadFailedHint,e[20]=a,e[21]=S,e[22]=y):y=e[22],y}let j;return e[23]!==p?(j=r.jsx(r.Fragment,{children:p}),e[23]=p,e[24]=j):j=e[24],j}let f;e[25]!==t||e[26]!==k||e[27]!==x||e[28]!==s||e[29]!==l||e[30]!==n||e[31]!==i?(f=k({orgSlug:l,virtualMcpId:i,branch:t,threadId:n,decofile:x,meta:s}),e[25]=t,e[26]=k,e[27]=x,e[28]=s,e[29]=l,e[30]=n,e[31]=i,e[32]=f):f=e[32];let m;return e[33]!==f?(m=r.jsx(r.Fragment,{children:f}),e[33]=f,e[34]=m):m=e[34],m}export{H as S,Y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-Dd5hidCj.js";import{C as M}from"./chat-context-DgCR75CY.js";import{C as x}from"./index-BtqPZIqH.js";import{L}from"./index-DJZmV4c9.js";import{B as V}from"./blocks-preview-workspace-context-DFEoJmhw.js";import{e as T,p as J,s as K,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-DL4aC3pF.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-DoF3705n.js";import{C as Y}from"./content-tab-DnZUk0R_.js";import{T as Z}from"./tab-icon-glyph-CeBm3H92.js";import{r as tt}from"./resolve-tab-icon-JhqhoNvw.js";import et from"./agent-site-editor-Z6rBuS35.js";import"./autosend-CGJPJD3U.js";import"./thread-route-B_swkleJ.js";import"./use-project-scope-Dqnjf5Fg.js";import"./repository-binding-DV3kkbZ_.js";import"./use-mcp-client-CNXpOf52.js";import"./auth-TL5_hJeY.js";import"./thread-intent-DMhB2sy4.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-2U2aYEEI.js";import"./task-board-BZ6FZl9j.js";import"./schema-paIXrOCY.js";import"./use-entitlements-mX8bg5XG.js";import"./use-ai-providers-DQAzIwY2.js";import"./use-decopilot-events-CtnAXgLl.js";import"./use-organization-settings-488vpN0c.js";import"./use-mobile-DDy9Znlf.js";import"./use-sidebar-collapsed-CSXlwHC3.js";import"./use-chat-layout-state-BsOGOEOo.js";import"./agent-icon-CMiKlX_f.js";import"./AlertCircle-CsPTcN_S.js";import"./Tool01-BWMOxR8v.js";import"./ArrowUp-Cv1SmuzD.js";import"./ArrowLeft-BYhfnAa5.js";import"./LinkBroken01-B3rPhu7D.js";import"./ShoppingBag01-BcBJW8Ry.js";import"./Globe04-ceJSWDa3.js";import"./CheckCircle-LO8Q7KlB.js";import"./ChevronUp-Dh24Sq_k.js";import"./ChevronSelectorVertical-Bo1EsiyQ.js";import"./UserSquare-BjqAifU8.js";import"./CreditCard01-B0xYA-L3.js";import"./SwitchHorizontal01-BTdsV_bI.js";import"./Key01-D9P3FMiY.js";import"./Minus-BP4M5eUu.js";import"./Monitor01-BIy7Jnq0.js";import"./Sun-oVWnfq_E.js";import"./Play-C4cdDhC3.js";import"./Plus-Bcl7avNA.js";import"./SearchMd-DRs-Ld4Z.js";import"./Trash01-CgWosjFE.js";import"./Upload01-DAMBCMxP.js";import"./Users01-Bt0rcyOL.js";import"./XClose-TMdj_yIm.js";import"./Zap-BJ5eCR1y.js";import"./tooltip-Dyh2h0NV.js";import"./index-B57dAAxD.js";import"./toolbar-icon-button-99r2aG4V.js";import"./shell-layout-Dcfsytx-.js";import"./use-deployment-admin-mLJFncG4.js";import"./admin-fetch-BhTJlAsX.js";import"./command-Bh995x5J.js";import"./index-DjpHvK_4.js";import"./integration-icon-DHvbSqTM.js";import"./project-icon-BC5BTHqT.js";import"./use-navigate-to-agent-B-iTaYhm.js";import"./use-debounced-value-CezJqVSj.js";import"./new-project-dialog-BDUp1HsF.js";import"./label-BZoCdZa0.js";import"./repository-picker-DhcwcPzc.js";import"./github-icon--dnMj3-y.js";import"./useInfiniteQuery-DqQNqcJl.js";import"./infiniteQueryObserver-C1uWfhgO.js";import"./collection-search-DmyrNuWr.js";import"./legacy-admin-welcome-dialog-BgMnIQY9.js";import"./drawer-BcaULeep.js";import"./required-auth-layout-lVrZieBu.js";import"./use-org-sso-DNEWwtoA.js";import"./sheet-DUtlbS4K.js";import"./resizable-D6Bvwzfl.js";import"./core.esm-Cx2tI-v0.js";import"./sortable.esm-C7rI9jHM.js";import"./context-menu-_4SjkJP2.js";import"./create-organization-dialog-DztBZJfG.js";import"./form-CIThj_T9.js";import"./project-apps-C1L1P3Il.js";import"./use-recent-apps-2cMLzs_u.js";import"./feedback-BqoIMOg7.js";import"./textarea-hEv7rKyL.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-D9uSNLH2.js";import"./use-blocks-v8-project-DHH8umJ9.js";import"./use-voice-input-miWnQR-2.js";import"./popover-4z9eDM-9.js";import"./index-BF9ePDqU.js";import"./checkbox-CDdGUfxj.js";import"./select-iwVnUZSM.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-Cugj1NVM.js";import"./sandbox-git-api-DcqI6XE4.js";import"./parse-sections-BqIle9mt.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-D5jYRLOi.js";import"./collapsible-BF7fiKEY.js";import"./use-copy-DJs5balG.js";import"./usage-stats-iRJ2oM0y.js";import"./tool-namespace-EVeG8Fs5.js";import"./utils-CVEq3hMx.js";import"./markdown-ZlzKtNkL.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CRFiwN6n.js";import"./types-Mb9DEKKQ.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-e-hq9vT7.js";import"./use-mcp-prompts-COb2l8gW.js";import"./use-thread-outputs-COaP8znq.js";import"./file-type-icon-D75nksOt.js";import"./section-array-field-B8BsNXRT.js";import"./blocks-tab-states-DASlUdvo.js";import"./empty-state-Cfajk5TO.js";import"./hosted-reconcile-D236FadC.js";import"./slider-Cmkjh66S.js";import"./index-ozu548h3.js";import"./tooltipContext-CQdoW9wa.js";import"./CategoricalChart-B9nv4p9e.js";import"./index-BrihqSoi.js";import"./switch-BZMVD_xA.js";import"./scroll-area-BwaclrCR.js";import"./monaco-editor-BZNPSifL.js";import"./editor-DXF9rwVo.js";import"./calendar-J9rCuEM0.js";import"./editor-classes-DEwbN0MI.js";import"./toggle-group-DDk8xPXe.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-Cy1ac_Va.js";import"./search-input-BG8rdrCe.js";import"./tabs-CFdE2LmD.js";import"./use-file-configs-z22DUi0c.js";import"./asset-utils-B4QYhZxH.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-lifecycle-context-2RE5Jlvg.js";import"./variant-matcher-override-CA2qg3Y9.js";import"./use-fast-preview-draft-url-DrTS3dt5.js";import"./useQueries-BYTcJkC-.js";import"./device-hint-DiJItdVl.js";import"./alert-TFdEDT2O.js";import"./virtual-mcp-NII7Lu6q.js";import"./url-slug-Cli-NAkj.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-DODsAfWG.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-BvTVrzAT.js";import"./view-header-CNnF9Sbv.js";import"./use-cms-publish-actions-CntIxbra.js";import"./use-content-sync-tJgGPJpi.js";import"./mustache-DZix8TV9.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-D7WfYgve.js";import"./badge-D7MkXlu5.js";import"./empty-state-Ccl8OC-j.js";import"./index-B_wKEr5f.js";import"./collection-table-wrapper-BVBFYCyq.js";import"./table-C9boQ5tZ.js";import"./site-draft-actions-B5A2QjjI.js";import"./separator-C1bonuaY.js";import"./cms-store-drafts-CZfXb7jx.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-CRog5tFp.js";import"./input-B-TiyPUk.js";import"./icon-button-CyNmKrzV.js";import"./chat-draft-B_pQlOo7.js";import"./use-deco-credits-CHRRrI8G.js";import"./input-DKlZJGf0.js";import"./suggestion-DGz7gtzE.js";import"./use-org-fs-8086pm93.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DasxziSs.js";import"./plan-ladder-42sSWoBs.js";import"./add-connection-dialog-DigMA6Jw.js";import"./extract-connection-data-biKUq-5E.js";import"./metadata-D72DunRR.js";import"./connection-S1Y-z6Ze.js";import"./connection-card-GbDbFKHX.js";import"./connection-slug-CQeaB-ii.js";import"./schema-CINYRcKK.js";import"./connection-form-helpers-DwQM2AXJ.js";import"./authenticate-and-persist-oauth-CUE7ik09.js";import"./mcp-oauth-VaMDOw7T.js";import"./mcp-oauth-Cq-Z82WC.js";import"./collection-tabs-CzJgsFmP.js";import"./use-infinite-scroll-CvgjtV8K.js";import"./useSuspenseInfiniteQuery-0A6saVT8.js";import"./use-task-board-events-CuH-inlF.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-DsHq6hEs.js";function I(e){return e.kind==="unavailable"&&e.source==="local"&&(e.problem?.reason??"not-answering")==="not-answering"}const ot=e=>e;function it(e){const t=u.c(10),{candidates:o,invalidLink:c,shell:m,editor:i}=e,r=c===void 0?!1:c,s=m===void 0?ot:m,[p,l]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==i?(h=i(p,f),t[1]=p,t[2]=i,t[3]=h):h=t[3],h}let a;t[4]!==o||t[5]!==r?(a=n.jsx(rt,{candidates:o,invalidLink:r,onConnect:l}),t[4]=o,t[5]=r,t[6]=a):a=t[6];let d;return t[7]!==s||t[8]!==a?(d=s(a),t[7]=s,t[8]=a,t[9]=d):d=t[9],d}function rt(e){const t=u.c(17),{candidates:o,invalidLink:c,onConnect:m}=e,i=c===void 0?!1:c,[r]=G(),{language:s}=r;let p;t[0]!==m?(p=N=>m({endpoint:N}),t[0]=m,t[1]=p):p=t[1];let l;t[2]!==o||t[3]!==p?(l={candidates:o,onFound:p},t[2]=o,t[3]=p,t[4]=l):l=t[4];const a=q(l),{state:d,access:f,needsGesture:h}=a;let k;t[5]!==o||t[6]!==s?(k=new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(o.map(T)),t[5]=o,t[6]=s,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==a.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:a.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=a.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==i||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:i}),t[13]=C,t[14]=i,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const e=window.location.hash,t=new URLSearchParams(e.replace(/^#/,"")).has("endpoint"),o=t?J(e):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),o&&K(o),{candidates:W(o,U()),invalidLink:t&&!o}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function ct(){const e=u.c(6),t=P();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:lt},e[0]=o):o=e[0];const c=O(o);let m;e[1]!==t||e[2]!==c?(m=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),e[1]=t,e[2]=c,e[3]=m):m=e[3];let i;return e[4]!==m?(i=n.jsx(y.Tabs,{children:m}),e[4]=m,e[5]=i):i=e[5],i}function lt(e){return e.matches.at(-1)?.staticData.siteEditorView}function A(e){const t=u.c(14),{children:o}=e,c=P(),{connection:m}=z(v),i=R(v,w);let r,s;if(t[0]!==i||t[1]!==o||t[2]!==m||t[3]!==c){s=Symbol.for("react.early_return_sentinel");t:{if(r=m?T(m.endpoint):"",i.kind==="protocol"){s=o;break t}if(i.kind!=="unavailable"||I(i)){s=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=i,t[1]=o,t[2]=m,t[3]=c,t[4]=r,t[5]=s}else r=t[4],s=t[5];if(s!==Symbol.for("react.early_return_sentinel"))return s;let p;t[6]!==i.problem?(p=i.problem??{reason:"not-answering"},t[6]=i.problem,t[7]=p):p=t[7];let l;t[8]!==r||t[9]!==p?(l={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==l?(a=n.jsx(B,{wait:l,hosts:r}),t[11]=r,t[12]=l,t[13]=a):a=t[13],a}function dt(e){const t=u.c(6),{onLost:o}=e,c=R(v,w);let m;t[0]!==c?(m=I(c),t[0]=c,t[1]=m):m=t[1];const i=m;let r,s;return t[2]!==i||t[3]!==o?(r=()=>{i&&o()},s=[i,o],t[2]=i,t[3]=o,t[4]=r,t[5]=s):(r=t[4],s=t[5]),g.useEffect(r,s),null}const D={threadOpen:!1,contentOpen:!0,threadVisibilityExplicit:!1,toggleThread:()=>{},toggleContent:()=>{}};function ut(){const e=u.c(11),{data:t}=E.useSession();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:ft},e[0]=o):o=e[0];const c=O(o),m=!!t?.user;let i;e[1]!==m?(i={rail:m},e[1]=m,e[2]=i):i=e[2];const r=c??"preview";let s,p,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ct,{}),p=n.jsx(x.Thread,{children:null}),l=n.jsx(et,{}),e[3]=s,e[4]=p,e[5]=l):(s=e[3],p=e[4],l=e[5]);let a;e[6]!==r?(a=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:s,children:[p,l]})}),e[6]=r,e[7]=a):a=e[7];let d;return e[8]!==i||e[9]!==a?(d=n.jsx(L,{outsideOrg:i,children:a}),e[8]=i,e[9]=a,e[10]=d):d=e[10],d}function ft(e){return e.matches.at(-1)?.staticData.siteEditorView}function ht(e){const t=u.c(8),{children:o}=e,{data:c}=E.useSession(),m=!!c?.user;let i;t[0]!==m?(i={rail:m},t[0]=m,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(x.Thread,{children:null}),t[2]=r):r=t[2];let s;t[3]!==o?(s=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,n.jsx(x.Content,{children:o})]})}),t[3]=o,t[4]=s):s=t[4];let p;return t[5]!==i||t[6]!==s?(p=n.jsx(L,{outsideOrg:i,children:s}),t[5]=i,t[6]=s,t[7]=p):p=t[7],p}const b=()=>{},vt={connection:null,set:b,clear:b};function or(){const e=u.c(3),[t]=g.useState(pt);let o;return e[0]!==t.candidates||e[1]!==t.invalidLink?(o=n.jsx(F,{org:nt,project:st,children:n.jsx(it,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),e[0]=t.candidates,e[1]=t.invalidLink,e[2]=o):o=e[2],o}function xt(e,t){return n.jsxs($.Provider,{value:{connection:e,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(V,{children:n.jsx(ut,{})})})]})}function kt(e){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:e})})}function ir(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),e[0]=t):t=e[0],t}function rr(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),e[0]=t):t=e[0],t}export{rr as SiteEditorContent,ir as SiteEditorPreview,or as default};
|