decocms 4.371.4 → 4.372.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DkoTBUue.js → AlertCircle-Ddrj7VUD.js} +1 -1
- package/dist/client/assets/{AreaChart-DlexVvHr.js → AreaChart-0mAtLd45.js} +1 -1
- package/dist/client/assets/{ArrowLeft-eoxjWHed.js → ArrowLeft-BKbGYh2B.js} +1 -1
- package/dist/client/assets/{ArrowRight-BbuAJZmx.js → ArrowRight-6hYTENh_.js} +1 -1
- package/dist/client/assets/{ArrowUp-CseIJyft.js → ArrowUp-Dhew3Evs.js} +1 -1
- package/dist/client/assets/{CartesianChart--SFPDO1V.js → CartesianChart-u2Ri6JFS.js} +1 -1
- package/dist/client/assets/{Check-BDjrzcrN.js → Check-Dnz3uW0f.js} +1 -1
- package/dist/client/assets/{CheckCircle-CSZ4Kehv.js → CheckCircle-DQbrJHsr.js} +1 -1
- package/dist/client/assets/{ChevronRight-DFWFq-ve.js → ChevronRight-DK_MoZ-7.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-C9J9C02y.js → ChevronSelectorVertical-B64gqtde.js} +1 -1
- package/dist/client/assets/{ChevronUp-BrOu8rnp.js → ChevronUp-XOZg-HiO.js} +1 -1
- package/dist/client/assets/{Copy01-CCOGzU1d.js → Copy01-l6PfB431.js} +1 -1
- package/dist/client/assets/{CreditCard01-CuoUWRm0.js → CreditCard01-DQsLDZWx.js} +1 -1
- package/dist/client/assets/{Database01-CJba45_T.js → Database01-vUZciuwF.js} +1 -1
- package/dist/client/assets/{DotsVertical-mYRVr9AH.js → DotsVertical-Dyzdr42E.js} +1 -1
- package/dist/client/assets/{Download01-Bd0rofRl.js → Download01-_eUxcgg1.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-C0lyL2YC.js → ErrorBarContext-DFc19StE.js} +1 -1
- package/dist/client/assets/{Eye-74QOe9cC.js → Eye-B7hZLXRZ.js} +1 -1
- package/dist/client/assets/{File02-CmMbIRXN.js → File02-D1W0NjQG.js} +1 -1
- package/dist/client/assets/{GitBranch01-BKO8WN_h.js → GitBranch01-CRUhFeKk.js} +1 -1
- package/dist/client/assets/{Globe01-Ck7RTkU3.js → Globe01-D9zr3JIX.js} +1 -1
- package/dist/client/assets/{HardDrive-DU6J9iPu.js → HardDrive-7_ZjnLMv.js} +1 -1
- package/dist/client/assets/{Image01-DnYDSI2h.js → Image01-7_HSDHV3.js} +1 -1
- package/dist/client/assets/{Key01-BZd6Jwvq.js → Key01-ti2CpCiW.js} +1 -1
- package/dist/client/assets/{Line-G0r0o9gn.js → Line-D9piFifo.js} +1 -1
- package/dist/client/assets/{Link01-B52qN1xV.js → Link01-DYWtgbsz.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BDgcOJqm.js → LinkExternal01--55N_6ts.js} +1 -1
- package/dist/client/assets/{MessageCircle01-CwQvoxPA.js → MessageCircle01-DELRsE6A.js} +1 -1
- package/dist/client/assets/{Monitor01-BcYUPleF.js → Monitor01-BoIweS2p.js} +1 -1
- package/dist/client/assets/{Package-C4SRuwMw.js → Package-CSgBbMFc.js} +1 -1
- package/dist/client/assets/{Palette-C9EL1sNC.js → Palette-CaHW8y9T.js} +1 -1
- package/dist/client/assets/{Play-CyyInR_v.js → Play-BolLrTAn.js} +1 -1
- package/dist/client/assets/{Plus-BEdGLMcS.js → Plus-C5azC59K.js} +1 -1
- package/dist/client/assets/{Printer-BgQcHd8s.js → Printer-Dn2De3ak.js} +1 -1
- package/dist/client/assets/{SearchLg-D8sOk12E.js → SearchLg-BZUR3n9c.js} +1 -1
- package/dist/client/assets/{SearchMd-CVv1yVth.js → SearchMd-Ms_xvSfF.js} +1 -1
- package/dist/client/assets/{Sector-CvQy_NRt.js → Sector-DHu8bCK4.js} +1 -1
- package/dist/client/assets/{Settings02-7e_CWXN4.js → Settings02-BLcAotUO.js} +1 -1
- package/dist/client/assets/{Share07-CWr7FJF7.js → Share07-BypmcbEF.js} +1 -1
- package/dist/client/assets/{Shield01-B8e5sZlX.js → Shield01-C_5dC1mR.js} +1 -1
- package/dist/client/assets/{Stars01-DtXaEO3a.js → Stars01-DTStBsXP.js} +1 -1
- package/dist/client/assets/{Sun-I1e-KcTY.js → Sun-CEaGM44s.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BRr1FvfD.js → SwitchHorizontal01-l3o5r_PJ.js} +1 -1
- package/dist/client/assets/{Tool01-dFp1h9Fm.js → Tool01-C0-Xqkxp.js} +1 -1
- package/dist/client/assets/{Tool02-DEN5a-af.js → Tool02-CE2Fqpba.js} +1 -1
- package/dist/client/assets/{Trash01-DGA8npEZ.js → Trash01-DPQmLNZV.js} +1 -1
- package/dist/client/assets/{TrendUp01-BK_K6NH_.js → TrendUp01-uTlAwt0S.js} +1 -1
- package/dist/client/assets/{Upload01-B3v_JBAz.js → Upload01-D-20AdeD.js} +1 -1
- package/dist/client/assets/{User01-Dbdndpwo.js → User01-BA1LEBvQ.js} +1 -1
- package/dist/client/assets/{UserSquare-DZNy5OUH.js → UserSquare-D-v_LgOa.js} +1 -1
- package/dist/client/assets/{Users01-AYbQCr7m.js → Users01-BpRvBK8_.js} +1 -1
- package/dist/client/assets/{Users03-CUK-7hPD.js → Users03-BaYGM99c.js} +1 -1
- package/dist/client/assets/{X-BH7q4C1t.js → X-Dh_K-VDi.js} +1 -1
- package/dist/client/assets/{XCircle-CFDcIdAJ.js → XCircle-BhDUy79p.js} +1 -1
- package/dist/client/assets/{XClose-2vlbdyhB.js → XClose-Bw0VS-dj.js} +1 -1
- package/dist/client/assets/{Zap-Df8_LH9g.js → Zap-TxetSnv7.js} +1 -1
- package/dist/client/assets/{ZoomOut-CvFdKFHJ.js → ZoomOut-CJKT31Kx.js} +1 -1
- package/dist/client/assets/{access-gate-Bz_XB_uN.js → access-gate-Dt6vr2zi.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CazdSHRl.js → add-connection-dialog-Bwzbw2rJ.js} +1 -1
- package/dist/client/assets/{agent-analytics-BUU5OHJ0.js → agent-analytics-OtUj5VAg.js} +1 -1
- package/dist/client/assets/agent-app-huXdhJP6.js +1 -0
- package/dist/client/assets/{agent-assets-koBUkOuF.js → agent-assets-Ds2YrU5Y.js} +1 -1
- package/dist/client/assets/{agent-automation-s5o8QjN7.js → agent-automation-BzHNBuT4.js} +1 -1
- package/dist/client/assets/{agent-automations-BEgeK_8a.js → agent-automations-BvUPSQUr.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Cw1ElYdi.js → agent-connect-sources-B2VHxv-N.js} +1 -1
- package/dist/client/assets/agent-deck-DGboeeyf.js +1 -0
- package/dist/client/assets/{agent-e2e-D0tGNaa-.js → agent-e2e-CCN3csfU.js} +1 -1
- package/dist/client/assets/{agent-experiments-CF1wr09V.js → agent-experiments-C1xtDG8f.js} +1 -1
- package/dist/client/assets/agent-file-B8pH22Ku.js +1 -0
- package/dist/client/assets/{agent-git-X9feic8X.js → agent-git-O5fnLyKj.js} +1 -1
- package/dist/client/assets/{agent-hosting-CiIEbvp9.js → agent-hosting-ClZ4R70M.js} +1 -1
- package/dist/client/assets/{agent-icon-CWoY8dlp.js → agent-icon-Cyx7Smko.js} +1 -1
- package/dist/client/assets/agent-library-file-D-88nLF8.js +1 -0
- package/dist/client/assets/{agent-monitor-dM1U0oHi.js → agent-monitor-B2s_I09z.js} +1 -1
- package/dist/client/assets/{agent-overview-b_OH54f9.js → agent-overview-CLGjxUwU.js} +1 -1
- package/dist/client/assets/agent-settings-BzADpWtq.js +1 -0
- package/dist/client/assets/{agent-site-editor-BBBwvkn-.js → agent-site-editor-DElX-Rtx.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CGdhTJXE.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-6RAz4TG_.js → agent-site-editor-content-D8Swy0HF.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-Dgz_F_iP.js → agent-site-editor-preview-BEkJn_qI.js} +3 -3
- package/dist/client/assets/agent-view-BZUeqD_l.js +1 -0
- package/dist/client/assets/{agent-view-guard-BwVsll67.js → agent-view-guard-Cc93o9kZ.js} +1 -1
- package/dist/client/assets/{agents-list-saY2e2oN.js → agents-list-D23HRLNK.js} +1 -1
- package/dist/client/assets/{ai-providers-nN3i3GvB.js → ai-providers-AQKJLPCp.js} +1 -1
- package/dist/client/assets/{alert-CHNmHigh.js → alert-Bb5psHaZ.js} +1 -1
- package/dist/client/assets/{alert-dialog-Cj4mq8qj.js → alert-dialog-DfGZ77rh.js} +1 -1
- package/dist/client/assets/{api-keys-DrOs-ajg.js → api-keys-7xk7B181.js} +1 -1
- package/dist/client/assets/api-keys-DfV1qFa5.js +1 -0
- package/dist/client/assets/app-editor-CK2-PFMD.js +1 -0
- package/dist/client/assets/{asset-utils-B6xmdxJ-.js → asset-utils-Dl8tpNxx.js} +1 -1
- package/dist/client/assets/{auth-DQLPrt1d.js → auth-5BCk_I76.js} +1 -1
- package/dist/client/assets/{auth-catchall-C1NwExr2.js → auth-catchall-BXX_QHt4.js} +1 -1
- package/dist/client/assets/{auth-entry-BFo2L_uA.js → auth-entry-BYY2pacz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CyH5oyMl.js → auth-split-layout-Bh_B_vjZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DiSz7oRO.js → authenticate-and-persist-oauth-Bj_Y1vgm.js} +1 -1
- package/dist/client/assets/{automation-list-row-ToSx3G2V.js → automation-list-row-TgtbvSc5.js} +1 -1
- package/dist/client/assets/{automation-runs-D-Y_3Wp_.js → automation-runs-CVEQI8qU.js} +1 -1
- package/dist/client/assets/automations-CfjjbeEx.js +1 -0
- package/dist/client/assets/{autosend-DBLW1BiY.js → autosend-ClVEnX_S.js} +1 -1
- package/dist/client/assets/{avatar-CA5LIB-l.js → avatar-CR9KEb-s.js} +1 -1
- package/dist/client/assets/{badge-BHHKIdAQ.js → badge-DOT8HE5Z.js} +1 -1
- package/dist/client/assets/{block-document-CKFsXR2D.js → block-document-Boj9yYni.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DD1sbvCI.js → blocks-preview-workspace-context-Dh0KsAvE.js} +1 -1
- package/dist/client/assets/{breadcrumb-CtLbOAvM.js → breadcrumb-CVSmj3i3.js} +1 -1
- package/dist/client/assets/{buckets-n4oqlL53.js → buckets-B0FCB4zB.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-C0Pcb13i.js → build-improve-prompt-doc-C9jBTscU.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-LlH8_RXq.js → bulk-category-panel-QprmcNHA.js} +1 -1
- package/dist/client/assets/{calendar-CuSfsKMP.js → calendar-SAWOBJxF.js} +1 -1
- package/dist/client/assets/{capability-load-error-nTuuTH9K.js → capability-load-error-D1mxtMyB.js} +1 -1
- package/dist/client/assets/{cards-D_qYJSBL.js → cards-DQPi8IW_.js} +1 -1
- package/dist/client/assets/category-editor-CG20ku6V.js +1 -0
- package/dist/client/assets/{chart-3a-OWzYT.js → chart-BGm-AILS.js} +1 -1
- package/dist/client/assets/{chat-context-Bu5sIHkQ.js → chat-context-H28jTcB6.js} +1 -1
- package/dist/client/assets/{chat-draft-CDnPwvf3.js → chat-draft-BTIUwp87.js} +1 -1
- package/dist/client/assets/{checkbox-KtkqQde0.js → checkbox-D_GODf3h.js} +1 -1
- package/dist/client/assets/{choose-editor-Dn1tw3t6.js → choose-editor-CqXPKhwg.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Dk6ZAOHg.js → cli-auth-success-Nkuy_2dv.js} +1 -1
- package/dist/client/assets/{client-icons-BZbx9xet.js → client-icons-D55uOktL.js} +1 -1
- package/dist/client/assets/{collapsible--RUSBZp8.js → collapsible-CkoFdRnK.js} +1 -1
- package/dist/client/assets/{collection-detail-DeDEzfsH.js → collection-detail-7A7zRYv2.js} +1 -1
- package/dist/client/assets/{collection-display-button-CSCRl1NG.js → collection-display-button-B730w9Ah.js} +1 -1
- package/dist/client/assets/{collection-search-CYFbkY1e.js → collection-search-B2t2IaOK.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B0GV6KfT.js → collection-table-wrapper-87GtYm7N.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cub0gFzH.js → collection-tabs-DAqaNYVU.js} +1 -1
- package/dist/client/assets/{combobox-DKSSMn_F.js → combobox-CA5nnv9O.js} +1 -1
- package/dist/client/assets/{command-Aa0mYduw.js → command-CtFXOSiX.js} +1 -1
- package/dist/client/assets/{command-palette-store-AuoaPk0G.js → command-palette-store-BL5hnWnv.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Cm96EPtV.js → companion-mcps-section-DVYB246Y.js} +1 -1
- package/dist/client/assets/{connect-RwN6Lb1O.js → connect-F12K-hsA.js} +1 -1
- package/dist/client/assets/{connect-layout-BUZjF8sB.js → connect-layout-DCgHt0wb.js} +1 -1
- package/dist/client/assets/{connection-BYV9fPN2.js → connection-DhRpG43c.js} +1 -1
- package/dist/client/assets/{connection-card-Dr9bHZoV.js → connection-card-BCofIpgI.js} +1 -1
- package/dist/client/assets/{connection-detail-CIfYvjz9.js → connection-detail-CkBpJk50.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BXp-lVpJ.js → connection-form-helpers-C7Pc9F54.js} +1 -1
- package/dist/client/assets/{connections-CHaTlyIC.js → connections-BsBFmd4I.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-yNI_6UTh.js → create-organization-dialog-CYwIBo_O.js} +1 -1
- package/dist/client/assets/{decofile-api-DEul9pGZ.js → decofile-api-Cdto5FQ3.js} +1 -1
- package/dist/client/assets/{decopilot-C-Fh2iwl.js → decopilot-BecreIFq.js} +1 -1
- package/dist/client/assets/{dialog-D57kq_tP.js → dialog-SKkzdrcZ.js} +1 -1
- package/dist/client/assets/{discover-D4y-o31j.js → discover-BWfGXdtB.js} +1 -1
- package/dist/client/assets/{domain-settings-Ch5rCYKa.js → domain-settings-ClqqVAOw.js} +1 -1
- package/dist/client/assets/{download-app-dialog-Dd6sw41_.js → download-app-dialog-DQE0snIy.js} +1 -1
- package/dist/client/assets/{drawer-DDadqt4q.js → drawer-BleKwXKQ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-l7cu0teq.js → dropdown-menu-DRuEZVW9.js} +1 -1
- package/dist/client/assets/{editor-DhL1XnKC.js → editor-oZAad1yU.js} +1 -1
- package/dist/client/assets/{empty-state-Cad5zFK6.js → empty-state-Bi9IU32F.js} +1 -1
- package/dist/client/assets/{empty-state-CbrMvgMW.js → empty-state-CaG0BWIR.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dh_Eo1wZ.js → extract-connection-data-C8zB3-0T.js} +1 -1
- package/dist/client/assets/{feature-gate-OPGtzGpZ.js → feature-gate-UfjS24Ou.js} +1 -1
- package/dist/client/assets/{feature-paywall-DsAStIcU.js → feature-paywall-pQTqQ94T.js} +1 -1
- package/dist/client/assets/{file-explorer-DAxbvkJk.js → file-explorer-s0AeRobY.js} +1 -1
- package/dist/client/assets/{file-preview-CDdVdNDx.js → file-preview-Dzjub9Lu.js} +1 -1
- package/dist/client/assets/{file-share-button-DTqbvQ69.js → file-share-button-BqqM0Upa.js} +1 -1
- package/dist/client/assets/{file-type-icon-DwxUV7LB.js → file-type-icon-CMiynV8b.js} +1 -1
- package/dist/client/assets/{folder-icon-Xf_qPSHt.js → folder-icon-3FCd-eRP.js} +1 -1
- package/dist/client/assets/{form-x2RdyMbl.js → form-H9AoFazU.js} +1 -1
- package/dist/client/assets/{gateway-client-D1lNGMSB.js → gateway-client-BQS5H6XZ.js} +1 -1
- package/dist/client/assets/{general-qL4c5feU.js → general-st9zEmU7.js} +1 -1
- package/dist/client/assets/{github-icon-BO2ZIrI7.js → github-icon-TtZ8EUXE.js} +1 -1
- package/dist/client/assets/{home-CLq77ImN.js → home-DMdfBPme.js} +1 -1
- package/dist/client/assets/{hooks-ClWLwZb6.js → hooks-D5z7CgCt.js} +1 -1
- package/dist/client/assets/{hooks-BX3ndMg6.js → hooks-abtcLONn.js} +1 -1
- package/dist/client/assets/{index-D04wJiA7.js → index-BC68yJ9a.js} +1 -1
- package/dist/client/assets/{index-Br-oQZuQ.js → index-BQgXOHRB.js} +1 -1
- package/dist/client/assets/{index-C_tMl4q8.js → index-C-9h82SA.js} +1 -1
- package/dist/client/assets/{index-BCcWkCUf.js → index-C1pofvkl.js} +1 -1
- package/dist/client/assets/{index-DHMJogsX.js → index-C4m-Xj9t.js} +1 -1
- package/dist/client/assets/{index-BhSpAyPc.js → index-CHIEfkY6.js} +1 -1
- package/dist/client/assets/{index-CSGdKnA2.js → index-CZFOUXi8.js} +1 -1
- package/dist/client/assets/{index-dzbklFKC.js → index-CdCU_XIc.js} +1 -1
- package/dist/client/assets/{index-BYo7xjw_.js → index-Cjhl57C5.js} +4 -4
- package/dist/client/assets/{index-DqscriGX.js → index-Cm__CFgO.js} +1 -1
- package/dist/client/assets/{index-B4f3l0bW.js → index-CoJzC8_g.js} +1 -1
- package/dist/client/assets/{index-Ciq75byn.js → index-DAUnTbKR.js} +1 -1
- package/dist/client/assets/{index-DIk-Tdn7.js → index-Os5Hiv1r.js} +1 -1
- package/dist/client/assets/{index-redirect-CgpYz1_8.js → index-redirect-BGMUaELH.js} +1 -1
- package/dist/client/assets/{index-Da4w1ozj.js → index-soiZgi77.js} +1 -1
- package/dist/client/assets/{index-DMoDLIev.js → index-tw-L0pq4.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BegmJhfO.js → infiniteQueryObserver-CTAqrRzL.js} +1 -1
- package/dist/client/assets/{infra-billing-BcAZoLz6.js → infra-billing-D-R9Zdx8.js} +1 -1
- package/dist/client/assets/{input-B0Uinzv0.js → input-CImpk8th.js} +1 -1
- package/dist/client/assets/{input-Dzyq242f.js → input-DNp0K9zv.js} +1 -1
- package/dist/client/assets/{input-BWSDRY3j.js → input-DkPDVfFk.js} +1 -1
- package/dist/client/assets/{integration-icon-Jv69owhG.js → integration-icon-Dq1cJDX8.js} +1 -1
- package/dist/client/assets/{label-B9P1qvVv.js → label-Bk7iLZH7.js} +1 -1
- package/dist/client/assets/{last-preview-page-By8mKu-G.js → last-preview-page-BmfL1c7N.js} +1 -1
- package/dist/client/assets/{layout-BiLsgaKY.js → layout-Ci3akdxf.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-ARL8jf0f.js → legacy-agents-deep-CqdHGYTA.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CU9SDsoJ.js → legacy-main-redirect-BqiddEXn.js} +1 -1
- package/dist/client/assets/{library-lIdeMZNG.js → library-BUfXzmmk.js} +1 -1
- package/dist/client/assets/{login-B-zmZILz.js → login-BUL2HRoD.js} +1 -1
- package/dist/client/assets/{markdown-BLbEs4th.js → markdown-Cqyyk371.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BuE-fXND.js → mcp-app-renderer-zIU2-SQD.js} +1 -1
- package/dist/client/assets/{mcp-oauth-gEPmFmtm.js → mcp-oauth-qvcFIOHE.js} +1 -1
- package/dist/client/assets/{members-DPanptly.js → members-B2ASFRpM.js} +1 -1
- package/dist/client/assets/{message-templates-eLGXNsTs.js → message-templates-BvJNSKe2.js} +1 -1
- package/dist/client/assets/{mini-report-page-B9cbP96Z.js → mini-report-page-GL8Uh_Lo.js} +1 -1
- package/dist/client/assets/{mock-board-CuyyHaan.js → mock-board-D2--sNwu.js} +3 -3
- package/dist/client/assets/{monaco-editor-DL6feSNU.js → monaco-editor-Bg8UPXit.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DqxN6GUk.js → monitoring-stats-row-C9igDEpY.js} +1 -1
- package/dist/client/assets/{multi-select-oKdD9DyQ.js → multi-select-B0yDI0nj.js} +1 -1
- package/dist/client/assets/{mustache-DJBjSsyb.js → mustache-CDAsLK2v.js} +1 -1
- package/dist/client/assets/{oauth-callback-BZYyT9aM.js → oauth-callback-D8Lk8lTx.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-7PpM7Rdj.js → oauth-callback-ai-provider-P1E8_NRm.js} +1 -1
- package/dist/client/assets/{onboarding-YCDpp7Hz.js → onboarding-Df5HIECJ.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Drp0GaY-.js → optimistic-project-sidebar-views-IR0sppyV.js} +1 -1
- package/dist/client/assets/{org-file-open-context-BFThBGhY.js → org-file-open-context-Dd47NmeH.js} +1 -1
- package/dist/client/assets/{organization-choice-BmTH1TFX.js → organization-choice-B_XEkc76.js} +1 -1
- package/dist/client/assets/{orgs-Bg15s_t6.js → orgs-BAOnfPU8.js} +1 -1
- package/dist/client/assets/{page-seo-form-2XHO2I5J.js → page-seo-form-DbL4-FYa.js} +1 -1
- package/dist/client/assets/{pair-CyjnQvo_.js → pair-BHYz9F-Z.js} +1 -1
- package/dist/client/assets/{plan-ladder-BxTjLX-u.js → plan-ladder-Cqfgwdfc.js} +1 -1
- package/dist/client/assets/{popover-ZSYA9qhq.js → popover-Bn0xXLy8.js} +1 -1
- package/dist/client/assets/{post-calendar-Dk7gydQI.js → post-calendar-6AuB-9GD.js} +1 -1
- package/dist/client/assets/{post-editor-EUWIRS7z.js → post-editor-D6gFXTiI.js} +1 -1
- package/dist/client/assets/{preview-content-DfENsiTd.js → preview-content-BJK2rc2w.js} +1 -1
- package/dist/client/assets/{preview-dialog-CZ7yktMz.js → preview-dialog-CdfWw2XK.js} +1 -1
- package/dist/client/assets/{primitives-Dc8nwNgw.js → primitives-CSJauIt5.js} +1 -1
- package/dist/client/assets/{profile-RjcjGxIC.js → profile-BUYSJtW_.js} +1 -1
- package/dist/client/assets/{project-app-view-vHys_Fc0.js → project-app-view-BAHsn_eP.js} +1 -1
- package/dist/client/assets/{project-feed-BQriF9RR.js → project-feed-La6-iUzD.js} +1 -1
- package/dist/client/assets/{project-icon-B44PuWmC.js → project-icon-CiuTzDLi.js} +1 -1
- package/dist/client/assets/project-reports-jZGDkYDU.js +1 -0
- package/dist/client/assets/project-tasks-BDg0EJtT.js +1 -0
- package/dist/client/assets/{prompts-DxKpvN4f.js → prompts-BAZWbRxz.js} +1 -1
- package/dist/client/assets/record-editor-C96ND1CU.js +1 -0
- package/dist/client/assets/{redirect-editor-QSnnvJNH.js → redirect-editor-9oPfVcJw.js} +1 -1
- package/dist/client/assets/{registry-layout-CS36QyR-.js → registry-layout-CrG4EYUR.js} +1 -1
- package/dist/client/assets/registry-rXZoWB8a.js +2 -0
- package/dist/client/assets/reports-C9YET_Fq.js +1 -0
- package/dist/client/assets/{reports-Caz12sYh.js → reports-DHS4fi6t.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CpuoVkUT.js → reports-onboarding-BtdzeKZT.js} +1 -1
- package/dist/client/assets/{reports-tab-CTyrZeC2.js → reports-tab-B5bMQgk-.js} +2 -2
- package/dist/client/assets/{repositories-Css_5oB-.js → repositories-DbRCe9LF.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BBGtjhUh.js → repository-import-picker-Bo_Cabzz.js} +1 -1
- package/dist/client/assets/{repository-picker-C-TSiXvU.js → repository-picker-CRqY_3jm.js} +1 -1
- package/dist/client/assets/{require-capability-BGOQRUEv.js → require-capability-CLz-loNQ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DfvknvbD.js → required-auth-layout-t1gcmOkS.js} +1 -1
- package/dist/client/assets/{reset-password-DqPNpLik.js → reset-password-C_PBrpSa.js} +1 -1
- package/dist/client/assets/{resizable-DtEfzvUR.js → resizable-CTEnH3yu.js} +1 -1
- package/dist/client/assets/{review-settings-DCvHN4QQ.js → review-settings-CIZvhdQE.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-S-iuuCcb.js → rich-text-link-control-DdZo0zBm.js} +1 -1
- package/dist/client/assets/{roles-JesQ45E4.js → roles-D7Yxadr5.js} +1 -1
- package/dist/client/assets/{route-DxO9zGI3.js → route-BhbKY_6m.js} +1 -1
- package/dist/client/assets/{route-DYcLUzKq.js → route-DMLSQe3Y.js} +1 -1
- package/dist/client/assets/{route-BHp1yMIV.js → route-aV7nBxG9.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-D2pnRUMc.js → runnable-block-editor-CNau3nKH.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BKxKj4xP.js → sandbox-lifecycle-context-Dhs5hLj1.js} +1 -1
- package/dist/client/assets/{schema-CGSQcL_x.js → schema-BTHH8GSh.js} +1 -1
- package/dist/client/assets/{scroll-area-DEsjJURz.js → scroll-area-YQLTU6PQ.js} +1 -1
- package/dist/client/assets/{search-input-Ckzw9Q8f.js → search-input-Cx2Izgwg.js} +1 -1
- package/dist/client/assets/{secrets-B-ypyy2r.js → secrets-B1YWh_ht.js} +1 -1
- package/dist/client/assets/{sections-editor-CH88tIrj.js → sections-editor-C4NhZuXp.js} +1 -1
- package/dist/client/assets/{select-KcyEErkL.js → select-C5Qbx8Kw.js} +1 -1
- package/dist/client/assets/{select-model-DMvqNufS.js → select-model-CIR4DebA.js} +1 -1
- package/dist/client/assets/{seo-editor-CAiJAVeJ.js → seo-editor-b4BYh3S0.js} +1 -1
- package/dist/client/assets/{settings-tab-BeEZ3rCK.js → settings-tab-wJidOo3Q.js} +1 -1
- package/dist/client/assets/{sheet-CuLnIbRo.js → sheet-DvqFDAlT.js} +1 -1
- package/dist/client/assets/{shell-layout-C6AQzwc3.js → shell-layout-knqcStSb.js} +1 -1
- package/dist/client/assets/{sidebar-BhJ_FDqo.js → sidebar-CPIvGktg.js} +1 -1
- package/dist/client/assets/{skill-preview-Cd79qVc9.js → skill-preview-Dr3uDA0q.js} +1 -1
- package/dist/client/assets/{skills-yKnfnfGJ.js → skills-B7mrIhFJ.js} +1 -1
- package/dist/client/assets/{sso-BUabXZ66.js → sso-JfSG6sY-.js} +1 -1
- package/dist/client/assets/{store-3eZAp6_n.js → store-CRU_7Bvk.js} +1 -1
- package/dist/client/assets/store-registry-Q0TOzx2-.js +2 -0
- package/dist/client/assets/{switch-C4XaykKw.js → switch-Cf30aXkY.js} +1 -1
- package/dist/client/assets/{synced-repos-DcnAsWA0.js → synced-repos-C5RH3GVW.js} +1 -1
- package/dist/client/assets/{table-CuChyRJ6.js → table-D6IMkB4T.js} +1 -1
- package/dist/client/assets/{tabs-CU7XBCqm.js → tabs-DSOAK--9.js} +1 -1
- package/dist/client/assets/{task-board-DyB0568a.js → task-board-DpuhnKzF.js} +1 -1
- package/dist/client/assets/{task-route-DadSSpKF.js → task-route-CPm3yGLT.js} +1 -1
- package/dist/client/assets/{task-status-BlXRiQX3.js → task-status-CesK2f9G.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DAdOZgEg.js → taskboard-analytics-DWWMZZdU.js} +1 -1
- package/dist/client/assets/{tasks-BfdiokBG.js → tasks-BGbHPX0w.js} +1 -1
- package/dist/client/assets/tasks-DTqkQgJb.js +1 -0
- package/dist/client/assets/{textarea-__p0yo6J.js → textarea-DXDx4Cy0.js} +1 -1
- package/dist/client/assets/{thread-intent-D1siGaGJ.js → thread-intent-Cdmdi4Qs.js} +1 -1
- package/dist/client/assets/{thread-route-CP3pE7Uw.js → thread-route-BMICHdvv.js} +1 -1
- package/dist/client/assets/{thread-route-DNm3Iu0z.js → thread-route-CnHTxNkK.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BXdoz1zb.js → thread-sheet-body-BGNoSu7i.js} +1 -1
- package/dist/client/assets/{toggle-group-DngX-VZh.js → toggle-group-Cj0z3PRY.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CoaHzqzV.js → toolbar-icon-button-BehOLAeE.js} +1 -1
- package/dist/client/assets/{tooltip-DiUW72WF.js → tooltip-BDUrOxgN.js} +1 -1
- package/dist/client/assets/{track-BkvZQsBp.js → track-BJHbd99y.js} +1 -1
- package/dist/client/assets/{types-CVnCSrZu.js → types-DlfDRNRB.js} +1 -1
- package/dist/client/assets/{usage-stats-BXE2Nb57.js → usage-stats-nuoZXpxw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CTTRbTuh.js → use-ai-providers-QvFz5SFX.js} +1 -1
- package/dist/client/assets/{use-automations-DcNKFRtS.js → use-automations-jwtTHLHf.js} +1 -1
- package/dist/client/assets/{use-autosave-CoCLYAKc.js → use-autosave-D5Khb0ju.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B81sEzsb.js → use-connect-companion-DDWKSdwn.js} +1 -1
- package/dist/client/assets/{use-connection-CM4EgQPU.js → use-connection-CpOBycNm.js} +1 -1
- package/dist/client/assets/{use-copy-C3r_mwJc.js → use-copy-M0GDas2Q.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-4OanjUDo.js → use-create-virtual-mcp-BFxHh87r.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Bwn26aTV.js → use-date-fns-locale-BAJylOmL.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CDIZf7vS.js → use-debounced-autosave-CAXyZd0j.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dt5Xp7np.js → use-debounced-value-CVkWNti9.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BHIJCyKo.js → use-deco-credits-D4THYOkS.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B1TzFZ8t.js → use-decopilot-events-DlUI-60k.js} +1 -1
- package/dist/client/assets/{use-delete-connection-MEDuWXFM.js → use-delete-connection-BznnJgfw.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DhSh82eL.js → use-deployment-admin-Buoxj9IO.js} +1 -1
- package/dist/client/assets/{use-entitlements-Du1tEG7N.js → use-entitlements-BP7WwVM_.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-JhDvVPsK.js → use-fast-preview-draft-url-Cu15Ye_n.js} +1 -1
- package/dist/client/assets/{use-file-configs-BlwCwjVB.js → use-file-configs-CyU7Mcil.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C-upQcAM.js → use-infinite-scroll-AtjP0SZW.js} +1 -1
- package/dist/client/assets/{use-join-requests-B0KW0ohy.js → use-join-requests-aG0T3ECI.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-A9lWrQg1.js → use-main-panel-tabs-IIO818_j.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DbP9ug3L.js → use-mcp-auth-status-bcJwzpw7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D-7BuLrC.js → use-mcp-client-Bf0VpOBw.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-OVUxMbpa.js → use-mcp-prompts-DxcgJEJ7.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bka5B8hg.js → use-mcp-tools-DhZM9sTC.js} +1 -1
- package/dist/client/assets/{use-members-0fLORe9n.js → use-members-CsAzsmBA.js} +1 -1
- package/dist/client/assets/{use-mobile-C2LLCzmr.js → use-mobile-C5SrWG9H.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C_uFa92h.js → use-navigate-to-agent-DOYg6fyU.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CDGeF8Bu.js → use-open-billing-url-Cjz--xRu.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B9bt8Cd1.js → use-org-auth-client-C16MEGGe.js} +1 -1
- package/dist/client/assets/{use-org-fs-B-yTulsp.js → use-org-fs-BSDHmLev.js} +1 -1
- package/dist/client/assets/{use-org-notice-CKxbuoVc.js → use-org-notice-BALWnbFe.js} +1 -1
- package/dist/client/assets/{use-org-sso-DDMls_8S.js → use-org-sso-Dpa7KwXX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-B8cSYq0q.js → use-organization-roles-Cog-K9KN.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DmPwVQte.js → use-organization-settings-pqtCEzuj.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-ambGkCyT.js → use-panel-navigate-bhAOxlzp.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BG-Guaa9.js → use-project-native-view-presence-DnirX6kM.js} +1 -1
- package/dist/client/assets/{use-project-scope-CQpPI5pW.js → use-project-scope-BfeOcOX-.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Dwr4-IPF.js → use-registry-connections-BJotyFay.js} +1 -1
- package/dist/client/assets/{use-releases-B5rxjDuL.js → use-releases-CjPEhpWE.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DmNTAMUo.js → use-reports-diagnostic-R9_oa5XU.js} +1 -1
- package/dist/client/assets/{use-route-default-main-BGhZVnpH.js → use-route-default-main-DO9nAIOF.js} +1 -1
- package/dist/client/assets/{use-secrets-2K048iDI.js → use-secrets-Do9S2OuA.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DGf1SdCz.js → use-section-preview-base-DTsnvRL8.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DRNcjNGp.js → use-session-runtime--RMOkDN5.js} +1 -1
- package/dist/client/assets/{use-tags-Dz0JHmit.js → use-tags-C-xYWG0d.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BAbIvIck.js → use-task-board-analytics-DqKWhXe3.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DFjC02ql.js → use-task-metadata-Bm567Cyu.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CNFVOo0z.js → use-thread-outputs-DA9fNv-d.js} +1 -1
- package/dist/client/assets/{use-view-mode-8Q0KLbhQ.js → use-view-mode-mEqX4oRI.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BqJjq2ej.js → use-virtual-mcp-BvrPyGzX.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C-lwb5Ji.js +1 -0
- package/dist/client/assets/{useQueries-CA76Qw5x.js → useQueries-DqQ6INqi.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CjJ_vWiS.js +1 -0
- package/dist/client/assets/{users-CxTXFPjN.js → users-BS3mOvNq.js} +1 -1
- package/dist/client/assets/{utils-Bsd7FiR5.js → utils-DAYUNxCI.js} +1 -1
- package/dist/client/assets/{variant-calendar-un_6bKKS.js → variant-calendar-D_T3c3MC.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DxweoUUC.js → variant-matcher-override-BSFlzIhP.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DYM-xxC9.js → view-mode-toggle-CzqFE_Lp.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DuQ9gz9U.js → virtual-mcp-CG3JbZx8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +152 -140
- package/dist/server/server.js +144 -132
- package/package.json +1 -1
- package/dist/client/assets/agent-app-CVC_Lvyo.js +0 -1
- package/dist/client/assets/agent-deck-7gpymxb7.js +0 -1
- package/dist/client/assets/agent-file-CSxJMcjv.js +0 -1
- package/dist/client/assets/agent-library-file-ISKmBGds.js +0 -1
- package/dist/client/assets/agent-settings-DWKPsWvq.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Cafkyw0y.js +0 -2
- package/dist/client/assets/agent-view-DZGYQu75.js +0 -1
- package/dist/client/assets/api-keys-Cx887mfW.js +0 -1
- package/dist/client/assets/app-editor-FvLT9tg7.js +0 -1
- package/dist/client/assets/automations-stm8A17b.js +0 -1
- package/dist/client/assets/category-editor-m0T0M7LG.js +0 -1
- package/dist/client/assets/project-reports-BN2wnBRk.js +0 -1
- package/dist/client/assets/project-tasks-BiN2QJyD.js +0 -1
- package/dist/client/assets/record-editor-C0OpqhBn.js +0 -1
- package/dist/client/assets/registry-BNANrwsH.js +0 -2
- package/dist/client/assets/reports-ClRllm5D.js +0 -1
- package/dist/client/assets/store-registry-BSlzFQHg.js +0 -2
- package/dist/client/assets/tasks-CJSTXe38.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BigrA6tZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-OUbXRXpI.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-
|
|
2
|
-
import{r as x,aa as yt,at as Je,ab as Se,c as pe,b as Ce,j as n,K as $r,e as Br,h as kt,B as Ye,au as Ir,M as Gt,av as zr,as as Kr,l as Ke,o as Hr,t as yn}from"./index-BYo7xjw_.js";import{A as Ur}from"./agent-view-guard-BwVsll67.js";import{F as Wr}from"./feature-gate-OPGtzGpZ.js";import{a as Vr,b as St}from"./chat-context-Bu5sIHkQ.js";import{d as qr,a as Gr}from"./use-virtual-mcp-BqJjq2ej.js";import{c as zn,d as Jt,f as Jr}from"./sandbox-lifecycle-context-BKxKj4xP.js";import{e as Yr,d as Qr}from"./backoff-8mStPHYB.js";import{a as Xr}from"./thread-intent-D1siGaGJ.js";import{u as Kn}from"./use-session-runtime-DRNcjNGp.js";import{u as Zr}from"./use-mobile-C2LLCzmr.js";import{t as es}from"./ChevronUp-BrOu8rnp.js";import{v as Hn,C as ts,D as ns,h as wn,y as rs,E as kn,F as ss,G as os,H as is}from"./agent-icon-CWoY8dlp.js";import{s as Sn}from"./Database01-CJba45_T.js";import{n as Un}from"./LinkExternal01-BDgcOJqm.js";import{s as as}from"./Plus-BEdGLMcS.js";import{i as ls}from"./SearchLg-D8sOk12E.js";import{c as ut,T as mt,a as ft}from"./tooltip-DiUW72WF.js";import{T as pt}from"./toolbar-icon-button-CoaHzqzV.js";import{P as cs}from"./index-CSGdKnA2.js";import{b as ds,a as us,u as Wn,g as ms,c as fs,B as It,P as ps,r as hs,R as gs,d as vs,e as Yt,f as Vn,h as xs,l as bs,m as ys,i as ws,p as ks,j as Ss,S as zt}from"./runnable-block-editor-D2pnRUMc.js";import{w as ht}from"./variant-matcher-override-DxweoUUC.js";import{N as Ps,b as js,s as wt,n as Qt,c as qn,f as Fe,v as Gn,h as Es,e as Ns,d as Cs,j as Rs,k as Pn}from"./claim-phase-copy-0btUuJoC.js";import{r as Ts,w as Ls,D as _s,b as jn,a as Os}from"./section-preview-url-Csj0_ZDg.js";import{u as Ds}from"./use-fast-preview-draft-url-JhDvVPsK.js";import{r as Jn,l as Yn,u as As,w as Ms}from"./last-preview-page-By8mKu-G.js";import{u as Fs}from"./use-is-desktop-app-BNujXJc_.js";import{u as $s}from"./shell-layout-C6AQzwc3.js";import{u as Wt}from"./useQueries-CA76Qw5x.js";import{i as Bs}from"./ArrowRight-BbuAJZmx.js";import{a as Qn,b as Xn,c as Is,d as zs,e as Ks,C as Hs}from"./command-Aa0mYduw.js";import{b as Zn,D as er,c as tr,d as nr,e as Us}from"./dialog-D57kq_tP.js";import{I as En}from"./input-B0Uinzv0.js";import{u as rr}from"./blocks-preview-workspace-context-DD1sbvCI.js";import{i as Ws}from"./AlertCircle-DkoTBUue.js";import{E as Xt}from"./empty-state-Cad5zFK6.js";import{i as Vs}from"./X-BH7q4C1t.js";import{M as qs}from"./monaco-editor-DL6feSNU.js";import{R as Nn,a as gt,b as Cn}from"./resizable-DtEfzvUR.js";import{a as sr}from"./use-org-notice-CKxbuoVc.js";import{r as Gs}from"./virtual-mcp-DuQ9gz9U.js";import{b as Kt}from"./use-project-scope-CQpPI5pW.js";import{G as Rn}from"./github-icon-BO2ZIrI7.js";import{R as Js}from"./repository-import-picker-BBGtjhUh.js";import{r as Ys}from"./use-main-panel-tabs-A9lWrQg1.js";import{u as Qs}from"./use-task-metadata-DFjC02ql.js";import{b as Xs}from"./thread-route-DNm3Iu0z.js";import"./use-panel-navigate-ambGkCyT.js";import"./feature-paywall-DsAStIcU.js";import"./Check-BDjrzcrN.js";import"./plan-ladder-BxTjLX-u.js";import"./use-entitlements-Du1tEG7N.js";import"./autosend-DBLW1BiY.js";import"./hooks-ClWLwZb6.js";import"./use-mcp-client-D-7BuLrC.js";import"./auth-DQLPrt1d.js";import"./task-board-DyB0568a.js";import"./schema-CGSQcL_x.js";import"./use-ai-providers-CTTRbTuh.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-B1TzFZ8t.js";import"./use-organization-settings-DmPwVQte.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-dFp1h9Fm.js";import"./ArrowUp-CseIJyft.js";import"./ArrowLeft-eoxjWHed.js";import"./Tool02-DEN5a-af.js";import"./TrendUp01-BK_K6NH_.js";import"./ZoomOut-CvFdKFHJ.js";import"./Users03-CUK-7hPD.js";import"./CheckCircle-CSZ4Kehv.js";import"./ChevronRight-DFWFq-ve.js";import"./ChevronSelectorVertical-C9J9C02y.js";import"./DotsVertical-mYRVr9AH.js";import"./UserSquare-DZNy5OUH.js";import"./Copy01-CCOGzU1d.js";import"./CreditCard01-CuoUWRm0.js";import"./MessageCircle01-CwQvoxPA.js";import"./Download01-Bd0rofRl.js";import"./Printer-BgQcHd8s.js";import"./Settings02-7e_CWXN4.js";import"./Eye-74QOe9cC.js";import"./File02-CmMbIRXN.js";import"./Share07-CWr7FJF7.js";import"./GitBranch01-BKO8WN_h.js";import"./Globe01-Ck7RTkU3.js";import"./SwitchHorizontal01-BRr1FvfD.js";import"./HardDrive-DU6J9iPu.js";import"./Image01-DnYDSI2h.js";import"./Key01-BZd6Jwvq.js";import"./Link01-B52qN1xV.js";import"./Monitor01-BcYUPleF.js";import"./Sun-I1e-KcTY.js";import"./Package-C4SRuwMw.js";import"./Palette-C9EL1sNC.js";import"./Play-CyyInR_v.js";import"./SearchMd-CVv1yVth.js";import"./Shield01-B8e5sZlX.js";import"./Stars01-DtXaEO3a.js";import"./Trash01-DGA8npEZ.js";import"./Upload01-B3v_JBAz.js";import"./User01-Dbdndpwo.js";import"./Users01-AYbQCr7m.js";import"./XCircle-CFDcIdAJ.js";import"./XClose-2vlbdyhB.js";import"./Zap-Df8_LH9g.js";import"./index-C_tMl4q8.js";import"./decofile-api-DEul9pGZ.js";import"./utils-Bsd7FiR5.js";import"./pair-CyjnQvo_.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible--RUSBZp8.js";import"./use-copy-C3r_mwJc.js";import"./usage-stats-BXE2Nb57.js";import"./markdown-BLbEs4th.js";import"./org-file-open-context-BFThBGhY.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BuE-fXND.js";import"./types-CVnCSrZu.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-D1lNGMSB.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-CuLnIbRo.js";import"./integration-icon-Jv69owhG.js";import"./use-connection-CM4EgQPU.js";import"./use-navigate-to-agent-C_uFa92h.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-OVUxMbpa.js";import"./index-DqscriGX.js";import"./form-x2RdyMbl.js";import"./label-B9P1qvVv.js";import"./use-thread-outputs-CNFVOo0z.js";import"./file-type-icon-DwxUV7LB.js";import"./popover-ZSYA9qhq.js";import"./scroll-area-DEsjJURz.js";import"./select-KcyEErkL.js";import"./calendar-CuSfsKMP.js";import"./textarea-__p0yo6J.js";import"./rich-text-link-control-S-iuuCcb.js";import"./switch-C4XaykKw.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-l7cu0teq.js";import"./search-input-Ckzw9Q8f.js";import"./tabs-CU7XBCqm.js";import"./use-debounced-value-Dt5Xp7np.js";import"./use-file-configs-BlwCwjVB.js";import"./asset-utils-B6xmdxJ-.js";import"./useInfiniteQuery-BigrA6tZ.js";import"./infiniteQueryObserver-BegmJhfO.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-DngX-VZh.js";import"./alert-dialog-Cj4mq8qj.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-CA5LIB-l.js";import"./download-app-dialog-Dd6sw41_.js";import"./anchors-yqDzZN4K.js";import"./command-palette-store-AuoaPk0G.js";import"./project-icon-B44PuWmC.js";import"./required-auth-layout-DfvknvbD.js";import"./use-org-sso-DDMls_8S.js";import"./index-dzbklFKC.js";import"./editor-DhL1XnKC.js";import"./repository-picker-C-TSiXvU.js";import"./collection-search-CYFbkY1e.js";import"./use-route-default-main-BGhZVnpH.js";import"./use-mcp-tools-Bka5B8hg.js";import"./index-D04wJiA7.js";import"./drawer-DDadqt4q.js";import"./input-Dzyq242f.js";import"./chat-draft-CDnPwvf3.js";import"./use-deco-credits-BHIJCyKo.js";import"./use-open-billing-url-CDGeF8Bu.js";import"./decopilot-C-Fh2iwl.js";import"./checkbox-KtkqQde0.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-Br-oQZuQ.js";import"./input-BWSDRY3j.js";import"./hooks-BX3ndMg6.js";import"./use-org-fs-B-yTulsp.js";import"./question-004-sINsf4GQ.js";import"./use-members-0fLORe9n.js";import"./use-org-auth-client-B9bt8Cd1.js";import"./add-connection-dialog-CazdSHRl.js";import"./extract-connection-data-Dh_Eo1wZ.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-BYV9fPN2.js";import"./connection-card-Dr9bHZoV.js";import"./use-registry-connections-Dwr4-IPF.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-BXp-lVpJ.js";import"./authenticate-and-persist-oauth-DiSz7oRO.js";import"./mcp-oauth-gEPmFmtm.js";import"./collection-tabs-Cub0gFzH.js";import"./badge-BHHKIdAQ.js";import"./use-infinite-scroll-C-upQcAM.js";import"./useSuspenseInfiniteQuery-OUbXRXpI.js";import"./use-project-native-view-presence-BG-Guaa9.js";import"./site-slug-uya6Wp4-.js";const Zs={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function eo(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:o=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?Zs:s&&o&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const to=1e4,no=1e3,ro=3e4;function so({iframeRef:t,src:e,active:r}){const s=x.useRef(0),o=x.useRef(null),u=x.useRef(null),d=x.useRef(e),l=x.useRef(r);d.current=e,l.current=r;const a=()=>{o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),o.current=null,u.current=null},c=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,h()},to)},h=()=>{if(!l.current||!d.current)return;u.current&&clearTimeout(u.current);const E=Yr(ro,no,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,w=d.current;!g||!w||!l.current||(g.src=w,c())},E)},p=()=>{s.current=0,a()},f=()=>{o.current&&(clearTimeout(o.current),o.current=null),h()};return x.useEffect(()=>{if(a(),s.current=0,!(!r||!e))return c(),a},[e,r]),{handleLoad:p,handleError:f}}var Tn;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Tn||(Tn={}));const oo=yt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:yt({width:Je(),height:Je()}),position:yt({x:Je(),y:Je()})}),io=`(function() {
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-C4NhZuXp.js","assets/index-Cjhl57C5.js","assets/index-CpNTsElB.css","assets/chat-context-H28jTcB6.js","assets/use-panel-navigate-bhAOxlzp.js","assets/thread-route-CnHTxNkK.js","assets/use-project-scope-BfeOcOX-.js","assets/use-virtual-mcp-BvrPyGzX.js","assets/use-mcp-client-Bf0VpOBw.js","assets/auth-5BCk_I76.js","assets/github-repo-BknN0SVI.js","assets/autosend-ClVEnX_S.js","assets/thread-intent-Cdmdi4Qs.js","assets/slugify-CEUa2lfQ.js","assets/hooks-D5z7CgCt.js","assets/backoff-8mStPHYB.js","assets/task-board-DpuhnKzF.js","assets/schema-BTHH8GSh.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-BP7WwVM_.js","assets/use-ai-providers-QvFz5SFX.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-DlUI-60k.js","assets/use-organization-settings-pqtCEzuj.js","assets/ChevronUp-XOZg-HiO.js","assets/agent-icon-Cyx7Smko.js","assets/AlertCircle-Ddrj7VUD.js","assets/Tool01-C0-Xqkxp.js","assets/ArrowUp-Dhew3Evs.js","assets/ArrowLeft-BKbGYh2B.js","assets/Tool02-CE2Fqpba.js","assets/ArrowRight-6hYTENh_.js","assets/TrendUp01-uTlAwt0S.js","assets/ZoomOut-CJKT31Kx.js","assets/Users03-BaYGM99c.js","assets/CheckCircle-DQbrJHsr.js","assets/Check-Dnz3uW0f.js","assets/ChevronRight-DK_MoZ-7.js","assets/ChevronSelectorVertical-B64gqtde.js","assets/DotsVertical-Dyzdr42E.js","assets/UserSquare-D-v_LgOa.js","assets/Copy01-l6PfB431.js","assets/CreditCard01-DQsLDZWx.js","assets/Database01-vUZciuwF.js","assets/MessageCircle01-DELRsE6A.js","assets/Download01-_eUxcgg1.js","assets/Printer-Dn2De3ak.js","assets/Settings02-BLcAotUO.js","assets/Eye-B7hZLXRZ.js","assets/File02-D1W0NjQG.js","assets/Share07-BypmcbEF.js","assets/GitBranch01-CRUhFeKk.js","assets/Globe01-D9zr3JIX.js","assets/SwitchHorizontal01-l3o5r_PJ.js","assets/HardDrive-7_ZjnLMv.js","assets/Image01-7_HSDHV3.js","assets/Key01-ti2CpCiW.js","assets/Link01-DYWtgbsz.js","assets/LinkExternal01--55N_6ts.js","assets/Monitor01-BoIweS2p.js","assets/Sun-CEaGM44s.js","assets/Package-CSgBbMFc.js","assets/Palette-CaHW8y9T.js","assets/Play-BolLrTAn.js","assets/Plus-C5azC59K.js","assets/SearchLg-BZUR3n9c.js","assets/SearchMd-Ms_xvSfF.js","assets/Shield01-C_5dC1mR.js","assets/Stars01-DTStBsXP.js","assets/Trash01-DPQmLNZV.js","assets/Upload01-D-20AdeD.js","assets/User01-BA1LEBvQ.js","assets/Users01-BpRvBK8_.js","assets/XCircle-BhDUy79p.js","assets/XClose-Bw0VS-dj.js","assets/X-Dh_K-VDi.js","assets/Zap-TxetSnv7.js","assets/scroll-area-YQLTU6PQ.js","assets/select-C5Qbx8Kw.js","assets/index-C-9h82SA.js","assets/tooltip-BDUrOxgN.js","assets/dialog-SKkzdrcZ.js","assets/input-CImpk8th.js","assets/runnable-block-editor-CNau3nKH.js","assets/use-session-runtime--RMOkDN5.js","assets/decofile-api-Cdto5FQ3.js","assets/utils-DAYUNxCI.js","assets/sandbox-url-D3mC8qhT.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-BHYz9F-Z.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-CkoFdRnK.js","assets/use-copy-M0GDas2Q.js","assets/usage-stats-nuoZXpxw.js","assets/markdown-Cqyyk371.js","assets/org-file-open-context-Dd47NmeH.js","assets/use-mobile-C5SrWG9H.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-zIU2-SQD.js","assets/types-DlfDRNRB.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-BQS5H6XZ.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/shell-layout-knqcStSb.js","assets/avatar-CR9KEb-s.js","assets/download-app-dialog-DQE0snIy.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-BALWnbFe.js","assets/command-palette-store-BL5hnWnv.js","assets/command-CtFXOSiX.js","assets/index-CdCU_XIc.js","assets/integration-icon-Dq1cJDX8.js","assets/project-icon-CiuTzDLi.js","assets/required-auth-layout-t1gcmOkS.js","assets/use-org-sso-Dpa7KwXX.js","assets/shell-layout-CuFt8bor.css","assets/sheet-DvqFDAlT.js","assets/use-connection-CpOBycNm.js","assets/use-navigate-to-agent-DOYg6fyU.js","assets/use-mcp-prompts-DxcgJEJ7.js","assets/index-Cm__CFgO.js","assets/form-H9AoFazU.js","assets/label-Bk7iLZH7.js","assets/use-thread-outputs-DA9fNv-d.js","assets/file-type-icon-CMiynV8b.js","assets/popover-Bn0xXLy8.js","assets/monaco-editor-Bg8UPXit.js","assets/editor-oZAad1yU.js","assets/calendar-SAWOBJxF.js","assets/textarea-DXDx4Cy0.js","assets/rich-text-link-control-DdZo0zBm.js","assets/switch-Cf30aXkY.js","assets/safe-image-url-D5z803Ot.js","assets/dropdown-menu-DRuEZVW9.js","assets/search-input-Cx2Izgwg.js","assets/tabs-DSOAK--9.js","assets/use-debounced-value-CVkWNti9.js","assets/use-file-configs-CyU7Mcil.js","assets/asset-utils-Dl8tpNxx.js","assets/useInfiniteQuery-C-lwb5Ji.js","assets/infiniteQueryObserver-CTAqrRzL.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-Cj0z3PRY.js","assets/alert-dialog-DfGZ77rh.js","assets/sandbox-git-api-CMdpE2TE.js","assets/mustache-CDAsLK2v.js","assets/page-seo-form-DbL4-FYa.js","assets/use-section-preview-base-DTsnvRL8.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-BSFlzIhP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as x,aa as yt,at as Je,ab as Se,c as pe,b as Ce,j as n,K as $r,e as Br,h as kt,B as Ye,au as Ir,M as Gt,av as zr,as as Kr,l as Ke,o as Hr,t as yn}from"./index-Cjhl57C5.js";import{A as Ur}from"./agent-view-guard-Cc93o9kZ.js";import{F as Wr}from"./feature-gate-UfjS24Ou.js";import{a as Vr,b as St}from"./chat-context-H28jTcB6.js";import{d as qr,a as Gr}from"./use-virtual-mcp-BvrPyGzX.js";import{c as zn,d as Jt,f as Jr}from"./sandbox-lifecycle-context-Dhs5hLj1.js";import{e as Yr,d as Qr}from"./backoff-8mStPHYB.js";import{a as Xr}from"./thread-intent-Cdmdi4Qs.js";import{u as Kn}from"./use-session-runtime--RMOkDN5.js";import{u as Zr}from"./use-mobile-C5SrWG9H.js";import{t as es}from"./ChevronUp-XOZg-HiO.js";import{v as Hn,C as ts,D as ns,h as wn,y as rs,E as kn,F as ss,G as os,H as is}from"./agent-icon-Cyx7Smko.js";import{s as Sn}from"./Database01-vUZciuwF.js";import{n as Un}from"./LinkExternal01--55N_6ts.js";import{s as as}from"./Plus-C5azC59K.js";import{i as ls}from"./SearchLg-BZUR3n9c.js";import{c as ut,T as mt,a as ft}from"./tooltip-BDUrOxgN.js";import{T as pt}from"./toolbar-icon-button-BehOLAeE.js";import{P as cs}from"./index-CZFOUXi8.js";import{b as ds,a as us,u as Wn,g as ms,c as fs,B as It,P as ps,r as hs,R as gs,d as vs,e as Yt,f as Vn,h as xs,l as bs,m as ys,i as ws,p as ks,j as Ss,S as zt}from"./runnable-block-editor-CNau3nKH.js";import{w as ht}from"./variant-matcher-override-BSFlzIhP.js";import{N as Ps,b as js,s as wt,n as Qt,c as qn,f as Fe,v as Gn,h as Es,e as Ns,d as Cs,j as Rs,k as Pn}from"./claim-phase-copy-0btUuJoC.js";import{r as Ts,w as Ls,D as _s,b as jn,a as Os}from"./section-preview-url-Csj0_ZDg.js";import{u as Ds}from"./use-fast-preview-draft-url-Cu15Ye_n.js";import{r as Jn,l as Yn,u as As,w as Ms}from"./last-preview-page-BmfL1c7N.js";import{u as Fs}from"./use-is-desktop-app-BNujXJc_.js";import{u as $s}from"./shell-layout-knqcStSb.js";import{u as Wt}from"./useQueries-DqQ6INqi.js";import{i as Bs}from"./ArrowRight-6hYTENh_.js";import{a as Qn,b as Xn,c as Is,d as zs,e as Ks,C as Hs}from"./command-CtFXOSiX.js";import{b as Zn,D as er,c as tr,d as nr,e as Us}from"./dialog-SKkzdrcZ.js";import{I as En}from"./input-CImpk8th.js";import{u as rr}from"./blocks-preview-workspace-context-Dh0KsAvE.js";import{i as Ws}from"./AlertCircle-Ddrj7VUD.js";import{E as Xt}from"./empty-state-Bi9IU32F.js";import{i as Vs}from"./X-Dh_K-VDi.js";import{M as qs}from"./monaco-editor-Bg8UPXit.js";import{R as Nn,a as gt,b as Cn}from"./resizable-CTEnH3yu.js";import{a as sr}from"./use-org-notice-BALWnbFe.js";import{r as Gs}from"./virtual-mcp-CG3JbZx8.js";import{b as Kt}from"./use-project-scope-BfeOcOX-.js";import{G as Rn}from"./github-icon-TtZ8EUXE.js";import{R as Js}from"./repository-import-picker-Bo_Cabzz.js";import{r as Ys}from"./use-main-panel-tabs-IIO818_j.js";import{u as Qs}from"./use-task-metadata-Bm567Cyu.js";import{b as Xs}from"./thread-route-CnHTxNkK.js";import"./use-panel-navigate-bhAOxlzp.js";import"./feature-paywall-pQTqQ94T.js";import"./Check-Dnz3uW0f.js";import"./plan-ladder-Cqfgwdfc.js";import"./use-entitlements-BP7WwVM_.js";import"./autosend-ClVEnX_S.js";import"./hooks-D5z7CgCt.js";import"./use-mcp-client-Bf0VpOBw.js";import"./auth-5BCk_I76.js";import"./task-board-DpuhnKzF.js";import"./schema-BTHH8GSh.js";import"./use-ai-providers-QvFz5SFX.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DlUI-60k.js";import"./use-organization-settings-pqtCEzuj.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-C0-Xqkxp.js";import"./ArrowUp-Dhew3Evs.js";import"./ArrowLeft-BKbGYh2B.js";import"./Tool02-CE2Fqpba.js";import"./TrendUp01-uTlAwt0S.js";import"./ZoomOut-CJKT31Kx.js";import"./Users03-BaYGM99c.js";import"./CheckCircle-DQbrJHsr.js";import"./ChevronRight-DK_MoZ-7.js";import"./ChevronSelectorVertical-B64gqtde.js";import"./DotsVertical-Dyzdr42E.js";import"./UserSquare-D-v_LgOa.js";import"./Copy01-l6PfB431.js";import"./CreditCard01-DQsLDZWx.js";import"./MessageCircle01-DELRsE6A.js";import"./Download01-_eUxcgg1.js";import"./Printer-Dn2De3ak.js";import"./Settings02-BLcAotUO.js";import"./Eye-B7hZLXRZ.js";import"./File02-D1W0NjQG.js";import"./Share07-BypmcbEF.js";import"./GitBranch01-CRUhFeKk.js";import"./Globe01-D9zr3JIX.js";import"./SwitchHorizontal01-l3o5r_PJ.js";import"./HardDrive-7_ZjnLMv.js";import"./Image01-7_HSDHV3.js";import"./Key01-ti2CpCiW.js";import"./Link01-DYWtgbsz.js";import"./Monitor01-BoIweS2p.js";import"./Sun-CEaGM44s.js";import"./Package-CSgBbMFc.js";import"./Palette-CaHW8y9T.js";import"./Play-BolLrTAn.js";import"./SearchMd-Ms_xvSfF.js";import"./Shield01-C_5dC1mR.js";import"./Stars01-DTStBsXP.js";import"./Trash01-DPQmLNZV.js";import"./Upload01-D-20AdeD.js";import"./User01-BA1LEBvQ.js";import"./Users01-BpRvBK8_.js";import"./XCircle-BhDUy79p.js";import"./XClose-Bw0VS-dj.js";import"./Zap-TxetSnv7.js";import"./index-C-9h82SA.js";import"./decofile-api-Cdto5FQ3.js";import"./utils-DAYUNxCI.js";import"./pair-BHYz9F-Z.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-CkoFdRnK.js";import"./use-copy-M0GDas2Q.js";import"./usage-stats-nuoZXpxw.js";import"./markdown-Cqyyk371.js";import"./org-file-open-context-Dd47NmeH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-zIU2-SQD.js";import"./types-DlfDRNRB.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BQS5H6XZ.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-DvqFDAlT.js";import"./integration-icon-Dq1cJDX8.js";import"./use-connection-CpOBycNm.js";import"./use-navigate-to-agent-DOYg6fyU.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-DxcgJEJ7.js";import"./index-Cm__CFgO.js";import"./form-H9AoFazU.js";import"./label-Bk7iLZH7.js";import"./use-thread-outputs-DA9fNv-d.js";import"./file-type-icon-CMiynV8b.js";import"./popover-Bn0xXLy8.js";import"./scroll-area-YQLTU6PQ.js";import"./select-C5Qbx8Kw.js";import"./calendar-SAWOBJxF.js";import"./textarea-DXDx4Cy0.js";import"./rich-text-link-control-DdZo0zBm.js";import"./switch-Cf30aXkY.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-DRuEZVW9.js";import"./search-input-Cx2Izgwg.js";import"./tabs-DSOAK--9.js";import"./use-debounced-value-CVkWNti9.js";import"./use-file-configs-CyU7Mcil.js";import"./asset-utils-Dl8tpNxx.js";import"./useInfiniteQuery-C-lwb5Ji.js";import"./infiniteQueryObserver-CTAqrRzL.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-Cj0z3PRY.js";import"./alert-dialog-DfGZ77rh.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-CR9KEb-s.js";import"./download-app-dialog-DQE0snIy.js";import"./anchors-yqDzZN4K.js";import"./command-palette-store-BL5hnWnv.js";import"./project-icon-CiuTzDLi.js";import"./required-auth-layout-t1gcmOkS.js";import"./use-org-sso-Dpa7KwXX.js";import"./index-CdCU_XIc.js";import"./editor-oZAad1yU.js";import"./repository-picker-CRqY_3jm.js";import"./collection-search-B2t2IaOK.js";import"./use-route-default-main-DO9nAIOF.js";import"./use-mcp-tools-DhZM9sTC.js";import"./index-BC68yJ9a.js";import"./drawer-BleKwXKQ.js";import"./input-DNp0K9zv.js";import"./chat-draft-BTIUwp87.js";import"./use-deco-credits-D4THYOkS.js";import"./use-open-billing-url-Cjz--xRu.js";import"./decopilot-BecreIFq.js";import"./checkbox-D_GODf3h.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-BQgXOHRB.js";import"./input-DkPDVfFk.js";import"./hooks-abtcLONn.js";import"./use-org-fs-BSDHmLev.js";import"./question-004-sINsf4GQ.js";import"./use-members-CsAzsmBA.js";import"./use-org-auth-client-C16MEGGe.js";import"./add-connection-dialog-Bwzbw2rJ.js";import"./extract-connection-data-C8zB3-0T.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DhRpG43c.js";import"./connection-card-BCofIpgI.js";import"./use-registry-connections-BJotyFay.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-C7Pc9F54.js";import"./authenticate-and-persist-oauth-Bj_Y1vgm.js";import"./mcp-oauth-qvcFIOHE.js";import"./collection-tabs-DAqaNYVU.js";import"./badge-DOT8HE5Z.js";import"./use-infinite-scroll-AtjP0SZW.js";import"./useSuspenseInfiniteQuery-CjJ_vWiS.js";import"./use-project-native-view-presence-DnirX6kM.js";import"./site-slug-uya6Wp4-.js";const Zs={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function eo(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:o=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?Zs:s&&o&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const to=1e4,no=1e3,ro=3e4;function so({iframeRef:t,src:e,active:r}){const s=x.useRef(0),o=x.useRef(null),u=x.useRef(null),d=x.useRef(e),l=x.useRef(r);d.current=e,l.current=r;const a=()=>{o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),o.current=null,u.current=null},c=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,h()},to)},h=()=>{if(!l.current||!d.current)return;u.current&&clearTimeout(u.current);const E=Yr(ro,no,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,w=d.current;!g||!w||!l.current||(g.src=w,c())},E)},p=()=>{s.current=0,a()},f=()=>{o.current&&(clearTimeout(o.current),o.current=null),h()};return x.useEffect(()=>{if(a(),s.current=0,!(!r||!e))return c(),a},[e,r]),{handleLoad:p,handleError:f}}var Tn;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Tn||(Tn={}));const oo=yt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:yt({width:Je(),height:Je()}),position:yt({x:Je(),y:Je()})}),io=`(function() {
|
|
3
3
|
if (window.__visualEditorActive) return;
|
|
4
4
|
window.__visualEditorActive = true;
|
|
5
5
|
|
|
@@ -515,4 +515,4 @@ import{r as x,aa as yt,at as Je,ab as Se,c as pe,b as Ce,j as n,K as $r,e as Br,
|
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
517
|
})();`;function Vt(t,e){let r=t,s=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let o=0;s&&o<5;o++){const u=e[s];if(u&&typeof u=="object"&&"__resolveType"in u){const d=u.__resolveType;if(typeof d=="string"&&d&&d!==s){r=u,s=d;continue}}break}if(!s)return[];if(s.includes("flags/multivariate")){const o=Array.isArray(r.variants)?r.variants:[];if(o.length===0||o.every(l=>l?.rule?.__resolveType===Ps))return null;const d=[];for(const l of o){const a=l?.value;if(a&&typeof a=="object")for(const c of Vt(a,e)??[])d.includes(c)||d.push(c)}return d}if(js(s)){const o=r.section&&typeof r.section=="object"?Vt(r.section,e):[];return o===null?null:o.length?[s,...o]:[s]}return[s]}function Ge(t){return t.replace(/[`*_]/g,"\\$&")}function co(t,e){const r=[`The user selected an element on the live preview and asked: **"${Ge(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&r.push(`**Section resolveType:** \`${Ge(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const s=`<${t.tag}${t.classes?` class="${Ge(t.classes)}"`:""}>`;r.push(`**Clicked element:** \`${s}\``),t.parents&&r.push(`**DOM breadcrumb:** ${Ge(t.parents)} > ${t.tag}`),t.text&&r.push(`**Text content:** "${Ge(t.text)}"`),t.componentName&&r.push(`**Component name:** ${Ge(t.componentName)}`);const o=t.html.replace(/```/g,"`` `");return r.push("","**HTML snippet:**","```html",o,"```"),r.push("","Please read the source file, locate the element, and apply the requested change."),r.join(`
|
|
518
|
-
`)}function uo(t,e,r=320,s=44,o=12){const{x:u,y:d}=t,{width:l,height:a}=e,c=Math.max(o,Math.min(u-r/2,l-r-o)),p=d/a>.68?Math.max(o,d-s-18):Math.min(d+18,a-s-o);return{leftPct:c/l*100,topPct:p/a*100}}function mo(t){const e=pe.c(45),{element:r,onDismiss:s}=t,[o,u]=x.useState(""),d=x.useRef(null),{sendMessage:l}=Vr(),{openSidePanel:a}=$s(),c=Ce();let h;e[0]!==r||e[1]!==o||e[2]!==s||e[3]!==a||e[4]!==l?(h=()=>{if(!o.trim())return;const D=co(r,o);a(),l({parts:[{type:"text",text:D}]}),s()},e[0]=r,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=h):h=e[5];const p=h;let f;e[6]!==r.position||e[7]!==r.viewport?(f=uo(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=f):f=e[8];const E=f,g=`${E.leftPct}%`,w=`${E.topPct}%`;let b;e[9]!==g||e[10]!==w?(b={left:g,top:w,width:"320px"},e[9]=g,e[10]=w,e[11]=b):b=e[11];let k;e[12]!==p?(k=D=>{D.preventDefault(),p()},e[12]=p,e[13]=k):k=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=D=>u(D.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=D=>{D.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let S;e[17]!==c?(S=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=S):S=e[18];let v;e[19]!==o||e[20]!==y||e[21]!==S?(v=n.jsx("input",{ref:d,autoFocus:!0,type:"text",value:o,onChange:N,onKeyDown:y,placeholder:S,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=y,e[21]=S,e[22]=v):v=e[22];let P;e[23]!==o?(P=o.trim(),e[23]=o,e[24]=P):P=e[24];const M=!P;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let $;e[27]!==c?($=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=K):K=e[31];let R;e[32]!==W?(R=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,K]}),e[32]=W,e[33]=R):R=e[33];let O;e[34]!==M||e[35]!==j||e[36]!==R?(O=n.jsx("button",{type:"submit",disabled:M,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:R}),e[34]=M,e[35]=j,e[36]=R,e[37]=O):O=e[37];let B;e[38]!==v||e[39]!==O||e[40]!==k?(B=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:k,children:[v,O]}),e[38]=v,e[39]=O,e[40]=k,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const _n="site-links",fo=/details?page|\bpdp\b/i,po=/listingpage|\bplp\b/i;function ho(t,e,r){const s=new Set;for(const l of r)fo.test(l)&&s.add("product"),po.test(l)&&s.add("category");const o=wt(Qt(t)),u=o[o.length-1],d=o[o.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&o.some(l=>l.type==="param"&&l.name==="*")&&s.add("category"),s}const go=["rosa","preto","pink","black"];function vt(t,e){const r=e.trim();return r?t(r):go.flatMap(s=>t(s))}function vo(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const or=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Zt(t){return t.split("/")[0]??""}function xo(t){const e=new Set;for(const r of t){const s=Zt(r);or.has(s)&&e.add(s)}return e}function bo(t,e){const r=Zt(t);return!or.has(r)||e.size===0?!0:e.has(r)}const yo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>vt(r=>vo(t,r),e),optionsFromPayload:xt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:No}];function wo(t,e,r=new Set){const s=[...e],o=l=>{const a=[];for(const c of yo){if(c.kind!==l)continue;const h=s.find(p=>c.test(p)&&bo(p,r));h&&a.push({cand:c,resolveType:h})}return a.find(c=>r.has(Zt(c.resolveType)))??a[0]},u=(l,a,c)=>({kind:l.kind,id:`${l.kind}:${a}`,resolveType:a,clientFilter:l.clientFilter,isFallback:c,buildRequests:h=>l.buildRequests(a,h),optionsFromPayload:l.optionsFromPayload}),d=[];for(const l of["product","category"]){if(!t.has(l))continue;const a=o(l);a&&d.push(u(a.cand,a.resolveType,!1))}return t.size>0&&d.push(ko(t.has("category")?"category":"product")),d}function ko(t){return{kind:t,id:_n,resolveType:_n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>_o(e,r)}}function He(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function So(t,e,r){const s=new Set,o=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const l=He(d);if(!l)return;const a=l.__resolveType;if(typeof a=="string"){if(r(a))s.add(a);else if(a in e&&!o.has(a)){o.add(a);const c=He(e[a])?.__resolveType;typeof c=="string"&&r(c)&&s.add(a),u(e[a])}}for(const c of Object.values(l))u(c)};return u(t),s}function ir(t){const e=new Set,r=[];for(const s of t)for(const o of s)e.has(o.value)||(e.add(o.value),r.push(o));return r}function ar(t){try{return decodeURIComponent(t)}catch{return t}}function Po(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jo(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=Po(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function lr(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const o=wt(Qt(e)),{pattern:u,order:d}=jo(o),l=d.indexOf(r);if(l===-1)return null;const a=s.match(u);if(!a)return null;const c=a[l+1]?.replace(/^\/+|\/+$/g,"");return c?ar(c):null}function xt(t,e){const r=He(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],o=[],u=new Set;for(const d of s){const l=He(d);if(!l)continue;const a=lr(l.url,e.template,e.paramName);if(!a||u.has(a))continue;u.add(a);const c=He(l.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof l.name=="string"&&l.name||a,p=Array.isArray(l.image)?He(l.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;o.push({value:a,label:h,image:f})}return o}function Eo(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?ar(r):null}function No(t){const e=[],r=new Set,s=(o,u)=>{const d=He(o);if(!d)return;const l=typeof d.name=="string"&&d.name?d.name:"",a=l?[...u,l]:u,c=Eo(d.url);if(c&&!r.has(c)&&(r.add(c),e.push({value:c,label:a.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,a)};if(Array.isArray(t))for(const o of t)s(o,[]);return e}const Co=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function Ro(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function To(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,o=0;for(;(s=r.exec(t))!==null&&o++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Lo(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const l=(u[1]??"").replace(/\\\//g,"/");if(!l||r.has(l))continue;r.add(l);const a=t.slice(u.index,u.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:u[2]??"",image:a||void 0})}return e}function _o(t,e){const r=[],s=new Set,o=(u,d,l,a)=>{if(r.length>=200)return;const c=lr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||l==="category"&&Co.has(c.split("/")[0]??"")||(s.add(c),r.push({value:c,label:d&&d.length<=80?d:Ro(c),kind:l,image:a}))};for(const{url:u,name:d,image:l}of Lo(t))o(u,d,"product",l);for(const{href:u,text:d}of To(t))u.startsWith("/")&&!u.startsWith("//")&&o(u,d,"category");return r}function tt(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const cr=1e4;function Oo(t){return{product:{noun:t("sandbox.pathParamPickerChip.kindProductNoun"),heading:t("sandbox.pathParamPickerChip.kindProductHeading")},category:{noun:t("sandbox.pathParamPickerChip.kindCategoryNoun"),heading:t("sandbox.pathParamPickerChip.kindCategoryHeading")}}}async function Do(t,{resolveType:e,props:r}){const s=await fetch(ds(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(cr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function On(t,e){const r=await fetch(us(t,e),{signal:AbortSignal.timeout(cr)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function Ao(t,e,r){const s=e.optionsFromPayload(await On(t,"/"),r),o=s.find(d=>d.kind==="category");if(!o)return s;const u=Fe(r.template,{[r.paramName]:o.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await On(t,u),r).filter(l=>l.kind==="product");return ir([s,d])}catch{return s}}function Mo(t,e,r){return $r.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function Fo(t,e,r,s){if(e.homepageLinks)return Ao(t,e,s);const o=e.buildRequests?.(r)??[];if(o.length===0)return[];const u=await Promise.allSettled(o.map(l=>Do(t,l))),d=u.filter(l=>l.status==="fulfilled").map(l=>l.value);if(d.length===0){const l=u.find(a=>a.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return ir(d.map(l=>e.optionsFromPayload(l,s)))}function qt(t,e,r,s,o){return{queryKey:Mo(t,e,r),queryFn:()=>Fo(t,e,r,s),enabled:o,staleTime:6e4,retry:1}}function nt(t){const e=pe.c(16),{heading:r,iconKind:s,options:o,template:u,paramName:d,keyPrefix:l,onSelect:a}=t;if(o.length===0)return null;let c;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==l||e[9]!==a||e[10]!==d||e[11]!==u?(p=f=>n.jsxs(Xn,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>a(f.value),children:[s==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(Hn,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${l}:${f.value}`),e[7]=s,e[8]=l,e[9]=a,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=o.map(p),e[0]=s,e[1]=l,e[2]=a,e[3]=o,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==r||e[14]!==c?(h=n.jsx(Qn,{heading:r,children:c}),e[13]=r,e[14]=c,e[15]=h):h=e[15],h}function Dn(t){const e=pe.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function $o(t){const e=pe.c(52),{sources:r,template:s,paramName:o,value:u,sandboxRef:d,onCommit:l}=t,a=Ce(),[c,h]=x.useState(!1),[p,f]=x.useState(""),[E,g]=x.useState(""),w=x.useRef(null),b=o==="*"?a("sandbox.preview.catchAllParamLabel"):`:${o}`,k=Oo(a),y=[...new Set(r.map(U=>k[U.kind].noun))].join(" or ");let S;e[0]!==a||e[1]!==y?(S=a("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=a,e[1]=y,e[2]=S):S=e[2];const v=S,P={template:s,paramName:o};let M;e[3]!==p?(M=(U,T)=>({source:U,query:T,options:U.clientFilter?tt(T.data??[],p):T.data??[]}),e[3]=p,e[4]=M):M=e[4];const j=M,$=r.filter(Vo),W=r.filter(Wo),K=Wt({queries:$.map(U=>qt(d,U,E,P,c))});let R;e[5]!==K||e[6]!==j?(R=(U,T)=>j(U,K[T]),e[5]=K,e[6]=j,e[7]=R):R=e[7];const O=$.map(R),B=O.length===0||O.every(Uo),V=Wt({queries:W.map(U=>qt(d,U,E,P,c&&B))});let D;e[8]!==V||e[9]!==j?(D=(U,T)=>j(U,V[T]),e[8]=V,e[9]=j,e[10]=D):D=e[10];const H=W.map(D),A=B?H:O,I=A.length===1&&A[0]?.source.homepageLinks?A[0]:null,L=I&&!I.query.isLoading&&!I.query.isError?I?.query.data??[]:[],Z=tt(L.filter(Ho),p),Y=tt(L.filter(Ko),p),de=Z.length>0&&Y.length>0,q=U=>{h(U),w.current&&clearTimeout(w.current),f(U?u:""),g(U?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=U=>{f(U),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{g(U)},300)},e[11]=X):X=e[11];const ee=X,J=U=>{l(U),q(!1)},ue=qn(p),re=Fe(s,{[o]:ue}),G=er,ie=Zn,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",me=zo;let te;e[12]!==b||e[13]!==a?(te=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=a,e[14]=te):te=e[14];let ae;e[15]!==te?(ae=n.jsx(tr,{className:"sr-only",children:n.jsx(nr,{children:te})}),e[15]=te,e[16]=ae):ae=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx(Hn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ne;e[18]!==a?(ne=a("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=a,e[19]=ne):ne=e[19];let le;e[20]!==b?(le=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=le):le=e[21];let se;e[22]!==ne||e[23]!==le?(se=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",le]})]}),e[22]=ne,e[23]=le,e[24]=se):se=e[24];const Pe=zs,Re=!1,$e="min-h-0 flex-1";let ge;e[25]!==v||e[26]!==p?(ge=n.jsx(Ks,{autoFocus:!0,placeholder:v,value:p,onValueChange:ee}),e[25]=v,e[26]=p,e[27]=ge):ge=e[27];const Qe=Is,Oe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Te;e[28]!==a?(Te=a("sandbox.pathParamPickerChip.noResults"),e[28]=a,e[29]=Te):Te=e[29];let je;e[30]!==Te?(je=n.jsx(Hs,{children:Te}),e[30]=Te,e[31]=je):je=e[31];const Be=ue&&n.jsx(Qn,{className:"shrink-0",children:n.jsxs(Xn,{value:`__raw__:${ue}`,className:"gap-3 py-2",onSelect:()=>J(ue),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(Bs,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:ue,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:re})]})]})}),De=de?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:Z,template:s,paramName:o,keyPrefix:`${I?.source.id}:cat`,onSelect:J})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:Y,template:s,paramName:o,keyPrefix:`${I?.source.id}:prod`,onSelect:J})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:A.map(U=>{const{source:T,query:fe,options:Me}=U,{noun:Pt}=k[T.kind];if(fe.isLoading)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.loading",{noun:Pt})},T.id);if(fe.isError)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Xe=fe.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:tt(Xe.filter(Io),p),template:s,paramName:o,keyPrefix:`${T.id}:cat`,onSelect:J}),n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:tt(Xe.filter(Bo),p),template:s,paramName:o,keyPrefix:`${T.id}:prod`,onSelect:J})]},T.id)}return n.jsx(nt,{heading:A.length>1?k[T.kind].heading:void 0,iconKind:T.kind,options:Me,template:s,paramName:o,keyPrefix:T.id,onSelect:J},T.id)})});let Ae;e[32]!==Qe||e[33]!==je||e[34]!==Be||e[35]!==De?(Ae=n.jsxs(Qe,{className:Oe,children:[je,Be,De]}),e[32]=Qe,e[33]=je,e[34]=Be,e[35]=De,e[36]=Ae):Ae=e[36];let ve;e[37]!==Pe||e[38]!==ge||e[39]!==Ae?(ve=n.jsxs(Pe,{shouldFilter:Re,className:$e,children:[ge,Ae]}),e[37]=Pe,e[38]=ge,e[39]=Ae,e[40]=ve):ve=e[40];let Le;e[41]!==ie||e[42]!==ae||e[43]!==se||e[44]!==ve||e[45]!==me?(Le=n.jsxs(ie,{className:xe,onClick:me,children:[ae,se,ve]}),e[41]=ie,e[42]=ae,e[43]=se,e[44]=ve,e[45]=me,e[46]=Le):Le=e[46];let Ue;return e[47]!==G||e[48]!==q||e[49]!==c||e[50]!==Le?(Ue=n.jsx(G,{open:c,onOpenChange:q,children:Le}),e[47]=G,e[48]=q,e[49]=c,e[50]=Le,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:U=>{U.stopPropagation(),q(!0)},children:u||b}),Ue]})}function Bo(t){return t.kind==="product"}function Io(t){return t.kind!=="product"}function zo(t){return t.stopPropagation()}function Ko(t){return t.kind==="product"}function Ho(t){return t.kind!=="product"}function Uo(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Wo(t){return t.isFallback}function Vo(t){return!t.isFallback}function qo(t){const e=pe.c(8),{sources:r,template:s,paramName:o,sandboxRef:u,onFill:d}=t;let l,a;if(e[0]!==o||e[1]!==u||e[2]!==r||e[3]!==s){const E={template:s,paramName:o},g=r.filter(Go);a=Wt,l=g.map(w=>qt(u,w,"",E,!0)),e[0]=o,e[1]=u,e[2]=r,e[3]=s,e[4]=l,e[5]=a}else l=e[4],a=e[5];let c;e[6]!==l?(c={queries:l},e[6]=l,e[7]=c):c=e[7];const h=a(c),[p,f]=x.useState(!1);if(!p)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){f(!0),queueMicrotask(()=>d(g.value));break}}return null}function Go(t){return!t.isFallback}function Jo(t){const e=pe.c(31),{name:r,value:s,onCommit:o}=t,u=Ce(),[d,l]=x.useState(s),[a,c]=x.useState(!1),h=x.useRef(!1);let p;e[0]!==r||e[1]!==u?(p=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=p):p=e[2];const f=p,E=d||f;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>l(j.target.value),k=()=>c(!0),e[8]=b,e[9]=k):(b=e[8],k=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,l(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==o||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=qn(d);l(j),j!==s&&o(j)},e[12]=d,e[13]=o,e[14]=s,e[15]=y):y=e[15];let S;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(S=n.jsx("input",{type:"text",value:d,placeholder:f,title:w,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:Yo,onChange:b,onFocus:k,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=S):S=e[21];let v;e[22]!==g||e[23]!==S?(v=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,S]}),e[22]=g,e[23]=S,e[24]=v):v=e[24];let P;e[25]!==a||e[26]!==u?(P=a&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(ts,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=a,e[26]=u,e[27]=P):P=e[27];let M;return e[28]!==P||e[29]!==v?(M=n.jsxs(n.Fragment,{children:[v,P]}),e[28]=P,e[29]=v,e[30]=M):M=e[30],M}function Yo(t){return t.stopPropagation()}function Qo(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function Xo(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Zo(t){const e=pe.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Wn(r);let o;return e[2]!==t||e[3]!==s?(o={mutationFn:async u=>{const{name:d,path:l,template:a}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=ms(d),h=a?{...a,name:d,path:l}:fs(d,l);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:l}}},e[2]=t,e[3]=s,e[4]=o):o=e[4],Br(o)}function ei(t){const e=pe.c(89),{open:r,onOpenChange:s,isPending:o,error:u,templates:d,onSubmit:l}=t,a=o===void 0?!1:o,c=Ce();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=x.useState(h);let E;e[2]!==c?(E=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=E):E=e[3];const[g,w]=x.useState(E),[b,k]=x.useState(It),[N,y]=x.useState(null),[S,v]=x.useState(r);r!==S&&(v(r),r&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),k(It),y(null)));const P=!!d?.length;let M;e[4]!==a||e[5]!==s?(M=ne=>{!ne&&!a&&(y(null),s(!1))},e[4]=a,e[5]=s,e[6]=M):M=e[6];const j=M;let $;e[7]!==a||e[8]!==p||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==b?($=async ne=>{ne.preventDefault();const le=p.trim(),se=g.trim();if(!le||!se||a)return;const Pe=Gn(se);if(Pe){y(Pe);return}y(null),await l({name:le,path:se,templateKey:P&&b!==It?b:null})},e[7]=a,e[8]=p,e[9]=l,e[10]=g,e[11]=P,e[12]=b,e[13]=$):$=e[13];const W=$,K=N??u;let R;e[14]!==c?(R=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=R):R=e[15];let O;e[16]!==R?(O=n.jsx(tr,{children:n.jsx(nr,{children:R})}),e[16]=R,e[17]=O):O=e[17];let B;e[18]!==c?(B=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=ne=>f(ne.target.value),e[22]=D):D=e[22];let H;e[23]!==c?(H=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=H):H=e[24];let A;e[25]!==a||e[26]!==p||e[27]!==H?(A=n.jsx(En,{id:"new-page-name",value:p,onChange:D,placeholder:H,autoFocus:!0,disabled:a}),e[25]=a,e[26]=p,e[27]=H,e[28]=A):A=e[28];let I;e[29]!==A||e[30]!==V?(I=n.jsxs("div",{className:"space-y-1.5",children:[V,A]}),e[29]=A,e[30]=V,e[31]=I):I=e[31];let Q;e[32]!==c?(Q=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=Q):Q=e[33];let L;e[34]!==Q?(L=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:Q}),e[34]=Q,e[35]=L):L=e[35];let Z;e[36]===Symbol.for("react.memo_cache_sentinel")?(Z=ne=>w(ne.target.value),e[36]=Z):Z=e[36];let Y;e[37]!==c?(Y=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=Y):Y=e[38];let de;e[39]!==a||e[40]!==g||e[41]!==Y?(de=n.jsx(En,{id:"new-page-path",value:g,onChange:Z,placeholder:Y,disabled:a}),e[39]=a,e[40]=g,e[41]=Y,e[42]=de):de=e[42];let q;e[43]!==L||e[44]!==de?(q=n.jsxs("div",{className:"space-y-1.5",children:[L,de]}),e[43]=L,e[44]=de,e[45]=q):q=e[45];let X;e[46]!==a||e[47]!==P||e[48]!==c||e[49]!==b||e[50]!==d?(X=P&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),n.jsx(ps,{id:"new-page-template",value:b,onChange:k,templates:d??[],disabled:a})]}),e[46]=a,e[47]=P,e[48]=c,e[49]=b,e[50]=d,e[51]=X):X=e[51];let ee;e[52]!==K?(ee=K&&n.jsx("p",{className:"text-xs text-destructive",children:K}),e[52]=K,e[53]=ee):ee=e[53];let J;e[54]!==I||e[55]!==q||e[56]!==X||e[57]!==ee?(J=n.jsxs("div",{className:"space-y-4 py-4",children:[I,q,X,ee]}),e[54]=I,e[55]=q,e[56]=X,e[57]=ee,e[58]=J):J=e[58];let ue;e[59]!==s?(ue=()=>s(!1),e[59]=s,e[60]=ue):ue=e[60];let re;e[61]!==c?(re=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=re):re=e[62];let G;e[63]!==a||e[64]!==ue||e[65]!==re?(G=n.jsx(Ye,{type:"button",variant:"outline",onClick:ue,disabled:a,children:re}),e[63]=a,e[64]=ue,e[65]=re,e[66]=G):G=e[66];let ie;e[67]!==a||e[68]!==p||e[69]!==g?(ie=!p.trim()||!g.trim()||a,e[67]=a,e[68]=p,e[69]=g,e[70]=ie):ie=e[70];let xe;e[71]!==a||e[72]!==c?(xe=a?n.jsxs(n.Fragment,{children:[n.jsx(kt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=a,e[72]=c,e[73]=xe):xe=e[73];let me;e[74]!==ie||e[75]!==xe?(me=n.jsx(Ye,{type:"submit",disabled:ie,children:xe}),e[74]=ie,e[75]=xe,e[76]=me):me=e[76];let te;e[77]!==G||e[78]!==me?(te=n.jsxs(Us,{children:[G,me]}),e[77]=G,e[78]=me,e[79]=te):te=e[79];let ae;e[80]!==W||e[81]!==J||e[82]!==te||e[83]!==O?(ae=n.jsx(Zn,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[O,J,te]})}),e[80]=W,e[81]=J,e[82]=te,e[83]=O,e[84]=ae):ae=e[84];let be;return e[85]!==j||e[86]!==r||e[87]!==ae?(be=n.jsx(er,{open:r,onOpenChange:j,children:ae}),e[85]=j,e[86]=r,e[87]=ae,e[88]=be):be=e[88],be}function ti(t){const e=pe.c(29),{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,blockKey:a}=t,c=Ce();let h;e[0]!==o||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:o},e[0]=o,e[1]=r,e[2]=s,e[3]=h):h=e[3];const p=Wn(h);let f;e[4]!==p?(f=vs((v,P)=>p.mutate({blockKey:v,data:P})),e[4]=p,e[5]=f):f=e[5];const E=f;let g;e[6]!==a||e[7]!==l?(g=hs(l,a),e[6]=a,e[7]=l,e[8]=g):g=e[8];const{resolveType:w,props:b,title:k}=g;if(!w){let v;e[9]!==c?(v=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=v):v=e[10];let P;return e[11]!==v?(P=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=P):P=e[12],P}const N=`loader:${a}`;let y;e[13]!==a||e[14]!==w||e[15]!==k?(y={mode:"saved",blockKey:a,resolveType:w,title:k},e[13]=a,e[14]=w,e[15]=k,e[16]=y):y=e[16];let S;return e[17]!==o||e[18]!==l||e[19]!==d||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==s?(S=n.jsx(gs,{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:ni,onSaveReferencedBlock:E,showRun:!1},N),e[17]=o,e[18]=l,e[19]=d,e[20]=r,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=s,e[28]=S):S=e[28],S}async function ni(){}function ri(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function An(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ri(t.error)}}function si(t){switch(t){case"clone-failed":case"install-failed":case"start-failed":return"terminal-error";case"idle":case"cloning":return"booting";case"checking-out":case"installing":case"starting":case"running":case"crashed":return"snapshot-readable"}}function oi(t){if(t.fastPreviewActive)return t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData?{kind:"error",source:"data"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"};const e=si(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:r?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const ii="https://github.com/decocms/blocks";function ai(){const t=pe.c(14),e=Ce();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ns,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let o;t[3]!==e?(o=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=o):o=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Un,{size:14}),t[7]=d):d=t[7];let l;t[8]!==u?(l=n.jsx(Ye,{size:"sm",asChild:!0,children:n.jsxs("a",{href:ii,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=l):l=t[9];let a;return t[10]!==s||t[11]!==o||t[12]!==l?(a=n.jsx(Xt,{className:"h-full w-full",image:r,title:s,description:o,actions:l}),t[10]=s,t[11]=o,t[12]=l,t[13]=a):a=t[13],a}function li(t){const e=pe.c(15),{source:r,onRetry:s}=t,o=Ce();let u;e[0]!==r||e[1]!==o?(u=o(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,e[1]=o,e[2]=u):u=e[2];const d=u;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ws,{size:48,className:"text-muted-foreground"}),e[3]=l):l=e[3];let a;e[4]!==o?(a=o("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=o,e[5]=a):a=e[5];let c;e[6]!==o?(c=o("mainPanelTabs.blocksTabStates.retry"),e[6]=o,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=n.jsx(Ye,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==a||e[13]!==h?(p=n.jsx(Xt,{image:l,title:a,description:d,actions:h}),e[11]=d,e[12]=a,e[13]=h,e[14]=p):p=e[14],p}const ci=x.lazy(()=>Ir(()=>import("./sections-editor-CH88tIrj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(49),{virtualMcpId:r,externalSelection:s,onViewJsonFile:o}=t,u=s===void 0?null:s,{org:d}=Gt(),{currentBranch:l,taskId:a}=St(),c=zn(),h=Jt(),p=rr(),f=c.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==l||e[1]!==d||e[2]!==E||e[3]!==a||e[4]!==r?(g=l?{orgSlug:d.slug,virtualMcpId:r,branch:l,threadId:a??null,previewUrl:E}:null,e[0]=l,e[1]=d,e[2]=E,e[3]=a,e[4]=r,e[5]=g):g=e[5];const w=g;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const k=Yt(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=Vn(w,N),S=oi({lifecyclePhase:c.lifecycle.phase,decofile:An(k),meta:An(y),hasEditableContent:Es(k.data,y.data),fastPreviewActive:Kn(r).runtime==="cms"}),v=di;if(S.kind==="loading"){let L;return e[10]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(zr,{})),e[10]=L):L=e[10],L}if(S.kind==="empty"){let L;return e[11]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(ai,{})),e[11]=L):L=e[11],L}if(S.kind==="error"){let L;e[12]!==k||e[13]!==h||e[14]!==y||e[15]!==S.source?(L=()=>{if(S.source==="sandbox"){h.retry();return}Promise.all([k.refetch(),y.refetch()])},e[12]=k,e[13]=h,e[14]=y,e[15]=S.source,e[16]=L):L=e[16];const Z=L;let Y;return e[17]!==Z||e[18]!==S.source?(Y=v(n.jsx(li,{source:S.source,onRetry:Z})),e[17]=Z,e[18]=S.source,e[19]=Y):Y=e[19],Y}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=L=>v(n.jsx("div",{className:"h-full min-h-0",children:L})),e[20]=P):P=e[20];const M=P,j=p.state.target;if(j?.kind==="loader"&&k.data&&y.data){const L=l??"",Z=E??null;let Y;return e[21]!==k.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==L||e[25]!==Z||e[26]!==j.key||e[27]!==r?(Y=M(n.jsx(ti,{orgSlug:d.slug,virtualMcpId:r,branch:L,previewUrl:Z,meta:y.data,decofile:k.data,blockKey:j.key})),e[21]=k.data,e[22]=y.data,e[23]=d.slug,e[24]=L,e[25]=Z,e[26]=j.key,e[27]=r,e[28]=Y):Y=e[28],Y}let $;e[29]!==l||e[30]!==d.slug||e[31]!==j||e[32]!==r?($=j||!l?null:Jn(Yn(d.slug,r,l)),e[29]=l,e[30]=d.slug,e[31]=j,e[32]=r,e[33]=$):$=e[33];const W=$;let K="/",R=null,O=null;j?.kind==="page"?(K=j.path,R=j.key):j?.kind==="section"?O=j.key:W&&(K=W.path,R=W.pageKey);const B=R?`page:${R}`:O?`section:${O}`:`path:${K}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const D=l??"",H=E??void 0,A=O?null:u,I=!!R&&p.state.editSeoPageKey===R;let Q;return e[35]!==O||e[36]!==R||e[37]!==K||e[38]!==B||e[39]!==o||e[40]!==d.slug||e[41]!==A||e[42]!==I||e[43]!==D||e[44]!==H||e[45]!==r||e[46]!==p.consumeEditSeo||e[47]!==p.setVariantOverride?(Q=M(n.jsx(x.Suspense,{fallback:V,children:n.jsx(ci,{orgSlug:d.slug,virtualMcpId:r,branch:D,previewReady:!0,previewUrl:H,currentPath:K,activePageBlockKey:R,activeGlobalBlockKey:O,externalSelection:A,initialEditSeo:I,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onViewJsonFile:o},B)})),e[35]=O,e[36]=R,e[37]=K,e[38]=B,e[39]=o,e[40]=d.slug,e[41]=A,e[42]=I,e[43]=D,e[44]=H,e[45]=r,e[46]=p.consumeEditSeo,e[47]=p.setVariantOverride,e[48]=Q):Q=e[48],Q}function di(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Fn(t){const e=pe.c(44),{virtualMcpId:r,pageKey:s,onClose:o,ref:u}=t,d=Ce(),{org:l}=Gt(),{currentBranch:a,taskId:c}=St(),p=Jt().previewUrl;let f;e[0]!==a||e[1]!==l.slug||e[2]!==p||e[3]!==c||e[4]!==r?(f=a?{orgSlug:l.slug,virtualMcpId:r,branch:a,threadId:c??null,previewUrl:p}:null,e[0]=a,e[1]=l.slug,e[2]=p,e[3]=c,e[4]=r,e[5]=f):f=e[5];const g=Yt(f),w=a??"";let b;e[6]!==l.slug||e[7]!==w||e[8]!==r?(b={orgSlug:l.slug,virtualMcpId:r,branch:w},e[6]=l.slug,e[7]=w,e[8]=r,e[9]=b):b=e[9];const{save:k,flush:N}=xs(b),y=g.data?.[s],S=g.data===void 0&&g.isLoading,v=g.data!==void 0&&y===void 0,P=!a||v||S;let M;e[10]!==y?(M=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=M):M=e[11];const j=M;let $;e[12]!==s||e[13]!==P||e[14]!==k?($=Q=>{if(P)return;let L;try{L=JSON.parse(Q)}catch{return}L===null||typeof L!="object"||Array.isArray(L)||k(s,L)},e[12]=s,e[13]=P,e[14]=k,e[15]=$):$=e[15];const W=$;let K;e[16]!==N?(K=()=>({flush:N}),e[16]=N,e[17]=K):K=e[17],x.useImperativeHandle(u,K);let R;e[18]!==d?(R=d("sectionsEditor.pageJsonDialog.titleShort"),e[18]=d,e[19]=R):R=e[19];let O;e[20]!==R?(O=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:R}),e[20]=R,e[21]=O):O=e[21];let B;e[22]!==d?(B=d("sectionsEditor.pageJsonDialog.close"),e[22]=d,e[23]=B):B=e[23];let V;e[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Vs,{size:14}),e[24]=V):V=e[24];let D;e[25]!==o||e[26]!==B?(D=n.jsx(Ye,{variant:"ghost",size:"icon",onClick:o,"aria-label":B,className:"size-7 shrink-0",children:V}),e[25]=o,e[26]=B,e[27]=D):D=e[27];let H;e[28]!==D||e[29]!==O?(H=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[O,D]}),e[28]=D,e[29]=O,e[30]=H):H=e[30];let A;e[31]!==g.data||e[32]!==N||e[33]!==j||e[34]!==S||e[35]!==v||e[36]!==s||e[37]!==P||e[38]!==W||e[39]!==d?(A=S?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}):v?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(qs,{code:j,language:"json",readOnly:P,height:"100%",onChange:Q=>W(Q??""),onSave:Q=>{W(Q),N()}},`${s}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=N,e[33]=j,e[34]=S,e[35]=v,e[36]=s,e[37]=P,e[38]=W,e[39]=d,e[40]=A):A=e[40];let I;return e[41]!==H||e[42]!==A?(I=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[H,A]}),e[41]=H,e[42]=A,e[43]=I):I=e[43],I}function dr(t){return t.contentEditingEnabled&&!t.isMobile}function ui(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function mi(t){return dr({contentEditingEnabled:sr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function fi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const pi=500,hi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},$n=1,Ht=["desktop","mobile","tablet"],Bn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function In(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function gi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function bt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ut(t,e){try{return new URL(t,e).href}catch{return null}}function vi(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function xi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function bi(t,e,r){const s=t.toLowerCase(),o=e.toLowerCase(),u=o.split("/").filter(Boolean),d=a=>{if(a===r)return 100;const c=a.indexOf(r);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(a[c-1]??"")&&(h+=20),h+=Math.round(r.length/a.length*20),h};let l=Math.max(d(s),d(o));return u.at(-1)===r?l=Math.max(l,95):u.includes(r)&&(l=Math.max(l,90)),l}function yi(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function wi({virtualMcpId:t}){const e=Ce(),r=Fs(),s=Zr(),{currentBranch:o,taskId:u,virtualMcpId:d}=St(),l=rr(),a=qr(d===t?t:null),c=Kn(t),h=Gs(a?.metadata?.ui?.layout??null),p=sr(h),f=dr({contentEditingEnabled:p,isMobile:s}),[E,g]=x.useState(()=>mi({cmsMode:h,isMobile:s})),[w,b]=x.useState("desktop"),[k,N]=x.useState(null),[y,S]=x.useState(null),v=x.useRef(null),P=x.useRef(null),[M,j]=x.useState(!1),$=x.useRef(null),W=()=>{$.current?.flush(),j(!1)},K=()=>j(i=>(i&&$.current?.flush(),!i)),[R,O]=x.useState({width:0,height:0}),[B,V]=x.useState(null),[D,H]=x.useState(!1),[A,I]=x.useState(""),Q=x.useRef(null),[L,Z]=x.useState(!1),[Y,de]=x.useState(),[q,X]=x.useState(null),[ee,J]=x.useState(null),[ue,re]=x.useState(null),[G,ie]=x.useState("/"),[xe,me]=x.useState(null),[te,ae]=x.useState({}),[be,ne]=x.useState(!1),le=x.useRef(null),se=()=>{ne(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>ne(!1),15e3)},Pe=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne(!1)},{org:Re}=Gt(),$e=zn(),ge=Jt(),Qe=ge.vmEntry,Oe=ge.previewUrl,Te=$e.lifecycle.phase,je=Te==="running",Be=a?.id===t?Xr(a.metadata):null,De=a?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",ve=Ts({sandboxUrl:Oe,previewServerUrl:Be,fastPreviewActive:De}),Le=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null,previewUrl:Oe}:null,Ue=Yt(Le,{fetchEnabled:je}),U=Vn(Le,{fetchEnabled:je}),T=Ue.data,fe=U.data,Me=T?Ns(T).sort((i,m)=>i.name.localeCompare(m.name)):[],Pt=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o}:null,Xe=Zo(Pt),jt=T&&fe?Cs(T,fe):[],en=T&&fe?bs(fe,T,"loaders"):[],We=A?(()=>{const i=A.toLowerCase();return Me.map(m=>({page:m,score:bi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,C)=>C.score-m.score||m.page.path.length-C.page.path.length).map(({page:m})=>m)})():Me,rt=jt.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),tn=f?en:[],Et=tn.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),nn=ee?en.find(i=>i.key===ee)??null:null,Ee=Qt,Nt=q||ee?null:Rs(Me,G,xe),Ct=q?q.name:nn?.title??Nt?.name,z=Nt?.key??null,st=Nt?.path??null,Ve=(z?te[z]:void 0)??{},ye=Fe(G,Ve),Rt={};if(je&&Oe&&fe&&T){const i=ys(fe,"loaders"),m=z?T[z]:void 0,C=So(m,T,oe=>i.has(oe)),_=xo(C);for(const oe of wt(G)){if(oe.type!=="param")continue;const _e=ho(G,oe.name,C),ke=wo(_e,i,_);ke.length>0&&(Rt[oe.name]=ke)}}const ot=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null}:null,rn=T&&z?ws(T,z,0):[],sn=T?ks(rn,T):[],Tt=sn.map(i=>i.isSavedBlock?i.label:""),Lt=sn.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),_t=rn.map(i=>Vt(i,T??{})),on=x.useRef(null),Ne=x.useRef(null),ur=$e.status.state==="paused",Ot=$e.phase,an=Ss({claimPhase:Ot,lifecycle:$e.lifecycle}),Ie=ge.previewState,mr=ge.userStopped,fr=As(Re.slug,t??"",o??""),{url:ze}=Ds(De&&t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,previewServerUrl:Be??null,path:ye}:null),pr=Ae&&c.runtime==="sandbox",F=eo({previewState:Ie,progressStatus:an.status,previewServerUrl:Be,fastPreviewActive:De,fastPreviewReady:!!ze,codingSession:pr}),Ze=F.mode!=="none",ln=F.mode==="production"&&F.iframeBase?bt(F.iframeBase):null,hr=!r,qe=F.mode==="production"?ln:bt(Oe),gr=a?.id===t&&a.metadata?.fastPreviewInPlace===!0,et=F.mode==="production"&&De&&gr&&f&&E==="blocks",cn=x.useRef(null),{pin:vr,effective:xr}=vi(cn.current,{inPlaceRenderActive:et,draftPreviewUrl:ze,resolvedPath:ye});cn.current=vr;const we=gi(F.mode==="sandbox"?ht(In(ue??Ut(ye,F.iframeBase)??F.iframeBase,w),l.state.variantOverride??[]):F.mode==="production"&&hr?ht(In(Ls(ue??xr??Ut(ye,F.iframeBase)??F.iframeBase,F.showWakingPill?_s:null),w),l.state.variantOverride??[]):null);x.useEffect(()=>{},[r,ln,B]);const dn="sandbox.preview.openInNewTab",un=ze??(F.iframeBase?Ut(ye,F.iframeBase):null),br=F.mode==="production"?un?ht(un,l.state.variantOverride??[]):null:we??F.iframeBase,yr=async()=>{const i=br;if(i){window.open(i,"_blank","noopener");return}},it=t&&o?Yn(Re.slug,t,o):null,at=i=>{it&&Ms(it,i)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!ve||!fe))if(ce.kind==="page"){const i=te[ce.key]??{};Ne.current=Fe(ce.path,i),X(null),J(null),re(null),me(ce.key),ie(ce.path),at({path:ce.path,pageKey:ce.key,params:i})}else if(ce.kind==="loader")Ne.current=null,X(null),J(ce.key),re(null);else{const i=jt.find(m=>m.key===ce.key);if(i){Ne.current=null;const m=Pn(fe);J(null),X(i),re(jn(ve,m,i.key))}}},[ce,ve,fe,te]),x.useEffect(()=>{!z||st===null||ce?.kind==="page"&&ce.key===z&&ce.path===st||l.selectTarget({kind:"page",key:z,path:st})},[z,st,ce]);const[mn,wr]=x.useState(null);if(Ie.kind==="iframe"&&mn!==Ie.previewUrl){const i=mn!==null;wr(Ie.previewUrl);const m=it?Jn(it):null;if(m){if(Ne.current=Fe(m.path,m.params),ie(m.path),me(m.pageKey),re(null),X(null),J(null),m.pageKey&&Object.keys(m.params).length>0){const C=m.pageKey;ae(_=>({..._,[C]:m.params}))}}else i&&(Ne.current=null,ie("/"),re(null),me(null),X(null),J(null))}on.current=we;const fn=so({iframeRef:v,src:F.mode==="sandbox"?we:null,active:F.mode==="sandbox"}),pn=x.useRef(null);x.useEffect(()=>{if(!ze||!we||pn.current===ze)return;pn.current=ze;const i=v.current;i&&i.getAttribute("src")!==we&&(se(),i.src=we)},[ze,we]);const hn=()=>{const i=v.current?.contentWindow,m=qe;if(!i||!m||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Os({previewBaseUrl:m,pageBlock:C,decofile:T,path:ye,pathTemplate:G});if(!_)return;const oe=ht(_.src,l.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:oe,body:_.body},m)},Dt=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){Dt.current=null;return}const i={nav:JSON.stringify({page:z,path:ye,pathTemplate:G}),content:JSON.stringify(T)},m=xi(Dt.current,i);Dt.current=i,m&&hn()},[T,et,q,ee,z,ye,G]);const At=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){At.current=null;return}const i=JSON.stringify(l.state.variantOverride??null),m=At.current;At.current={page:z,sig:i},!(!m||m.page!==z||m.sig===i)&&hn()},[l.state.variantOverride,et,q,ee,z]);const kr=!!t&&!!o&&!$e.notFound&&!mr&&!ur&&(Ot?.kind==="ready"||Te!=="idle"),he=fi({editingMode:E,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:f});x.useEffect(()=>{const i=qe;if(!i)return;const m=C=>{if(C.origin===i)if(C.data?.type==="visual-editor::element-clicked"){const _=oo.safeParse(C.data.payload);_.success&&N(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=lo.safeParse(C.data.payload);_.success&&S({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?se():C.data?.type==="cms-editor::render-end"?(Pe(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},i)):C.data?.type==="cms-editor::render-error"&&Pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[qe,Tt,Lt,_t]);const gn=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::activate",script:io},m)},Sr=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Mt=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage(F.mode==="production"?{type:"editor::inject",args:{script:Ln}}:{type:"visual-editor::activate",script:Ln},m),i.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},m))},Pr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},jr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage({type:"cms-editor::clear-hover"},m),i.postMessage({type:"visual-editor::clear-hover"},m))},Ft=i=>{if(i==="blocks"&&!f)return;const m=E;!s&&i!==m&&(i==="blocks"?P.current?.resize("30%"):P.current?.collapse()),i!=="blocks"&&W(),g(i),N(null),S(null),i!=="blocks"&&J(null),m==="visual"&&Sr(),i==="visual"&&gn(),m==="blocks"&&i!=="blocks"&&Pr(),i==="blocks"&&Mt()},Er=()=>{Ft(ui(E,f))},Nr=()=>{if(!v.current||!we)return;se();const i=v.current;i.src=we};Jr(()=>{const i=v.current;if(!i)return;se();const m=document.activeElement,C=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),yi(i,on.current);let _;const oe=()=>{clearTimeout(_),i.tabIndex=C,i.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===i)&&m?.focus(),i.removeEventListener("load",oe)};i.addEventListener("load",oe),_=setTimeout(oe,3e3)});const Cr=()=>{const i=Ht.indexOf(w);b(Ht[(i+1)%Ht.length])},$t=(i,m)=>{if(!z)return;const C=z,_={...Ve,[i]:m};Ne.current=Fe(G,_),ae(oe=>({...oe,[C]:_})),at({path:G,pageKey:C,params:_})},vn=Qo({iframeBase:F.iframeBase,resolvedPath:ye,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Bt=i=>{const m=te[i.key]??{},C=Fe(i.path,m);(q||Ee(C)!==Ee(ye))&&se(),Ne.current=C,X(null),J(null),re(null),S(null),me(i.key),ie(i.path),at({path:i.path,pageKey:i.key,params:m}),l.selectTarget({kind:"page",key:i.key,path:i.path})},Rr=i=>{if(!ve||!fe){yn.error(e("sandbox.preview.previewMetadataNotReady"));return}se(),Ne.current=null;const m=Pn(fe),C=jn(ve,m,i.key);X(i),J(null),re(C),S(null),l.selectTarget({kind:"section",key:i.key})},Tr=i=>{f&&(X(null),J(i.key),re(null),Ft("blocks"),l.selectTarget({kind:"loader",key:i.key}))},Lr=async({name:i,path:m,templateKey:C})=>{if(!t||!o)return;const _=Gn(m);if(_){de(_);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Me.some(ke=>Ee(ke.path)===Ee(oe))){de(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(C&&(_e=T?.[C],!_e)){de(e("sandbox.preview.templateNoLongerExists"));return}de(void 0);try{const ke=await Xe.mutateAsync({name:i,path:oe,template:_e});Z(!1),yn.success(e("sandbox.preview.pageCreated",{name:i})),await Qr(pi),Bt({key:ke.key,name:ke.name,path:ke.path}),Ft("blocks")}catch(ke){de(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},xn=Ze&&(kr||F.mode==="production"),_r=Xo({showPreviewToolbar:xn,contentEditingEnabled:p}),lt=xn?n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Nr,"aria-label":e("sandbox.preview.refresh"),children:n.jsx(Kr,{size:16})})}),n.jsx(ft,{side:"bottom",children:e("sandbox.preview.refresh")})]}),_r?n.jsxs("div",{ref:Q,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>H(i=>!i),children:[q&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(wn,{size:11}),"Global"]}),nn&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(Sn,{size:11}),e("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ke("text-[13px] font-medium text-foreground",Ct==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Ct??vn}),!q&&!ee&&Ct!=null&&G&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:wt(G).map((i,m)=>{if(i.type==="text")return n.jsx("span",{className:Ke(m===0?"min-w-0 truncate":"shrink-0"),children:i.text},`text-${m}`);const C=Rt[i.name];return C&&ot?n.jsx($o,{sources:C,template:G,paramName:i.name,value:Ve[i.name]??"",sandboxRef:ot,onCommit:_=>$t(i.name,_)},`${z}:${i.name}`):n.jsx(Jo,{name:i.name,value:Ve[i.name]??"",onCommit:_=>$t(i.name,_)},`${z}:${i.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>H(i=>!i),"aria-label":e("sandbox.preview.choosePage"),"aria-expanded":D,children:n.jsx(es,{size:12,className:Ke("shrink-0 text-muted-foreground transition-transform",D&&"rotate-180")})})]}),D&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(ls,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:A,onChange:i=>I(i.target.value),onKeyDown:i=>{if(i.key!=="Enter")return;const m=A.trim();if(!m)return;const C=We.find(_=>Ee(_.path)===Ee(m));C&&(i.preventDefault(),H(!1),I(""),Bt(C))},placeholder:e("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:i=>{i.preventDefault(),H(!1),I(""),de(void 0),Z(!0)},children:[n.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:e("sandbox.preview.createNewPage")})]})}),We.length===0&&rt.length===0&&Et.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Me.length===0&&jt.length===0&&tn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[We.length>0&&n.jsx("div",{className:"p-1.5",children:We.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Bt(i)},children:[n.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.path})]},i.key))}),rt.length>0&&n.jsxs("div",{className:Ke("p-1.5",We.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalComponents")}),rt.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Rr(i)},children:[n.jsx(wn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]}),Et.length>0&&n.jsxs("div",{className:Ke("p-1.5",(We.length>0||rt.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalLoaders")}),Et.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Tr(i)},children:[n.jsx(Sn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:vn}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{"aria-label":e(dn),onClick:()=>{yr()},children:n.jsx(Un,{size:16})})}),n.jsx(ft,{side:"bottom",children:e(dn)})]})]}):null,Or=lt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:lt}):null,Dr=F.mode==="sandbox",ct=hi[w],dt=w==="desktop"&&(R.width===0||R.width>=ct.width+2*$n),bn=dt?1:Math.min(R.width>0?R.width/(ct.width+2*$n):1,1),Ar=dt?{width:"100%",height:"100%"}:{width:`${ct.width}px`,height:R.height>0?`${R.height/bn}px`:`${ct.height}px`,transform:`scale(${bn})`,transformOrigin:"top center"},Mr=Ze?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[Dr&&n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Er,"aria-pressed":he==="visual","aria-label":e("sandbox.preview.visualEditor"),active:he==="visual",className:"rounded-full",children:n.jsx(kn,{size:16})})}),n.jsx(ft,{side:"top",children:e("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Cr,"aria-label":e(Bn[w]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[w==="mobile"&&n.jsx(ss,{size:16}),w==="tablet"&&n.jsx(os,{size:16}),w==="desktop"&&n.jsx(is,{size:16})]},w)})}),n.jsx(ft,{side:"top",children:e(Bn[w])})]})]})}):null,Fr=!!ee&&he==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[ot&&Object.entries(Rt).map(([i,m])=>(Ve[i]??"")===""?n.jsx(qo,{sources:m,template:G,paramName:i,sandboxRef:ot,onFill:C=>$t(i,C)},`${z}:${i}`):null),n.jsx(cs.Topbar.Center.Portal,{fallback:lt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:lt}),n.jsx("div",{className:"flex-1"})]}),children:Or}),n.jsx("div",{className:"flex-1 overflow-hidden",children:Fr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K}),M&&z&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})})]}):n.jsxs(Nn,{orientation:"horizontal",disabled:he!=="blocks",children:[n.jsx(gt,{ref:P,id:"preview-blocks-editor",defaultSize:he==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:he==="blocks"&&n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K})}),he==="blocks"&&n.jsx(Cn,{withHandle:!0}),n.jsx(gt,{id:"preview-canvas",defaultSize:he==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden",children:n.jsxs(Nn,{orientation:"horizontal",disabled:!(M&&z),children:[M&&z&&n.jsxs(n.Fragment,{children:[n.jsx(gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})}),n.jsx(Cn,{withHandle:!0})]}),n.jsx(gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:i=>{if(!i)return;const m=()=>O(_=>_.width===i.clientWidth&&_.height===i.clientHeight?_:{width:i.clientWidth,height:i.clientHeight});m();const C=new ResizeObserver(m);return C.observe(i),()=>C.disconnect()},className:Ke("h-full relative overflow-clip flex justify-center",Ze&&!dt&&"bg-muted/30"),children:[(be||fr)&&Ze&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"starting",progress:an,claimPhase:Ot})}),Ie.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"suspended",onResume:ge.resume})}),Ie.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"errored",error:Ie.error,onRetry:ge.retry,connectionsHref:`/${Re.slug}/settings/connections`})}),F.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(kt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),he==="visual"&&!k&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(kn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),he==="visual"&&k&&n.jsx(mo,{element:k,onDismiss:()=>N(null)}),Mr,Ze&&we&&n.jsx("div",{className:Ke("shrink-0",!dt&&"border-x border-border bg-background shadow-sm"),style:Ar,onMouseLeave:jr,children:n.jsx("iframe",{ref:v,src:we,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:fn.handleError,onLoad:()=>{if(fn.handleLoad(),Pe(),F.mode!=="sandbox"){F.mode==="production"&&!F.showWakingPill&&he==="blocks"&&Mt();return}if(Hr("vm_preview_loaded",{view_mode:he,vm_id:Qe?.sandboxHandle??null}),!q)try{const i=v.current?.contentWindow?.location?.pathname;if(!i)return;const m=Ne.current;if(m!==null&&(Ne.current=null,Ee(i)!==Ee(m))||Ee(i)===Ee(ye))return;ie(i),at({path:i,pageKey:xe,params:Ve})}catch{}he==="visual"&&gn(),he==="blocks"&&Mt()}},F.iframeBase)})]})})]})})]})}),n.jsx(ei,{open:L,onOpenChange:Z,isPending:Xe.isPending,error:Y,templates:Me,onSubmit:Lr})]})}function ki(t){const e=pe.c(22),{virtualMcpId:r}=t,s=Ce(),o=Gr(r),{activeTask:u,taskId:d,currentBranch:l}=St(),a=Qs(d),[c,h]=x.useState(!1);if(Ys({threadId:d,sandboxBranch:u?.branch??l,agentHasRepo:Kt(o?.metadata),threadHasRepo:Kt(a)||Kt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(Rn,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),k=n.jsx(Rn,{className:"size-4"}),e[5]=b,e[6]=k):(b=e[5],k=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=n.jsxs(Ye,{onClick:b,children:[k,N]}),e[9]=N,e[10]=y):y=e[10];let S;e[11]!==g||e[12]!==w||e[13]!==y?(S=n.jsx(Xt,{className:"h-full",image:E,title:g,description:w,actions:y}),e[11]=g,e[12]=w,e[13]=y,e[14]=S):S=e[14];let v;e[15]!==c?(v=n.jsx(Js,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=v):v=e[16];let P;return e[17]!==S||e[18]!==v?(P=n.jsxs(n.Fragment,{children:[S,v]}),e[17]=S,e[18]=v,e[19]=P):P=e[19],P}let f;return e[20]!==r?(f=n.jsx(wi,{virtualMcpId:r}),e[20]=r,e[21]=f):f=e[21],f}function ud(){const t=pe.c(2),e=Xs();let r;return t[0]!==e?(r=n.jsx(Ur,{tabId:"site-editor",children:n.jsx(Wr,{feature:"cms",children:n.jsx(ki,{virtualMcpId:e})})}),t[0]=e,t[1]=r):r=t[1],r}export{ud as default};
|
|
518
|
+
`)}function uo(t,e,r=320,s=44,o=12){const{x:u,y:d}=t,{width:l,height:a}=e,c=Math.max(o,Math.min(u-r/2,l-r-o)),p=d/a>.68?Math.max(o,d-s-18):Math.min(d+18,a-s-o);return{leftPct:c/l*100,topPct:p/a*100}}function mo(t){const e=pe.c(45),{element:r,onDismiss:s}=t,[o,u]=x.useState(""),d=x.useRef(null),{sendMessage:l}=Vr(),{openSidePanel:a}=$s(),c=Ce();let h;e[0]!==r||e[1]!==o||e[2]!==s||e[3]!==a||e[4]!==l?(h=()=>{if(!o.trim())return;const D=co(r,o);a(),l({parts:[{type:"text",text:D}]}),s()},e[0]=r,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=h):h=e[5];const p=h;let f;e[6]!==r.position||e[7]!==r.viewport?(f=uo(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=f):f=e[8];const E=f,g=`${E.leftPct}%`,w=`${E.topPct}%`;let b;e[9]!==g||e[10]!==w?(b={left:g,top:w,width:"320px"},e[9]=g,e[10]=w,e[11]=b):b=e[11];let k;e[12]!==p?(k=D=>{D.preventDefault(),p()},e[12]=p,e[13]=k):k=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=D=>u(D.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=D=>{D.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let S;e[17]!==c?(S=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=S):S=e[18];let v;e[19]!==o||e[20]!==y||e[21]!==S?(v=n.jsx("input",{ref:d,autoFocus:!0,type:"text",value:o,onChange:N,onKeyDown:y,placeholder:S,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=y,e[21]=S,e[22]=v):v=e[22];let P;e[23]!==o?(P=o.trim(),e[23]=o,e[24]=P):P=e[24];const M=!P;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let $;e[27]!==c?($=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=K):K=e[31];let R;e[32]!==W?(R=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,K]}),e[32]=W,e[33]=R):R=e[33];let O;e[34]!==M||e[35]!==j||e[36]!==R?(O=n.jsx("button",{type:"submit",disabled:M,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:R}),e[34]=M,e[35]=j,e[36]=R,e[37]=O):O=e[37];let B;e[38]!==v||e[39]!==O||e[40]!==k?(B=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:k,children:[v,O]}),e[38]=v,e[39]=O,e[40]=k,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const _n="site-links",fo=/details?page|\bpdp\b/i,po=/listingpage|\bplp\b/i;function ho(t,e,r){const s=new Set;for(const l of r)fo.test(l)&&s.add("product"),po.test(l)&&s.add("category");const o=wt(Qt(t)),u=o[o.length-1],d=o[o.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&o.some(l=>l.type==="param"&&l.name==="*")&&s.add("category"),s}const go=["rosa","preto","pink","black"];function vt(t,e){const r=e.trim();return r?t(r):go.flatMap(s=>t(s))}function vo(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const or=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Zt(t){return t.split("/")[0]??""}function xo(t){const e=new Set;for(const r of t){const s=Zt(r);or.has(s)&&e.add(s)}return e}function bo(t,e){const r=Zt(t);return!or.has(r)||e.size===0?!0:e.has(r)}const yo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>vt(r=>vo(t,r),e),optionsFromPayload:xt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:No}];function wo(t,e,r=new Set){const s=[...e],o=l=>{const a=[];for(const c of yo){if(c.kind!==l)continue;const h=s.find(p=>c.test(p)&&bo(p,r));h&&a.push({cand:c,resolveType:h})}return a.find(c=>r.has(Zt(c.resolveType)))??a[0]},u=(l,a,c)=>({kind:l.kind,id:`${l.kind}:${a}`,resolveType:a,clientFilter:l.clientFilter,isFallback:c,buildRequests:h=>l.buildRequests(a,h),optionsFromPayload:l.optionsFromPayload}),d=[];for(const l of["product","category"]){if(!t.has(l))continue;const a=o(l);a&&d.push(u(a.cand,a.resolveType,!1))}return t.size>0&&d.push(ko(t.has("category")?"category":"product")),d}function ko(t){return{kind:t,id:_n,resolveType:_n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>_o(e,r)}}function He(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function So(t,e,r){const s=new Set,o=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const l=He(d);if(!l)return;const a=l.__resolveType;if(typeof a=="string"){if(r(a))s.add(a);else if(a in e&&!o.has(a)){o.add(a);const c=He(e[a])?.__resolveType;typeof c=="string"&&r(c)&&s.add(a),u(e[a])}}for(const c of Object.values(l))u(c)};return u(t),s}function ir(t){const e=new Set,r=[];for(const s of t)for(const o of s)e.has(o.value)||(e.add(o.value),r.push(o));return r}function ar(t){try{return decodeURIComponent(t)}catch{return t}}function Po(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jo(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=Po(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function lr(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const o=wt(Qt(e)),{pattern:u,order:d}=jo(o),l=d.indexOf(r);if(l===-1)return null;const a=s.match(u);if(!a)return null;const c=a[l+1]?.replace(/^\/+|\/+$/g,"");return c?ar(c):null}function xt(t,e){const r=He(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],o=[],u=new Set;for(const d of s){const l=He(d);if(!l)continue;const a=lr(l.url,e.template,e.paramName);if(!a||u.has(a))continue;u.add(a);const c=He(l.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof l.name=="string"&&l.name||a,p=Array.isArray(l.image)?He(l.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;o.push({value:a,label:h,image:f})}return o}function Eo(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?ar(r):null}function No(t){const e=[],r=new Set,s=(o,u)=>{const d=He(o);if(!d)return;const l=typeof d.name=="string"&&d.name?d.name:"",a=l?[...u,l]:u,c=Eo(d.url);if(c&&!r.has(c)&&(r.add(c),e.push({value:c,label:a.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,a)};if(Array.isArray(t))for(const o of t)s(o,[]);return e}const Co=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function Ro(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function To(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,o=0;for(;(s=r.exec(t))!==null&&o++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Lo(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const l=(u[1]??"").replace(/\\\//g,"/");if(!l||r.has(l))continue;r.add(l);const a=t.slice(u.index,u.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:u[2]??"",image:a||void 0})}return e}function _o(t,e){const r=[],s=new Set,o=(u,d,l,a)=>{if(r.length>=200)return;const c=lr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||l==="category"&&Co.has(c.split("/")[0]??"")||(s.add(c),r.push({value:c,label:d&&d.length<=80?d:Ro(c),kind:l,image:a}))};for(const{url:u,name:d,image:l}of Lo(t))o(u,d,"product",l);for(const{href:u,text:d}of To(t))u.startsWith("/")&&!u.startsWith("//")&&o(u,d,"category");return r}function tt(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const cr=1e4;function Oo(t){return{product:{noun:t("sandbox.pathParamPickerChip.kindProductNoun"),heading:t("sandbox.pathParamPickerChip.kindProductHeading")},category:{noun:t("sandbox.pathParamPickerChip.kindCategoryNoun"),heading:t("sandbox.pathParamPickerChip.kindCategoryHeading")}}}async function Do(t,{resolveType:e,props:r}){const s=await fetch(ds(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(cr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function On(t,e){const r=await fetch(us(t,e),{signal:AbortSignal.timeout(cr)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function Ao(t,e,r){const s=e.optionsFromPayload(await On(t,"/"),r),o=s.find(d=>d.kind==="category");if(!o)return s;const u=Fe(r.template,{[r.paramName]:o.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await On(t,u),r).filter(l=>l.kind==="product");return ir([s,d])}catch{return s}}function Mo(t,e,r){return $r.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function Fo(t,e,r,s){if(e.homepageLinks)return Ao(t,e,s);const o=e.buildRequests?.(r)??[];if(o.length===0)return[];const u=await Promise.allSettled(o.map(l=>Do(t,l))),d=u.filter(l=>l.status==="fulfilled").map(l=>l.value);if(d.length===0){const l=u.find(a=>a.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return ir(d.map(l=>e.optionsFromPayload(l,s)))}function qt(t,e,r,s,o){return{queryKey:Mo(t,e,r),queryFn:()=>Fo(t,e,r,s),enabled:o,staleTime:6e4,retry:1}}function nt(t){const e=pe.c(16),{heading:r,iconKind:s,options:o,template:u,paramName:d,keyPrefix:l,onSelect:a}=t;if(o.length===0)return null;let c;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==l||e[9]!==a||e[10]!==d||e[11]!==u?(p=f=>n.jsxs(Xn,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>a(f.value),children:[s==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(Hn,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${l}:${f.value}`),e[7]=s,e[8]=l,e[9]=a,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=o.map(p),e[0]=s,e[1]=l,e[2]=a,e[3]=o,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==r||e[14]!==c?(h=n.jsx(Qn,{heading:r,children:c}),e[13]=r,e[14]=c,e[15]=h):h=e[15],h}function Dn(t){const e=pe.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function $o(t){const e=pe.c(52),{sources:r,template:s,paramName:o,value:u,sandboxRef:d,onCommit:l}=t,a=Ce(),[c,h]=x.useState(!1),[p,f]=x.useState(""),[E,g]=x.useState(""),w=x.useRef(null),b=o==="*"?a("sandbox.preview.catchAllParamLabel"):`:${o}`,k=Oo(a),y=[...new Set(r.map(U=>k[U.kind].noun))].join(" or ");let S;e[0]!==a||e[1]!==y?(S=a("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=a,e[1]=y,e[2]=S):S=e[2];const v=S,P={template:s,paramName:o};let M;e[3]!==p?(M=(U,T)=>({source:U,query:T,options:U.clientFilter?tt(T.data??[],p):T.data??[]}),e[3]=p,e[4]=M):M=e[4];const j=M,$=r.filter(Vo),W=r.filter(Wo),K=Wt({queries:$.map(U=>qt(d,U,E,P,c))});let R;e[5]!==K||e[6]!==j?(R=(U,T)=>j(U,K[T]),e[5]=K,e[6]=j,e[7]=R):R=e[7];const O=$.map(R),B=O.length===0||O.every(Uo),V=Wt({queries:W.map(U=>qt(d,U,E,P,c&&B))});let D;e[8]!==V||e[9]!==j?(D=(U,T)=>j(U,V[T]),e[8]=V,e[9]=j,e[10]=D):D=e[10];const H=W.map(D),A=B?H:O,I=A.length===1&&A[0]?.source.homepageLinks?A[0]:null,L=I&&!I.query.isLoading&&!I.query.isError?I?.query.data??[]:[],Z=tt(L.filter(Ho),p),Y=tt(L.filter(Ko),p),de=Z.length>0&&Y.length>0,q=U=>{h(U),w.current&&clearTimeout(w.current),f(U?u:""),g(U?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=U=>{f(U),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{g(U)},300)},e[11]=X):X=e[11];const ee=X,J=U=>{l(U),q(!1)},ue=qn(p),re=Fe(s,{[o]:ue}),G=er,ie=Zn,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",me=zo;let te;e[12]!==b||e[13]!==a?(te=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=a,e[14]=te):te=e[14];let ae;e[15]!==te?(ae=n.jsx(tr,{className:"sr-only",children:n.jsx(nr,{children:te})}),e[15]=te,e[16]=ae):ae=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx(Hn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ne;e[18]!==a?(ne=a("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=a,e[19]=ne):ne=e[19];let le;e[20]!==b?(le=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=le):le=e[21];let se;e[22]!==ne||e[23]!==le?(se=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",le]})]}),e[22]=ne,e[23]=le,e[24]=se):se=e[24];const Pe=zs,Re=!1,$e="min-h-0 flex-1";let ge;e[25]!==v||e[26]!==p?(ge=n.jsx(Ks,{autoFocus:!0,placeholder:v,value:p,onValueChange:ee}),e[25]=v,e[26]=p,e[27]=ge):ge=e[27];const Qe=Is,Oe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Te;e[28]!==a?(Te=a("sandbox.pathParamPickerChip.noResults"),e[28]=a,e[29]=Te):Te=e[29];let je;e[30]!==Te?(je=n.jsx(Hs,{children:Te}),e[30]=Te,e[31]=je):je=e[31];const Be=ue&&n.jsx(Qn,{className:"shrink-0",children:n.jsxs(Xn,{value:`__raw__:${ue}`,className:"gap-3 py-2",onSelect:()=>J(ue),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(Bs,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:ue,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:re})]})]})}),De=de?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:Z,template:s,paramName:o,keyPrefix:`${I?.source.id}:cat`,onSelect:J})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:Y,template:s,paramName:o,keyPrefix:`${I?.source.id}:prod`,onSelect:J})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:A.map(U=>{const{source:T,query:fe,options:Me}=U,{noun:Pt}=k[T.kind];if(fe.isLoading)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.loading",{noun:Pt})},T.id);if(fe.isError)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Xe=fe.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:tt(Xe.filter(Io),p),template:s,paramName:o,keyPrefix:`${T.id}:cat`,onSelect:J}),n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:tt(Xe.filter(Bo),p),template:s,paramName:o,keyPrefix:`${T.id}:prod`,onSelect:J})]},T.id)}return n.jsx(nt,{heading:A.length>1?k[T.kind].heading:void 0,iconKind:T.kind,options:Me,template:s,paramName:o,keyPrefix:T.id,onSelect:J},T.id)})});let Ae;e[32]!==Qe||e[33]!==je||e[34]!==Be||e[35]!==De?(Ae=n.jsxs(Qe,{className:Oe,children:[je,Be,De]}),e[32]=Qe,e[33]=je,e[34]=Be,e[35]=De,e[36]=Ae):Ae=e[36];let ve;e[37]!==Pe||e[38]!==ge||e[39]!==Ae?(ve=n.jsxs(Pe,{shouldFilter:Re,className:$e,children:[ge,Ae]}),e[37]=Pe,e[38]=ge,e[39]=Ae,e[40]=ve):ve=e[40];let Le;e[41]!==ie||e[42]!==ae||e[43]!==se||e[44]!==ve||e[45]!==me?(Le=n.jsxs(ie,{className:xe,onClick:me,children:[ae,se,ve]}),e[41]=ie,e[42]=ae,e[43]=se,e[44]=ve,e[45]=me,e[46]=Le):Le=e[46];let Ue;return e[47]!==G||e[48]!==q||e[49]!==c||e[50]!==Le?(Ue=n.jsx(G,{open:c,onOpenChange:q,children:Le}),e[47]=G,e[48]=q,e[49]=c,e[50]=Le,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:U=>{U.stopPropagation(),q(!0)},children:u||b}),Ue]})}function Bo(t){return t.kind==="product"}function Io(t){return t.kind!=="product"}function zo(t){return t.stopPropagation()}function Ko(t){return t.kind==="product"}function Ho(t){return t.kind!=="product"}function Uo(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Wo(t){return t.isFallback}function Vo(t){return!t.isFallback}function qo(t){const e=pe.c(8),{sources:r,template:s,paramName:o,sandboxRef:u,onFill:d}=t;let l,a;if(e[0]!==o||e[1]!==u||e[2]!==r||e[3]!==s){const E={template:s,paramName:o},g=r.filter(Go);a=Wt,l=g.map(w=>qt(u,w,"",E,!0)),e[0]=o,e[1]=u,e[2]=r,e[3]=s,e[4]=l,e[5]=a}else l=e[4],a=e[5];let c;e[6]!==l?(c={queries:l},e[6]=l,e[7]=c):c=e[7];const h=a(c),[p,f]=x.useState(!1);if(!p)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){f(!0),queueMicrotask(()=>d(g.value));break}}return null}function Go(t){return!t.isFallback}function Jo(t){const e=pe.c(31),{name:r,value:s,onCommit:o}=t,u=Ce(),[d,l]=x.useState(s),[a,c]=x.useState(!1),h=x.useRef(!1);let p;e[0]!==r||e[1]!==u?(p=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=p):p=e[2];const f=p,E=d||f;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>l(j.target.value),k=()=>c(!0),e[8]=b,e[9]=k):(b=e[8],k=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,l(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==o||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=qn(d);l(j),j!==s&&o(j)},e[12]=d,e[13]=o,e[14]=s,e[15]=y):y=e[15];let S;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(S=n.jsx("input",{type:"text",value:d,placeholder:f,title:w,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:Yo,onChange:b,onFocus:k,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=S):S=e[21];let v;e[22]!==g||e[23]!==S?(v=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,S]}),e[22]=g,e[23]=S,e[24]=v):v=e[24];let P;e[25]!==a||e[26]!==u?(P=a&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(ts,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=a,e[26]=u,e[27]=P):P=e[27];let M;return e[28]!==P||e[29]!==v?(M=n.jsxs(n.Fragment,{children:[v,P]}),e[28]=P,e[29]=v,e[30]=M):M=e[30],M}function Yo(t){return t.stopPropagation()}function Qo(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function Xo(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Zo(t){const e=pe.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Wn(r);let o;return e[2]!==t||e[3]!==s?(o={mutationFn:async u=>{const{name:d,path:l,template:a}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=ms(d),h=a?{...a,name:d,path:l}:fs(d,l);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:l}}},e[2]=t,e[3]=s,e[4]=o):o=e[4],Br(o)}function ei(t){const e=pe.c(89),{open:r,onOpenChange:s,isPending:o,error:u,templates:d,onSubmit:l}=t,a=o===void 0?!1:o,c=Ce();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=x.useState(h);let E;e[2]!==c?(E=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=E):E=e[3];const[g,w]=x.useState(E),[b,k]=x.useState(It),[N,y]=x.useState(null),[S,v]=x.useState(r);r!==S&&(v(r),r&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),k(It),y(null)));const P=!!d?.length;let M;e[4]!==a||e[5]!==s?(M=ne=>{!ne&&!a&&(y(null),s(!1))},e[4]=a,e[5]=s,e[6]=M):M=e[6];const j=M;let $;e[7]!==a||e[8]!==p||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==b?($=async ne=>{ne.preventDefault();const le=p.trim(),se=g.trim();if(!le||!se||a)return;const Pe=Gn(se);if(Pe){y(Pe);return}y(null),await l({name:le,path:se,templateKey:P&&b!==It?b:null})},e[7]=a,e[8]=p,e[9]=l,e[10]=g,e[11]=P,e[12]=b,e[13]=$):$=e[13];const W=$,K=N??u;let R;e[14]!==c?(R=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=R):R=e[15];let O;e[16]!==R?(O=n.jsx(tr,{children:n.jsx(nr,{children:R})}),e[16]=R,e[17]=O):O=e[17];let B;e[18]!==c?(B=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=ne=>f(ne.target.value),e[22]=D):D=e[22];let H;e[23]!==c?(H=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=H):H=e[24];let A;e[25]!==a||e[26]!==p||e[27]!==H?(A=n.jsx(En,{id:"new-page-name",value:p,onChange:D,placeholder:H,autoFocus:!0,disabled:a}),e[25]=a,e[26]=p,e[27]=H,e[28]=A):A=e[28];let I;e[29]!==A||e[30]!==V?(I=n.jsxs("div",{className:"space-y-1.5",children:[V,A]}),e[29]=A,e[30]=V,e[31]=I):I=e[31];let Q;e[32]!==c?(Q=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=Q):Q=e[33];let L;e[34]!==Q?(L=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:Q}),e[34]=Q,e[35]=L):L=e[35];let Z;e[36]===Symbol.for("react.memo_cache_sentinel")?(Z=ne=>w(ne.target.value),e[36]=Z):Z=e[36];let Y;e[37]!==c?(Y=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=Y):Y=e[38];let de;e[39]!==a||e[40]!==g||e[41]!==Y?(de=n.jsx(En,{id:"new-page-path",value:g,onChange:Z,placeholder:Y,disabled:a}),e[39]=a,e[40]=g,e[41]=Y,e[42]=de):de=e[42];let q;e[43]!==L||e[44]!==de?(q=n.jsxs("div",{className:"space-y-1.5",children:[L,de]}),e[43]=L,e[44]=de,e[45]=q):q=e[45];let X;e[46]!==a||e[47]!==P||e[48]!==c||e[49]!==b||e[50]!==d?(X=P&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),n.jsx(ps,{id:"new-page-template",value:b,onChange:k,templates:d??[],disabled:a})]}),e[46]=a,e[47]=P,e[48]=c,e[49]=b,e[50]=d,e[51]=X):X=e[51];let ee;e[52]!==K?(ee=K&&n.jsx("p",{className:"text-xs text-destructive",children:K}),e[52]=K,e[53]=ee):ee=e[53];let J;e[54]!==I||e[55]!==q||e[56]!==X||e[57]!==ee?(J=n.jsxs("div",{className:"space-y-4 py-4",children:[I,q,X,ee]}),e[54]=I,e[55]=q,e[56]=X,e[57]=ee,e[58]=J):J=e[58];let ue;e[59]!==s?(ue=()=>s(!1),e[59]=s,e[60]=ue):ue=e[60];let re;e[61]!==c?(re=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=re):re=e[62];let G;e[63]!==a||e[64]!==ue||e[65]!==re?(G=n.jsx(Ye,{type:"button",variant:"outline",onClick:ue,disabled:a,children:re}),e[63]=a,e[64]=ue,e[65]=re,e[66]=G):G=e[66];let ie;e[67]!==a||e[68]!==p||e[69]!==g?(ie=!p.trim()||!g.trim()||a,e[67]=a,e[68]=p,e[69]=g,e[70]=ie):ie=e[70];let xe;e[71]!==a||e[72]!==c?(xe=a?n.jsxs(n.Fragment,{children:[n.jsx(kt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=a,e[72]=c,e[73]=xe):xe=e[73];let me;e[74]!==ie||e[75]!==xe?(me=n.jsx(Ye,{type:"submit",disabled:ie,children:xe}),e[74]=ie,e[75]=xe,e[76]=me):me=e[76];let te;e[77]!==G||e[78]!==me?(te=n.jsxs(Us,{children:[G,me]}),e[77]=G,e[78]=me,e[79]=te):te=e[79];let ae;e[80]!==W||e[81]!==J||e[82]!==te||e[83]!==O?(ae=n.jsx(Zn,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[O,J,te]})}),e[80]=W,e[81]=J,e[82]=te,e[83]=O,e[84]=ae):ae=e[84];let be;return e[85]!==j||e[86]!==r||e[87]!==ae?(be=n.jsx(er,{open:r,onOpenChange:j,children:ae}),e[85]=j,e[86]=r,e[87]=ae,e[88]=be):be=e[88],be}function ti(t){const e=pe.c(29),{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,blockKey:a}=t,c=Ce();let h;e[0]!==o||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:o},e[0]=o,e[1]=r,e[2]=s,e[3]=h):h=e[3];const p=Wn(h);let f;e[4]!==p?(f=vs((v,P)=>p.mutate({blockKey:v,data:P})),e[4]=p,e[5]=f):f=e[5];const E=f;let g;e[6]!==a||e[7]!==l?(g=hs(l,a),e[6]=a,e[7]=l,e[8]=g):g=e[8];const{resolveType:w,props:b,title:k}=g;if(!w){let v;e[9]!==c?(v=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=v):v=e[10];let P;return e[11]!==v?(P=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=P):P=e[12],P}const N=`loader:${a}`;let y;e[13]!==a||e[14]!==w||e[15]!==k?(y={mode:"saved",blockKey:a,resolveType:w,title:k},e[13]=a,e[14]=w,e[15]=k,e[16]=y):y=e[16];let S;return e[17]!==o||e[18]!==l||e[19]!==d||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==s?(S=n.jsx(gs,{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:ni,onSaveReferencedBlock:E,showRun:!1},N),e[17]=o,e[18]=l,e[19]=d,e[20]=r,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=s,e[28]=S):S=e[28],S}async function ni(){}function ri(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function An(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ri(t.error)}}function si(t){switch(t){case"clone-failed":case"install-failed":case"start-failed":return"terminal-error";case"idle":case"cloning":return"booting";case"checking-out":case"installing":case"starting":case"running":case"crashed":return"snapshot-readable"}}function oi(t){if(t.fastPreviewActive)return t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData?{kind:"error",source:"data"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"};const e=si(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:r?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const ii="https://github.com/decocms/blocks";function ai(){const t=pe.c(14),e=Ce();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ns,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let o;t[3]!==e?(o=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=o):o=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Un,{size:14}),t[7]=d):d=t[7];let l;t[8]!==u?(l=n.jsx(Ye,{size:"sm",asChild:!0,children:n.jsxs("a",{href:ii,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=l):l=t[9];let a;return t[10]!==s||t[11]!==o||t[12]!==l?(a=n.jsx(Xt,{className:"h-full w-full",image:r,title:s,description:o,actions:l}),t[10]=s,t[11]=o,t[12]=l,t[13]=a):a=t[13],a}function li(t){const e=pe.c(15),{source:r,onRetry:s}=t,o=Ce();let u;e[0]!==r||e[1]!==o?(u=o(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,e[1]=o,e[2]=u):u=e[2];const d=u;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ws,{size:48,className:"text-muted-foreground"}),e[3]=l):l=e[3];let a;e[4]!==o?(a=o("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=o,e[5]=a):a=e[5];let c;e[6]!==o?(c=o("mainPanelTabs.blocksTabStates.retry"),e[6]=o,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=n.jsx(Ye,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==a||e[13]!==h?(p=n.jsx(Xt,{image:l,title:a,description:d,actions:h}),e[11]=d,e[12]=a,e[13]=h,e[14]=p):p=e[14],p}const ci=x.lazy(()=>Ir(()=>import("./sections-editor-C4NhZuXp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(49),{virtualMcpId:r,externalSelection:s,onViewJsonFile:o}=t,u=s===void 0?null:s,{org:d}=Gt(),{currentBranch:l,taskId:a}=St(),c=zn(),h=Jt(),p=rr(),f=c.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==l||e[1]!==d||e[2]!==E||e[3]!==a||e[4]!==r?(g=l?{orgSlug:d.slug,virtualMcpId:r,branch:l,threadId:a??null,previewUrl:E}:null,e[0]=l,e[1]=d,e[2]=E,e[3]=a,e[4]=r,e[5]=g):g=e[5];const w=g;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const k=Yt(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=Vn(w,N),S=oi({lifecyclePhase:c.lifecycle.phase,decofile:An(k),meta:An(y),hasEditableContent:Es(k.data,y.data),fastPreviewActive:Kn(r).runtime==="cms"}),v=di;if(S.kind==="loading"){let L;return e[10]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(zr,{})),e[10]=L):L=e[10],L}if(S.kind==="empty"){let L;return e[11]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(ai,{})),e[11]=L):L=e[11],L}if(S.kind==="error"){let L;e[12]!==k||e[13]!==h||e[14]!==y||e[15]!==S.source?(L=()=>{if(S.source==="sandbox"){h.retry();return}Promise.all([k.refetch(),y.refetch()])},e[12]=k,e[13]=h,e[14]=y,e[15]=S.source,e[16]=L):L=e[16];const Z=L;let Y;return e[17]!==Z||e[18]!==S.source?(Y=v(n.jsx(li,{source:S.source,onRetry:Z})),e[17]=Z,e[18]=S.source,e[19]=Y):Y=e[19],Y}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=L=>v(n.jsx("div",{className:"h-full min-h-0",children:L})),e[20]=P):P=e[20];const M=P,j=p.state.target;if(j?.kind==="loader"&&k.data&&y.data){const L=l??"",Z=E??null;let Y;return e[21]!==k.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==L||e[25]!==Z||e[26]!==j.key||e[27]!==r?(Y=M(n.jsx(ti,{orgSlug:d.slug,virtualMcpId:r,branch:L,previewUrl:Z,meta:y.data,decofile:k.data,blockKey:j.key})),e[21]=k.data,e[22]=y.data,e[23]=d.slug,e[24]=L,e[25]=Z,e[26]=j.key,e[27]=r,e[28]=Y):Y=e[28],Y}let $;e[29]!==l||e[30]!==d.slug||e[31]!==j||e[32]!==r?($=j||!l?null:Jn(Yn(d.slug,r,l)),e[29]=l,e[30]=d.slug,e[31]=j,e[32]=r,e[33]=$):$=e[33];const W=$;let K="/",R=null,O=null;j?.kind==="page"?(K=j.path,R=j.key):j?.kind==="section"?O=j.key:W&&(K=W.path,R=W.pageKey);const B=R?`page:${R}`:O?`section:${O}`:`path:${K}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const D=l??"",H=E??void 0,A=O?null:u,I=!!R&&p.state.editSeoPageKey===R;let Q;return e[35]!==O||e[36]!==R||e[37]!==K||e[38]!==B||e[39]!==o||e[40]!==d.slug||e[41]!==A||e[42]!==I||e[43]!==D||e[44]!==H||e[45]!==r||e[46]!==p.consumeEditSeo||e[47]!==p.setVariantOverride?(Q=M(n.jsx(x.Suspense,{fallback:V,children:n.jsx(ci,{orgSlug:d.slug,virtualMcpId:r,branch:D,previewReady:!0,previewUrl:H,currentPath:K,activePageBlockKey:R,activeGlobalBlockKey:O,externalSelection:A,initialEditSeo:I,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onViewJsonFile:o},B)})),e[35]=O,e[36]=R,e[37]=K,e[38]=B,e[39]=o,e[40]=d.slug,e[41]=A,e[42]=I,e[43]=D,e[44]=H,e[45]=r,e[46]=p.consumeEditSeo,e[47]=p.setVariantOverride,e[48]=Q):Q=e[48],Q}function di(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Fn(t){const e=pe.c(44),{virtualMcpId:r,pageKey:s,onClose:o,ref:u}=t,d=Ce(),{org:l}=Gt(),{currentBranch:a,taskId:c}=St(),p=Jt().previewUrl;let f;e[0]!==a||e[1]!==l.slug||e[2]!==p||e[3]!==c||e[4]!==r?(f=a?{orgSlug:l.slug,virtualMcpId:r,branch:a,threadId:c??null,previewUrl:p}:null,e[0]=a,e[1]=l.slug,e[2]=p,e[3]=c,e[4]=r,e[5]=f):f=e[5];const g=Yt(f),w=a??"";let b;e[6]!==l.slug||e[7]!==w||e[8]!==r?(b={orgSlug:l.slug,virtualMcpId:r,branch:w},e[6]=l.slug,e[7]=w,e[8]=r,e[9]=b):b=e[9];const{save:k,flush:N}=xs(b),y=g.data?.[s],S=g.data===void 0&&g.isLoading,v=g.data!==void 0&&y===void 0,P=!a||v||S;let M;e[10]!==y?(M=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=M):M=e[11];const j=M;let $;e[12]!==s||e[13]!==P||e[14]!==k?($=Q=>{if(P)return;let L;try{L=JSON.parse(Q)}catch{return}L===null||typeof L!="object"||Array.isArray(L)||k(s,L)},e[12]=s,e[13]=P,e[14]=k,e[15]=$):$=e[15];const W=$;let K;e[16]!==N?(K=()=>({flush:N}),e[16]=N,e[17]=K):K=e[17],x.useImperativeHandle(u,K);let R;e[18]!==d?(R=d("sectionsEditor.pageJsonDialog.titleShort"),e[18]=d,e[19]=R):R=e[19];let O;e[20]!==R?(O=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:R}),e[20]=R,e[21]=O):O=e[21];let B;e[22]!==d?(B=d("sectionsEditor.pageJsonDialog.close"),e[22]=d,e[23]=B):B=e[23];let V;e[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Vs,{size:14}),e[24]=V):V=e[24];let D;e[25]!==o||e[26]!==B?(D=n.jsx(Ye,{variant:"ghost",size:"icon",onClick:o,"aria-label":B,className:"size-7 shrink-0",children:V}),e[25]=o,e[26]=B,e[27]=D):D=e[27];let H;e[28]!==D||e[29]!==O?(H=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[O,D]}),e[28]=D,e[29]=O,e[30]=H):H=e[30];let A;e[31]!==g.data||e[32]!==N||e[33]!==j||e[34]!==S||e[35]!==v||e[36]!==s||e[37]!==P||e[38]!==W||e[39]!==d?(A=S?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}):v?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(qs,{code:j,language:"json",readOnly:P,height:"100%",onChange:Q=>W(Q??""),onSave:Q=>{W(Q),N()}},`${s}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=N,e[33]=j,e[34]=S,e[35]=v,e[36]=s,e[37]=P,e[38]=W,e[39]=d,e[40]=A):A=e[40];let I;return e[41]!==H||e[42]!==A?(I=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[H,A]}),e[41]=H,e[42]=A,e[43]=I):I=e[43],I}function dr(t){return t.contentEditingEnabled&&!t.isMobile}function ui(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function mi(t){return dr({contentEditingEnabled:sr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function fi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const pi=500,hi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},$n=1,Ht=["desktop","mobile","tablet"],Bn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function In(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function gi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function bt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ut(t,e){try{return new URL(t,e).href}catch{return null}}function vi(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function xi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function bi(t,e,r){const s=t.toLowerCase(),o=e.toLowerCase(),u=o.split("/").filter(Boolean),d=a=>{if(a===r)return 100;const c=a.indexOf(r);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(a[c-1]??"")&&(h+=20),h+=Math.round(r.length/a.length*20),h};let l=Math.max(d(s),d(o));return u.at(-1)===r?l=Math.max(l,95):u.includes(r)&&(l=Math.max(l,90)),l}function yi(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function wi({virtualMcpId:t}){const e=Ce(),r=Fs(),s=Zr(),{currentBranch:o,taskId:u,virtualMcpId:d}=St(),l=rr(),a=qr(d===t?t:null),c=Kn(t),h=Gs(a?.metadata?.ui?.layout??null),p=sr(h),f=dr({contentEditingEnabled:p,isMobile:s}),[E,g]=x.useState(()=>mi({cmsMode:h,isMobile:s})),[w,b]=x.useState("desktop"),[k,N]=x.useState(null),[y,S]=x.useState(null),v=x.useRef(null),P=x.useRef(null),[M,j]=x.useState(!1),$=x.useRef(null),W=()=>{$.current?.flush(),j(!1)},K=()=>j(i=>(i&&$.current?.flush(),!i)),[R,O]=x.useState({width:0,height:0}),[B,V]=x.useState(null),[D,H]=x.useState(!1),[A,I]=x.useState(""),Q=x.useRef(null),[L,Z]=x.useState(!1),[Y,de]=x.useState(),[q,X]=x.useState(null),[ee,J]=x.useState(null),[ue,re]=x.useState(null),[G,ie]=x.useState("/"),[xe,me]=x.useState(null),[te,ae]=x.useState({}),[be,ne]=x.useState(!1),le=x.useRef(null),se=()=>{ne(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>ne(!1),15e3)},Pe=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne(!1)},{org:Re}=Gt(),$e=zn(),ge=Jt(),Qe=ge.vmEntry,Oe=ge.previewUrl,Te=$e.lifecycle.phase,je=Te==="running",Be=a?.id===t?Xr(a.metadata):null,De=a?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",ve=Ts({sandboxUrl:Oe,previewServerUrl:Be,fastPreviewActive:De}),Le=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null,previewUrl:Oe}:null,Ue=Yt(Le,{fetchEnabled:je}),U=Vn(Le,{fetchEnabled:je}),T=Ue.data,fe=U.data,Me=T?Ns(T).sort((i,m)=>i.name.localeCompare(m.name)):[],Pt=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o}:null,Xe=Zo(Pt),jt=T&&fe?Cs(T,fe):[],en=T&&fe?bs(fe,T,"loaders"):[],We=A?(()=>{const i=A.toLowerCase();return Me.map(m=>({page:m,score:bi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,C)=>C.score-m.score||m.page.path.length-C.page.path.length).map(({page:m})=>m)})():Me,rt=jt.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),tn=f?en:[],Et=tn.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),nn=ee?en.find(i=>i.key===ee)??null:null,Ee=Qt,Nt=q||ee?null:Rs(Me,G,xe),Ct=q?q.name:nn?.title??Nt?.name,z=Nt?.key??null,st=Nt?.path??null,Ve=(z?te[z]:void 0)??{},ye=Fe(G,Ve),Rt={};if(je&&Oe&&fe&&T){const i=ys(fe,"loaders"),m=z?T[z]:void 0,C=So(m,T,oe=>i.has(oe)),_=xo(C);for(const oe of wt(G)){if(oe.type!=="param")continue;const _e=ho(G,oe.name,C),ke=wo(_e,i,_);ke.length>0&&(Rt[oe.name]=ke)}}const ot=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null}:null,rn=T&&z?ws(T,z,0):[],sn=T?ks(rn,T):[],Tt=sn.map(i=>i.isSavedBlock?i.label:""),Lt=sn.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),_t=rn.map(i=>Vt(i,T??{})),on=x.useRef(null),Ne=x.useRef(null),ur=$e.status.state==="paused",Ot=$e.phase,an=Ss({claimPhase:Ot,lifecycle:$e.lifecycle}),Ie=ge.previewState,mr=ge.userStopped,fr=As(Re.slug,t??"",o??""),{url:ze}=Ds(De&&t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,previewServerUrl:Be??null,path:ye}:null),pr=Ae&&c.runtime==="sandbox",F=eo({previewState:Ie,progressStatus:an.status,previewServerUrl:Be,fastPreviewActive:De,fastPreviewReady:!!ze,codingSession:pr}),Ze=F.mode!=="none",ln=F.mode==="production"&&F.iframeBase?bt(F.iframeBase):null,hr=!r,qe=F.mode==="production"?ln:bt(Oe),gr=a?.id===t&&a.metadata?.fastPreviewInPlace===!0,et=F.mode==="production"&&De&&gr&&f&&E==="blocks",cn=x.useRef(null),{pin:vr,effective:xr}=vi(cn.current,{inPlaceRenderActive:et,draftPreviewUrl:ze,resolvedPath:ye});cn.current=vr;const we=gi(F.mode==="sandbox"?ht(In(ue??Ut(ye,F.iframeBase)??F.iframeBase,w),l.state.variantOverride??[]):F.mode==="production"&&hr?ht(In(Ls(ue??xr??Ut(ye,F.iframeBase)??F.iframeBase,F.showWakingPill?_s:null),w),l.state.variantOverride??[]):null);x.useEffect(()=>{},[r,ln,B]);const dn="sandbox.preview.openInNewTab",un=ze??(F.iframeBase?Ut(ye,F.iframeBase):null),br=F.mode==="production"?un?ht(un,l.state.variantOverride??[]):null:we??F.iframeBase,yr=async()=>{const i=br;if(i){window.open(i,"_blank","noopener");return}},it=t&&o?Yn(Re.slug,t,o):null,at=i=>{it&&Ms(it,i)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!ve||!fe))if(ce.kind==="page"){const i=te[ce.key]??{};Ne.current=Fe(ce.path,i),X(null),J(null),re(null),me(ce.key),ie(ce.path),at({path:ce.path,pageKey:ce.key,params:i})}else if(ce.kind==="loader")Ne.current=null,X(null),J(ce.key),re(null);else{const i=jt.find(m=>m.key===ce.key);if(i){Ne.current=null;const m=Pn(fe);J(null),X(i),re(jn(ve,m,i.key))}}},[ce,ve,fe,te]),x.useEffect(()=>{!z||st===null||ce?.kind==="page"&&ce.key===z&&ce.path===st||l.selectTarget({kind:"page",key:z,path:st})},[z,st,ce]);const[mn,wr]=x.useState(null);if(Ie.kind==="iframe"&&mn!==Ie.previewUrl){const i=mn!==null;wr(Ie.previewUrl);const m=it?Jn(it):null;if(m){if(Ne.current=Fe(m.path,m.params),ie(m.path),me(m.pageKey),re(null),X(null),J(null),m.pageKey&&Object.keys(m.params).length>0){const C=m.pageKey;ae(_=>({..._,[C]:m.params}))}}else i&&(Ne.current=null,ie("/"),re(null),me(null),X(null),J(null))}on.current=we;const fn=so({iframeRef:v,src:F.mode==="sandbox"?we:null,active:F.mode==="sandbox"}),pn=x.useRef(null);x.useEffect(()=>{if(!ze||!we||pn.current===ze)return;pn.current=ze;const i=v.current;i&&i.getAttribute("src")!==we&&(se(),i.src=we)},[ze,we]);const hn=()=>{const i=v.current?.contentWindow,m=qe;if(!i||!m||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Os({previewBaseUrl:m,pageBlock:C,decofile:T,path:ye,pathTemplate:G});if(!_)return;const oe=ht(_.src,l.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:oe,body:_.body},m)},Dt=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){Dt.current=null;return}const i={nav:JSON.stringify({page:z,path:ye,pathTemplate:G}),content:JSON.stringify(T)},m=xi(Dt.current,i);Dt.current=i,m&&hn()},[T,et,q,ee,z,ye,G]);const At=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){At.current=null;return}const i=JSON.stringify(l.state.variantOverride??null),m=At.current;At.current={page:z,sig:i},!(!m||m.page!==z||m.sig===i)&&hn()},[l.state.variantOverride,et,q,ee,z]);const kr=!!t&&!!o&&!$e.notFound&&!mr&&!ur&&(Ot?.kind==="ready"||Te!=="idle"),he=fi({editingMode:E,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:f});x.useEffect(()=>{const i=qe;if(!i)return;const m=C=>{if(C.origin===i)if(C.data?.type==="visual-editor::element-clicked"){const _=oo.safeParse(C.data.payload);_.success&&N(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=lo.safeParse(C.data.payload);_.success&&S({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?se():C.data?.type==="cms-editor::render-end"?(Pe(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},i)):C.data?.type==="cms-editor::render-error"&&Pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[qe,Tt,Lt,_t]);const gn=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::activate",script:io},m)},Sr=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Mt=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage(F.mode==="production"?{type:"editor::inject",args:{script:Ln}}:{type:"visual-editor::activate",script:Ln},m),i.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},m))},Pr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},jr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage({type:"cms-editor::clear-hover"},m),i.postMessage({type:"visual-editor::clear-hover"},m))},Ft=i=>{if(i==="blocks"&&!f)return;const m=E;!s&&i!==m&&(i==="blocks"?P.current?.resize("30%"):P.current?.collapse()),i!=="blocks"&&W(),g(i),N(null),S(null),i!=="blocks"&&J(null),m==="visual"&&Sr(),i==="visual"&&gn(),m==="blocks"&&i!=="blocks"&&Pr(),i==="blocks"&&Mt()},Er=()=>{Ft(ui(E,f))},Nr=()=>{if(!v.current||!we)return;se();const i=v.current;i.src=we};Jr(()=>{const i=v.current;if(!i)return;se();const m=document.activeElement,C=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),yi(i,on.current);let _;const oe=()=>{clearTimeout(_),i.tabIndex=C,i.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===i)&&m?.focus(),i.removeEventListener("load",oe)};i.addEventListener("load",oe),_=setTimeout(oe,3e3)});const Cr=()=>{const i=Ht.indexOf(w);b(Ht[(i+1)%Ht.length])},$t=(i,m)=>{if(!z)return;const C=z,_={...Ve,[i]:m};Ne.current=Fe(G,_),ae(oe=>({...oe,[C]:_})),at({path:G,pageKey:C,params:_})},vn=Qo({iframeBase:F.iframeBase,resolvedPath:ye,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Bt=i=>{const m=te[i.key]??{},C=Fe(i.path,m);(q||Ee(C)!==Ee(ye))&&se(),Ne.current=C,X(null),J(null),re(null),S(null),me(i.key),ie(i.path),at({path:i.path,pageKey:i.key,params:m}),l.selectTarget({kind:"page",key:i.key,path:i.path})},Rr=i=>{if(!ve||!fe){yn.error(e("sandbox.preview.previewMetadataNotReady"));return}se(),Ne.current=null;const m=Pn(fe),C=jn(ve,m,i.key);X(i),J(null),re(C),S(null),l.selectTarget({kind:"section",key:i.key})},Tr=i=>{f&&(X(null),J(i.key),re(null),Ft("blocks"),l.selectTarget({kind:"loader",key:i.key}))},Lr=async({name:i,path:m,templateKey:C})=>{if(!t||!o)return;const _=Gn(m);if(_){de(_);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Me.some(ke=>Ee(ke.path)===Ee(oe))){de(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(C&&(_e=T?.[C],!_e)){de(e("sandbox.preview.templateNoLongerExists"));return}de(void 0);try{const ke=await Xe.mutateAsync({name:i,path:oe,template:_e});Z(!1),yn.success(e("sandbox.preview.pageCreated",{name:i})),await Qr(pi),Bt({key:ke.key,name:ke.name,path:ke.path}),Ft("blocks")}catch(ke){de(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},xn=Ze&&(kr||F.mode==="production"),_r=Xo({showPreviewToolbar:xn,contentEditingEnabled:p}),lt=xn?n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Nr,"aria-label":e("sandbox.preview.refresh"),children:n.jsx(Kr,{size:16})})}),n.jsx(ft,{side:"bottom",children:e("sandbox.preview.refresh")})]}),_r?n.jsxs("div",{ref:Q,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>H(i=>!i),children:[q&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(wn,{size:11}),"Global"]}),nn&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(Sn,{size:11}),e("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ke("text-[13px] font-medium text-foreground",Ct==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Ct??vn}),!q&&!ee&&Ct!=null&&G&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:wt(G).map((i,m)=>{if(i.type==="text")return n.jsx("span",{className:Ke(m===0?"min-w-0 truncate":"shrink-0"),children:i.text},`text-${m}`);const C=Rt[i.name];return C&&ot?n.jsx($o,{sources:C,template:G,paramName:i.name,value:Ve[i.name]??"",sandboxRef:ot,onCommit:_=>$t(i.name,_)},`${z}:${i.name}`):n.jsx(Jo,{name:i.name,value:Ve[i.name]??"",onCommit:_=>$t(i.name,_)},`${z}:${i.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>H(i=>!i),"aria-label":e("sandbox.preview.choosePage"),"aria-expanded":D,children:n.jsx(es,{size:12,className:Ke("shrink-0 text-muted-foreground transition-transform",D&&"rotate-180")})})]}),D&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(ls,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:A,onChange:i=>I(i.target.value),onKeyDown:i=>{if(i.key!=="Enter")return;const m=A.trim();if(!m)return;const C=We.find(_=>Ee(_.path)===Ee(m));C&&(i.preventDefault(),H(!1),I(""),Bt(C))},placeholder:e("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:i=>{i.preventDefault(),H(!1),I(""),de(void 0),Z(!0)},children:[n.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:e("sandbox.preview.createNewPage")})]})}),We.length===0&&rt.length===0&&Et.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Me.length===0&&jt.length===0&&tn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[We.length>0&&n.jsx("div",{className:"p-1.5",children:We.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Bt(i)},children:[n.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.path})]},i.key))}),rt.length>0&&n.jsxs("div",{className:Ke("p-1.5",We.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalComponents")}),rt.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Rr(i)},children:[n.jsx(wn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]}),Et.length>0&&n.jsxs("div",{className:Ke("p-1.5",(We.length>0||rt.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalLoaders")}),Et.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Tr(i)},children:[n.jsx(Sn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:vn}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{"aria-label":e(dn),onClick:()=>{yr()},children:n.jsx(Un,{size:16})})}),n.jsx(ft,{side:"bottom",children:e(dn)})]})]}):null,Or=lt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:lt}):null,Dr=F.mode==="sandbox",ct=hi[w],dt=w==="desktop"&&(R.width===0||R.width>=ct.width+2*$n),bn=dt?1:Math.min(R.width>0?R.width/(ct.width+2*$n):1,1),Ar=dt?{width:"100%",height:"100%"}:{width:`${ct.width}px`,height:R.height>0?`${R.height/bn}px`:`${ct.height}px`,transform:`scale(${bn})`,transformOrigin:"top center"},Mr=Ze?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[Dr&&n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Er,"aria-pressed":he==="visual","aria-label":e("sandbox.preview.visualEditor"),active:he==="visual",className:"rounded-full",children:n.jsx(kn,{size:16})})}),n.jsx(ft,{side:"top",children:e("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Cr,"aria-label":e(Bn[w]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[w==="mobile"&&n.jsx(ss,{size:16}),w==="tablet"&&n.jsx(os,{size:16}),w==="desktop"&&n.jsx(is,{size:16})]},w)})}),n.jsx(ft,{side:"top",children:e(Bn[w])})]})]})}):null,Fr=!!ee&&he==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[ot&&Object.entries(Rt).map(([i,m])=>(Ve[i]??"")===""?n.jsx(qo,{sources:m,template:G,paramName:i,sandboxRef:ot,onFill:C=>$t(i,C)},`${z}:${i}`):null),n.jsx(cs.Topbar.Center.Portal,{fallback:lt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:lt}),n.jsx("div",{className:"flex-1"})]}),children:Or}),n.jsx("div",{className:"flex-1 overflow-hidden",children:Fr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K}),M&&z&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})})]}):n.jsxs(Nn,{orientation:"horizontal",disabled:he!=="blocks",children:[n.jsx(gt,{ref:P,id:"preview-blocks-editor",defaultSize:he==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:he==="blocks"&&n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K})}),he==="blocks"&&n.jsx(Cn,{withHandle:!0}),n.jsx(gt,{id:"preview-canvas",defaultSize:he==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden",children:n.jsxs(Nn,{orientation:"horizontal",disabled:!(M&&z),children:[M&&z&&n.jsxs(n.Fragment,{children:[n.jsx(gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})}),n.jsx(Cn,{withHandle:!0})]}),n.jsx(gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:i=>{if(!i)return;const m=()=>O(_=>_.width===i.clientWidth&&_.height===i.clientHeight?_:{width:i.clientWidth,height:i.clientHeight});m();const C=new ResizeObserver(m);return C.observe(i),()=>C.disconnect()},className:Ke("h-full relative overflow-clip flex justify-center",Ze&&!dt&&"bg-muted/30"),children:[(be||fr)&&Ze&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"starting",progress:an,claimPhase:Ot})}),Ie.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"suspended",onResume:ge.resume})}),Ie.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"errored",error:Ie.error,onRetry:ge.retry,connectionsHref:`/${Re.slug}/settings/connections`})}),F.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(kt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),he==="visual"&&!k&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(kn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),he==="visual"&&k&&n.jsx(mo,{element:k,onDismiss:()=>N(null)}),Mr,Ze&&we&&n.jsx("div",{className:Ke("shrink-0",!dt&&"border-x border-border bg-background shadow-sm"),style:Ar,onMouseLeave:jr,children:n.jsx("iframe",{ref:v,src:we,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:fn.handleError,onLoad:()=>{if(fn.handleLoad(),Pe(),F.mode!=="sandbox"){F.mode==="production"&&!F.showWakingPill&&he==="blocks"&&Mt();return}if(Hr("vm_preview_loaded",{view_mode:he,vm_id:Qe?.sandboxHandle??null}),!q)try{const i=v.current?.contentWindow?.location?.pathname;if(!i)return;const m=Ne.current;if(m!==null&&(Ne.current=null,Ee(i)!==Ee(m))||Ee(i)===Ee(ye))return;ie(i),at({path:i,pageKey:xe,params:Ve})}catch{}he==="visual"&&gn(),he==="blocks"&&Mt()}},F.iframeBase)})]})})]})})]})}),n.jsx(ei,{open:L,onOpenChange:Z,isPending:Xe.isPending,error:Y,templates:Me,onSubmit:Lr})]})}function ki(t){const e=pe.c(22),{virtualMcpId:r}=t,s=Ce(),o=Gr(r),{activeTask:u,taskId:d,currentBranch:l}=St(),a=Qs(d),[c,h]=x.useState(!1);if(Ys({threadId:d,sandboxBranch:u?.branch??l,agentHasRepo:Kt(o?.metadata),threadHasRepo:Kt(a)||Kt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(Rn,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),k=n.jsx(Rn,{className:"size-4"}),e[5]=b,e[6]=k):(b=e[5],k=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=n.jsxs(Ye,{onClick:b,children:[k,N]}),e[9]=N,e[10]=y):y=e[10];let S;e[11]!==g||e[12]!==w||e[13]!==y?(S=n.jsx(Xt,{className:"h-full",image:E,title:g,description:w,actions:y}),e[11]=g,e[12]=w,e[13]=y,e[14]=S):S=e[14];let v;e[15]!==c?(v=n.jsx(Js,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=v):v=e[16];let P;return e[17]!==S||e[18]!==v?(P=n.jsxs(n.Fragment,{children:[S,v]}),e[17]=S,e[18]=v,e[19]=P):P=e[19],P}let f;return e[20]!==r?(f=n.jsx(wi,{virtualMcpId:r}),e[20]=r,e[21]=f):f=e[21],f}function ud(){const t=pe.c(2),e=Xs();let r;return t[0]!==e?(r=n.jsx(Ur,{tabId:"site-editor",children:n.jsx(Wr,{feature:"cms",children:n.jsx(ki,{virtualMcpId:e})})}),t[0]=e,t[1]=r):r=t[1],r}export{ud as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,j as e,G as l}from"./index-Cjhl57C5.js";import{C as u}from"./index-C4m-Xj9t.js";import{AppViewContent as c}from"./project-app-view-BAHsn_eP.js";import{S as d}from"./settings-tab-wJidOo3Q.js";import{a as f}from"./use-virtual-mcp-BvrPyGzX.js";import"./use-mobile-C5SrWG9H.js";import"./index-CZFOUXi8.js";import"./resizable-CTEnH3yu.js";import"./MessageCircle01-DELRsE6A.js";import"./thread-route-CnHTxNkK.js";import"./use-panel-navigate-bhAOxlzp.js";import"./use-project-scope-BfeOcOX-.js";import"./github-repo-BknN0SVI.js";import"./use-route-default-main-DO9nAIOF.js";import"./hooks-D5z7CgCt.js";import"./use-mcp-client-Bf0VpOBw.js";import"./auth-5BCk_I76.js";import"./backoff-8mStPHYB.js";import"./task-board-DpuhnKzF.js";import"./schema-BTHH8GSh.js";import"./tooltip-BDUrOxgN.js";import"./index-C-9h82SA.js";import"./toolbar-icon-button-BehOLAeE.js";import"./gateway-client-BQS5H6XZ.js";import"./tool-namespace-DmnQIdtF.js";import"./use-mcp-tools-DhZM9sTC.js";import"./sandbox-lifecycle-context-Dhs5hLj1.js";import"./use-session-runtime--RMOkDN5.js";import"./thread-intent-Cdmdi4Qs.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-H28jTcB6.js";import"./autosend-ClVEnX_S.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-BP7WwVM_.js";import"./use-ai-providers-QvFz5SFX.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DlUI-60k.js";import"./use-organization-settings-pqtCEzuj.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-zIU2-SQD.js";import"./types-DlfDRNRB.js";import"./shell-layout-knqcStSb.js";import"./avatar-CR9KEb-s.js";import"./User01-BA1LEBvQ.js";import"./Users03-BaYGM99c.js";import"./SearchLg-BZUR3n9c.js";import"./agent-icon-Cyx7Smko.js";import"./AlertCircle-Ddrj7VUD.js";import"./Tool01-C0-Xqkxp.js";import"./ArrowUp-Dhew3Evs.js";import"./ArrowLeft-BKbGYh2B.js";import"./Tool02-CE2Fqpba.js";import"./ArrowRight-6hYTENh_.js";import"./TrendUp01-uTlAwt0S.js";import"./ZoomOut-CJKT31Kx.js";import"./CheckCircle-DQbrJHsr.js";import"./Check-Dnz3uW0f.js";import"./ChevronUp-XOZg-HiO.js";import"./ChevronRight-DK_MoZ-7.js";import"./ChevronSelectorVertical-B64gqtde.js";import"./DotsVertical-Dyzdr42E.js";import"./UserSquare-D-v_LgOa.js";import"./Copy01-l6PfB431.js";import"./CreditCard01-DQsLDZWx.js";import"./Database01-vUZciuwF.js";import"./Download01-_eUxcgg1.js";import"./Printer-Dn2De3ak.js";import"./Settings02-BLcAotUO.js";import"./Eye-B7hZLXRZ.js";import"./File02-D1W0NjQG.js";import"./Share07-BypmcbEF.js";import"./GitBranch01-CRUhFeKk.js";import"./Globe01-D9zr3JIX.js";import"./SwitchHorizontal01-l3o5r_PJ.js";import"./HardDrive-7_ZjnLMv.js";import"./Image01-7_HSDHV3.js";import"./Key01-ti2CpCiW.js";import"./Link01-DYWtgbsz.js";import"./LinkExternal01--55N_6ts.js";import"./Monitor01-BoIweS2p.js";import"./Sun-CEaGM44s.js";import"./Package-CSgBbMFc.js";import"./Palette-CaHW8y9T.js";import"./Play-BolLrTAn.js";import"./Plus-C5azC59K.js";import"./SearchMd-Ms_xvSfF.js";import"./Shield01-C_5dC1mR.js";import"./Stars01-DTStBsXP.js";import"./Trash01-DPQmLNZV.js";import"./Upload01-D-20AdeD.js";import"./Users01-BpRvBK8_.js";import"./XCircle-BhDUy79p.js";import"./XClose-Bw0VS-dj.js";import"./X-Dh_K-VDi.js";import"./Zap-TxetSnv7.js";import"./download-app-dialog-DQE0snIy.js";import"./dialog-SKkzdrcZ.js";import"./anchors-yqDzZN4K.js";import"./use-org-notice-BALWnbFe.js";import"./command-palette-store-BL5hnWnv.js";import"./command-CtFXOSiX.js";import"./index-CdCU_XIc.js";import"./integration-icon-Dq1cJDX8.js";import"./project-icon-CiuTzDLi.js";import"./required-auth-layout-t1gcmOkS.js";import"./use-org-sso-Dpa7KwXX.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-DDWKSdwn.js";import"./companions-core-WMNDPuPs.js";import"./github-D4UJ99TO.js";import"./github-repo-scope-C8GSbvaz.js";import"./metadata-dUsYcpuu.js";import"./form-H9AoFazU.js";import"./label-Bk7iLZH7.js";import"./input-CImpk8th.js";import"./use-debounced-value-CVkWNti9.js";import"./provision-repo-scoped-github-connection-B6zdkC6p.js";import"./extract-connection-data-C8zB3-0T.js";import"./connection-DhRpG43c.js";import"./useQueries-DqQ6INqi.js";import"./authenticate-and-persist-oauth-Bj_Y1vgm.js";import"./mcp-oauth-qvcFIOHE.js";import"./track-BJHbd99y.js";import"./build-improve-prompt-doc-C9jBTscU.js";import"./empty-state-Bi9IU32F.js";import"./use-date-fns-locale-BAJylOmL.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-connection-CpOBycNm.js";import"./alert-dialog-DfGZ77rh.js";import"./textarea-DXDx4Cy0.js";import"./use-debounced-autosave-CAXyZd0j.js";import"./popover-Bn0xXLy8.js";import"./scroll-area-YQLTU6PQ.js";import"./select-C5Qbx8Kw.js";import"./add-connection-dialog-Bwzbw2rJ.js";import"./collection-search-B2t2IaOK.js";import"./connection-card-BCofIpgI.js";import"./use-registry-connections-BJotyFay.js";import"./useInfiniteQuery-C-lwb5Ji.js";import"./infiniteQueryObserver-CTAqrRzL.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-BleKwXKQ.js";import"./connection-form-helpers-C7Pc9F54.js";import"./collection-tabs-DAqaNYVU.js";import"./badge-DOT8HE5Z.js";import"./use-infinite-scroll-AtjP0SZW.js";import"./useSuspenseInfiniteQuery-CjJ_vWiS.js";import"./dropdown-menu-DRuEZVW9.js";import"./file-type-icon-CMiynV8b.js";import"./use-org-fs-BSDHmLev.js";import"./checkbox-D_GODf3h.js";import"./search-input-Cx2Izgwg.js";import"./use-mcp-auth-status-bcJwzpw7.js";import"./use-mcp-prompts-DxcgJEJ7.js";import"./utils-CVEq3hMx.js";import"./switch-Cf30aXkY.js";import"./use-project-native-view-presence-DnirX6kM.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-CyU7Mcil.js";import"./site-slug-uya6Wp4-.js";import"./optimistic-project-sidebar-views-IR0sppyV.js";import"./breadcrumb-CVSmj3i3.js";import"./virtual-mcp-CG3JbZx8.js";import"./repository-import-picker-Bo_Cabzz.js";import"./use-navigate-to-agent-DOYg6fyU.js";import"./repository-picker-CRqY_3jm.js";import"./github-icon-TtZ8EUXE.js";import"./use-secrets-Do9S2OuA.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const g=l("/shell/$org/org-shell/agent-shell/projects/$agentId/views/$viewId");function w(){const t=s.c(7),{agentId:o,viewId:i}=g.useParams(),a=f(o);let m;t[0]!==a?.metadata?.ui?.layout?.tabs||t[1]!==i?(m=a?.metadata?.ui?.layout?.tabs?.find(n=>n.id===i),t[0]=a?.metadata?.ui?.layout?.tabs,t[1]=i,t[2]=m):m=t[2];const r=m;let p;return t[3]!==o||t[4]!==r||t[5]!==i?(p=r?e.jsx(c,{connectionId:r.view.appId,toolName:r.id,args:r.view.args},i):e.jsx(d,{virtualMcpId:o}),t[3]=o,t[4]=r,t[5]=i,t[6]=p):p=t[6],p}function Si(){const t=s.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(u.Content,{children:e.jsx(w,{})}),t[0]=o):o=t[0],o}export{Si as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as l,N as d,C as p,G as m}from"./index-
|
|
1
|
+
import{c as g,j as l,N as d,C as p,G as m}from"./index-Cjhl57C5.js";import{u as f}from"./use-main-panel-tabs-IIO818_j.js";import{a as I}from"./thread-route-CnHTxNkK.js";import{r as h}from"./use-panel-navigate-bhAOxlzp.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};
|