decocms 4.523.1 → 4.524.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 (518) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-3iGXaBcM.js → ActiveShapeUtils-gwLrBsiR.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-BoecRmSu.js → AlertCircle-COLuN3Qe.js} +1 -1
  3. package/dist/client/assets/{AreaChart-MrowY4g3.js → AreaChart-Dud7jvcC.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CqjWe78l.js → ArrowLeft-BYNlToA0.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-YHdDe54G.js → ArrowUp-CRFAWnPc.js} +1 -1
  6. package/dist/client/assets/{BarChart-BouCSNlP.js → BarChart-JFNliGSV.js} +1 -1
  7. package/dist/client/assets/{Building02-jY0EsZ3c.js → Building02-DinMBe3_.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-YzghzaT-.js → CartesianChart-Cjgu2ECY.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-DSicPUkM.js → CategoricalChart-Bx8yFu23.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-Bjd4331B.js → CheckCircle-DCMOdEuL.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-C8DO4Eax.js → ChevronSelectorVertical-Dwu4Nr-2.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-D732cexR.js → ChevronUp-4EkxqYyz.js} +1 -1
  13. package/dist/client/assets/{Copy01-BNgQXLom.js → Copy01-Tog1jA1S.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-BI7UbDnJ.js → CreditCard01-B7MC6SfH.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-B4rKTO-K.js → DotsVertical-qUaZHjqd.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-DusfmiIN.js → ErrorBarContext-C1p765z-.js} +1 -1
  17. package/dist/client/assets/{Globe04-BZtelxuk.js → Globe04-CGEgYyKw.js} +1 -1
  18. package/dist/client/assets/{Image01-3jSbcDWw.js → Image01-CW7Pcq-W.js} +1 -1
  19. package/dist/client/assets/{Key01-bgf7_Io3.js → Key01-D_nzK0xg.js} +1 -1
  20. package/dist/client/assets/{Link01-CwY3-TdS.js → Link01-CpcYQ7Qt.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-gZ_Womsg.js → LinkBroken01-Ctb4MZUK.js} +1 -1
  22. package/dist/client/assets/{Minus-Cg_Z4UVA.js → Minus-DoRDGpun.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DfNea12c.js → Monitor01-L9jyZGZ2.js} +1 -1
  24. package/dist/client/assets/{Play-C58uA1z7.js → Play-Du5BNsRy.js} +1 -1
  25. package/dist/client/assets/{Plus-BjxA_ka5.js → Plus-BfnmJh1R.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-kghB-Ev4.js → ReferenceLine-DCCnHWMQ.js} +1 -1
  27. package/dist/client/assets/{SearchMd-BYu5iUPZ.js → SearchMd-JUAl7Zv6.js} +1 -1
  28. package/dist/client/assets/{Sector-B82IN8wU.js → Sector-DL6Ad47o.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-D6PcFAZ3.js → ShoppingBag01-usYkWunw.js} +1 -1
  30. package/dist/client/assets/{Sun-ryrPGG0o.js → Sun-B7TolJAG.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-OacdCVpa.js → SwitchHorizontal01-DcP8c_x_.js} +1 -1
  32. package/dist/client/assets/{Tool01-CcNuzAHc.js → Tool01-Bon-ixH5.js} +1 -1
  33. package/dist/client/assets/{Trash01-B_y6cnc0.js → Trash01-cH2tYIUn.js} +1 -1
  34. package/dist/client/assets/{Upload01-C8k7ObxF.js → Upload01-Bo60o4T6.js} +1 -1
  35. package/dist/client/assets/{UserSquare-DvQcif2z.js → UserSquare-DsAVH788.js} +1 -1
  36. package/dist/client/assets/{Users01-BuIADxiS.js → Users01-Bo_9DitT.js} +1 -1
  37. package/dist/client/assets/{XClose-CE-051ne.js → XClose-DhoOL-T1.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-BBaDHidP.js → ZoomOut-B1U_CHeD.js} +1 -1
  39. package/dist/client/assets/access-gate-CGDwkzkf.js +1 -0
  40. package/dist/client/assets/{add-connection-dialog-CBWhQLk7.js → add-connection-dialog-8gQOdlVv.js} +1 -1
  41. package/dist/client/assets/agent-analytics-Bd5QSkcr.js +1 -0
  42. package/dist/client/assets/agent-app-DSGhLy_N.js +1 -0
  43. package/dist/client/assets/agent-assets-Q4lV98mF.js +1 -0
  44. package/dist/client/assets/agent-automation-Dsupi3DF.js +20 -0
  45. package/dist/client/assets/agent-automations-BonoDEyJ.js +1 -0
  46. package/dist/client/assets/agent-calendar-WpcQ_E3l.js +1 -0
  47. package/dist/client/assets/agent-connect-sources-C0oR1IIZ.js +1 -0
  48. package/dist/client/assets/agent-deck-Y0SX6UB9.js +1 -0
  49. package/dist/client/assets/agent-e2e-nbY2lllw.js +1 -0
  50. package/dist/client/assets/agent-experiments-XS7LGaQh.js +1 -0
  51. package/dist/client/assets/agent-file-DKmgj6b-.js +1 -0
  52. package/dist/client/assets/agent-hosting-BC5YnVoX.js +1 -0
  53. package/dist/client/assets/agent-icon-CVEMdYFU.js +1 -0
  54. package/dist/client/assets/agent-library-CYxkIVFl.js +1 -0
  55. package/dist/client/assets/agent-library-file-DPhxbUtG.js +1 -0
  56. package/dist/client/assets/agent-monitor-C01cwPL-.js +1 -0
  57. package/dist/client/assets/agent-overview-DU1IP4XS.js +1 -0
  58. package/dist/client/assets/agent-releases-BuXXsH8W.js +2 -0
  59. package/dist/client/assets/agent-settings-B7CchDfJ.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-DrsYL7Qi.js → agent-site-editor-DSqJlDXx.js} +2 -2
  61. package/dist/client/assets/agent-site-editor-code-uiPbclqT.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-B9B2SztQ.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-CQGXtn5w.js +1 -0
  64. package/dist/client/assets/agent-view-BNK8YJ86.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-Dw8f_Dem.js → agent-view-guard-Bvqt9A7d.js} +1 -1
  66. package/dist/client/assets/agents-list-BV-RY6eO.js +1 -0
  67. package/dist/client/assets/{ai-providers-DGU07bIw.js → ai-providers-D8opLVHp.js} +2 -2
  68. package/dist/client/assets/{alert-CXq7wXAP.js → alert-CYZdSIKq.js} +1 -1
  69. package/dist/client/assets/analytics-sections-BqhdlzKZ.js +1 -0
  70. package/dist/client/assets/analytics-tab-BWgFTW72.js +2 -0
  71. package/dist/client/assets/api-keys-Dj50tYQ9.js +1 -0
  72. package/dist/client/assets/api-keys-MofJBQfW.js +1 -0
  73. package/dist/client/assets/app-editor-BcJaA3eR.js +1 -0
  74. package/dist/client/assets/{asset-utils-CkfOjXdG.js → asset-utils-DcPLl2K6.js} +1 -1
  75. package/dist/client/assets/{auth-D_mwvS_K.js → auth-CEIITB7d.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-ZO5v_1d8.js → auth-catchall-CEBn1SGS.js} +1 -1
  77. package/dist/client/assets/{auth-entry-B0W-KcwY.js → auth-entry-iXHgBQJV.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-EIGtHpJt.js → auth-split-layout-CsXqgaOS.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-BNMqjh7K.js → authenticate-and-persist-oauth-CN-ocXe3.js} +1 -1
  80. package/dist/client/assets/automation-list-row-JOMePUFR.js +1 -0
  81. package/dist/client/assets/automation-runs-KPGkDZAM.js +1 -0
  82. package/dist/client/assets/automations-BTtfVGNa.js +1 -0
  83. package/dist/client/assets/{autosend-Rn3iicpQ.js → autosend-CbkP_bEt.js} +1 -1
  84. package/dist/client/assets/{badge-CDGhoWxi.js → badge-DeNt4-FX.js} +1 -1
  85. package/dist/client/assets/{block-document-CwibGNVI.js → block-document-BzAW7wGZ.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-D4YnI8VN.js → blocks-preview-workspace-context-aUwmyorT.js} +1 -1
  87. package/dist/client/assets/blocks-tab-states-PBqE8hLO.js +1 -0
  88. package/dist/client/assets/blog-schema-BYLQdC9S.js +1 -0
  89. package/dist/client/assets/buckets-CFL4z0d-.js +1 -0
  90. package/dist/client/assets/build-improve-prompt-doc-BpkVMxpg.js +2 -0
  91. package/dist/client/assets/{calendar-DlQTMw7m.js → calendar-GMyXKkbA.js} +1 -1
  92. package/dist/client/assets/campaigns-view-iaGM9YLd.js +1 -0
  93. package/dist/client/assets/{capability-load-error-DZqK06os.js → capability-load-error-juzFeQ-_.js} +1 -1
  94. package/dist/client/assets/category-editor-lTx7E71S.js +1 -0
  95. package/dist/client/assets/{cdn-tab-CtqgvIhC.js → cdn-tab-QH34WF_J.js} +1 -1
  96. package/dist/client/assets/{chart-Dh4qH5Sx.js → chart-D9k22T0E.js} +1 -1
  97. package/dist/client/assets/{chat-context-CEf_lJrx.js → chat-context-C56OVvQP.js} +7 -7
  98. package/dist/client/assets/{chat-draft-BWhaChdV.js → chat-draft-DNgi8tda.js} +1 -1
  99. package/dist/client/assets/{checkbox-B-X9akcX.js → checkbox-B6N4ay58.js} +1 -1
  100. package/dist/client/assets/choose-editor-CcEH03W4.js +1 -0
  101. package/dist/client/assets/{cli-auth-success-WALyW8uQ.js → cli-auth-success-CkyWspHU.js} +1 -1
  102. package/dist/client/assets/{client-icons-CrD_By3h.js → client-icons-DyjyTud6.js} +1 -1
  103. package/dist/client/assets/cms-settings-editor-CjDcV3Uq.js +1 -0
  104. package/dist/client/assets/{collapsible-D5FtbLtM.js → collapsible-D3gNdr7N.js} +1 -1
  105. package/dist/client/assets/collection-detail-D66AIxA0.js +1 -0
  106. package/dist/client/assets/collection-display-button-C28fH98T.js +1 -0
  107. package/dist/client/assets/{collection-search-RQehoVFG.js → collection-search-BIuQ3VPN.js} +1 -1
  108. package/dist/client/assets/{collection-table-wrapper-BHmn2oUB.js → collection-table-wrapper-7w5ciWB4.js} +1 -1
  109. package/dist/client/assets/{collection-tabs-BnX5iP1F.js → collection-tabs-m2567Q_Z.js} +1 -1
  110. package/dist/client/assets/{column-rules-B40MgWVZ.js → column-rules-DsLrWs5p.js} +2 -2
  111. package/dist/client/assets/{combobox-C3ljSkZg.js → combobox-BEVN0Tvl.js} +1 -1
  112. package/dist/client/assets/{command-CMb7suOV.js → command-N9BazZHl.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-DR1Vwqzz.js → companion-mcps-section-BQyuFD3F.js} +1 -1
  114. package/dist/client/assets/{config-DqTkCyHb.js → config-BmN9tmsx.js} +1 -1
  115. package/dist/client/assets/{connect-DIta94zG.js → connect-CefgSXIv.js} +3 -3
  116. package/dist/client/assets/{connect-layout-0Ai7RfSp.js → connect-layout-CUTmKBkE.js} +1 -1
  117. package/dist/client/assets/connect-source-dialog-CBjVXCAe.js +1 -0
  118. package/dist/client/assets/{connection-DECdok_z.js → connection-CQKYiXol.js} +1 -1
  119. package/dist/client/assets/{connection-card-ygPiujfi.js → connection-card-CvmG6XsV.js} +1 -1
  120. package/dist/client/assets/connection-detail-BloLauxz.js +1 -0
  121. package/dist/client/assets/{connection-form-helpers-WwsXdB5F.js → connection-form-helpers-ytOA1Nl6.js} +1 -1
  122. package/dist/client/assets/connections-BxS3FS9g.js +1 -0
  123. package/dist/client/assets/content-tab-BwyJP-DI.js +22 -0
  124. package/dist/client/assets/context-BakNzIE5.js +1 -0
  125. package/dist/client/assets/{context-menu-DbcS2c7t.js → context-menu-C4h1P6Vl.js} +1 -1
  126. package/dist/client/assets/{context-shell-CIQyklqt.js → context-shell-BxB7W0br.js} +5 -5
  127. package/dist/client/assets/{core.esm-BtSOaBaE.js → core.esm-BYOMVmVh.js} +1 -1
  128. package/dist/client/assets/create-organization-dialog-DqU6G9od.js +1 -0
  129. package/dist/client/assets/{daily-pulse-CH8DO0J_.js → daily-pulse-BlxIy31E.js} +1 -1
  130. package/dist/client/assets/discover-DMRyKZWE.js +1 -0
  131. package/dist/client/assets/{domain-settings-CuqQkLLJ.js → domain-settings-Cj-cRa8T.js} +1 -1
  132. package/dist/client/assets/{drawer-CBUeIn2K.js → drawer-B7ajVnwC.js} +1 -1
  133. package/dist/client/assets/{editor-CxPe-Q-E.js → editor-B7sIq_vQ.js} +1 -1
  134. package/dist/client/assets/{editor-classes-BSm-iwgQ.js → editor-classes-BinXFbFk.js} +1 -1
  135. package/dist/client/assets/{empty-state-BUdzXSg1.js → empty-state-Cc_qF1X6.js} +1 -1
  136. package/dist/client/assets/{empty-state-BzCZ0bf5.js → empty-state-RpLaBfip.js} +1 -1
  137. package/dist/client/assets/experiments-tab-BlgfPezU.js +1 -0
  138. package/dist/client/assets/experiments-tab-choice-DZqY092h.js +1 -0
  139. package/dist/client/assets/{extract-connection-data-DewBd7fP.js → extract-connection-data-ClMH8dL9.js} +1 -1
  140. package/dist/client/assets/{feature-gate-Dof2Z5sB.js → feature-gate-Wo8Dn-M0.js} +1 -1
  141. package/dist/client/assets/{feature-paywall-BQmjnHPQ.js → feature-paywall-C1_xpbwO.js} +1 -1
  142. package/dist/client/assets/file-explorer-DCgzwH3u.js +2 -0
  143. package/dist/client/assets/{file-preview-BnQW8KsX.js → file-preview-DFHvVsCR.js} +1 -1
  144. package/dist/client/assets/{file-share-button-zgq85Ppa.js → file-share-button-DMtXDXf3.js} +2 -2
  145. package/dist/client/assets/{file-type-icon-CnMrgPAl.js → file-type-icon-may_hs3N.js} +1 -1
  146. package/dist/client/assets/{folder-icon-3zXSNb7F.js → folder-icon-DREaQWIx.js} +2 -2
  147. package/dist/client/assets/{form-DWfSZ-uy.js → form-Gz8fbLdb.js} +1 -1
  148. package/dist/client/assets/general-DBULqBSQ.js +1 -0
  149. package/dist/client/assets/held-block-view-DTUWWRfL.js +20 -0
  150. package/dist/client/assets/home-DnXsGhyo.js +1 -0
  151. package/dist/client/assets/{icon-button-DBmNh0NJ.js → icon-button-TQkFyvqB.js} +1 -1
  152. package/dist/client/assets/{index-cD72qupV.js → index-B9NLvHLf.js} +1 -1
  153. package/dist/client/assets/index-BEX8cmtV.js +1 -0
  154. package/dist/client/assets/index-BGcfYf5c.js +4 -0
  155. package/dist/client/assets/index-BNmzMNlZ.js +253 -0
  156. package/dist/client/assets/{index-DipIYjGn.js → index-BNtuHmZB.js} +2 -2
  157. package/dist/client/assets/{index-x6QXFiYo.js → index-C6_m0mjP.js} +1 -1
  158. package/dist/client/assets/{index-BauMDA_C.js → index-CaH8ekvn.js} +1 -1
  159. package/dist/client/assets/{index-CH1yVrTT.js → index-CqFACk2B.js} +3 -3
  160. package/dist/client/assets/{index-DPQJRb2f.js → index-DENKa8lW.js} +6 -6
  161. package/dist/client/assets/{index-Bs2VsSFp.js → index-DNHxXhrW.js} +9 -9
  162. package/dist/client/assets/{index-C6RphnDz.js → index-DgWAoWIc.js} +1 -1
  163. package/dist/client/assets/{index-Nse4lEE5.js → index-DusHyRie.js} +1 -1
  164. package/dist/client/assets/{index-DFiVcvs1.js → index-bf-OLKAU.js} +1 -1
  165. package/dist/client/assets/{index-DdwTulXb.js → index-iynQP1if.js} +1 -1
  166. package/dist/client/assets/{index-CzAA1Ftq.js → index-kd3fyZ9a.js} +1 -1
  167. package/dist/client/assets/{index-redirect-Svh2E4vz.js → index-redirect-DAPRiYQw.js} +1 -1
  168. package/dist/client/assets/{infiniteQueryObserver-BxY60Pl8.js → infiniteQueryObserver-ClGIthQz.js} +1 -1
  169. package/dist/client/assets/{infra-billing-DEwuRVXP.js → infra-billing-Bn8rlKTp.js} +1 -1
  170. package/dist/client/assets/{input-Y4nlSnES.js → input-BS4EACP3.js} +7 -7
  171. package/dist/client/assets/{input-boV3L7bW.js → input-DZSiMfCa.js} +1 -1
  172. package/dist/client/assets/{integration-icon-oEHZLv8F.js → integration-icon-BrTM8z-s.js} +1 -1
  173. package/dist/client/assets/{jira-icon-BkogXsHX.js → jira-icon-CvveHm37.js} +1 -1
  174. package/dist/client/assets/{label-C6V9azY9.js → label-BCxqhVIq.js} +1 -1
  175. package/dist/client/assets/{layout-D4-0fnKG.js → layout-C_-T37yU.js} +1 -1
  176. package/dist/client/assets/legacy-agents-deep-HN0h-Vgf.js +1 -0
  177. package/dist/client/assets/{legacy-main-redirect-DPDO4jzz.js → legacy-main-redirect-HqwAGFUC.js} +1 -1
  178. package/dist/client/assets/library-D2Mrm5WM.js +1 -0
  179. package/dist/client/assets/{login-QwQdytNu.js → login-D25rkjo_.js} +1 -1
  180. package/dist/client/assets/{markdown-DVKH1IaR.js → markdown-P8cO0xLZ.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-DXX6eros.js → mcp-app-renderer-CKUvsXnq.js} +2 -2
  182. package/dist/client/assets/{mcp-oauth-BT1yV9Hn.js → mcp-oauth-C9hLQucs.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-CP_tf4jd.js → mcp-oauth-DBMA8wIh.js} +1 -1
  184. package/dist/client/assets/members-C_tx9w5g.js +1 -0
  185. package/dist/client/assets/{memory-C50Pawnh.js → memory-CsXGZJq1.js} +2 -2
  186. package/dist/client/assets/{mini-report-page-CAjqwv4W.js → mini-report-page-DGZYey3l.js} +1 -1
  187. package/dist/client/assets/{mock-board-D3aM5LBD.js → mock-board-BWzTY2k-.js} +5 -5
  188. package/dist/client/assets/{monaco-editor-LiopisRR.js → monaco-editor-CBJkBgIU.js} +2 -2
  189. package/dist/client/assets/monitoring-BLnrFAQj.js +1 -0
  190. package/dist/client/assets/{monitoring-stats-row-zg7N0blo.js → monitoring-stats-row-vWHUOUB3.js} +1 -1
  191. package/dist/client/assets/{multi-select-lVxVaMtl.js → multi-select-BNfLnIfI.js} +1 -1
  192. package/dist/client/assets/mustache-Crsi4VAX.js +4 -0
  193. package/dist/client/assets/{named-rule-uses-BeXmyiue.js → named-rule-uses-D5gjZwOp.js} +1 -1
  194. package/dist/client/assets/named-rule-view-BVCpec2I.js +1 -0
  195. package/dist/client/assets/{new-project-dialog-DmsgoraK.js → new-project-dialog-BzJmdXI6.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-Bs2w3d0I.js → oauth-callback-CwZ-b3nE.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-CUCvxuBI.js → oauth-callback-ai-provider-CujNNAU2.js} +1 -1
  198. package/dist/client/assets/onboarding-Csy3KW6h.js +1 -0
  199. package/dist/client/assets/openai-conversation-DJfgyA82.js +3 -0
  200. package/dist/client/assets/{optimistic-project-sidebar-views-C7cacXI0.js → optimistic-project-sidebar-views-XzUayXF_.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-D34Jke5D.js → order-monitor-day-BUk1fjA6.js} +1 -1
  202. package/dist/client/assets/organization-choice-BG-EMl8L.js +1 -0
  203. package/dist/client/assets/orgs-BOi51Yxa.js +1 -0
  204. package/dist/client/assets/page-seo-form-D4gneorY.js +1 -0
  205. package/dist/client/assets/{pair-71Dh0mlf.js → pair-Dh_1oqHi.js} +8 -8
  206. package/dist/client/assets/parse-sections-B30A8ECY.js +1 -0
  207. package/dist/client/assets/plan-BXu8SQ3T.js +1 -0
  208. package/dist/client/assets/{plan-ladder-DMra4X10.js → plan-ladder-CN5p5ylK.js} +1 -1
  209. package/dist/client/assets/{popover-DClINcvR.js → popover-DauDBkON.js} +1 -1
  210. package/dist/client/assets/post-calendar-Ceopsk1u.js +1 -0
  211. package/dist/client/assets/post-editor-BChaRDNt.js +2 -0
  212. package/dist/client/assets/{preview-content-T_PMJBX-.js → preview-content-BvhoJjFR.js} +1 -1
  213. package/dist/client/assets/{preview-dialog-BZFfGFuX.js → preview-dialog-iRKqzeeN.js} +1 -1
  214. package/dist/client/assets/{preview-panel-DlTtP1Ms.js → preview-panel-DcbhbW1H.js} +1 -1
  215. package/dist/client/assets/preview-tab-ClK0lOMy.js +551 -0
  216. package/dist/client/assets/{product-picker-dialog-BpSOLmzl.js → product-picker-dialog-CsTqbwXT.js} +1 -1
  217. package/dist/client/assets/profile-DE1V4tEF.js +1 -0
  218. package/dist/client/assets/project-app-view-BpeI5cMf.js +1 -0
  219. package/dist/client/assets/{project-apps-Dm5IS3KO.js → project-apps-CNRV3DAE.js} +1 -1
  220. package/dist/client/assets/project-feed-BcaTqzKD.js +1 -0
  221. package/dist/client/assets/{project-icon-DuRHj8pv.js → project-icon-9kbQzXfH.js} +1 -1
  222. package/dist/client/assets/project-reports-DZCmLCmE.js +1 -0
  223. package/dist/client/assets/project-tasks-D6qNETK3.js +1 -0
  224. package/dist/client/assets/projects-Kz2HQD_e.js +1 -0
  225. package/dist/client/assets/{projects-empty-state-QJ0Cx8Z2.js → projects-empty-state-Df7eS0pA.js} +1 -1
  226. package/dist/client/assets/{prompts-C9l1TNag.js → prompts-B4KLkb4I.js} +1 -1
  227. package/dist/client/assets/record-editor-C5XOx_LV.js +1 -0
  228. package/dist/client/assets/redirect-editor-BxKT3ntE.js +1 -0
  229. package/dist/client/assets/releases-api-BDl7LEw1.js +1 -0
  230. package/dist/client/assets/{reports-BOvqWT5T.js → reports-Cp14zg57.js} +1 -1
  231. package/dist/client/assets/reports-DBFNTtm-.js +1 -0
  232. package/dist/client/assets/reports-onboarding-D2UqC4mS.js +1 -0
  233. package/dist/client/assets/reports-tab-C51R-6vi.js +2 -0
  234. package/dist/client/assets/repositories-C77B6dOt.js +1 -0
  235. package/dist/client/assets/repositories-CHKGn0VU.js +1 -0
  236. package/dist/client/assets/repository-binding-BZ7FmJ0X.js +1 -0
  237. package/dist/client/assets/{repository-import-picker-DmCy1J1K.js → repository-import-picker-Bjws7k2-.js} +1 -1
  238. package/dist/client/assets/repository-picker-DkvIZLAj.js +1 -0
  239. package/dist/client/assets/{require-capability-Bij86NMO.js → require-capability-Bm5pde_M.js} +1 -1
  240. package/dist/client/assets/{required-auth-layout-FVugTURm.js → required-auth-layout-Dn8nNstE.js} +1 -1
  241. package/dist/client/assets/{reset-password-DT6AfwVB.js → reset-password-CHMCFAp9.js} +1 -1
  242. package/dist/client/assets/{resizable-DgP86V61.js → resizable-BYZDi11K.js} +1 -1
  243. package/dist/client/assets/{resolve-tab-icon-D9iIIIDe.js → resolve-tab-icon-DLcHhSBW.js} +1 -1
  244. package/dist/client/assets/review-settings-DEFTQSp0.js +1 -0
  245. package/dist/client/assets/roles-BIj8m30-.js +1 -0
  246. package/dist/client/assets/route-CwIKlFpH.js +1 -0
  247. package/dist/client/assets/route-DQxiKHs8.js +1 -0
  248. package/dist/client/assets/route-L2EzRsks.js +1 -0
  249. package/dist/client/assets/{sandbox-lifecycle-context-q0eTvNvQ.js → sandbox-lifecycle-context-DMfngoi-.js} +1 -1
  250. package/dist/client/assets/{schema-CJ53G47b.js → schema-DEyBWI2y.js} +1 -1
  251. package/dist/client/assets/{schema-DNweLWtn.js → schema-DoiqvTL7.js} +1 -1
  252. package/dist/client/assets/{scroll-area-BHIKiLUM.js → scroll-area-Cfsm1vBV.js} +1 -1
  253. package/dist/client/assets/search-input-DBKkXR0y.js +1 -0
  254. package/dist/client/assets/{search-toggle-DzUrEZFD.js → search-toggle-CzYTwp_L.js} +1 -1
  255. package/dist/client/assets/secret-ciphertext-cTA7BSVY.js +1 -0
  256. package/dist/client/assets/secret-picker-CqxG24X7.js +1 -0
  257. package/dist/client/assets/secrets-CtByih4R.js +1 -0
  258. package/dist/client/assets/{sections-DHvRm7bA.js → sections-CCcpB_PT.js} +1 -1
  259. package/dist/client/assets/sections-editor-DpO_mTF7.js +1 -0
  260. package/dist/client/assets/{select-BvUL0HyR.js → select-CTAm_W2d.js} +1 -1
  261. package/dist/client/assets/{select-model-Szkl3757.js → select-model-Cvj2OnbU.js} +1 -1
  262. package/dist/client/assets/seo-editor-BPToAJRY.js +1 -0
  263. package/dist/client/assets/{separator-vlhb1Tzj.js → separator-BeYssz5V.js} +1 -1
  264. package/dist/client/assets/settings-tab-BRtykuoH.js +1 -0
  265. package/dist/client/assets/{sheet-D1CAQsjr.js → sheet-C52S-h6R.js} +1 -1
  266. package/dist/client/assets/shell-layout-DYY0I41_.js +1 -0
  267. package/dist/client/assets/site-draft-actions-DwqQ-cQC.js +12 -0
  268. package/dist/client/assets/site-draft-view-CiKU2Icp.js +2 -0
  269. package/dist/client/assets/site-editor-CuXmo07G.js +1 -0
  270. package/dist/client/assets/site-editor-toast-CT4NtD1f.js +1 -0
  271. package/dist/client/assets/skills-_WDetSCi.js +1 -0
  272. package/dist/client/assets/{slider-EpxmA7ZL.js → slider-rNbrBC-4.js} +1 -1
  273. package/dist/client/assets/{sortable.esm-CpdZxqSN.js → sortable.esm-Cw5kBwgn.js} +1 -1
  274. package/dist/client/assets/sso-DSG3YPMw.js +1 -0
  275. package/dist/client/assets/{suggestion-DqRsSpc-.js → suggestion-Dd_Uy5Bv.js} +2 -2
  276. package/dist/client/assets/{switch-BudKCJf7.js → switch-nUFQi60k.js} +1 -1
  277. package/dist/client/assets/{symbol-CYQiJJdu.js → symbol-C3kEOGZ_.js} +1 -1
  278. package/dist/client/assets/synced-repos-DBmibobg.js +1 -0
  279. package/dist/client/assets/{tab-icon-glyph-BGGv8hr_.js → tab-icon-glyph-Bzpngl6a.js} +1 -1
  280. package/dist/client/assets/{table-Bo_p8Wa3.js → table-CxQHf5NT.js} +1 -1
  281. package/dist/client/assets/{tabs-BTB5YGW1.js → tabs-BwD6LFyC.js} +1 -1
  282. package/dist/client/assets/task-assignee-avatar-Bg9ijzoY.js +1 -0
  283. package/dist/client/assets/{task-board-Ds21WWvc.js → task-board-DreQgJBj.js} +1 -1
  284. package/dist/client/assets/{task-route-BUL4mDi5.js → task-route-B6QYswnx.js} +1 -1
  285. package/dist/client/assets/{task-status-CK5oSIgi.js → task-status-DcCdeelW.js} +1 -1
  286. package/dist/client/assets/taskboard-analytics-C_aUAX7S.js +1 -0
  287. package/dist/client/assets/tasks-CYY9XlJ3.js +4 -0
  288. package/dist/client/assets/tasks-CeouZ3tS.js +1 -0
  289. package/dist/client/assets/{textarea-BS7I3MZL.js → textarea-y7TWtoua.js} +1 -1
  290. package/dist/client/assets/thread-analytics-BD8n1a8E.js +1 -0
  291. package/dist/client/assets/{thread-intent-C0R8BtBw.js → thread-intent-cB2EtHpg.js} +6 -6
  292. package/dist/client/assets/thread-route-Cr5f3jw8.js +1 -0
  293. package/dist/client/assets/{thread-route-yHr3Xqpq.js → thread-route-D01w_vQB.js} +1 -1
  294. package/dist/client/assets/thread-sheet-body-C0IyWshl.js +1 -0
  295. package/dist/client/assets/{time-range-picker-C_RAU_JZ.js → time-range-picker-bp6BeGMC.js} +1 -1
  296. package/dist/client/assets/toggle-group-BIu6qfZV.js +1 -0
  297. package/dist/client/assets/{tool-namespace-B1sVq59x.js → tool-namespace-Crbzrqv8.js} +1 -1
  298. package/dist/client/assets/{toolbar-icon-button-D4YToeEY.js → toolbar-icon-button-ByMmG3VL.js} +1 -1
  299. package/dist/client/assets/{tooltip-CmTwSHYA.js → tooltip-DibJz0Jl.js} +1 -1
  300. package/dist/client/assets/{tooltipContext-C41VBtBA.js → tooltipContext-BzrsG1UN.js} +1 -1
  301. package/dist/client/assets/track-C-8tVJFa.js +1 -0
  302. package/dist/client/assets/{types-05YrcBTZ.js → types-BdOsWOEi.js} +9 -9
  303. package/dist/client/assets/{url-slug-BQQBxd5s.js → url-slug-CPCergXm.js} +1 -1
  304. package/dist/client/assets/{usage-stats-DTNxQXdY.js → usage-stats-DDafRqWC.js} +7 -7
  305. package/dist/client/assets/{use-ai-providers-BdMI1dJ8.js → use-ai-providers-Bsehd5pg.js} +1 -1
  306. package/dist/client/assets/use-apply-named-rule-CeNTU7vM.js +1 -0
  307. package/dist/client/assets/{use-automations-7sML6axw.js → use-automations-BscjsX1o.js} +1 -1
  308. package/dist/client/assets/use-autosave-D0y0c0lt.js +1 -0
  309. package/dist/client/assets/{use-chat-layout-state-DuWKLw_d.js → use-chat-layout-state-DpOxQYv4.js} +1 -1
  310. package/dist/client/assets/{use-clock-tick-Cqy994m5.js → use-clock-tick-jRUiEK1v.js} +1 -1
  311. package/dist/client/assets/{use-connect-companion-B7-Rnq6I.js → use-connect-companion-BGtpVGmA.js} +1 -1
  312. package/dist/client/assets/use-connection-CAR6Cxbr.js +1 -0
  313. package/dist/client/assets/{use-content-sync-DxuiTsAP.js → use-content-sync-bYlxy6np.js} +1 -1
  314. package/dist/client/assets/{use-copy-ByMN8ZBl.js → use-copy-Dpm_jhm-.js} +1 -1
  315. package/dist/client/assets/{use-create-virtual-mcp-UGWMFU-8.js → use-create-virtual-mcp-DcCX7uo7.js} +1 -1
  316. package/dist/client/assets/use-date-fns-locale-hUyExEVb.js +1 -0
  317. package/dist/client/assets/{use-debounced-autosave-DN6l6XR3.js → use-debounced-autosave-By6os5xD.js} +1 -1
  318. package/dist/client/assets/{use-debounced-value-3kPVK8wc.js → use-debounced-value-BtR2lyTj.js} +1 -1
  319. package/dist/client/assets/use-deco-credits-DRIA1g3T.js +1 -0
  320. package/dist/client/assets/{use-decopilot-events-DH9vtuqj.js → use-decopilot-events-C4OBhauN.js} +1 -1
  321. package/dist/client/assets/use-delete-connection-BM5PcuGQ.js +1 -0
  322. package/dist/client/assets/{use-deployment-admin-BlS14Krh.js → use-deployment-admin-BmDeutjQ.js} +1 -1
  323. package/dist/client/assets/{use-fast-preview-draft-url-8Q6wI_7_.js → use-fast-preview-draft-url-BUDoPHon.js} +1 -1
  324. package/dist/client/assets/{use-file-configs-BJwH2-6c.js → use-file-configs-CuVchUT-.js} +1 -1
  325. package/dist/client/assets/{use-inbox-feed-BbsXPNFF.js → use-inbox-feed-Bi03vVLM.js} +1 -1
  326. package/dist/client/assets/{use-infinite-scroll-D-NkL7pd.js → use-infinite-scroll-0YRynoMy.js} +1 -1
  327. package/dist/client/assets/use-join-requests-BhMSzUBO.js +1 -0
  328. package/dist/client/assets/use-main-panel-tabs-QcdwwtJ8.js +1 -0
  329. package/dist/client/assets/{use-mcp-auth-status-SDpJIu0o.js → use-mcp-auth-status-Ddp-NElL.js} +1 -1
  330. package/dist/client/assets/{use-mcp-client-CqNgp7C3.js → use-mcp-client-ClU7gdfw.js} +10 -10
  331. package/dist/client/assets/{use-mcp-prompts-_OL9f0kB.js → use-mcp-prompts-CFFfSPcj.js} +1 -1
  332. package/dist/client/assets/{use-mcp-tools-CzxPUwUO.js → use-mcp-tools-CsGOzrhW.js} +1 -1
  333. package/dist/client/assets/{use-mobile-DpTfSAm7.js → use-mobile-nW9hYb6L.js} +1 -1
  334. package/dist/client/assets/use-move-blocks-BKlQlSno.js +1 -0
  335. package/dist/client/assets/{use-navigate-to-agent-CblBUgFe.js → use-navigate-to-agent-CvuO-uuz.js} +1 -1
  336. package/dist/client/assets/{use-open-billing-url-C8vpSsvJ.js → use-open-billing-url-6zduD8ZA.js} +1 -1
  337. package/dist/client/assets/{use-org-fs-BwLqCU_I.js → use-org-fs-BcT14y41.js} +1 -1
  338. package/dist/client/assets/{use-org-repo-syncs-Cg7khzRw.js → use-org-repo-syncs-BdTpYW4-.js} +1 -1
  339. package/dist/client/assets/{use-org-sso-CXvlVlUi.js → use-org-sso-DdzTjSOo.js} +1 -1
  340. package/dist/client/assets/use-organization-roles-DQlsWqEE.js +1 -0
  341. package/dist/client/assets/{use-organization-settings-R35CeX0x.js → use-organization-settings-DeXdcCtZ.js} +1 -1
  342. package/dist/client/assets/{use-panel-navigate-DcAwEhOb.js → use-panel-navigate-BrjENNrA.js} +1 -1
  343. package/dist/client/assets/{use-project-native-view-presence-B1h5Pugj.js → use-project-native-view-presence-OgGOYaV4.js} +1 -1
  344. package/dist/client/assets/{use-project-scope-COq2XQVT.js → use-project-scope-DryffHrf.js} +1 -1
  345. package/dist/client/assets/{use-recent-apps-DQiepK1I.js → use-recent-apps-CMgGjBH4.js} +1 -1
  346. package/dist/client/assets/{use-releases-CXFA4FcN.js → use-releases-BQePeR_j.js} +1 -1
  347. package/dist/client/assets/use-reports-diagnostic-KZB3C_26.js +1 -0
  348. package/dist/client/assets/{use-sandbox-events-wT6wBZge.js → use-sandbox-events-ClbDdVRn.js} +2 -2
  349. package/dist/client/assets/{use-secrets-Dti2Zjt-.js → use-secrets-Cjihb12f.js} +1 -1
  350. package/dist/client/assets/use-section-preview-base-go9VMYa4.js +1 -0
  351. package/dist/client/assets/use-session-runtime-CQOTzbKn.js +1 -0
  352. package/dist/client/assets/{use-sidebar-collapsed-DCvF-wFz.js → use-sidebar-collapsed-CUSnfCt-.js} +1 -1
  353. package/dist/client/assets/{use-tags-Dkh7i4b9.js → use-tags-CMyUN8Qd.js} +1 -1
  354. package/dist/client/assets/use-task-board-analytics-BWzR51Kh.js +1 -0
  355. package/dist/client/assets/{use-task-board-events-BTnll7tY.js → use-task-board-events-DlFBtyOL.js} +1 -1
  356. package/dist/client/assets/{use-task-board-item-prs-DV52O8jk.js → use-task-board-item-prs-D9Aj6NRX.js} +1 -1
  357. package/dist/client/assets/{use-task-metadata-L677N_ml.js → use-task-metadata-DcdDwiSS.js} +1 -1
  358. package/dist/client/assets/{use-thread-analytics-BZBVj7t2.js → use-thread-analytics-cLhxQI8B.js} +1 -1
  359. package/dist/client/assets/{use-thread-outputs-DkwE9vVN.js → use-thread-outputs-D8Bvo55q.js} +1 -1
  360. package/dist/client/assets/useInfiniteQuery-DWVaUM2t.js +1 -0
  361. package/dist/client/assets/useQueries-B8DPRYfS.js +1 -0
  362. package/dist/client/assets/useSuspenseInfiniteQuery-6Ovi3jRe.js +1 -0
  363. package/dist/client/assets/users-BIP3dsuH.js +1 -0
  364. package/dist/client/assets/{utils-JJWwAhjH.js → utils-DeFulDMz.js} +1 -1
  365. package/dist/client/assets/variant-calendar-C37bfPDk.js +1 -0
  366. package/dist/client/assets/variant-matcher-override-B4pYtxaz.js +1 -0
  367. package/dist/client/assets/{virtual-mcp-DhxG1LUt.js → virtual-mcp-D_aBBfQL.js} +1 -1
  368. package/dist/client/assets/{watch-sse-pool-HmUSWdEg.js → watch-sse-pool-Bk0Yni6j.js} +1 -1
  369. package/dist/client/index.html +1 -1
  370. package/dist/server/server.js +783 -783
  371. package/package.json +1 -1
  372. package/dist/client/assets/User01-B5NngWXw.js +0 -1
  373. package/dist/client/assets/access-gate-CXvtA9IQ.js +0 -1
  374. package/dist/client/assets/agent-analytics-BRVR9Nm7.js +0 -1
  375. package/dist/client/assets/agent-app-Wibq0OFa.js +0 -1
  376. package/dist/client/assets/agent-assets-Bj5Luz-W.js +0 -1
  377. package/dist/client/assets/agent-automation-Dr4Y6VGJ.js +0 -20
  378. package/dist/client/assets/agent-automations-FAc-0hCc.js +0 -1
  379. package/dist/client/assets/agent-calendar-D7DufZS_.js +0 -1
  380. package/dist/client/assets/agent-connect-sources-B2TBus9P.js +0 -1
  381. package/dist/client/assets/agent-deck-BQ7xD_0N.js +0 -1
  382. package/dist/client/assets/agent-e2e-Xz5_DbBd.js +0 -1
  383. package/dist/client/assets/agent-experiments-DMb-JH-W.js +0 -1
  384. package/dist/client/assets/agent-file-jmWEmVy9.js +0 -1
  385. package/dist/client/assets/agent-hosting-Jt1eRL4L.js +0 -1
  386. package/dist/client/assets/agent-icon-D9qv9iJQ.js +0 -1
  387. package/dist/client/assets/agent-library-CYOoJcrp.js +0 -1
  388. package/dist/client/assets/agent-library-file-CHPq6ELL.js +0 -1
  389. package/dist/client/assets/agent-monitor-Bxvs2XHa.js +0 -1
  390. package/dist/client/assets/agent-overview-BNrr8sDt.js +0 -1
  391. package/dist/client/assets/agent-releases-BusIaoNs.js +0 -2
  392. package/dist/client/assets/agent-settings-CCQqUf-q.js +0 -1
  393. package/dist/client/assets/agent-site-editor-code-CX9PY1d_.js +0 -2
  394. package/dist/client/assets/agent-site-editor-content-qNC8jZls.js +0 -1
  395. package/dist/client/assets/agent-site-editor-preview-DhMNzXt9.js +0 -1
  396. package/dist/client/assets/agent-view-CI9h5gAx.js +0 -1
  397. package/dist/client/assets/agents-list-DYyNDxTw.js +0 -1
  398. package/dist/client/assets/alert-dialog-BBFgXAmX.js +0 -7
  399. package/dist/client/assets/analytics-sections-czReTaOZ.js +0 -1
  400. package/dist/client/assets/analytics-tab-C1nax7x3.js +0 -2
  401. package/dist/client/assets/api-keys-f3ViWnh0.js +0 -1
  402. package/dist/client/assets/api-keys-qNGMRqbx.js +0 -1
  403. package/dist/client/assets/app-editor-D1Zrm2TM.js +0 -1
  404. package/dist/client/assets/automation-list-row-CiF6h_o_.js +0 -1
  405. package/dist/client/assets/automation-runs-BqVYPzh9.js +0 -1
  406. package/dist/client/assets/automations-BHFkDeZ2.js +0 -1
  407. package/dist/client/assets/avatar-DsyxJdd5.js +0 -1
  408. package/dist/client/assets/blocks-tab-states-_rQb-3nf.js +0 -1
  409. package/dist/client/assets/blog-schema-hiJ1VvK3.js +0 -1
  410. package/dist/client/assets/buckets-Cgqz5f6M.js +0 -1
  411. package/dist/client/assets/build-improve-prompt-doc-Cx1NA6_T.js +0 -2
  412. package/dist/client/assets/campaigns-view-Bn067WyB.js +0 -1
  413. package/dist/client/assets/category-editor-Co3bRfpu.js +0 -1
  414. package/dist/client/assets/choose-editor-DZmSFlJ2.js +0 -1
  415. package/dist/client/assets/cms-settings-editor-B1PCbkSm.js +0 -1
  416. package/dist/client/assets/collection-detail-DtWJ8lB6.js +0 -1
  417. package/dist/client/assets/collection-display-button-BaC3Lby-.js +0 -1
  418. package/dist/client/assets/connect-source-dialog-DjtB0gt2.js +0 -1
  419. package/dist/client/assets/connection-detail-C9scWK5j.js +0 -1
  420. package/dist/client/assets/connections-BQjNaGS9.js +0 -1
  421. package/dist/client/assets/content-tab-CAW0Bhf6.js +0 -22
  422. package/dist/client/assets/context-ddLbYTQy.js +0 -1
  423. package/dist/client/assets/create-organization-dialog-B1J3dbRj.js +0 -1
  424. package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
  425. package/dist/client/assets/discover-DORJ6GMD.js +0 -1
  426. package/dist/client/assets/experiments-tab-WOPYssza.js +0 -1
  427. package/dist/client/assets/experiments-tab-choice-CI25uYfH.js +0 -1
  428. package/dist/client/assets/file-explorer-CtLkW4hH.js +0 -2
  429. package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
  430. package/dist/client/assets/general-CANWkC13.js +0 -1
  431. package/dist/client/assets/home-BFodRKhb.js +0 -1
  432. package/dist/client/assets/index-5D9wIy3o.js +0 -1
  433. package/dist/client/assets/index-BAmB740B.js +0 -243
  434. package/dist/client/assets/index-CkPVfANw.js +0 -4
  435. package/dist/client/assets/legacy-agents-deep-oTGqQAve.js +0 -1
  436. package/dist/client/assets/library-BNLBVJPY.js +0 -1
  437. package/dist/client/assets/members-B1ZJujYN.js +0 -1
  438. package/dist/client/assets/monitoring-B7vBtbj0.js +0 -1
  439. package/dist/client/assets/mustache-D4PpoYZo.js +0 -4
  440. package/dist/client/assets/named-rule-view-BD9ako2G.js +0 -1
  441. package/dist/client/assets/onboarding-BUhC7Axs.js +0 -1
  442. package/dist/client/assets/openai-conversation-D40-j2aL.js +0 -3
  443. package/dist/client/assets/organization-choice-CZm6-Lsp.js +0 -1
  444. package/dist/client/assets/orgs-BzS4vgpT.js +0 -1
  445. package/dist/client/assets/page-seo-form-UBTBjVc2.js +0 -1
  446. package/dist/client/assets/parse-sections-C7SJnlZ7.js +0 -1
  447. package/dist/client/assets/plan-6YWkk0Z5.js +0 -1
  448. package/dist/client/assets/post-calendar-l09Ocu-Z.js +0 -1
  449. package/dist/client/assets/post-editor-B5DakPnS.js +0 -2
  450. package/dist/client/assets/preview-tab-DE5CyvZI.js +0 -551
  451. package/dist/client/assets/profile-l7YzIikv.js +0 -1
  452. package/dist/client/assets/project-app-view-CZ4ncHJw.js +0 -1
  453. package/dist/client/assets/project-feed-B429synm.js +0 -1
  454. package/dist/client/assets/project-reports-BqcstnBp.js +0 -1
  455. package/dist/client/assets/project-tasks-0lrWUpFL.js +0 -1
  456. package/dist/client/assets/projects-s6UXfr6V.js +0 -1
  457. package/dist/client/assets/record-editor-BBAM6dba.js +0 -1
  458. package/dist/client/assets/redirect-editor-Da8bdxGX.js +0 -1
  459. package/dist/client/assets/releases-api-BTCDyPHo.js +0 -1
  460. package/dist/client/assets/reports-CBo7lxtK.js +0 -1
  461. package/dist/client/assets/reports-onboarding-D9oUufsD.js +0 -1
  462. package/dist/client/assets/reports-tab-DT51kjgE.js +0 -2
  463. package/dist/client/assets/repositories-CM9WvII2.js +0 -1
  464. package/dist/client/assets/repositories-bGHlY3pM.js +0 -1
  465. package/dist/client/assets/repository-binding-BgJ8uAoU.js +0 -1
  466. package/dist/client/assets/repository-picker-BvSncDst.js +0 -1
  467. package/dist/client/assets/review-settings-DdYgJGVz.js +0 -1
  468. package/dist/client/assets/roles-CgVcsOdT.js +0 -1
  469. package/dist/client/assets/route-CkFix_vP.js +0 -1
  470. package/dist/client/assets/route-DODiDy-j.js +0 -1
  471. package/dist/client/assets/route-DVi1VWR6.js +0 -1
  472. package/dist/client/assets/runnable-block-editor-dRq9eTzq.js +0 -20
  473. package/dist/client/assets/search-input-BAISJ9LS.js +0 -1
  474. package/dist/client/assets/secret-ciphertext-BoA15qGd.js +0 -1
  475. package/dist/client/assets/secret-picker-Cdv3xW0U.js +0 -1
  476. package/dist/client/assets/secrets-C7hm_npZ.js +0 -1
  477. package/dist/client/assets/sections-editor-DgEGZXcq.js +0 -4
  478. package/dist/client/assets/seo-editor-BLHMI9qj.js +0 -1
  479. package/dist/client/assets/settings-tab-Dx6WgZsi.js +0 -1
  480. package/dist/client/assets/shell-layout-B5jnML3d.js +0 -1
  481. package/dist/client/assets/site-draft-actions-D1d2wytY.js +0 -12
  482. package/dist/client/assets/site-draft-view-DmMlvXzq.js +0 -2
  483. package/dist/client/assets/site-editor-eGFXfzA8.js +0 -1
  484. package/dist/client/assets/site-editor-toast-CGZS9BwD.js +0 -1
  485. package/dist/client/assets/skills-NSxr4Z0X.js +0 -1
  486. package/dist/client/assets/sso-BHFwYob2.js +0 -1
  487. package/dist/client/assets/synced-repos-D-U5QZg2.js +0 -1
  488. package/dist/client/assets/task-assignee-avatar-CAj5yPyc.js +0 -1
  489. package/dist/client/assets/taskboard-analytics-D6UWbvQC.js +0 -1
  490. package/dist/client/assets/tasks-CMUaHBkk.js +0 -4
  491. package/dist/client/assets/tasks-D5WIQI-o.js +0 -1
  492. package/dist/client/assets/thread-analytics-Cqdeb287.js +0 -1
  493. package/dist/client/assets/thread-route-DnoU0Lqn.js +0 -1
  494. package/dist/client/assets/thread-sheet-body-BBHV5kVE.js +0 -1
  495. package/dist/client/assets/toggle-group-BcfSAKQP.js +0 -1
  496. package/dist/client/assets/track-DZvu8ree.js +0 -1
  497. package/dist/client/assets/use-apply-named-rule-pRgVjxXf.js +0 -1
  498. package/dist/client/assets/use-autosave-DMApQf0t.js +0 -1
  499. package/dist/client/assets/use-connection-DQSt0eTw.js +0 -1
  500. package/dist/client/assets/use-date-fns-locale-C0oymQ59.js +0 -1
  501. package/dist/client/assets/use-deco-credits-CT72rZSv.js +0 -1
  502. package/dist/client/assets/use-delete-connection-D5mcm_l_.js +0 -1
  503. package/dist/client/assets/use-join-requests-C-xyNeji.js +0 -1
  504. package/dist/client/assets/use-main-panel-tabs-DvsYVOuQ.js +0 -1
  505. package/dist/client/assets/use-members-CTltnPbx.js +0 -1
  506. package/dist/client/assets/use-move-blocks-YDfVWv8x.js +0 -1
  507. package/dist/client/assets/use-org-auth-client-Bi3e38-G.js +0 -1
  508. package/dist/client/assets/use-organization-roles-zn84F9HK.js +0 -1
  509. package/dist/client/assets/use-reports-diagnostic-Dwax0vDS.js +0 -1
  510. package/dist/client/assets/use-section-preview-base-CFzMfuNP.js +0 -1
  511. package/dist/client/assets/use-session-runtime-Ba_EwQTc.js +0 -1
  512. package/dist/client/assets/use-task-board-analytics-Bqx8wPMm.js +0 -1
  513. package/dist/client/assets/useInfiniteQuery-D-VWsr8W.js +0 -1
  514. package/dist/client/assets/useQueries-jXxHGDMF.js +0 -1
  515. package/dist/client/assets/useSuspenseInfiniteQuery-mJC6qHan.js +0 -1
  516. package/dist/client/assets/users-T5camo9f.js +0 -1
  517. package/dist/client/assets/variant-calendar-BgT-KS6e.js +0 -1
  518. package/dist/client/assets/variant-matcher-override-CgViiiNQ.js +0 -1
@@ -1,551 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-DgEGZXcq.js","assets/index-BAmB740B.js","assets/index-BQfNeaI1.css","assets/chat-context-CEf_lJrx.js","assets/use-panel-navigate-DcAwEhOb.js","assets/thread-route-yHr3Xqpq.js","assets/use-project-scope-COq2XQVT.js","assets/repository-binding-BgJ8uAoU.js","assets/use-mcp-client-CqNgp7C3.js","assets/auth-D_mwvS_K.js","assets/autosend-Rn3iicpQ.js","assets/thread-intent-C0R8BtBw.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-HmUSWdEg.js","assets/task-board-Ds21WWvc.js","assets/schema-DNweLWtn.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-DH9vtuqj.js","assets/use-ai-providers-BdMI1dJ8.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-R35CeX0x.js","assets/runnable-block-editor-dRq9eTzq.js","assets/utils-JJWwAhjH.js","assets/ZoomOut-BBaDHidP.js","assets/Image01-3jSbcDWw.js","assets/agent-icon-D9qv9iJQ.js","assets/AlertCircle-BoecRmSu.js","assets/Tool01-CcNuzAHc.js","assets/ArrowUp-YHdDe54G.js","assets/ArrowLeft-CqjWe78l.js","assets/LinkBroken01-gZ_Womsg.js","assets/ShoppingBag01-D6PcFAZ3.js","assets/Building02-jY0EsZ3c.js","assets/CheckCircle-Bjd4331B.js","assets/ChevronUp-D732cexR.js","assets/ChevronSelectorVertical-C8DO4Eax.js","assets/UserSquare-DvQcif2z.js","assets/Copy01-BNgQXLom.js","assets/CreditCard01-BI7UbDnJ.js","assets/DotsVertical-B4rKTO-K.js","assets/Globe04-BZtelxuk.js","assets/SwitchHorizontal01-OacdCVpa.js","assets/Key01-bgf7_Io3.js","assets/Link01-CwY3-TdS.js","assets/Minus-Cg_Z4UVA.js","assets/Monitor01-DfNea12c.js","assets/Sun-ryrPGG0o.js","assets/Play-C58uA1z7.js","assets/Plus-BjxA_ka5.js","assets/SearchMd-BYu5iUPZ.js","assets/Trash01-B_y6cnc0.js","assets/Upload01-C8k7ObxF.js","assets/User01-B5NngWXw.js","assets/Users01-BuIADxiS.js","assets/XClose-CE-051ne.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-71Dh0mlf.js","assets/format-time-Cq80KKvY.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-D5FtbLtM.js","assets/use-copy-ByMN8ZBl.js","assets/usage-stats-DTNxQXdY.js","assets/tool-namespace-B1sVq59x.js","assets/form-DWfSZ-uy.js","assets/label-C6V9azY9.js","assets/utils-CVEq3hMx.js","assets/markdown-DVKH1IaR.js","assets/use-mobile-DpTfSAm7.js","assets/tooltip-CmTwSHYA.js","assets/index-BauMDA_C.js","assets/use-clock-tick-Cqy994m5.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DXX6eros.js","assets/types-05YrcBTZ.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-B5jnML3d.js","assets/avatar-DsyxJdd5.js","assets/command-CMb7suOV.js","assets/index-CzAA1Ftq.js","assets/integration-icon-oEHZLv8F.js","assets/project-icon-DuRHj8pv.js","assets/new-project-dialog-DmsgoraK.js","assets/repository-import-picker-DmCy1J1K.js","assets/use-navigate-to-agent-CblBUgFe.js","assets/repository-picker-BvSncDst.js","assets/useInfiniteQuery-D-VWsr8W.js","assets/infiniteQueryObserver-BxY60Pl8.js","assets/collection-search-RQehoVFG.js","assets/use-debounced-value-3kPVK8wc.js","assets/required-auth-layout-FVugTURm.js","assets/use-org-sso-CXvlVlUi.js","assets/shell-layout-CE2Eihra.css","assets/sheet-D1CAQsjr.js","assets/use-connection-DQSt0eTw.js","assets/use-mcp-prompts-_OL9f0kB.js","assets/use-thread-outputs-DkwE9vVN.js","assets/file-type-icon-CnMrgPAl.js","assets/secret-ciphertext-BoA15qGd.js","assets/alert-CXq7wXAP.js","assets/parse-sections-C7SJnlZ7.js","assets/switch-BudKCJf7.js","assets/textarea-BS7I3MZL.js","assets/site-editor-toast-CGZS9BwD.js","assets/use-session-runtime-Ba_EwQTc.js","assets/experiments-tab-choice-CI25uYfH.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-wT6wBZge.js","assets/sandbox-git-api-CH_-QFpD.js","assets/popover-DClINcvR.js","assets/blocks-tab-states-_rQb-3nf.js","assets/slider-EpxmA7ZL.js","assets/index-x6QXFiYo.js","assets/index-BdQq_4o_.js","assets/tooltipContext-C41VBtBA.js","assets/CategoricalChart-DSicPUkM.js","assets/index-C6RphnDz.js","assets/ActiveShapeUtils-3iGXaBcM.js","assets/Sector-B82IN8wU.js","assets/symbol-CYQiJJdu.js","assets/empty-state-BUdzXSg1.js","assets/scroll-area-BHIKiLUM.js","assets/monaco-editor-LiopisRR.js","assets/editor-CxPe-Q-E.js","assets/calendar-DlQTMw7m.js","assets/select-BvUL0HyR.js","assets/editor-classes-BSm-iwgQ.js","assets/core.esm-BtSOaBaE.js","assets/sortable.esm-CpdZxqSN.js","assets/toggle-group-BcfSAKQP.js","assets/active-indicator-CCMhAsc_.js","assets/combobox-C3ljSkZg.js","assets/alert-dialog-BBFgXAmX.js","assets/search-input-BAISJ9LS.js","assets/tabs-BTB5YGW1.js","assets/use-file-configs-BJwH2-6c.js","assets/asset-utils-CkfOjXdG.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/mustache-D4PpoYZo.js","assets/use-section-preview-base-CFzMfuNP.js","assets/section-preview-url-7zfngvgW.js","assets/use-members-CTltnPbx.js","assets/use-org-auth-client-Bi3e38-G.js","assets/page-seo-form-UBTBjVc2.js","assets/use-apply-named-rule-pRgVjxXf.js","assets/use-move-blocks-YDfVWv8x.js","assets/variant-matcher-override-CgViiiNQ.js","assets/variant-draft-pointer-BeAKcq_c.js"])))=>i.map(i=>d[i]);
2
- import{c as ce,j as s,r as T,l as De,b as Pe,B as Me,aG as Xt,aY as it,aH as Ae,q as rr,D as ar,K as ir,s as or,v as lr,e as Sa,h as Ct,I as An,w as Pa,aZ as ja,a2 as Kn,aT as Ea,aW as Na,au as _n,aw as On,a5 as cr,P as Dn,y as Ta,t as Zt,aX as Ca,o as Ra,m as La}from"./index-BAmB740B.js";import{u as dr,g as Aa,c as Ns,B as Pn,P as _a,r as Oa,R as Da,a as Ba,b as ur,S as $a,d as Ma,l as Fa,m as za,e as Ka,f as jn,N as Ia}from"./runnable-block-editor-dRq9eTzq.js";import{b as Ua,c as Rt,r as fr,l as pr,f as Ha,g as Va,w as qa}from"./chat-context-CEf_lJrx.js";import{t as Wa}from"./ChevronUp-D732cexR.js";import{T as Ga,U as Ja,M as mr,V as Ya,W as Qa,b as Xa,X as Za,Y as hr,Z as ei,_ as gr,$ as Ts,a0 as ti}from"./agent-icon-D9qv9iJQ.js";import{a as ni,n as si}from"./UserSquare-DvQcif2z.js";import{s as vr}from"./Plus-BjxA_ka5.js";import{a as xr,b as br,P as yr}from"./popover-DClINcvR.js";import{a as Et,b as Nt,c as wr,d as kr,e as Sr,C as Pr}from"./command-CMb7suOV.js";import{c as ri,d as ai,a as ii}from"./repository-binding-BgJ8uAoU.js";import{a as Lt}from"./sandbox-lifecycle-context-q0eTvNvQ.js";import{e as oi}from"./backoff-CrEUbyZT.js";import{r as li}from"./thread-intent-C0R8BtBw.js";import{u as jr}from"./use-session-runtime-Ba_EwQTc.js";import{S as Er,d as ci,f as di,i as ui,g as fi,h as pi,j as mi,k as hi,u as nn,l as In,m as at,n as gi,o as vi,q as xi,c as Nr,b as Tr,t as bi,v as He,w as yi,x as wi,y as ki,z as Cs,A as Si,B as Pi,C as Rs,D as ji,E as Ei,e as Ni}from"./site-editor-toast-CGZS9BwD.js";import{u as Cr}from"./use-mobile-DpTfSAm7.js";import{T as lt,a as ct,c as dt}from"./tooltip-CmTwSHYA.js";import{T as We}from"./toolbar-icon-button-D4YToeEY.js";import{w as Wt,i as Ti}from"./variant-matcher-override-CgViiiNQ.js";import{b as Ci,w as Ls}from"./variant-draft-pointer-BeAKcq_c.js";import{u as Rr,i as Ri,B as Li,S as Ai,C as _i,a as Oi,b as Di,l as Bi,D as $i}from"./blocks-tab-states-_rQb-3nf.js";import{i as Mi,a as Fi,v as zi,b as Ki,s as Tt,n as Un,c as Lr,f as Ve,d as Ar,h as Ii,e as Ui,g as Hi,j as Vi,k as qi,p as Wi,N as Gi,l as Ji,r as Yi,m as As,o as Qi}from"./parse-sections-C7SJnlZ7.js";import{r as Xi,D as _s,w as Os,b as Ds,a as Zi}from"./section-preview-url-7zfngvgW.js";import{p as eo,a as to,u as no,b as Bs}from"./use-fast-preview-draft-url-8Q6wI_7_.js";import{a as so,c as _r}from"./shell-layout-B5jnML3d.js";import{u as Hn,b as ro}from"./use-sandbox-events-wT6wBZge.js";import{u as Bn}from"./useQueries-jXxHGDMF.js";import{i as ao}from"./LinkBroken01-gZ_Womsg.js";import{u as Or}from"./blocks-preview-workspace-context-D4YnI8VN.js";import{MonacoCodeEditor as io}from"./monaco-editor-LiopisRR.js";import{d as oo}from"./utils-JJWwAhjH.js";import{R as $s,a as Gt,b as Ms}from"./resizable-DgP86V61.js";import{u as lo,a as En}from"./experiments-tab-choice-CI25uYfH.js";import{w as $n}from"./device-hint-SeLRi17j.js";import{L as co}from"./label-C6V9azY9.js";import{a as uo,T as Fs}from"./toggle-group-BcfSAKQP.js";import{h as Dr,w as fo,a as zs}from"./preview-link-C762yHOt.js";import{r as po,R as mo}from"./virtual-mcp-DhxG1LUt.js";import{d as ho}from"./delay-CnY5UFtP.js";import{s as Br}from"./XClose-CE-051ne.js";import{o as go}from"./omit-sandbox-map-jj4lCB2U.js";import{a as Nn,b as vo,w as xo,n as Ks}from"./app-preview-url-9Od4s8Sz.js";import{a as bo}from"./use-organization-settings-R35CeX0x.js";import{E as yo}from"./empty-state-BUdzXSg1.js";import{G as Is}from"./repository-picker-BvSncDst.js";import{R as wo}from"./repository-import-picker-DmCy1J1K.js";import{r as ko}from"./preview-source-BsRLGWUP.js";import{C as So,s as Po,L as jo,R as en,D as Us}from"./secret-ciphertext-BoA15qGd.js";import{A as Eo,a as No,b as To}from"./alert-CXq7wXAP.js";import{u as Co}from"./use-task-metadata-L677N_ml.js";function Ro(t){const e=ce.c(10),{waiting:n}=t,r=n?"true":"false";let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:s.jsx(Ga,{className:"size-5 sm:size-6"})}),e[0]=i):i=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("span",{className:"h-px w-full border-t border-dashed border-muted-foreground/40"}),e[1]=d):d=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:[d,a]}),e[4]=a,e[5]=o):o=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:s.jsx(Ja,{className:"size-5 sm:size-6"})}),e[6]=c):c=e[6];let l;return e[7]!==r||e[8]!==o?(l=s.jsxs("div",{"aria-hidden":"true","data-testid":"connection-wire","data-waiting":r,className:"flex items-center gap-2",children:[i,o,c]}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function Lo(t){const e=ce.c(25),{index:n,numbered:r,step:i,heading:d}=t,a=T.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 c;e[3]!==d||e[4]!==a||e[5]!==i.title?(c=s.jsx(d,{id:a,className:"text-sm font-medium text-foreground",children:i.title}),e[3]=d,e[4]=a,e[5]=i.title,e[6]=c):c=e[6];let l;e[7]!==o||e[8]!==c?(l=s.jsxs("div",{className:"flex items-center gap-3",children:[o,c]}),e[7]=o,e[8]=c,e[9]=l):l=e[9];const m=r&&"sm:pl-9";let f;e[10]!==m?(f=De("flex min-w-0 flex-col gap-3",m),e[10]=m,e[11]=f):f=e[11];let p;e[12]!==i.body?(p=i.body&&s.jsx("p",{className:"text-sm text-muted-foreground",children:i.body}),e[12]=i.body,e[13]=p):p=e[13];let x;e[14]!==i.command?(x=i.command&&s.jsx(So,{command:i.command}),e[14]=i.command,e[15]=x):x=e[15];let h;e[16]!==i.after||e[17]!==f||e[18]!==p||e[19]!==x?(h=s.jsxs("div",{className:f,children:[p,x,i.after]}),e[16]=i.after,e[17]=f,e[18]=p,e[19]=x,e[20]=h):h=e[20];let E;return e[21]!==a||e[22]!==l||e[23]!==h?(E=s.jsxs("li",{"aria-labelledby":a,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[l,h]}),e[21]=a,e[22]=l,e[23]=h,e[24]=E):E=e[24],E}const Ao=[];function tn(t){const e=ce.c(20),{title:n,lead:r,waiting:i,alerts:d,steps:a,footer:o,headingLevel:c}=t,l=a===void 0?Ao:a,m=c===void 0?1:c,f=m===1?"h1":"h2",p=i&&l.length===0?"status":void 0;let x;e[0]!==i?(x=s.jsx(Ro,{waiting:i}),e[0]=i,e[1]=x):x=e[1];let h;e[2]!==f||e[3]!==n?(h=s.jsx(f,{tabIndex:-1,className:"text-balance text-lg font-medium text-foreground outline-none sm:text-xl",children:n}),e[2]=f,e[3]=n,e[4]=h):h=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]!==p||e[8]!==x||e[9]!==h||e[10]!==E?(g=s.jsxs("header",{role:p,className:"flex flex-col items-center gap-3 text-center",children:[x,h,E]}),e[7]=p,e[8]=x,e[9]=h,e[10]=E,e[11]=g):g=e[11];let y;e[12]!==m||e[13]!==l?(y=l.length>0&&s.jsx("ol",{className:"flex flex-col gap-3",children:l.map((b,v)=>s.jsx(Lo,{index:v+1,numbered:l.length>1,step:b,heading:m===1?"h2":"h3"},b.title))}),e[12]=m,e[13]=l,e[14]=y):y=e[14];let N;return e[15]!==d||e[16]!==o||e[17]!==g||e[18]!==y?(N=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,d,y,o]})}),e[15]=d,e[16]=o,e[17]=g,e[18]=y,e[19]=N):N=e[19],N}function _o(t){const e=ce.c(55),{wait:n,hosts:r,invalidLink:i}=t,d=i===void 0?!1:i,a=Pe();let o;e[0]!==d||e[1]!==a?(o=d&&s.jsx(Eo,{variant:"warning",children:s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[s.jsx(No,{className:"line-clamp-none text-foreground",children:a("decoServe.link.invalidTitle")}),s.jsx(To,{children:a("decoServe.link.invalidBody")})]})}),e[0]=d,e[1]=a,e[2]=o):o=e[2];const c=o;if(n.kind==="problem"){let C;e[3]!==a||e[4]!==n.host||e[5]!==n.problem?(C=Po(a,n.problem,n.host),e[3]=a,e[4]=n.host,e[5]=n.problem,e[6]=C):C=e[6];const{title:A,body:R}=C;let L;e[7]!==R?(L=s.jsx(en,{text:R}),e[7]=R,e[8]=L):L=e[8];let O;e[9]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Us,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=O):O=e[9];let _;return e[10]!==c||e[11]!==L||e[12]!==A?(_=s.jsx(tn,{headingLevel:2,waiting:!1,title:A,lead:L,alerts:c,footer:O}),e[10]=c,e[11]=L,e[12]=A,e[13]=_):_=e[13],_}const l=n.kind==="looking",m=l&&!n.paused;let f;e[14]!==a?(f=a("decoServe.waiting.title"),e[14]=a,e[15]=f):f=e[15];let p;e[16]!==a?(p=a("decoServe.waiting.lead"),e[16]=a,e[17]=p):p=e[17];let x;e[18]!==c||e[19]!==n.kind?(x=(c||n.kind==="denied")&&s.jsxs(s.Fragment,{children:[c,n.kind==="denied"&&s.jsx(jo,{})]}),e[18]=c,e[19]=n.kind,e[20]=x):x=e[20];let h;e[21]!==a?(h=a("decoServe.guide.step1.title"),e[21]=a,e[22]=h):h=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(en,{text:E}),e[25]=E,e[26]=g):g=e[26];let y;e[27]!==h||e[28]!==g?(y={title:h,body:g,command:Er},e[27]=h,e[28]=g,e[29]=y):y=e[29];let N;e[30]!==a?(N=a("decoServe.waiting.step2.title"),e[30]=a,e[31]=N):N=e[31];let b;e[32]!==a?(b=a("decoServe.waiting.step2.body"),e[32]=a,e[33]=b):b=e[33];let v;e[34]!==r||e[35]!==l||e[36]!==a||e[37]!==n.kind||e[38]!==n.onStart||e[39]!==n.paused?(v=n.kind==="needs-gesture"?s.jsx(Me,{variant:"outline",className:"self-start",onClick:n.onStart,children:a("decoServe.guide.step2.start")}):l&&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]=l,e[36]=a,e[37]=n.kind,e[38]=n.onStart,e[39]=n.paused,e[40]=v):v=e[40];let S;e[41]!==N||e[42]!==b||e[43]!==v?(S={title:N,body:b,after:v},e[41]=N,e[42]=b,e[43]=v,e[44]=S):S=e[44];let j;e[45]!==y||e[46]!==S?(j=[y,S],e[45]=y,e[46]=S,e[47]=j):j=e[47];let k;e[48]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Us,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[48]=k):k=e[48];let P;return e[49]!==j||e[50]!==m||e[51]!==f||e[52]!==p||e[53]!==x?(P=s.jsx(tn,{headingLevel:2,waiting:m,title:f,lead:p,alerts:x,steps:j,footer:k}),e[49]=j,e[50]=m,e[51]=f,e[52]=p,e[53]=x,e[54]=P):P=e[54],P}function Oo(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 Do=15e3,Bo=3e3;function $o(t){const{candidates:e,probe:n,onFound:r,onChange:i,doc:d=document,setTimer:a=(v,S)=>setTimeout(v,S),clearTimer:o=v=>clearTimeout(v),timeoutMs:c=Bo}=t;let l={status:"searching",firstRoundDone:!1,problem:null},m=!1,f=!1,p=0,x=null,h=null;const E=()=>d.visibilityState==="hidden",g=v=>{l={...l,...v},i(l)},y=async v=>{h=new AbortController;const S=h,j=a(()=>S.abort(),c);try{return await n(v,S.signal),!0}catch(k){if(m)return!1;const P=di(k);return P.reason!=="not-answering"?g({problem:{...P,endpoint:v}}):l.problem?.endpoint===v&&g({problem:null}),!1}finally{o(j),h=null}},N=async()=>{if(x=null,!(m||f)){if(e.length===0){g({status:"stopped",firstRoundDone:!0});return}if(E()){g({status:"paused"});return}f=!0,l.status!=="searching"&&g({status:"searching"});for(const v of e){if(m)break;if(await y(v)){if(f=!1,m)return;m=!0,d.removeEventListener("visibilitychange",b),g({status:"found",firstRoundDone:!0}),r(v);return}}if(f=!1,!m){if(p+=1,l.firstRoundDone||g({firstRoundDone:!0}),E()){g({status:"paused"});return}x=a(()=>{N()},ci(p,Do))}}};function b(){if(!m){if(E()){x!==null&&(o(x),x=null),f||g({status:"paused"});return}x!==null&&o(x),p=0,N()}}return d.addEventListener("visibilitychange",b),i(l),N(),()=>{m=!0,x!==null&&o(x),h?.abort(),d.removeEventListener("visibilitychange",b)}}function Mo(t,e){return fi(pi({endpoint:t,fetch:n=>fetch(n,{signal:e})}))}const Fo=["loopback-network","local-network-access"];async function zo(){if(ui(window.location.origin))return null;for(const t of Fo)try{return await navigator.permissions.query({name:t})}catch{}return null}let $r=null,Hs=!1;const Tn=new Set;function Ko(t){if(Tn.add(t),!Hs){Hs=!0;const e=n=>{$r=n;for(const r of Tn)r()};zo().then(n=>{if(!n)return e("unsupported");e(n.state),n.addEventListener("change",()=>e(n.state))})}return()=>Tn.delete(t)}const Io={status:"stopped",firstRoundDone:!1,problem:null},Cn=new Map;function Uo(t){const e=Cn.get(t);if(e)return e;let n={status:"searching",firstRoundDone:!1,problem:null};const r=new Set;let i=null;const d={onFound:()=>{},getSnapshot:()=>n,subscribe:a=>(r.add(a),i??=$o({candidates:t.split(" "),probe:Mo,onFound:o=>d.onFound(o),onChange:o=>{n=o;for(const c of r)c()}}),()=>{r.delete(a),!(r.size>0)&&(i?.(),i=null,Cn.delete(t))})};return Cn.set(t,d),d}function Mr(){return T.useSyncExternalStore(Ko,qs,qs)}const Ho=()=>()=>{},Vs=()=>Io,qs=()=>$r;function $d(t){const e=ce.c(9),{candidates:n,onFound:r}=t,[i,d]=T.useState(!1),a=Mr(),c=(a==="granted"||a==="unsupported"||a==="prompt"&&i)&&n.length>0;let l;e[0]!==c||e[1]!==n||e[2]!==r?(l=c?Uo(n.join(" ")):null,l&&(l.onFound=r),e[0]=c,e[1]=n,e[2]=r,e[3]=l):l=e[3];const m=T.useSyncExternalStore(l?.subscribe??Ho,l?.getSnapshot??Vs,l?.getSnapshot??Vs),f=a==="prompt"&&!i;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>d(!0),e[4]=p):p=e[4];let x;return e[5]!==a||e[6]!==m||e[7]!==f?(x={state:m,access:a,needsGesture:f,start:p},e[5]=a,e[6]=m,e[7]=f,e[8]=x):x=e[8],x}const Rn={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Vo(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:d=!1,hostedDraft:a=!1}=t,o=d?null:t.previewServerUrl;return t.deciding?{...Rn,showDecidingLoader:!0}:t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Rn:a&&t.hostedPointerPending&&!i?{...Rn,showDecidingLoader:!0}: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 qo=1e4,Wo=1e3,Go=3e4;function Jo({iframeRef:t,src:e,active:n}){const r=T.useRef(0),i=T.useRef(null),d=T.useRef(null),a=T.useRef(e),o=T.useRef(n);a.current=e,o.current=n;const c=()=>{i.current&&clearTimeout(i.current),d.current&&clearTimeout(d.current),i.current=null,d.current=null},l=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,m()},qo)},m=()=>{if(!o.current||!a.current)return;d.current&&clearTimeout(d.current);const x=oi(Go,Wo,r.current,2,.5);r.current+=1,d.current=setTimeout(()=>{d.current=null;const h=t.current,E=a.current;!h||!E||!o.current||(h.src=E,l())},x)},f=()=>{r.current=0,c()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),m()};return T.useEffect(()=>{if(c(),r.current=0,!(!n||!e))return l(),c},[e,n]),{handleLoad:f,handleError:p}}const Yo=1500,Qo=500;function Xo({iframe:t,reload:e,waitMs:n=Yo,confirmMs:r=Qo}){let i;const d=()=>{clearTimeout(a),i=setTimeout(e,r)};t.addEventListener("load",d,{once:!0});const a=setTimeout(()=>{t.removeEventListener("load",d),e()},n);return()=>{clearTimeout(a),clearTimeout(i),t.removeEventListener("load",d)}}const Zo=Xt({tag:Ae(),id:Ae(),classes:Ae(),text:Ae(),html:Ae(),manifestKey:Ae().nullable(),componentName:Ae().nullable(),parents:Ae(),url:Ae(),path:Ae(),viewport:Xt({width:it(),height:it()}),position:Xt({x:it(),y:it()})}),el=`(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 tl(t,e){const n=t.map(()=>null),r=[];for(let p=0;p<t.length;p++)t[p]!==null&&r.push(p);const i=r.length,d=e.length;if(!i||!d)return n;const a=(p,x)=>{const h=t[r[p]??0];return!h||!h.length?1:h.indexOf(e[x]??"")>=0?2:0},o=[],c=[];for(let p=0;p<=i;p++)o.push(new Array(d+1).fill(0)),c.push(new Array(d+1).fill(2));for(let p=1;p<=i;p++){const x=o[p-1]??[],h=o[p]??[],E=c[p]??[];for(let g=1;g<=d;g++){let y=x[g]??0,N=2;const b=h[g-1]??0;b>y&&(y=b,N=0);const v=a(p-1,g-1),S=(x[g-1]??0)+v;v>0&&S>y&&(y=S,N=1),h[g]=y,E[g]=N}}let l=0,m=i,f=d;for(;m>0&&f>0;){const p=c[m]?.[f]??2;p===1?(n[r[m-1]??0]=f-1,l++,m--,f--):p===0?f--:m--}if(l===0&&d===i)for(let p=0;p<i;p++)n[r[p]??0]=p;return n}const nl=Xt({sectionIndex:it(),manifestKey:Ae(),clickSeq:it()}),Ws=`(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 = ${tl.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 Mn(t,e,n=!1){let r=t,i=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let d=0;i&&d<5;d++){const a=e[i];if(a&&typeof a=="object"&&"__resolveType"in a){const o=a.__resolveType;if(typeof o=="string"&&o&&o!==i){r=a,i=o;continue}}break}if(!i)return[];if(i.includes("flags/multivariate")||n&&Mi(i,n)){const d=Array.isArray(r.variants)?r.variants:[];if(d.length===0||d.every(c=>{const l=c?.rule;return Fi(l?.__resolveType,n)}))return null;const o=[];for(const c of d){const l=zi(c,n);if(l&&typeof l=="object")for(const m of Mn(l,e,n)??[])o.includes(m)||o.push(m)}return o}if(Ki(i)){const d=r.section&&typeof r.section=="object"?Mn(r.section,e,n):[];return d===null?null:d.length?[i,...d]:[i]}return[i]}function rt(t){return t.replace(/[`*_]/g,"\\$&")}function sl(t,e){const n=[`The user selected an element on the live preview and asked: **"${rt(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:** \`${rt(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="${rt(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${rt(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${rt(t.text)}"`),t.componentName&&n.push(`**Component name:** ${rt(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 rl(t,e,n=320,r=44,i=12){const{x:d,y:a}=t,{width:o,height:c}=e,l=Math.max(i,Math.min(d-n/2,o-n-i)),f=a/c>.68?Math.max(i,a-r-18):Math.min(a+18,c-r-i);return{leftPct:l/o*100,topPct:f/c*100}}function al(t){const e=ce.c(45),{element:n,onDismiss:r}=t,[i,d]=T.useState(""),a=T.useRef(null),{sendMessage:o}=Ua(),{openSidePanel:c}=so(),l=Pe();let m;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==c||e[4]!==o?(m=()=>{if(!i.trim())return;const z=sl(n,i);c(),o({parts:[{type:"text",text:z}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=c,e[4]=o,e[5]=m):m=e[5];const f=m;let p;e[6]!==n.position||e[7]!==n.viewport?(p=rl(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const x=p,h=`${x.leftPct}%`,E=`${x.topPct}%`;let g;e[9]!==h||e[10]!==E?(g={left:h,top:E,width:"320px"},e[9]=h,e[10]=E,e[11]=g):g=e[11];let y;e[12]!==f?(y=z=>{z.preventDefault(),f()},e[12]=f,e[13]=y):y=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=z=>d(z.target.value),e[14]=N):N=e[14];let b;e[15]!==r?(b=z=>{z.key==="Escape"&&r()},e[15]=r,e[16]=b):b=e[16];let v;e[17]!==l?(v=l("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=l,e[18]=v):v=e[18];let S;e[19]!==i||e[20]!==b||e[21]!==v?(S=s.jsx("input",{ref:a,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:b,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=b,e[21]=v,e[22]=S):S=e[22];let j;e[23]!==i?(j=i.trim(),e[23]=i,e[24]=j):j=e[24];const k=!j;let P;e[25]!==l?(P=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=P):P=e[26];let C;e[27]!==l?(C=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=C):C=e[28];let A;e[29]!==C?(A=s.jsx("title",{children:C}),e[29]=C,e[30]=A):A=e[30];let R;e[31]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=R):R=e[31];let L;e[32]!==A?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[A,R]}),e[32]=A,e[33]=L):L=e[33];let O;e[34]!==k||e[35]!==P||e[36]!==L?(O=s.jsx("button",{type:"submit",disabled:k,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:P,children:L}),e[34]=k,e[35]=P,e[36]=L,e[37]=O):O=e[37];let _;e[38]!==S||e[39]!==O||e[40]!==y?(_=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:y,children:[S,O]}),e[38]=S,e[39]=O,e[40]=y,e[41]=_):_=e[41];let B;return e[42]!==_||e[43]!==g?(B=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:_}),e[42]=_,e[43]=g,e[44]=B):B=e[44],B}const Gs="site-links",il=/details?page|\bpdp\b/i,ol=/listingpage|\bplp\b/i;function ll(t,e,n){const r=new Set;for(const o of n)il.test(o)&&r.add("product"),ol.test(o)&&r.add("category");const i=Tt(Un(t)),d=i[i.length-1],a=i[i.length-2];return d?.type==="text"&&d.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 cl=["rosa","preto","pink","black"];function Jt(t,e){const n=e.trim();return n?t(n):cl.flatMap(r=>t(r))}function dl(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const d=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:d,count:10}}),r}const Fr=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Vn(t){return t.split("/")[0]??""}function ul(t){const e=new Set;for(const n of t){const r=Vn(n);Fr.has(r)&&e.add(r)}return e}function fl(t,e){const n=Vn(t);return!Fr.has(n)||e.size===0?!0:e.has(n)}const pl=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>Jt(n=>dl(t,n),e),optionsFromPayload:Yt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Jt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Yt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Jt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Yt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Jt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Yt},{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:yl}];function ml(t,e,n=new Set){const r=[...e],i=o=>{const c=[];for(const l of pl){if(l.kind!==o)continue;const m=r.find(f=>l.test(f)&&fl(f,n));m&&c.push({cand:l,resolveType:m})}return c.find(l=>n.has(Vn(l.resolveType)))??c[0]},d=(o,c,l)=>({kind:o.kind,id:`${o.kind}:${c}`,resolveType:c,clientFilter:o.clientFilter,isFallback:l,buildRequests:m=>o.buildRequests(c,m),optionsFromPayload:o.optionsFromPayload}),a=[];for(const o of["product","category"]){if(!t.has(o))continue;const c=i(o);c&&a.push(d(c.cand,c.resolveType,!1))}return t.size>0&&a.push(hl(t.has("category")?"category":"product")),a}function hl(t){return{kind:t,id:Gs,resolveType:Gs,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>jl(e,n)}}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function gl(t,e,n){const r=new Set,i=new Set,d=a=>{if(Array.isArray(a)){for(const l of a)d(l);return}const o=Ge(a);if(!o)return;const c=o.__resolveType;if(typeof c=="string"){if(n(c))r.add(c);else if(c in e&&!i.has(c)){i.add(c);const l=Ge(e[c])?.__resolveType;typeof l=="string"&&n(l)&&r.add(c),d(e[c])}}for(const l of Object.values(o))d(l)};return d(t),r}function zr(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function Kr(t){try{return decodeURIComponent(t)}catch{return t}}function vl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xl(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=vl(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function Ir(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=Tt(Un(e)),{pattern:d,order:a}=xl(i),o=a.indexOf(n);if(o===-1)return null;const c=r.match(d);if(!c)return null;const l=c[o+1]?.replace(/^\/+|\/+$/g,"");return l?Kr(l):null}function Yt(t,e){const n=Ge(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],d=new Set;for(const a of r){const o=Ge(a);if(!o)continue;const c=Ir(o.url,e.template,e.paramName);if(!c||d.has(c))continue;d.add(c);const l=Ge(o.isVariantOf),m=typeof l?.name=="string"&&l.name||typeof o.name=="string"&&o.name||c,f=Array.isArray(o.image)?Ge(o.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:c,label:m,image:p})}return i}function bl(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?Kr(n):null}function yl(t){const e=[],n=new Set,r=(i,d)=>{const a=Ge(i);if(!a)return;const o=typeof a.name=="string"&&a.name?a.name:"",c=o?[...d,o]:d,l=bl(a.url);if(l&&!n.has(l)&&(n.add(l),e.push({value:l,label:c.join(" › ")||l})),Array.isArray(a.children))for(const m of a.children)r(m,c)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const wl=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 kl(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Sl(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 d=r[1]??"",a=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:d,text:a})}return e}function Pl(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 d,a=0;for(;(d=r.exec(t))!==null&&a++<3e3;){const o=(d[1]??"").replace(/\\\//g,"/");if(!o||n.has(o))continue;n.add(o);const c=t.slice(d.index,d.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:o,name:d[2]??"",image:c||void 0})}return e}function jl(t,e){const n=[],r=new Set,i=(d,a,o,c)=>{if(n.length>=200)return;const l=Ir(d,e.template,e.paramName);!l||r.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||o==="category"&&wl.has(l.split("/")[0]??"")||(r.add(l),n.push({value:l,label:a&&a.length<=80?a:kl(l),kind:o,image:c}))};for(const{url:d,name:a,image:o}of Pl(t))i(d,a,"product",o);for(const{href:d,text:a}of Sl(t))d.startsWith("/")&&!d.startsWith("//")&&i(d,a,"category");return n}function St(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(d=>d.label.toLowerCase().includes(r)||d.value.toLowerCase().includes(r)):t).slice(0,n)}const Ur=1e4;function El(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 Nl(t,{resolveType:e,props:n}){const r=await fetch(mi(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(Ur)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Js(t,e){const n=await fetch(hi(t,e),{signal:AbortSignal.timeout(Ur)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Tl(t,e,n){const r=e.optionsFromPayload(await Js(t,"/"),n),i=r.find(a=>a.kind==="category");if(!i)return r;const d=Ve(n.template,{[n.paramName]:i.value});if(d==="/")return r;try{const a=e.optionsFromPayload(await Js(t,d),n).filter(o=>o.kind==="product");return zr([r,a])}catch{return r}}function Cl(t,e,n){return ir.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Rl(t,e,n,r){if(e.homepageLinks)return Tl(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const d=await Promise.allSettled(i.map(o=>Nl(t,o))),a=d.filter(o=>o.status==="fulfilled").map(o=>o.value);if(a.length===0){const o=d.find(c=>c.status==="rejected");throw o?o.reason:new Error("Failed to fetch options")}return zr(a.map(o=>e.optionsFromPayload(o,r)))}function Fn(t,e,n,r,i){return{queryKey:Cl(t,e,n),queryFn:()=>Rl(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function Pt(t){const e=ce.c(16),{heading:n,iconKind:r,options:i,template:d,paramName:a,keyPrefix:o,onSelect:c}=t;if(i.length===0)return null;let l;if(e[0]!==r||e[1]!==o||e[2]!==c||e[3]!==i||e[4]!==a||e[5]!==d){let f;e[7]!==r||e[8]!==o||e[9]!==c||e[10]!==a||e[11]!==d?(f=p=>s.jsxs(Nt,{value:`${o}:${p.value}`,className:"gap-3 py-2",onSelect:()=>c(p.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:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(mr,{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:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Ve(d,{[a]:p.value})})]})]},`${o}:${p.value}`),e[7]=r,e[8]=o,e[9]=c,e[10]=a,e[11]=d,e[12]=f):f=e[12],l=i.map(f),e[0]=r,e[1]=o,e[2]=c,e[3]=i,e[4]=a,e[5]=d,e[6]=l}else l=e[6];let m;return e[13]!==n||e[14]!==l?(m=s.jsx(Et,{heading:n,children:l}),e[13]=n,e[14]=l,e[15]=m):m=e[15],m}function Ys(t){const e=ce.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Ll(t){const e=ce.c(52),{sources:n,template:r,paramName:i,value:d,sandboxRef:a,onCommit:o}=t,c=Pe(),[l,m]=T.useState(!1),[f,p]=T.useState(""),[x,h]=T.useState(""),E=T.useRef(null),g=i==="*"?c("sandbox.preview.catchAllParamLabel"):`:${i}`,y=El(c),b=[...new Set(n.map(ne=>y[ne.kind].noun))].join(" or ");let v;e[0]!==c||e[1]!==b?(v=c("sandbox.pathParamPickerChip.searchPlaceholder",{options:b}),e[0]=c,e[1]=b,e[2]=v):v=e[2];const S=v,j={template:r,paramName:i};let k;e[3]!==f?(k=(ne,ie)=>({source:ne,query:ie,options:ne.clientFilter?St(ie.data??[],f):ie.data??[]}),e[3]=f,e[4]=k):k=e[4];const P=k,C=n.filter(Fl),A=n.filter(Ml),R=Bn({queries:C.map(ne=>Fn(a,ne,x,j,l))});let L;e[5]!==R||e[6]!==P?(L=(ne,ie)=>P(ne,R[ie]),e[5]=R,e[6]=P,e[7]=L):L=e[7];const O=C.map(L),_=O.length===0||O.every($l),B=Bn({queries:A.map(ne=>Fn(a,ne,x,j,l&&_))});let z;e[8]!==B||e[9]!==P?(z=(ne,ie)=>P(ne,B[ie]),e[8]=B,e[9]=P,e[10]=z):z=e[10];const H=A.map(z),I=_?H:O,W=I.length===1&&I[0]?.source.homepageLinks?I[0]:null,G=W&&!W.query.isLoading&&!W.query.isError?W?.query.data??[]:[],te=St(G.filter(Bl),f),D=St(G.filter(Dl),f),$=te.length>0&&D.length>0,F=ne=>{m(ne),E.current&&clearTimeout(E.current),p(ne?d:""),h(ne?d:"")};let J;e[11]===Symbol.for("react.memo_cache_sentinel")?(J=ne=>{p(ne),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{h(ne)},300)},e[11]=J):J=e[11];const M=J,V=ne=>{o(ne),F(!1)},Y=Lr(f),q=Ve(r,{[i]:Y}),se=ar,ee=rr,Z="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ae=Ol;let pe;e[12]!==g||e[13]!==c?(pe=c("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=c,e[14]=pe):pe=e[14];let de;e[15]!==pe?(de=s.jsx(or,{className:"sr-only",children:s.jsx(lr,{children:pe})}),e[15]=pe,e[16]=de):de=e[16];let ve;e[17]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(mr,{size:16,className:"shrink-0 text-foreground"}),e[17]=ve):ve=e[17];let ue;e[18]!==c?(ue=c("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=c,e[19]=ue):ue=e[19];let xe;e[20]!==g?(xe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-xs text-special",children:g}),e[20]=g,e[21]=xe):xe=e[21];let me;e[22]!==ue||e[23]!==xe?(me=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[ve,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ue," ",xe]})]}),e[22]=ue,e[23]=xe,e[24]=me):me=e[24];const ge=kr,je=!1,fe="min-h-0 flex-1";let oe;e[25]!==S||e[26]!==f?(oe=s.jsx(Sr,{autoFocus:!0,placeholder:S,value:f,onValueChange:M}),e[25]=S,e[26]=f,e[27]=oe):oe=e[27];const Ne=wr,Fe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ze;e[28]!==c?(ze=c("sandbox.pathParamPickerChip.noResults"),e[28]=c,e[29]=ze):ze=e[29];let Be;e[30]!==ze?(Be=s.jsx(Pr,{children:ze}),e[30]=ze,e[31]=Be):Be=e[31];const ut=Y&&s.jsx(Et,{className:"shrink-0",children:s.jsxs(Nt,{value:`__raw__:${Y}`,className:"gap-3 py-2",onSelect:()=>V(Y),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(ao,{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:c("sandbox.pathParamPickerChip.useRawValue",{rawTerm:Y,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:q})]})]})}),Je=$?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(Pt,{heading:y.category.heading,iconKind:"category",options:te,template:r,paramName:i,keyPrefix:`${W?.source.id}:cat`,onSelect:V})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(Pt,{heading:y.product.heading,iconKind:"product",options:D,template:r,paramName:i,keyPrefix:`${W?.source.id}:prod`,onSelect:V})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:I.map(ne=>{const{source:ie,query:ke,options:Ie}=ne,{noun:ft}=y[ie.kind];if(ke.isLoading)return s.jsx(Ys,{text:c("sandbox.pathParamPickerChip.loading",{noun:ft})},ie.id);if(ke.isError)return s.jsx(Ys,{text:c("sandbox.pathParamPickerChip.couldNotLoad")},ie.id);if(ie.homepageLinks){const Ye=ke.data??[];return s.jsxs(T.Fragment,{children:[s.jsx(Pt,{heading:y.category.heading,iconKind:"category",options:St(Ye.filter(_l),f),template:r,paramName:i,keyPrefix:`${ie.id}:cat`,onSelect:V}),s.jsx(Pt,{heading:y.product.heading,iconKind:"product",options:St(Ye.filter(Al),f),template:r,paramName:i,keyPrefix:`${ie.id}:prod`,onSelect:V})]},ie.id)}return s.jsx(Pt,{heading:I.length>1?y[ie.kind].heading:void 0,iconKind:ie.kind,options:Ie,template:r,paramName:i,keyPrefix:ie.id,onSelect:V},ie.id)})});let he;e[32]!==Ne||e[33]!==Be||e[34]!==ut||e[35]!==Je?(he=s.jsxs(Ne,{className:Fe,children:[Be,ut,Je]}),e[32]=Ne,e[33]=Be,e[34]=ut,e[35]=Je,e[36]=he):he=e[36];let Re;e[37]!==ge||e[38]!==oe||e[39]!==he?(Re=s.jsxs(ge,{shouldFilter:je,className:fe,children:[oe,he]}),e[37]=ge,e[38]=oe,e[39]=he,e[40]=Re):Re=e[40];let _e;e[41]!==ee||e[42]!==de||e[43]!==me||e[44]!==Re||e[45]!==ae?(_e=s.jsxs(ee,{className:Z,onClick:ae,children:[de,me,Re]}),e[41]=ee,e[42]=de,e[43]=me,e[44]=Re,e[45]=ae,e[46]=_e):_e=e[46];let Ke;return e[47]!==se||e[48]!==F||e[49]!==l||e[50]!==_e?(Ke=s.jsx(se,{open:l,onOpenChange:F,children:_e}),e[47]=se,e[48]=F,e[49]=l,e[50]=_e,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:c("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-xs text-special hover:bg-special/25",onClick:ne=>{ne.stopPropagation(),F(!0)},children:d||g}),Ke]})}function Al(t){return t.kind==="product"}function _l(t){return t.kind!=="product"}function Ol(t){return t.stopPropagation()}function Dl(t){return t.kind==="product"}function Bl(t){return t.kind!=="product"}function $l(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Ml(t){return t.isFallback}function Fl(t){return!t.isFallback}function zl(t){const e=ce.c(8),{sources:n,template:r,paramName:i,sandboxRef:d,onFill:a}=t;let o,c;if(e[0]!==i||e[1]!==d||e[2]!==n||e[3]!==r){const x={template:r,paramName:i},h=n.filter(Kl);c=Bn,o=h.map(E=>Fn(d,E,"",x,!0)),e[0]=i,e[1]=d,e[2]=n,e[3]=r,e[4]=o,e[5]=c}else o=e[4],c=e[5];let l;e[6]!==o?(l={queries:o},e[6]=o,e[7]=l):l=e[7];const m=c(l),[f,p]=T.useState(!1);if(!f)for(const x of m){if(x.isLoading)break;const h=x.data?.[0];if(h){p(!0),queueMicrotask(()=>a(h.value));break}}return null}function Kl(t){return!t.isFallback}function Il(t){const e=ce.c(31),{name:n,value:r,onCommit:i}=t,d=Pe(),[a,o]=T.useState(r),[c,l]=T.useState(!1),m=T.useRef(!1);let f;e[0]!==n||e[1]!==d?(f=n==="*"?d("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=d,e[2]=f):f=e[2];const p=f,x=a||p;let h;e[3]!==x?(h=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-xs",children:x}),e[3]=x,e[4]=h):h=e[4];let E;e[5]!==p||e[6]!==d?(E=d("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=d,e[7]=E):E=e[7];let g,y;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=P=>o(P.target.value),y=()=>l(!0),e[8]=g,e[9]=y):(g=e[8],y=e[9]);let N;e[10]!==r?(N=P=>{P.key==="Enter"&&P.currentTarget.blur(),P.key==="Escape"&&(m.current=!0,o(r),P.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let b;e[12]!==a||e[13]!==i||e[14]!==r?(b=()=>{if(l(!1),m.current){m.current=!1;return}const P=Lr(a);o(P),P!==r&&i(P)},e[12]=a,e[13]=i,e[14]=r,e[15]=b):b=e[15];let v;e[16]!==a||e[17]!==p||e[18]!==E||e[19]!==N||e[20]!==b?(v=s.jsx("input",{type:"text",value:a,placeholder:p,title:E,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-xs text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:Ul,onChange:g,onFocus:y,onKeyDown:N,onBlur:b}),e[16]=a,e[17]=p,e[18]=E,e[19]=N,e[20]=b,e[21]=v):v=e[21];let S;e[22]!==h||e[23]!==v?(S=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[h,v]}),e[22]=h,e[23]=v,e[24]=S):S=e[24];let j;e[25]!==c||e[26]!==d?(j=c&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-2xs text-muted-foreground",children:[s.jsx(Ya,{size:10}),d("sandbox.preview.enterToGo")]}),e[25]=c,e[26]=d,e[27]=j):j=e[27];let k;return e[28]!==j||e[29]!==S?(k=s.jsxs(s.Fragment,{children:[S,j]}),e[28]=j,e[29]=S,e[30]=k):k=e[30],k}function Ul(t){return t.stopPropagation()}function Hl(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 Vl(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function ql(t){return t.showPreviewToolbar&&t.contentEditingEnabled}class Hr extends Error{constructor(){super("The site's schema isn't loaded yet"),this.name="PageSchemaNotReadyError"}}async function Wl(t,e){if(t)return t;const n=await e?.().catch(()=>null);if(!n)throw new Hr;return n}async function Gl(t,e,n){return n?Ns(t,e,await Wl(n.meta,n.loadMeta)):Ns(t,e)}function Jl(t){const e=ce.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=dr(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async d=>{const{name:a,path:o,template:c,schema:l}=d;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const m=Aa(a),f=c?{...c,name:a,path:o}:await Gl(a,o,l);return await r.mutateAsync({blockKey:m,data:f}),{key:m,name:a,path:o}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Sa(i)}function Yl(t){const e=ce.c(89),{open:n,onOpenChange:r,isPending:i,error:d,templates:a,onSubmit:o}=t,c=i===void 0?!1:i,l=Pe();let m;e[0]!==l?(m=l("sectionsEditor.createPageModal.defaultPageName"),e[0]=l,e[1]=m):m=e[1];const[f,p]=T.useState(m);let x;e[2]!==l?(x=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=x):x=e[3];const[h,E]=T.useState(x),[g,y]=T.useState(Pn),[N,b]=T.useState(null),[v,S]=T.useState(n);n!==v&&(S(n),n&&(p(l("sectionsEditor.createPageModal.defaultPageName")),E(l("sectionsEditor.createPageModal.defaultPagePath")),y(Pn),b(null)));const j=!!a?.length;let k;e[4]!==c||e[5]!==r?(k=ue=>{!ue&&!c&&(b(null),r(!1))},e[4]=c,e[5]=r,e[6]=k):k=e[6];const P=k;let C;e[7]!==c||e[8]!==f||e[9]!==o||e[10]!==h||e[11]!==j||e[12]!==g?(C=async ue=>{ue.preventDefault();const xe=f.trim(),me=h.trim();if(!xe||!me||c)return;const ge=Ar(me);if(ge){b(ge);return}b(null),await o({name:xe,path:me,templateKey:j&&g!==Pn?g:null})},e[7]=c,e[8]=f,e[9]=o,e[10]=h,e[11]=j,e[12]=g,e[13]=C):C=e[13];const A=C,R=N??d;let L;e[14]!==l?(L=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=L):L=e[15];let O;e[16]!==L?(O=s.jsx(or,{children:s.jsx(lr,{children:L})}),e[16]=L,e[17]=O):O=e[17];let _;e[18]!==l?(_=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=_):_=e[19];let B;e[20]!==_?(B=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:_}),e[20]=_,e[21]=B):B=e[21];let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=ue=>p(ue.target.value),e[22]=z):z=e[22];let H;e[23]!==l?(H=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=H):H=e[24];let I;e[25]!==c||e[26]!==f||e[27]!==H?(I=s.jsx(An,{id:"new-page-name",value:f,onChange:z,placeholder:H,autoFocus:!0,disabled:c}),e[25]=c,e[26]=f,e[27]=H,e[28]=I):I=e[28];let W;e[29]!==I||e[30]!==B?(W=s.jsxs("div",{className:"space-y-1.5",children:[B,I]}),e[29]=I,e[30]=B,e[31]=W):W=e[31];let U;e[32]!==l?(U=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=U):U=e[33];let G;e[34]!==U?(G=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:U}),e[34]=U,e[35]=G):G=e[35];let te;e[36]===Symbol.for("react.memo_cache_sentinel")?(te=ue=>E(ue.target.value),e[36]=te):te=e[36];let D;e[37]!==l?(D=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=D):D=e[38];let $;e[39]!==c||e[40]!==h||e[41]!==D?($=s.jsx(An,{id:"new-page-path",value:h,onChange:te,placeholder:D,disabled:c}),e[39]=c,e[40]=h,e[41]=D,e[42]=$):$=e[42];let F;e[43]!==G||e[44]!==$?(F=s.jsxs("div",{className:"space-y-1.5",children:[G,$]}),e[43]=G,e[44]=$,e[45]=F):F=e[45];let J;e[46]!==c||e[47]!==j||e[48]!==l||e[49]!==g||e[50]!==a?(J=j&&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:l("sectionsEditor.createPageModal.templateLabel")}),s.jsx(_a,{id:"new-page-template",value:g,onChange:y,templates:a??[],disabled:c})]}),e[46]=c,e[47]=j,e[48]=l,e[49]=g,e[50]=a,e[51]=J):J=e[51];let M;e[52]!==R?(M=R&&s.jsx("p",{className:"text-xs text-destructive",children:R}),e[52]=R,e[53]=M):M=e[53];let V;e[54]!==W||e[55]!==F||e[56]!==J||e[57]!==M?(V=s.jsxs("div",{className:"space-y-4 py-4",children:[W,F,J,M]}),e[54]=W,e[55]=F,e[56]=J,e[57]=M,e[58]=V):V=e[58];let Y;e[59]!==r?(Y=()=>r(!1),e[59]=r,e[60]=Y):Y=e[60];let q;e[61]!==l?(q=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=q):q=e[62];let se;e[63]!==c||e[64]!==Y||e[65]!==q?(se=s.jsx(Me,{type:"button",variant:"outline",onClick:Y,disabled:c,children:q}),e[63]=c,e[64]=Y,e[65]=q,e[66]=se):se=e[66];let ee;e[67]!==c||e[68]!==f||e[69]!==h?(ee=!f.trim()||!h.trim()||c,e[67]=c,e[68]=f,e[69]=h,e[70]=ee):ee=e[70];let Z;e[71]!==c||e[72]!==l?(Z=c?s.jsxs(s.Fragment,{children:[s.jsx(Ct,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=c,e[72]=l,e[73]=Z):Z=e[73];let ae;e[74]!==ee||e[75]!==Z?(ae=s.jsx(Me,{type:"submit",disabled:ee,children:Z}),e[74]=ee,e[75]=Z,e[76]=ae):ae=e[76];let pe;e[77]!==se||e[78]!==ae?(pe=s.jsxs(Pa,{children:[se,ae]}),e[77]=se,e[78]=ae,e[79]=pe):pe=e[79];let de;e[80]!==A||e[81]!==V||e[82]!==pe||e[83]!==O?(de=s.jsx(rr,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:A,children:[O,V,pe]})}),e[80]=A,e[81]=V,e[82]=pe,e[83]=O,e[84]=de):de=e[84];let ve;return e[85]!==P||e[86]!==n||e[87]!==de?(ve=s.jsx(ar,{open:n,onOpenChange:P,children:de}),e[85]=P,e[86]=n,e[87]=de,e[88]=ve):ve=e[88],ve}function Ql(t){const e=ce.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:d,meta:a,decofile:o,blockKey:c}=t,l=Pe();let m;e[0]!==i||e[1]!==n||e[2]!==r?(m={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=m):m=e[3];const f=dr(m);let p;e[4]!==f?(p=Ba((S,j)=>f.mutate({blockKey:S,data:j})),e[4]=f,e[5]=p):p=e[5];const x=p;let h;e[6]!==c||e[7]!==o?(h=Oa(o,c),e[6]=c,e[7]=o,e[8]=h):h=e[8];const{resolveType:E,props:g,title:y}=h;if(!E){let S;e[9]!==l?(S=l("sandbox.preview.loaderNoLongerExists"),e[9]=l,e[10]=S):S=e[10];let j;return e[11]!==S?(j=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:S}),e[11]=S,e[12]=j):j=e[12],j}const N=`loader:${c}`;let b;e[13]!==c||e[14]!==E||e[15]!==y?(b={mode:"saved",blockKey:c,resolveType:E,title:y},e[13]=c,e[14]=E,e[15]=y,e[16]=b):b=e[16];let v;return e[17]!==i||e[18]!==o||e[19]!==a||e[20]!==n||e[21]!==d||e[22]!==g||e[23]!==f.isPending||e[24]!==x||e[25]!==N||e[26]!==b||e[27]!==r?(v=s.jsx(Da,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:d,meta:a,decofile:o,kind:"loaders",target:b,initialValue:g,isCreating:f.isPending,onCreate:Xl,onSaveReferencedBlock:x,showRun:!1},N),e[17]=i,e[18]=o,e[19]=a,e[20]=n,e[21]=d,e[22]=g,e[23]=f.isPending,e[24]=x,e[25]=N,e[26]=b,e[27]=r,e[28]=v):v=e[28],v}async function Xl(){}function Zl(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Qs(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:Zl(t.error)}}function ec(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 tc(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=ec(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 nc=T.lazy(()=>ja(()=>import("./sections-editor-DgEGZXcq.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])).then(t=>({default:t.SectionsEditor})));function Xs(t){const e=ce.c(60),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,d=r===void 0?null:r,{org:a}=Kn(),{currentBranch:o,taskId:c}=Rt(),l=Hn(),m=Lt(),f=Or(),p=l.lifecycle.phase==="running",x=m.previewUrl;let h;e[0]!==o||e[1]!==a||e[2]!==x||e[3]!==c||e[4]!==n?(h=o?{orgSlug:a.slug,virtualMcpId:n,branch:o,threadId:c??null,previewUrl:x}:null,e[0]=o,e[1]=a,e[2]=x,e[3]=c,e[4]=n,e[5]=h):h=e[5];const E=h,g=nn(n,o);let y;e[6]!==p?(y={fetchEnabled:p},e[6]=p,e[7]=y):y=e[7];const N=In(E,y);let b;e[8]!==p?(b={fetchEnabled:p},e[8]=p,e[9]=b):b=e[9];const v=Rr(E,b),S=tc({lifecyclePhase:l.lifecycle.phase,decofile:Qs(N),meta:Qs(v),hasEditableContent:Ii(N.data,v.data),fastPreviewActive:jr(n).runtime==="cms"||at(g)}),j=ur()===void 0,k=sc;if(Ri(g)){let D;return e[10]===Symbol.for("react.memo_cache_sentinel")?(D=k(s.jsx(Ai,{})),e[10]=D):D=e[10],D}if(g.kind==="pending"&&g.retrying){let D;return e[11]!==g?(D=k(s.jsx(_i,{backend:g})),e[11]=g,e[12]=D):D=e[12],D}if(S.kind==="loading"||j){let D;return e[13]===Symbol.for("react.memo_cache_sentinel")?(D=k(s.jsx(Ea,{})),e[13]=D):D=e[13],D}if(N.data&&gi(v.data)){const D=f.state.target,$=D?.kind==="page"||D?.kind==="section"?D.key:null,F=$??"",J=o??"";let M;return e[14]!==N.data||e[15]!==$||e[16]!==a.slug||e[17]!==F||e[18]!==J||e[19]!==n?(M=k(s.jsx($a,{orgSlug:a.slug,virtualMcpId:n,branch:J,decofile:N.data,initialKey:$,compact:!0},F)),e[14]=N.data,e[15]=$,e[16]=a.slug,e[17]=F,e[18]=J,e[19]=n,e[20]=M):M=e[20],M}if(S.kind==="empty"){let D;return e[21]===Symbol.for("react.memo_cache_sentinel")?(D=k(s.jsx(Oi,{})),e[21]=D):D=e[21],D}if(S.kind==="error"){let D;e[22]!==N||e[23]!==m||e[24]!==v||e[25]!==S.source?(D=()=>{if(S.source==="sandbox"){m.retry();return}Promise.all([N.refetch(),v.refetch()])},e[22]=N,e[23]=m,e[24]=v,e[25]=S.source,e[26]=D):D=e[26];const $=D;let F;return e[27]!==$||e[28]!==S.source?(F=k(s.jsx(Li,{source:S.source,onRetry:$})),e[27]=$,e[28]=S.source,e[29]=F):F=e[29],F}let P;e[30]===Symbol.for("react.memo_cache_sentinel")?(P=D=>k(s.jsx("div",{className:"h-full min-h-0",children:D})),e[30]=P):P=e[30];const C=P,A=f.state.target;if(A?.kind==="loader"&&N.data&&v.data){const D=o??"",$=x??null;let F;return e[31]!==N.data||e[32]!==v.data||e[33]!==a.slug||e[34]!==D||e[35]!==$||e[36]!==A.key||e[37]!==n?(F=C(s.jsx(Ql,{orgSlug:a.slug,virtualMcpId:n,branch:D,previewUrl:$,meta:v.data,decofile:N.data,blockKey:A.key})),e[31]=N.data,e[32]=v.data,e[33]=a.slug,e[34]=D,e[35]=$,e[36]=A.key,e[37]=n,e[38]=F):F=e[38],F}let R;e[39]!==o||e[40]!==a.slug||e[41]!==A||e[42]!==n?(R=A||!o?null:fr(pr(a.slug,n,o)),e[39]=o,e[40]=a.slug,e[41]=A,e[42]=n,e[43]=R):R=e[43];const L=R;let O="/",_=null,B=null;A?.kind==="page"?(O=A.path,_=A.key):A?.kind==="section"?B=A.key:L&&(O=L.path,_=L.pageKey);const z=_?`page:${_}`:B?`section:${B}`:`path:${O}`;let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(Ct,{className:"size-5 text-muted-foreground"})}),e[44]=H):H=e[44];const I=o??"",W=x??void 0,U=B?null:d,G=!!_&&f.state.editSeoPageKey===_;let te;return e[45]!==B||e[46]!==_||e[47]!==O||e[48]!==z||e[49]!==i||e[50]!==a.slug||e[51]!==U||e[52]!==G||e[53]!==I||e[54]!==W||e[55]!==n||e[56]!==f.consumeEditSeo||e[57]!==f.setFocusedBlock||e[58]!==f.setVariantOverride?(te=C(s.jsx(T.Suspense,{fallback:H,children:s.jsx(nc,{orgSlug:a.slug,virtualMcpId:n,branch:I,previewReady:!0,previewUrl:W,currentPath:O,activePageBlockKey:_,activeGlobalBlockKey:B,externalSelection:U,initialEditSeo:G,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},z)})),e[45]=B,e[46]=_,e[47]=O,e[48]=z,e[49]=i,e[50]=a.slug,e[51]=U,e[52]=G,e[53]=I,e[54]=W,e[55]=n,e[56]=f.consumeEditSeo,e[57]=f.setFocusedBlock,e[58]=f.setVariantOverride,e[59]=te):te=e[59],te}function sc(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Zs(t){const e=ce.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:d}=t,a=Pe(),o=ur(),c=o===!0,l=vi(n);let m;e[0]!==l||e[1]!==r?(m=xi(l,oo(r)),e[0]=l,e[1]=r,e[2]=m):m=e[2];const f=m,{org:p}=Kn(),{currentBranch:x,taskId:h}=Rt(),g=Lt().previewUrl;let y;e[3]!==x||e[4]!==p.slug||e[5]!==g||e[6]!==h||e[7]!==n?(y=x?{orgSlug:p.slug,virtualMcpId:n,branch:x,threadId:h??null,previewUrl:g}:null,e[3]=x,e[4]=p.slug,e[5]=g,e[6]=h,e[7]=n,e[8]=y):y=e[8];const b=In(y),v=x??"";let S;e[9]!==p.slug||e[10]!==v||e[11]!==n?(S={orgSlug:p.slug,virtualMcpId:n,branch:v},e[9]=p.slug,e[10]=v,e[11]=n,e[12]=S):S=e[12];const{save:j,flush:k}=Ma(S),P=b.data?.[r],C=b.data===void 0&&b.isLoading||o===void 0,A=b.data!==void 0&&P===void 0,R=!x||A||C;let L;e[13]!==P?(L=P===void 0?"":JSON.stringify(P,null,2),e[13]=P,e[14]=L):L=e[14];const O=L;let _;e[15]!==r||e[16]!==R||e[17]!==j?(_=U=>{if(R)return;let G;try{G=JSON.parse(U)}catch{return}G===null||typeof G!="object"||Array.isArray(G)||j(r,G)},e[15]=r,e[16]=R,e[17]=j,e[18]=_):_=e[18];const B=_;let z;e[19]!==k?(z=()=>({flush:k}),e[19]=k,e[20]=z):z=e[20],T.useImperativeHandle(d,z);let H;e[21]!==f||e[22]!==c||e[23]!==i||e[24]!==a?(H=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:f,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f})}):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(Me,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":a("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:s.jsx(Na,{size:14})})]}),e[21]=f,e[22]=c,e[23]=i,e[24]=a,e[25]=H):H=e[25];let I;e[26]!==b.data||e[27]!==k||e[28]!==O||e[29]!==C||e[30]!==A||e[31]!==r||e[32]!==R||e[33]!==B||e[34]!==a?(I=C?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(Ct,{className:"size-5 text-muted-foreground"})}):A?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(io,{code:O,language:"json",readOnly:R,height:"100%",onChange:U=>B(U??""),onSave:U=>{B(U),k()}},`${r}:${b.data===void 0?"loading":"ready"}`)}),e[26]=b.data,e[27]=k,e[28]=O,e[29]=C,e[30]=A,e[31]=r,e[32]=R,e[33]=B,e[34]=a,e[35]=I):I=e[35];let W;return e[36]!==H||e[37]!==I?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[H,I]}),e[36]=H,e[37]=I,e[38]=W):W=e[38],W}function Vr(t){return t.contentEditingEnabled&&!t.isMobile}function rc(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function ac(t,e){return t==="blocks"?"preview":e?"blocks":t}function ic(t){return Vr({contentEditingEnabled:_r(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function oc(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}function lc(t){const e=eo(t),{display:n}=t;let r=null;if(n.mode==="production"&&n.iframeBase)try{r=new URL(t.path,n.iframeBase).href}catch{r=null}const i=to(r,e);return{value:e,frame:i?$n(i,t.device):null,newTab:i}}function cc(t){const e=ce.c(90),{tests:n,options:r,onChange:i,available:d}=t,a=Pe();let o;e[0]!==r?(o=Dr(r),e[0]=r,e[1]=o):o=e[1];const c=o;let l;e[2]!==r.tests?(l=r.tests??{},e[2]=r.tests,e[3]=l):l=e[3];const m=l;let f;e[4]!==i||e[5]!==r?(f=q=>{const se=q?Bi(q):null,{at:ee,...Z}=r;i(se?{...Z,at:se}:Z)},e[4]=i,e[5]=r,e[6]=f):f=e[6];const p=f;let x;e[7]!==m||e[8]!==i||e[9]!==r?(x=(q,se)=>{const ee={...m};se==="on"?ee[q]=!0:se==="off"?ee[q]=!1:delete ee[q];const{tests:Z,...ae}=r;i(Object.keys(ee).length>0?{...ae,tests:ee}:ae)},e[7]=m,e[8]=i,e[9]=r,e[10]=x):x=e[10];const h=x;let E;e[11]!==a?(E=a("sandbox.previewAs.label"),e[11]=a,e[12]=E):E=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Qa,{size:16}),e[13]=g):g=e[13];let y;e[14]!==c||e[15]!==E?(y=s.jsx(lt,{asChild:!0,children:s.jsx(xr,{asChild:!0,children:s.jsx(We,{"aria-label":E,active:c,"data-testid":"preview-as-trigger",children:g})})}),e[14]=c,e[15]=E,e[16]=y):y=e[16];let N;e[17]!==a?(N=a("sandbox.previewAs.label"),e[17]=a,e[18]=N):N=e[18];let b;e[19]!==N?(b=s.jsx(ct,{children:N}),e[19]=N,e[20]=b):b=e[20];let v;e[21]!==y||e[22]!==b?(v=s.jsxs(dt,{children:[y,b]}),e[21]=y,e[22]=b,e[23]=v):v=e[23];let S;e[24]!==a?(S=a("sandbox.previewAs.label"),e[24]=a,e[25]=S):S=e[25];let j;e[26]!==S?(j=s.jsx("h3",{className:"text-sm font-medium",children:S}),e[26]=S,e[27]=j):j=e[27];let k;e[28]!==d||e[29]!==a?(k=a(d?"sandbox.previewAs.intro":"sandbox.previewAs.unavailable"),e[28]=d,e[29]=a,e[30]=k):k=e[30];let P;e[31]!==k?(P=s.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=P):P=e[32];let C;e[33]!==j||e[34]!==P?(C=s.jsxs("div",{className:"flex flex-col gap-1",children:[j,P]}),e[33]=j,e[34]=P,e[35]=C):C=e[35];let A;e[36]!==a?(A=a("sandbox.previewAs.momentLabel"),e[36]=a,e[37]=A):A=e[37];let R;e[38]!==A?(R=s.jsx(co,{htmlFor:"preview-as-moment",children:A}),e[38]=A,e[39]=R):R=e[39];let L;e[40]!==r.at?(L=Di(r.at),e[40]=r.at,e[41]=L):L=e[41];let O;e[42]!==p?(O=q=>p(q.target.value),e[42]=p,e[43]=O):O=e[43];let _;e[44]!==L||e[45]!==O?(_=s.jsx(An,{id:"preview-as-moment",type:"datetime-local",className:$i,value:L,onChange:O}),e[44]=L,e[45]=O,e[46]=_):_=e[46];const B=r.at===void 0;let z;e[47]!==p?(z=()=>p(""),e[47]=p,e[48]=z):z=e[48];let H;e[49]!==a?(H=a("sandbox.previewAs.now"),e[49]=a,e[50]=H):H=e[50];let I;e[51]!==B||e[52]!==z||e[53]!==H?(I=s.jsx(Me,{type:"button",variant:"ghost",size:"sm",disabled:B,onClick:z,children:H}),e[51]=B,e[52]=z,e[53]=H,e[54]=I):I=e[54];let W;e[55]!==_||e[56]!==I?(W=s.jsxs("div",{className:"flex items-center gap-2",children:[_,I]}),e[55]=_,e[56]=I,e[57]=W):W=e[57];let U;e[58]!==a?(U=a("sandbox.previewAs.momentHint"),e[58]=a,e[59]=U):U=e[59];let G;e[60]!==U?(G=s.jsx("p",{className:"text-xs text-muted-foreground",children:U}),e[60]=U,e[61]=G):G=e[61];let te;e[62]!==R||e[63]!==W||e[64]!==G?(te=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[R,W,G]}),e[62]=R,e[63]=W,e[64]=G,e[65]=te):te=e[65];let D;e[66]!==a?(D=a("sandbox.previewAs.testsLabel"),e[66]=a,e[67]=D):D=e[67];let $;e[68]!==D?($=s.jsx("span",{className:"text-sm font-medium",children:D}),e[68]=D,e[69]=$):$=e[69];let F;e[70]!==m||e[71]!==h||e[72]!==a||e[73]!==n?(F=n.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.noTests")}):s.jsxs(s.Fragment,{children:[s.jsx("ul",{className:"flex flex-col gap-1.5",children:n.map(q=>s.jsxs("li",{className:"flex items-center justify-between gap-2","data-testid":"preview-as-test",children:[s.jsx("span",{className:"min-w-0 truncate text-sm",children:q}),s.jsxs(uo,{type:"single",variant:"outline",size:"sm",value:m[q]===void 0?"":m[q]?"on":"off",onValueChange:se=>h(q,se),"aria-label":q,children:[s.jsx(Fs,{value:"off",children:a("sandbox.previewAs.off")}),s.jsx(Fs,{value:"on",children:a("sandbox.previewAs.on")})]})]},q))}),s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.testsHint")})]}),e[70]=m,e[71]=h,e[72]=a,e[73]=n,e[74]=F):F=e[74];let J;e[75]!==$||e[76]!==F?(J=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[$,F]}),e[75]=$,e[76]=F,e[77]=J):J=e[77];let M;e[78]!==c||e[79]!==i||e[80]!==a?(M=c&&s.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>i({}),children:a("sandbox.previewAs.reset")}),e[78]=c,e[79]=i,e[80]=a,e[81]=M):M=e[81];let V;e[82]!==C||e[83]!==te||e[84]!==J||e[85]!==M?(V=s.jsxs(br,{className:"flex w-80 flex-col gap-4 p-4",align:"center",sideOffset:8,"data-testid":"preview-as",children:[C,te,J,M]}),e[82]=C,e[83]=te,e[84]=J,e[85]=M,e[86]=V):V=e[86];let Y;return e[87]!==v||e[88]!==V?(Y=s.jsxs(yr,{children:[v,V]}),e[87]=v,e[88]=V,e[89]=Y):Y=e[89],Y}const dc=15e3;function uc(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 er(t){return t.loading?{...t,loading:!1}:t}const fc=500,pc={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},tr=1,Qt=["desktop","mobile","tablet"],mc=["preview","visual","blocks"],nr={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function hc(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 jt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ln(t,e){try{return new URL(t,e).href}catch{return null}}function gc(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 vc(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function xc(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),d=i.split("/").filter(Boolean),a=c=>{if(c===n)return 100;const l=c.indexOf(n);if(l===-1)return 0;let m=40;return l===0?m+=30:/[\s/-]/.test(c[l-1]??"")&&(m+=20),m+=Math.round(n.length/c.length*20),m};let o=Math.max(a(r),a(i));return d.at(-1)===n?o=Math.max(o,95):d.includes(n)&&(o=Math.max(o,90)),o}function bc(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function yc({virtualMcpId:t}){const e=Pe(),n=Cr(),{currentBranch:r,taskId:i,virtualMcpId:d}=Rt(),a=!!Ha(),o=Or(),c=ri(d===t?t:null),l=jr(t),m=po(c?.metadata?.ui?.layout??null),f=_r(m),p=Vr({contentEditingEnabled:f,isMobile:n}),[x]=T.useState(()=>ic({cmsMode:m,isMobile:n})),[h,E]=_n(On.previewEditingMode(t),u=>u&&mc.includes(u)?u:null),g=h??x,[y,N]=_n(On.previewDeviceSize(t),u=>u&&Qt.includes(u)?u:"desktop"),[b,v]=T.useState(null),[S,j]=T.useState(null),k=T.useRef(null),P=T.useRef(null),[C,A]=T.useState(!1),R=T.useRef(null),L=()=>{R.current?.flush(),A(!1)},O=()=>A(u=>(u&&R.current?.flush(),!u)),[_,B]=T.useState({width:0,height:0}),[z,H]=T.useState(!1),[I,W]=T.useState({}),[U,G]=T.useState(""),te=T.useRef(null),[D,$]=T.useState(!1),[F,J]=T.useState(),[M,V]=T.useState(null),[Y,q]=T.useState(null),[se,ee]=T.useState(null),[Z,ae]=T.useState(()=>o.state.target?.kind==="page"?o.state.target.path:"/"),[pe,de]=T.useState(()=>o.state.target?.kind==="page"?o.state.target.key:null),[ve,ue]=T.useState({}),[xe,me]=T.useState(!1),ge=T.useRef(null),je=()=>{me(!0),ge.current&&clearTimeout(ge.current),ge.current=setTimeout(()=>me(!1),15e3)},fe=()=>{ge.current&&(clearTimeout(ge.current),ge.current=null),me(!1)},{org:oe}=Kn(),Ne=Hn(),Fe=Lt(),ze=Fe.vmEntry,Be=Ne.lifecycle.phase,{url:ut,undecided:Je}=Nr(t),he=nn(t,r),{connection:Re}=Tr(t),_e=lo(t),Ke=bi({hasServeConnection:!!Re,runtime:l.runtime}),ne=Je||Ke==="github"&&(_e==="loading"||_e==="error"),ie=!at(he)&&!ne&&!(Ke==="github"&&he.kind==="pending"),ke=He(he)??ut,Ie=ke??Fe.previewUrl,ft=!!ke||Be==="running",Ye=c?.id===t?li(c.metadata):null,pt=!ke&&!Je&&c?.id===t&&l.runtime==="cms",qr=l.projectDefault==="cms",mt=ie?Xi({sandboxUrl:Ie,previewServerUrl:Ye,fastPreviewActive:pt}):null,qn=t&&r?{orgSlug:oe.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:Ie}:null,Wn=In(qn,{fetchEnabled:ft}),sn=Rr(qn,{fetchEnabled:ft}),le=Wn.data,Se=sn.data,Qe=le?Ui(le,Se).sort((u,w)=>u.name.localeCompare(w.name)):[],Gn=t&&r?{orgSlug:oe.slug,virtualMcpId:t,branch:r}:null,Jn=Jl(Gn),rn=le&&Se?Hi(le,Se):[],Yn=ie&&le&&Se?Fa(Se,le,"loaders"):[],Qn=U?(()=>{const u=U.toLowerCase();return Qe.map(w=>({page:w,score:xc(w.name,w.path,u)})).filter(({score:w})=>w>0).sort((w,K)=>K.score-w.score||w.page.path.length-K.page.path.length).map(({page:w})=>w)})():Qe,Xn=rn.filter(u=>{if(!U)return!0;const w=U.toLowerCase();return u.name.toLowerCase().includes(w)||u.key.toLowerCase().includes(w)||u.resolveType.toLowerCase().includes(w)}),Zn=p?Yn:[],es=Zn.filter(u=>{if(!U)return!0;const w=U.toLowerCase();return u.title.toLowerCase().includes(w)||u.key.toLowerCase().includes(w)||u.resolveType.toLowerCase().includes(w)}),At=Y?Yn.find(u=>u.key===Y)??null:null,Oe=Un,an=M||Y?null:Vi(Qe,Z,pe),re=an?.key??null,Xe=o.state.target?.kind==="section"?o.state.target.key:o.state.focusedBlockKey??re,_t=an?.path??null,Ze=(re?ve[re]:void 0)??{},Ee=Ve(Z,Ze),on={};if(ie&&ft&&Ie&&Se&&le){const u=za(Se,"loaders"),w=re?le[re]:void 0,K=gl(w,le,be=>u.has(be)),X=ul(K);for(const be of Tt(Z)){if(be.type!=="param")continue;const $e=ll(Z,be.name,K),Ce=ml($e,u,X);Ce.length>0&&(on[be.name]=Ce)}}const Ot=t&&r?{orgSlug:oe.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,ts=le&&re?qi(le,re,0):[],ns=at(he),ss=le?Wi(ts,le,ns):[],ln=ss.map(u=>u.isSavedBlock?u.label:""),cn=ss.map(u=>u.isSavedBlock?"global":u.isMultivariate?"variant":"normal"),dn=ts.map(u=>Mn(u,le??{},ns)),Dt=T.useRef(null),Le=T.useRef(null),Wr=Ne.status.state==="paused",un=Ne.phase,rs=Ka({claimPhase:un,lifecycle:Ne.lifecycle}),qe=Fe.previewState,Gr=Fe.userStopped,Jr=yi(oe.slug,t??""),{url:Ue}=no(pt&&t&&r?{orgSlug:oe.slug,virtualMcpId:t,branch:r,previewServerUrl:Ye??null,path:Ee}:null),Yr=qr&&l.runtime==="sandbox",Te=wi(he,Ke,_e),as=ki(Te&&pt&&he.kind==="protocol"&&t&&r?{orgSlug:oe.slug,virtualMcpId:t,branch:r}:null),is=Te?as.pointer:null,Q=Vo({previewState:qe,progressStatus:rs.status,previewServerUrl:Ye,fastPreviewActive:pt,fastPreviewReady:!!Ue,codingSession:Yr,localPreviewUrl:ke,hostedDraft:Te,hostedPointerPending:Te&&(he.kind==="pending"||as.pending),deciding:ne}),os=Q.showWakingPill||Te&&Q.mode==="production"&&!is,ht=Q.mode!=="none",Qr=Q.mode==="production"&&Q.iframeBase?jt(Q.iframeBase):null,et=Q.mode==="production"?Qr:jt(Ie),Xr=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,gt=ie?ke?Q.mode==="sandbox"&&p&&g==="blocks":Q.mode==="production"&&pt&&Xr&&p&&g==="blocks":!1,ls=T.useRef(null),{pin:Zr,effective:ea}=gc(ls.current,{inPlaceRenderActive:gt,draftPreviewUrl:Ue,resolvedPath:Ee});ls.current=Zr;const cs=o.state.variantOverride??[],Bt=ie?cs:[],vt=ie?[]:cs,fn=at(he)&&Gi.some(u=>Ji(Se,u)==="available"),tt=fn?I:{},ds=Dr(tt),ta=fn&&le?Object.keys(Yi(le).experiments):[],$t=Te?lc({display:Q,path:Ee,pointer:is,device:y,forcedVariants:vt,previewOptions:tt}):null,nt=t?Cs(oe.slug,t):null,us=JSON.stringify([vt,tt]);T.useEffect(()=>{if(!Te||!nt)return;const[u,w]=JSON.parse(us);Bs(nt,{forcedVariants:u,previewOptions:w})},[Te,nt,us]),T.useEffect(()=>{if(!(!Te||!nt))return()=>Bs(nt,null)},[Te,nt]);const pn=Re&&He(he)?Ci(Re.endpoint,vt,ds):null,na=Re&&He(he)?pn?fo(pn,tt):_s:null,st=hc(Q.mode==="sandbox"?Wt($n(Os(se??Ln(Ee,Q.iframeBase)??Q.iframeBase,na),y),Bt):Q.mode==="production"&&$t?.frame?$t.frame:Q.mode==="production"?Wt($n(zs(Ls(Os(se??ea??Ln(Ee,Q.iframeBase)??Q.iframeBase,os?_s:null),vt),tt),y),Bt):null),fs=Ue??(Q.iframeBase?Ln(Ee,Q.iframeBase):null),ps=Q.mode==="production"&&$t?$t.newTab:Q.mode==="production"?fs?Wt(zs(Ls(fs,vt),tt),Bt):null:st??Q.iframeBase,sa=()=>{const u=ps;u&&window.open(u,"_blank","noopener")},xt=t&&r?pr(oe.slug,t,r):null,bt=u=>{xt&&qa(xt,u)},ye=o.state.target;T.useEffect(()=>{if(!(!ye||!mt||!Se))if(ye.kind==="page"){const u=ve[ye.key]??{};Le.current=Ve(ye.path,u),V(null),q(null),ee(null),de(ye.key),ae(ye.path),bt({path:ye.path,pageKey:ye.key,params:u})}else if(ye.kind==="loader")Le.current=null,V(null),q(ye.key),ee(null);else{const u=rn.find(w=>w.key===ye.key);if(u){Le.current=null;const w=As(Se);q(null),V(u),ee(Ds(mt,w,u.key))}}},[ye,mt,Se,ve]),T.useEffect(()=>{!re||_t===null||ye?.kind==="page"&&ye.key===re&&ye.path===_t||o.selectTarget({kind:"page",key:re,path:_t})},[re,_t,ye]);const[ms,ra]=T.useState(null);if(qe.kind==="iframe"&&ms!==qe.previewUrl){const u=ms!==null;ra(qe.previewUrl);const w=xt?fr(xt):null;if(w){if(Le.current=Ve(w.path,w.params),ae(w.path),de(w.pageKey),ee(null),V(null),q(null),w.pageKey&&Object.keys(w.params).length>0){const K=w.pageKey;ue(X=>({...X,[K]:w.params}))}}else u&&(Le.current=null,ae("/"),ee(null),de(null),V(null),q(null))}Dt.current=st;const aa=Q.mode==="production"&&!!Ue&&!ke,[hs,mn]=T.useState({src:st??void 0,loading:!1}),Mt=uc(hs,st??void 0,aa);Mt!==hs&&mn(Mt);const yt=Mt.src,gs=Mt.loading,vs=Jo({iframeRef:k,src:Q.mode==="sandbox"?st:null,active:Q.mode==="sandbox"}),xs=T.useRef(null);T.useEffect(()=>{const u=gs?setTimeout(()=>mn(er),dc):null,w=()=>{u&&clearTimeout(u)};if(!Ue||!yt||xs.current===Ue)return w;xs.current=Ue;const K=k.current;return K&&K.getAttribute("src")!==yt&&(je(),K.src=yt),w},[Ue,yt,gs]);const bs=()=>{const u=k.current?.contentWindow,w=et;if(!u||!w||!le||!re)return;const K=le[re];if(!K||typeof K!="object")return;const X=Zi({previewBaseUrl:w,pageBlock:K,decofile:le,path:Ee,pathTemplate:Z});if(!X)return;const be=Wt(X.src,Ti(Bt,re));u.postMessage({type:"cms-editor::render",src:be,body:X.body},w)},hn=T.useRef(null);T.useEffect(()=>{if(!gt||M||Y||!re||!le){hn.current=null;return}const u={nav:JSON.stringify({page:re,path:Ee,pathTemplate:Z}),content:JSON.stringify(le)},w=vc(hn.current,u);hn.current=u,w&&bs()},[le,gt,M,Y,re,Ee,Z]);const gn=T.useRef(null);T.useEffect(()=>{if(!gt||M||Y||!re||!le){gn.current=null;return}const u=JSON.stringify(o.state.variantOverride??null),w=gn.current;gn.current={page:re,sig:u},!(!w||w.page!==re||w.sig===u)&&bs()},[o.state.variantOverride,gt,M,Y,re]);const ia=!!t&&!!r&&!Ne.notFound&&!Gr&&!Wr&&(un?.kind==="ready"||Be!=="idle"),we=oc({editingMode:g,sandboxDisplay:Q.mode==="sandbox",blocksEditingEnabled:p});T.useEffect(()=>{const u=et;if(!u)return;const w=K=>{if(K.origin===u)if(K.data?.type==="visual-editor::element-clicked"){const X=Zo.safeParse(K.data.payload);X.success&&v(X.data)}else if(K.data?.type==="cms-editor::section-clicked"){const X=nl.safeParse(K.data.payload);X.success&&j({index:X.data.sectionIndex,seq:X.data.clickSeq})}else K.data?.type==="cms-editor::render-start"?je():K.data?.type==="cms-editor::render-end"?(fe(),k.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:ln,kinds:cn,keys:dn},u)):K.data?.type==="cms-editor::render-error"&&fe()};return window.addEventListener("message",w),()=>window.removeEventListener("message",w)},[et,ln,cn,dn]);const ys=()=>{const u=k.current?.contentWindow,w=jt(Ie);!u||!w||u.postMessage({type:"visual-editor::activate",script:el},w)},oa=()=>{const u=k.current?.contentWindow,w=jt(Ie);!u||!w||u.postMessage({type:"visual-editor::deactivate"},w)},vn=()=>{const u=k.current?.contentWindow,w=et;!u||!w||(u.postMessage(Q.mode==="production"||ke?{type:"editor::inject",args:{script:Ws}}:{type:"visual-editor::activate",script:Ws},w),u.postMessage({type:"cms-editor::set-labels",labels:ln,kinds:cn,keys:dn},w))},la=()=>{const u=k.current?.contentWindow,w=et;!u||!w||u.postMessage({type:"cms-editor::deactivate"},w)},ca=()=>{const u=k.current?.contentWindow,w=et;!u||!w||(u.postMessage({type:"cms-editor::clear-hover"},w),u.postMessage({type:"visual-editor::clear-hover"},w))},Ft=u=>{if(u==="blocks"&&!p)return;const w=g;!n&&u!==w&&(u==="blocks"?P.current?.resize("30%"):P.current?.collapse()),E(u),v(null),j(null),u!=="blocks"&&q(null),w==="visual"&&oa(),u==="visual"&&ys(),w==="blocks"&&u!=="blocks"&&la(),u==="blocks"&&vn()},da=()=>{Ft(rc(g,p))},ua=()=>{Ft(ac(g,p))},xn=()=>{const u=k.current;if(!u)return;je();const w=document.activeElement,K=u.tabIndex;u.tabIndex=-1,u.style.pointerEvents="none",u.blur(),bc(u,Dt.current);let X;const be=()=>{clearTimeout(X),u.tabIndex=K,u.style.pointerEvents="";const $e=document.activeElement;(!$e||$e===document.body||$e===u)&&w?.focus(),u.removeEventListener("load",be)};u.addEventListener("load",be),X=setTimeout(be,3e3)};ro(xn);const zt=Cs(oe.slug,t??""),Kt=Te&&ht&&!!t,ws=T.useRef(null);T.useEffect(()=>{if(Kt)return Si(zt)},[Kt,zt]);const{reload:wt}=Pi(oe.slug,t??""),ks=T.useRef(wt.seq);T.useEffect(()=>{if(ks.current!==wt.seq&&(ks.current=wt.seq,!!Kt&&ws.current===Dt.current)){if(wt.navigates){Rs(zt);return}xn()}},[wt.seq]);const fa=ji(Gn),kt=Ei(He(he)?fa:""),Ss=T.useRef(kt);T.useEffect(()=>{const u=Ss.current;if(Ss.current=kt,!u||!kt||u===kt)return;const w=k.current;if(w)return Xo({iframe:w,reload:xn})},[kt]);const pa=()=>{const u=Qt.indexOf(y);N(Qt[(u+1)%Qt.length])},bn=(u,w)=>{if(!re)return;const K=re,X={...Ze,[u]:w};Le.current=Ve(Z,X),ue(be=>({...be,[K]:X})),bt({path:Z,pageKey:K,params:X})},ma=Hl({iframeBase:Q.iframeBase,resolvedPath:Ee,activeGlobalSectionName:M?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),yn=u=>{const w=ve[u.key]??{},K=Ve(u.path,w);(M||Oe(K)!==Oe(Ee))&&je(),Le.current=K,V(null),q(null),ee(null),j(null),de(u.key),ae(u.path),bt({path:u.path,pageKey:u.key,params:w}),o.selectTarget({kind:"page",key:u.key,path:u.path})};Va(xt,u=>{(M||Oe(u)!==Oe(Ee))&&je(),Le.current=u,V(null),q(null),ee(null),j(null),de(null),ae(u),bt({path:u,pageKey:null,params:{}})});const ha=u=>{if(at(he)){const X=le?Qi(le,u.key,Se):null;X?yn(X):Zt.info(e("sandbox.preview.blockOnNoPage"));return}if(!mt||!Se){Zt.error(e("sandbox.preview.previewMetadataNotReady"));return}je(),Le.current=null;const w=As(Se),K=Ds(mt,w,u.key);V(u),q(null),ee(K),j(null),o.selectTarget({kind:"section",key:u.key})},ga=u=>{p&&(V(null),q(u.key),ee(null),Ft("blocks"),o.selectTarget({kind:"loader",key:u.key}))},va=async({name:u,path:w,templateKey:K})=>{if(!t||!r)return;const X=Ar(w);if(X){J(X);return}const be=w.trim().startsWith("/")?w.trim():`/${w.trim()}`;if(Qe.some(Ce=>Oe(Ce.path)===Oe(be))){J(e("sandbox.preview.pageAlreadyExists",{path:be}));return}let $e;if(K&&($e=le?.[K],!$e)){J(e("sandbox.preview.templateNoLongerExists"));return}J(void 0);try{const Ce=await Jn.mutateAsync({name:u,path:be,template:$e,schema:at(he)?{meta:Se,loadMeta:async()=>(await sn.refetch()).data}:void 0});$(!1),Zt.success(e("sandbox.preview.pageCreated",{name:u})),await ho(fc),yn({key:Ce.key,name:Ce.name,path:Ce.path}),Ft("blocks")}catch(Ce){J(Ce instanceof Hr?e("sandbox.preview.pageSchemaNotReady"):Ce instanceof Error?Ce.message:e("sandbox.preview.failedToCreatePage"))}},It=Vl({previewSurfaceActive:ht,daemonReady:ia,production:Q.mode==="production",servePreviewUrl:He(he)}),xa=ql({showPreviewToolbar:It,contentEditingEnabled:f}),Ut=()=>{H(!1),G("")},wn=M?.name??At?.title??an?.name,kn=Wn.isPending||sn.isPending,Sn=kn?jt(Q.iframeBase):wn,Ht=M?`section:${M.key}`:Y?`loader:${Y}`:re?`page:${re}`:void 0,ba=It?xa?s.jsxs(yr,{open:z,onOpenChange:u=>{H(u),u||G("")},children:[s.jsx(xr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:kn?Sn??void 0:M||At?wn:[wn,Z].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[M&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-2xs font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(Xa,{size:11}),e("sandbox.preview.globalBadge")]}),At&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:[s.jsx(Za,{size:11}),e("sandbox.preview.loaderBadge")]}),Sn&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Sn}),!kn&&!M&&!At&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:Z}),s.jsx(Wa,{size:12,className:De("shrink-0 transition-transform",z&&"rotate-180")})]})})}),s.jsxs(br,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(kr,{shouldFilter:!1,defaultValue:Ht,children:[s.jsx(Sr,{value:U,onValueChange:u=>{G(u),te.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(wr,{ref:te,className:"max-h-80",children:[s.jsx(Pr,{children:Qe.length===0&&rn.length===0&&Zn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),Qn.length>0&&s.jsx(Et,{children:Qn.map(u=>s.jsxs(Nt,{value:`page:${u.key}`,"aria-current":Ht===`page:${u.key}`||void 0,title:`${u.name} · ${u.path}`,onSelect:()=>{Ut(),yn(u)},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:u.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:u.path})]},u.key))}),Xn.length>0&&s.jsx(Et,{heading:e("sandbox.preview.globalComponents"),children:Xn.map(u=>s.jsx(Nt,{value:`section:${u.key}`,"aria-current":Ht===`section:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Ut(),ha(u)},children:s.jsx("span",{className:"truncate",children:u.name})},u.key))}),es.length>0&&s.jsx(Et,{heading:e("sandbox.preview.globalLoaders"),children:es.map(u=>s.jsx(Nt,{value:`loader:${u.key}`,"aria-current":Ht===`loader:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Ut(),ga(u)},children:s.jsx("span",{className:"truncate",children:u.title})},u.key))})]})]}),!M&&!Y&&Tt(Z).some(u=>u.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:Tt(Z).map((u,w)=>{if(u.type==="text")return s.jsx("span",{children:u.text},`text-${w}`);const K=on[u.name];return K&&Ot?s.jsx(Ll,{sources:K,template:Z,paramName:u.name,value:Ze[u.name]??"",sandboxRef:Ot,onCommit:X=>bn(u.name,X)},`${re}:${u.name}`):s.jsx(Il,{name:u.name,value:Ze[u.name]??"",onCommit:X=>bn(u.name,X)},`${re}:${u.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Me,{variant:"ghost",className:"w-full justify-start",onClick:()=>{Ut(),J(void 0),$(!0)},children:[s.jsx(vr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:ma}):null,Ps=It||f?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(dt,{children:[s.jsx(lt,{asChild:!0,children:s.jsx(We,{onClick:pa,"aria-label":e(nr[y]),children:y==="mobile"?s.jsx(hr,{size:16}):y==="tablet"?s.jsx(ei,{size:16}):s.jsx(gr,{size:16})})}),s.jsx(ct,{children:e(nr[y])})]}),ba,s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[fn&&s.jsx(cc,{tests:ta,options:I,onChange:W,available:!!pn||!os||!ds}),s.jsx(We,{onClick:sa,disabled:Te&&!ps,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(cr,{size:16})})]})]}):null,ya=(ie||a)&&Q.mode==="sandbox",Vt=pc[y],qt=y==="desktop"&&(_.width===0||_.width>=Vt.width+2*tr),js=qt?1:Math.min(_.width>0?_.width/(Vt.width+2*tr):1,1),wa=qt?{width:"100%",height:"100%"}:{width:`${Vt.width}px`,height:_.height>0?`${_.height/js}px`:`${Vt.height}px`,transform:`scale(${js})`,transformOrigin:"top center"},Es=s.jsxs(s.Fragment,{children:[ya&&(It||f)&&s.jsx(We,{onClick:da,"aria-pressed":we==="visual","aria-label":e("sandbox.preview.visualEditor"),active:we==="visual",children:s.jsx(Ts,{size:16})}),p&&s.jsxs(dt,{children:[s.jsx(lt,{asChild:!0,children:s.jsx(We,{onClick:ua,"aria-pressed":we==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:we==="blocks",children:s.jsx(ni,{size:16})})}),s.jsx(ct,{children:e("sandbox.preview.blocksEditor")})]}),Xe&&s.jsxs(dt,{children:[s.jsx(lt,{asChild:!0,children:s.jsx(We,{onClick:O,"aria-pressed":C,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:C,children:s.jsx(ti,{size:16})})}),s.jsx(ct,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),ka=!!Y&&we==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[Ot&&Object.entries(on).map(([u,w])=>(Ze[u]??"")===""?s.jsx(zl,{sources:w,template:Z,paramName:u,sandboxRef:Ot,onFill:K=>bn(u,K)},`${re}:${u}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Dn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Ps}),children:Ps}),s.jsx(Dn.Toolbar.Right.Portal,{fallback:Es,children:Es})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:ka?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Xs,{virtualMcpId:t,externalSelection:S,onViewJsonFile:O}),C&&Xe&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Zs,{ref:R,virtualMcpId:t,pageKey:Xe,onClose:L})})]}):s.jsxs($s,{orientation:"horizontal",disabled:we!=="blocks",className:"relative isolate",children:[s.jsx(Gt,{ref:P,id:"preview-blocks-editor",defaultSize:we==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:we==="blocks"&&s.jsx(Xs,{virtualMcpId:t,externalSelection:S,onViewJsonFile:O})}),we==="blocks"&&s.jsx(Ms,{withHandle:!0}),s.jsx(Gt,{id:"preview-canvas",defaultSize:we==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs($s,{orientation:"horizontal",disabled:!(C&&Xe),children:[s.jsx(Gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:u=>{if(!u)return;const w=()=>B(X=>X.width===u.clientWidth&&X.height===u.clientHeight?X:{width:u.clientWidth,height:u.clientHeight});w();const K=new ResizeObserver(w);return K.observe(u),()=>K.disconnect()},className:De("h-full relative overflow-clip flex justify-center",ht&&!qt&&"bg-muted/30"),children:[(xe||Jr)&&ht&&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"})}),Q.showDecidingLoader&&s.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:s.jsx(Ct,{className:"size-5 text-muted-foreground"})}),Q.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(jn,{kind:"starting",progress:rs,claimPhase:un})}),!ke&&!ne&&qe.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(jn,{kind:"suspended",onResume:Fe.resume})}),!ke&&!ne&&qe.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(jn,{kind:"errored",error:qe.error,onRetry:Fe.retry,connectionsHref:`/${oe.slug}/settings/connections`})}),Q.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl bg-muted px-4 py-3 shadow-soft pointer-events-none select-none",children:[s.jsx(Ct,{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")})]})]}),we==="visual"&&!b&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-special/40 bg-special/90 px-3 py-1 text-xs font-medium text-special-foreground shadow-soft backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Ts,{size:12}),e("sandbox.preview.clickElementToAsk")]}),we==="visual"&&b&&s.jsx(al,{element:b,onDismiss:()=>v(null)}),ht&&st&&s.jsx("div",{className:De("shrink-0",!qt&&"bg-background shadow-edge"),style:wa,onMouseLeave:ca,children:s.jsx("iframe",{ref:k,src:yt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:vs.handleError,onLoad:()=>{if(mn(er),vs.handleLoad(),fe(),ws.current=Dt.current,Kt&&Rs(zt),Q.mode!=="sandbox"||ke){(Q.mode==="production"&&!Q.showWakingPill||ke)&&we==="blocks"&&vn();return}if(Ta("vm_preview_loaded",{view_mode:we,vm_id:ze?.sandboxHandle??null}),!M)try{const u=k.current?.contentWindow?.location?.pathname;if(!u)return;const w=Le.current;if(w!==null&&(Le.current=null,Oe(u)!==Oe(w))||Oe(u)===Oe(Ee))return;ae(u),bt({path:u,pageKey:pe,params:Ze})}catch{}we==="visual"&&ys(),we==="blocks"&&vn()}},Q.iframeBase)})]})}),C&&Xe&&s.jsxs(s.Fragment,{children:[s.jsx(Ms,{withHandle:!0}),s.jsx(Gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Zs,{ref:R,virtualMcpId:t,pageKey:Xe,onClose:L})})]})]})})]})}),s.jsx(Yl,{open:D,onOpenChange:$,isPending:Jn.isPending,error:F,templates:Qe,onSubmit:va})]})}const zn={app:null,split:!1};function wc(t){const e=ce.c(24),{project:n,maxApps:r,children:i}=t,d=Pe();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={silent:!0},e[0]=a):a=e[0];const o=ai(a),c=Lt();let l;e[1]!==n.metadata.runtime?(l=n.metadata.runtime??{},e[1]=n.metadata.runtime,e[2]=l):l=e[2];const m=l;let f;e[3]!==m.apps?(f=m.apps??[],e[3]=m.apps,e[4]=f):f=e[4];const p=f;let x;e[5]!==o.update||e[6]!==c||e[7]!==n.id||e[8]!==n.metadata||e[9]!==m||e[10]!==d?(x=b=>o.update.mutate({id:n.id,data:{metadata:{...go(n.metadata),runtime:{...m,apps:b.length?b:null}}}},{onSuccess:()=>c.start(),onError:()=>Zt.error(d("sandbox.appTabs.saveError"))}),e[5]=o.update,e[6]=c,e[7]=n.id,e[8]=n.metadata,e[9]=m,e[10]=d,e[11]=x):x=e[11];const h=x,E=m.path??null;let g,y;e[12]!==p||e[13]!==h?(g=b=>h([...p,{path:b}]),y=b=>h(p.filter(v=>v.path!==b)),e[12]=p,e[13]=h,e[14]=g,e[15]=y):(g=e[14],y=e[15]);let N;return e[16]!==p||e[17]!==i||e[18]!==r||e[19]!==n.id||e[20]!==E||e[21]!==g||e[22]!==y?(N=s.jsx(kc,{virtualMcpId:n.id,mainPath:E,apps:p,maxApps:r,onAddApp:g,onRemoveApp:y,children:i}),e[16]=p,e[17]=i,e[18]=r,e[19]=n.id,e[20]=E,e[21]=g,e[22]=y,e[23]=N):N=e[23],N}function kc(t){const e=ce.c(102),{virtualMcpId:n,mainPath:r,apps:i,maxApps:d,onAddApp:a,onRemoveApp:o,children:c}=t,l=Pe(),m=Cr(),{currentBranch:f}=Rt(),p=Lt(),x=Hn().lifecycle.phase,h=nn(n,f),{url:E}=Nr(n);let g;e[0]!==h||e[1]!==E?(g=He(h)??E,e[0]=h,e[1]=E,e[2]=g):g=e[2];const y=g,N=y??p.previewUrl,b=!!y||x==="running",v=!b&&p.status==="errored";let S;e[3]!==p.vmEntry?.startedWith?.apps?(S=p.vmEntry?.startedWith?.apps??[],e[3]=p.vmEntry?.startedWith?.apps,e[4]=S):S=e[4];const j=S;let k;e[5]!==n?(k=On.previewAppLayout(n),e[5]=n,e[6]=k):k=e[6];const[P,C]=_n(k,Sc);let A;e[7]!==i||e[8]!==P?(A=i.some(fe=>fe.path===P.app)?P.app:null,e[7]=i,e[8]=P,e[9]=A):A=e[9];const R=A,L=R!==null&&P.split&&!m,O=R===null||L,_=R??i[0]?.path??null,[B,z]=T.useState(null),[H,I]=T.useState(!1);let W;e[10]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{z(null),I(!1)},e[10]=W):W=e[10];const U=W;let G;e[11]!==i||e[12]!==B||e[13]!==m||e[14]!==r||e[15]!==a||e[16]!==C?(G=()=>{if(B===null)return;const fe=Ks(B);if(!fe){U();return}if(fe===Ks(r??"")||i.some(oe=>oe.path===fe)){I(!0);return}a(fe),C({app:fe,split:!m}),U()},e[11]=i,e[12]=B,e[13]=m,e[14]=r,e[15]=a,e[16]=C,e[17]=G):G=e[17];const te=G;let D;e[18]!==r||e[19]!==l?(D=r?Nn(r):l("sandbox.appTabs.root"),e[18]=r,e[19]=l,e[20]=D):D=e[20];const $=D;let F;e[21]!==L||e[22]!==l?(F=l(L?"sandbox.appTabs.single":"sandbox.appTabs.split"),e[21]=L,e[22]=l,e[23]=F):F=e[23];const J=F;let M;e[24]!==l?(M=l("sandbox.appTabs.label"),e[24]=l,e[25]=M):M=e[25];let V;e[26]!==l?(V=l("sandbox.appTabs.main"),e[26]=l,e[27]=V):V=e[27];let Y;e[28]!==l?(Y=l("sandbox.appTabs.mainHint"),e[28]=l,e[29]=Y):Y=e[29];let q;e[30]!==C?(q=()=>C(zn),e[30]=C,e[31]=q):q=e[31];let se;e[32]!==v||e[33]!==$||e[34]!==b||e[35]!==O||e[36]!==V||e[37]!==Y||e[38]!==q?(se=s.jsx(sr,{label:$,badge:V,hint:Y,ready:b,failed:v,onScreen:O,onSelect:q}),e[32]=v,e[33]=$,e[34]=b,e[35]=O,e[36]=V,e[37]=Y,e[38]=q,e[39]=se):se=e[39];let ee;if(e[40]!==i||e[41]!==R||e[42]!==v||e[43]!==$||e[44]!==o||e[45]!==b||e[46]!==C||e[47]!==L||e[48]!==l){let fe;e[50]!==R||e[51]!==v||e[52]!==$||e[53]!==o||e[54]!==b||e[55]!==C||e[56]!==L||e[57]!==l?(fe=oe=>{const Ne=Nn(oe.path);return s.jsx(sr,{label:Ne,hint:l("sandbox.appTabs.extraHint",{app:$}),ready:b,failed:v,onScreen:oe.path===R,onSelect:()=>C({app:oe.path,split:L}),onRemove:()=>o(oe.path),removeLabel:l("sandbox.appTabs.remove",{app:Ne})},oe.path)},e[50]=R,e[51]=v,e[52]=$,e[53]=o,e[54]=b,e[55]=C,e[56]=L,e[57]=l,e[58]=fe):fe=e[58],ee=i.map(fe),e[40]=i,e[41]=R,e[42]=v,e[43]=$,e[44]=o,e[45]=b,e[46]=C,e[47]=L,e[48]=l,e[49]=ee}else ee=e[49];let Z;e[59]!==se||e[60]!==ee||e[61]!==M?(Z=s.jsxs("div",{role:"tablist","aria-label":M,className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:[se,ee]}),e[59]=se,e[60]=ee,e[61]=M,e[62]=Z):Z=e[62];let ae;e[63]!==i.length||e[64]!==te||e[65]!==B||e[66]!==H||e[67]!==d||e[68]!==l?(ae=B!==null?s.jsx("form",{className:"w-40 shrink-0",onSubmit:fe=>{fe.preventDefault(),te()},children:s.jsx("input",{autoFocus:!0,value:B,placeholder:"apps/checkout","aria-label":l("sandbox.appTabs.pathLabel"),"aria-invalid":H,onChange:fe=>{z(fe.target.value),I(!1)},onBlur:U,onKeyDown:fe=>{fe.key==="Escape"&&U()},className:De("h-7 w-full rounded-md border bg-background px-2 font-mono text-xs outline-none",H?"border-destructive":"border-border")})}):i.length<d&&s.jsx(ot,{label:l("sandbox.appTabs.add"),onClick:()=>z(""),children:s.jsx(vr,{})}),e[63]=i.length,e[64]=te,e[65]=B,e[66]=H,e[67]=d,e[68]=l,e[69]=ae):ae=e[69];let pe;e[70]!==m||e[71]!==C||e[72]!==L||e[73]!==J||e[74]!==_?(pe=!m&&_&&s.jsx(ot,{label:J,active:L,onClick:()=>C(L?zn:{app:_,split:!0}),children:s.jsx(si,{})}),e[70]=m,e[71]=C,e[72]=L,e[73]=J,e[74]=_,e[75]=pe):pe=e[75];let de;e[76]!==Z||e[77]!==ae||e[78]!==pe?(de=s.jsxs(s.Fragment,{children:[Z,ae,pe]}),e[76]=Z,e[77]=ae,e[78]=pe,e[79]=de):de=e[79];const ve=de;let ue;e[80]!==ve?(ue=s.jsx(Dn.Topbar.Left.Portal,{fallback:s.jsx("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:ve}),children:s.jsx("div",{className:"ml-1 flex min-w-0 items-center gap-1 border-l border-border/60 pl-2",children:ve})}),e[80]=ve,e[81]=ue):ue=e[81];let xe;e[82]!==c||e[83]!==O?(xe=O&&s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:c}),e[82]=c,e[83]=O,e[84]=xe):xe=e[84];let me;e[85]!==R||e[86]!==v||e[87]!==p.start||e[88]!==y||e[89]!==$||e[90]!==N||e[91]!==b||e[92]!==C||e[93]!==L||e[94]!==j?(me=R!==null&&s.jsx(Pc,{name:Nn(R),mainName:$,appUrl:N?vo(N,R):null,ready:b,failed:v,notStarted:!y&&!j.includes(R),onStart:p.start,className:De(L&&"border-l border-border"),onClose:L?()=>C({app:R,split:!1}):void 0},R),e[85]=R,e[86]=v,e[87]=p.start,e[88]=y,e[89]=$,e[90]=N,e[91]=b,e[92]=C,e[93]=L,e[94]=j,e[95]=me):me=e[95];let ge;e[96]!==xe||e[97]!==me?(ge=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[xe,me]}),e[96]=xe,e[97]=me,e[98]=ge):ge=e[98];let je;return e[99]!==ue||e[100]!==ge?(je=s.jsxs("div",{className:"flex h-full w-full min-h-0 flex-col",children:[ue,ge]}),e[99]=ue,e[100]=ge,e[101]=je):je=e[101],je}function Sc(t){return t??zn}function sr(t){const e=ce.c(28),{label:n,badge:r,hint:i,ready:d,failed:a,onScreen:o,onSelect:c,onRemove:l,removeLabel:m}=t,f=o?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground";let p;e[0]!==f?(p=De("group/app-tab flex h-7 shrink-0 items-center rounded-md text-xs transition-colors",f),e[0]=f,e[1]=p):p=e[1];const x=d?"bg-success":a?"bg-destructive":"animate-pulse bg-warning";let h;e[2]!==x?(h=De("size-1.5 rounded-full",x),e[2]=x,e[3]=h):h=e[3];let E;e[4]!==h?(E=s.jsx("span",{"aria-hidden":!0,className:h}),e[4]=h,e[5]=E):E=e[5];let g;e[6]!==n?(g=s.jsx("span",{className:"max-w-40 truncate",children:n}),e[6]=n,e[7]=g):g=e[7];let y;e[8]!==r?(y=r&&s.jsx("span",{className:"text-[10px] text-muted-foreground",children:r}),e[8]=r,e[9]=y):y=e[9];let N;e[10]!==o||e[11]!==c||e[12]!==E||e[13]!==g||e[14]!==y?(N=s.jsx(lt,{asChild:!0,children:s.jsxs("button",{type:"button",role:"tab","aria-selected":o,onClick:c,className:"flex h-full items-center gap-1.5 rounded-md px-2.5 focus-ring",children:[E,g,y]})}),e[10]=o,e[11]=c,e[12]=E,e[13]=g,e[14]=y,e[15]=N):N=e[15];let b;e[16]!==i?(b=s.jsx(ct,{className:"max-w-64",children:i}),e[16]=i,e[17]=b):b=e[17];let v;e[18]!==N||e[19]!==b?(v=s.jsxs(dt,{children:[N,b]}),e[18]=N,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==l||e[22]!==m?(S=l&&s.jsx("button",{type:"button","aria-label":m,onClick:l,className:"-ml-1 mr-1 flex size-5 items-center justify-center rounded opacity-0 hover:bg-sidebar-accent focus-ring focus-visible:opacity-100 group-hover/app-tab:opacity-100",children:s.jsx(Br,{className:"size-3"})}),e[21]=l,e[22]=m,e[23]=S):S=e[23];let j;return e[24]!==v||e[25]!==S||e[26]!==p?(j=s.jsxs("div",{className:p,children:[v,S]}),e[24]=v,e[25]=S,e[26]=p,e[27]=j):j=e[27],j}function Pc(t){const e=ce.c(71),{name:n,mainName:r,appUrl:i,ready:d,failed:a,notStarted:o,onStart:c,className:l,onClose:m}=t,f=Pe(),[p,x]=T.useState("/"),[h,E]=T.useState("desktop"),[g,y]=T.useState(0),N=T.useRef(null);let b;e[0]!==i||e[1]!==p?(b=i?xo(i,p):null,e[0]=i,e[1]=p,e[2]=b):b=e[2];const v=b;let S;e[3]!==l?(S=De("flex min-h-0 min-w-0 flex-1 flex-col",l),e[3]=l,e[4]=S):S=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=Y=>{Y.preventDefault(),x(N.current?.value||"/")},e[5]=j):j=e[5];let k;e[6]!==n||e[7]!==f?(k=f("sandbox.appPane.path",{app:n}),e[6]=n,e[7]=f,e[8]=k):k=e[8];let P;e[9]!==p||e[10]!==k?(P=s.jsx("form",{className:"min-w-0 flex-1",onSubmit:j,children:s.jsx("input",{ref:N,defaultValue:p,"aria-label":k,className:"h-7 w-full rounded-md border border-border/60 bg-background px-2 font-mono text-xs text-muted-foreground outline-none hover:border-border focus:border-border focus:text-foreground"})}),e[9]=p,e[10]=k,e[11]=P):P=e[11];let C;e[12]!==h||e[13]!==f?(C=f(h==="desktop"?"sandbox.preview.deviceMobile":"sandbox.preview.deviceDesktop"),e[12]=h,e[13]=f,e[14]=C):C=e[14];let A;e[15]===Symbol.for("react.memo_cache_sentinel")?(A=()=>E(Ec),e[15]=A):A=e[15];let R;e[16]!==h?(R=h==="desktop"?s.jsx(gr,{}):s.jsx(hr,{}),e[16]=h,e[17]=R):R=e[17];let L;e[18]!==C||e[19]!==R?(L=s.jsx(ot,{label:C,onClick:A,children:R}),e[18]=C,e[19]=R,e[20]=L):L=e[20];let O;e[21]!==n||e[22]!==f?(O=f("sandbox.appPane.reload",{app:n}),e[21]=n,e[22]=f,e[23]=O):O=e[23];const _=!v||!d;let B,z;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=()=>y(jc),z=s.jsx(Ca,{}),e[24]=B,e[25]=z):(B=e[24],z=e[25]);let H;e[26]!==O||e[27]!==_?(H=s.jsx(ot,{label:O,disabled:_,onClick:B,children:z}),e[26]=O,e[27]=_,e[28]=H):H=e[28];let I;e[29]!==n||e[30]!==f?(I=f("sandbox.appPane.openInNewTab",{app:n}),e[29]=n,e[30]=f,e[31]=I):I=e[31];const W=!v||!d;let U;e[32]!==v?(U=()=>v&&window.open(v,"_blank","noopener"),e[32]=v,e[33]=U):U=e[33];let G;e[34]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(cr,{}),e[34]=G):G=e[34];let te;e[35]!==I||e[36]!==W||e[37]!==U?(te=s.jsx(ot,{label:I,disabled:W,onClick:U,children:G}),e[35]=I,e[36]=W,e[37]=U,e[38]=te):te=e[38];let D;e[39]!==n||e[40]!==m||e[41]!==f?(D=m&&s.jsx(ot,{label:f("sandbox.appPane.close",{app:n}),onClick:m,children:s.jsx(Br,{})}),e[39]=n,e[40]=m,e[41]=f,e[42]=D):D=e[42];let $;e[43]!==H||e[44]!==te||e[45]!==D||e[46]!==P||e[47]!==L?($=s.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:[P,L,H,te,D]}),e[43]=H,e[44]=te,e[45]=D,e[46]=P,e[47]=L,e[48]=$):$=e[48];let F;e[49]!==r||e[50]!==f?(F=f("sandbox.appPane.previewOnly",{app:r}),e[49]=r,e[50]=f,e[51]=F):F=e[51];let J;e[52]!==F?(J=s.jsx("p",{className:"shrink-0 truncate border-b border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground",children:F}),e[52]=F,e[53]=J):J=e[53];let M;e[54]!==h||e[55]!==a||e[56]!==r||e[57]!==n||e[58]!==o||e[59]!==c||e[60]!==d||e[61]!==g||e[62]!==v||e[63]!==f?(M=s.jsx("div",{className:"flex min-h-0 flex-1 justify-center overflow-auto bg-muted/40",children:d&&o?s.jsxs("div",{className:"flex flex-col items-center gap-3 self-center px-6 text-center",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:f("sandbox.appPane.notStarted",{app:n})}),s.jsx(Me,{size:"sm",variant:"outline",onClick:c,children:f("sandbox.appPane.start",{app:n})})]}):!d||!v?s.jsx("p",{className:"self-center px-6 text-center text-sm text-muted-foreground",children:d?f("sandbox.appPane.noUrl"):a?f("sandbox.appPane.failed",{app:r}):f("sandbox.appPane.waiting")}):s.jsx("iframe",{src:v,title:n,className:De("h-full bg-background",h==="mobile"?"w-[412px] max-w-full border-x border-border":"w-full")},`${v}#${g}`)}),e[54]=h,e[55]=a,e[56]=r,e[57]=n,e[58]=o,e[59]=c,e[60]=d,e[61]=g,e[62]=v,e[63]=f,e[64]=M):M=e[64];let V;return e[65]!==n||e[66]!==S||e[67]!==$||e[68]!==J||e[69]!==M?(V=s.jsxs("section",{"aria-label":n,className:S,children:[$,J,M]}),e[65]=n,e[66]=S,e[67]=$,e[68]=J,e[69]=M,e[70]=V):V=e[70],V}function jc(t){return t+1}function Ec(t){return t==="desktop"?"mobile":"desktop"}function ot(t){const e=ce.c(11),{label:n,children:r,active:i,disabled:d,onClick:a}=t;let o;e[0]!==i||e[1]!==r||e[2]!==d||e[3]!==n||e[4]!==a?(o=s.jsx(lt,{asChild:!0,children:s.jsx(We,{"aria-label":n,"aria-pressed":i,active:i,disabled:d,onClick:a,children:r})}),e[0]=i,e[1]=r,e[2]=d,e[3]=n,e[4]=a,e[5]=o):o=e[5];let c;e[6]!==n?(c=s.jsx(ct,{children:n}),e[6]=n,e[7]=c):c=e[7];let l;return e[8]!==o||e[9]!==c?(l=s.jsxs(dt,{children:[o,c]}),e[8]=o,e[9]=c,e[10]=l):l=e[10],l}const Nc=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},Tc=1e4,Cc=1e4,Rc=5e3,Lc=2;function Ac(t,e){return t&&e===0?Cc:Math.min(1e3*2**Math.max(0,e-1),Rc)}function _c(t,e,n){return e?!0:t===!0&&n<Lc}function Oc(t,e){const n=ce.c(11),r=Nc,i=Ra();let d;n[0]!==t?(d=ir.localAppReachable(t??""),n[0]=t,n[1]=d):d=n[1];const a=d;let o;n[2]!==r||n[3]!==i||n[4]!==a||n[5]!==t?(o=async f=>{const{signal:p}=f,x=new AbortController,h=()=>x.abort();p.addEventListener("abort",h);const E=setTimeout(h,Tc),g=await r(t,x.signal).catch(Bc);clearTimeout(E),p.removeEventListener("abort",h);const y=i.getQueryData(a),N=g?0:(y?.failures??0)+1;return{up:_c(y?.up??null,g,N),failures:N}},n[2]=r,n[3]=i,n[4]=a,n[5]=t,n[6]=o):o=n[6];const c=!!t;let l;n[7]!==a||n[8]!==o||n[9]!==c?(l={queryKey:a,queryFn:o,enabled:c,retry:!1,staleTime:0,gcTime:0,refetchInterval:Dc},n[7]=a,n[8]=o,n[9]=c,n[10]=l):l=n[10];const{data:m}=La(l);return t?m?.up??null:null}function Dc(t){return t.state.data?Ac(t.state.data.up,t.state.data.failures):!1}function Bc(){return!1}function $c(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 Md(t){const e=ce.c(53),{virtualMcpId:n}=t,r=Pe(),i=ii(n),{connection:d}=Tr(n),{activeTask:a,taskId:o,currentBranch:c}=Rt(),l=Co(o),[m,f]=T.useState(!1),p=nn(n,c);let x;e[0]!==p||e[1]!==d?(x=d?He(p):null,e[0]=p,e[1]=d,e[2]=x):x=e[2];const h=x,E=Oc(h),g=Mr(),y=bo("multi_app_preview");if(ko({threadId:o,sandboxBranch:a?.branch??c,agentHasRepo:En(i?.metadata),threadHasRepo:En(l)||En(a?.metadata)})==="none"&&!d){let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(Is,{className:"size-7 text-foreground"})}),e[3]=j):j=e[3];let k;e[4]!==r?(k=r("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=r,e[5]=k):k=e[5];let P;e[6]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=r,e[7]=P):P=e[7];let C,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=()=>f(!0),A=s.jsx(Is,{className:"size-4"}),e[8]=C,e[9]=A):(C=e[8],A=e[9]);let R;e[10]!==r?(R=r("mainPanelTabs.previewTab.connectGithub"),e[10]=r,e[11]=R):R=e[11];let L;e[12]!==R?(L=s.jsxs(Me,{onClick:C,children:[A,R]}),e[12]=R,e[13]=L):L=e[13];let O;e[14]!==k||e[15]!==P||e[16]!==L?(O=s.jsx(yo,{className:"h-full",image:j,title:k,description:P,actions:L}),e[14]=k,e[15]=P,e[16]=L,e[17]=O):O=e[17];let _;e[18]!==m?(_=s.jsx(wo,{open:m,onOpenChange:f,mode:"agent"}),e[18]=m,e[19]=_):_=e[19];let B;return e[20]!==_||e[21]!==O?(B=s.jsxs(s.Fragment,{children:[O,_]}),e[20]=_,e[21]=O,e[22]=B):B=e[22],B}if(d&&i&&!He(p)){let j;e[23]!==g||e[24]!==p?(j=$c({backend:p,access:g}),e[23]=g,e[24]=p,e[25]=j):j=e[25];let k;e[26]!==d.endpoint?(k=Ni(d.endpoint),e[26]=d.endpoint,e[27]=k):k=e[27];let P;return e[28]!==j||e[29]!==k?(P=s.jsx(Fc,{status:j,host:k}),e[28]=j,e[29]=k,e[30]=P):P=e[30],P}if(h&&E!==!0){let j;e[31]!==r?(j=r("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=r,e[32]=j):j=e[32];let k;e[33]!==h||e[34]!==r?(k=r("mainPanelTabs.previewTab.localAppWaiting.body",{host:Mc(h)}),e[33]=h,e[34]=r,e[35]=k):k=e[35];let P;e[36]!==k?(P=s.jsx(en,{text:k}),e[36]=k,e[37]=P):P=e[37];let C;e[38]!==r?(C=r("mainPanelTabs.previewTab.localAppWaiting.hint"),e[38]=r,e[39]=C):C=e[39];let A;e[40]!==C?(A=s.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:C}),e[40]=C,e[41]=A):A=e[41];let R;return e[42]!==j||e[43]!==P||e[44]!==A?(R=s.jsx(tn,{headingLevel:2,waiting:!0,title:j,lead:P,footer:A}),e[42]=j,e[43]=P,e[44]=A,e[45]=R):R=e[45],R}let b;e[46]!==n?(b=s.jsx(yc,{virtualMcpId:n}),e[46]=n,e[47]=b):b=e[47];const v=b;let S;return e[48]!==i||e[49]!==y||e[50]!==v||e[51]!==d?(S=s.jsx(Ia,{children:y&&i&&!d?s.jsx(wc,{project:i,maxApps:mo,children:v}):v}),e[48]=i,e[49]=y,e[50]=v,e[51]=d,e[52]=S):S=e[52],S}function Mc(t){try{return new URL(t).host}catch{return t}}function Fc(t){const e=ce.c(20),{status:n,host:r}=t,i=Pe();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 c;e[2]!==i?(c=i("mainPanelTabs.previewTab.localhostNoPreview.body"),e[2]=i,e[3]=c):c=e[3];let l;e[4]!==c?(l=s.jsx(en,{text:c}),e[4]=c,e[5]=l):l=e[5];let m;e[6]!==i?(m=i("mainPanelTabs.previewTab.localhostNoPreview.step.title"),e[6]=i,e[7]=m):m=e[7];let f;e[8]!==m?(f=[{title:m,command:`${Er} --preview localhost:3000`}],e[8]=m,e[9]=f):f=e[9];let p;return e[10]!==o||e[11]!==l||e[12]!==f?(p=s.jsx(tn,{headingLevel:2,waiting:!1,title:o,lead:l,steps:f}),e[10]=o,e[11]=l,e[12]=f,e[13]=p):p=e[13],p}let d;e[14]!==r||e[15]!==n?(d=Oo(n,r),e[14]=r,e[15]=n,e[16]=d):d=e[16];let a;return e[17]!==r||e[18]!==d?(a=s.jsx(_o,{wait:d,hosts:r}),e[17]=r,e[18]=d,e[19]=a):a=e[19],a}export{_o as L,Md as P,tn as S,$d as u};