decocms 4.500.8 → 4.501.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.
Files changed (459) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-QhekdQES.js → ActiveShapeUtils-D-fL_h7g.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-DVHl2wob.js → AlertCircle-D3bAofoi.js} +1 -1
  3. package/dist/client/assets/{AreaChart-CzXYdxfM.js → AreaChart-BkD3ldvt.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-5wXFDAmZ.js → ArrowLeft-Cdobx1UV.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DESKNNlf.js → ArrowUp-D_3dn5Sd.js} +1 -1
  6. package/dist/client/assets/{BarChart-CrZ82YV4.js → BarChart-DdPh9tNP.js} +1 -1
  7. package/dist/client/assets/{Building02-CFiq1p9R.js → Building02-Bh6iwr2R.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-Wv_V3Cf8.js → CategoricalChart-tLM_K2Lc.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DAvSmLHO.js → CheckCircle-BQiYUYV1.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-KK06uLTv.js → ChevronSelectorVertical-CpMmf6o-.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-Di-YfZWV.js → ChevronUp-CfnfCq3M.js} +1 -1
  12. package/dist/client/assets/{Copy01-CvnGuZZ3.js → Copy01-CKF8jrEa.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CpFAcFMU.js → CreditCard01-B4jz404y.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-B8mqV8lL.js → DotsVertical-BVuRRGqu.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-CZTgevMW.js → ErrorBarContext-D3QRg5_X.js} +1 -1
  16. package/dist/client/assets/{Globe04-CCXvQu2N.js → Globe04-CfnS-Tur.js} +1 -1
  17. package/dist/client/assets/{Image01-WncLby5J.js → Image01-C6EZAhw4.js} +1 -1
  18. package/dist/client/assets/{Key01-Bhf2mFGP.js → Key01-C3bTgL7y.js} +1 -1
  19. package/dist/client/assets/{Link01-vjT_tIt-.js → Link01-Bb9ZHTO8.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-SQZX7UHe.js → LinkBroken01-BbLhCJ9C.js} +1 -1
  21. package/dist/client/assets/{Monitor01-CZgg0RSg.js → Monitor01-BT48-O3V.js} +1 -1
  22. package/dist/client/assets/{Play-CSVNLFwP.js → Play-DlM8u9Zn.js} +1 -1
  23. package/dist/client/assets/{Plus-C7i72Ui0.js → Plus-h-7fG8-i.js} +1 -1
  24. package/dist/client/assets/{SearchMd--I1GEx-C.js → SearchMd-DdAgg3kt.js} +1 -1
  25. package/dist/client/assets/{Sector-CBgTYwFd.js → Sector-udGfVqY9.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-E-rUyhpG.js → ShoppingBag01-gtt6oc_g.js} +1 -1
  27. package/dist/client/assets/{Sun-D612nlCs.js → Sun-D0bMmBqD.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-DCGuISL6.js → SwitchHorizontal01-mzV8h1Yb.js} +1 -1
  29. package/dist/client/assets/{Tool01-DqVqi_FU.js → Tool01-BOGFE1PW.js} +1 -1
  30. package/dist/client/assets/{Trash01-BdVvG1w5.js → Trash01-BKZKll81.js} +1 -1
  31. package/dist/client/assets/{Upload01-CEQBjXAP.js → Upload01-ClJbirSb.js} +1 -1
  32. package/dist/client/assets/{User01-DzMieRdG.js → User01-jcmfLZ4a.js} +1 -1
  33. package/dist/client/assets/{UserSquare-CEGUDYl2.js → UserSquare-Dnl3alN_.js} +1 -1
  34. package/dist/client/assets/{Users01-CW8HA66N.js → Users01-DBt3BOu-.js} +1 -1
  35. package/dist/client/assets/{XAxis-B4lxSeIN.js → XAxis-DWTEKRSO.js} +1 -1
  36. package/dist/client/assets/{XClose-ByJq3z1t.js → XClose-DtCD4hEo.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-CePPHC89.js → ZoomOut-C-oiWFtM.js} +1 -1
  38. package/dist/client/assets/{access-gate-1kOXhtpA.js → access-gate-Bs83GnN9.js} +1 -1
  39. package/dist/client/assets/add-connection-dialog-CkfM8RAE.js +1 -0
  40. package/dist/client/assets/agent-analytics-PkbYclRB.js +2 -0
  41. package/dist/client/assets/agent-app-Dq_KNzND.js +1 -0
  42. package/dist/client/assets/agent-assets-BSNQs1Q4.js +1 -0
  43. package/dist/client/assets/agent-automation-CYLhaLQV.js +20 -0
  44. package/dist/client/assets/agent-automations-CylXZmQz.js +1 -0
  45. package/dist/client/assets/agent-connect-sources-gehkSGol.js +1 -0
  46. package/dist/client/assets/agent-deck-CB0RXEGe.js +1 -0
  47. package/dist/client/assets/agent-e2e-gcrRg7hM.js +1 -0
  48. package/dist/client/assets/agent-experiments-CMJUnUoe.js +1 -0
  49. package/dist/client/assets/agent-file-JLVKcoj6.js +1 -0
  50. package/dist/client/assets/agent-hosting-AV1ldWsd.js +1 -0
  51. package/dist/client/assets/{agent-icon-BVzFWL_k.js → agent-icon-D1bIPwJ9.js} +1 -1
  52. package/dist/client/assets/agent-library-ChYqVk94.js +1 -0
  53. package/dist/client/assets/agent-library-file-5NiMKcJU.js +1 -0
  54. package/dist/client/assets/agent-monitor-DCEK-_YE.js +1 -0
  55. package/dist/client/assets/agent-overview-Bq6iylVc.js +1 -0
  56. package/dist/client/assets/agent-releases-0JQ-pNIw.js +2 -0
  57. package/dist/client/assets/agent-settings-DutqpeLT.js +1 -0
  58. package/dist/client/assets/agent-site-editor-DUVPLgUJ.js +27 -0
  59. package/dist/client/assets/agent-site-editor-code-Bs5iWgah.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-DG0PHKu_.js +1 -0
  61. package/dist/client/assets/agent-site-editor-preview-IbSFpbgz.js +1 -0
  62. package/dist/client/assets/agent-view-BMSjk6sE.js +1 -0
  63. package/dist/client/assets/agent-view-guard-B0ssprgS.js +1 -0
  64. package/dist/client/assets/{agents-list-ZBnW_d9y.js → agents-list-CL_HbBRx.js} +1 -1
  65. package/dist/client/assets/{ai-providers-CPmQ2-wf.js → ai-providers-mazNpep3.js} +1 -1
  66. package/dist/client/assets/{alert-CUPV9wwi.js → alert-Bo4bO9Yj.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-DTOyag1c.js → alert-dialog-BEUBWKqO.js} +2 -2
  68. package/dist/client/assets/{analytics-sections-Cz6ahzfq.js → analytics-sections-DM3YuBYq.js} +1 -1
  69. package/dist/client/assets/api-keys-BfQZh5eV.js +1 -0
  70. package/dist/client/assets/{api-keys-CHntF__V.js → api-keys-DVwB6mPs.js} +1 -1
  71. package/dist/client/assets/app-editor-6HFiMwKn.js +1 -0
  72. package/dist/client/assets/{asset-utils-CDOZckz4.js → asset-utils-f7af-ti1.js} +1 -1
  73. package/dist/client/assets/{auth-BM0B-cGs.js → auth-CpMllKKy.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-D1kP6GLS.js → auth-catchall-s5AR8jnh.js} +1 -1
  75. package/dist/client/assets/auth-entry-DhhGCuwo.js +1 -0
  76. package/dist/client/assets/{auth-split-layout-DAOQnS6B.js → auth-split-layout-CVNIUCsf.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-BRn95Iqc.js → authenticate-and-persist-oauth-B45I3cgI.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-lOitm-O0.js → automation-list-row-sOJZ4uwa.js} +1 -1
  79. package/dist/client/assets/{automation-runs-hkYLmevl.js → automation-runs-CR9XH4Bt.js} +1 -1
  80. package/dist/client/assets/{automations-D0AFDtKD.js → automations-KO9N3LUU.js} +1 -1
  81. package/dist/client/assets/{autosend-ACmUx5MO.js → autosend-BPCdEy8S.js} +1 -1
  82. package/dist/client/assets/{avatar-Du8JG5EY.js → avatar-BwGV1yBo.js} +1 -1
  83. package/dist/client/assets/{badge-BEq8f8Nc.js → badge-DZi2puxG.js} +1 -1
  84. package/dist/client/assets/{block-document-CCx23LIp.js → block-document-DKS5cj35.js} +3 -3
  85. package/dist/client/assets/{blocks-preview-workspace-context-Cy0jJ985.js → blocks-preview-workspace-context-CDjfxqPx.js} +1 -1
  86. package/dist/client/assets/blocks-tab-states-CdRfYXjG.js +20 -0
  87. package/dist/client/assets/blog-schema-DQu9FHji.js +1 -0
  88. package/dist/client/assets/{board-analytics-X4J6IlHK.js → board-analytics-Br92I9NK.js} +1 -1
  89. package/dist/client/assets/{buckets-Dq2wvP9B.js → buckets-BJOMOAgi.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-vPJYIntG.js → build-improve-prompt-doc-DrFz7LF_.js} +1 -1
  91. package/dist/client/assets/{calendar-DpEcLQ6J.js → calendar-evfJy3uJ.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-Bm4gFcel.js → capability-load-error-vW3f0aqj.js} +1 -1
  93. package/dist/client/assets/category-editor-QytvoXKo.js +1 -0
  94. package/dist/client/assets/{chart-CkvrWwO-.js → chart-yXoVtu1q.js} +1 -1
  95. package/dist/client/assets/chat-context-lAP9vX1C.js +39 -0
  96. package/dist/client/assets/{chat-draft-_hxvCJKw.js → chat-draft-DVJc17WV.js} +1 -1
  97. package/dist/client/assets/{checkbox-DvQZTmm6.js → checkbox-DcDvQwKW.js} +1 -1
  98. package/dist/client/assets/{choose-editor-BRTmXclR.js → choose-editor-B0ViIXN7.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-DGrUaNM7.js → cli-auth-success-CKu92ul9.js} +1 -1
  100. package/dist/client/assets/{client-icons-5kuaT98X.js → client-icons-DV_DZLb3.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-Cz5yTS8J.js +1 -0
  102. package/dist/client/assets/{collapsible-CRuF_99G.js → collapsible-BvvJbkUN.js} +1 -1
  103. package/dist/client/assets/collection-detail-gDWElNf6.js +1 -0
  104. package/dist/client/assets/{collection-display-button-Blt_OAPx.js → collection-display-button-CX9hkCzp.js} +1 -1
  105. package/dist/client/assets/{collection-search-Bo7KXUbF.js → collection-search-ChJFrp7I.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-YguS6Yzf.js → collection-table-wrapper-S14li0ck.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-DCHbr1Vt.js → collection-tabs-CSxs3D41.js} +1 -1
  108. package/dist/client/assets/{column-rules-C35w8JUr.js → column-rules-GXfmm3XY.js} +2 -2
  109. package/dist/client/assets/{combobox-DocJ2-jK.js → combobox-C7I8ANxO.js} +1 -1
  110. package/dist/client/assets/{command-BSyD71wq.js → command-3UFu4XzT.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-DL8GkhO5.js → companion-mcps-section-B4r6rXjT.js} +1 -1
  112. package/dist/client/assets/{config-BTwIN8U2.js → config-CXc91so8.js} +1 -1
  113. package/dist/client/assets/{connect-pYGu8tEC.js → connect-CyItQRMN.js} +3 -3
  114. package/dist/client/assets/{connect-layout-ayCcohdl.js → connect-layout-C_C_fSz7.js} +1 -1
  115. package/dist/client/assets/{connection-BV0Ji7-y.js → connection-C37KtOpn.js} +1 -1
  116. package/dist/client/assets/{connection-card-BGBC1Vy2.js → connection-card-BZTmMkIC.js} +1 -1
  117. package/dist/client/assets/connection-detail-D0FXWtUX.js +1 -0
  118. package/dist/client/assets/{connection-form-helpers-DgicL3qY.js → connection-form-helpers-DxBwDmAB.js} +1 -1
  119. package/dist/client/assets/connections-D-s5sSvb.js +1 -0
  120. package/dist/client/assets/content-tab-zP6Y355z.js +8 -0
  121. package/dist/client/assets/context-CXih-hDd.js +1 -0
  122. package/dist/client/assets/{context-menu-BfMN3bc-.js → context-menu-BVwispbr.js} +1 -1
  123. package/dist/client/assets/{core.esm-Dilbpce_.js → core.esm-CmRvLUZs.js} +2 -2
  124. package/dist/client/assets/{create-organization-dialog-C1SjjvU5.js → create-organization-dialog-MkYGLytC.js} +1 -1
  125. package/dist/client/assets/daily-pulse-C5ZpC1Ja.js +1 -0
  126. package/dist/client/assets/device-hint-SeLRi17j.js +1 -0
  127. package/dist/client/assets/discover-CnNtsI6p.js +1 -0
  128. package/dist/client/assets/{domain-settings-Chk6V0ER.js → domain-settings-C-ul_GpW.js} +1 -1
  129. package/dist/client/assets/{drawer-BXTiY6dg.js → drawer-BnxsVk9h.js} +1 -1
  130. package/dist/client/assets/{editor-BO3RLENr.js → editor-BcMzCvWI.js} +1 -1
  131. package/dist/client/assets/editor-classes-qOc25VDM.js +1 -0
  132. package/dist/client/assets/{empty-state-MnAK8EeW.js → empty-state-CLULH17h.js} +1 -1
  133. package/dist/client/assets/{empty-state-DzqjIExe.js → empty-state-Csd3ZQCl.js} +1 -1
  134. package/dist/client/assets/{extract-connection-data-DykkXLPs.js → extract-connection-data-QezQYJtA.js} +1 -1
  135. package/dist/client/assets/{feature-gate-CWfa-r5C.js → feature-gate-X9j31WTs.js} +1 -1
  136. package/dist/client/assets/{feature-paywall-CqkVt_-T.js → feature-paywall-CVHEJqfB.js} +1 -1
  137. package/dist/client/assets/{file-explorer-AcHh43mk.js → file-explorer-CzlgH02W.js} +2 -2
  138. package/dist/client/assets/{file-preview-BqIq4rHb.js → file-preview-Ddg0WJAM.js} +1 -1
  139. package/dist/client/assets/{file-share-button-DuHzh-x9.js → file-share-button-D2qOTxL8.js} +2 -2
  140. package/dist/client/assets/{file-type-icon-BRADjmum.js → file-type-icon-Bqf9C4DT.js} +1 -1
  141. package/dist/client/assets/flat-project-EkkB9kye.js +1 -0
  142. package/dist/client/assets/{folder-icon-t6qoYUX-.js → folder-icon-CktDjbyx.js} +2 -2
  143. package/dist/client/assets/{form-qApBoH9w.js → form-BLRuutWX.js} +1 -1
  144. package/dist/client/assets/format-time-CAj8AQXM.js +1 -0
  145. package/dist/client/assets/general-DAKv-uYe.js +1 -0
  146. package/dist/client/assets/home-BtntFMXr.js +1 -0
  147. package/dist/client/assets/hosted-publish-feedback-DnbP_2C-.js +1 -0
  148. package/dist/client/assets/{icon-button-CTsUwdOO.js → icon-button-08xWmNqW.js} +1 -1
  149. package/dist/client/assets/{index-BONgNC04.js → index-3um-0YWE.js} +1 -1
  150. package/dist/client/assets/index-3yvbELIe.js +1 -0
  151. package/dist/client/assets/{index-CqcefCZu.js → index-9WXzzgOS.js} +2 -2
  152. package/dist/client/assets/{index-DU_EN75b.js → index-BOjNGNvg.js} +1 -1
  153. package/dist/client/assets/index-BgxfZN5I.js +243 -0
  154. package/dist/client/assets/index-BiU97Vx4.js +1 -0
  155. package/dist/client/assets/index-BvCsVc8L.js +2 -0
  156. package/dist/client/assets/{index-BeBh88bO.js → index-Ct9bVcsr.js} +1 -1
  157. package/dist/client/assets/{index-IBL9WNsl.js → index-DIK8YZFn.js} +2 -2
  158. package/dist/client/assets/{index-DJa5VNJ9.js → index-DJTmuPQQ.js} +1 -1
  159. package/dist/client/assets/{index-unq9ZTJD.js → index-DT37BMIF.js} +5 -5
  160. package/dist/client/assets/{index-CqlAEV0m.js → index-Dhveikge.js} +1 -1
  161. package/dist/client/assets/index-Dss8yn2Y.js +1 -0
  162. package/dist/client/assets/{index-w9yV707t.js → index-DyeE93ho.js} +14 -14
  163. package/dist/client/assets/{index-B5YiUV4I.js → index-lUChgCue.js} +1 -1
  164. package/dist/client/assets/index-m9hX09uY.css +1 -0
  165. package/dist/client/assets/{index-redirect-mQgNeOUi.js → index-redirect-CHE6u4Cv.js} +1 -1
  166. package/dist/client/assets/{infiniteQueryObserver-DzxIYVHF.js → infiniteQueryObserver-ClCiPTXN.js} +1 -1
  167. package/dist/client/assets/{infra-billing-BKFmTcoI.js → infra-billing-ChfVikin.js} +1 -1
  168. package/dist/client/assets/input-BSxNJ_GL.js +17 -0
  169. package/dist/client/assets/input-BwymrIPS.js +1 -0
  170. package/dist/client/assets/{integration-icon-DcBDH52f.js → integration-icon-DmnIXoLv.js} +1 -1
  171. package/dist/client/assets/{jira-icon-j32fJ669.js → jira-icon-BLL3j9jm.js} +1 -1
  172. package/dist/client/assets/{label-D0foYPWf.js → label-CXUY_vfR.js} +1 -1
  173. package/dist/client/assets/{layout-Bj7xhNKz.js → layout-DIeTUTU5.js} +1 -1
  174. package/dist/client/assets/legacy-agents-deep-BKyQMU33.js +1 -0
  175. package/dist/client/assets/legacy-main-redirect-BsoX6iN0.js +1 -0
  176. package/dist/client/assets/library-j3CGQ36X.js +1 -0
  177. package/dist/client/assets/{library-tab-CqP8QMPw.js → library-tab-D2qgQui6.js} +4 -4
  178. package/dist/client/assets/{login-DDOgddgu.js → login-E4QHNGwe.js} +1 -1
  179. package/dist/client/assets/{markdown-mBxXiRvM.js → markdown-b3WNjA4d.js} +1 -1
  180. package/dist/client/assets/{mcp-app-renderer-DMqJU_ff.js → mcp-app-renderer-Cn4aCsu6.js} +2 -2
  181. package/dist/client/assets/{mcp-oauth-CS16PRCo.js → mcp-oauth-C3NWluK_.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-Dg0thBi5.js → mcp-oauth-RicpD0nY.js} +1 -1
  183. package/dist/client/assets/{members-C8Uoyb9d.js → members-BxD5PzHF.js} +1 -1
  184. package/dist/client/assets/{memory-DFNhRaxm.js → memory-C9XODnnD.js} +2 -2
  185. package/dist/client/assets/{mini-report-page-CvqJBueU.js → mini-report-page-BIc8DpQB.js} +1 -1
  186. package/dist/client/assets/{mock-board-DXq3mL_y.js → mock-board-ohQUjnsi.js} +1 -1
  187. package/dist/client/assets/{monaco-editor-CPeZZpu3.js → monaco-editor-sh4I5RUd.js} +2 -2
  188. package/dist/client/assets/{monitoring-stats-row-CuuaoKtt.js → monitoring-stats-row-DV6G65vc.js} +1 -1
  189. package/dist/client/assets/{multi-select-DH4C4azS.js → multi-select-B-4k-Bqg.js} +1 -1
  190. package/dist/client/assets/mustache-Ds0VW1db.js +4 -0
  191. package/dist/client/assets/{new-project-dialog-Cqt9GN_i.js → new-project-dialog-B1YWyUQY.js} +1 -1
  192. package/dist/client/assets/{oauth-callback-DRRwxtOq.js → oauth-callback-Dk0amXzl.js} +1 -1
  193. package/dist/client/assets/{oauth-callback-ai-provider-0n-RoExG.js → oauth-callback-ai-provider-yxTXgHsL.js} +1 -1
  194. package/dist/client/assets/{onboarding-BKVLpJKr.js → onboarding-WAcQlT34.js} +1 -1
  195. package/dist/client/assets/openai-conversation-DdRGYa72.js +3 -0
  196. package/dist/client/assets/optimistic-project-sidebar-views-CX9xIBGl.js +1 -0
  197. package/dist/client/assets/{organization-choice-BzhWXbFm.js → organization-choice-ByF9jLiX.js} +1 -1
  198. package/dist/client/assets/{orgs-BaIwjZFJ.js → orgs-BQHW_eGH.js} +1 -1
  199. package/dist/client/assets/page-seo-form-CHn8Xad5.js +1 -0
  200. package/dist/client/assets/{pair-xBw_CC4U.js → pair-CUEfObr7.js} +8 -8
  201. package/dist/client/assets/{plan-ladder-CuhqhssD.js → plan-ladder-DCjrzFrn.js} +1 -1
  202. package/dist/client/assets/{popover-DeebArTG.js → popover-C7Cokk1g.js} +1 -1
  203. package/dist/client/assets/post-calendar-8u0J9Dxw.js +1 -0
  204. package/dist/client/assets/post-editor-BzyUnSeO.js +2 -0
  205. package/dist/client/assets/{preview-content-C5X6_KWi.js → preview-content-DvIKkdby.js} +1 -1
  206. package/dist/client/assets/{preview-dialog-CP9b5pOj.js → preview-dialog-l7y7EMMl.js} +1 -1
  207. package/dist/client/assets/{preview-panel-SuK698dS.js → preview-panel-BVF8JvLU.js} +1 -1
  208. package/dist/client/assets/preview-source-BsRLGWUP.js +1 -0
  209. package/dist/client/assets/preview-tab-DSXQiNWB.js +551 -0
  210. package/dist/client/assets/product-picker-dialog-D1HSCZY-.js +1 -0
  211. package/dist/client/assets/{profile-CNcB1e0i.js → profile-DLHHp5WU.js} +1 -1
  212. package/dist/client/assets/{project-app-view-BPxNtoZa.js → project-app-view-BwoWS8NM.js} +1 -1
  213. package/dist/client/assets/{project-feed-BwN9nKdh.js → project-feed-Bb_IIsXz.js} +1 -1
  214. package/dist/client/assets/{project-icon-B64BT2qc.js → project-icon-Dgrl5qpw.js} +1 -1
  215. package/dist/client/assets/project-reports-C-bRcSvJ.js +1 -0
  216. package/dist/client/assets/project-tasks-DDJFKuGl.js +1 -0
  217. package/dist/client/assets/{projects-1NLUJAKv.js → projects-DRVKv_2I.js} +1 -1
  218. package/dist/client/assets/{projects-empty-state-hsfXEaTK.js → projects-empty-state-CtZ_2AQk.js} +1 -1
  219. package/dist/client/assets/{prompts-DtIJm1-q.js → prompts-BeeaQU8h.js} +1 -1
  220. package/dist/client/assets/record-editor-5RvQSHc4.js +1 -0
  221. package/dist/client/assets/redirect-editor-B1Nkj9GS.js +1 -0
  222. package/dist/client/assets/reports-BGfmbbJs.js +1 -0
  223. package/dist/client/assets/{reports-ACS-Nba_.js → reports-C5l1V9UL.js} +1 -1
  224. package/dist/client/assets/{reports-onboarding-TpGsieg8.js → reports-onboarding-DP7Vd0T2.js} +1 -1
  225. package/dist/client/assets/{reports-tab-BY0hxMVO.js → reports-tab-CtVbVcib.js} +2 -2
  226. package/dist/client/assets/{repositories-CKLepZhj.js → repositories-CbAg-Btm.js} +1 -1
  227. package/dist/client/assets/repository-binding-BFm9AVly.js +1 -0
  228. package/dist/client/assets/{repository-import-picker-BKAJgfVd.js → repository-import-picker-EyjACjb3.js} +1 -1
  229. package/dist/client/assets/{repository-picker-F2WyjZCv.js → repository-picker-CIkU8AaT.js} +1 -1
  230. package/dist/client/assets/{require-capability-BgNMdquK.js → require-capability-BHXvQx1F.js} +1 -1
  231. package/dist/client/assets/{required-auth-layout-C7-28_EU.js → required-auth-layout-BWy4wi63.js} +1 -1
  232. package/dist/client/assets/{reset-password-CKnTOzi4.js → reset-password-BmnWobO1.js} +1 -1
  233. package/dist/client/assets/{resizable-CTrq392s.js → resizable-ojZdlQ3J.js} +1 -1
  234. package/dist/client/assets/resolve-tab-icon-CQA14gzS.js +1 -0
  235. package/dist/client/assets/review-settings-HBrPojjW.js +1 -0
  236. package/dist/client/assets/{roles-BHrtuvIr.js → roles-Dtyn_BZq.js} +1 -1
  237. package/dist/client/assets/route-BnPcnvQE.js +1 -0
  238. package/dist/client/assets/route-FIzJ_P0a.js +1 -0
  239. package/dist/client/assets/route-tGmKNjFY.js +1 -0
  240. package/dist/client/assets/sandbox-git-api-CRxdlhrN.js +1 -0
  241. package/dist/client/assets/sandbox-lifecycle-context-BiADnqP0.js +1 -0
  242. package/dist/client/assets/{schema-Cwz0xn-Q.js → schema-C2wKusx1.js} +1 -1
  243. package/dist/client/assets/{schema-BPpEaREa.js → schema-CP7YDlC2.js} +1 -1
  244. package/dist/client/assets/{scroll-area-ClXMKXdj.js → scroll-area-eDDZTCNn.js} +1 -1
  245. package/dist/client/assets/{search-input-BPlE2YGC.js → search-input-Uw0JKwfe.js} +1 -1
  246. package/dist/client/assets/{search-toggle-BJ6kk5fK.js → search-toggle-sm1qzFKh.js} +1 -1
  247. package/dist/client/assets/secret-ciphertext-CONJpmu9.js +1 -0
  248. package/dist/client/assets/{secret-picker-vqj_Z_Kc.js → secret-picker-60Shu074.js} +1 -1
  249. package/dist/client/assets/{secrets-DNo6UMoB.js → secrets-BoqLiEya.js} +1 -1
  250. package/dist/client/assets/sections-editor-vaJsT4Ye.js +4 -0
  251. package/dist/client/assets/{select-4dFEgKOb.js → select-BFEZcGSl.js} +1 -1
  252. package/dist/client/assets/{select-model-C6MqONr4.js → select-model-DqlWeDem.js} +1 -1
  253. package/dist/client/assets/seo-editor-CH8U1dHr.js +1 -0
  254. package/dist/client/assets/{separator-rAnSnPbj.js → separator-B8-QmvpR.js} +1 -1
  255. package/dist/client/assets/settings-tab-CKwbS1hi.js +4 -0
  256. package/dist/client/assets/{sheet-CV4TQLcF.js → sheet-Nq7jp8TZ.js} +1 -1
  257. package/dist/client/assets/shell-layout-D6cRROrP.js +1 -0
  258. package/dist/client/assets/site-editor-BZvWDg3I.js +1 -0
  259. package/dist/client/assets/site-editor-toast-DKv6_ydN.js +1 -0
  260. package/dist/client/assets/{skills-Cdtjp8Cm.js → skills-D12rIMUM.js} +1 -1
  261. package/dist/client/assets/{slider-C-yLU3nZ.js → slider-DDXbeLEV.js} +1 -1
  262. package/dist/client/assets/{sortable.esm-Di32jx09.js → sortable.esm-B6I_GSlr.js} +1 -1
  263. package/dist/client/assets/{sso-DgQQiYUH.js → sso-BlG3mIxu.js} +1 -1
  264. package/dist/client/assets/{suggestion-DZ2maKDk.js → suggestion-BDdps7f5.js} +2 -2
  265. package/dist/client/assets/{switch-Dl_eh6Nb.js → switch-fTPKFxtt.js} +1 -1
  266. package/dist/client/assets/{symbol-CobSncd2.js → symbol-DzslO63t.js} +1 -1
  267. package/dist/client/assets/{synced-repos-OnaK9DdK.js → synced-repos-BoksOfkS.js} +1 -1
  268. package/dist/client/assets/{tab-icon-glyph-MSjQA0K5.js → tab-icon-glyph-B_Nx9b90.js} +1 -1
  269. package/dist/client/assets/{table-CDMv2RNX.js → table-DM6c5ztx.js} +1 -1
  270. package/dist/client/assets/{tabs-Bm8-oaP0.js → tabs-_ffnq5EI.js} +1 -1
  271. package/dist/client/assets/{task-board-l22wFLNQ.js → task-board-3mxTKXc4.js} +1 -1
  272. package/dist/client/assets/{task-route-D_QgJz9B.js → task-route-Bd7_oRze.js} +1 -1
  273. package/dist/client/assets/{task-status-CmkAheNu.js → task-status-DobFUFUP.js} +1 -1
  274. package/dist/client/assets/taskboard-analytics-BqoskKtI.js +1 -0
  275. package/dist/client/assets/{tasks-CyUEJ-zk.js → tasks-8erS0IrD.js} +3 -3
  276. package/dist/client/assets/tasks-SfkUPw6i.js +1 -0
  277. package/dist/client/assets/{textarea-DoDVPYV2.js → textarea-DuXoEX68.js} +1 -1
  278. package/dist/client/assets/thread-analytics-DRN0lWXv.js +1 -0
  279. package/dist/client/assets/{thread-intent-CXunryww.js → thread-intent-CNERxhpd.js} +6 -6
  280. package/dist/client/assets/{thread-route-BtywJWO6.js → thread-route-B1yKR26I.js} +1 -1
  281. package/dist/client/assets/{thread-route-BPs4zslo.js → thread-route-Ctf783T8.js} +1 -1
  282. package/dist/client/assets/{thread-sheet-body-DATcetgP.js → thread-sheet-body-BOzE-wDr.js} +1 -1
  283. package/dist/client/assets/{time-range-picker-BDkyREOJ.js → time-range-picker-CTRRThMq.js} +1 -1
  284. package/dist/client/assets/{toggle-group-D6lQXGki.js → toggle-group-Cfs_-SSG.js} +1 -1
  285. package/dist/client/assets/{tool-namespace-BCIJDBpU.js → tool-namespace-D2ik4cAJ.js} +1 -1
  286. package/dist/client/assets/{toolbar-icon-button-yglM36kK.js → toolbar-icon-button-CPspdKt4.js} +1 -1
  287. package/dist/client/assets/{tooltip-D58qe9VW.js → tooltip-IZurjemL.js} +1 -1
  288. package/dist/client/assets/{tooltipContext-DmjVpXSV.js → tooltipContext-D100ISAz.js} +1 -1
  289. package/dist/client/assets/{track-R2_XgeZf.js → track-Dgx71QRR.js} +1 -1
  290. package/dist/client/assets/{types-BPkPu0Zu.js → types-BE1SardL.js} +10 -10
  291. package/dist/client/assets/{url-slug-BeoES-bn.js → url-slug-CwNPw3b4.js} +1 -1
  292. package/dist/client/assets/{usage-stats-BL57yImZ.js → usage-stats-CG9oV0kb.js} +34 -34
  293. package/dist/client/assets/{use-ai-providers-Fk-ioKuC.js → use-ai-providers-CPzOGdQy.js} +1 -1
  294. package/dist/client/assets/use-app-takeover-l9YncUZ0.js +1 -0
  295. package/dist/client/assets/{use-automations-CWCytpPL.js → use-automations-B6o4Nbzc.js} +1 -1
  296. package/dist/client/assets/{use-autosave-6dz-PwTx.js → use-autosave-DPNBZc_p.js} +1 -1
  297. package/dist/client/assets/use-chat-navigation-Do_KkN8I.js +1 -0
  298. package/dist/client/assets/{use-clock-tick-Dz0tKfh3.js → use-clock-tick-BnfclhFE.js} +1 -1
  299. package/dist/client/assets/{use-connect-companion-CYsjOss7.js → use-connect-companion-BPMXolOl.js} +1 -1
  300. package/dist/client/assets/{use-connection-CWYEcZtk.js → use-connection-DS1VAR5N.js} +1 -1
  301. package/dist/client/assets/{use-copy-DKdPALi_.js → use-copy-C8TWXH-H.js} +1 -1
  302. package/dist/client/assets/{use-create-virtual-mcp-CRO0toUl.js → use-create-virtual-mcp-CeEuYNMP.js} +1 -1
  303. package/dist/client/assets/{use-date-fns-locale-Bv2awPzh.js → use-date-fns-locale-D3qFWxxv.js} +1 -1
  304. package/dist/client/assets/{use-debounced-autosave-BXZmHqy0.js → use-debounced-autosave-DsoI68di.js} +1 -1
  305. package/dist/client/assets/{use-debounced-value-Bkmt--Vh.js → use-debounced-value-KpwtUdsd.js} +1 -1
  306. package/dist/client/assets/{use-deco-credits-D9reDEA1.js → use-deco-credits-DscUzXq9.js} +1 -1
  307. package/dist/client/assets/{use-decopilot-events-DAjIYzO8.js → use-decopilot-events-D8UIooCs.js} +1 -1
  308. package/dist/client/assets/{use-delete-connection-CmABKTTR.js → use-delete-connection-Dnzv3Wbz.js} +1 -1
  309. package/dist/client/assets/{use-deployment-admin-DSd4dZS8.js → use-deployment-admin-P_SogPj1.js} +1 -1
  310. package/dist/client/assets/use-ensure-project-folder-Dom2nmkC.js +1 -0
  311. package/dist/client/assets/use-fast-preview-draft-url-DnHFw81T.js +1 -0
  312. package/dist/client/assets/use-file-configs-Cv2mXUdp.js +1 -0
  313. package/dist/client/assets/{use-infinite-scroll-IKS1f5vo.js → use-infinite-scroll-CuKgvt7b.js} +1 -1
  314. package/dist/client/assets/{use-join-requests-7cPvmdKM.js → use-join-requests-cLAvpRra.js} +1 -1
  315. package/dist/client/assets/use-main-panel-tabs-B0dFgvCE.js +1 -0
  316. package/dist/client/assets/{use-mcp-auth-status-VoQ-JrKz.js → use-mcp-auth-status-DaPeILTX.js} +1 -1
  317. package/dist/client/assets/{use-mcp-client-F8qIxKEF.js → use-mcp-client-CU2kDBXP.js} +2 -2
  318. package/dist/client/assets/{use-mcp-prompts-BOuduomf.js → use-mcp-prompts-CdDXQMlf.js} +1 -1
  319. package/dist/client/assets/{use-mcp-tools-DJdMQuye.js → use-mcp-tools-CyHq-JFp.js} +1 -1
  320. package/dist/client/assets/{use-members-CbU4crhI.js → use-members-CkpNHwM6.js} +1 -1
  321. package/dist/client/assets/{use-mobile-BKee5QTm.js → use-mobile-DNDEd3kt.js} +1 -1
  322. package/dist/client/assets/{use-navigate-to-agent-LQKyEvv0.js → use-navigate-to-agent-JTDphVE0.js} +1 -1
  323. package/dist/client/assets/{use-open-billing-url-B8yYvcNp.js → use-open-billing-url-2Iqpie3T.js} +1 -1
  324. package/dist/client/assets/{use-org-auth-client-DUhvuYX9.js → use-org-auth-client-Bwzj9WuC.js} +1 -1
  325. package/dist/client/assets/{use-org-fs-CfbJ-qpv.js → use-org-fs-Cg7EJCYS.js} +1 -1
  326. package/dist/client/assets/{use-org-repo-syncs-CzPhz0CF.js → use-org-repo-syncs-D4j72pCa.js} +1 -1
  327. package/dist/client/assets/{use-org-sso-7gybTWnn.js → use-org-sso-CMfwXvs9.js} +1 -1
  328. package/dist/client/assets/{use-organization-roles-CdaGJMnK.js → use-organization-roles-DPDTJ01F.js} +1 -1
  329. package/dist/client/assets/use-organization-settings-BMIqQlbM.js +1 -0
  330. package/dist/client/assets/{use-panel-navigate-DAoDF43u.js → use-panel-navigate-CL5hztR3.js} +1 -1
  331. package/dist/client/assets/use-project-native-view-presence-CBbSdoTE.js +1 -0
  332. package/dist/client/assets/{use-project-scope-C3zEyt8p.js → use-project-scope-DqbIN7fa.js} +1 -1
  333. package/dist/client/assets/use-recent-apps-Beu6vFHw.js +1 -0
  334. package/dist/client/assets/use-releases-Bfs5MNEe.js +1 -0
  335. package/dist/client/assets/{use-reports-diagnostic-Bs8mcbPZ.js → use-reports-diagnostic-QSfTgm94.js} +1 -1
  336. package/dist/client/assets/{use-secrets-fCiG4Asp.js → use-secrets-BaG_Hkwz.js} +1 -1
  337. package/dist/client/assets/use-section-preview-base-DUXeQAGw.js +1 -0
  338. package/dist/client/assets/{use-tags-CXa_QGQ7.js → use-tags-BWRD1El7.js} +1 -1
  339. package/dist/client/assets/{use-task-board-analytics-BmiYUVWm.js → use-task-board-analytics-Bkf73btp.js} +1 -1
  340. package/dist/client/assets/{use-task-board-events-BMlQSCd3.js → use-task-board-events-CLNIzDoN.js} +1 -1
  341. package/dist/client/assets/{use-task-board-item-prs-CGXvUCxe.js → use-task-board-item-prs-Bh5krZjb.js} +1 -1
  342. package/dist/client/assets/{use-task-board-items-DFKc2jHy.js → use-task-board-items-zobNU9xE.js} +1 -1
  343. package/dist/client/assets/use-task-metadata-Bsl_Cezz.js +1 -0
  344. package/dist/client/assets/{use-thread-analytics-C37ZXdud.js → use-thread-analytics-CdWNwDDd.js} +1 -1
  345. package/dist/client/assets/use-thread-outputs-BkgKa2EX.js +1 -0
  346. package/dist/client/assets/useInfiniteQuery-pEq0vd9s.js +1 -0
  347. package/dist/client/assets/{useQueries-BHfkbp1a.js → useQueries-E-2AGLRt.js} +1 -1
  348. package/dist/client/assets/useSuspenseInfiniteQuery-BQsEFgzv.js +1 -0
  349. package/dist/client/assets/{users-CdGgVfVK.js → users-L9Rh2Jo7.js} +1 -1
  350. package/dist/client/assets/{utils-DkhoCm_9.js → utils-Dx9iFvKJ.js} +1 -1
  351. package/dist/client/assets/variant-calendar-CkKYqTGY.js +1 -0
  352. package/dist/client/assets/variant-draft-pointer-CSAndyah.js +1 -0
  353. package/dist/client/assets/{view-mode-toggle-Oj88POra.js → view-mode-toggle-DxuIXC_C.js} +1 -1
  354. package/dist/client/assets/virtual-mcp-D7evpUlE.js +1 -0
  355. package/dist/client/assets/{watch-sse-pool-BpjjRSV_.js → watch-sse-pool-Bs34dRKl.js} +1 -1
  356. package/dist/client/index.html +2 -2
  357. package/dist/server/cli.js +1 -1
  358. package/dist/server/migrate-dbos.js +1 -1
  359. package/dist/server/migrate.js +42 -42
  360. package/dist/server/server.js +777 -737
  361. package/package.json +2 -1
  362. package/dist/client/assets/add-connection-dialog-Cd8-TxBb.js +0 -1
  363. package/dist/client/assets/agent-analytics-CgOyzHtX.js +0 -2
  364. package/dist/client/assets/agent-app-DWW7Imub.js +0 -1
  365. package/dist/client/assets/agent-assets-BcISoUVX.js +0 -1
  366. package/dist/client/assets/agent-automation-hFGAVqfl.js +0 -20
  367. package/dist/client/assets/agent-automations-Ba-x7Ucu.js +0 -1
  368. package/dist/client/assets/agent-connect-sources-BIS9GVvp.js +0 -1
  369. package/dist/client/assets/agent-deck-DPEVXLN-.js +0 -1
  370. package/dist/client/assets/agent-e2e-s6kTYT1M.js +0 -1
  371. package/dist/client/assets/agent-experiments-Dxl1C9iM.js +0 -1
  372. package/dist/client/assets/agent-file-pfVCGOAk.js +0 -1
  373. package/dist/client/assets/agent-hosting-BTX9u40j.js +0 -1
  374. package/dist/client/assets/agent-library-DXQXsht4.js +0 -1
  375. package/dist/client/assets/agent-library-file-D6Vi3vOs.js +0 -1
  376. package/dist/client/assets/agent-monitor-CooIUBTW.js +0 -1
  377. package/dist/client/assets/agent-overview-B2THCwmT.js +0 -1
  378. package/dist/client/assets/agent-settings-Cr6Ua7-i.js +0 -1
  379. package/dist/client/assets/agent-site-editor-Jv_-LWOu.js +0 -25
  380. package/dist/client/assets/agent-site-editor-code-BwIPkqrc.js +0 -2
  381. package/dist/client/assets/agent-site-editor-content-Dz3-PHZu.js +0 -8
  382. package/dist/client/assets/agent-site-editor-preview-CgJHEW_f.js +0 -551
  383. package/dist/client/assets/agent-view-DnTdo1a1.js +0 -1
  384. package/dist/client/assets/agent-view-guard-Bp3FWE2P.js +0 -1
  385. package/dist/client/assets/api-keys-A7GHzfae.js +0 -1
  386. package/dist/client/assets/app-editor-Bt0fzZ_2.js +0 -1
  387. package/dist/client/assets/auth-entry-Cmk5Wmvz.js +0 -1
  388. package/dist/client/assets/blog-schema-CQg-jBGk.js +0 -1
  389. package/dist/client/assets/category-editor-DAWKWbpV.js +0 -1
  390. package/dist/client/assets/chat-context-BMIrv5uH.js +0 -39
  391. package/dist/client/assets/claim-phase-copy-CukA7Dwd.js +0 -1
  392. package/dist/client/assets/collection-detail-CbaGmCRX.js +0 -1
  393. package/dist/client/assets/connection-detail-D_ocZmwm.js +0 -1
  394. package/dist/client/assets/connections-CniO7wM-.js +0 -1
  395. package/dist/client/assets/context-BSQXU5RQ.js +0 -1
  396. package/dist/client/assets/daily-pulse-DevsdiuS.js +0 -1
  397. package/dist/client/assets/device-hint-Di9sQxnE.js +0 -1
  398. package/dist/client/assets/discover-BLt_q0rw.js +0 -1
  399. package/dist/client/assets/flat-project-DYnMR914.js +0 -1
  400. package/dist/client/assets/format-time-CjIPQhCN.js +0 -1
  401. package/dist/client/assets/general-1xmPf-mm.js +0 -1
  402. package/dist/client/assets/home-IMnM6qUa.js +0 -1
  403. package/dist/client/assets/index-B-OFv0CL.js +0 -1
  404. package/dist/client/assets/index-BnoCrGwV.js +0 -243
  405. package/dist/client/assets/index-DQO0lnZr.css +0 -1
  406. package/dist/client/assets/index-DyoR2ZG0.js +0 -1
  407. package/dist/client/assets/input-D4UgTJ69.js +0 -17
  408. package/dist/client/assets/input-Dwwabqbj.js +0 -1
  409. package/dist/client/assets/legacy-agents-deep-BVp2GTsJ.js +0 -1
  410. package/dist/client/assets/legacy-main-redirect-BjFRDgFy.js +0 -1
  411. package/dist/client/assets/library-BBQI7-xd.js +0 -1
  412. package/dist/client/assets/mustache-Dnm8KPo2.js +0 -4
  413. package/dist/client/assets/openai-conversation-MHgeBif6.js +0 -3
  414. package/dist/client/assets/optimistic-project-sidebar-views-nhoEQPGj.js +0 -1
  415. package/dist/client/assets/page-seo-form-DPSCL9_1.js +0 -1
  416. package/dist/client/assets/post-calendar-C2y7NNwt.js +0 -1
  417. package/dist/client/assets/post-editor-BRGQM4sy.js +0 -2
  418. package/dist/client/assets/product-picker-dialog-BI1D6XcE.js +0 -1
  419. package/dist/client/assets/project-reports-UeFimlBu.js +0 -1
  420. package/dist/client/assets/project-tasks-C_MGzrBm.js +0 -1
  421. package/dist/client/assets/record-editor-BZBgjIzu.js +0 -1
  422. package/dist/client/assets/redirect-editor-C6x-CduV.js +0 -1
  423. package/dist/client/assets/reports-C8vsf2am.js +0 -1
  424. package/dist/client/assets/repository-binding-C8cI0_BR.js +0 -1
  425. package/dist/client/assets/resolve-tab-icon-BlUXvZF3.js +0 -1
  426. package/dist/client/assets/review-settings-DqiJkLo7.js +0 -1
  427. package/dist/client/assets/rich-text-link-control-BJZoQZZi.js +0 -1
  428. package/dist/client/assets/route-BscI37la.js +0 -1
  429. package/dist/client/assets/route-CH91bGcP.js +0 -1
  430. package/dist/client/assets/route-saa6yPXu.js +0 -1
  431. package/dist/client/assets/runnable-block-editor-gl-EMkKx.js +0 -17
  432. package/dist/client/assets/sandbox-git-api-C7JbVL7R.js +0 -1
  433. package/dist/client/assets/sandbox-lifecycle-context-D-v0LKtL.js +0 -1
  434. package/dist/client/assets/sections-editor-BkwXm1xr.js +0 -4
  435. package/dist/client/assets/seo-editor-B6SwqtaH.js +0 -1
  436. package/dist/client/assets/settings-tab-Bv9C4ymg.js +0 -4
  437. package/dist/client/assets/shell-layout-CEs2Lzv8.js +0 -1
  438. package/dist/client/assets/taskboard-analytics-D1RzGECH.js +0 -1
  439. package/dist/client/assets/tasks-ybPiOXw5.js +0 -1
  440. package/dist/client/assets/thread-analytics-Cdk2jcnI.js +0 -1
  441. package/dist/client/assets/thread-button-iNSq397a.js +0 -1
  442. package/dist/client/assets/use-chat-layout-state-DXfMGuIM.js +0 -1
  443. package/dist/client/assets/use-chat-navigation-zHRcYkWa.js +0 -1
  444. package/dist/client/assets/use-ensure-project-folder-BL_22sUH.js +0 -1
  445. package/dist/client/assets/use-fast-preview-draft-url-B5iYwDtB.js +0 -1
  446. package/dist/client/assets/use-file-configs-vHZ4c2kM.js +0 -1
  447. package/dist/client/assets/use-main-panel-tabs-B1NvXUoP.js +0 -1
  448. package/dist/client/assets/use-new-blocks-editor-CHx1p4ni.js +0 -1
  449. package/dist/client/assets/use-organization-settings-DE6EFzZl.js +0 -1
  450. package/dist/client/assets/use-releases-BgJG-aAA.js +0 -1
  451. package/dist/client/assets/use-sandbox-events-J3pRq7Wv.js +0 -2
  452. package/dist/client/assets/use-section-preview-base-f9n8yDn_.js +0 -1
  453. package/dist/client/assets/use-task-metadata-0bCOd_zi.js +0 -1
  454. package/dist/client/assets/use-thread-outputs-v6xfPIih.js +0 -1
  455. package/dist/client/assets/useInfiniteQuery-CrNtEvb5.js +0 -1
  456. package/dist/client/assets/useSuspenseInfiniteQuery-Ag6TKbPs.js +0 -1
  457. package/dist/client/assets/variant-calendar-TCxR4Rbi.js +0 -1
  458. package/dist/client/assets/variant-matcher-override-CxhYuii7.js +0 -1
  459. package/dist/client/assets/virtual-mcp-BiznFoUx.js +0 -1
@@ -0,0 +1,551 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-vaJsT4Ye.js","assets/index-BgxfZN5I.js","assets/index-m9hX09uY.css","assets/chat-context-lAP9vX1C.js","assets/use-panel-navigate-CL5hztR3.js","assets/thread-route-Ctf783T8.js","assets/use-project-scope-DqbIN7fa.js","assets/repository-binding-BFm9AVly.js","assets/use-mcp-client-CU2kDBXP.js","assets/auth-CpMllKKy.js","assets/autosend-BPCdEy8S.js","assets/thread-intent-CNERxhpd.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-Bs34dRKl.js","assets/task-board-3mxTKXc4.js","assets/schema-C2wKusx1.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-D8UIooCs.js","assets/use-ai-providers-CPzOGdQy.js","assets/use-chat-navigation-Do_KkN8I.js","assets/location-BjlyegC2.js","assets/use-organization-settings-BMIqQlbM.js","assets/blocks-tab-states-CdRfYXjG.js","assets/site-editor-toast-DKv6_ydN.js","assets/input-BSxNJ_GL.js","assets/usage-stats-CG9oV0kb.js","assets/tool-namespace-D2ik4cAJ.js","assets/form-BLRuutWX.js","assets/label-CXUY_vfR.js","assets/utils-CVEq3hMx.js","assets/markdown-b3WNjA4d.js","assets/use-copy-C8TWXH-H.js","assets/Copy01-CKF8jrEa.js","assets/ZoomOut-C-oiWFtM.js","assets/use-mobile-DNDEd3kt.js","assets/tooltip-IZurjemL.js","assets/index-lUChgCue.js","assets/agent-icon-D1bIPwJ9.js","assets/AlertCircle-D3bAofoi.js","assets/Tool01-BOGFE1PW.js","assets/ArrowUp-D_3dn5Sd.js","assets/ArrowLeft-Cdobx1UV.js","assets/LinkBroken01-BbLhCJ9C.js","assets/ShoppingBag01-gtt6oc_g.js","assets/Building02-Bh6iwr2R.js","assets/CheckCircle-BQiYUYV1.js","assets/ChevronUp-CfnfCq3M.js","assets/ChevronSelectorVertical-CpMmf6o-.js","assets/UserSquare-Dnl3alN_.js","assets/CreditCard01-B4jz404y.js","assets/DotsVertical-BVuRRGqu.js","assets/Image01-C6EZAhw4.js","assets/Globe04-CfnS-Tur.js","assets/SwitchHorizontal01-mzV8h1Yb.js","assets/Key01-C3bTgL7y.js","assets/Link01-Bb9ZHTO8.js","assets/Monitor01-BT48-O3V.js","assets/Sun-D0bMmBqD.js","assets/Play-DlM8u9Zn.js","assets/Plus-h-7fG8-i.js","assets/SearchMd-DdAgg3kt.js","assets/Trash01-BKZKll81.js","assets/Upload01-ClJbirSb.js","assets/User01-jcmfLZ4a.js","assets/Users01-DBt3BOu-.js","assets/XClose-DtCD4hEo.js","assets/format-time-CAj8AQXM.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-08xWmNqW.js","assets/file-type-icon-Bqf9C4DT.js","assets/shell-layout-D6cRROrP.js","assets/avatar-BwGV1yBo.js","assets/use-clock-tick-BnfclhFE.js","assets/command-3UFu4XzT.js","assets/index-DJTmuPQQ.js","assets/integration-icon-DmnIXoLv.js","assets/project-icon-Dgrl5qpw.js","assets/new-project-dialog-B1YWyUQY.js","assets/repository-import-picker-EyjACjb3.js","assets/use-navigate-to-agent-JTDphVE0.js","assets/repository-picker-CIkU8AaT.js","assets/useInfiniteQuery-pEq0vd9s.js","assets/infiniteQueryObserver-ClCiPTXN.js","assets/collection-search-ChJFrp7I.js","assets/use-debounced-value-KpwtUdsd.js","assets/required-auth-layout-BWy4wi63.js","assets/use-org-sso-CMfwXvs9.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-DVJc17WV.js","assets/select-BFEZcGSl.js","assets/index-BdQq_4o_.js","assets/tabs-_ffnq5EI.js","assets/use-deco-credits-DscUzXq9.js","assets/toggle-group-Cfs_-SSG.js","assets/use-open-billing-url-2Iqpie3T.js","assets/index-DIK8YZFn.js","assets/checkbox-DcDvQwKW.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-C7Cokk1g.js","assets/drawer-BnxsVk9h.js","assets/input-BwymrIPS.js","assets/suggestion-BDdps7f5.js","assets/use-project-native-view-presence-CBbSdoTE.js","assets/use-file-configs-Cv2mXUdp.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-CdDXQMlf.js","assets/use-org-fs-Cg7EJCYS.js","assets/question-004-sINsf4GQ.js","assets/use-members-CkpNHwM6.js","assets/use-org-auth-client-Bwzj9WuC.js","assets/feature-paywall-CVHEJqfB.js","assets/plan-ladder-DCjrzFrn.js","assets/add-connection-dialog-CkfM8RAE.js","assets/extract-connection-data-QezQYJtA.js","assets/metadata-D72DunRR.js","assets/connection-C37KtOpn.js","assets/url-slug-CwNPw3b4.js","assets/connection-card-BZTmMkIC.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-DuXoEX68.js","assets/use-connection-DS1VAR5N.js","assets/schema-CP7YDlC2.js","assets/connection-form-helpers-DxBwDmAB.js","assets/authenticate-and-persist-oauth-B45I3cgI.js","assets/mcp-oauth-C3NWluK_.js","assets/mcp-oauth-RicpD0nY.js","assets/collection-tabs-CSxs3D41.js","assets/badge-DZi2puxG.js","assets/use-infinite-scroll-CuKgvt7b.js","assets/useSuspenseInfiniteQuery-BQsEFgzv.js","assets/use-task-board-events-CLNIzDoN.js","assets/input-Bwd_JSM8.css","assets/sandbox-url-D3mC8qhT.js","assets/utils-Dx9iFvKJ.js","assets/index-BvCsVc8L.js","assets/pair-CUEfObr7.js","assets/collapsible-BvvJbkUN.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-Cn4aCsu6.js","assets/types-BE1SardL.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-Nq7jp8TZ.js","assets/use-thread-outputs-BkgKa2EX.js","assets/sandbox-git-api-CRxdlhrN.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/secret-ciphertext-CONJpmu9.js","assets/alert-Bo4bO9Yj.js","assets/switch-fTPKFxtt.js","assets/scroll-area-eDDZTCNn.js","assets/monaco-editor-sh4I5RUd.js","assets/editor-BcMzCvWI.js","assets/calendar-evfJy3uJ.js","assets/editor-classes-qOc25VDM.js","assets/core.esm-CmRvLUZs.js","assets/sortable.esm-B6I_GSlr.js","assets/view-mode-toggle-DxuIXC_C.js","assets/combobox-C7I8ANxO.js","assets/alert-dialog-BEUBWKqO.js","assets/search-input-Uw0JKwfe.js","assets/asset-utils-f7af-ti1.js","assets/empty-state-CLULH17h.js","assets/mustache-Ds0VW1db.js","assets/use-section-preview-base-DUXeQAGw.js","assets/section-preview-url-7zfngvgW.js","assets/page-seo-form-CHn8Xad5.js","assets/variant-draft-pointer-CSAndyah.js"])))=>i.map(i=>d[i]);
2
+ import{c as ne,j as s,r as S,l as Mt,b as _e,B as Xe,aF as $t,aY as Ye,aG as Ne,q as As,D as Os,K as Ds,s as Bs,v as Fs,e as Ir,h as gt,I as ns,w as Ur,aZ as Hr,a2 as yn,a_ as Vr,aX as qr,at as ss,av as rs,a5 as Wr,P as as,y as Gr,t as os,o as Jr,m as Yr}from"./index-BgxfZN5I.js";import{u as Ms,g as Qr,c as Xr,B as ln,P as Zr,r as ea,R as ta,a as na,b as $s,d as Ks,i as sa,S as ra,e as aa,f as oa,C as ia,h as la,j as ca,l as da,m as ua,p as fa,k as ma,n as cn,N as pa}from"./blocks-tab-states-CdRfYXjG.js";import{b as ha,c as It,r as zs,l as Is,f as ga,g as va,w as ba}from"./chat-context-lAP9vX1C.js";import{t as xa}from"./ChevronUp-CfnfCq3M.js";import{S as ya,T as wa,J as Us,U as ka,b as Sa,V as Pa,W as Ea,X as ja,Y as Na,Z as is,L as Ta}from"./agent-icon-D1bIPwJ9.js";import{a as Ca}from"./UserSquare-Dnl3alN_.js";import{s as Ra}from"./Plus-h-7fG8-i.js";import{P as La,a as _a,b as Aa}from"./popover-C7Cokk1g.js";import{a as mt,b as pt,c as Hs,d as Vs,e as qs,C as Ws}from"./command-3UFu4XzT.js";import{c as Oa,a as Da}from"./repository-binding-BFm9AVly.js";import{b as wn}from"./sandbox-lifecycle-context-BiADnqP0.js";import{e as Ba}from"./backoff-CrEUbyZT.js";import{f as Fa}from"./thread-intent-CNERxhpd.js";import{a as Gs}from"./input-BSxNJ_GL.js";import{S as Js,A as Ma,B as $a,C as Ka,F as za,G as Ia,H as Ua,I as Ha,u as kn,J as Sn,K as Ys,L as Va,M as qa,N as Wa,c as Ga,b as Qs,O as Ja,P as Qe,z as Ya,Q as Qa,R as Xa,U as Za,x as eo,V as ls,w as to,W as no,e as so}from"./site-editor-toast-DKv6_ydN.js";import{u as ro}from"./use-mobile-DNDEd3kt.js";import{c as dn,T as un,a as fn}from"./tooltip-IZurjemL.js";import{T as ct}from"./toolbar-icon-button-CPspdKt4.js";import{b as ao,w as At,a as cs,i as oo}from"./variant-draft-pointer-CSAndyah.js";import{d as io,s as lo,L as co,R as Kt,h as ds,N as uo,j as fo,k as ht,n as Pn,l as Xs,f as Fe,v as Zs,m as mo,o as po,q as ho,r as go,t as vo,u as us}from"./secret-ciphertext-CONJpmu9.js";import{r as bo,D as fs,w as ms,b as ps,a as xo}from"./section-preview-url-7zfngvgW.js";import{u as yo}from"./use-fast-preview-draft-url-DnHFw81T.js";import{a as wo,c as er}from"./shell-layout-D6cRROrP.js";import{u as tr,b as ko}from"./index-BvCsVc8L.js";import{u as vn}from"./useQueries-E-2AGLRt.js";import{i as So}from"./LinkBroken01-BbLhCJ9C.js";import{u as nr}from"./blocks-preview-workspace-context-CDjfxqPx.js";import{MonacoCodeEditor as Po}from"./monaco-editor-sh4I5RUd.js";import{a as Eo}from"./utils-Dx9iFvKJ.js";import{R as hs,a as Ot,b as gs}from"./resizable-ojZdlQ3J.js";import{c as jo,a as mn}from"./use-project-native-view-presence-CBbSdoTE.js";import{w as vs}from"./device-hint-SeLRi17j.js";import{r as No}from"./virtual-mcp-D7evpUlE.js";import{d as To}from"./delay-CnY5UFtP.js";import{E as Co}from"./empty-state-CLULH17h.js";import{G as bs}from"./repository-picker-CIkU8AaT.js";import{R as Ro}from"./repository-import-picker-EyjACjb3.js";import{r as Lo}from"./preview-source-BsRLGWUP.js";import{A as _o,a as Ao,b as Oo}from"./alert-Bo4bO9Yj.js";import{u as Do}from"./use-task-metadata-Bsl_Cezz.js";function Bo(t){const e=ne.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(ya,{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(wa,{className:"size-5 sm:size-6"})}),e[6]=l):l=e[6];let d;return e[7]!==r||e[8]!==o?(d=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]=d):d=e[9],d}function Fo(t){const e=ne.c(25),{index:n,numbered:r,step:i,heading:u}=t,a=S.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 d;e[7]!==o||e[8]!==l?(d=s.jsxs("div",{className:"flex items-center gap-3",children:[o,l]}),e[7]=o,e[8]=l,e[9]=d):d=e[9];const p=r&&"sm:pl-9";let m;e[10]!==p?(m=Mt("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(io,{command:i.command}),e[14]=i.command,e[15]=x):x=e[15];let v;e[16]!==i.after||e[17]!==m||e[18]!==f||e[19]!==x?(v=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]=v):v=e[20];let E;return e[21]!==a||e[22]!==d||e[23]!==v?(E=s.jsxs("li",{"aria-labelledby":a,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[d,v]}),e[21]=a,e[22]=d,e[23]=v,e[24]=E):E=e[24],E}const Mo=[];function zt(t){const e=ne.c(20),{title:n,lead:r,waiting:i,alerts:u,steps:a,footer:o,headingLevel:l}=t,d=a===void 0?Mo:a,p=l===void 0?1:l,m=p===1?"h1":"h2",f=i&&d.length===0?"status":void 0;let x;e[0]!==i?(x=s.jsx(Bo,{waiting:i}),e[0]=i,e[1]=x):x=e[1];let v;e[2]!==m||e[3]!==n?(v=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]=v):v=e[4];let E;e[5]!==r?(E=r&&s.jsx("p",{className:"text-pretty text-sm text-muted-foreground",children:r}),e[5]=r,e[6]=E):E=e[6];let g;e[7]!==f||e[8]!==x||e[9]!==v||e[10]!==E?(g=s.jsxs("header",{role:f,className:"flex flex-col items-center gap-3 text-center",children:[x,v,E]}),e[7]=f,e[8]=x,e[9]=v,e[10]=E,e[11]=g):g=e[11];let k;e[12]!==p||e[13]!==d?(k=d.length>0&&s.jsx("ol",{className:"flex flex-col gap-3",children:d.map((y,b)=>s.jsx(Fo,{index:b+1,numbered:d.length>1,step:y,heading:p===1?"h2":"h3"},y.title))}),e[12]=p,e[13]=d,e[14]=k):k=e[14];let j;return e[15]!==u||e[16]!==o||e[17]!==g||e[18]!==k?(j=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]=j):j=e[19],j}function $o(t){const e=ne.c(55),{wait:n,hosts:r,invalidLink:i}=t,u=i===void 0?!1:i,a=_e();let o;e[0]!==u||e[1]!==a?(o=u&&s.jsx(_o,{variant:"warning",children:s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[s.jsx(Ao,{className:"line-clamp-none text-foreground",children:a("decoServe.link.invalidTitle")}),s.jsx(Oo,{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 B;e[3]!==a||e[4]!==n.host||e[5]!==n.problem?(B=lo(a,n.problem,n.host),e[3]=a,e[4]=n.host,e[5]=n.problem,e[6]=B):B=e[6];const{title:R,body:D}=B;let O;e[7]!==D?(O=s.jsx(Kt,{text:D}),e[7]=D,e[8]=O):O=e[8];let F;e[9]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ds,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=F):F=e[9];let _;return e[10]!==l||e[11]!==O||e[12]!==R?(_=s.jsx(zt,{headingLevel:2,waiting:!1,title:R,lead:O,alerts:l,footer:F}),e[10]=l,e[11]=O,e[12]=R,e[13]=_):_=e[13],_}const d=n.kind==="looking",p=d&&!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(co,{})]}),e[18]=l,e[19]=n.kind,e[20]=x):x=e[20];let v;e[21]!==a?(v=a("decoServe.guide.step1.title"),e[21]=a,e[22]=v):v=e[22];let E;e[23]!==a?(E=a("decoServe.guide.step1.body"),e[23]=a,e[24]=E):E=e[24];let g;e[25]!==E?(g=s.jsx(Kt,{text:E}),e[25]=E,e[26]=g):g=e[26];let k;e[27]!==v||e[28]!==g?(k={title:v,body:g,command:Js},e[27]=v,e[28]=g,e[29]=k):k=e[29];let j;e[30]!==a?(j=a("decoServe.waiting.step2.title"),e[30]=a,e[31]=j):j=e[31];let y;e[32]!==a?(y=a("decoServe.waiting.step2.body"),e[32]=a,e[33]=y):y=e[33];let b;e[34]!==r||e[35]!==d||e[36]!==a||e[37]!==n.kind||e[38]!==n.onStart||e[39]!==n.paused?(b=n.kind==="needs-gesture"?s.jsx(Xe,{variant:"outline",className:"self-start",onClick:n.onStart,children:a("decoServe.guide.step2.start")}):d&&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]=d,e[36]=a,e[37]=n.kind,e[38]=n.onStart,e[39]=n.paused,e[40]=b):b=e[40];let w;e[41]!==j||e[42]!==y||e[43]!==b?(w={title:j,body:y,after:b},e[41]=j,e[42]=y,e[43]=b,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 P;e[48]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(ds,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[48]=P):P=e[48];let N;return e[49]!==T||e[50]!==p||e[51]!==m||e[52]!==f||e[53]!==x?(N=s.jsx(zt,{headingLevel:2,waiting:p,title:m,lead:f,alerts:x,steps:T,footer:P}),e[49]=T,e[50]=p,e[51]=m,e[52]=f,e[53]=x,e[54]=N):N=e[54],N}function Ko(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 zo=15e3,Io=3e3;function Uo(t){const{candidates:e,probe:n,onFound:r,onChange:i,doc:u=document,setTimer:a=(b,w)=>setTimeout(b,w),clearTimer:o=b=>clearTimeout(b),timeoutMs:l=Io}=t;let d={status:"searching",firstRoundDone:!1,problem:null},p=!1,m=!1,f=0,x=null,v=null;const E=()=>u.visibilityState==="hidden",g=b=>{d={...d,...b},i(d)},k=async b=>{v=new AbortController;const w=v,T=a(()=>w.abort(),l);try{return await n(b,w.signal),!0}catch(P){if(p)return!1;const N=$a(P);return N.reason!=="not-answering"?g({problem:{...N,endpoint:b}}):d.problem?.endpoint===b&&g({problem:null}),!1}finally{o(T),v=null}},j=async()=>{if(x=null,!(p||m)){if(e.length===0){g({status:"stopped",firstRoundDone:!0});return}if(E()){g({status:"paused"});return}m=!0,d.status!=="searching"&&g({status:"searching"});for(const b of e){if(p)break;if(await k(b)){if(m=!1,p)return;p=!0,u.removeEventListener("visibilitychange",y),g({status:"found",firstRoundDone:!0}),r(b);return}}if(m=!1,!p){if(f+=1,d.firstRoundDone||g({firstRoundDone:!0}),E()){g({status:"paused"});return}x=a(()=>{j()},Ma(f,zo))}}};function y(){if(!p){if(E()){x!==null&&(o(x),x=null),m||g({status:"paused"});return}x!==null&&o(x),f=0,j()}}return u.addEventListener("visibilitychange",y),i(d),j(),()=>{p=!0,x!==null&&o(x),v?.abort(),u.removeEventListener("visibilitychange",y)}}function Ho(t,e){return za(Ia({endpoint:t,fetch:n=>fetch(n,{signal:e})}))}const Vo=["loopback-network","local-network-access"];async function qo(){if(Ka(window.location.origin))return null;for(const t of Vo)try{return await navigator.permissions.query({name:t})}catch{}return null}let sr=null,xs=!1;const pn=new Set;function Wo(t){if(pn.add(t),!xs){xs=!0;const e=n=>{sr=n;for(const r of pn)r()};qo().then(n=>{if(!n)return e("unsupported");e(n.state),n.addEventListener("change",()=>e(n.state))})}return()=>pn.delete(t)}const Go={status:"stopped",firstRoundDone:!1,problem:null},hn=new Map;function Jo(t){const e=hn.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??=Uo({candidates:t.split(" "),probe:Ho,onFound:o=>u.onFound(o),onChange:o=>{n=o;for(const l of r)l()}}),()=>{r.delete(a),!(r.size>0)&&(i?.(),i=null,hn.delete(t))})};return hn.set(t,u),u}function rr(){return S.useSyncExternalStore(Wo,ws,ws)}const Yo=()=>()=>{},ys=()=>Go,ws=()=>sr;function Sc(t){const e=ne.c(9),{candidates:n,onFound:r}=t,[i,u]=S.useState(!1),a=rr(),l=(a==="granted"||a==="unsupported"||a==="prompt"&&i)&&n.length>0;let d;e[0]!==l||e[1]!==n||e[2]!==r?(d=l?Jo(n.join(" ")):null,d&&(d.onFound=r),e[0]=l,e[1]=n,e[2]=r,e[3]=d):d=e[3];const p=S.useSyncExternalStore(d?.subscribe??Yo,d?.getSnapshot??ys,d?.getSnapshot??ys),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 ks={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Qo(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?{...ks,showDecidingLoader:!0}:t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ks: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 Xo=1e4,Zo=1e3,ei=3e4;function ti({iframeRef:t,src:e,active:n}){const r=S.useRef(0),i=S.useRef(null),u=S.useRef(null),a=S.useRef(e),o=S.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},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p()},Xo)},p=()=>{if(!o.current||!a.current)return;u.current&&clearTimeout(u.current);const x=Ba(ei,Zo,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const v=t.current,E=a.current;!v||!E||!o.current||(v.src=E,d())},x)},m=()=>{r.current=0,l()},f=()=>{i.current&&(clearTimeout(i.current),i.current=null),p()};return S.useEffect(()=>{if(l(),r.current=0,!(!n||!e))return d(),l},[e,n]),{handleLoad:m,handleError:f}}const ni=1500,si=500;function ri({iframe:t,reload:e,waitMs:n=ni,confirmMs:r=si}){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 ai=$t({tag:Ne(),id:Ne(),classes:Ne(),text:Ne(),html:Ne(),manifestKey:Ne().nullable(),componentName:Ne().nullable(),parents:Ne(),url:Ne(),path:Ne(),viewport:$t({width:Ye(),height:Ye()}),position:$t({x:Ye(),y:Ye()})}),oi=`(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 ii(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 v=t[r[f]??0];return!v||!v.length?1:v.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]??[],v=o[f]??[],E=l[f]??[];for(let g=1;g<=u;g++){let k=x[g]??0,j=2;const y=v[g-1]??0;y>k&&(k=y,j=0);const b=a(f-1,g-1),w=(x[g-1]??0)+b;b>0&&w>k&&(k=w,j=1),v[g]=k,E[g]=j}}let d=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,d++,p--,m--):f===0?m--:p--}if(d===0&&u===i)for(let f=0;f<i;f++)n[r[f]??0]=f;return n}const li=$t({sectionIndex:Ye(),manifestKey:Ne(),clickSeq:Ye()}),Ss=`(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 = ${ii.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 bn(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const a=u.__resolveType;if(typeof a=="string"&&a&&a!==r){n=u,r=a;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(o=>o?.rule?.__resolveType===uo))return null;const a=[];for(const o of i){const l=o?.value;if(l&&typeof l=="object")for(const d of bn(l,e)??[])a.includes(d)||a.push(d)}return a}if(fo(r)){const i=n.section&&typeof n.section=="object"?bn(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Je(t){return t.replace(/[`*_]/g,"\\$&")}function ci(t,e){const n=[`The user selected an element on the live preview and asked: **"${Je(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:** \`${Je(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="${Je(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Je(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Je(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Je(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 di(t,e,n=320,r=44,i=12){const{x:u,y:a}=t,{width:o,height:l}=e,d=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:d/o*100,topPct:m/l*100}}function ui(t){const e=ne.c(45),{element:n,onDismiss:r}=t,[i,u]=S.useState(""),a=S.useRef(null),{sendMessage:o}=ha(),{openSidePanel:l}=wo(),d=_e();let p;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==l||e[4]!==o?(p=()=>{if(!i.trim())return;const U=ci(n,i);l(),o({parts:[{type:"text",text:U}]}),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=di(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=f):f=e[8];const x=f,v=`${x.leftPct}%`,E=`${x.topPct}%`;let g;e[9]!==v||e[10]!==E?(g={left:v,top:E,width:"320px"},e[9]=v,e[10]=E,e[11]=g):g=e[11];let k;e[12]!==m?(k=U=>{U.preventDefault(),m()},e[12]=m,e[13]=k):k=e[13];let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=U=>u(U.target.value),e[14]=j):j=e[14];let y;e[15]!==r?(y=U=>{U.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let b;e[17]!==d?(b=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=b):b=e[18];let w;e[19]!==i||e[20]!==y||e[21]!==b?(w=s.jsx("input",{ref:a,autoFocus:!0,type:"text",value:i,onChange:j,onKeyDown:y,placeholder:b,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=b,e[22]=w):w=e[22];let T;e[23]!==i?(T=i.trim(),e[23]=i,e[24]=T):T=e[24];const P=!T;let N;e[25]!==d?(N=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=N):N=e[26];let B;e[27]!==d?(B=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=B):B=e[28];let R;e[29]!==B?(R=s.jsx("title",{children:B}),e[29]=B,e[30]=R):R=e[30];let D;e[31]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=D):D=e[31];let O;e[32]!==R?(O=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[R,D]}),e[32]=R,e[33]=O):O=e[33];let F;e[34]!==P||e[35]!==N||e[36]!==O?(F=s.jsx("button",{type:"submit",disabled:P,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:O}),e[34]=P,e[35]=N,e[36]=O,e[37]=F):F=e[37];let _;e[38]!==w||e[39]!==F||e[40]!==k?(_=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:k,children:[w,F]}),e[38]=w,e[39]=F,e[40]=k,e[41]=_):_=e[41];let I;return e[42]!==_||e[43]!==g?(I=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:_}),e[42]=_,e[43]=g,e[44]=I):I=e[44],I}const Ps="site-links",fi=/details?page|\bpdp\b/i,mi=/listingpage|\bplp\b/i;function pi(t,e,n){const r=new Set;for(const o of n)fi.test(o)&&r.add("product"),mi.test(o)&&r.add("category");const i=ht(Pn(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 hi=["rosa","preto","pink","black"];function Dt(t,e){const n=e.trim();return n?t(n):hi.flatMap(r=>t(r))}function gi(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 ar=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function En(t){return t.split("/")[0]??""}function vi(t){const e=new Set;for(const n of t){const r=En(n);ar.has(r)&&e.add(r)}return e}function bi(t,e){const n=En(t);return!ar.has(n)||e.size===0?!0:e.has(n)}const xi=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>Dt(n=>gi(t,n),e),optionsFromPayload:Bt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Dt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Bt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Dt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Bt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Dt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Bt},{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:ji}];function yi(t,e,n=new Set){const r=[...e],i=o=>{const l=[];for(const d of xi){if(d.kind!==o)continue;const p=r.find(m=>d.test(m)&&bi(m,n));p&&l.push({cand:d,resolveType:p})}return l.find(d=>n.has(En(d.resolveType)))??l[0]},u=(o,l,d)=>({kind:o.kind,id:`${o.kind}:${l}`,resolveType:l,clientFilter:o.clientFilter,isFallback:d,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(wi(t.has("category")?"category":"product")),a}function wi(t){return{kind:t,id:Ps,resolveType:Ps,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Li(e,n)}}function Ie(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function ki(t,e,n){const r=new Set,i=new Set,u=a=>{if(Array.isArray(a)){for(const d of a)u(d);return}const o=Ie(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 d=Ie(e[l])?.__resolveType;typeof d=="string"&&n(d)&&r.add(l),u(e[l])}}for(const d of Object.values(o))u(d)};return u(t),r}function or(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 ir(t){try{return decodeURIComponent(t)}catch{return t}}function Si(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Pi(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Si(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function lr(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=ht(Pn(e)),{pattern:u,order:a}=Pi(i),o=a.indexOf(n);if(o===-1)return null;const l=r.match(u);if(!l)return null;const d=l[o+1]?.replace(/^\/+|\/+$/g,"");return d?ir(d):null}function Bt(t,e){const n=Ie(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=Ie(a);if(!o)continue;const l=lr(o.url,e.template,e.paramName);if(!l||u.has(l))continue;u.add(l);const d=Ie(o.isVariantOf),p=typeof d?.name=="string"&&d.name||typeof o.name=="string"&&o.name||l,m=Array.isArray(o.image)?Ie(o.image[0]):null,f=typeof m?.url=="string"?m.url:void 0;i.push({value:l,label:p,image:f})}return i}function Ei(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?ir(n):null}function ji(t){const e=[],n=new Set,r=(i,u)=>{const a=Ie(i);if(!a)return;const o=typeof a.name=="string"&&a.name?a.name:"",l=o?[...u,o]:u,d=Ei(a.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:l.join(" › ")||d})),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 Ni=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 Ti(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Ci(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 Ri(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 Li(t,e){const n=[],r=new Set,i=(u,a,o,l)=>{if(n.length>=200)return;const d=lr(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||o==="category"&&Ni.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:a&&a.length<=80?a:Ti(d),kind:o,image:l}))};for(const{url:u,name:a,image:o}of Ri(t))i(u,a,"product",o);for(const{href:u,text:a}of Ci(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,a,"category");return n}function dt(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 cr=1e4;function _i(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 Ai(t,{resolveType:e,props:n}){const r=await fetch(Ua(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(cr)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Es(t,e){const n=await fetch(Ha(t,e),{signal:AbortSignal.timeout(cr)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Oi(t,e,n){const r=e.optionsFromPayload(await Es(t,"/"),n),i=r.find(a=>a.kind==="category");if(!i)return r;const u=Fe(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const a=e.optionsFromPayload(await Es(t,u),n).filter(o=>o.kind==="product");return or([r,a])}catch{return r}}function Di(t,e,n){return Ds.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Bi(t,e,n,r){if(e.homepageLinks)return Oi(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(o=>Ai(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 or(a.map(o=>e.optionsFromPayload(o,r)))}function xn(t,e,n,r,i){return{queryKey:Di(t,e,n),queryFn:()=>Bi(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function ut(t){const e=ne.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:a,keyPrefix:o,onSelect:l}=t;if(i.length===0)return null;let d;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(pt,{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(Us,{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:Fe(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],d=i.map(m),e[0]=r,e[1]=o,e[2]=l,e[3]=i,e[4]=a,e[5]=u,e[6]=d}else d=e[6];let p;return e[13]!==n||e[14]!==d?(p=s.jsx(mt,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=p):p=e[15],p}function js(t){const e=ne.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 Fi(t){const e=ne.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:a,onCommit:o}=t,l=_e(),[d,p]=S.useState(!1),[m,f]=S.useState(""),[x,v]=S.useState(""),E=S.useRef(null),g=i==="*"?l("sandbox.preview.catchAllParamLabel"):`:${i}`,k=_i(l),y=[...new Set(n.map(M=>k[M.kind].noun))].join(" or ");let b;e[0]!==l||e[1]!==y?(b=l("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=l,e[1]=y,e[2]=b):b=e[2];const w=b,T={template:r,paramName:i};let P;e[3]!==m?(P=(M,G)=>({source:M,query:G,options:M.clientFilter?dt(G.data??[],m):G.data??[]}),e[3]=m,e[4]=P):P=e[4];const N=P,B=n.filter(Vi),R=n.filter(Hi),D=vn({queries:B.map(M=>xn(a,M,x,T,d))});let O;e[5]!==D||e[6]!==N?(O=(M,G)=>N(M,D[G]),e[5]=D,e[6]=N,e[7]=O):O=e[7];const F=B.map(O),_=F.length===0||F.every(Ui),I=vn({queries:R.map(M=>xn(a,M,x,T,d&&_))});let U;e[8]!==I||e[9]!==N?(U=(M,G)=>N(M,I[G]),e[8]=I,e[9]=N,e[10]=U):U=e[10];const X=R.map(U),z=_?X:F,q=z.length===1&&z[0]?.source.homepageLinks?z[0]:null,ee=q&&!q.query.isLoading&&!q.query.isError?q?.query.data??[]:[],ce=dt(ee.filter(Ii),m),C=dt(ee.filter(zi),m),H=ce.length>0&&C.length>0,A=M=>{p(M),E.current&&clearTimeout(E.current),f(M?u:""),v(M?u:"")};let J;e[11]===Symbol.for("react.memo_cache_sentinel")?(J=M=>{f(M),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{v(M)},300)},e[11]=J):J=e[11];const Y=J,Q=M=>{o(M),A(!1)},he=Xs(m),se=Fe(r,{[i]:he}),W=Os,oe=As,ye="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=Ki;let re;e[12]!==g||e[13]!==l?(re=l("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=l,e[14]=re):re=e[14];let ue;e[15]!==re?(ue=s.jsx(Bs,{className:"sr-only",children:s.jsx(Fs,{children:re})}),e[15]=re,e[16]=ue):ue=e[16];let we;e[17]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Us,{size:16,className:"shrink-0 text-foreground"}),e[17]=we):we=e[17];let ae;e[18]!==l?(ae=l("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=l,e[19]=ae):ae=e[19];let fe;e[20]!==g?(fe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=fe):fe=e[21];let ie;e[22]!==ae||e[23]!==fe?(ie=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[we,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ae," ",fe]})]}),e[22]=ae,e[23]=fe,e[24]=ie):ie=e[24];const Te=Vs,ke=!1,Me="min-h-0 flex-1";let ge;e[25]!==w||e[26]!==m?(ge=s.jsx(qs,{autoFocus:!0,placeholder:w,value:m,onValueChange:Y}),e[25]=w,e[26]=m,e[27]=ge):ge=e[27];const Ze=Hs,vt="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Be;e[28]!==l?(Be=l("sandbox.pathParamPickerChip.noResults"),e[28]=l,e[29]=Be):Be=e[29];let Ae;e[30]!==Be?(Ae=s.jsx(Ws,{children:Be}),e[30]=Be,e[31]=Ae):Ae=e[31];const Se=he&&s.jsx(mt,{className:"shrink-0",children:s.jsxs(pt,{value:`__raw__:${he}`,className:"gap-3 py-2",onSelect:()=>Q(he),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(So,{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:he,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:se})]})]})}),$e=H?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(ut,{heading:k.category.heading,iconKind:"category",options:ce,template:r,paramName:i,keyPrefix:`${q?.source.id}:cat`,onSelect:Q})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(ut,{heading:k.product.heading,iconKind:"product",options:C,template:r,paramName:i,keyPrefix:`${q?.source.id}:prod`,onSelect:Q})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:z.map(M=>{const{source:G,query:Ke,options:et}=M,{noun:Ue}=k[G.kind];if(Ke.isLoading)return s.jsx(js,{text:l("sandbox.pathParamPickerChip.loading",{noun:Ue})},G.id);if(Ke.isError)return s.jsx(js,{text:l("sandbox.pathParamPickerChip.couldNotLoad")},G.id);if(G.homepageLinks){const bt=Ke.data??[];return s.jsxs(S.Fragment,{children:[s.jsx(ut,{heading:k.category.heading,iconKind:"category",options:dt(bt.filter($i),m),template:r,paramName:i,keyPrefix:`${G.id}:cat`,onSelect:Q}),s.jsx(ut,{heading:k.product.heading,iconKind:"product",options:dt(bt.filter(Mi),m),template:r,paramName:i,keyPrefix:`${G.id}:prod`,onSelect:Q})]},G.id)}return s.jsx(ut,{heading:z.length>1?k[G.kind].heading:void 0,iconKind:G.kind,options:et,template:r,paramName:i,keyPrefix:G.id,onSelect:Q},G.id)})});let Ce;e[32]!==Ze||e[33]!==Ae||e[34]!==Se||e[35]!==$e?(Ce=s.jsxs(Ze,{className:vt,children:[Ae,Se,$e]}),e[32]=Ze,e[33]=Ae,e[34]=Se,e[35]=$e,e[36]=Ce):Ce=e[36];let Re;e[37]!==Te||e[38]!==ge||e[39]!==Ce?(Re=s.jsxs(Te,{shouldFilter:ke,className:Me,children:[ge,Ce]}),e[37]=Te,e[38]=ge,e[39]=Ce,e[40]=Re):Re=e[40];let Pe;e[41]!==oe||e[42]!==ue||e[43]!==ie||e[44]!==Re||e[45]!==de?(Pe=s.jsxs(oe,{className:ye,onClick:de,children:[ue,ie,Re]}),e[41]=oe,e[42]=ue,e[43]=ie,e[44]=Re,e[45]=de,e[46]=Pe):Pe=e[46];let ve;return e[47]!==W||e[48]!==A||e[49]!==d||e[50]!==Pe?(ve=s.jsx(W,{open:d,onOpenChange:A,children:Pe}),e[47]=W,e[48]=A,e[49]=d,e[50]=Pe,e[51]=ve):ve=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-[12px] text-special hover:bg-special/25",onClick:M=>{M.stopPropagation(),A(!0)},children:u||g}),ve]})}function Mi(t){return t.kind==="product"}function $i(t){return t.kind!=="product"}function Ki(t){return t.stopPropagation()}function zi(t){return t.kind==="product"}function Ii(t){return t.kind!=="product"}function Ui(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Hi(t){return t.isFallback}function Vi(t){return!t.isFallback}function qi(t){const e=ne.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},v=n.filter(Wi);l=vn,o=v.map(E=>xn(u,E,"",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 d;e[6]!==o?(d={queries:o},e[6]=o,e[7]=d):d=e[7];const p=l(d),[m,f]=S.useState(!1);if(!m)for(const x of p){if(x.isLoading)break;const v=x.data?.[0];if(v){f(!0),queueMicrotask(()=>a(v.value));break}}return null}function Wi(t){return!t.isFallback}function Gi(t){const e=ne.c(31),{name:n,value:r,onCommit:i}=t,u=_e(),[a,o]=S.useState(r),[l,d]=S.useState(!1),p=S.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 v;e[3]!==x?(v=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:x}),e[3]=x,e[4]=v):v=e[4];let E;e[5]!==f||e[6]!==u?(E=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=E):E=e[7];let g,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=N=>o(N.target.value),k=()=>d(!0),e[8]=g,e[9]=k):(g=e[8],k=e[9]);let j;e[10]!==r?(j=N=>{N.key==="Enter"&&N.currentTarget.blur(),N.key==="Escape"&&(p.current=!0,o(r),N.currentTarget.blur())},e[10]=r,e[11]=j):j=e[11];let y;e[12]!==a||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),p.current){p.current=!1;return}const N=Xs(a);o(N),N!==r&&i(N)},e[12]=a,e[13]=i,e[14]=r,e[15]=y):y=e[15];let b;e[16]!==a||e[17]!==f||e[18]!==E||e[19]!==j||e[20]!==y?(b=s.jsx("input",{type:"text",value:a,placeholder:f,title:E,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:Ji,onChange:g,onFocus:k,onKeyDown:j,onBlur:y}),e[16]=a,e[17]=f,e[18]=E,e[19]=j,e[20]=y,e[21]=b):b=e[21];let w;e[22]!==v||e[23]!==b?(w=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[v,b]}),e[22]=v,e[23]=b,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-[10px] text-muted-foreground",children:[s.jsx(ka,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=l,e[26]=u,e[27]=T):T=e[27];let P;return e[28]!==T||e[29]!==w?(P=s.jsxs(s.Fragment,{children:[w,T]}),e[28]=T,e[29]=w,e[30]=P):P=e[30],P}function Ji(t){return t.stopPropagation()}function Yi(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 Qi(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function Xi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Zi(t){const e=ne.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=Ms(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:a,path:o,template:l}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Qr(a),p=l?{...l,name:a,path:o}:Xr(a,o);return await r.mutateAsync({blockKey:d,data:p}),{key:d,name:a,path:o}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Ir(i)}function el(t){const e=ne.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:a,onSubmit:o}=t,l=i===void 0?!1:i,d=_e();let p;e[0]!==d?(p=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=p):p=e[1];const[m,f]=S.useState(p);let x;e[2]!==d?(x=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=x):x=e[3];const[v,E]=S.useState(x),[g,k]=S.useState(ln),[j,y]=S.useState(null),[b,w]=S.useState(n);n!==b&&(w(n),n&&(f(d("sectionsEditor.createPageModal.defaultPageName")),E(d("sectionsEditor.createPageModal.defaultPagePath")),k(ln),y(null)));const T=!!a?.length;let P;e[4]!==l||e[5]!==r?(P=ae=>{!ae&&!l&&(y(null),r(!1))},e[4]=l,e[5]=r,e[6]=P):P=e[6];const N=P;let B;e[7]!==l||e[8]!==m||e[9]!==o||e[10]!==v||e[11]!==T||e[12]!==g?(B=async ae=>{ae.preventDefault();const fe=m.trim(),ie=v.trim();if(!fe||!ie||l)return;const Te=Zs(ie);if(Te){y(Te);return}y(null),await o({name:fe,path:ie,templateKey:T&&g!==ln?g:null})},e[7]=l,e[8]=m,e[9]=o,e[10]=v,e[11]=T,e[12]=g,e[13]=B):B=e[13];const R=B,D=j??u;let O;e[14]!==d?(O=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=O):O=e[15];let F;e[16]!==O?(F=s.jsx(Bs,{children:s.jsx(Fs,{children:O})}),e[16]=O,e[17]=F):F=e[17];let _;e[18]!==d?(_=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=_):_=e[19];let I;e[20]!==_?(I=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:_}),e[20]=_,e[21]=I):I=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=ae=>f(ae.target.value),e[22]=U):U=e[22];let X;e[23]!==d?(X=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=X):X=e[24];let z;e[25]!==l||e[26]!==m||e[27]!==X?(z=s.jsx(ns,{id:"new-page-name",value:m,onChange:U,placeholder:X,autoFocus:!0,disabled:l}),e[25]=l,e[26]=m,e[27]=X,e[28]=z):z=e[28];let q;e[29]!==z||e[30]!==I?(q=s.jsxs("div",{className:"space-y-1.5",children:[I,z]}),e[29]=z,e[30]=I,e[31]=q):q=e[31];let te;e[32]!==d?(te=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=te):te=e[33];let ee;e[34]!==te?(ee=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:te}),e[34]=te,e[35]=ee):ee=e[35];let ce;e[36]===Symbol.for("react.memo_cache_sentinel")?(ce=ae=>E(ae.target.value),e[36]=ce):ce=e[36];let C;e[37]!==d?(C=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=C):C=e[38];let H;e[39]!==l||e[40]!==v||e[41]!==C?(H=s.jsx(ns,{id:"new-page-path",value:v,onChange:ce,placeholder:C,disabled:l}),e[39]=l,e[40]=v,e[41]=C,e[42]=H):H=e[42];let A;e[43]!==ee||e[44]!==H?(A=s.jsxs("div",{className:"space-y-1.5",children:[ee,H]}),e[43]=ee,e[44]=H,e[45]=A):A=e[45];let J;e[46]!==l||e[47]!==T||e[48]!==d||e[49]!==g||e[50]!==a?(J=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:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Zr,{id:"new-page-template",value:g,onChange:k,templates:a??[],disabled:l})]}),e[46]=l,e[47]=T,e[48]=d,e[49]=g,e[50]=a,e[51]=J):J=e[51];let Y;e[52]!==D?(Y=D&&s.jsx("p",{className:"text-xs text-destructive",children:D}),e[52]=D,e[53]=Y):Y=e[53];let Q;e[54]!==q||e[55]!==A||e[56]!==J||e[57]!==Y?(Q=s.jsxs("div",{className:"space-y-4 py-4",children:[q,A,J,Y]}),e[54]=q,e[55]=A,e[56]=J,e[57]=Y,e[58]=Q):Q=e[58];let he;e[59]!==r?(he=()=>r(!1),e[59]=r,e[60]=he):he=e[60];let se;e[61]!==d?(se=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=se):se=e[62];let W;e[63]!==l||e[64]!==he||e[65]!==se?(W=s.jsx(Xe,{type:"button",variant:"outline",onClick:he,disabled:l,children:se}),e[63]=l,e[64]=he,e[65]=se,e[66]=W):W=e[66];let oe;e[67]!==l||e[68]!==m||e[69]!==v?(oe=!m.trim()||!v.trim()||l,e[67]=l,e[68]=m,e[69]=v,e[70]=oe):oe=e[70];let ye;e[71]!==l||e[72]!==d?(ye=l?s.jsxs(s.Fragment,{children:[s.jsx(gt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=l,e[72]=d,e[73]=ye):ye=e[73];let de;e[74]!==oe||e[75]!==ye?(de=s.jsx(Xe,{type:"submit",disabled:oe,children:ye}),e[74]=oe,e[75]=ye,e[76]=de):de=e[76];let re;e[77]!==W||e[78]!==de?(re=s.jsxs(Ur,{children:[W,de]}),e[77]=W,e[78]=de,e[79]=re):re=e[79];let ue;e[80]!==R||e[81]!==Q||e[82]!==re||e[83]!==F?(ue=s.jsx(As,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[F,Q,re]})}),e[80]=R,e[81]=Q,e[82]=re,e[83]=F,e[84]=ue):ue=e[84];let we;return e[85]!==N||e[86]!==n||e[87]!==ue?(we=s.jsx(Os,{open:n,onOpenChange:N,children:ue}),e[85]=N,e[86]=n,e[87]=ue,e[88]=we):we=e[88],we}function tl(t){const e=ne.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:a,decofile:o,blockKey:l}=t,d=_e();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=Ms(p);let f;e[4]!==m?(f=na((w,T)=>m.mutate({blockKey:w,data:T})),e[4]=m,e[5]=f):f=e[5];const x=f;let v;e[6]!==l||e[7]!==o?(v=ea(o,l),e[6]=l,e[7]=o,e[8]=v):v=e[8];const{resolveType:E,props:g,title:k}=v;if(!E){let w;e[9]!==d?(w=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,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 j=`loader:${l}`;let y;e[13]!==l||e[14]!==E||e[15]!==k?(y={mode:"saved",blockKey:l,resolveType:E,title:k},e[13]=l,e[14]=E,e[15]=k,e[16]=y):y=e[16];let b;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]!==j||e[26]!==y||e[27]!==r?(b=s.jsx(ta,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:a,decofile:o,kind:"loaders",target:y,initialValue:g,isCreating:m.isPending,onCreate:nl,onSaveReferencedBlock:x,showRun:!1},j),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]=j,e[26]=y,e[27]=r,e[28]=b):b=e[28],b}async function nl(){}function sl(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Ns(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:sl(t.error)}}function rl(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 al(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=rl(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 ol=S.lazy(()=>Hr(()=>import("./sections-editor-vaJsT4Ye.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])).then(t=>({default:t.SectionsEditor})));function Ts(t){const e=ne.c(60),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:a}=yn(),{currentBranch:o,taskId:l}=It(),d=tr(),p=wn(),m=nr(),f=d.lifecycle.phase==="running",x=p.previewUrl;let v;e[0]!==o||e[1]!==a||e[2]!==x||e[3]!==l||e[4]!==n?(v=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]=v):v=e[5];const E=v,g=kn(n,o);let k;e[6]!==f?(k={fetchEnabled:f},e[6]=f,e[7]=k):k=e[7];const j=Sn(E,k);let y;e[8]!==f?(y={fetchEnabled:f},e[8]=f,e[9]=y):y=e[9];const b=$s(E,y),w=al({lifecyclePhase:d.lifecycle.phase,decofile:Ns(j),meta:Ns(b),hasEditableContent:mo(j.data,b.data),fastPreviewActive:Gs(n).runtime==="cms"||Ys(g)}),T=Ks()===void 0,P=il;if(sa(g)){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=P(s.jsx(oa,{})),e[10]=C):C=e[10],C}if(g.kind==="pending"&&g.retrying){let C;return e[11]!==g?(C=P(s.jsx(ia,{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=P(s.jsx(Vr,{})),e[13]=C):C=e[13],C}if(j.data&&Va(b.data)){const C=m.state.target,H=C?.kind==="page"||C?.kind==="section"?C.key:null,A=H??"",J=o??"";let Y;return e[14]!==j.data||e[15]!==H||e[16]!==a.slug||e[17]!==A||e[18]!==J||e[19]!==n?(Y=P(s.jsx(ra,{orgSlug:a.slug,virtualMcpId:n,branch:J,decofile:j.data,initialKey:H,compact:!0},A)),e[14]=j.data,e[15]=H,e[16]=a.slug,e[17]=A,e[18]=J,e[19]=n,e[20]=Y):Y=e[20],Y}if(w.kind==="empty"){let C;return e[21]===Symbol.for("react.memo_cache_sentinel")?(C=P(s.jsx(la,{})),e[21]=C):C=e[21],C}if(w.kind==="error"){let C;e[22]!==j||e[23]!==p||e[24]!==b||e[25]!==w.source?(C=()=>{if(w.source==="sandbox"){p.retry();return}Promise.all([j.refetch(),b.refetch()])},e[22]=j,e[23]=p,e[24]=b,e[25]=w.source,e[26]=C):C=e[26];const H=C;let A;return e[27]!==H||e[28]!==w.source?(A=P(s.jsx(aa,{source:w.source,onRetry:H})),e[27]=H,e[28]=w.source,e[29]=A):A=e[29],A}let N;e[30]===Symbol.for("react.memo_cache_sentinel")?(N=C=>P(s.jsx("div",{className:"h-full min-h-0",children:C})),e[30]=N):N=e[30];const B=N,R=m.state.target;if(R?.kind==="loader"&&j.data&&b.data){const C=o??"",H=x??null;let A;return e[31]!==j.data||e[32]!==b.data||e[33]!==a.slug||e[34]!==C||e[35]!==H||e[36]!==R.key||e[37]!==n?(A=B(s.jsx(tl,{orgSlug:a.slug,virtualMcpId:n,branch:C,previewUrl:H,meta:b.data,decofile:j.data,blockKey:R.key})),e[31]=j.data,e[32]=b.data,e[33]=a.slug,e[34]=C,e[35]=H,e[36]=R.key,e[37]=n,e[38]=A):A=e[38],A}let D;e[39]!==o||e[40]!==a.slug||e[41]!==R||e[42]!==n?(D=R||!o?null:zs(Is(a.slug,n,o)),e[39]=o,e[40]=a.slug,e[41]=R,e[42]=n,e[43]=D):D=e[43];const O=D;let F="/",_=null,I=null;R?.kind==="page"?(F=R.path,_=R.key):R?.kind==="section"?I=R.key:O&&(F=O.path,_=O.pageKey);const U=_?`page:${_}`:I?`section:${I}`:`path:${F}`;let X;e[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(gt,{className:"size-5 text-muted-foreground"})}),e[44]=X):X=e[44];const z=o??"",q=x??void 0,te=I?null:u,ee=!!_&&m.state.editSeoPageKey===_;let ce;return e[45]!==I||e[46]!==_||e[47]!==F||e[48]!==U||e[49]!==i||e[50]!==a.slug||e[51]!==te||e[52]!==ee||e[53]!==z||e[54]!==q||e[55]!==n||e[56]!==m.consumeEditSeo||e[57]!==m.setFocusedBlock||e[58]!==m.setVariantOverride?(ce=B(s.jsx(S.Suspense,{fallback:X,children:s.jsx(ol,{orgSlug:a.slug,virtualMcpId:n,branch:z,previewReady:!0,previewUrl:q,currentPath:F,activePageBlockKey:_,activeGlobalBlockKey:I,externalSelection:te,initialEditSeo:ee,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},U)})),e[45]=I,e[46]=_,e[47]=F,e[48]=U,e[49]=i,e[50]=a.slug,e[51]=te,e[52]=ee,e[53]=z,e[54]=q,e[55]=n,e[56]=m.consumeEditSeo,e[57]=m.setFocusedBlock,e[58]=m.setVariantOverride,e[59]=ce):ce=e[59],ce}function il(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Cs(t){const e=ne.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,a=_e(),o=Ks(),l=o===!0,d=qa(n);let p;e[0]!==d||e[1]!==r?(p=Wa(d,Eo(r)),e[0]=d,e[1]=r,e[2]=p):p=e[2];const m=p,{org:f}=yn(),{currentBranch:x,taskId:v}=It(),g=wn().previewUrl;let k;e[3]!==x||e[4]!==f.slug||e[5]!==g||e[6]!==v||e[7]!==n?(k=x?{orgSlug:f.slug,virtualMcpId:n,branch:x,threadId:v??null,previewUrl:g}:null,e[3]=x,e[4]=f.slug,e[5]=g,e[6]=v,e[7]=n,e[8]=k):k=e[8];const y=Sn(k),b=x??"";let w;e[9]!==f.slug||e[10]!==b||e[11]!==n?(w={orgSlug:f.slug,virtualMcpId:n,branch:b},e[9]=f.slug,e[10]=b,e[11]=n,e[12]=w):w=e[12];const{save:T,flush:P}=ca(w),N=y.data?.[r],B=y.data===void 0&&y.isLoading||o===void 0,R=y.data!==void 0&&N===void 0,D=!x||R||B;let O;e[13]!==N?(O=N===void 0?"":JSON.stringify(N,null,2),e[13]=N,e[14]=O):O=e[14];const F=O;let _;e[15]!==r||e[16]!==D||e[17]!==T?(_=te=>{if(D)return;let ee;try{ee=JSON.parse(te)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||T(r,ee)},e[15]=r,e[16]=D,e[17]=T,e[18]=_):_=e[18];const I=_;let U;e[19]!==P?(U=()=>({flush:P}),e[19]=P,e[20]=U):U=e[20],S.useImperativeHandle(u,U);let X;e[21]!==m||e[22]!==l||e[23]!==i||e[24]!==a?(X=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(Xe,{variant:"ghost",size:"icon",onClick:i,"aria-label":a("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(qr,{size:14})})]}),e[21]=m,e[22]=l,e[23]=i,e[24]=a,e[25]=X):X=e[25];let z;e[26]!==y.data||e[27]!==P||e[28]!==F||e[29]!==B||e[30]!==R||e[31]!==r||e[32]!==D||e[33]!==I||e[34]!==a?(z=B?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(gt,{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(Po,{code:F,language:"json",readOnly:D,height:"100%",onChange:te=>I(te??""),onSave:te=>{I(te),P()}},`${r}:${y.data===void 0?"loading":"ready"}`)}),e[26]=y.data,e[27]=P,e[28]=F,e[29]=B,e[30]=R,e[31]=r,e[32]=D,e[33]=I,e[34]=a,e[35]=z):z=e[35];let q;return e[36]!==X||e[37]!==z?(q=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[X,z]}),e[36]=X,e[37]=z,e[38]=q):q=e[38],q}function dr(t){return t.contentEditingEnabled&&!t.isMobile}function ll(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function cl(t,e){return t==="blocks"?"preview":e?"blocks":t}function dl(t){return dr({contentEditingEnabled:er(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function ul(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const fl=15e3;function ml(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 Rs(t){return t.loading?{...t,loading:!1}:t}const pl=500,hl={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Ls=1,Ft=["desktop","mobile","tablet"],gl=["preview","visual","blocks"],_s={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function vl(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 ft(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function gn(t,e){try{return new URL(t,e).href}catch{return null}}function bl(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 xl(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function yl(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),a=l=>{if(l===n)return 100;const d=l.indexOf(n);if(d===-1)return 0;let p=40;return d===0?p+=30:/[\s/-]/.test(l[d-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 wl(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function kl({virtualMcpId:t}){const e=_e(),n=ro(),{currentBranch:r,taskId:i,virtualMcpId:u}=It(),a=!!ga(),o=nr(),l=Oa(u===t?t:null),d=Gs(t),p=No(l?.metadata?.ui?.layout??null),m=er(p),f=dr({contentEditingEnabled:m,isMobile:n}),[x]=S.useState(()=>dl({cmsMode:p,isMobile:n})),[v,E]=ss(rs.previewEditingMode(t),c=>c&&gl.includes(c)?c:null),g=v??x,[k,j]=ss(rs.previewDeviceSize(t),c=>c&&Ft.includes(c)?c:"desktop"),[y,b]=S.useState(null),[w,T]=S.useState(null),P=S.useRef(null),N=S.useRef(null),[B,R]=S.useState(!1),D=S.useRef(null),O=()=>{D.current?.flush(),R(!1)},F=()=>R(c=>(c&&D.current?.flush(),!c)),[_,I]=S.useState({width:0,height:0}),[U,X]=S.useState(!1),[z,q]=S.useState(""),te=S.useRef(null),[ee,ce]=S.useState(!1),[C,H]=S.useState(),[A,J]=S.useState(null),[Y,Q]=S.useState(null),[he,se]=S.useState(null),[W,oe]=S.useState(()=>o.state.target?.kind==="page"?o.state.target.path:"/"),[ye,de]=S.useState(()=>o.state.target?.kind==="page"?o.state.target.key:null),[re,ue]=S.useState({}),[we,ae]=S.useState(!1),fe=S.useRef(null),ie=()=>{ae(!0),fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>ae(!1),15e3)},Te=()=>{fe.current&&(clearTimeout(fe.current),fe.current=null),ae(!1)},{org:ke}=yn(),Me=tr(),ge=wn(),Ze=ge.vmEntry,vt=Me.lifecycle.phase,{url:Be,undecided:Ae}=Ga(t),Se=kn(t,r),{connection:$e}=Qs(t),Ce=jo(t),Re=Ja({hasServeConnection:!!$e,runtime:d.runtime}),Pe=Ae||Re==="github"&&(Ce==="loading"||Ce==="error"),ve=!Ys(Se)&&!Pe&&!(Re==="github"&&Se.kind==="pending"),M=Qe(Se)??Be,G=M??ge.previewUrl,Ke=!!M||vt==="running",et=l?.id===t?Fa(l.metadata):null,Ue=!M&&!Ae&&l?.id===t&&d.runtime==="cms",bt=d.projectDefault==="cms",tt=ve?bo({sandboxUrl:G,previewServerUrl:et,fastPreviewActive:Ue}):null,jn=t&&r?{orgSlug:ke.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:G}:null,Nn=Sn(jn,{fetchEnabled:Ke}),Tn=$s(jn,{fetchEnabled:Ke}),Z=Nn.data,be=Tn.data,He=Z?po(Z,be).sort((c,h)=>c.name.localeCompare(h.name)):[],Cn=t&&r?{orgSlug:ke.slug,virtualMcpId:t,branch:r}:null,Rn=Zi(Cn),Ut=Z&&be?ho(Z,be):[],Ln=ve&&Z&&be?da(be,Z,"loaders"):[],_n=z?(()=>{const c=z.toLowerCase();return He.map(h=>({page:h,score:yl(h.name,h.path,c)})).filter(({score:h})=>h>0).sort((h,L)=>L.score-h.score||h.page.path.length-L.page.path.length).map(({page:h})=>h)})():He,An=Ut.filter(c=>{if(!z)return!0;const h=z.toLowerCase();return c.name.toLowerCase().includes(h)||c.key.toLowerCase().includes(h)||c.resolveType.toLowerCase().includes(h)}),On=f?Ln:[],Dn=On.filter(c=>{if(!z)return!0;const h=z.toLowerCase();return c.title.toLowerCase().includes(h)||c.key.toLowerCase().includes(h)||c.resolveType.toLowerCase().includes(h)}),xt=Y?Ln.find(c=>c.key===Y)??null:null,Le=Pn,Ht=A||Y?null:go(He,W,ye),V=Ht?.key??null,Ve=o.state.target?.kind==="section"?o.state.target.key:o.state.focusedBlockKey??V,yt=Ht?.path??null,qe=(V?re[V]:void 0)??{},xe=Fe(W,qe),Vt={};if(ve&&Ke&&G&&be&&Z){const c=ua(be,"loaders"),h=V?Z[V]:void 0,L=ki(h,Z,le=>c.has(le)),K=vi(L);for(const le of ht(W)){if(le.type!=="param")continue;const De=pi(W,le.name,L),je=yi(De,c,K);je.length>0&&(Vt[le.name]=je)}}const wt=t&&r?{orgSlug:ke.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,Bn=Z&&V?vo(Z,V,0):[],Fn=Z?fa(Bn,Z):[],qt=Fn.map(c=>c.isSavedBlock?c.label:""),Wt=Fn.map(c=>c.isSavedBlock?"global":c.isMultivariate?"variant":"normal"),Gt=Bn.map(c=>bn(c,Z??{})),kt=S.useRef(null),Ee=S.useRef(null),ur=Me.status.state==="paused",Jt=Me.phase,Mn=ma({claimPhase:Jt,lifecycle:Me.lifecycle}),ze=ge.previewState,fr=ge.userStopped,mr=Ya(ke.slug,t??""),{url:Oe}=yo(Ue&&t&&r?{orgSlug:ke.slug,virtualMcpId:t,branch:r,previewServerUrl:et??null,path:xe}:null),pr=bt&&d.runtime==="sandbox",Yt=Qa(Se,Re,Ce),$=Qo({previewState:ze,progressStatus:Mn.status,previewServerUrl:et,fastPreviewActive:Ue,fastPreviewReady:!!Oe,codingSession:pr,localPreviewUrl:M,hostedDraft:Yt,deciding:Pe}),hr=$.showWakingPill||Yt&&$.mode==="production"&&!Oe,nt=$.mode!=="none",gr=$.mode==="production"&&$.iframeBase?ft($.iframeBase):null,We=$.mode==="production"?gr:ft(G),vr=l?.id===t&&l.metadata?.fastPreviewInPlace===!0,st=ve?M?$.mode==="sandbox"&&f&&g==="blocks":$.mode==="production"&&Ue&&vr&&f&&g==="blocks":!1,$n=S.useRef(null),{pin:br,effective:xr}=bl($n.current,{inPlaceRenderActive:st,draftPreviewUrl:Oe,resolvedPath:xe});$n.current=br;const Kn=o.state.variantOverride??[],St=ve?Kn:[],Qt=ve?[]:Kn,yr=$e&&Qe(Se)?ao($e.endpoint,Qt)??fs:null,Ge=vl($.mode==="sandbox"?At(vs(ms(he??gn(xe,$.iframeBase)??$.iframeBase,yr),k),St):$.mode==="production"?At(vs(cs(ms(he??xr??gn(xe,$.iframeBase)??$.iframeBase,hr?fs:null),Qt),k),St):null),zn=Oe??($.iframeBase?gn(xe,$.iframeBase):null),wr=$.mode==="production"?zn?At(cs(zn,Qt),St):null:Ge??$.iframeBase,kr=()=>{const c=wr;c&&window.open(c,"_blank","noopener")},rt=t&&r?Is(ke.slug,t,r):null,at=c=>{rt&&ba(rt,c)},me=o.state.target;S.useEffect(()=>{if(!(!me||!tt||!be))if(me.kind==="page"){const c=re[me.key]??{};Ee.current=Fe(me.path,c),J(null),Q(null),se(null),de(me.key),oe(me.path),at({path:me.path,pageKey:me.key,params:c})}else if(me.kind==="loader")Ee.current=null,J(null),Q(me.key),se(null);else{const c=Ut.find(h=>h.key===me.key);if(c){Ee.current=null;const h=us(be);Q(null),J(c),se(ps(tt,h,c.key))}}},[me,tt,be,re]),S.useEffect(()=>{!V||yt===null||me?.kind==="page"&&me.key===V&&me.path===yt||o.selectTarget({kind:"page",key:V,path:yt})},[V,yt,me]);const[In,Sr]=S.useState(null);if(ze.kind==="iframe"&&In!==ze.previewUrl){const c=In!==null;Sr(ze.previewUrl);const h=rt?zs(rt):null;if(h){if(Ee.current=Fe(h.path,h.params),oe(h.path),de(h.pageKey),se(null),J(null),Q(null),h.pageKey&&Object.keys(h.params).length>0){const L=h.pageKey;ue(K=>({...K,[L]:h.params}))}}else c&&(Ee.current=null,oe("/"),se(null),de(null),J(null),Q(null))}kt.current=Ge;const Pr=$.mode==="production"&&!!Oe&&!M,[Un,Xt]=S.useState({src:Ge??void 0,loading:!1}),Pt=ml(Un,Ge??void 0,Pr);Pt!==Un&&Xt(Pt);const ot=Pt.src,Hn=Pt.loading,Vn=ti({iframeRef:P,src:$.mode==="sandbox"?Ge:null,active:$.mode==="sandbox"}),qn=S.useRef(null);S.useEffect(()=>{const c=Hn?setTimeout(()=>Xt(Rs),fl):null,h=()=>{c&&clearTimeout(c)};if(!Oe||!ot||qn.current===Oe)return h;qn.current=Oe;const L=P.current;return L&&L.getAttribute("src")!==ot&&(ie(),L.src=ot),h},[Oe,ot,Hn]);const Wn=()=>{const c=P.current?.contentWindow,h=We;if(!c||!h||!Z||!V)return;const L=Z[V];if(!L||typeof L!="object")return;const K=xo({previewBaseUrl:h,pageBlock:L,decofile:Z,path:xe,pathTemplate:W});if(!K)return;const le=At(K.src,oo(St,V));c.postMessage({type:"cms-editor::render",src:le,body:K.body},h)},Zt=S.useRef(null);S.useEffect(()=>{if(!st||A||Y||!V||!Z){Zt.current=null;return}const c={nav:JSON.stringify({page:V,path:xe,pathTemplate:W}),content:JSON.stringify(Z)},h=xl(Zt.current,c);Zt.current=c,h&&Wn()},[Z,st,A,Y,V,xe,W]);const en=S.useRef(null);S.useEffect(()=>{if(!st||A||Y||!V||!Z){en.current=null;return}const c=JSON.stringify(o.state.variantOverride??null),h=en.current;en.current={page:V,sig:c},!(!h||h.page!==V||h.sig===c)&&Wn()},[o.state.variantOverride,st,A,Y,V]);const Er=!!t&&!!r&&!Me.notFound&&!fr&&!ur&&(Jt?.kind==="ready"||vt!=="idle"),pe=ul({editingMode:g,sandboxDisplay:$.mode==="sandbox",blocksEditingEnabled:f});S.useEffect(()=>{const c=We;if(!c)return;const h=L=>{if(L.origin===c)if(L.data?.type==="visual-editor::element-clicked"){const K=ai.safeParse(L.data.payload);K.success&&b(K.data)}else if(L.data?.type==="cms-editor::section-clicked"){const K=li.safeParse(L.data.payload);K.success&&T({index:K.data.sectionIndex,seq:K.data.clickSeq})}else L.data?.type==="cms-editor::render-start"?ie():L.data?.type==="cms-editor::render-end"?(Te(),P.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:qt,kinds:Wt,keys:Gt},c)):L.data?.type==="cms-editor::render-error"&&Te()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[We,qt,Wt,Gt]);const Gn=()=>{const c=P.current?.contentWindow,h=ft(G);!c||!h||c.postMessage({type:"visual-editor::activate",script:oi},h)},jr=()=>{const c=P.current?.contentWindow,h=ft(G);!c||!h||c.postMessage({type:"visual-editor::deactivate"},h)},tn=()=>{const c=P.current?.contentWindow,h=We;!c||!h||(c.postMessage($.mode==="production"||M?{type:"editor::inject",args:{script:Ss}}:{type:"visual-editor::activate",script:Ss},h),c.postMessage({type:"cms-editor::set-labels",labels:qt,kinds:Wt,keys:Gt},h))},Nr=()=>{const c=P.current?.contentWindow,h=We;!c||!h||c.postMessage({type:"cms-editor::deactivate"},h)},Tr=()=>{const c=P.current?.contentWindow,h=We;!c||!h||(c.postMessage({type:"cms-editor::clear-hover"},h),c.postMessage({type:"visual-editor::clear-hover"},h))},Et=c=>{if(c==="blocks"&&!f)return;const h=g;!n&&c!==h&&(c==="blocks"?N.current?.resize("30%"):N.current?.collapse()),E(c),b(null),T(null),c!=="blocks"&&Q(null),h==="visual"&&jr(),c==="visual"&&Gn(),h==="blocks"&&c!=="blocks"&&Nr(),c==="blocks"&&tn()},Cr=()=>{Et(ll(g,f))},Rr=()=>{Et(cl(g,f))},nn=()=>{const c=P.current;if(!c)return;ie();const h=document.activeElement,L=c.tabIndex;c.tabIndex=-1,c.style.pointerEvents="none",c.blur(),wl(c,kt.current);let K;const le=()=>{clearTimeout(K),c.tabIndex=L,c.style.pointerEvents="";const De=document.activeElement;(!De||De===document.body||De===c)&&h?.focus(),c.removeEventListener("load",le)};c.addEventListener("load",le),K=setTimeout(le,3e3)};ko(nn);const jt=Xa(ke.slug,t??""),Nt=Yt&&nt&&!!t,Jn=S.useRef(null);S.useEffect(()=>{if(Nt)return Za(jt)},[Nt,jt]);const{reload:it}=eo(ke.slug,t??""),Yn=S.useRef(it.seq);S.useEffect(()=>{if(Yn.current!==it.seq&&(Yn.current=it.seq,!!Nt&&Jn.current===kt.current)){if(it.navigates){ls(jt);return}nn()}},[it.seq]);const Lr=to(Cn),lt=no(Qe(Se)?Lr:""),Qn=S.useRef(lt);S.useEffect(()=>{const c=Qn.current;if(Qn.current=lt,!c||!lt||c===lt)return;const h=P.current;if(h)return ri({iframe:h,reload:nn})},[lt]);const _r=()=>{const c=Ft.indexOf(k);j(Ft[(c+1)%Ft.length])},sn=(c,h)=>{if(!V)return;const L=V,K={...qe,[c]:h};Ee.current=Fe(W,K),ue(le=>({...le,[L]:K})),at({path:W,pageKey:L,params:K})},Ar=Yi({iframeBase:$.iframeBase,resolvedPath:xe,activeGlobalSectionName:A?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Xn=c=>{const h=re[c.key]??{},L=Fe(c.path,h);(A||Le(L)!==Le(xe))&&ie(),Ee.current=L,J(null),Q(null),se(null),T(null),de(c.key),oe(c.path),at({path:c.path,pageKey:c.key,params:h}),o.selectTarget({kind:"page",key:c.key,path:c.path})};va(rt,c=>{(A||Le(c)!==Le(xe))&&ie(),Ee.current=c,J(null),Q(null),se(null),T(null),de(null),oe(c),at({path:c,pageKey:null,params:{}})});const Or=c=>{if(!tt||!be){os.error(e("sandbox.preview.previewMetadataNotReady"));return}ie(),Ee.current=null;const h=us(be),L=ps(tt,h,c.key);J(c),Q(null),se(L),T(null),o.selectTarget({kind:"section",key:c.key})},Dr=c=>{f&&(J(null),Q(c.key),se(null),Et("blocks"),o.selectTarget({kind:"loader",key:c.key}))},Br=async({name:c,path:h,templateKey:L})=>{if(!t||!r)return;const K=Zs(h);if(K){H(K);return}const le=h.trim().startsWith("/")?h.trim():`/${h.trim()}`;if(He.some(je=>Le(je.path)===Le(le))){H(e("sandbox.preview.pageAlreadyExists",{path:le}));return}let De;if(L&&(De=Z?.[L],!De)){H(e("sandbox.preview.templateNoLongerExists"));return}H(void 0);try{const je=await Rn.mutateAsync({name:c,path:le,template:De});ce(!1),os.success(e("sandbox.preview.pageCreated",{name:c})),await To(pl),Xn({key:je.key,name:je.name,path:je.path}),Et("blocks")}catch(je){H(je instanceof Error?je.message:e("sandbox.preview.failedToCreatePage"))}},Tt=Qi({previewSurfaceActive:nt,daemonReady:Er,production:$.mode==="production",servePreviewUrl:Qe(Se)}),Fr=Xi({showPreviewToolbar:Tt,contentEditingEnabled:m}),Ct=()=>{X(!1),q("")},rn=A?.name??xt?.title??Ht?.name,an=Nn.isPending||Tn.isPending,on=an?ft($.iframeBase):rn,Rt=A?`section:${A.key}`:Y?`loader:${Y}`:V?`page:${V}`:void 0,Mr=Tt?Fr?s.jsxs(La,{open:U,onOpenChange:c=>{X(c),c||q("")},children:[s.jsx(_a,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:an?on??void 0:A||xt?rn:[rn,W].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-visible:outline-none focus-visible:ring-2 focus-visible:ring-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:[A&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(Sa,{size:11}),e("sandbox.preview.globalBadge")]}),xt&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(Pa,{size:11}),e("sandbox.preview.loaderBadge")]}),on&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:on}),!an&&!A&&!xt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:W}),s.jsx(xa,{size:12,className:Mt("shrink-0 transition-transform",U&&"rotate-180")})]})})}),s.jsxs(Aa,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(Vs,{shouldFilter:!1,defaultValue:Rt,children:[s.jsx(qs,{value:z,onValueChange:c=>{q(c),te.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(Hs,{ref:te,className:"max-h-80",children:[s.jsx(Ws,{children:He.length===0&&Ut.length===0&&On.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),_n.length>0&&s.jsx(mt,{children:_n.map(c=>s.jsxs(pt,{value:`page:${c.key}`,"aria-current":Rt===`page:${c.key}`||void 0,title:`${c.name} · ${c.path}`,onSelect:()=>{Ct(),Xn(c)},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:c.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:c.path})]},c.key))}),An.length>0&&s.jsx(mt,{heading:e("sandbox.preview.globalComponents"),children:An.map(c=>s.jsx(pt,{value:`section:${c.key}`,"aria-current":Rt===`section:${c.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Ct(),Or(c)},children:s.jsx("span",{className:"truncate",children:c.name})},c.key))}),Dn.length>0&&s.jsx(mt,{heading:e("sandbox.preview.globalLoaders"),children:Dn.map(c=>s.jsx(pt,{value:`loader:${c.key}`,"aria-current":Rt===`loader:${c.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Ct(),Dr(c)},children:s.jsx("span",{className:"truncate",children:c.title})},c.key))})]})]}),!A&&!Y&&ht(W).some(c=>c.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:ht(W).map((c,h)=>{if(c.type==="text")return s.jsx("span",{children:c.text},`text-${h}`);const L=Vt[c.name];return L&&wt?s.jsx(Fi,{sources:L,template:W,paramName:c.name,value:qe[c.name]??"",sandboxRef:wt,onCommit:K=>sn(c.name,K)},`${V}:${c.name}`):s.jsx(Gi,{name:c.name,value:qe[c.name]??"",onCommit:K=>sn(c.name,K)},`${V}:${c.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Xe,{variant:"ghost",className:"w-full justify-start",onClick:()=>{Ct(),H(void 0),ce(!0)},children:[s.jsx(Ra,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Ar}):null,Zn=Tt||m?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(dn,{children:[s.jsx(un,{asChild:!0,children:s.jsx(ct,{onClick:_r,"aria-label":e(_s[k]),children:k==="mobile"?s.jsx(Ea,{size:16}):k==="tablet"?s.jsx(ja,{size:16}):s.jsx(Na,{size:16})})}),s.jsx(fn,{children:e(_s[k])})]}),Mr,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(ct,{onClick:kr,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(Wr,{size:16})})})]}):null,$r=(ve||a)&&$.mode==="sandbox",Lt=hl[k],_t=k==="desktop"&&(_.width===0||_.width>=Lt.width+2*Ls),es=_t?1:Math.min(_.width>0?_.width/(Lt.width+2*Ls):1,1),Kr=_t?{width:"100%",height:"100%"}:{width:`${Lt.width}px`,height:_.height>0?`${_.height/es}px`:`${Lt.height}px`,transform:`scale(${es})`,transformOrigin:"top center"},ts=s.jsxs(s.Fragment,{children:[$r&&(Tt||m)&&s.jsx(ct,{onClick:Cr,"aria-pressed":pe==="visual","aria-label":e("sandbox.preview.visualEditor"),active:pe==="visual",children:s.jsx(is,{size:16})}),f&&s.jsxs(dn,{children:[s.jsx(un,{asChild:!0,children:s.jsx(ct,{onClick:Rr,"aria-pressed":pe==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:pe==="blocks",children:s.jsx(Ca,{size:16})})}),s.jsx(fn,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&s.jsxs(dn,{children:[s.jsx(un,{asChild:!0,children:s.jsx(ct,{onClick:F,"aria-pressed":B,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:B,children:s.jsx(Ta,{size:16})})}),s.jsx(fn,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),zr=!!Y&&pe==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[wt&&Object.entries(Vt).map(([c,h])=>(qe[c]??"")===""?s.jsx(qi,{sources:h,template:W,paramName:c,sandboxRef:wt,onFill:L=>sn(c,L)},`${V}:${c}`):null),s.jsxs(s.Fragment,{children:[s.jsx(as.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Zn}),children:Zn}),s.jsx(as.Toolbar.Right.Portal,{fallback:ts,children:ts})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:zr?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Ts,{virtualMcpId:t,externalSelection:w,onViewJsonFile:F}),B&&Ve&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Cs,{ref:D,virtualMcpId:t,pageKey:Ve,onClose:O})})]}):s.jsxs(hs,{orientation:"horizontal",disabled:pe!=="blocks",className:"relative isolate",children:[s.jsx(Ot,{ref:N,id:"preview-blocks-editor",defaultSize:pe==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:pe==="blocks"&&s.jsx(Ts,{virtualMcpId:t,externalSelection:w,onViewJsonFile:F})}),pe==="blocks"&&s.jsx(gs,{withHandle:!0}),s.jsx(Ot,{id:"preview-canvas",defaultSize:pe==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(hs,{orientation:"horizontal",disabled:!(B&&Ve),children:[s.jsx(Ot,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:c=>{if(!c)return;const h=()=>I(K=>K.width===c.clientWidth&&K.height===c.clientHeight?K:{width:c.clientWidth,height:c.clientHeight});h();const L=new ResizeObserver(h);return L.observe(c),()=>L.disconnect()},className:Mt("h-full relative overflow-clip flex justify-center",nt&&!_t&&"bg-muted/30"),children:[(we||mr)&&nt&&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"})}),$.showDecidingLoader&&s.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:s.jsx(gt,{className:"size-5 text-muted-foreground"})}),$.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(cn,{kind:"starting",progress:Mn,claimPhase:Jt})}),!M&&!Pe&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(cn,{kind:"suspended",onResume:ge.resume})}),!M&&!Pe&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(cn,{kind:"errored",error:ze.error,onRetry:ge.retry,connectionsHref:`/${ke.slug}/settings/connections`})}),$.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 border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(gt,{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")})]})]}),pe==="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-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(is,{size:12}),e("sandbox.preview.clickElementToAsk")]}),pe==="visual"&&y&&s.jsx(ui,{element:y,onDismiss:()=>b(null)}),nt&&Ge&&s.jsx("div",{className:Mt("shrink-0",!_t&&"border-x border-border bg-background shadow-sm"),style:Kr,onMouseLeave:Tr,children:s.jsx("iframe",{ref:P,src:ot,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:Vn.handleError,onLoad:()=>{if(Xt(Rs),Vn.handleLoad(),Te(),Jn.current=kt.current,Nt&&ls(jt),$.mode!=="sandbox"||M){($.mode==="production"&&!$.showWakingPill||M)&&pe==="blocks"&&tn();return}if(Gr("vm_preview_loaded",{view_mode:pe,vm_id:Ze?.sandboxHandle??null}),!A)try{const c=P.current?.contentWindow?.location?.pathname;if(!c)return;const h=Ee.current;if(h!==null&&(Ee.current=null,Le(c)!==Le(h))||Le(c)===Le(xe))return;oe(c),at({path:c,pageKey:ye,params:qe})}catch{}pe==="visual"&&Gn(),pe==="blocks"&&tn()}},$.iframeBase)})]})}),B&&Ve&&s.jsxs(s.Fragment,{children:[s.jsx(gs,{withHandle:!0}),s.jsx(Ot,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Cs,{ref:D,virtualMcpId:t,pageKey:Ve,onClose:O})})]})]})})]})}),s.jsx(el,{open:ee,onOpenChange:ce,isPending:Rn.isPending,error:C,templates:He,onSubmit:Br})]})}const Sl=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},Pl=1e4,El=1e4,jl=5e3,Nl=2;function Tl(t,e){return t&&e===0?El:Math.min(1e3*2**Math.max(0,e-1),jl)}function Cl(t,e,n){return e?!0:t===!0&&n<Nl}function Rl(t,e){const n=ne.c(11),r=Sl,i=Jr();let u;n[0]!==t?(u=Ds.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,v=()=>x.abort();f.addEventListener("abort",v);const E=setTimeout(v,Pl),g=await r(t,x.signal).catch(_l);clearTimeout(E),f.removeEventListener("abort",v);const k=i.getQueryData(a),j=g?0:(k?.failures??0)+1;return{up:Cl(k?.up??null,g,j),failures:j}},n[2]=r,n[3]=i,n[4]=a,n[5]=t,n[6]=o):o=n[6];const l=!!t;let d;n[7]!==a||n[8]!==o||n[9]!==l?(d={queryKey:a,queryFn:o,enabled:l,retry:!1,staleTime:0,gcTime:0,refetchInterval:Ll},n[7]=a,n[8]=o,n[9]=l,n[10]=d):d=n[10];const{data:p}=Yr(d);return t?p?.up??null:null}function Ll(t){return t.state.data?Tl(t.state.data.up,t.state.data.failures):!1}function _l(){return!1}function Al(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 Pc(t){const e=ne.c(48),{virtualMcpId:n}=t,r=_e(),i=Da(n),{connection:u}=Qs(n),{activeTask:a,taskId:o,currentBranch:l}=It(),d=Do(o),[p,m]=S.useState(!1),f=kn(n,l);let x;e[0]!==f||e[1]!==u?(x=u?Qe(f):null,e[0]=f,e[1]=u,e[2]=x):x=e[2];const v=x,E=Rl(v),g=rr();if(Lo({threadId:o,sandboxBranch:a?.branch??l,agentHasRepo:mn(i?.metadata),threadHasRepo:mn(d)||mn(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(bs,{className:"size-7 text-foreground"})}),e[3]=y):y=e[3];let b;e[4]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=r,e[5]=b):b=e[5];let w;e[6]!==r?(w=r("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=r,e[7]=w):w=e[7];let T,P;e[8]===Symbol.for("react.memo_cache_sentinel")?(T=()=>m(!0),P=s.jsx(bs,{className:"size-4"}),e[8]=T,e[9]=P):(T=e[8],P=e[9]);let N;e[10]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[10]=r,e[11]=N):N=e[11];let B;e[12]!==N?(B=s.jsxs(Xe,{onClick:T,children:[P,N]}),e[12]=N,e[13]=B):B=e[13];let R;e[14]!==b||e[15]!==w||e[16]!==B?(R=s.jsx(Co,{className:"h-full",image:y,title:b,description:w,actions:B}),e[14]=b,e[15]=w,e[16]=B,e[17]=R):R=e[17];let D;e[18]!==p?(D=s.jsx(Ro,{open:p,onOpenChange:m,mode:"agent"}),e[18]=p,e[19]=D):D=e[19];let O;return e[20]!==D||e[21]!==R?(O=s.jsxs(s.Fragment,{children:[R,D]}),e[20]=D,e[21]=R,e[22]=O):O=e[22],O}if(u&&i&&!Qe(f)){let y;e[23]!==g||e[24]!==f?(y=Al({backend:f,access:g}),e[23]=g,e[24]=f,e[25]=y):y=e[25];let b;e[26]!==u.endpoint?(b=so(u.endpoint),e[26]=u.endpoint,e[27]=b):b=e[27];let w;return e[28]!==y||e[29]!==b?(w=s.jsx(Dl,{status:y,host:b}),e[28]=y,e[29]=b,e[30]=w):w=e[30],w}if(v&&E!==!0){let y;e[31]!==r?(y=r("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=r,e[32]=y):y=e[32];let b;e[33]!==v||e[34]!==r?(b=r("mainPanelTabs.previewTab.localAppWaiting.body",{host:Ol(v)}),e[33]=v,e[34]=r,e[35]=b):b=e[35];let w;e[36]!==b?(w=s.jsx(Kt,{text:b}),e[36]=b,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 P;e[40]!==T?(P=s.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:T}),e[40]=T,e[41]=P):P=e[41];let N;return e[42]!==y||e[43]!==w||e[44]!==P?(N=s.jsx(zt,{headingLevel:2,waiting:!0,title:y,lead:w,footer:P}),e[42]=y,e[43]=w,e[44]=P,e[45]=N):N=e[45],N}let j;return e[46]!==n?(j=s.jsx(pa,{children:s.jsx(kl,{virtualMcpId:n})}),e[46]=n,e[47]=j):j=e[47],j}function Ol(t){try{return new URL(t).host}catch{return t}}function Dl(t){const e=ne.c(20),{status:n,host:r}=t,i=_e();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 d;e[4]!==l?(d=s.jsx(Kt,{text:l}),e[4]=l,e[5]=d):d=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:`${Js} --preview localhost:3000`}],e[8]=p,e[9]=m):m=e[9];let f;return e[10]!==o||e[11]!==d||e[12]!==m?(f=s.jsx(zt,{headingLevel:2,waiting:!1,title:o,lead:d,steps:m}),e[10]=o,e[11]=d,e[12]=m,e[13]=f):f=e[13],f}let u;e[14]!==r||e[15]!==n?(u=Ko(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($o,{wait:u,hosts:r}),e[17]=r,e[18]=u,e[19]=a):a=e[19],a}export{$o as L,Pc as P,zt as S,Sc as u};