decocms 4.514.5 → 4.515.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/ActiveShapeUtils-B2LFrfRE.js +1 -0
- package/dist/client/assets/{AlertCircle-xI8XX-bi.js → AlertCircle-BEMVsPah.js} +1 -1
- package/dist/client/assets/AreaChart-D7ncnKTv.js +1 -0
- package/dist/client/assets/{ArrowLeft-BKYzlDQY.js → ArrowLeft-BeJK1krP.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cq3iZIwL.js → ArrowUp-CDPrL6Uz.js} +1 -1
- package/dist/client/assets/BarChart-D63RTQYz.js +1 -0
- package/dist/client/assets/{Building02-C9KWPxlH.js → Building02-BFpUButr.js} +1 -1
- package/dist/client/assets/CartesianChart-Cm278fbS.js +1 -0
- package/dist/client/assets/{CategoricalChart-DkwWvFDx.js → CategoricalChart-CNYNt0vK.js} +2 -2
- package/dist/client/assets/{CheckCircle-D30wPP6A.js → CheckCircle-Iq3Q6LLh.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CknWVrzo.js → ChevronSelectorVertical-02lw_CbG.js} +1 -1
- package/dist/client/assets/{ChevronUp-CFN68hLk.js → ChevronUp-DeTPLyaf.js} +1 -1
- package/dist/client/assets/{Copy01-C73PJJxr.js → Copy01-DQtv3upd.js} +1 -1
- package/dist/client/assets/{CreditCard01-C8DlQ7Ge.js → CreditCard01-4SHg1t_a.js} +1 -1
- package/dist/client/assets/{DotsVertical-BvyfZIer.js → DotsVertical-Drns5Frs.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bhpq3Y0r.js → ErrorBarContext-BkdZvkoD.js} +1 -1
- package/dist/client/assets/{Globe04-CVLAzwjm.js → Globe04-BXpRk-hX.js} +1 -1
- package/dist/client/assets/{Image01-DowwsvYG.js → Image01-1LQuy0wG.js} +1 -1
- package/dist/client/assets/{Key01-rbnGMz2E.js → Key01-CoFqvDTW.js} +1 -1
- package/dist/client/assets/{Link01-DRsKyIm5.js → Link01-DU3-3Ipb.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ZRquEJUl.js → LinkBroken01-h_HqMIlK.js} +1 -1
- package/dist/client/assets/{Minus-DPDq6KAA.js → Minus-DpXFgo6a.js} +1 -1
- package/dist/client/assets/{Monitor01-DMME8GIo.js → Monitor01-BbCpGNqh.js} +1 -1
- package/dist/client/assets/{Play-c6bc1b3-.js → Play-C8EB0NeI.js} +1 -1
- package/dist/client/assets/{Plus-xabrshQG.js → Plus-DPS97GtY.js} +1 -1
- package/dist/client/assets/ReferenceLine-zJMNrbMl.js +1 -0
- package/dist/client/assets/{SearchMd-BODiv7c9.js → SearchMd-5E3M_LtW.js} +1 -1
- package/dist/client/assets/Sector-Chcdibol.js +28 -0
- package/dist/client/assets/{ShoppingBag01-DAjyOiiw.js → ShoppingBag01-BlUZ1Giu.js} +1 -1
- package/dist/client/assets/{Sun-BqmeoxcG.js → Sun-Bt6BixS7.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CESO3nxl.js → SwitchHorizontal01-BLJAU7vB.js} +1 -1
- package/dist/client/assets/{Tool01-BGL2Qt57.js → Tool01-DhUw9Xii.js} +1 -1
- package/dist/client/assets/{Trash01-Cf6bGuCZ.js → Trash01-y0tx6OKR.js} +1 -1
- package/dist/client/assets/{Upload01-ZLE7vfB9.js → Upload01-BT7hKOY8.js} +1 -1
- package/dist/client/assets/{User01-Cfg0yVvz.js → User01-Dtm_f3tA.js} +1 -1
- package/dist/client/assets/{UserSquare-DJngEPjS.js → UserSquare-DWYhjY7l.js} +1 -1
- package/dist/client/assets/{Users01-vn3EOu8A.js → Users01-DE8h5H5p.js} +1 -1
- package/dist/client/assets/{XClose-CdzjyNb0.js → XClose-sbj0sr-y.js} +1 -1
- package/dist/client/assets/{ZoomOut-B55seUHX.js → ZoomOut-Ult5yHk2.js} +1 -1
- package/dist/client/assets/{access-gate-CgSSvGG3.js → access-gate-C5s_nhLu.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-O4xCe9BP.js → add-connection-dialog-BbC6Awnv.js} +1 -1
- package/dist/client/assets/agent-analytics-DkajWLZM.js +2 -0
- package/dist/client/assets/agent-app-3J3u6Y8o.js +1 -0
- package/dist/client/assets/agent-assets-arexmZYy.js +1 -0
- package/dist/client/assets/{agent-automation-DBMflQw2.js → agent-automation-CJwaiyVY.js} +1 -1
- package/dist/client/assets/agent-automations-Cgl9-uX7.js +1 -0
- package/dist/client/assets/agent-calendar-CcJ-9tHm.js +1 -0
- package/dist/client/assets/{agent-connect-sources-CX6V3W-l.js → agent-connect-sources-BSWyCv4T.js} +1 -1
- package/dist/client/assets/agent-deck-D77BlzDi.js +1 -0
- package/dist/client/assets/agent-e2e-BZnv0041.js +1 -0
- package/dist/client/assets/agent-experiments-DU-xnevM.js +1 -0
- package/dist/client/assets/agent-file-CEbVOehe.js +1 -0
- package/dist/client/assets/agent-hosting-CLRf1egV.js +1 -0
- package/dist/client/assets/{agent-icon-c0hRUHIU.js → agent-icon-BLy2WH4s.js} +1 -1
- package/dist/client/assets/agent-library-CHysr2dn.js +1 -0
- package/dist/client/assets/agent-library-file-DCoIJ_Vl.js +1 -0
- package/dist/client/assets/agent-monitor-D4SI9Y1m.js +1 -0
- package/dist/client/assets/{agent-overview-C0WObUrB.js → agent-overview-DeQq_tHv.js} +1 -1
- package/dist/client/assets/agent-releases-Cp26QvMd.js +2 -0
- package/dist/client/assets/agent-settings-Bd8cfGLd.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CGFxlenC.js +2 -0
- package/dist/client/assets/agent-site-editor-content-O4R-vecW.js +1 -0
- package/dist/client/assets/agent-site-editor-pMTgGoBo.js +16 -0
- package/dist/client/assets/agent-site-editor-preview-CCdH77a2.js +1 -0
- package/dist/client/assets/agent-view-COR3ZSfj.js +1 -0
- package/dist/client/assets/{agent-view-guard-CY0RZ3mz.js → agent-view-guard-26j3Evt5.js} +1 -1
- package/dist/client/assets/{agents-list-lrkIUH1p.js → agents-list-Dcd5sOX1.js} +1 -1
- package/dist/client/assets/{ai-providers-BJRpwnf3.js → ai-providers-C2RBL7tG.js} +2 -2
- package/dist/client/assets/alert-BV79ffMP.js +1 -0
- package/dist/client/assets/{alert-dialog-M8Y0zqSA.js → alert-dialog-BILupwtl.js} +3 -3
- package/dist/client/assets/analytics-sections-Wnoh3PYg.js +1 -0
- package/dist/client/assets/api-keys-BO3F5W2N.js +1 -0
- package/dist/client/assets/{api-keys-BuJhmHVr.js → api-keys-Drifqas3.js} +1 -1
- package/dist/client/assets/app-editor-DkKkzh3V.js +1 -0
- package/dist/client/assets/{asset-utils-D4ZYWTsd.js → asset-utils-CV_m_T7Z.js} +1 -1
- package/dist/client/assets/{auth-CJCUdDnK.js → auth-B7U7Hff4.js} +1 -1
- package/dist/client/assets/{auth-catchall-PMDrOrh4.js → auth-catchall-BM3zBwm1.js} +1 -1
- package/dist/client/assets/{auth-entry-D45yK4lP.js → auth-entry-BdihVcdH.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BeoAmW98.js → auth-split-layout-CPsRiXhM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7W1mkzH.js → authenticate-and-persist-oauth-UvzpQNLL.js} +1 -1
- package/dist/client/assets/automation-list-row-CmreC44g.js +1 -0
- package/dist/client/assets/{automation-runs-7CDwsw1m.js → automation-runs-Ubm7wrw7.js} +1 -1
- package/dist/client/assets/{automations-DpOWGNx_.js → automations-ZAC4-o9b.js} +1 -1
- package/dist/client/assets/{autosend-BiXCzDoT.js → autosend-DEKkS89d.js} +1 -1
- package/dist/client/assets/{avatar-CVrfZDpI.js → avatar-BaUatl4r.js} +1 -1
- package/dist/client/assets/badge-BDrcnhS0.js +1 -0
- package/dist/client/assets/{block-document-EFEgqy7V.js → block-document-DWpcrKxc.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-FfAtB7Mh.js → blocks-preview-workspace-context-CNobOsoP.js} +1 -1
- package/dist/client/assets/blocks-tab-states-5KLuOsbu.js +1 -0
- package/dist/client/assets/blog-schema-BKkPmh2I.js +1 -0
- package/dist/client/assets/{buckets-EuucCx-Z.js → buckets-CfPMmliP.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-0HVt3TgE.js → build-improve-prompt-doc-DJbnBElj.js} +1 -1
- package/dist/client/assets/{calendar-B3WUDV6V.js → calendar-CCVXvCMs.js} +1 -1
- package/dist/client/assets/campaigns-view-CacWid3q.js +1 -0
- package/dist/client/assets/{capability-load-error-CaA022rx.js → capability-load-error-C-qrhNhU.js} +1 -1
- package/dist/client/assets/category-editor-CcRf7L2l.js +1 -0
- package/dist/client/assets/{chart-B6d33H1D.js → chart-gMXBaCie.js} +1 -1
- package/dist/client/assets/{chat-context-BnuwMOfj.js → chat-context-NcP7iS0u.js} +6 -6
- package/dist/client/assets/{chat-draft-D3EwPWFD.js → chat-draft-MYleVoub.js} +1 -1
- package/dist/client/assets/{checkbox-Dla8kRWj.js → checkbox-TbFNti2k.js} +1 -1
- package/dist/client/assets/{choose-editor-CFsJlwqs.js → choose-editor-CDZ08K_i.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DADJ0ld_.js → cli-auth-success-DMlxLLEu.js} +1 -1
- package/dist/client/assets/{client-icons-M2KssD4J.js → client-icons-DolqWn8Q.js} +1 -1
- package/dist/client/assets/cms-settings-editor-D03L9L4-.js +1 -0
- package/dist/client/assets/{collapsible-BWjY8cOG.js → collapsible-DvAZmEoh.js} +1 -1
- package/dist/client/assets/collection-detail-CQ4bhfmW.js +1 -0
- package/dist/client/assets/{collection-display-button-DcSGVqBT.js → collection-display-button-DTfH30As.js} +1 -1
- package/dist/client/assets/{collection-search-C0nHL4Zi.js → collection-search-C00LN-O5.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BqLbzGMr.js → collection-table-wrapper-DOUS3XlF.js} +1 -1
- package/dist/client/assets/{collection-tabs-DJst1PBn.js → collection-tabs-BjFLrDhl.js} +1 -1
- package/dist/client/assets/{column-rules-C6rmmvcZ.js → column-rules-13kfrugr.js} +1 -1
- package/dist/client/assets/{combobox-DJtWtG8e.js → combobox-CaB-y5Ze.js} +1 -1
- package/dist/client/assets/{coming-soon-page-CycWyIEs.js → coming-soon-page-Cyxpb_RU.js} +1 -1
- package/dist/client/assets/{command-DQxPvzO0.js → command-DF9CyXTP.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BaIOrb8k.js → companion-mcps-section-D4tO5Rpb.js} +1 -1
- package/dist/client/assets/{config-0dQr8OOs.js → config-BpbgNSKK.js} +1 -1
- package/dist/client/assets/{connect-AQ7wxQDD.js → connect-R8YgYoXN.js} +3 -3
- package/dist/client/assets/{connect-layout-CsBnyYo4.js → connect-layout-DCuq7jhf.js} +1 -1
- package/dist/client/assets/{connection-B5x-rxzp.js → connection-CynHS3Ve.js} +1 -1
- package/dist/client/assets/{connection-card-CFqu0_G8.js → connection-card-DWCHVdl-.js} +1 -1
- package/dist/client/assets/{connection-detail-B_xaSLIN.js → connection-detail-BvRd_OKE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CouK82td.js → connection-form-helpers-Dta5jpsZ.js} +1 -1
- package/dist/client/assets/{connections-CrdtyJFL.js → connections-DhBzJz3R.js} +1 -1
- package/dist/client/assets/content-tab-COTFxvxm.js +22 -0
- package/dist/client/assets/context-DDY4mKfD.js +1 -0
- package/dist/client/assets/{context-menu-CI-AryjZ.js → context-menu-CUU-6Ui3.js} +1 -1
- package/dist/client/assets/{context-shell-BsFUt-ob.js → context-shell-CPsWfJ_3.js} +3 -3
- package/dist/client/assets/{core.esm-DOdwJCI5.js → core.esm-C0uaMHhK.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CDMsJ1wq.js → create-organization-dialog-DaLRO9Sp.js} +1 -1
- package/dist/client/assets/{daily-pulse-A6lEoniM.js → daily-pulse-DKIjgibs.js} +1 -1
- package/dist/client/assets/date-utils-CrvIKg-s.js +1 -0
- package/dist/client/assets/{discover-JQgSyvWz.js → discover-INKGTCGz.js} +1 -1
- package/dist/client/assets/{domain-settings-CNG0968P.js → domain-settings-DL4imbgg.js} +1 -1
- package/dist/client/assets/{drawer-CEiS53oX.js → drawer-CER6tItd.js} +1 -1
- package/dist/client/assets/{editor-DWhRi1_f.js → editor-DiFOLDbd.js} +1 -1
- package/dist/client/assets/{editor-classes-CZOMDDcn.js → editor-classes-BxczJlTk.js} +1 -1
- package/dist/client/assets/{empty-state-B1xpK558.js → empty-state-CEkcxXyE.js} +1 -1
- package/dist/client/assets/{empty-state-BoFIIv2e.js → empty-state-Cfwlgj7K.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-CdB5dK1A.js +1 -0
- package/dist/client/assets/{extract-connection-data-CUvLfXNU.js → extract-connection-data-CnU07SX8.js} +1 -1
- package/dist/client/assets/{feature-gate-B9a4dBc0.js → feature-gate-Dnbny2HW.js} +1 -1
- package/dist/client/assets/{feature-paywall-DINMFUUx.js → feature-paywall-DruRkOvJ.js} +1 -1
- package/dist/client/assets/{file-explorer-2Z0Qhvp_.js → file-explorer-CsrTcKv1.js} +1 -1
- package/dist/client/assets/{file-preview-BFXgyqHl.js → file-preview-CUN1OHJ7.js} +1 -1
- package/dist/client/assets/{file-share-button-BIOHr9Xv.js → file-share-button-CEf0dwMj.js} +2 -2
- package/dist/client/assets/{file-type-icon-Ez8-DRHg.js → file-type-icon-etYEFstF.js} +1 -1
- package/dist/client/assets/{folder-icon-JgTmBbpC.js → folder-icon-8MGsFr-_.js} +2 -2
- package/dist/client/assets/{form-Bdh0vUeg.js → form-xTDgq-Tg.js} +1 -1
- package/dist/client/assets/{general-Dvy5SU0P.js → general-DKLM5WXB.js} +1 -1
- package/dist/client/assets/{home-UtAOwZ_a.js → home-iGYybPDR.js} +1 -1
- package/dist/client/assets/hosted-publish-api-BTYW-kmo.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-DYVOaPsn.js +1 -0
- package/dist/client/assets/{icon-button-Dg2jSe-y.js → icon-button-Ht6P9npC.js} +1 -1
- package/dist/client/assets/{index-CrgWXxvo.js → index-1zZevs0I.js} +1 -1
- package/dist/client/assets/{index-1XeDvVO_.js → index-9equ5l6t.js} +1 -1
- package/dist/client/assets/{index-DxbCP5B6.js → index-B3yMIi0G.js} +1 -1
- package/dist/client/assets/index-BFqmRsAP.js +4 -0
- package/dist/client/assets/{index-DYLyKNcw.js → index-BbK9DXkK.js} +1 -1
- package/dist/client/assets/{index-DincrG3Y.js → index-Br0aaVqT.js} +3 -3
- package/dist/client/assets/{index-ILRCn1qM.js → index-CLvpgcGt.js} +6 -6
- package/dist/client/assets/{index-CXeJCI0G.js → index-CNohvsnC.js} +1 -1
- package/dist/client/assets/{index-_y92DzgS.js → index-D32uzOTA.js} +1 -1
- package/dist/client/assets/{index-7svLQYvL.js → index-DFJe-l7D.js} +1 -1
- package/dist/client/assets/{index-DKOhwHAG.js → index-DKwDh9fC.js} +1 -1
- package/dist/client/assets/{index-DcU2uHG-.js → index-DQaJBLJ-.js} +54 -54
- package/dist/client/assets/index-EoMx4WDO.css +1 -0
- package/dist/client/assets/{index-WjQsIrkp.js → index-IRwT0rOS.js} +1 -1
- package/dist/client/assets/{index-6B342dVL.js → index-TESbMzS4.js} +1 -1
- package/dist/client/assets/{index-De44zW_k.js → index-hUmTzopE.js} +1 -1
- package/dist/client/assets/{index-redirect-BHJ13xlS.js → index-redirect-WdHUcKlN.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-P7ZNg4ZF.js → infiniteQueryObserver-Bia8aY1D.js} +1 -1
- package/dist/client/assets/infra-billing-CANL7vGd.js +1 -0
- package/dist/client/assets/{input-pg_Munw1.js → input-DQpuKkGH.js} +7 -7
- package/dist/client/assets/{input-HXHaYrka.js → input-rj9iyl8c.js} +1 -1
- package/dist/client/assets/{integration-icon-aeIvRSnw.js → integration-icon-BADY30E3.js} +1 -1
- package/dist/client/assets/{jira-icon-CZLCmGol.js → jira-icon-Bg6wm7Rh.js} +1 -1
- package/dist/client/assets/{label-DDPD5LQh.js → label-DwAqZKXh.js} +1 -1
- package/dist/client/assets/{layout-DGYUOV2D.js → layout-BS48rV-R.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B3GKD6WQ.js → legacy-agents-deep-BsgIlRpK.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-CpUMHeOI.js +1 -0
- package/dist/client/assets/library-D-XIUCN0.js +1 -0
- package/dist/client/assets/{login-syjpZA32.js → login-Bx_Dj1KX.js} +1 -1
- package/dist/client/assets/{markdown-1PeXOKNt.js → markdown-DCFmpcRh.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DTPlWHGT.js → mcp-app-renderer-DlDykQO4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DP6VNnFQ.js → mcp-oauth-BV1FnXP9.js} +1 -1
- package/dist/client/assets/{mcp-oauth-xBzZujQ_.js → mcp-oauth-DHudAstl.js} +1 -1
- package/dist/client/assets/{members-uR8n9Rms.js → members-lS9QzMri.js} +1 -1
- package/dist/client/assets/{memory-BYqDBVHV.js → memory-Dt2VdoJi.js} +2 -2
- package/dist/client/assets/{mini-report-page-D7tpDtif.js → mini-report-page-SkCZ-B7b.js} +1 -1
- package/dist/client/assets/{mock-board-BOSDq94-.js → mock-board-b5JcXuBT.js} +3 -3
- package/dist/client/assets/{monaco-editor-e80GuCNv.js → monaco-editor-B77kgSL6.js} +2 -2
- package/dist/client/assets/monitoring-CN_CCaIK.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-94Mta4Nq.js → monitoring-stats-row-DfhuiMFd.js} +1 -1
- package/dist/client/assets/{multi-select-CmbGOwtN.js → multi-select-BcTcaQtg.js} +1 -1
- package/dist/client/assets/mustache-B1PzKbLg.js +4 -0
- package/dist/client/assets/named-rule-uses-l2kNdc58.js +1 -0
- package/dist/client/assets/named-rule-view-VDvju2NZ.js +1 -0
- package/dist/client/assets/{new-project-dialog-ShudNZIG.js → new-project-dialog-C1yGAeBD.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DQtTsT-Q.js → oauth-callback-ai-provider-CSn2MVuO.js} +1 -1
- package/dist/client/assets/{oauth-callback-CuZCWVkp.js → oauth-callback-d5bTE61x.js} +1 -1
- package/dist/client/assets/{onboarding-BYvWDC_s.js → onboarding-DMAd7boI.js} +1 -1
- package/dist/client/assets/{openai-conversation-DgaJVito.js → openai-conversation-DVrrnMH9.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-CKzSSiC-.js → optimistic-project-sidebar-views-NiW-ZsA6.js} +1 -1
- package/dist/client/assets/order-monitor-day-D1J-iu59.js +1 -0
- package/dist/client/assets/{organization-choice-D_5aYbIz.js → organization-choice-DtzDl4nE.js} +1 -1
- package/dist/client/assets/{orgs-CN3Yh6bp.js → orgs-CvRk7OxE.js} +1 -1
- package/dist/client/assets/page-seo-form-YDVeWiAp.js +1 -0
- package/dist/client/assets/{pair-Cn70Tm81.js → pair-u6RslQ29.js} +7 -7
- package/dist/client/assets/parse-sections-CBNQNauq.js +1 -0
- package/dist/client/assets/plan-Cs9I3MbI.js +1 -0
- package/dist/client/assets/{plan-ladder-D5aCNSRy.js → plan-ladder-DF2W1fWC.js} +1 -1
- package/dist/client/assets/{popover-CVCbWisj.js → popover-BOhP5vgB.js} +1 -1
- package/dist/client/assets/post-calendar-T4dPJKYM.js +1 -0
- package/dist/client/assets/post-editor-D7KyvZ7t.js +2 -0
- package/dist/client/assets/{preview-content-Bin2hNFJ.js → preview-content-DVXm4Z8s.js} +1 -1
- package/dist/client/assets/{preview-dialog-Fls4giAH.js → preview-dialog-WEx44iRd.js} +1 -1
- package/dist/client/assets/{preview-panel-BPPH_1cI.js → preview-panel-D0nsWsZH.js} +1 -1
- package/dist/client/assets/preview-tab-Dl6aDnQL.js +551 -0
- package/dist/client/assets/product-picker-dialog-BhbqLRJa.js +1 -0
- package/dist/client/assets/{profile-BZA6I0p4.js → profile-DlCjy7UA.js} +1 -1
- package/dist/client/assets/{project-app-view-B2uzp3zO.js → project-app-view-D5kv8H-C.js} +1 -1
- package/dist/client/assets/project-apps-BkYCf7yh.js +1 -0
- package/dist/client/assets/{project-feed-CxXgvjMu.js → project-feed-CnSoTeWf.js} +1 -1
- package/dist/client/assets/{project-icon-Dy5ndHVf.js → project-icon-DeQ6esGK.js} +1 -1
- package/dist/client/assets/project-reports-DQYEQVTh.js +1 -0
- package/dist/client/assets/project-tasks-CyVxacvN.js +1 -0
- package/dist/client/assets/{projects-6tFWscR3.js → projects-B8yQNAzt.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B25sfM8y.js → projects-empty-state-BeIkadaG.js} +1 -1
- package/dist/client/assets/{prompts-C8y9cYvX.js → prompts-GMn4cz1Q.js} +1 -1
- package/dist/client/assets/record-editor-CI7K6OM1.js +1 -0
- package/dist/client/assets/redirect-editor-B5L_G5_H.js +1 -0
- package/dist/client/assets/releases-api-r2wwTMcb.js +1 -0
- package/dist/client/assets/{reports-DZf5GwgJ.js → reports-BSyJkGbx.js} +1 -1
- package/dist/client/assets/reports-DceQf3hD.js +1 -0
- package/dist/client/assets/{reports-onboarding-Ba6c9nYx.js → reports-onboarding-DTyYEPnh.js} +1 -1
- package/dist/client/assets/reports-tab-DhZyGBNJ.js +2 -0
- package/dist/client/assets/repositories-1ckAW2Cr.js +1 -0
- package/dist/client/assets/{repositories-D_HBag21.js → repositories-DTzcHO2P.js} +1 -1
- package/dist/client/assets/{repository-binding-B-JblZ3B.js → repository-binding-WIxmR2C2.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Aq7ItYog.js → repository-import-picker-Bwaz_IkW.js} +1 -1
- package/dist/client/assets/{repository-picker-CigkRPj6.js → repository-picker-C_FPAS2a.js} +1 -1
- package/dist/client/assets/{require-capability-fF33BjRE.js → require-capability-zDRexzvJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-n4GqwjUS.js → required-auth-layout-C9RNRyLG.js} +1 -1
- package/dist/client/assets/{reset-password-FYcr_EOZ.js → reset-password-D5Z9Z_ZV.js} +1 -1
- package/dist/client/assets/{resizable-B1jyEV0m.js → resizable-rv6DYDSR.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-CDRcFoik.js +1 -0
- package/dist/client/assets/{review-settings-w0gSi3zN.js → review-settings-BOEOAp5O.js} +1 -1
- package/dist/client/assets/{roles-CD7KBus5.js → roles-CvRMacB_.js} +1 -1
- package/dist/client/assets/route-BrdNU9FL.js +1 -0
- package/dist/client/assets/route-CYnJcvFb.js +1 -0
- package/dist/client/assets/route-HQBi1e9d.js +1 -0
- package/dist/client/assets/runnable-block-editor-B9jSPnPq.js +20 -0
- package/dist/client/assets/{sandbox-git-api-CRxdlhrN.js → sandbox-git-api-CH_-QFpD.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Cyz-VR-q.js → sandbox-lifecycle-context-aKdVFwPA.js} +1 -1
- package/dist/client/assets/{schema-DTqdooJM.js → schema-C0M6s76A.js} +1 -1
- package/dist/client/assets/{schema-Jt-SHSRj.js → schema-CtKRQiER.js} +1 -1
- package/dist/client/assets/{scroll-area-DowOzl5a.js → scroll-area-L8VlxVDv.js} +1 -1
- package/dist/client/assets/{search-input-C77c23a_.js → search-input-BCaqzpfC.js} +1 -1
- package/dist/client/assets/{search-toggle-BqUvwbnO.js → search-toggle-BAKgZCht.js} +1 -1
- package/dist/client/assets/{secret-picker-D6q2PbZG.js → secret-picker-Ciz2Oc6M.js} +1 -1
- package/dist/client/assets/{secrets-C6FiSzJz.js → secrets-DWM0UMVi.js} +1 -1
- package/dist/client/assets/{sections-uFSvOb1s.js → sections-DM2-ez5A.js} +1 -1
- package/dist/client/assets/sections-editor-Cs3VV_t6.js +4 -0
- package/dist/client/assets/{select-B47VUguS.js → select-3Bvf55R2.js} +1 -1
- package/dist/client/assets/{select-model-B0eE99E3.js → select-model-BrppT0xN.js} +1 -1
- package/dist/client/assets/seo-editor-qr_EWKDI.js +1 -0
- package/dist/client/assets/{separator-tMi_6w_o.js → separator-BARWlQZQ.js} +1 -1
- package/dist/client/assets/settings-tab-BX9Vfre3.js +1 -0
- package/dist/client/assets/{sheet-R9Pr50Sb.js → sheet-BKZqYlDG.js} +1 -1
- package/dist/client/assets/shell-layout-iu5E7VAW.js +1 -0
- package/dist/client/assets/site-draft-actions-01MQ6c7Q.js +12 -0
- package/dist/client/assets/site-draft-view-D-xycIA0.js +2 -0
- package/dist/client/assets/site-editor-CF4F4ijZ.js +1 -0
- package/dist/client/assets/{skills-DTPuV4HK.js → skills-B3sr04ZB.js} +1 -1
- package/dist/client/assets/slider-f1cHo-xI.js +1 -0
- package/dist/client/assets/{sortable.esm-7lfZBBX2.js → sortable.esm-B_g_IXou.js} +1 -1
- package/dist/client/assets/{sso-lvoln_ad.js → sso-8XgQMaoN.js} +1 -1
- package/dist/client/assets/{suggestion-D_Z3LuMt.js → suggestion-B-6wzPND.js} +2 -2
- package/dist/client/assets/{switch-BQFbXMA-.js → switch-CZd0EYW9.js} +1 -1
- package/dist/client/assets/{symbol-CIh5AfyD.js → symbol-BY53tx69.js} +1 -1
- package/dist/client/assets/{synced-repos-DQxi8k5O.js → synced-repos-CWNIOZxK.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B2rDBqdy.js → tab-icon-glyph-40t6GZmc.js} +1 -1
- package/dist/client/assets/{table-DuCeyVXY.js → table-DDQzGcYG.js} +1 -1
- package/dist/client/assets/{tabs-CJ70csAp.js → tabs-BOwO3aPj.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-vyXzgPAK.js → task-assignee-avatar-mmHhkk0_.js} +1 -1
- package/dist/client/assets/{task-board-CSpxMIw7.js → task-board-S0qduW2n.js} +1 -1
- package/dist/client/assets/{task-route-CeJ19bNy.js → task-route-BCl-VxJy.js} +1 -1
- package/dist/client/assets/{task-status-CFz3dyVR.js → task-status-CNAd19KA.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CfseXo9_.js → taskboard-analytics-BNfa4eCu.js} +1 -1
- package/dist/client/assets/tasks-CtYqrb00.js +1 -0
- package/dist/client/assets/{tasks-C3liOhO2.js → tasks-Cz1AP9M-.js} +3 -3
- package/dist/client/assets/{textarea-BDWvYouR.js → textarea-CGkc_NoY.js} +1 -1
- package/dist/client/assets/{thread-analytics-Bp5Zz9ej.js → thread-analytics-CHcQ4J9G.js} +1 -1
- package/dist/client/assets/{thread-intent-DlbBEzNn.js → thread-intent-D02hOLlA.js} +4 -4
- package/dist/client/assets/{thread-route-DsRsjMOv.js → thread-route-BG5FYdPA.js} +1 -1
- package/dist/client/assets/{thread-route-glK7AgQo.js → thread-route-D5TPqP61.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BW8H1wdb.js → thread-sheet-body-B1Y2cEvJ.js} +1 -1
- package/dist/client/assets/time-range-picker-B8MLDnPR.js +1 -0
- package/dist/client/assets/toggle-group-5-dW1fE5.js +1 -0
- package/dist/client/assets/{tool-namespace-FeAXQzXg.js → tool-namespace-_uAlvwp8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CTGjpqPD.js → toolbar-icon-button-BQvi-WW6.js} +1 -1
- package/dist/client/assets/{tooltip-BqHx2R4U.js → tooltip-CT8p-4e_.js} +1 -1
- package/dist/client/assets/tooltipContext-BqyDyVHC.js +1 -0
- package/dist/client/assets/{track-vnmuUrPF.js → track-wHia_J2E.js} +1 -1
- package/dist/client/assets/{types-Cj3BjtjJ.js → types-CKfFy-n_.js} +6 -6
- package/dist/client/assets/{url-slug-DfovzTSP.js → url-slug-BMSyCRIK.js} +1 -1
- package/dist/client/assets/{usage-stats-DcyLnEOC.js → usage-stats-tSDvCF_c.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DugUJNG4.js → use-ai-providers-D5-3qHgJ.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-BuleRH2R.js +1 -0
- package/dist/client/assets/{use-automations-Dhy5bAQi.js → use-automations-DL7E2sXy.js} +1 -1
- package/dist/client/assets/{use-autosave-BKifxWxQ.js → use-autosave-Bga6Lczj.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CqPKeLYn.js → use-chat-layout-state-CrK3t-li.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CbuQEbGd.js → use-clock-tick-Dt0Rxdj9.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BBUs22Yl.js → use-connect-companion-BQ6P9NqQ.js} +1 -1
- package/dist/client/assets/{use-connection-Dj54skEw.js → use-connection-DEU6cL_M.js} +1 -1
- package/dist/client/assets/use-content-sync-78T7URzs.js +1 -0
- package/dist/client/assets/{use-copy-K9rQ1PJH.js → use-copy-Lp25RdQW.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-B5688LVi.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-CEVf4Ifn.js → use-date-fns-locale-DzYqNQVc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0TGgFvB.js → use-debounced-autosave-B-FheggT.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CDunmz6Z.js → use-debounced-value-DnWAg7xS.js} +1 -1
- package/dist/client/assets/{use-deco-credits-orVqTX6I.js → use-deco-credits-Dcf7REFq.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-TumByBkr.js → use-decopilot-events-HymesIOH.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BllZSjRL.js → use-delete-connection-GE6V1LSr.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BBVz6SL_.js → use-deployment-admin-BMcEtHAq.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-CCAgHiPb.js +1 -0
- package/dist/client/assets/{use-file-configs-BFq_wpSt.js → use-file-configs-C3GELqZ9.js} +1 -1
- package/dist/client/assets/{use-inbox-feed--WBiu__i.js → use-inbox-feed-60_eEWEx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-7dT9x3fg.js → use-infinite-scroll-CktyBb0n.js} +1 -1
- package/dist/client/assets/{use-join-requests-ilYuD6XT.js → use-join-requests-Daf7hgc3.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-zwxUbRsW.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-2A9iou5g.js → use-mcp-auth-status-Ckh_s_m-.js} +1 -1
- package/dist/client/assets/use-mcp-client-BjCYOtMv.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-JJb6q8dH.js → use-mcp-prompts-D4ntfVw2.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BwuN38Gh.js → use-mcp-tools-BQ-vDoB-.js} +1 -1
- package/dist/client/assets/{use-members-CzSQTDAS.js → use-members-BKwSn6l-.js} +1 -1
- package/dist/client/assets/{use-mobile-BfmJV4wy.js → use-mobile-exvgjs5E.js} +1 -1
- package/dist/client/assets/use-move-blocks-jGxZ60KS.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-D05JNc-L.js → use-navigate-to-agent-CoDY7b67.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-pmLoKOyH.js → use-open-billing-url-gwWm2_gZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-fPRUht_a.js → use-org-auth-client-D2nGERnL.js} +1 -1
- package/dist/client/assets/{use-org-fs-D82Vx4hB.js → use-org-fs-DsXUzUGl.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CD8TZnkH.js → use-org-repo-syncs-DTcvfXwj.js} +1 -1
- package/dist/client/assets/{use-org-sso-ClJ8vn5f.js → use-org-sso-BmpgR8iH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-iaQivkLI.js → use-organization-roles-C9fRnsAm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DFkNTsS0.js → use-organization-settings-B5bwnmIE.js} +1 -1
- package/dist/client/assets/use-panel-navigate-D1HcWbMf.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-WBIVN5MA.js +1 -0
- package/dist/client/assets/{use-project-scope-CGMALc0e.js → use-project-scope-0viRZIAS.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C1945uiL.js → use-recent-apps-letFJ0RI.js} +1 -1
- package/dist/client/assets/{use-releases-D15mHXXN.js → use-releases-BzfYz1da.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BdbGTuns.js → use-reports-diagnostic-D4yF4iuL.js} +1 -1
- package/dist/client/assets/{use-secrets-DbkATagb.js → use-secrets-DS9zWxiz.js} +1 -1
- package/dist/client/assets/use-section-preview-base-H9VNpzGF.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-BqLmDXCH.js → use-sidebar-collapsed-hUfsznLr.js} +1 -1
- package/dist/client/assets/{use-tags-Cn5U7HDa.js → use-tags-CVvzIGGr.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CftsNPjL.js → use-task-board-analytics-BgxWC82w.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BDk-u9KA.js → use-task-board-events-DBz1fm-T.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CNMGpOwt.js → use-task-board-item-prs-D2PBN926.js} +1 -1
- package/dist/client/assets/{use-task-metadata-0ueqwOxI.js → use-task-metadata-1k4pU8z_.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CgQGRl3S.js → use-thread-analytics-D40j8ndA.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DLitie4Q.js → use-thread-outputs-2XKKA9Gw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-v90E8EIL.js +1 -0
- package/dist/client/assets/{useQueries-BfkCTicr.js → useQueries-DT3VE95i.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BoCx0vyL.js +1 -0
- package/dist/client/assets/{users-BIkPJzOg.js → users-GpxLvhWl.js} +1 -1
- package/dist/client/assets/{utils-Bp3fKbm9.js → utils-CkO9KdKe.js} +2 -2
- package/dist/client/assets/variant-calendar-CrETYYc9.js +1 -0
- package/dist/client/assets/variant-draft-pointer-jrxTxtyS.js +1 -0
- package/dist/client/assets/virtual-mcp-DHPQGUgu.js +1 -0
- package/dist/client/assets/{watch-sse-pool-CrLAsZHh.js → watch-sse-pool-Dc_r60nv.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +684 -684
- package/package.json +1 -1
- package/dist/client/assets/ActiveShapeUtils-CDpScllU.js +0 -1
- package/dist/client/assets/AreaChart-Du66qHXY.js +0 -1
- package/dist/client/assets/BarChart-BXz-bUtC.js +0 -1
- package/dist/client/assets/CartesianChart-BZmgsxge.js +0 -1
- package/dist/client/assets/ReferenceLine-BPq2MnBR.js +0 -1
- package/dist/client/assets/Sector-BraX9V6h.js +0 -28
- package/dist/client/assets/agent-analytics-Biob4Jvo.js +0 -2
- package/dist/client/assets/agent-app-DTwyyqho.js +0 -1
- package/dist/client/assets/agent-assets-DpuZ7qUq.js +0 -1
- package/dist/client/assets/agent-automations-CHJpber1.js +0 -1
- package/dist/client/assets/agent-deck-DRCJIHES.js +0 -1
- package/dist/client/assets/agent-e2e-rlzvrptO.js +0 -1
- package/dist/client/assets/agent-experiments-BzSUejrS.js +0 -1
- package/dist/client/assets/agent-file-pM3fkLSV.js +0 -1
- package/dist/client/assets/agent-hosting-CIblOaW0.js +0 -1
- package/dist/client/assets/agent-library-BF5T38g7.js +0 -1
- package/dist/client/assets/agent-library-file-BTDXrKvZ.js +0 -1
- package/dist/client/assets/agent-monitor-CMU4bHqc.js +0 -1
- package/dist/client/assets/agent-releases-CEAPMdCY.js +0 -2
- package/dist/client/assets/agent-settings-9voN143W.js +0 -1
- package/dist/client/assets/agent-site-editor-WHTbnkdB.js +0 -27
- package/dist/client/assets/agent-site-editor-code-DxTJ31bR.js +0 -2
- package/dist/client/assets/agent-site-editor-content-B8OXp1G1.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Bu7A4U4r.js +0 -1
- package/dist/client/assets/agent-view-DW3bjKRU.js +0 -1
- package/dist/client/assets/alert-J8Wo4iMe.js +0 -1
- package/dist/client/assets/analytics-sections-Crtm-SOa.js +0 -1
- package/dist/client/assets/api-keys-DPclIgvr.js +0 -1
- package/dist/client/assets/app-editor-CWO6RLKf.js +0 -1
- package/dist/client/assets/automation-list-row-CO-7cr0O.js +0 -1
- package/dist/client/assets/badge-ByzdbptS.js +0 -1
- package/dist/client/assets/blocks-tab-states-diUqUrAK.js +0 -20
- package/dist/client/assets/blog-schema-pXyj_uKN.js +0 -1
- package/dist/client/assets/category-editor-16fFMZmU.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cowvog2q.js +0 -1
- package/dist/client/assets/collection-detail-BVMX_w00.js +0 -1
- package/dist/client/assets/content-tab-CTbbT9Kp.js +0 -22
- package/dist/client/assets/context-DwXA-O6V.js +0 -1
- package/dist/client/assets/hosted-publish-feedback-NabikYNC.js +0 -1
- package/dist/client/assets/index-BqS2UmN9.css +0 -1
- package/dist/client/assets/index-CxtzBp5_.js +0 -4
- package/dist/client/assets/infra-billing-kRHrP-RL.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BdnJuiDi.js +0 -1
- package/dist/client/assets/library-DYD_N6_K.js +0 -1
- package/dist/client/assets/monitoring-CgqK6OeU.js +0 -1
- package/dist/client/assets/mustache-Aw4qvxEW.js +0 -4
- package/dist/client/assets/order-monitor-day-CIHUt3pK.js +0 -1
- package/dist/client/assets/page-seo-form-CnjlIIXj.js +0 -1
- package/dist/client/assets/plan-ByMMI8KU.js +0 -1
- package/dist/client/assets/post-calendar-Dq_uFQwi.js +0 -1
- package/dist/client/assets/post-editor-DPLEIDHY.js +0 -2
- package/dist/client/assets/preview-tab-BHT_7Qja.js +0 -551
- package/dist/client/assets/product-picker-dialog-p0Ic9l9I.js +0 -1
- package/dist/client/assets/project-apps-v-sauknl.js +0 -1
- package/dist/client/assets/project-reports-CZJuTnYB.js +0 -1
- package/dist/client/assets/project-tasks-CGicoIeY.js +0 -1
- package/dist/client/assets/record-editor-Bh04Pm0_.js +0 -1
- package/dist/client/assets/redirect-editor-DQhKbdsA.js +0 -1
- package/dist/client/assets/reports-BupQ5Xhd.js +0 -1
- package/dist/client/assets/reports-tab-aEhqa7te.js +0 -2
- package/dist/client/assets/repositories-CEC-SgTJ.js +0 -1
- package/dist/client/assets/resolve-tab-icon-DtNff2Yq.js +0 -1
- package/dist/client/assets/route-Co7AkL50.js +0 -1
- package/dist/client/assets/route-D9eWdPea.js +0 -1
- package/dist/client/assets/route-P4X0mipC.js +0 -1
- package/dist/client/assets/secret-ciphertext-CI3Fu2ro.js +0 -1
- package/dist/client/assets/sections-editor-BgMrH8fq.js +0 -4
- package/dist/client/assets/seo-editor-C-YMij5b.js +0 -1
- package/dist/client/assets/settings-tab-Cp5pryb2.js +0 -1
- package/dist/client/assets/shell-layout-DNfiem0_.js +0 -1
- package/dist/client/assets/site-editor-Dsm_SPF7.js +0 -1
- package/dist/client/assets/site-editor-toast-L4A-Cxh7.js +0 -1
- package/dist/client/assets/slider-B9iKqweT.js +0 -1
- package/dist/client/assets/tasks-DrfrXIxf.js +0 -1
- package/dist/client/assets/time-range-picker-Dm5YljWh.js +0 -1
- package/dist/client/assets/toggle-group-CtPF-F41.js +0 -1
- package/dist/client/assets/tooltipContext-DFq6ns9J.js +0 -1
- package/dist/client/assets/use-content-sync-D4PHTEJr.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-C4gtrY2f.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-6p2QJIdt.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-kHysLFoZ.js +0 -1
- package/dist/client/assets/use-main-schema-v8-Dcb6Yskn.js +0 -1
- package/dist/client/assets/use-mcp-client-ZokR8_74.js +0 -10
- package/dist/client/assets/use-panel-navigate-K8ACrPML.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DJiBua9F.js +0 -1
- package/dist/client/assets/use-section-preview-base-De54Y3vh.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B7za82zu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B0JY_wMj.js +0 -1
- package/dist/client/assets/variant-calendar-BIblXEHb.js +0 -1
- package/dist/client/assets/variant-draft-pointer-fs9iIwvq.js +0 -1
- package/dist/client/assets/virtual-mcp-CeCtCq_o.js +0 -1
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-Cs3VV_t6.js","assets/index-DQaJBLJ-.js","assets/index-EoMx4WDO.css","assets/chat-context-NcP7iS0u.js","assets/use-panel-navigate-D1HcWbMf.js","assets/thread-route-BG5FYdPA.js","assets/use-project-scope-0viRZIAS.js","assets/repository-binding-WIxmR2C2.js","assets/use-mcp-client-BjCYOtMv.js","assets/auth-B7U7Hff4.js","assets/autosend-DEKkS89d.js","assets/thread-intent-D02hOLlA.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-Dc_r60nv.js","assets/task-board-S0qduW2n.js","assets/schema-C0M6s76A.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-HymesIOH.js","assets/use-ai-providers-D5-3qHgJ.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-B5bwnmIE.js","assets/runnable-block-editor-B9jSPnPq.js","assets/utils-CkO9KdKe.js","assets/ZoomOut-Ult5yHk2.js","assets/Image01-1LQuy0wG.js","assets/agent-icon-BLy2WH4s.js","assets/AlertCircle-BEMVsPah.js","assets/Tool01-DhUw9Xii.js","assets/ArrowUp-CDPrL6Uz.js","assets/ArrowLeft-BeJK1krP.js","assets/LinkBroken01-h_HqMIlK.js","assets/ShoppingBag01-BlUZ1Giu.js","assets/Building02-BFpUButr.js","assets/CheckCircle-Iq3Q6LLh.js","assets/ChevronUp-DeTPLyaf.js","assets/ChevronSelectorVertical-02lw_CbG.js","assets/UserSquare-DWYhjY7l.js","assets/Copy01-DQtv3upd.js","assets/CreditCard01-4SHg1t_a.js","assets/DotsVertical-Drns5Frs.js","assets/Globe04-BXpRk-hX.js","assets/SwitchHorizontal01-BLJAU7vB.js","assets/Key01-CoFqvDTW.js","assets/Link01-DU3-3Ipb.js","assets/Minus-DpXFgo6a.js","assets/Monitor01-BbCpGNqh.js","assets/Sun-Bt6BixS7.js","assets/Play-C8EB0NeI.js","assets/Plus-DPS97GtY.js","assets/SearchMd-5E3M_LtW.js","assets/Trash01-y0tx6OKR.js","assets/Upload01-BT7hKOY8.js","assets/User01-Dtm_f3tA.js","assets/Users01-DE8h5H5p.js","assets/XClose-sbj0sr-y.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-u6RslQ29.js","assets/format-time-Cq80KKvY.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-DvAZmEoh.js","assets/use-copy-Lp25RdQW.js","assets/usage-stats-tSDvCF_c.js","assets/tool-namespace-_uAlvwp8.js","assets/form-xTDgq-Tg.js","assets/label-DwAqZKXh.js","assets/utils-CVEq3hMx.js","assets/markdown-DCFmpcRh.js","assets/use-mobile-exvgjs5E.js","assets/tooltip-CT8p-4e_.js","assets/index-IRwT0rOS.js","assets/use-clock-tick-Dt0Rxdj9.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DlDykQO4.js","assets/types-CKfFy-n_.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-iu5E7VAW.js","assets/avatar-BaUatl4r.js","assets/command-DF9CyXTP.js","assets/index-B3yMIi0G.js","assets/integration-icon-BADY30E3.js","assets/project-icon-DeQ6esGK.js","assets/new-project-dialog-C1yGAeBD.js","assets/repository-import-picker-Bwaz_IkW.js","assets/use-navigate-to-agent-CoDY7b67.js","assets/repository-picker-C_FPAS2a.js","assets/useInfiniteQuery-v90E8EIL.js","assets/infiniteQueryObserver-Bia8aY1D.js","assets/collection-search-C00LN-O5.js","assets/use-debounced-value-DnWAg7xS.js","assets/required-auth-layout-C9RNRyLG.js","assets/use-org-sso-BmpgR8iH.js","assets/shell-layout-CE2Eihra.css","assets/sheet-BKZqYlDG.js","assets/use-connection-DEU6cL_M.js","assets/use-mcp-prompts-D4ntfVw2.js","assets/use-thread-outputs-2XKKA9Gw.js","assets/file-type-icon-etYEFstF.js","assets/parse-sections-CBNQNauq.js","assets/alert-BV79ffMP.js","assets/switch-CZd0EYW9.js","assets/textarea-CGkc_NoY.js","assets/use-content-sync-78T7URzs.js","assets/sandbox-url-D3mC8qhT.js","assets/index-D32uzOTA.js","assets/drawer-CER6tItd.js","assets/input-DQpuKkGH.js","assets/icon-button-Ht6P9npC.js","assets/chat-draft-MYleVoub.js","assets/select-3Bvf55R2.js","assets/index-BdQq_4o_.js","assets/tabs-BOwO3aPj.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-Dcf7REFq.js","assets/toggle-group-5-dW1fE5.js","assets/use-open-billing-url-gwWm2_gZ.js","assets/index-hUmTzopE.js","assets/checkbox-TbFNti2k.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-BOhP5vgB.js","assets/input-rj9iyl8c.js","assets/suggestion-B-6wzPND.js","assets/use-org-fs-DsXUzUGl.js","assets/question-004-sINsf4GQ.js","assets/use-members-BKwSn6l-.js","assets/use-org-auth-client-D2nGERnL.js","assets/feature-paywall-DruRkOvJ.js","assets/plan-ladder-DF2W1fWC.js","assets/add-connection-dialog-BbC6Awnv.js","assets/extract-connection-data-CnU07SX8.js","assets/metadata-D72DunRR.js","assets/connection-CynHS3Ve.js","assets/url-slug-BMSyCRIK.js","assets/connection-card-DWCHVdl-.js","assets/connection-slug-CITJ0kGN.js","assets/schema-CtKRQiER.js","assets/connection-form-helpers-Dta5jpsZ.js","assets/authenticate-and-persist-oauth-UvzpQNLL.js","assets/mcp-oauth-DHudAstl.js","assets/mcp-oauth-BV1FnXP9.js","assets/collection-tabs-BjFLrDhl.js","assets/badge-BDrcnhS0.js","assets/use-infinite-scroll-CktyBb0n.js","assets/useSuspenseInfiniteQuery-BoCx0vyL.js","assets/use-task-board-events-DBz1fm-T.js","assets/use-chat-layout-state-CrK3t-li.js","assets/input-Bwd_JSM8.css","assets/experiments-tab-choice-CdB5dK1A.js","assets/sandbox-git-api-CH_-QFpD.js","assets/blocks-tab-states-5KLuOsbu.js","assets/slider-f1cHo-xI.js","assets/index-DKwDh9fC.js","assets/tooltipContext-BqyDyVHC.js","assets/CategoricalChart-CNYNt0vK.js","assets/index-DFJe-l7D.js","assets/ActiveShapeUtils-B2LFrfRE.js","assets/Sector-Chcdibol.js","assets/symbol-BY53tx69.js","assets/empty-state-CEkcxXyE.js","assets/scroll-area-L8VlxVDv.js","assets/monaco-editor-B77kgSL6.js","assets/editor-DiFOLDbd.js","assets/calendar-CCVXvCMs.js","assets/editor-classes-BxczJlTk.js","assets/core.esm-C0uaMHhK.js","assets/sortable.esm-B_g_IXou.js","assets/combobox-CaB-y5Ze.js","assets/alert-dialog-BILupwtl.js","assets/search-input-BCaqzpfC.js","assets/use-file-configs-C3GELqZ9.js","assets/asset-utils-CV_m_T7Z.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/mustache-B1PzKbLg.js","assets/use-section-preview-base-H9VNpzGF.js","assets/section-preview-url-7zfngvgW.js","assets/page-seo-form-YDVeWiAp.js","assets/use-apply-named-rule-BuleRH2R.js","assets/use-move-blocks-jGxZ60KS.js","assets/variant-draft-pointer-jrxTxtyS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as ce,j as s,r as P,l as It,b as Te,B as Ke,aF as Ut,aW as tt,aG as Ne,q as Vs,D as qs,K as Ws,s as Gs,v as Js,e as la,h as bt,I as Tn,w as ca,aX as da,a2 as An,aY as ua,aU as fa,au as ms,aw as ps,a5 as ma,P as hs,y as pa,t as wn,o as ha,m as ga}from"./index-DQaJBLJ-.js";import{u as Ys,g as va,c as gs,B as kn,P as xa,r as ba,R as ya,a as wa,b as Qs,S as ka,d as Sa,l as Pa,m as ja,e as Ea,f as Sn,N as Na}from"./runnable-block-editor-B9jSPnPq.js";import{b as Ta,c as Jt,r as Xs,l as Zs,f as Ca,g as Ra,w as La}from"./chat-context-NcP7iS0u.js";import{t as Aa}from"./ChevronUp-DeTPLyaf.js";import{T as _a,U as Oa,M as er,V as Da,W as Ba,b as Fa,X as Ma,Y as $a,Z as za,_ as Ka,$ as vs,a0 as Ia}from"./agent-icon-BLy2WH4s.js";import{a as Ua}from"./UserSquare-DWYhjY7l.js";import{s as Ha}from"./Plus-DPS97GtY.js";import{a as tr,b as nr,P as sr}from"./popover-BOhP5vgB.js";import{a as gt,b as vt,c as rr,d as ar,e as ir,C as or}from"./command-DF9CyXTP.js";import{c as Va,a as qa}from"./repository-binding-WIxmR2C2.js";import{a as _n}from"./sandbox-lifecycle-context-aKdVFwPA.js";import{e as Wa}from"./backoff-CrEUbyZT.js";import{r as Ga}from"./thread-intent-D02hOLlA.js";import{a as lr}from"./input-DQpuKkGH.js";import{S as cr,d as Ja,f as Ya,i as Qa,g as Xa,h as Za,j as ei,k as ti,u as On,l as Dn,m as Ze,n as ni,o as si,q as ri,c as ai,b as dr,t as ii,v as Ue,w as oi,x as li,y as ci,z as di,A as ui,B as xs,C as fi,D as mi,e as pi}from"./use-content-sync-78T7URzs.js";import{u as hi}from"./use-mobile-exvgjs5E.js";import{T as Ht,a as Vt,c as qt}from"./tooltip-CT8p-4e_.js";import{T as et}from"./toolbar-icon-button-BQvi-WW6.js";import{b as gi,w as Ft,a as bs,i as vi}from"./variant-draft-pointer-jrxTxtyS.js";import{u as ur,i as xi,B as bi,S as yi,C as wi,a as ki,b as Si,l as Pi,D as ji}from"./blocks-tab-states-5KLuOsbu.js";import{C as Ei,s as Ni,L as Ti,R as Wt,D as ys,i as Ci,a as Ri,v as Li,b as Ai,c as xt,n as Bn,d as fr,f as ze,e as mr,h as _i,g as Oi,j as Di,k as Bi,l as Fi,p as Mi,N as $i,m as zi,r as Ki,o as ws,q as Ii}from"./parse-sections-CBNQNauq.js";import{r as Ui,D as ks,w as Ss,b as Ps,a as Hi}from"./section-preview-url-7zfngvgW.js";import{u as Vi}from"./use-fast-preview-draft-url-CCAgHiPb.js";import{a as qi,c as pr}from"./shell-layout-iu5E7VAW.js";import{u as hr,b as Wi}from"./index-D32uzOTA.js";import{u as Cn}from"./useQueries-DT3VE95i.js";import{i as Gi}from"./LinkBroken01-h_HqMIlK.js";import{u as gr}from"./blocks-preview-workspace-context-CNobOsoP.js";import{MonacoCodeEditor as Ji}from"./monaco-editor-B77kgSL6.js";import{d as Yi}from"./utils-CkO9KdKe.js";import{R as js,a as Mt,b as Es}from"./resizable-rv6DYDSR.js";import{u as Qi,a as Pn}from"./experiments-tab-choice-CdB5dK1A.js";import{w as Ns}from"./device-hint-SeLRi17j.js";import{L as Xi}from"./label-DwAqZKXh.js";import{a as Zi,T as Ts}from"./toggle-group-5-dW1fE5.js";import{h as vr,u as eo,w as to,a as Cs,i as no}from"./releases-api-r2wwTMcb.js";import{r as so}from"./virtual-mcp-DHPQGUgu.js";import{d as ro}from"./delay-CnY5UFtP.js";import{E as ao}from"./empty-state-CEkcxXyE.js";import{G as Rs}from"./repository-picker-C_FPAS2a.js";import{R as io}from"./repository-import-picker-Bwaz_IkW.js";import{r as oo}from"./preview-source-BsRLGWUP.js";import{A as lo,a as co,b as uo}from"./alert-BV79ffMP.js";import{u as fo}from"./use-task-metadata-1k4pU8z_.js";function mo(t){const e=ce.c(10),{waiting:n}=t,r=n?"true":"false";let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:s.jsx(_a,{className:"size-5 sm:size-6"})}),e[0]=i):i=e[0];let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"h-px w-full border-t border-dashed border-muted-foreground/40"}),e[1]=u):u=e[1];let a;e[2]!==n?(a=n&&s.jsx("span",{"data-testid":"connection-dot",className:"absolute top-0 size-2 animate-[connection-shuttle_1.8s_var(--ease-in-out-cubic)_infinite_alternate] rounded-full bg-foreground"}),e[2]=n,e[3]=a):a=e[3];let o;e[4]!==a?(o=s.jsxs("span",{className:"relative flex h-2 w-16 items-center sm:w-20",children:[u,a]}),e[4]=a,e[5]=o):o=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:s.jsx(Oa,{className:"size-5 sm:size-6"})}),e[6]=l):l=e[6];let c;return e[7]!==r||e[8]!==o?(c=s.jsxs("div",{"aria-hidden":"true","data-testid":"connection-wire","data-waiting":r,className:"flex items-center gap-2",children:[i,o,l]}),e[7]=r,e[8]=o,e[9]=c):c=e[9],c}function po(t){const e=ce.c(25),{index:n,numbered:r,step:i,heading:u}=t,a=P.useId();let o;e[0]!==n||e[1]!==r?(o=r&&s.jsx("span",{"aria-hidden":"true",className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium tabular-nums text-foreground",children:n}),e[0]=n,e[1]=r,e[2]=o):o=e[2];let l;e[3]!==u||e[4]!==a||e[5]!==i.title?(l=s.jsx(u,{id:a,className:"text-sm font-medium text-foreground",children:i.title}),e[3]=u,e[4]=a,e[5]=i.title,e[6]=l):l=e[6];let c;e[7]!==o||e[8]!==l?(c=s.jsxs("div",{className:"flex items-center gap-3",children:[o,l]}),e[7]=o,e[8]=l,e[9]=c):c=e[9];const p=r&&"sm:pl-9";let m;e[10]!==p?(m=It("flex min-w-0 flex-col gap-3",p),e[10]=p,e[11]=m):m=e[11];let f;e[12]!==i.body?(f=i.body&&s.jsx("p",{className:"text-sm text-muted-foreground",children:i.body}),e[12]=i.body,e[13]=f):f=e[13];let x;e[14]!==i.command?(x=i.command&&s.jsx(Ei,{command:i.command}),e[14]=i.command,e[15]=x):x=e[15];let b;e[16]!==i.after||e[17]!==m||e[18]!==f||e[19]!==x?(b=s.jsxs("div",{className:m,children:[f,x,i.after]}),e[16]=i.after,e[17]=m,e[18]=f,e[19]=x,e[20]=b):b=e[20];let j;return e[21]!==a||e[22]!==c||e[23]!==b?(j=s.jsxs("li",{"aria-labelledby":a,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[c,b]}),e[21]=a,e[22]=c,e[23]=b,e[24]=j):j=e[24],j}const ho=[];function Gt(t){const e=ce.c(20),{title:n,lead:r,waiting:i,alerts:u,steps:a,footer:o,headingLevel:l}=t,c=a===void 0?ho:a,p=l===void 0?1:l,m=p===1?"h1":"h2",f=i&&c.length===0?"status":void 0;let x;e[0]!==i?(x=s.jsx(mo,{waiting:i}),e[0]=i,e[1]=x):x=e[1];let b;e[2]!==m||e[3]!==n?(b=s.jsx(m,{tabIndex:-1,className:"text-balance text-lg font-medium text-foreground outline-none sm:text-xl",children:n}),e[2]=m,e[3]=n,e[4]=b):b=e[4];let j;e[5]!==r?(j=r&&s.jsx("p",{className:"text-pretty text-sm text-muted-foreground",children:r}),e[5]=r,e[6]=j):j=e[6];let g;e[7]!==f||e[8]!==x||e[9]!==b||e[10]!==j?(g=s.jsxs("header",{role:f,className:"flex flex-col items-center gap-3 text-center",children:[x,b,j]}),e[7]=f,e[8]=x,e[9]=b,e[10]=j,e[11]=g):g=e[11];let k;e[12]!==p||e[13]!==c?(k=c.length>0&&s.jsx("ol",{className:"flex flex-col gap-3",children:c.map((y,v)=>s.jsx(po,{index:v+1,numbered:c.length>1,step:y,heading:p===1?"h2":"h3"},y.title))}),e[12]=p,e[13]=c,e[14]=k):k=e[14];let E;return e[15]!==u||e[16]!==o||e[17]!==g||e[18]!==k?(E=s.jsx("div",{className:"h-full w-full overflow-y-auto",children:s.jsxs("div",{className:"mx-auto flex min-h-full w-full max-w-xl flex-col justify-center gap-6 px-4 py-8 sm:py-12",children:[g,u,k,o]})}),e[15]=u,e[16]=o,e[17]=g,e[18]=k,e[19]=E):E=e[19],E}function go(t){const e=ce.c(55),{wait:n,hosts:r,invalidLink:i}=t,u=i===void 0?!1:i,a=Te();let o;e[0]!==u||e[1]!==a?(o=u&&s.jsx(lo,{variant:"warning",children:s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[s.jsx(co,{className:"line-clamp-none text-foreground",children:a("decoServe.link.invalidTitle")}),s.jsx(uo,{children:a("decoServe.link.invalidBody")})]})}),e[0]=u,e[1]=a,e[2]=o):o=e[2];const l=o;if(n.kind==="problem"){let O;e[3]!==a||e[4]!==n.host||e[5]!==n.problem?(O=Ni(a,n.problem,n.host),e[3]=a,e[4]=n.host,e[5]=n.problem,e[6]=O):O=e[6];const{title:R,body:_}=O;let A;e[7]!==_?(A=s.jsx(Wt,{text:_}),e[7]=_,e[8]=A):A=e[8];let B;e[9]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ys,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=B):B=e[9];let L;return e[10]!==l||e[11]!==A||e[12]!==R?(L=s.jsx(Gt,{headingLevel:2,waiting:!1,title:R,lead:A,alerts:l,footer:B}),e[10]=l,e[11]=A,e[12]=R,e[13]=L):L=e[13],L}const c=n.kind==="looking",p=c&&!n.paused;let m;e[14]!==a?(m=a("decoServe.waiting.title"),e[14]=a,e[15]=m):m=e[15];let f;e[16]!==a?(f=a("decoServe.waiting.lead"),e[16]=a,e[17]=f):f=e[17];let x;e[18]!==l||e[19]!==n.kind?(x=(l||n.kind==="denied")&&s.jsxs(s.Fragment,{children:[l,n.kind==="denied"&&s.jsx(Ti,{})]}),e[18]=l,e[19]=n.kind,e[20]=x):x=e[20];let b;e[21]!==a?(b=a("decoServe.guide.step1.title"),e[21]=a,e[22]=b):b=e[22];let j;e[23]!==a?(j=a("decoServe.guide.step1.body"),e[23]=a,e[24]=j):j=e[24];let g;e[25]!==j?(g=s.jsx(Wt,{text:j}),e[25]=j,e[26]=g):g=e[26];let k;e[27]!==b||e[28]!==g?(k={title:b,body:g,command:cr},e[27]=b,e[28]=g,e[29]=k):k=e[29];let E;e[30]!==a?(E=a("decoServe.waiting.step2.title"),e[30]=a,e[31]=E):E=e[31];let y;e[32]!==a?(y=a("decoServe.waiting.step2.body"),e[32]=a,e[33]=y):y=e[33];let v;e[34]!==r||e[35]!==c||e[36]!==a||e[37]!==n.kind||e[38]!==n.onStart||e[39]!==n.paused?(v=n.kind==="needs-gesture"?s.jsx(Ke,{variant:"outline",className:"self-start",onClick:n.onStart,children:a("decoServe.guide.step2.start")}):c&&s.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:n.paused?a("decoServe.guide.step2.paused"):a("decoServe.guide.step2.looking",{hosts:r})}),e[34]=r,e[35]=c,e[36]=a,e[37]=n.kind,e[38]=n.onStart,e[39]=n.paused,e[40]=v):v=e[40];let w;e[41]!==E||e[42]!==y||e[43]!==v?(w={title:E,body:y,after:v},e[41]=E,e[42]=y,e[43]=v,e[44]=w):w=e[44];let T;e[45]!==k||e[46]!==w?(T=[k,w],e[45]=k,e[46]=w,e[47]=T):T=e[47];let S;e[48]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ys,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[48]=S):S=e[48];let N;return e[49]!==T||e[50]!==p||e[51]!==m||e[52]!==f||e[53]!==x?(N=s.jsx(Gt,{headingLevel:2,waiting:p,title:m,lead:f,alerts:x,steps:T,footer:S}),e[49]=T,e[50]=p,e[51]=m,e[52]=f,e[53]=x,e[54]=N):N=e[54],N}function vo(t,e){switch(t.kind){case"needs-permission":return{kind:"denied"};case"problem":return{kind:"problem",problem:t.problem,host:e};default:return{kind:"looking"}}}const xo=15e3,bo=3e3;function yo(t){const{candidates:e,probe:n,onFound:r,onChange:i,doc:u=document,setTimer:a=(v,w)=>setTimeout(v,w),clearTimer:o=v=>clearTimeout(v),timeoutMs:l=bo}=t;let c={status:"searching",firstRoundDone:!1,problem:null},p=!1,m=!1,f=0,x=null,b=null;const j=()=>u.visibilityState==="hidden",g=v=>{c={...c,...v},i(c)},k=async v=>{b=new AbortController;const w=b,T=a(()=>w.abort(),l);try{return await n(v,w.signal),!0}catch(S){if(p)return!1;const N=Ya(S);return N.reason!=="not-answering"?g({problem:{...N,endpoint:v}}):c.problem?.endpoint===v&&g({problem:null}),!1}finally{o(T),b=null}},E=async()=>{if(x=null,!(p||m)){if(e.length===0){g({status:"stopped",firstRoundDone:!0});return}if(j()){g({status:"paused"});return}m=!0,c.status!=="searching"&&g({status:"searching"});for(const v of e){if(p)break;if(await k(v)){if(m=!1,p)return;p=!0,u.removeEventListener("visibilitychange",y),g({status:"found",firstRoundDone:!0}),r(v);return}}if(m=!1,!p){if(f+=1,c.firstRoundDone||g({firstRoundDone:!0}),j()){g({status:"paused"});return}x=a(()=>{E()},Ja(f,xo))}}};function y(){if(!p){if(j()){x!==null&&(o(x),x=null),m||g({status:"paused"});return}x!==null&&o(x),f=0,E()}}return u.addEventListener("visibilitychange",y),i(c),E(),()=>{p=!0,x!==null&&o(x),b?.abort(),u.removeEventListener("visibilitychange",y)}}function wo(t,e){return Xa(Za({endpoint:t,fetch:n=>fetch(n,{signal:e})}))}const ko=["loopback-network","local-network-access"];async function So(){if(Qa(window.location.origin))return null;for(const t of ko)try{return await navigator.permissions.query({name:t})}catch{}return null}let xr=null,Ls=!1;const jn=new Set;function Po(t){if(jn.add(t),!Ls){Ls=!0;const e=n=>{xr=n;for(const r of jn)r()};So().then(n=>{if(!n)return e("unsupported");e(n.state),n.addEventListener("change",()=>e(n.state))})}return()=>jn.delete(t)}const jo={status:"stopped",firstRoundDone:!1,problem:null},En=new Map;function Eo(t){const e=En.get(t);if(e)return e;let n={status:"searching",firstRoundDone:!1,problem:null};const r=new Set;let i=null;const u={onFound:()=>{},getSnapshot:()=>n,subscribe:a=>(r.add(a),i??=yo({candidates:t.split(" "),probe:wo,onFound:o=>u.onFound(o),onChange:o=>{n=o;for(const l of r)l()}}),()=>{r.delete(a),!(r.size>0)&&(i?.(),i=null,En.delete(t))})};return En.set(t,u),u}function br(){return P.useSyncExternalStore(Po,_s,_s)}const No=()=>()=>{},As=()=>jo,_s=()=>xr;function od(t){const e=ce.c(9),{candidates:n,onFound:r}=t,[i,u]=P.useState(!1),a=br(),l=(a==="granted"||a==="unsupported"||a==="prompt"&&i)&&n.length>0;let c;e[0]!==l||e[1]!==n||e[2]!==r?(c=l?Eo(n.join(" ")):null,c&&(c.onFound=r),e[0]=l,e[1]=n,e[2]=r,e[3]=c):c=e[3];const p=P.useSyncExternalStore(c?.subscribe??No,c?.getSnapshot??As,c?.getSnapshot??As),m=a==="prompt"&&!i;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),e[4]=f):f=e[4];let x;return e[5]!==a||e[6]!==p||e[7]!==m?(x={state:p,access:a,needsGesture:m,start:f},e[5]=a,e[6]=p,e[7]=m,e[8]=x):x=e[8],x}const Os={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function To(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1,hostedDraft:a=!1}=t,o=u?null:t.previewServerUrl;return t.deciding?{...Os,showDecidingLoader:!0}:t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Os:r&&i&&o?{mode:"production",iframeBase:o,showBlockingOverlay:!1,showWakingPill:!1}:r&&a&&o?{mode:"production",iframeBase:o,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:o?{mode:"production",iframeBase:o,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const Co=1e4,Ro=1e3,Lo=3e4;function Ao({iframeRef:t,src:e,active:n}){const r=P.useRef(0),i=P.useRef(null),u=P.useRef(null),a=P.useRef(e),o=P.useRef(n);a.current=e,o.current=n;const l=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},c=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p()},Co)},p=()=>{if(!o.current||!a.current)return;u.current&&clearTimeout(u.current);const x=Wa(Lo,Ro,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const b=t.current,j=a.current;!b||!j||!o.current||(b.src=j,c())},x)},m=()=>{r.current=0,l()},f=()=>{i.current&&(clearTimeout(i.current),i.current=null),p()};return P.useEffect(()=>{if(l(),r.current=0,!(!n||!e))return c(),l},[e,n]),{handleLoad:m,handleError:f}}const _o=1500,Oo=500;function Do({iframe:t,reload:e,waitMs:n=_o,confirmMs:r=Oo}){let i;const u=()=>{clearTimeout(a),i=setTimeout(e,r)};t.addEventListener("load",u,{once:!0});const a=setTimeout(()=>{t.removeEventListener("load",u),e()},n);return()=>{clearTimeout(a),clearTimeout(i),t.removeEventListener("load",u)}}const Bo=Ut({tag:Ne(),id:Ne(),classes:Ne(),text:Ne(),html:Ne(),manifestKey:Ne().nullable(),componentName:Ne().nullable(),parents:Ne(),url:Ne(),path:Ne(),viewport:Ut({width:tt(),height:tt()}),position:Ut({x:tt(),y:tt()})}),Fo=`(function() {
|
|
3
|
+
if (window.__visualEditorActive) return;
|
|
4
|
+
window.__visualEditorActive = true;
|
|
5
|
+
|
|
6
|
+
var cursorStyle = document.createElement("style");
|
|
7
|
+
cursorStyle.textContent = "* { cursor: default !important; }";
|
|
8
|
+
document.head.appendChild(cursorStyle);
|
|
9
|
+
|
|
10
|
+
var highlight = document.createElement("div");
|
|
11
|
+
highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
|
|
12
|
+
document.body.appendChild(highlight);
|
|
13
|
+
|
|
14
|
+
var badge = document.createElement("div");
|
|
15
|
+
badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
16
|
+
document.body.appendChild(badge);
|
|
17
|
+
|
|
18
|
+
var lastTarget = null;
|
|
19
|
+
var rafPending = false;
|
|
20
|
+
var moveHandler = function(e) {
|
|
21
|
+
if (rafPending) return;
|
|
22
|
+
rafPending = true;
|
|
23
|
+
var target = e.target;
|
|
24
|
+
requestAnimationFrame(function() {
|
|
25
|
+
rafPending = false;
|
|
26
|
+
var el = target;
|
|
27
|
+
if (!el || el === highlight || el === badge) return;
|
|
28
|
+
if (el === lastTarget) return;
|
|
29
|
+
lastTarget = el;
|
|
30
|
+
var r = el.getBoundingClientRect();
|
|
31
|
+
highlight.style.display = "block";
|
|
32
|
+
highlight.style.top = r.top + "px";
|
|
33
|
+
highlight.style.left = r.left + "px";
|
|
34
|
+
highlight.style.width = r.width + "px";
|
|
35
|
+
highlight.style.height = r.height + "px";
|
|
36
|
+
var tag = el.tagName.toLowerCase();
|
|
37
|
+
var id = el.id ? "#" + el.id : "";
|
|
38
|
+
var cls = el.className && typeof el.className === "string"
|
|
39
|
+
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
40
|
+
: "";
|
|
41
|
+
badge.textContent = tag + id + cls;
|
|
42
|
+
badge.style.display = "block";
|
|
43
|
+
badge.style.top = Math.max(0, r.top - 20) + "px";
|
|
44
|
+
badge.style.left = r.left + "px";
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
48
|
+
|
|
49
|
+
var outHandler = function(e) {
|
|
50
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
51
|
+
highlight.style.display = "none";
|
|
52
|
+
badge.style.display = "none";
|
|
53
|
+
lastTarget = null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
57
|
+
|
|
58
|
+
var clickHandler = function(e) {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
e.stopImmediatePropagation();
|
|
61
|
+
var el = e.target;
|
|
62
|
+
if (!el || el === highlight || el === badge) return;
|
|
63
|
+
|
|
64
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
65
|
+
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
66
|
+
setTimeout(function() {
|
|
67
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
68
|
+
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
69
|
+
}, 400);
|
|
70
|
+
|
|
71
|
+
var tag = el.tagName.toLowerCase();
|
|
72
|
+
var id = el.id || "";
|
|
73
|
+
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
74
|
+
var text = (el.textContent || "").trim().slice(0, 200);
|
|
75
|
+
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
76
|
+
|
|
77
|
+
var closestSection = el.closest("section[data-manifest-key]");
|
|
78
|
+
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
79
|
+
|
|
80
|
+
var ancestor = el;
|
|
81
|
+
var componentName = null;
|
|
82
|
+
for (var i = 0; i < 10 && ancestor; i++) {
|
|
83
|
+
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
84
|
+
ancestor = ancestor.parentElement;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var parents = [];
|
|
88
|
+
var p = el.parentElement;
|
|
89
|
+
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
90
|
+
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
91
|
+
var pId = p.id ? "#" + p.id : "";
|
|
92
|
+
var pCls = p.className && typeof p.className === "string"
|
|
93
|
+
? "." + p.className.trim().split(/\\s+/)[0]
|
|
94
|
+
: "";
|
|
95
|
+
parents.unshift(pTag + pId + pCls);
|
|
96
|
+
p = p.parentElement;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
window.parent.postMessage({
|
|
100
|
+
type: "visual-editor::element-clicked",
|
|
101
|
+
payload: {
|
|
102
|
+
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
103
|
+
manifestKey: manifestKey, componentName: componentName,
|
|
104
|
+
parents: parents.join(" > "),
|
|
105
|
+
url: window.location.href, path: window.location.pathname,
|
|
106
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
107
|
+
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
108
|
+
}
|
|
109
|
+
}, "*");
|
|
110
|
+
};
|
|
111
|
+
document.addEventListener("click", clickHandler, true);
|
|
112
|
+
|
|
113
|
+
window.addEventListener("message", function(e) {
|
|
114
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
|
|
115
|
+
if (e.source !== window.parent) return;
|
|
116
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
117
|
+
if (e.data && e.data.type === "visual-editor::clear-hover") {
|
|
118
|
+
highlight.style.display = "none";
|
|
119
|
+
badge.style.display = "none";
|
|
120
|
+
lastTarget = null;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
124
|
+
highlight.remove();
|
|
125
|
+
badge.remove();
|
|
126
|
+
cursorStyle.remove();
|
|
127
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
128
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
129
|
+
document.removeEventListener("click", clickHandler, true);
|
|
130
|
+
window.__visualEditorActive = false;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
})();`;function Mo(t,e){const n=t.map(()=>null),r=[];for(let f=0;f<t.length;f++)t[f]!==null&&r.push(f);const i=r.length,u=e.length;if(!i||!u)return n;const a=(f,x)=>{const b=t[r[f]??0];return!b||!b.length?1:b.indexOf(e[x]??"")>=0?2:0},o=[],l=[];for(let f=0;f<=i;f++)o.push(new Array(u+1).fill(0)),l.push(new Array(u+1).fill(2));for(let f=1;f<=i;f++){const x=o[f-1]??[],b=o[f]??[],j=l[f]??[];for(let g=1;g<=u;g++){let k=x[g]??0,E=2;const y=b[g-1]??0;y>k&&(k=y,E=0);const v=a(f-1,g-1),w=(x[g-1]??0)+v;v>0&&w>k&&(k=w,E=1),b[g]=k,j[g]=E}}let c=0,p=i,m=u;for(;p>0&&m>0;){const f=l[p]?.[m]??2;f===1?(n[r[p-1]??0]=m-1,c++,p--,m--):f===0?m--:p--}if(c===0&&u===i)for(let f=0;f<i;f++)n[r[f]??0]=f;return n}const $o=Ut({sectionIndex:tt(),manifestKey:Ne(),clickSeq:tt()}),Ds=`(function() {
|
|
134
|
+
if (window.__cmsEditorActive) return;
|
|
135
|
+
window.__cmsEditorActive = true;
|
|
136
|
+
|
|
137
|
+
// Preserve scroll across variant-override navigations and save-reloads.
|
|
138
|
+
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
139
|
+
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
140
|
+
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
141
|
+
// (the override only changes the query, so the key is stable), then restore it
|
|
142
|
+
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
143
|
+
// sections that grow the page after load. The recency guard avoids restoring a
|
|
144
|
+
// stale offset on a genuinely fresh visit.
|
|
145
|
+
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
146
|
+
var saveScroll = function() {
|
|
147
|
+
try {
|
|
148
|
+
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
149
|
+
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
150
|
+
}));
|
|
151
|
+
} catch (_) {}
|
|
152
|
+
};
|
|
153
|
+
var saveScrollPending = false;
|
|
154
|
+
window.addEventListener("scroll", function() {
|
|
155
|
+
if (saveScrollPending) return;
|
|
156
|
+
saveScrollPending = true;
|
|
157
|
+
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
158
|
+
}, { passive: true });
|
|
159
|
+
(function restoreScroll() {
|
|
160
|
+
var raw = null;
|
|
161
|
+
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
162
|
+
if (!raw) return;
|
|
163
|
+
var saved = null;
|
|
164
|
+
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
165
|
+
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
166
|
+
if (!saved.x && !saved.y) return;
|
|
167
|
+
var attempts = 0;
|
|
168
|
+
var apply = function() {
|
|
169
|
+
attempts++;
|
|
170
|
+
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
171
|
+
if (attempts < 8) setTimeout(apply, 120);
|
|
172
|
+
};
|
|
173
|
+
apply();
|
|
174
|
+
})();
|
|
175
|
+
|
|
176
|
+
var highlight = document.createElement("div");
|
|
177
|
+
highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
|
|
178
|
+
document.body.appendChild(highlight);
|
|
179
|
+
|
|
180
|
+
var badge = document.createElement("div");
|
|
181
|
+
badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
182
|
+
document.body.appendChild(badge);
|
|
183
|
+
|
|
184
|
+
var isTopLevelSection = function(el) {
|
|
185
|
+
return el && el.parentElement
|
|
186
|
+
? !el.parentElement.closest("section[data-manifest-key]")
|
|
187
|
+
: true;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// All top-level page sections in DOM order (deco renders page sections as
|
|
191
|
+
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
192
|
+
// too, hence the top-level filter). This is the full DOM run, framework
|
|
193
|
+
// sections included — getAllSections() narrows it to the editable window.
|
|
194
|
+
var topLevelSections = function() {
|
|
195
|
+
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
196
|
+
.filter(isTopLevelSection);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
200
|
+
var sectionCandidates = [];
|
|
201
|
+
|
|
202
|
+
// Stringified from section-alignment.ts so both sides share one copy.
|
|
203
|
+
var alignSections = ${Mo.toString()};
|
|
204
|
+
|
|
205
|
+
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
206
|
+
var computeAlignment = function(tops) {
|
|
207
|
+
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
208
|
+
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
209
|
+
return idx === null ? null : tops[idx];
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
// Editable sections, indexed to match the decofile array the panel uses.
|
|
214
|
+
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
215
|
+
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
216
|
+
// candidates, fall back to the full top-level run.
|
|
217
|
+
var getAllSections = function() {
|
|
218
|
+
var tops = topLevelSections();
|
|
219
|
+
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
223
|
+
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
224
|
+
// aligned editable set (a framework section deco injected).
|
|
225
|
+
var findSection = function(el, out) {
|
|
226
|
+
var node = el;
|
|
227
|
+
var found = null;
|
|
228
|
+
while (node && node !== document.body) {
|
|
229
|
+
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
230
|
+
found = node;
|
|
231
|
+
}
|
|
232
|
+
node = node.parentElement;
|
|
233
|
+
}
|
|
234
|
+
if (!found) return null;
|
|
235
|
+
var sections = getAllSections();
|
|
236
|
+
if (out) out.sections = sections;
|
|
237
|
+
return sections.indexOf(found) >= 0 ? found : null;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
241
|
+
var LAZY_KEYS = [
|
|
242
|
+
"website/sections/Rendering/Lazy.tsx",
|
|
243
|
+
"website/sections/Rendering/SingleDeferred.tsx"
|
|
244
|
+
];
|
|
245
|
+
var isLazyKey = function(key) {
|
|
246
|
+
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
247
|
+
};
|
|
248
|
+
var displayKey = function(section) {
|
|
249
|
+
var key = section.getAttribute("data-manifest-key") || "section";
|
|
250
|
+
if (isLazyKey(key)) {
|
|
251
|
+
var inner = section.querySelector("section[data-manifest-key]");
|
|
252
|
+
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
253
|
+
}
|
|
254
|
+
return key;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// Per-section metadata sent by the editor, aligned by index with
|
|
258
|
+
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
259
|
+
// global inside async rendering); kinds: section type that drives the color.
|
|
260
|
+
var sectionLabels = [];
|
|
261
|
+
var sectionKinds = [];
|
|
262
|
+
var labelFor = function(section, sections) {
|
|
263
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
264
|
+
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
265
|
+
return displayKey(section);
|
|
266
|
+
};
|
|
267
|
+
var kindFor = function(section, sections) {
|
|
268
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
269
|
+
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
// Highlight palette by section kind: global = light purple, variant = green,
|
|
273
|
+
// normal = blue.
|
|
274
|
+
var COLORS = {
|
|
275
|
+
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
276
|
+
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
277
|
+
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
278
|
+
};
|
|
279
|
+
var applyColor = function(kind) {
|
|
280
|
+
var c = COLORS[kind] || COLORS.normal;
|
|
281
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
282
|
+
highlight.style.background = c.bg;
|
|
283
|
+
badge.style.background = c.solid;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
var lastSection = null;
|
|
287
|
+
var lastLabel = "";
|
|
288
|
+
var lastKind = "normal";
|
|
289
|
+
var rafPending = false;
|
|
290
|
+
// True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
|
|
291
|
+
var renderPending = false;
|
|
292
|
+
|
|
293
|
+
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
294
|
+
// nodes, so the browser scrolls the highlight together with the page
|
|
295
|
+
// natively — no per-frame JS repositioning, no scroll lag.
|
|
296
|
+
var positionHighlight = function(section) {
|
|
297
|
+
var r = section.getBoundingClientRect();
|
|
298
|
+
var top = r.top + window.scrollY;
|
|
299
|
+
var left = r.left + window.scrollX;
|
|
300
|
+
highlight.style.display = "block";
|
|
301
|
+
highlight.style.top = top + "px";
|
|
302
|
+
highlight.style.left = left + "px";
|
|
303
|
+
highlight.style.width = r.width + "px";
|
|
304
|
+
highlight.style.height = r.height + "px";
|
|
305
|
+
badge.textContent = lastLabel || displayKey(section);
|
|
306
|
+
badge.style.display = "block";
|
|
307
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
308
|
+
badge.style.left = left + "px";
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
var moveHandler = function(e) {
|
|
312
|
+
if (renderPending || rafPending) return;
|
|
313
|
+
rafPending = true;
|
|
314
|
+
var target = e.target;
|
|
315
|
+
requestAnimationFrame(function() {
|
|
316
|
+
rafPending = false;
|
|
317
|
+
if (renderPending) return;
|
|
318
|
+
if (!target || target === highlight || target === badge) return;
|
|
319
|
+
var out = {};
|
|
320
|
+
var section = findSection(target, out);
|
|
321
|
+
if (section === lastSection) return;
|
|
322
|
+
lastSection = section;
|
|
323
|
+
if (!section) {
|
|
324
|
+
highlight.style.display = "none";
|
|
325
|
+
badge.style.display = "none";
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
lastLabel = labelFor(section, out.sections);
|
|
329
|
+
lastKind = kindFor(section, out.sections);
|
|
330
|
+
applyColor(lastKind);
|
|
331
|
+
positionHighlight(section);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
335
|
+
|
|
336
|
+
// Window scroll is handled natively by the absolute positioning above; this
|
|
337
|
+
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
338
|
+
// (capture=true catches those), where document coordinates do shift.
|
|
339
|
+
var reposition = function() {
|
|
340
|
+
if (!lastSection || highlight.style.display === "none") return;
|
|
341
|
+
if (rafPending) return;
|
|
342
|
+
rafPending = true;
|
|
343
|
+
requestAnimationFrame(function() {
|
|
344
|
+
rafPending = false;
|
|
345
|
+
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
349
|
+
window.addEventListener("resize", reposition, { passive: true });
|
|
350
|
+
|
|
351
|
+
var outHandler = function(e) {
|
|
352
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
353
|
+
highlight.style.display = "none";
|
|
354
|
+
badge.style.display = "none";
|
|
355
|
+
lastSection = null;
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
359
|
+
|
|
360
|
+
var clickSeq = 0;
|
|
361
|
+
|
|
362
|
+
// Blocks observes clicks to select sections in the side panel; it must not
|
|
363
|
+
// cancel the iframe page's own handlers or native control behavior.
|
|
364
|
+
var clickHandler = function(e) {
|
|
365
|
+
var target = e.target;
|
|
366
|
+
if (!target || target === highlight || target === badge) return;
|
|
367
|
+
var out = {};
|
|
368
|
+
var section = findSection(target, out);
|
|
369
|
+
if (!section) return;
|
|
370
|
+
|
|
371
|
+
var sectionIndex = out.sections.indexOf(section);
|
|
372
|
+
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
373
|
+
|
|
374
|
+
var c = COLORS[lastKind] || COLORS.normal;
|
|
375
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
376
|
+
highlight.style.background = c.active;
|
|
377
|
+
setTimeout(function() {
|
|
378
|
+
highlight.style.background = c.bg;
|
|
379
|
+
}, 400);
|
|
380
|
+
|
|
381
|
+
clickSeq++;
|
|
382
|
+
window.parent.postMessage({
|
|
383
|
+
type: "cms-editor::section-clicked",
|
|
384
|
+
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
385
|
+
}, "*");
|
|
386
|
+
};
|
|
387
|
+
document.addEventListener("click", clickHandler, true);
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Navigation is disabled while editing: leaving the page would leave the
|
|
391
|
+
* panel editing the previous page's sections. Only the default action of a
|
|
392
|
+
* real navigation is cancelled, never propagation — in-page controls must
|
|
393
|
+
* keep working (#5567).
|
|
394
|
+
*/
|
|
395
|
+
var isNavigatingAnchor = function(a) {
|
|
396
|
+
if (!a) return false;
|
|
397
|
+
var href = a.getAttribute("href");
|
|
398
|
+
if (!href) return false;
|
|
399
|
+
var trimmed = href.trim();
|
|
400
|
+
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
401
|
+
if (/^javascript:/i.test(trimmed)) return false;
|
|
402
|
+
// Same document + fragment only scrolls.
|
|
403
|
+
try {
|
|
404
|
+
var url = new URL(a.href, location.href);
|
|
405
|
+
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
406
|
+
} catch (_) {}
|
|
407
|
+
return true;
|
|
408
|
+
};
|
|
409
|
+
var navBlocker = function(e) {
|
|
410
|
+
var el = e.target;
|
|
411
|
+
var a = el && el.closest ? el.closest("a") : null;
|
|
412
|
+
if (!isNavigatingAnchor(a)) return;
|
|
413
|
+
e.preventDefault();
|
|
414
|
+
};
|
|
415
|
+
document.addEventListener("click", navBlocker, true);
|
|
416
|
+
|
|
417
|
+
var submitBlocker = function(e) { e.preventDefault(); };
|
|
418
|
+
document.addEventListener("submit", submitBlocker, true);
|
|
419
|
+
|
|
420
|
+
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
421
|
+
var renderCtrl = null;
|
|
422
|
+
var renderQueue = Promise.resolve();
|
|
423
|
+
var TRANSITION_TAG =
|
|
424
|
+
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
425
|
+
|
|
426
|
+
// A skipped view transition rejects its promises with "AbortError:
|
|
427
|
+
// Transition was skipped"; nobody else waits on them, so they are settled
|
|
428
|
+
// here rather than left as uncaught errors in the page's console.
|
|
429
|
+
var settleTransition = function(vt) {
|
|
430
|
+
if (!vt) return;
|
|
431
|
+
var ignore = function() {};
|
|
432
|
+
if (vt.ready) vt.ready.catch(ignore);
|
|
433
|
+
if (vt.updateCallbackDone) vt.updateCallbackDone.catch(ignore);
|
|
434
|
+
if (vt.finished) vt.finished.catch(ignore);
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// A site that opts into cross-document view transitions
|
|
438
|
+
// (@view-transition { navigation: auto }) gets one on every reload a save
|
|
439
|
+
// makes. When the next save navigates the frame before that transition
|
|
440
|
+
// starts, the browser skips it and rejects the outgoing page's ready
|
|
441
|
+
// promise, which only a pageswap listener can reach. Kept after deactivate:
|
|
442
|
+
// settling changes nothing else, and the frame may still navigate.
|
|
443
|
+
if (!window.__cmsEditorPageSwap) {
|
|
444
|
+
window.__cmsEditorPageSwap = true;
|
|
445
|
+
window.addEventListener("pageswap", function(e) {
|
|
446
|
+
settleTransition(e.viewTransition);
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// A quick second save skips the running transition. Only finished says
|
|
451
|
+
// when the swap is over, so the chain waits on it; the rest is settled.
|
|
452
|
+
var runSwapTransition = function(swap) {
|
|
453
|
+
if (typeof document.startViewTransition !== "function") {
|
|
454
|
+
swap();
|
|
455
|
+
return Promise.resolve();
|
|
456
|
+
}
|
|
457
|
+
var vt = document.startViewTransition(swap);
|
|
458
|
+
settleTransition(vt);
|
|
459
|
+
return vt.finished;
|
|
460
|
+
};
|
|
461
|
+
var renderInPlace = function(src, body) {
|
|
462
|
+
if (renderCtrl) renderCtrl.abort();
|
|
463
|
+
var ctrl = new AbortController();
|
|
464
|
+
renderCtrl = ctrl;
|
|
465
|
+
renderPending = true;
|
|
466
|
+
highlight.style.display = "none";
|
|
467
|
+
badge.style.display = "none";
|
|
468
|
+
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
469
|
+
renderQueue = renderQueue.then(function() {
|
|
470
|
+
return fetch(src, {
|
|
471
|
+
method: "POST",
|
|
472
|
+
body: body,
|
|
473
|
+
signal: ctrl.signal,
|
|
474
|
+
headers: { accept: "text/html", "content-type": "application/json" }
|
|
475
|
+
}).then(function(res) {
|
|
476
|
+
if (!res.ok) throw new Error("render " + res.status);
|
|
477
|
+
return res.text();
|
|
478
|
+
}).then(function(html) {
|
|
479
|
+
var swap = function() {
|
|
480
|
+
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
481
|
+
document.body.appendChild(highlight);
|
|
482
|
+
document.body.appendChild(badge);
|
|
483
|
+
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
484
|
+
highlight.style.display = "none";
|
|
485
|
+
badge.style.display = "none";
|
|
486
|
+
lastSection = null;
|
|
487
|
+
};
|
|
488
|
+
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
489
|
+
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
490
|
+
var sheets = Array.prototype.map.call(
|
|
491
|
+
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
492
|
+
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
493
|
+
);
|
|
494
|
+
return Promise.all(sheets).then(function() {
|
|
495
|
+
return runSwapTransition(swap);
|
|
496
|
+
});
|
|
497
|
+
}).then(function() {
|
|
498
|
+
var t = document.getElementById("deco-disable-transitions");
|
|
499
|
+
if (t) t.remove();
|
|
500
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
501
|
+
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
502
|
+
}).catch(function(err) {
|
|
503
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
504
|
+
if (err && err.name === "AbortError") return;
|
|
505
|
+
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
window.addEventListener("message", function(e) {
|
|
511
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
512
|
+
if (e.source !== window.parent) return;
|
|
513
|
+
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
514
|
+
renderInPlace(e.data.src, e.data.body);
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
518
|
+
sectionLabels = e.data.labels;
|
|
519
|
+
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
520
|
+
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
521
|
+
if (lastSection) {
|
|
522
|
+
lastLabel = labelFor(lastSection);
|
|
523
|
+
lastKind = kindFor(lastSection);
|
|
524
|
+
applyColor(lastKind);
|
|
525
|
+
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
526
|
+
}
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
530
|
+
if (e.data && e.data.type === "cms-editor::clear-hover") {
|
|
531
|
+
highlight.style.display = "none";
|
|
532
|
+
badge.style.display = "none";
|
|
533
|
+
lastSection = null;
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
537
|
+
highlight.remove();
|
|
538
|
+
badge.remove();
|
|
539
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
540
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
541
|
+
document.removeEventListener("click", clickHandler, true);
|
|
542
|
+
// Or the page stays unnavigable after leaving Blocks mode.
|
|
543
|
+
document.removeEventListener("click", navBlocker, true);
|
|
544
|
+
document.removeEventListener("submit", submitBlocker, true);
|
|
545
|
+
window.removeEventListener("scroll", reposition, { capture: true });
|
|
546
|
+
window.removeEventListener("resize", reposition);
|
|
547
|
+
window.__cmsEditorActive = false;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
})();`;function Rn(t,e,n=!1){let r=t,i=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let u=0;i&&u<5;u++){const a=e[i];if(a&&typeof a=="object"&&"__resolveType"in a){const o=a.__resolveType;if(typeof o=="string"&&o&&o!==i){r=a,i=o;continue}}break}if(!i)return[];if(i.includes("flags/multivariate")||n&&Ci(i,n)){const u=Array.isArray(r.variants)?r.variants:[];if(u.length===0||u.every(l=>{const c=l?.rule;return Ri(c?.__resolveType,n)}))return null;const o=[];for(const l of u){const c=Li(l,n);if(c&&typeof c=="object")for(const p of Rn(c,e,n)??[])o.includes(p)||o.push(p)}return o}if(Ai(i)){const u=r.section&&typeof r.section=="object"?Rn(r.section,e,n):[];return u===null?null:u.length?[i,...u]:[i]}return[i]}function Xe(t){return t.replace(/[`*_]/g,"\\$&")}function zo(t,e){const n=[`The user selected an element on the live preview and asked: **"${Xe(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&&n.push(`**Section resolveType:** \`${Xe(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 r=`<${t.tag}${t.classes?` class="${Xe(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Xe(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Xe(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Xe(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
551
|
+
`)}function Ko(t,e,n=320,r=44,i=12){const{x:u,y:a}=t,{width:o,height:l}=e,c=Math.max(i,Math.min(u-n/2,o-n-i)),m=a/l>.68?Math.max(i,a-r-18):Math.min(a+18,l-r-i);return{leftPct:c/o*100,topPct:m/l*100}}function Io(t){const e=ce.c(45),{element:n,onDismiss:r}=t,[i,u]=P.useState(""),a=P.useRef(null),{sendMessage:o}=Ta(),{openSidePanel:l}=qi(),c=Te();let p;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==l||e[4]!==o?(p=()=>{if(!i.trim())return;const M=zo(n,i);l(),o({parts:[{type:"text",text:M}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=l,e[4]=o,e[5]=p):p=e[5];const m=p;let f;e[6]!==n.position||e[7]!==n.viewport?(f=Ko(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=f):f=e[8];const x=f,b=`${x.leftPct}%`,j=`${x.topPct}%`;let g;e[9]!==b||e[10]!==j?(g={left:b,top:j,width:"320px"},e[9]=b,e[10]=j,e[11]=g):g=e[11];let k;e[12]!==m?(k=M=>{M.preventDefault(),m()},e[12]=m,e[13]=k):k=e[13];let E;e[14]===Symbol.for("react.memo_cache_sentinel")?(E=M=>u(M.target.value),e[14]=E):E=e[14];let y;e[15]!==r?(y=M=>{M.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let v;e[17]!==c?(v=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=v):v=e[18];let w;e[19]!==i||e[20]!==y||e[21]!==v?(w=s.jsx("input",{ref:a,autoFocus:!0,type:"text",value:i,onChange:E,onKeyDown:y,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=v,e[22]=w):w=e[22];let T;e[23]!==i?(T=i.trim(),e[23]=i,e[24]=T):T=e[24];const S=!T;let N;e[25]!==c?(N=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=N):N=e[26];let O;e[27]!==c?(O=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=O):O=e[28];let R;e[29]!==O?(R=s.jsx("title",{children:O}),e[29]=O,e[30]=R):R=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=_):_=e[31];let A;e[32]!==R?(A=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[R,_]}),e[32]=R,e[33]=A):A=e[33];let B;e[34]!==S||e[35]!==N||e[36]!==A?(B=s.jsx("button",{type:"submit",disabled:S,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:N,children:A}),e[34]=S,e[35]=N,e[36]=A,e[37]=B):B=e[37];let L;e[38]!==w||e[39]!==B||e[40]!==k?(L=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:k,children:[w,B]}),e[38]=w,e[39]=B,e[40]=k,e[41]=L):L=e[41];let U;return e[42]!==L||e[43]!==g?(U=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:L}),e[42]=L,e[43]=g,e[44]=U):U=e[44],U}const Bs="site-links",Uo=/details?page|\bpdp\b/i,Ho=/listingpage|\bplp\b/i;function Vo(t,e,n){const r=new Set;for(const o of n)Uo.test(o)&&r.add("product"),Ho.test(o)&&r.add("category");const i=xt(Bn(t)),u=i[i.length-1],a=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&a?.type==="param"&&a.name===e&&r.add("product"),e==="*"&&i.some(o=>o.type==="param"&&o.name==="*")&&r.add("category"),r}const qo=["rosa","preto","pink","black"];function $t(t,e){const n=e.trim();return n?t(n):qo.flatMap(r=>t(r))}function Wo(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const yr=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Fn(t){return t.split("/")[0]??""}function Go(t){const e=new Set;for(const n of t){const r=Fn(n);yr.has(r)&&e.add(r)}return e}function Jo(t,e){const n=Fn(t);return!yr.has(n)||e.size===0?!0:e.has(n)}const Yo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>$t(n=>Wo(t,n),e),optionsFromPayload:zt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>$t(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:zt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>$t(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:zt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>$t(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:zt},{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:sl}];function Qo(t,e,n=new Set){const r=[...e],i=o=>{const l=[];for(const c of Yo){if(c.kind!==o)continue;const p=r.find(m=>c.test(m)&&Jo(m,n));p&&l.push({cand:c,resolveType:p})}return l.find(c=>n.has(Fn(c.resolveType)))??l[0]},u=(o,l,c)=>({kind:o.kind,id:`${o.kind}:${l}`,resolveType:l,clientFilter:o.clientFilter,isFallback:c,buildRequests:p=>o.buildRequests(l,p),optionsFromPayload:o.optionsFromPayload}),a=[];for(const o of["product","category"]){if(!t.has(o))continue;const l=i(o);l&&a.push(u(l.cand,l.resolveType,!1))}return t.size>0&&a.push(Xo(t.has("category")?"category":"product")),a}function Xo(t){return{kind:t,id:Bs,resolveType:Bs,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>ll(e,n)}}function He(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Zo(t,e,n){const r=new Set,i=new Set,u=a=>{if(Array.isArray(a)){for(const c of a)u(c);return}const o=He(a);if(!o)return;const l=o.__resolveType;if(typeof l=="string"){if(n(l))r.add(l);else if(l in e&&!i.has(l)){i.add(l);const c=He(e[l])?.__resolveType;typeof c=="string"&&n(c)&&r.add(l),u(e[l])}}for(const c of Object.values(o))u(c)};return u(t),r}function wr(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function kr(t){try{return decodeURIComponent(t)}catch{return t}}function el(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tl(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=el(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function Sr(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=xt(Bn(e)),{pattern:u,order:a}=tl(i),o=a.indexOf(n);if(o===-1)return null;const l=r.match(u);if(!l)return null;const c=l[o+1]?.replace(/^\/+|\/+$/g,"");return c?kr(c):null}function zt(t,e){const n=He(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const a of r){const o=He(a);if(!o)continue;const l=Sr(o.url,e.template,e.paramName);if(!l||u.has(l))continue;u.add(l);const c=He(o.isVariantOf),p=typeof c?.name=="string"&&c.name||typeof o.name=="string"&&o.name||l,m=Array.isArray(o.image)?He(o.image[0]):null,f=typeof m?.url=="string"?m.url:void 0;i.push({value:l,label:p,image:f})}return i}function nl(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?kr(n):null}function sl(t){const e=[],n=new Set,r=(i,u)=>{const a=He(i);if(!a)return;const o=typeof a.name=="string"&&a.name?a.name:"",l=o?[...u,o]:u,c=nl(a.url);if(c&&!n.has(c)&&(n.add(c),e.push({value:c,label:l.join(" › ")||c})),Array.isArray(a.children))for(const p of a.children)r(p,l)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const rl=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 al(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function il(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",a=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:a})}return e}function ol(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,a=0;for(;(u=r.exec(t))!==null&&a++<3e3;){const o=(u[1]??"").replace(/\\\//g,"/");if(!o||n.has(o))continue;n.add(o);const l=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:o,name:u[2]??"",image:l||void 0})}return e}function ll(t,e){const n=[],r=new Set,i=(u,a,o,l)=>{if(n.length>=200)return;const c=Sr(u,e.template,e.paramName);!c||r.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||o==="category"&&rl.has(c.split("/")[0]??"")||(r.add(c),n.push({value:c,label:a&&a.length<=80?a:al(c),kind:o,image:l}))};for(const{url:u,name:a,image:o}of ol(t))i(u,a,"product",o);for(const{href:u,text:a}of il(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,a,"category");return n}function mt(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const Pr=1e4;function cl(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 dl(t,{resolveType:e,props:n}){const r=await fetch(ei(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(Pr)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Fs(t,e){const n=await fetch(ti(t,e),{signal:AbortSignal.timeout(Pr)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function ul(t,e,n){const r=e.optionsFromPayload(await Fs(t,"/"),n),i=r.find(a=>a.kind==="category");if(!i)return r;const u=ze(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const a=e.optionsFromPayload(await Fs(t,u),n).filter(o=>o.kind==="product");return wr([r,a])}catch{return r}}function fl(t,e,n){return Ws.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function ml(t,e,n,r){if(e.homepageLinks)return ul(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(o=>dl(t,o))),a=u.filter(o=>o.status==="fulfilled").map(o=>o.value);if(a.length===0){const o=u.find(l=>l.status==="rejected");throw o?o.reason:new Error("Failed to fetch options")}return wr(a.map(o=>e.optionsFromPayload(o,r)))}function Ln(t,e,n,r,i){return{queryKey:fl(t,e,n),queryFn:()=>ml(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function pt(t){const e=ce.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:a,keyPrefix:o,onSelect:l}=t;if(i.length===0)return null;let c;if(e[0]!==r||e[1]!==o||e[2]!==l||e[3]!==i||e[4]!==a||e[5]!==u){let m;e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==a||e[11]!==u?(m=f=>s.jsxs(vt,{value:`${o}:${f.value}`,className:"gap-3 py-2",onSelect:()=>l(f.value),children:[r==="product"&&s.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?s.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(er,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:f.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:ze(u,{[a]:f.value})})]})]},`${o}:${f.value}`),e[7]=r,e[8]=o,e[9]=l,e[10]=a,e[11]=u,e[12]=m):m=e[12],c=i.map(m),e[0]=r,e[1]=o,e[2]=l,e[3]=i,e[4]=a,e[5]=u,e[6]=c}else c=e[6];let p;return e[13]!==n||e[14]!==c?(p=s.jsx(gt,{heading:n,children:c}),e[13]=n,e[14]=c,e[15]=p):p=e[15],p}function Ms(t){const e=ce.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function pl(t){const e=ce.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:a,onCommit:o}=t,l=Te(),[c,p]=P.useState(!1),[m,f]=P.useState(""),[x,b]=P.useState(""),j=P.useRef(null),g=i==="*"?l("sandbox.preview.catchAllParamLabel"):`:${i}`,k=cl(l),y=[...new Set(n.map(Q=>k[Q.kind].noun))].join(" or ");let v;e[0]!==l||e[1]!==y?(v=l("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=l,e[1]=y,e[2]=v):v=e[2];const w=v,T={template:r,paramName:i};let S;e[3]!==m?(S=(Q,se)=>({source:Q,query:se,options:Q.clientFilter?mt(se.data??[],m):se.data??[]}),e[3]=m,e[4]=S):S=e[4];const N=S,O=n.filter(kl),R=n.filter(wl),_=Cn({queries:O.map(Q=>Ln(a,Q,x,T,c))});let A;e[5]!==_||e[6]!==N?(A=(Q,se)=>N(Q,_[se]),e[5]=_,e[6]=N,e[7]=A):A=e[7];const B=O.map(A),L=B.length===0||B.every(yl),U=Cn({queries:R.map(Q=>Ln(a,Q,x,T,c&&L))});let M;e[8]!==U||e[9]!==N?(M=(Q,se)=>N(Q,U[se]),e[8]=U,e[9]=N,e[10]=M):M=e[10];const G=R.map(M),H=L?G:B,W=H.length===1&&H[0]?.source.homepageLinks?H[0]:null,J=W&&!W.query.isLoading&&!W.query.isError?W?.query.data??[]:[],ae=mt(J.filter(bl),m),C=mt(J.filter(xl),m),q=ae.length>0&&C.length>0,z=Q=>{p(Q),j.current&&clearTimeout(j.current),f(Q?u:""),b(Q?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>{f(Q),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{b(Q)},300)},e[11]=X):X=e[11];const F=X,Y=Q=>{o(Q),z(!1)},Z=fr(m),K=ze(r,{[i]:Z}),ie=qs,ne=Vs,ee="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",le=vl;let pe;e[12]!==g||e[13]!==l?(pe=l("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=l,e[14]=pe):pe=e[14];let de;e[15]!==pe?(de=s.jsx(Gs,{className:"sr-only",children:s.jsx(Js,{children:pe})}),e[15]=pe,e[16]=de):de=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(er,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ue;e[18]!==l?(ue=l("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=l,e[19]=ue):ue=e[19];let Pe;e[20]!==g?(Pe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-xs text-special",children:g}),e[20]=g,e[21]=Pe):Pe=e[21];let ye;e[22]!==ue||e[23]!==Pe?(ye=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ue," ",Pe]})]}),e[22]=ue,e[23]=Pe,e[24]=ye):ye=e[24];const we=ar,De=!1,nt="min-h-0 flex-1";let fe;e[25]!==w||e[26]!==m?(fe=s.jsx(ir,{autoFocus:!0,placeholder:w,value:m,onValueChange:F}),e[25]=w,e[26]=m,e[27]=fe):fe=e[27];const Le=rr,Be="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Fe;e[28]!==l?(Fe=l("sandbox.pathParamPickerChip.noResults"),e[28]=l,e[29]=Fe):Fe=e[29];let Ae;e[30]!==Fe?(Ae=s.jsx(or,{children:Fe}),e[30]=Fe,e[31]=Ae):Ae=e[31];const st=Z&&s.jsx(gt,{className:"shrink-0",children:s.jsxs(vt,{value:`__raw__:${Z}`,className:"gap-3 py-2",onSelect:()=>Y(Z),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(Gi,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:l("sandbox.pathParamPickerChip.useRawValue",{rawTerm:Z,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:K})]})]})}),Ve=q?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(pt,{heading:k.category.heading,iconKind:"category",options:ae,template:r,paramName:i,keyPrefix:`${W?.source.id}:cat`,onSelect:Y})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(pt,{heading:k.product.heading,iconKind:"product",options:C,template:r,paramName:i,keyPrefix:`${W?.source.id}:prod`,onSelect:Y})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:H.map(Q=>{const{source:se,query:ve,options:$e}=Q,{noun:rt}=k[se.kind];if(ve.isLoading)return s.jsx(Ms,{text:l("sandbox.pathParamPickerChip.loading",{noun:rt})},se.id);if(ve.isError)return s.jsx(Ms,{text:l("sandbox.pathParamPickerChip.couldNotLoad")},se.id);if(se.homepageLinks){const qe=ve.data??[];return s.jsxs(P.Fragment,{children:[s.jsx(pt,{heading:k.category.heading,iconKind:"category",options:mt(qe.filter(gl),m),template:r,paramName:i,keyPrefix:`${se.id}:cat`,onSelect:Y}),s.jsx(pt,{heading:k.product.heading,iconKind:"product",options:mt(qe.filter(hl),m),template:r,paramName:i,keyPrefix:`${se.id}:prod`,onSelect:Y})]},se.id)}return s.jsx(pt,{heading:H.length>1?k[se.kind].heading:void 0,iconKind:se.kind,options:$e,template:r,paramName:i,keyPrefix:se.id,onSelect:Y},se.id)})});let oe;e[32]!==Le||e[33]!==Ae||e[34]!==st||e[35]!==Ve?(oe=s.jsxs(Le,{className:Be,children:[Ae,st,Ve]}),e[32]=Le,e[33]=Ae,e[34]=st,e[35]=Ve,e[36]=oe):oe=e[36];let je;e[37]!==we||e[38]!==fe||e[39]!==oe?(je=s.jsxs(we,{shouldFilter:De,className:nt,children:[fe,oe]}),e[37]=we,e[38]=fe,e[39]=oe,e[40]=je):je=e[40];let Ce;e[41]!==ne||e[42]!==de||e[43]!==ye||e[44]!==je||e[45]!==le?(Ce=s.jsxs(ne,{className:ee,onClick:le,children:[de,ye,je]}),e[41]=ne,e[42]=de,e[43]=ye,e[44]=je,e[45]=le,e[46]=Ce):Ce=e[46];let Me;return e[47]!==ie||e[48]!==z||e[49]!==c||e[50]!==Ce?(Me=s.jsx(ie,{open:c,onOpenChange:z,children:Ce}),e[47]=ie,e[48]=z,e[49]=c,e[50]=Ce,e[51]=Me):Me=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:l("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-xs text-special hover:bg-special/25",onClick:Q=>{Q.stopPropagation(),z(!0)},children:u||g}),Me]})}function hl(t){return t.kind==="product"}function gl(t){return t.kind!=="product"}function vl(t){return t.stopPropagation()}function xl(t){return t.kind==="product"}function bl(t){return t.kind!=="product"}function yl(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function wl(t){return t.isFallback}function kl(t){return!t.isFallback}function Sl(t){const e=ce.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:a}=t;let o,l;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const x={template:r,paramName:i},b=n.filter(Pl);l=Cn,o=b.map(j=>Ln(u,j,"",x,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=o,e[5]=l}else o=e[4],l=e[5];let c;e[6]!==o?(c={queries:o},e[6]=o,e[7]=c):c=e[7];const p=l(c),[m,f]=P.useState(!1);if(!m)for(const x of p){if(x.isLoading)break;const b=x.data?.[0];if(b){f(!0),queueMicrotask(()=>a(b.value));break}}return null}function Pl(t){return!t.isFallback}function jl(t){const e=ce.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[a,o]=P.useState(r),[l,c]=P.useState(!1),p=P.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const f=m,x=a||f;let b;e[3]!==x?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-xs",children:x}),e[3]=x,e[4]=b):b=e[4];let j;e[5]!==f||e[6]!==u?(j=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=j):j=e[7];let g,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=N=>o(N.target.value),k=()=>c(!0),e[8]=g,e[9]=k):(g=e[8],k=e[9]);let E;e[10]!==r?(E=N=>{N.key==="Enter"&&N.currentTarget.blur(),N.key==="Escape"&&(p.current=!0,o(r),N.currentTarget.blur())},e[10]=r,e[11]=E):E=e[11];let y;e[12]!==a||e[13]!==i||e[14]!==r?(y=()=>{if(c(!1),p.current){p.current=!1;return}const N=fr(a);o(N),N!==r&&i(N)},e[12]=a,e[13]=i,e[14]=r,e[15]=y):y=e[15];let v;e[16]!==a||e[17]!==f||e[18]!==j||e[19]!==E||e[20]!==y?(v=s.jsx("input",{type:"text",value:a,placeholder:f,title:j,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-xs text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:El,onChange:g,onFocus:k,onKeyDown:E,onBlur:y}),e[16]=a,e[17]=f,e[18]=j,e[19]=E,e[20]=y,e[21]=v):v=e[21];let w;e[22]!==b||e[23]!==v?(w=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,v]}),e[22]=b,e[23]=v,e[24]=w):w=e[24];let T;e[25]!==l||e[26]!==u?(T=l&&s.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-2xs text-muted-foreground",children:[s.jsx(Da,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=l,e[26]=u,e[27]=T):T=e[27];let S;return e[28]!==T||e[29]!==w?(S=s.jsxs(s.Fragment,{children:[w,T]}),e[28]=T,e[29]=w,e[30]=S):S=e[30],S}function El(t){return t.stopPropagation()}function Nl(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function Tl(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function Cl(t){return t.showPreviewToolbar&&t.contentEditingEnabled}class jr extends Error{constructor(){super("The site's schema isn't loaded yet"),this.name="PageSchemaNotReadyError"}}async function Rl(t,e){if(t)return t;const n=await e?.().catch(()=>null);if(!n)throw new jr;return n}async function Ll(t,e,n){return n?gs(t,e,await Rl(n.meta,n.loadMeta)):gs(t,e)}function Al(t){const e=ce.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=Ys(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:a,path:o,template:l,schema:c}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const p=va(a),m=l?{...l,name:a,path:o}:await Ll(a,o,c);return await r.mutateAsync({blockKey:p,data:m}),{key:p,name:a,path:o}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],la(i)}function _l(t){const e=ce.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:a,onSubmit:o}=t,l=i===void 0?!1:i,c=Te();let p;e[0]!==c?(p=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=p):p=e[1];const[m,f]=P.useState(p);let x;e[2]!==c?(x=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=x):x=e[3];const[b,j]=P.useState(x),[g,k]=P.useState(kn),[E,y]=P.useState(null),[v,w]=P.useState(n);n!==v&&(w(n),n&&(f(c("sectionsEditor.createPageModal.defaultPageName")),j(c("sectionsEditor.createPageModal.defaultPagePath")),k(kn),y(null)));const T=!!a?.length;let S;e[4]!==l||e[5]!==r?(S=ue=>{!ue&&!l&&(y(null),r(!1))},e[4]=l,e[5]=r,e[6]=S):S=e[6];const N=S;let O;e[7]!==l||e[8]!==m||e[9]!==o||e[10]!==b||e[11]!==T||e[12]!==g?(O=async ue=>{ue.preventDefault();const Pe=m.trim(),ye=b.trim();if(!Pe||!ye||l)return;const we=mr(ye);if(we){y(we);return}y(null),await o({name:Pe,path:ye,templateKey:T&&g!==kn?g:null})},e[7]=l,e[8]=m,e[9]=o,e[10]=b,e[11]=T,e[12]=g,e[13]=O):O=e[13];const R=O,_=E??u;let A;e[14]!==c?(A=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=A):A=e[15];let B;e[16]!==A?(B=s.jsx(Gs,{children:s.jsx(Js,{children:A})}),e[16]=A,e[17]=B):B=e[17];let L;e[18]!==c?(L=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=L):L=e[19];let U;e[20]!==L?(U=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:L}),e[20]=L,e[21]=U):U=e[21];let M;e[22]===Symbol.for("react.memo_cache_sentinel")?(M=ue=>f(ue.target.value),e[22]=M):M=e[22];let G;e[23]!==c?(G=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=G):G=e[24];let H;e[25]!==l||e[26]!==m||e[27]!==G?(H=s.jsx(Tn,{id:"new-page-name",value:m,onChange:M,placeholder:G,autoFocus:!0,disabled:l}),e[25]=l,e[26]=m,e[27]=G,e[28]=H):H=e[28];let W;e[29]!==H||e[30]!==U?(W=s.jsxs("div",{className:"space-y-1.5",children:[U,H]}),e[29]=H,e[30]=U,e[31]=W):W=e[31];let V;e[32]!==c?(V=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=V):V=e[33];let J;e[34]!==V?(J=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:V}),e[34]=V,e[35]=J):J=e[35];let ae;e[36]===Symbol.for("react.memo_cache_sentinel")?(ae=ue=>j(ue.target.value),e[36]=ae):ae=e[36];let C;e[37]!==c?(C=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=C):C=e[38];let q;e[39]!==l||e[40]!==b||e[41]!==C?(q=s.jsx(Tn,{id:"new-page-path",value:b,onChange:ae,placeholder:C,disabled:l}),e[39]=l,e[40]=b,e[41]=C,e[42]=q):q=e[42];let z;e[43]!==J||e[44]!==q?(z=s.jsxs("div",{className:"space-y-1.5",children:[J,q]}),e[43]=J,e[44]=q,e[45]=z):z=e[45];let X;e[46]!==l||e[47]!==T||e[48]!==c||e[49]!==g||e[50]!==a?(X=T&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),s.jsx(xa,{id:"new-page-template",value:g,onChange:k,templates:a??[],disabled:l})]}),e[46]=l,e[47]=T,e[48]=c,e[49]=g,e[50]=a,e[51]=X):X=e[51];let F;e[52]!==_?(F=_&&s.jsx("p",{className:"text-xs text-destructive",children:_}),e[52]=_,e[53]=F):F=e[53];let Y;e[54]!==W||e[55]!==z||e[56]!==X||e[57]!==F?(Y=s.jsxs("div",{className:"space-y-4 py-4",children:[W,z,X,F]}),e[54]=W,e[55]=z,e[56]=X,e[57]=F,e[58]=Y):Y=e[58];let Z;e[59]!==r?(Z=()=>r(!1),e[59]=r,e[60]=Z):Z=e[60];let K;e[61]!==c?(K=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=K):K=e[62];let ie;e[63]!==l||e[64]!==Z||e[65]!==K?(ie=s.jsx(Ke,{type:"button",variant:"outline",onClick:Z,disabled:l,children:K}),e[63]=l,e[64]=Z,e[65]=K,e[66]=ie):ie=e[66];let ne;e[67]!==l||e[68]!==m||e[69]!==b?(ne=!m.trim()||!b.trim()||l,e[67]=l,e[68]=m,e[69]=b,e[70]=ne):ne=e[70];let ee;e[71]!==l||e[72]!==c?(ee=l?s.jsxs(s.Fragment,{children:[s.jsx(bt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=l,e[72]=c,e[73]=ee):ee=e[73];let le;e[74]!==ne||e[75]!==ee?(le=s.jsx(Ke,{type:"submit",disabled:ne,children:ee}),e[74]=ne,e[75]=ee,e[76]=le):le=e[76];let pe;e[77]!==ie||e[78]!==le?(pe=s.jsxs(ca,{children:[ie,le]}),e[77]=ie,e[78]=le,e[79]=pe):pe=e[79];let de;e[80]!==R||e[81]!==Y||e[82]!==pe||e[83]!==B?(de=s.jsx(Vs,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[B,Y,pe]})}),e[80]=R,e[81]=Y,e[82]=pe,e[83]=B,e[84]=de):de=e[84];let be;return e[85]!==N||e[86]!==n||e[87]!==de?(be=s.jsx(qs,{open:n,onOpenChange:N,children:de}),e[85]=N,e[86]=n,e[87]=de,e[88]=be):be=e[88],be}function Ol(t){const e=ce.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:a,decofile:o,blockKey:l}=t,c=Te();let p;e[0]!==i||e[1]!==n||e[2]!==r?(p={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=p):p=e[3];const m=Ys(p);let f;e[4]!==m?(f=wa((w,T)=>m.mutate({blockKey:w,data:T})),e[4]=m,e[5]=f):f=e[5];const x=f;let b;e[6]!==l||e[7]!==o?(b=ba(o,l),e[6]=l,e[7]=o,e[8]=b):b=e[8];const{resolveType:j,props:g,title:k}=b;if(!j){let w;e[9]!==c?(w=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=w):w=e[10];let T;return e[11]!==w?(T=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:w}),e[11]=w,e[12]=T):T=e[12],T}const E=`loader:${l}`;let y;e[13]!==l||e[14]!==j||e[15]!==k?(y={mode:"saved",blockKey:l,resolveType:j,title:k},e[13]=l,e[14]=j,e[15]=k,e[16]=y):y=e[16];let v;return e[17]!==i||e[18]!==o||e[19]!==a||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==m.isPending||e[24]!==x||e[25]!==E||e[26]!==y||e[27]!==r?(v=s.jsx(ya,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:a,decofile:o,kind:"loaders",target:y,initialValue:g,isCreating:m.isPending,onCreate:Dl,onSaveReferencedBlock:x,showRun:!1},E),e[17]=i,e[18]=o,e[19]=a,e[20]=n,e[21]=u,e[22]=g,e[23]=m.isPending,e[24]=x,e[25]=E,e[26]=y,e[27]=r,e[28]=v):v=e[28],v}async function Dl(){}function Bl(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function $s(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:Bl(t.error)}}function Fl(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 Ml(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=Fl(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?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 $l=P.lazy(()=>da(()=>import("./sections-editor-Cs3VV_t6.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,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178])).then(t=>({default:t.SectionsEditor})));function zs(t){const e=ce.c(60),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:a}=An(),{currentBranch:o,taskId:l}=Jt(),c=hr(),p=_n(),m=gr(),f=c.lifecycle.phase==="running",x=p.previewUrl;let b;e[0]!==o||e[1]!==a||e[2]!==x||e[3]!==l||e[4]!==n?(b=o?{orgSlug:a.slug,virtualMcpId:n,branch:o,threadId:l??null,previewUrl:x}:null,e[0]=o,e[1]=a,e[2]=x,e[3]=l,e[4]=n,e[5]=b):b=e[5];const j=b,g=On(n,o);let k;e[6]!==f?(k={fetchEnabled:f},e[6]=f,e[7]=k):k=e[7];const E=Dn(j,k);let y;e[8]!==f?(y={fetchEnabled:f},e[8]=f,e[9]=y):y=e[9];const v=ur(j,y),w=Ml({lifecyclePhase:c.lifecycle.phase,decofile:$s(E),meta:$s(v),hasEditableContent:_i(E.data,v.data),fastPreviewActive:lr(n).runtime==="cms"||Ze(g)}),T=Qs()===void 0,S=zl;if(xi(g)){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=S(s.jsx(yi,{})),e[10]=C):C=e[10],C}if(g.kind==="pending"&&g.retrying){let C;return e[11]!==g?(C=S(s.jsx(wi,{backend:g})),e[11]=g,e[12]=C):C=e[12],C}if(w.kind==="loading"||T){let C;return e[13]===Symbol.for("react.memo_cache_sentinel")?(C=S(s.jsx(ua,{})),e[13]=C):C=e[13],C}if(E.data&&ni(v.data)){const C=m.state.target,q=C?.kind==="page"||C?.kind==="section"?C.key:null,z=q??"",X=o??"";let F;return e[14]!==E.data||e[15]!==q||e[16]!==a.slug||e[17]!==z||e[18]!==X||e[19]!==n?(F=S(s.jsx(ka,{orgSlug:a.slug,virtualMcpId:n,branch:X,decofile:E.data,initialKey:q,compact:!0},z)),e[14]=E.data,e[15]=q,e[16]=a.slug,e[17]=z,e[18]=X,e[19]=n,e[20]=F):F=e[20],F}if(w.kind==="empty"){let C;return e[21]===Symbol.for("react.memo_cache_sentinel")?(C=S(s.jsx(ki,{})),e[21]=C):C=e[21],C}if(w.kind==="error"){let C;e[22]!==E||e[23]!==p||e[24]!==v||e[25]!==w.source?(C=()=>{if(w.source==="sandbox"){p.retry();return}Promise.all([E.refetch(),v.refetch()])},e[22]=E,e[23]=p,e[24]=v,e[25]=w.source,e[26]=C):C=e[26];const q=C;let z;return e[27]!==q||e[28]!==w.source?(z=S(s.jsx(bi,{source:w.source,onRetry:q})),e[27]=q,e[28]=w.source,e[29]=z):z=e[29],z}let N;e[30]===Symbol.for("react.memo_cache_sentinel")?(N=C=>S(s.jsx("div",{className:"h-full min-h-0",children:C})),e[30]=N):N=e[30];const O=N,R=m.state.target;if(R?.kind==="loader"&&E.data&&v.data){const C=o??"",q=x??null;let z;return e[31]!==E.data||e[32]!==v.data||e[33]!==a.slug||e[34]!==C||e[35]!==q||e[36]!==R.key||e[37]!==n?(z=O(s.jsx(Ol,{orgSlug:a.slug,virtualMcpId:n,branch:C,previewUrl:q,meta:v.data,decofile:E.data,blockKey:R.key})),e[31]=E.data,e[32]=v.data,e[33]=a.slug,e[34]=C,e[35]=q,e[36]=R.key,e[37]=n,e[38]=z):z=e[38],z}let _;e[39]!==o||e[40]!==a.slug||e[41]!==R||e[42]!==n?(_=R||!o?null:Xs(Zs(a.slug,n,o)),e[39]=o,e[40]=a.slug,e[41]=R,e[42]=n,e[43]=_):_=e[43];const A=_;let B="/",L=null,U=null;R?.kind==="page"?(B=R.path,L=R.key):R?.kind==="section"?U=R.key:A&&(B=A.path,L=A.pageKey);const M=L?`page:${L}`:U?`section:${U}`:`path:${B}`;let G;e[44]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(bt,{className:"size-5 text-muted-foreground"})}),e[44]=G):G=e[44];const H=o??"",W=x??void 0,V=U?null:u,J=!!L&&m.state.editSeoPageKey===L;let ae;return e[45]!==U||e[46]!==L||e[47]!==B||e[48]!==M||e[49]!==i||e[50]!==a.slug||e[51]!==V||e[52]!==J||e[53]!==H||e[54]!==W||e[55]!==n||e[56]!==m.consumeEditSeo||e[57]!==m.setFocusedBlock||e[58]!==m.setVariantOverride?(ae=O(s.jsx(P.Suspense,{fallback:G,children:s.jsx($l,{orgSlug:a.slug,virtualMcpId:n,branch:H,previewReady:!0,previewUrl:W,currentPath:B,activePageBlockKey:L,activeGlobalBlockKey:U,externalSelection:V,initialEditSeo:J,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},M)})),e[45]=U,e[46]=L,e[47]=B,e[48]=M,e[49]=i,e[50]=a.slug,e[51]=V,e[52]=J,e[53]=H,e[54]=W,e[55]=n,e[56]=m.consumeEditSeo,e[57]=m.setFocusedBlock,e[58]=m.setVariantOverride,e[59]=ae):ae=e[59],ae}function zl(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Ks(t){const e=ce.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,a=Te(),o=Qs(),l=o===!0,c=si(n);let p;e[0]!==c||e[1]!==r?(p=ri(c,Yi(r)),e[0]=c,e[1]=r,e[2]=p):p=e[2];const m=p,{org:f}=An(),{currentBranch:x,taskId:b}=Jt(),g=_n().previewUrl;let k;e[3]!==x||e[4]!==f.slug||e[5]!==g||e[6]!==b||e[7]!==n?(k=x?{orgSlug:f.slug,virtualMcpId:n,branch:x,threadId:b??null,previewUrl:g}:null,e[3]=x,e[4]=f.slug,e[5]=g,e[6]=b,e[7]=n,e[8]=k):k=e[8];const y=Dn(k),v=x??"";let w;e[9]!==f.slug||e[10]!==v||e[11]!==n?(w={orgSlug:f.slug,virtualMcpId:n,branch:v},e[9]=f.slug,e[10]=v,e[11]=n,e[12]=w):w=e[12];const{save:T,flush:S}=Sa(w),N=y.data?.[r],O=y.data===void 0&&y.isLoading||o===void 0,R=y.data!==void 0&&N===void 0,_=!x||R||O;let A;e[13]!==N?(A=N===void 0?"":JSON.stringify(N,null,2),e[13]=N,e[14]=A):A=e[14];const B=A;let L;e[15]!==r||e[16]!==_||e[17]!==T?(L=V=>{if(_)return;let J;try{J=JSON.parse(V)}catch{return}J===null||typeof J!="object"||Array.isArray(J)||T(r,J)},e[15]=r,e[16]=_,e[17]=T,e[18]=L):L=e[18];const U=L;let M;e[19]!==S?(M=()=>({flush:S}),e[19]=S,e[20]=M):M=e[20],P.useImperativeHandle(u,M);let G;e[21]!==m||e[22]!==l||e[23]!==i||e[24]!==a?(G=l?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:m,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:m})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:a("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(Ke,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":a("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:s.jsx(fa,{size:14})})]}),e[21]=m,e[22]=l,e[23]=i,e[24]=a,e[25]=G):G=e[25];let H;e[26]!==y.data||e[27]!==S||e[28]!==B||e[29]!==O||e[30]!==R||e[31]!==r||e[32]!==_||e[33]!==U||e[34]!==a?(H=O?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(bt,{className:"size-5 text-muted-foreground"})}):R?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",a("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ji,{code:B,language:"json",readOnly:_,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),S()}},`${r}:${y.data===void 0?"loading":"ready"}`)}),e[26]=y.data,e[27]=S,e[28]=B,e[29]=O,e[30]=R,e[31]=r,e[32]=_,e[33]=U,e[34]=a,e[35]=H):H=e[35];let W;return e[36]!==G||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[G,H]}),e[36]=G,e[37]=H,e[38]=W):W=e[38],W}function Er(t){return t.contentEditingEnabled&&!t.isMobile}function Kl(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Il(t,e){return t==="blocks"?"preview":e?"blocks":t}function Ul(t){return Er({contentEditingEnabled:pr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Hl(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}function Vl(t){const e=ce.c(90),{tests:n,options:r,onChange:i,available:u}=t,a=Te();let o;e[0]!==r?(o=vr(r),e[0]=r,e[1]=o):o=e[1];const l=o;let c;e[2]!==r.tests?(c=r.tests??{},e[2]=r.tests,e[3]=c):c=e[3];const p=c;let m;e[4]!==i||e[5]!==r?(m=K=>{const ie=K?Pi(K):null,{at:ne,...ee}=r;i(ie?{...ee,at:ie}:ee)},e[4]=i,e[5]=r,e[6]=m):m=e[6];const f=m;let x;e[7]!==p||e[8]!==i||e[9]!==r?(x=(K,ie)=>{const ne={...p};ie==="on"?ne[K]=!0:ie==="off"?ne[K]=!1:delete ne[K];const{tests:ee,...le}=r;i(Object.keys(ne).length>0?{...le,tests:ne}:le)},e[7]=p,e[8]=i,e[9]=r,e[10]=x):x=e[10];const b=x;let j;e[11]!==a?(j=a("sandbox.previewAs.label"),e[11]=a,e[12]=j):j=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ba,{size:16}),e[13]=g):g=e[13];let k;e[14]!==l||e[15]!==j?(k=s.jsx(Ht,{asChild:!0,children:s.jsx(tr,{asChild:!0,children:s.jsx(et,{"aria-label":j,active:l,"data-testid":"preview-as-trigger",children:g})})}),e[14]=l,e[15]=j,e[16]=k):k=e[16];let E;e[17]!==a?(E=a("sandbox.previewAs.label"),e[17]=a,e[18]=E):E=e[18];let y;e[19]!==E?(y=s.jsx(Vt,{children:E}),e[19]=E,e[20]=y):y=e[20];let v;e[21]!==k||e[22]!==y?(v=s.jsxs(qt,{children:[k,y]}),e[21]=k,e[22]=y,e[23]=v):v=e[23];let w;e[24]!==a?(w=a("sandbox.previewAs.label"),e[24]=a,e[25]=w):w=e[25];let T;e[26]!==w?(T=s.jsx("h3",{className:"text-sm font-medium",children:w}),e[26]=w,e[27]=T):T=e[27];let S;e[28]!==u||e[29]!==a?(S=a(u?"sandbox.previewAs.intro":"sandbox.previewAs.unavailable"),e[28]=u,e[29]=a,e[30]=S):S=e[30];let N;e[31]!==S?(N=s.jsx("p",{className:"text-xs text-muted-foreground",children:S}),e[31]=S,e[32]=N):N=e[32];let O;e[33]!==T||e[34]!==N?(O=s.jsxs("div",{className:"flex flex-col gap-1",children:[T,N]}),e[33]=T,e[34]=N,e[35]=O):O=e[35];let R;e[36]!==a?(R=a("sandbox.previewAs.momentLabel"),e[36]=a,e[37]=R):R=e[37];let _;e[38]!==R?(_=s.jsx(Xi,{htmlFor:"preview-as-moment",children:R}),e[38]=R,e[39]=_):_=e[39];let A;e[40]!==r.at?(A=Si(r.at),e[40]=r.at,e[41]=A):A=e[41];let B;e[42]!==f?(B=K=>f(K.target.value),e[42]=f,e[43]=B):B=e[43];let L;e[44]!==A||e[45]!==B?(L=s.jsx(Tn,{id:"preview-as-moment",type:"datetime-local",className:ji,value:A,onChange:B}),e[44]=A,e[45]=B,e[46]=L):L=e[46];const U=r.at===void 0;let M;e[47]!==f?(M=()=>f(""),e[47]=f,e[48]=M):M=e[48];let G;e[49]!==a?(G=a("sandbox.previewAs.now"),e[49]=a,e[50]=G):G=e[50];let H;e[51]!==U||e[52]!==M||e[53]!==G?(H=s.jsx(Ke,{type:"button",variant:"ghost",size:"sm",disabled:U,onClick:M,children:G}),e[51]=U,e[52]=M,e[53]=G,e[54]=H):H=e[54];let W;e[55]!==L||e[56]!==H?(W=s.jsxs("div",{className:"flex items-center gap-2",children:[L,H]}),e[55]=L,e[56]=H,e[57]=W):W=e[57];let V;e[58]!==a?(V=a("sandbox.previewAs.momentHint"),e[58]=a,e[59]=V):V=e[59];let J;e[60]!==V?(J=s.jsx("p",{className:"text-xs text-muted-foreground",children:V}),e[60]=V,e[61]=J):J=e[61];let ae;e[62]!==_||e[63]!==W||e[64]!==J?(ae=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[_,W,J]}),e[62]=_,e[63]=W,e[64]=J,e[65]=ae):ae=e[65];let C;e[66]!==a?(C=a("sandbox.previewAs.testsLabel"),e[66]=a,e[67]=C):C=e[67];let q;e[68]!==C?(q=s.jsx("span",{className:"text-sm font-medium",children:C}),e[68]=C,e[69]=q):q=e[69];let z;e[70]!==p||e[71]!==b||e[72]!==a||e[73]!==n?(z=n.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.noTests")}):s.jsxs(s.Fragment,{children:[s.jsx("ul",{className:"flex flex-col gap-1.5",children:n.map(K=>s.jsxs("li",{className:"flex items-center justify-between gap-2","data-testid":"preview-as-test",children:[s.jsx("span",{className:"min-w-0 truncate text-sm",children:K}),s.jsxs(Zi,{type:"single",variant:"outline",size:"sm",value:p[K]===void 0?"":p[K]?"on":"off",onValueChange:ie=>b(K,ie),"aria-label":K,children:[s.jsx(Ts,{value:"off",children:a("sandbox.previewAs.off")}),s.jsx(Ts,{value:"on",children:a("sandbox.previewAs.on")})]})]},K))}),s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.testsHint")})]}),e[70]=p,e[71]=b,e[72]=a,e[73]=n,e[74]=z):z=e[74];let X;e[75]!==q||e[76]!==z?(X=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[q,z]}),e[75]=q,e[76]=z,e[77]=X):X=e[77];let F;e[78]!==l||e[79]!==i||e[80]!==a?(F=l&&s.jsx(Ke,{type:"button",variant:"outline",size:"sm",onClick:()=>i({}),children:a("sandbox.previewAs.reset")}),e[78]=l,e[79]=i,e[80]=a,e[81]=F):F=e[81];let Y;e[82]!==O||e[83]!==ae||e[84]!==X||e[85]!==F?(Y=s.jsxs(nr,{className:"flex w-80 flex-col gap-4 p-4",align:"center",sideOffset:8,"data-testid":"preview-as",children:[O,ae,X,F]}),e[82]=O,e[83]=ae,e[84]=X,e[85]=F,e[86]=Y):Y=e[86];let Z;return e[87]!==v||e[88]!==Y?(Z=s.jsxs(sr,{children:[v,Y]}),e[87]=v,e[88]=Y,e[89]=Z):Z=e[89],Z}const ql=15e3;function Wl(t,e,n){return n?t.src===e||t.loading?t:{src:e,loading:!0}:t.src===e&&!t.loading?t:{src:e,loading:!1}}function Is(t){return t.loading?{...t,loading:!1}:t}const Gl=500,Jl={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Us=1,Kt=["desktop","mobile","tablet"],Yl=["preview","visual","blocks"],Hs={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Ql(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 ht(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Nn(t,e){try{return new URL(t,e).href}catch{return null}}function Xl(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 n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function Zl(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function ec(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),a=l=>{if(l===n)return 100;const c=l.indexOf(n);if(c===-1)return 0;let p=40;return c===0?p+=30:/[\s/-]/.test(l[c-1]??"")&&(p+=20),p+=Math.round(n.length/l.length*20),p};let o=Math.max(a(r),a(i));return u.at(-1)===n?o=Math.max(o,95):u.includes(n)&&(o=Math.max(o,90)),o}function tc(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function nc({virtualMcpId:t}){const e=Te(),n=hi(),{currentBranch:r,taskId:i,virtualMcpId:u}=Jt(),a=!!Ca(),o=gr(),l=Va(u===t?t:null),c=lr(t),p=so(l?.metadata?.ui?.layout??null),m=pr(p),f=Er({contentEditingEnabled:m,isMobile:n}),[x]=P.useState(()=>Ul({cmsMode:p,isMobile:n})),[b,j]=ms(ps.previewEditingMode(t),d=>d&&Yl.includes(d)?d:null),g=b??x,[k,E]=ms(ps.previewDeviceSize(t),d=>d&&Kt.includes(d)?d:"desktop"),[y,v]=P.useState(null),[w,T]=P.useState(null),S=P.useRef(null),N=P.useRef(null),[O,R]=P.useState(!1),_=P.useRef(null),A=()=>{_.current?.flush(),R(!1)},B=()=>R(d=>(d&&_.current?.flush(),!d)),[L,U]=P.useState({width:0,height:0}),[M,G]=P.useState(!1),[H,W]=P.useState({}),[V,J]=P.useState(""),ae=P.useRef(null),[C,q]=P.useState(!1),[z,X]=P.useState(),[F,Y]=P.useState(null),[Z,K]=P.useState(null),[ie,ne]=P.useState(null),[ee,le]=P.useState(()=>o.state.target?.kind==="page"?o.state.target.path:"/"),[pe,de]=P.useState(()=>o.state.target?.kind==="page"?o.state.target.key:null),[be,ue]=P.useState({}),[Pe,ye]=P.useState(!1),we=P.useRef(null),De=()=>{ye(!0),we.current&&clearTimeout(we.current),we.current=setTimeout(()=>ye(!1),15e3)},nt=()=>{we.current&&(clearTimeout(we.current),we.current=null),ye(!1)},{org:fe}=An(),Le=hr(),Be=_n(),Fe=Be.vmEntry,Ae=Le.lifecycle.phase,{url:st,undecided:Ve}=ai(t),oe=On(t,r),{connection:je}=dr(t),Ce=Qi(t),Me=ii({hasServeConnection:!!je,runtime:c.runtime}),Q=Ve||Me==="github"&&(Ce==="loading"||Ce==="error"),se=!Ze(oe)&&!Q&&!(Me==="github"&&oe.kind==="pending"),ve=Ue(oe)??st,$e=ve??Be.previewUrl,rt=!!ve||Ae==="running",qe=l?.id===t?Ga(l.metadata):null,yt=!ve&&!Ve&&l?.id===t&&c.runtime==="cms",Nr=c.projectDefault==="cms",at=se?Ui({sandboxUrl:$e,previewServerUrl:qe,fastPreviewActive:yt}):null,Mn=t&&r?{orgSlug:fe.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:$e}:null,$n=Dn(Mn,{fetchEnabled:rt}),Yt=ur(Mn,{fetchEnabled:rt}),re=$n.data,xe=Yt.data,We=re?Oi(re,xe).sort((d,h)=>d.name.localeCompare(h.name)):[],zn=t&&r?{orgSlug:fe.slug,virtualMcpId:t,branch:r}:null,Kn=Al(zn),Qt=re&&xe?Di(re,xe):[],In=se&&re&&xe?Pa(xe,re,"loaders"):[],Un=V?(()=>{const d=V.toLowerCase();return We.map(h=>({page:h,score:ec(h.name,h.path,d)})).filter(({score:h})=>h>0).sort((h,D)=>D.score-h.score||h.page.path.length-D.page.path.length).map(({page:h})=>h)})():We,Hn=Qt.filter(d=>{if(!V)return!0;const h=V.toLowerCase();return d.name.toLowerCase().includes(h)||d.key.toLowerCase().includes(h)||d.resolveType.toLowerCase().includes(h)}),Vn=f?In:[],qn=Vn.filter(d=>{if(!V)return!0;const h=V.toLowerCase();return d.title.toLowerCase().includes(h)||d.key.toLowerCase().includes(h)||d.resolveType.toLowerCase().includes(h)}),wt=Z?In.find(d=>d.key===Z)??null:null,Re=Bn,Xt=F||Z?null:Bi(We,ee,pe),te=Xt?.key??null,Ge=o.state.target?.kind==="section"?o.state.target.key:o.state.focusedBlockKey??te,kt=Xt?.path??null,Je=(te?be[te]:void 0)??{},ke=ze(ee,Je),Zt={};if(se&&rt&&$e&&xe&&re){const d=ja(xe,"loaders"),h=te?re[te]:void 0,D=Zo(h,re,me=>d.has(me)),$=Go(D);for(const me of xt(ee)){if(me.type!=="param")continue;const Oe=Vo(ee,me.name,D),Se=Qo(Oe,d,$);Se.length>0&&(Zt[me.name]=Se)}}const St=t&&r?{orgSlug:fe.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,Wn=re&&te?Fi(re,te,0):[],Gn=Ze(oe),Jn=re?Mi(Wn,re,Gn):[],en=Jn.map(d=>d.isSavedBlock?d.label:""),tn=Jn.map(d=>d.isSavedBlock?"global":d.isMultivariate?"variant":"normal"),nn=Wn.map(d=>Rn(d,re??{},Gn)),Pt=P.useRef(null),Ee=P.useRef(null),Tr=Le.status.state==="paused",sn=Le.phase,Yn=Ea({claimPhase:sn,lifecycle:Le.lifecycle}),Ie=Be.previewState,Cr=Be.userStopped,Rr=oi(fe.slug,t??""),{url:_e}=Vi(yt&&t&&r?{orgSlug:fe.slug,virtualMcpId:t,branch:r,previewServerUrl:qe??null,path:ke}:null),Lr=Nr&&c.runtime==="sandbox",rn=li(oe,Me,Ce),I=To({previewState:Ie,progressStatus:Yn.status,previewServerUrl:qe,fastPreviewActive:yt,fastPreviewReady:!!_e,codingSession:Lr,localPreviewUrl:ve,hostedDraft:rn,deciding:Q}),jt=I.showWakingPill||rn&&I.mode==="production"&&!_e,it=I.mode!=="none",Ar=I.mode==="production"&&I.iframeBase?ht(I.iframeBase):null,Ye=I.mode==="production"?Ar:ht($e),_r=l?.id===t&&l.metadata?.fastPreviewInPlace===!0,ot=se?ve?I.mode==="sandbox"&&f&&g==="blocks":I.mode==="production"&&yt&&_r&&f&&g==="blocks":!1,Qn=P.useRef(null),{pin:Or,effective:Dr}=Xl(Qn.current,{inPlaceRenderActive:ot,draftPreviewUrl:_e,resolvedPath:ke});Qn.current=Or;const Xn=o.state.variantOverride??[],Et=se?Xn:[],an=se?[]:Xn,on=Ze(oe)&&$i.some(d=>zi(xe,d)==="available"),Nt=on?H:{},ln=vr(Nt),Br=on&&re?Object.keys(Ki(re).experiments):[],Fr=oe.kind==="protocol"&&oe.source==="github",Mr=eo(fe.slug,t??"",{enabled:ln&&Fr&&jt&&!!t}),{current:$r}=Mr.data?.pages[0]??{current:null},cn=$r?.revision??null,dn=je&&Ue(oe)?gi(je.endpoint,an,ln):null,zr=je&&Ue(oe)?dn?to(dn,Nt):ks:null,Qe=Ql(I.mode==="sandbox"?Ft(Ns(Ss(ie??Nn(ke,I.iframeBase)??I.iframeBase,zr),k),Et):I.mode==="production"?Ft(Ns(Cs(bs(Ss(ie??Dr??Nn(ke,I.iframeBase)??I.iframeBase,jt?ks:null),an),Nt,cn),k),Et):null),Zn=_e??(I.iframeBase?Nn(ke,I.iframeBase):null),Kr=I.mode==="production"?Zn?Ft(Cs(bs(Zn,an),Nt,jt?cn:null),Et):null:Qe??I.iframeBase,Ir=()=>{const d=Kr;d&&window.open(d,"_blank","noopener")},lt=t&&r?Zs(fe.slug,t,r):null,ct=d=>{lt&&La(lt,d)},he=o.state.target;P.useEffect(()=>{if(!(!he||!at||!xe))if(he.kind==="page"){const d=be[he.key]??{};Ee.current=ze(he.path,d),Y(null),K(null),ne(null),de(he.key),le(he.path),ct({path:he.path,pageKey:he.key,params:d})}else if(he.kind==="loader")Ee.current=null,Y(null),K(he.key),ne(null);else{const d=Qt.find(h=>h.key===he.key);if(d){Ee.current=null;const h=ws(xe);K(null),Y(d),ne(Ps(at,h,d.key))}}},[he,at,xe,be]),P.useEffect(()=>{!te||kt===null||he?.kind==="page"&&he.key===te&&he.path===kt||o.selectTarget({kind:"page",key:te,path:kt})},[te,kt,he]);const[es,Ur]=P.useState(null);if(Ie.kind==="iframe"&&es!==Ie.previewUrl){const d=es!==null;Ur(Ie.previewUrl);const h=lt?Xs(lt):null;if(h){if(Ee.current=ze(h.path,h.params),le(h.path),de(h.pageKey),ne(null),Y(null),K(null),h.pageKey&&Object.keys(h.params).length>0){const D=h.pageKey;ue($=>({...$,[D]:h.params}))}}else d&&(Ee.current=null,le("/"),ne(null),de(null),Y(null),K(null))}Pt.current=Qe;const Hr=I.mode==="production"&&!!_e&&!ve,[ts,un]=P.useState({src:Qe??void 0,loading:!1}),Tt=Wl(ts,Qe??void 0,Hr);Tt!==ts&&un(Tt);const dt=Tt.src,ns=Tt.loading,ss=Ao({iframeRef:S,src:I.mode==="sandbox"?Qe:null,active:I.mode==="sandbox"}),rs=P.useRef(null);P.useEffect(()=>{const d=ns?setTimeout(()=>un(Is),ql):null,h=()=>{d&&clearTimeout(d)};if(!_e||!dt||rs.current===_e)return h;rs.current=_e;const D=S.current;return D&&D.getAttribute("src")!==dt&&(De(),D.src=dt),h},[_e,dt,ns]);const as=()=>{const d=S.current?.contentWindow,h=Ye;if(!d||!h||!re||!te)return;const D=re[te];if(!D||typeof D!="object")return;const $=Hi({previewBaseUrl:h,pageBlock:D,decofile:re,path:ke,pathTemplate:ee});if(!$)return;const me=Ft($.src,vi(Et,te));d.postMessage({type:"cms-editor::render",src:me,body:$.body},h)},fn=P.useRef(null);P.useEffect(()=>{if(!ot||F||Z||!te||!re){fn.current=null;return}const d={nav:JSON.stringify({page:te,path:ke,pathTemplate:ee}),content:JSON.stringify(re)},h=Zl(fn.current,d);fn.current=d,h&&as()},[re,ot,F,Z,te,ke,ee]);const mn=P.useRef(null);P.useEffect(()=>{if(!ot||F||Z||!te||!re){mn.current=null;return}const d=JSON.stringify(o.state.variantOverride??null),h=mn.current;mn.current={page:te,sig:d},!(!h||h.page!==te||h.sig===d)&&as()},[o.state.variantOverride,ot,F,Z,te]);const Vr=!!t&&!!r&&!Le.notFound&&!Cr&&!Tr&&(sn?.kind==="ready"||Ae!=="idle"),ge=Hl({editingMode:g,sandboxDisplay:I.mode==="sandbox",blocksEditingEnabled:f});P.useEffect(()=>{const d=Ye;if(!d)return;const h=D=>{if(D.origin===d)if(D.data?.type==="visual-editor::element-clicked"){const $=Bo.safeParse(D.data.payload);$.success&&v($.data)}else if(D.data?.type==="cms-editor::section-clicked"){const $=$o.safeParse(D.data.payload);$.success&&T({index:$.data.sectionIndex,seq:$.data.clickSeq})}else D.data?.type==="cms-editor::render-start"?De():D.data?.type==="cms-editor::render-end"?(nt(),S.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:en,kinds:tn,keys:nn},d)):D.data?.type==="cms-editor::render-error"&&nt()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[Ye,en,tn,nn]);const is=()=>{const d=S.current?.contentWindow,h=ht($e);!d||!h||d.postMessage({type:"visual-editor::activate",script:Fo},h)},qr=()=>{const d=S.current?.contentWindow,h=ht($e);!d||!h||d.postMessage({type:"visual-editor::deactivate"},h)},pn=()=>{const d=S.current?.contentWindow,h=Ye;!d||!h||(d.postMessage(I.mode==="production"||ve?{type:"editor::inject",args:{script:Ds}}:{type:"visual-editor::activate",script:Ds},h),d.postMessage({type:"cms-editor::set-labels",labels:en,kinds:tn,keys:nn},h))},Wr=()=>{const d=S.current?.contentWindow,h=Ye;!d||!h||d.postMessage({type:"cms-editor::deactivate"},h)},Gr=()=>{const d=S.current?.contentWindow,h=Ye;!d||!h||(d.postMessage({type:"cms-editor::clear-hover"},h),d.postMessage({type:"visual-editor::clear-hover"},h))},Ct=d=>{if(d==="blocks"&&!f)return;const h=g;!n&&d!==h&&(d==="blocks"?N.current?.resize("30%"):N.current?.collapse()),j(d),v(null),T(null),d!=="blocks"&&K(null),h==="visual"&&qr(),d==="visual"&&is(),h==="blocks"&&d!=="blocks"&&Wr(),d==="blocks"&&pn()},Jr=()=>{Ct(Kl(g,f))},Yr=()=>{Ct(Il(g,f))},hn=()=>{const d=S.current;if(!d)return;De();const h=document.activeElement,D=d.tabIndex;d.tabIndex=-1,d.style.pointerEvents="none",d.blur(),tc(d,Pt.current);let $;const me=()=>{clearTimeout($),d.tabIndex=D,d.style.pointerEvents="";const Oe=document.activeElement;(!Oe||Oe===document.body||Oe===d)&&h?.focus(),d.removeEventListener("load",me)};d.addEventListener("load",me),$=setTimeout(me,3e3)};Wi(hn);const Rt=ci(fe.slug,t??""),Lt=rn&&it&&!!t,os=P.useRef(null);P.useEffect(()=>{if(Lt)return di(Rt)},[Lt,Rt]);const{reload:ut}=ui(fe.slug,t??""),ls=P.useRef(ut.seq);P.useEffect(()=>{if(ls.current!==ut.seq&&(ls.current=ut.seq,!!Lt&&os.current===Pt.current)){if(ut.navigates){xs(Rt);return}hn()}},[ut.seq]);const Qr=fi(zn),ft=mi(Ue(oe)?Qr:""),cs=P.useRef(ft);P.useEffect(()=>{const d=cs.current;if(cs.current=ft,!d||!ft||d===ft)return;const h=S.current;if(h)return Do({iframe:h,reload:hn})},[ft]);const Xr=()=>{const d=Kt.indexOf(k);E(Kt[(d+1)%Kt.length])},gn=(d,h)=>{if(!te)return;const D=te,$={...Je,[d]:h};Ee.current=ze(ee,$),ue(me=>({...me,[D]:$})),ct({path:ee,pageKey:D,params:$})},Zr=Nl({iframeBase:I.iframeBase,resolvedPath:ke,activeGlobalSectionName:F?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),vn=d=>{const h=be[d.key]??{},D=ze(d.path,h);(F||Re(D)!==Re(ke))&&De(),Ee.current=D,Y(null),K(null),ne(null),T(null),de(d.key),le(d.path),ct({path:d.path,pageKey:d.key,params:h}),o.selectTarget({kind:"page",key:d.key,path:d.path})};Ra(lt,d=>{(F||Re(d)!==Re(ke))&&De(),Ee.current=d,Y(null),K(null),ne(null),T(null),de(null),le(d),ct({path:d,pageKey:null,params:{}})});const ea=d=>{if(Ze(oe)){const $=re?Ii(re,d.key,xe):null;$?vn($):wn.info(e("sandbox.preview.blockOnNoPage"));return}if(!at||!xe){wn.error(e("sandbox.preview.previewMetadataNotReady"));return}De(),Ee.current=null;const h=ws(xe),D=Ps(at,h,d.key);Y(d),K(null),ne(D),T(null),o.selectTarget({kind:"section",key:d.key})},ta=d=>{f&&(Y(null),K(d.key),ne(null),Ct("blocks"),o.selectTarget({kind:"loader",key:d.key}))},na=async({name:d,path:h,templateKey:D})=>{if(!t||!r)return;const $=mr(h);if($){X($);return}const me=h.trim().startsWith("/")?h.trim():`/${h.trim()}`;if(We.some(Se=>Re(Se.path)===Re(me))){X(e("sandbox.preview.pageAlreadyExists",{path:me}));return}let Oe;if(D&&(Oe=re?.[D],!Oe)){X(e("sandbox.preview.templateNoLongerExists"));return}X(void 0);try{const Se=await Kn.mutateAsync({name:d,path:me,template:Oe,schema:Ze(oe)?{meta:xe,loadMeta:async()=>(await Yt.refetch()).data}:void 0});q(!1),wn.success(e("sandbox.preview.pageCreated",{name:d})),await ro(Gl),vn({key:Se.key,name:Se.name,path:Se.path}),Ct("blocks")}catch(Se){X(Se instanceof jr?e("sandbox.preview.pageSchemaNotReady"):Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},At=Tl({previewSurfaceActive:it,daemonReady:Vr,production:I.mode==="production",servePreviewUrl:Ue(oe)}),sa=Cl({showPreviewToolbar:At,contentEditingEnabled:m}),_t=()=>{G(!1),J("")},xn=F?.name??wt?.title??Xt?.name,bn=$n.isPending||Yt.isPending,yn=bn?ht(I.iframeBase):xn,Ot=F?`section:${F.key}`:Z?`loader:${Z}`:te?`page:${te}`:void 0,ra=At?sa?s.jsxs(sr,{open:M,onOpenChange:d=>{G(d),d||J("")},children:[s.jsx(tr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:bn?yn??void 0:F||wt?xn:[xn,ee].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[F&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-2xs font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(Fa,{size:11}),e("sandbox.preview.globalBadge")]}),wt&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:[s.jsx(Ma,{size:11}),e("sandbox.preview.loaderBadge")]}),yn&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:yn}),!bn&&!F&&!wt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:ee}),s.jsx(Aa,{size:12,className:It("shrink-0 transition-transform",M&&"rotate-180")})]})})}),s.jsxs(nr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(ar,{shouldFilter:!1,defaultValue:Ot,children:[s.jsx(ir,{value:V,onValueChange:d=>{J(d),ae.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(rr,{ref:ae,className:"max-h-80",children:[s.jsx(or,{children:We.length===0&&Qt.length===0&&Vn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),Un.length>0&&s.jsx(gt,{children:Un.map(d=>s.jsxs(vt,{value:`page:${d.key}`,"aria-current":Ot===`page:${d.key}`||void 0,title:`${d.name} · ${d.path}`,onSelect:()=>{_t(),vn(d)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:d.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:d.path})]},d.key))}),Hn.length>0&&s.jsx(gt,{heading:e("sandbox.preview.globalComponents"),children:Hn.map(d=>s.jsx(vt,{value:`section:${d.key}`,"aria-current":Ot===`section:${d.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{_t(),ea(d)},children:s.jsx("span",{className:"truncate",children:d.name})},d.key))}),qn.length>0&&s.jsx(gt,{heading:e("sandbox.preview.globalLoaders"),children:qn.map(d=>s.jsx(vt,{value:`loader:${d.key}`,"aria-current":Ot===`loader:${d.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{_t(),ta(d)},children:s.jsx("span",{className:"truncate",children:d.title})},d.key))})]})]}),!F&&!Z&&xt(ee).some(d=>d.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:xt(ee).map((d,h)=>{if(d.type==="text")return s.jsx("span",{children:d.text},`text-${h}`);const D=Zt[d.name];return D&&St?s.jsx(pl,{sources:D,template:ee,paramName:d.name,value:Je[d.name]??"",sandboxRef:St,onCommit:$=>gn(d.name,$)},`${te}:${d.name}`):s.jsx(jl,{name:d.name,value:Je[d.name]??"",onCommit:$=>gn(d.name,$)},`${te}:${d.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Ke,{variant:"ghost",className:"w-full justify-start",onClick:()=>{_t(),X(void 0),q(!0)},children:[s.jsx(Ha,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Zr}):null,ds=At||m?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(qt,{children:[s.jsx(Ht,{asChild:!0,children:s.jsx(et,{onClick:Xr,"aria-label":e(Hs[k]),children:k==="mobile"?s.jsx($a,{size:16}):k==="tablet"?s.jsx(za,{size:16}):s.jsx(Ka,{size:16})})}),s.jsx(Vt,{children:e(Hs[k])})]}),ra,s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[on&&s.jsx(Vl,{tests:Br,options:H,onChange:W,available:!!dn||!jt||no(cn)||!ln}),s.jsx(et,{onClick:Ir,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(ma,{size:16})})]})]}):null,aa=(se||a)&&I.mode==="sandbox",Dt=Jl[k],Bt=k==="desktop"&&(L.width===0||L.width>=Dt.width+2*Us),us=Bt?1:Math.min(L.width>0?L.width/(Dt.width+2*Us):1,1),ia=Bt?{width:"100%",height:"100%"}:{width:`${Dt.width}px`,height:L.height>0?`${L.height/us}px`:`${Dt.height}px`,transform:`scale(${us})`,transformOrigin:"top center"},fs=s.jsxs(s.Fragment,{children:[aa&&(At||m)&&s.jsx(et,{onClick:Jr,"aria-pressed":ge==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ge==="visual",children:s.jsx(vs,{size:16})}),f&&s.jsxs(qt,{children:[s.jsx(Ht,{asChild:!0,children:s.jsx(et,{onClick:Yr,"aria-pressed":ge==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ge==="blocks",children:s.jsx(Ua,{size:16})})}),s.jsx(Vt,{children:e("sandbox.preview.blocksEditor")})]}),Ge&&s.jsxs(qt,{children:[s.jsx(Ht,{asChild:!0,children:s.jsx(et,{onClick:B,"aria-pressed":O,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:O,children:s.jsx(Ia,{size:16})})}),s.jsx(Vt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),oa=!!Z&&ge==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[St&&Object.entries(Zt).map(([d,h])=>(Je[d]??"")===""?s.jsx(Sl,{sources:h,template:ee,paramName:d,sandboxRef:St,onFill:D=>gn(d,D)},`${te}:${d}`):null),s.jsxs(s.Fragment,{children:[s.jsx(hs.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:ds}),children:ds}),s.jsx(hs.Toolbar.Right.Portal,{fallback:fs,children:fs})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:oa?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(zs,{virtualMcpId:t,externalSelection:w,onViewJsonFile:B}),O&&Ge&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Ks,{ref:_,virtualMcpId:t,pageKey:Ge,onClose:A})})]}):s.jsxs(js,{orientation:"horizontal",disabled:ge!=="blocks",className:"relative isolate",children:[s.jsx(Mt,{ref:N,id:"preview-blocks-editor",defaultSize:ge==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ge==="blocks"&&s.jsx(zs,{virtualMcpId:t,externalSelection:w,onViewJsonFile:B})}),ge==="blocks"&&s.jsx(Es,{withHandle:!0}),s.jsx(Mt,{id:"preview-canvas",defaultSize:ge==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(js,{orientation:"horizontal",disabled:!(O&&Ge),children:[s.jsx(Mt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:d=>{if(!d)return;const h=()=>U($=>$.width===d.clientWidth&&$.height===d.clientHeight?$:{width:d.clientWidth,height:d.clientHeight});h();const D=new ResizeObserver(h);return D.observe(d),()=>D.disconnect()},className:It("h-full relative overflow-clip flex justify-center",it&&!Bt&&"bg-muted/30"),children:[(Pe||Rr)&&it&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),I.showDecidingLoader&&s.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:s.jsx(bt,{className:"size-5 text-muted-foreground"})}),I.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Sn,{kind:"starting",progress:Yn,claimPhase:sn})}),!ve&&!Q&&Ie.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Sn,{kind:"suspended",onResume:Be.resume})}),!ve&&!Q&&Ie.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Sn,{kind:"errored",error:Ie.error,onRetry:Be.retry,connectionsHref:`/${fe.slug}/settings/connections`})}),I.showWakingPill&&s.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 bg-muted px-4 py-3 shadow-soft pointer-events-none select-none",children:[s.jsx(bt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ge==="visual"&&!y&&s.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-special/40 bg-special/90 px-3 py-1 text-xs font-medium text-special-foreground shadow-soft backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(vs,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ge==="visual"&&y&&s.jsx(Io,{element:y,onDismiss:()=>v(null)}),it&&Qe&&s.jsx("div",{className:It("shrink-0",!Bt&&"bg-background shadow-edge"),style:ia,onMouseLeave:Gr,children:s.jsx("iframe",{ref:S,src:dt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:ss.handleError,onLoad:()=>{if(un(Is),ss.handleLoad(),nt(),os.current=Pt.current,Lt&&xs(Rt),I.mode!=="sandbox"||ve){(I.mode==="production"&&!I.showWakingPill||ve)&&ge==="blocks"&&pn();return}if(pa("vm_preview_loaded",{view_mode:ge,vm_id:Fe?.sandboxHandle??null}),!F)try{const d=S.current?.contentWindow?.location?.pathname;if(!d)return;const h=Ee.current;if(h!==null&&(Ee.current=null,Re(d)!==Re(h))||Re(d)===Re(ke))return;le(d),ct({path:d,pageKey:pe,params:Je})}catch{}ge==="visual"&&is(),ge==="blocks"&&pn()}},I.iframeBase)})]})}),O&&Ge&&s.jsxs(s.Fragment,{children:[s.jsx(Es,{withHandle:!0}),s.jsx(Mt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Ks,{ref:_,virtualMcpId:t,pageKey:Ge,onClose:A})})]})]})})]})}),s.jsx(_l,{open:C,onOpenChange:q,isPending:Kn.isPending,error:z,templates:We,onSubmit:na})]})}const sc=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},rc=1e4,ac=1e4,ic=5e3,oc=2;function lc(t,e){return t&&e===0?ac:Math.min(1e3*2**Math.max(0,e-1),ic)}function cc(t,e,n){return e?!0:t===!0&&n<oc}function dc(t,e){const n=ce.c(11),r=sc,i=ha();let u;n[0]!==t?(u=Ws.localAppReachable(t??""),n[0]=t,n[1]=u):u=n[1];const a=u;let o;n[2]!==r||n[3]!==i||n[4]!==a||n[5]!==t?(o=async m=>{const{signal:f}=m,x=new AbortController,b=()=>x.abort();f.addEventListener("abort",b);const j=setTimeout(b,rc),g=await r(t,x.signal).catch(fc);clearTimeout(j),f.removeEventListener("abort",b);const k=i.getQueryData(a),E=g?0:(k?.failures??0)+1;return{up:cc(k?.up??null,g,E),failures:E}},n[2]=r,n[3]=i,n[4]=a,n[5]=t,n[6]=o):o=n[6];const l=!!t;let c;n[7]!==a||n[8]!==o||n[9]!==l?(c={queryKey:a,queryFn:o,enabled:l,retry:!1,staleTime:0,gcTime:0,refetchInterval:uc},n[7]=a,n[8]=o,n[9]=l,n[10]=c):c=n[10];const{data:p}=ga(c);return t?p?.up??null:null}function uc(t){return t.state.data?lc(t.state.data.up,t.state.data.failures):!1}function fc(){return!1}function mc(t){const{backend:e}=t;if(e.kind==="protocol"&&e.source==="local")return{kind:"connected"};if(e.kind==="unavailable"&&e.source==="local"){const n=e.problem;return!n||n.reason==="not-answering"?t.access==="denied"?{kind:"needs-permission"}:{kind:"not-running"}:{kind:"problem",problem:n}}return{kind:"connecting"}}function ld(t){const e=ce.c(48),{virtualMcpId:n}=t,r=Te(),i=qa(n),{connection:u}=dr(n),{activeTask:a,taskId:o,currentBranch:l}=Jt(),c=fo(o),[p,m]=P.useState(!1),f=On(n,l);let x;e[0]!==f||e[1]!==u?(x=u?Ue(f):null,e[0]=f,e[1]=u,e[2]=x):x=e[2];const b=x,j=dc(b),g=br();if(oo({threadId:o,sandboxBranch:a?.branch??l,agentHasRepo:Pn(i?.metadata),threadHasRepo:Pn(c)||Pn(a?.metadata)})==="none"&&!u){let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(Rs,{className:"size-7 text-foreground"})}),e[3]=y):y=e[3];let v;e[4]!==r?(v=r("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=r,e[5]=v):v=e[5];let w;e[6]!==r?(w=r("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=r,e[7]=w):w=e[7];let T,S;e[8]===Symbol.for("react.memo_cache_sentinel")?(T=()=>m(!0),S=s.jsx(Rs,{className:"size-4"}),e[8]=T,e[9]=S):(T=e[8],S=e[9]);let N;e[10]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[10]=r,e[11]=N):N=e[11];let O;e[12]!==N?(O=s.jsxs(Ke,{onClick:T,children:[S,N]}),e[12]=N,e[13]=O):O=e[13];let R;e[14]!==v||e[15]!==w||e[16]!==O?(R=s.jsx(ao,{className:"h-full",image:y,title:v,description:w,actions:O}),e[14]=v,e[15]=w,e[16]=O,e[17]=R):R=e[17];let _;e[18]!==p?(_=s.jsx(io,{open:p,onOpenChange:m,mode:"agent"}),e[18]=p,e[19]=_):_=e[19];let A;return e[20]!==_||e[21]!==R?(A=s.jsxs(s.Fragment,{children:[R,_]}),e[20]=_,e[21]=R,e[22]=A):A=e[22],A}if(u&&i&&!Ue(f)){let y;e[23]!==g||e[24]!==f?(y=mc({backend:f,access:g}),e[23]=g,e[24]=f,e[25]=y):y=e[25];let v;e[26]!==u.endpoint?(v=pi(u.endpoint),e[26]=u.endpoint,e[27]=v):v=e[27];let w;return e[28]!==y||e[29]!==v?(w=s.jsx(hc,{status:y,host:v}),e[28]=y,e[29]=v,e[30]=w):w=e[30],w}if(b&&j!==!0){let y;e[31]!==r?(y=r("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=r,e[32]=y):y=e[32];let v;e[33]!==b||e[34]!==r?(v=r("mainPanelTabs.previewTab.localAppWaiting.body",{host:pc(b)}),e[33]=b,e[34]=r,e[35]=v):v=e[35];let w;e[36]!==v?(w=s.jsx(Wt,{text:v}),e[36]=v,e[37]=w):w=e[37];let T;e[38]!==r?(T=r("mainPanelTabs.previewTab.localAppWaiting.hint"),e[38]=r,e[39]=T):T=e[39];let S;e[40]!==T?(S=s.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:T}),e[40]=T,e[41]=S):S=e[41];let N;return e[42]!==y||e[43]!==w||e[44]!==S?(N=s.jsx(Gt,{headingLevel:2,waiting:!0,title:y,lead:w,footer:S}),e[42]=y,e[43]=w,e[44]=S,e[45]=N):N=e[45],N}let E;return e[46]!==n?(E=s.jsx(Na,{children:s.jsx(nc,{virtualMcpId:n})}),e[46]=n,e[47]=E):E=e[47],E}function pc(t){try{return new URL(t).host}catch{return t}}function hc(t){const e=ce.c(20),{status:n,host:r}=t,i=Te();if(n.kind==="connected"){let o;e[0]!==i?(o=i("mainPanelTabs.previewTab.localhostNoPreview.title"),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==i?(l=i("mainPanelTabs.previewTab.localhostNoPreview.body"),e[2]=i,e[3]=l):l=e[3];let c;e[4]!==l?(c=s.jsx(Wt,{text:l}),e[4]=l,e[5]=c):c=e[5];let p;e[6]!==i?(p=i("mainPanelTabs.previewTab.localhostNoPreview.step.title"),e[6]=i,e[7]=p):p=e[7];let m;e[8]!==p?(m=[{title:p,command:`${cr} --preview localhost:3000`}],e[8]=p,e[9]=m):m=e[9];let f;return e[10]!==o||e[11]!==c||e[12]!==m?(f=s.jsx(Gt,{headingLevel:2,waiting:!1,title:o,lead:c,steps:m}),e[10]=o,e[11]=c,e[12]=m,e[13]=f):f=e[13],f}let u;e[14]!==r||e[15]!==n?(u=vo(n,r),e[14]=r,e[15]=n,e[16]=u):u=e[16];let a;return e[17]!==r||e[18]!==u?(a=s.jsx(go,{wait:u,hosts:r}),e[17]=r,e[18]=u,e[19]=a):a=e[19],a}export{go as L,ld as P,Gt as S,od as u};
|