decocms 4.500.1 → 4.500.3

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 (373) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-0lZFPRc5.js → ActiveShapeUtils-DpXLHK85.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-BxvPb2ao.js → AlertCircle-CWfOEKki.js} +1 -1
  3. package/dist/client/assets/{AreaChart-DKj07iCf.js → AreaChart-BsAvYqSE.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-Bf9KgkxW.js → ArrowLeft-B5i4q13h.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-gYvBgsvU.js → ArrowUp-BhTDxCnH.js} +1 -1
  6. package/dist/client/assets/{BarChart-rD6omHOr.js → BarChart-C3qRncE0.js} +1 -1
  7. package/dist/client/assets/{Building02-DRjaqBiC.js → Building02-BB32RZGw.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-1PnDkjx0.js → CategoricalChart-CydyA18G.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-BkmLMZuX.js → CheckCircle-BAAjR6Yz.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-z-lNsxRS.js → ChevronSelectorVertical-iTIvKtkg.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-D3SVSsDX.js → ChevronUp-D2V0rxEI.js} +1 -1
  12. package/dist/client/assets/{Copy01-BQJ05ZRk.js → Copy01-D52Dm87Z.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CWewoMfz.js → CreditCard01-ukHBKeCx.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-GUU5bDEx.js → DotsVertical-D3Nk6PKk.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-BDcf6gHj.js → ErrorBarContext-CDf4ybMZ.js} +1 -1
  16. package/dist/client/assets/{Globe04-D1j2EnT6.js → Globe04-CD1Fa9uc.js} +1 -1
  17. package/dist/client/assets/{Image01-Di7GijaS.js → Image01-CBMbNlWB.js} +1 -1
  18. package/dist/client/assets/{Key01-DxZh4RS9.js → Key01-DqMMqipC.js} +1 -1
  19. package/dist/client/assets/{Link01-ChC1RPem.js → Link01-CnfFWr1B.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-wNBs-Zx0.js → LinkBroken01-ClQXqp6D.js} +1 -1
  21. package/dist/client/assets/{Monitor01-cMYo2KVy.js → Monitor01-CWjK0W6g.js} +1 -1
  22. package/dist/client/assets/{Play-B0un_kIg.js → Play-CiT2g6kK.js} +1 -1
  23. package/dist/client/assets/{Plus-BdYjAB2U.js → Plus-DKtqOzS_.js} +1 -1
  24. package/dist/client/assets/{SearchMd-COTu5fMc.js → SearchMd-Eodh17Ne.js} +1 -1
  25. package/dist/client/assets/{Sector-B_NVpmVd.js → Sector-Bte8k9jG.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-DO4re_7a.js → ShoppingBag01-CXpLfOIN.js} +1 -1
  27. package/dist/client/assets/{Sun-Pe0tJTeM.js → Sun-CQyxb836.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-BaclOje4.js → SwitchHorizontal01-Be__kNWY.js} +1 -1
  29. package/dist/client/assets/{Tool01-BZb-DMpJ.js → Tool01-BTVhARMR.js} +1 -1
  30. package/dist/client/assets/{Trash01-c56q-lrS.js → Trash01-Cplj2Ik4.js} +1 -1
  31. package/dist/client/assets/{Upload01-Cp8lvoBS.js → Upload01-B6X2kk3D.js} +1 -1
  32. package/dist/client/assets/{User01-BdQVEBpk.js → User01-CqwCn9hE.js} +1 -1
  33. package/dist/client/assets/{UserSquare-BwyhtJD3.js → UserSquare-Gs4U-X0G.js} +1 -1
  34. package/dist/client/assets/{Users01-CGD8XkzR.js → Users01-HGukenVX.js} +1 -1
  35. package/dist/client/assets/{XAxis-CZmv7pwr.js → XAxis-D9i1XFXQ.js} +1 -1
  36. package/dist/client/assets/{XClose-DkK6PiiA.js → XClose-57_ntdgF.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-CLyO4H5k.js → ZoomOut-CK4FVubR.js} +1 -1
  38. package/dist/client/assets/{access-gate-BiwwMoCd.js → access-gate-BbBcdlA6.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-BwEgsoXe.js → add-connection-dialog-B6QIFmOE.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-DgdkRKsE.js → agent-analytics-DeR5Py98.js} +1 -1
  41. package/dist/client/assets/agent-app-jRyWHA-b.js +1 -0
  42. package/dist/client/assets/{agent-assets-BEEc2iCy.js → agent-assets-D65rdJP2.js} +1 -1
  43. package/dist/client/assets/{agent-automation-UEWnzLQw.js → agent-automation-CevIWzHP.js} +1 -1
  44. package/dist/client/assets/{agent-automations-DYwqwLW1.js → agent-automations-BKd6PuGH.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-D8dr4EjE.js → agent-connect-sources-CW6aSTWW.js} +1 -1
  46. package/dist/client/assets/agent-deck-iPy3FAq6.js +1 -0
  47. package/dist/client/assets/{agent-e2e-D7JZW-K5.js → agent-e2e-BG2Iz7Ak.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-C5NBwdQH.js → agent-experiments-CHzesuAq.js} +1 -1
  49. package/dist/client/assets/{agent-file-Bl3BYoGY.js → agent-file-D5VvPPPX.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-Bcb13dX4.js → agent-hosting-CYLr345F.js} +1 -1
  51. package/dist/client/assets/{agent-icon-If8hSRmw.js → agent-icon-BnC2DyaZ.js} +1 -1
  52. package/dist/client/assets/agent-library-CJFAZEFF.js +1 -0
  53. package/dist/client/assets/agent-library-file-DJUqDoIy.js +1 -0
  54. package/dist/client/assets/{agent-monitor-DvIz2Ok0.js → agent-monitor-DLQ5MS-a.js} +1 -1
  55. package/dist/client/assets/{agent-overview-C7_VfE93.js → agent-overview-D6dFXlZ4.js} +1 -1
  56. package/dist/client/assets/agent-settings-CHJwqyQm.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-CN48-wRM.js → agent-site-editor-CEDDq_xW.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-LfbJWAq5.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-Ckedmp3x.js → agent-site-editor-content-DXZ1wpLE.js} +3 -3
  60. package/dist/client/assets/agent-site-editor-preview-DA_WWuwo.js +551 -0
  61. package/dist/client/assets/agent-view-KkOLU85d.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-D5yzT3LN.js → agent-view-guard-BmBvgVKz.js} +1 -1
  63. package/dist/client/assets/{agents-list-BU_W6GYK.js → agents-list-LTbwlLyC.js} +1 -1
  64. package/dist/client/assets/{ai-providers-fpiCYdpV.js → ai-providers-Dz5giEXa.js} +1 -1
  65. package/dist/client/assets/{alert-BIg9W0aP.js → alert-DliOvsdZ.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-DnRanV2g.js → alert-dialog-DaPrRw6H.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-C00N7Swi.js → analytics-sections-D4Cqsw8E.js} +1 -1
  68. package/dist/client/assets/api-keys-KOCO7qDg.js +1 -0
  69. package/dist/client/assets/{api-keys-CdKCqSq9.js → api-keys-ZVp581wb.js} +1 -1
  70. package/dist/client/assets/app-editor-DdlK37s8.js +1 -0
  71. package/dist/client/assets/{asset-utils-Cy2Arrv8.js → asset-utils-BViQjnRQ.js} +1 -1
  72. package/dist/client/assets/{auth-CFhHut-U.js → auth-DpVa9FBr.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-crHvtL33.js → auth-catchall-D4OQ62gj.js} +1 -1
  74. package/dist/client/assets/{auth-entry-DOxd-oDa.js → auth-entry-Cz_DhHV3.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-BdrayXcm.js → auth-split-layout-DEd5xiLA.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-CXGLXx3K.js → authenticate-and-persist-oauth-CbYI0Hyu.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-B3j3Aqo0.js → automation-list-row-CkqoLF09.js} +1 -1
  78. package/dist/client/assets/{automation-runs-C1mxodr9.js → automation-runs-Czz5mTZQ.js} +1 -1
  79. package/dist/client/assets/{automations-CuezewX9.js → automations-CtdrMdnv.js} +1 -1
  80. package/dist/client/assets/{autosend-fqRoYj3y.js → autosend-Dna7U2HC.js} +1 -1
  81. package/dist/client/assets/{avatar-BuYUCU8g.js → avatar-DkyZyTLO.js} +1 -1
  82. package/dist/client/assets/{badge-GwFEODr4.js → badge-8YPtojDh.js} +1 -1
  83. package/dist/client/assets/{block-document-BrrhHB-1.js → block-document-DN2iU4sd.js} +3 -3
  84. package/dist/client/assets/{blocks-preview-workspace-context-B0-hAhDE.js → blocks-preview-workspace-context-B1X4jaIN.js} +1 -1
  85. package/dist/client/assets/{blog-schema-nc8wHUFN.js → blog-schema-DqTsSzyb.js} +1 -1
  86. package/dist/client/assets/{board-analytics-CJy5BZil.js → board-analytics-x9jjsPTb.js} +1 -1
  87. package/dist/client/assets/{buckets-Chl9QvRo.js → buckets-D-HqnMa7.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-bdRLsgg1.js → build-improve-prompt-doc-B1CQIB3s.js} +1 -1
  89. package/dist/client/assets/{calendar-CKfIuZta.js → calendar-NFkdhgk9.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-CYzyh0CO.js → capability-load-error-CABlEf-V.js} +1 -1
  91. package/dist/client/assets/{category-editor-B1y8lXf9.js → category-editor-YNMOAbYu.js} +1 -1
  92. package/dist/client/assets/{chart-CJFl1MMf.js → chart-DKHjNlDg.js} +1 -1
  93. package/dist/client/assets/{chat-context-Nnpd61_s.js → chat-context-kJ7vpE9_.js} +1 -1
  94. package/dist/client/assets/{chat-draft-L3duX_N0.js → chat-draft-BS9tIUoh.js} +1 -1
  95. package/dist/client/assets/{checkbox-BWTda68M.js → checkbox-CS0Igoet.js} +1 -1
  96. package/dist/client/assets/{choose-editor-DYnb1tkA.js → choose-editor-B402eTw2.js} +1 -1
  97. package/dist/client/assets/claim-phase-copy-CxTfX9Sr.js +1 -0
  98. package/dist/client/assets/{cli-auth-success-BoeMcWLR.js → cli-auth-success-rHBSNHET.js} +1 -1
  99. package/dist/client/assets/{client-icons-CJKx4xiT.js → client-icons-CqYsPRCJ.js} +1 -1
  100. package/dist/client/assets/{collapsible-lK_B-eQd.js → collapsible-BeEr-w4N.js} +1 -1
  101. package/dist/client/assets/{collection-detail-Vn8gJTW3.js → collection-detail-IBaUmFEi.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-D2MgCcuo.js → collection-display-button-xcC6AWnY.js} +1 -1
  103. package/dist/client/assets/{collection-search-y9E4m6mw.js → collection-search-CTKjuIpa.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-C3XHd41R.js → collection-table-wrapper-KpLnsj3V.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-4g4B9cjE.js → collection-tabs-HaSRL7BY.js} +1 -1
  106. package/dist/client/assets/{column-rules-9DKyUJpF.js → column-rules-CcRXiu56.js} +1 -1
  107. package/dist/client/assets/{combobox-jkqCfq0Y.js → combobox-C6uurxAD.js} +1 -1
  108. package/dist/client/assets/{command-CS7Iytaa.js → command-DW8vpIAn.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-CDZ8AQp6.js → companion-mcps-section-DowmMNQB.js} +1 -1
  110. package/dist/client/assets/{config-BsqcAsk2.js → config-DBnUW1ql.js} +1 -1
  111. package/dist/client/assets/{connect-DPAUHTC6.js → connect-fVFB8yuN.js} +1 -1
  112. package/dist/client/assets/{connect-layout-BcuosOAR.js → connect-layout-DZerNusC.js} +1 -1
  113. package/dist/client/assets/{connection-BkSfvJVU.js → connection-CpR5iu5o.js} +1 -1
  114. package/dist/client/assets/{connection-card-C_MH7Wpz.js → connection-card-HH41R-gb.js} +1 -1
  115. package/dist/client/assets/{connection-detail-BaqloXKG.js → connection-detail-CxUDzpC4.js} +1 -1
  116. package/dist/client/assets/{connection-form-helpers-DQVYQ8po.js → connection-form-helpers-DmYbPB1E.js} +1 -1
  117. package/dist/client/assets/{connections-D7TDDOL8.js → connections-BSZech5P.js} +1 -1
  118. package/dist/client/assets/{context-DotpkFxJ.js → context-Bk5mCl6c.js} +1 -1
  119. package/dist/client/assets/{context-menu-wgsE3MAX.js → context-menu-BvT7OaSF.js} +1 -1
  120. package/dist/client/assets/{core.esm-z-XuEZtM.js → core.esm-C9y_2p9u.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-C0ldUMIm.js → create-organization-dialog-BwYZdu8b.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-OvS9j1DR.js → daily-pulse-_rzFsffU.js} +1 -1
  123. package/dist/client/assets/{device-hint-CwQqo1e8.js → device-hint-D_MZXPt4.js} +1 -1
  124. package/dist/client/assets/{discover-w0SumBzq.js → discover-C7W0IXPg.js} +1 -1
  125. package/dist/client/assets/{domain-settings-BrjA42lz.js → domain-settings-B8Rinbm5.js} +1 -1
  126. package/dist/client/assets/{drawer-zHclspIB.js → drawer-CPnx75cL.js} +1 -1
  127. package/dist/client/assets/{editor-DTtfEyTo.js → editor-yCqmKD--.js} +1 -1
  128. package/dist/client/assets/{empty-state-IlGYVTi4.js → empty-state-dTT22idT.js} +1 -1
  129. package/dist/client/assets/{empty-state-Tupt8Yp0.js → empty-state-oMCOSg-5.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-IvYRZ7XN.js → extract-connection-data-B8QJH0-o.js} +1 -1
  131. package/dist/client/assets/{feature-gate-BWBuladg.js → feature-gate-BW7iq-dj.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-CWEKFuzv.js → feature-paywall-CgdVUKa4.js} +1 -1
  133. package/dist/client/assets/{file-explorer-DDezPRHM.js → file-explorer-YbXRSd7M.js} +1 -1
  134. package/dist/client/assets/{file-preview-CtE-K6lW.js → file-preview-Cw0eH4RI.js} +1 -1
  135. package/dist/client/assets/{file-share-button-0-Y1imyL.js → file-share-button-D0sPfCUq.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-BR9FUHTR.js → file-type-icon-SA_GdG2N.js} +1 -1
  137. package/dist/client/assets/flat-project-DadgDJiP.js +1 -0
  138. package/dist/client/assets/{folder-icon-Codo-krq.js → folder-icon-CDAtyCRn.js} +1 -1
  139. package/dist/client/assets/{form-WKBhslpB.js → form-iGrCLiiK.js} +1 -1
  140. package/dist/client/assets/{general-BmVwgSpQ.js → general-DjCTgVmp.js} +1 -1
  141. package/dist/client/assets/{home-C8HlFESK.js → home-CdIrQRml.js} +1 -1
  142. package/dist/client/assets/{icon-button-CQ2v9QBu.js → icon-button-CsR1tF4_.js} +1 -1
  143. package/dist/client/assets/{index-DBECXDDY.js → index-9DHxScVd.js} +1 -1
  144. package/dist/client/assets/{index-GDECV0d_.js → index-B2nut9lY.js} +1 -1
  145. package/dist/client/assets/{index-bNAUdK_u.js → index-B9Eu7iEA.js} +1 -1
  146. package/dist/client/assets/{index-DBa0gwyi.js → index-BlqL9SMO.js} +1 -1
  147. package/dist/client/assets/{index-PT6caLTc.js → index-BxgIKT5E.js} +1 -1
  148. package/dist/client/assets/{index-CaRHAAtN.js → index-C2Kh16_Z.js} +1 -1
  149. package/dist/client/assets/{index-tFXuptGT.js → index-C8t_0cfY.js} +1 -1
  150. package/dist/client/assets/{index-ByZer9OV.js → index-CHnZ1OML.js} +1 -1
  151. package/dist/client/assets/{index-D7CijXBU.js → index-Ci7HVjCb.js} +1 -1
  152. package/dist/client/assets/{index-DtWzP34K.js → index-D-uNXrYS.js} +1 -1
  153. package/dist/client/assets/{index-B0icUXIz.js → index-DH_-9WPf.js} +3 -3
  154. package/dist/client/assets/index-DQO0lnZr.css +1 -0
  155. package/dist/client/assets/{index-Du6GVafn.js → index-ECZj3unE.js} +1 -1
  156. package/dist/client/assets/{index-C2j6GKW9.js → index-U7sxkCtg.js} +41 -41
  157. package/dist/client/assets/{index-redirect-C5xUvpJP.js → index-redirect-DltXi-kk.js} +1 -1
  158. package/dist/client/assets/{infiniteQueryObserver-C6N8XSEQ.js → infiniteQueryObserver-CXx-MaO_.js} +1 -1
  159. package/dist/client/assets/{infra-billing-D4jz_iHz.js → infra-billing-CrrVVDdG.js} +1 -1
  160. package/dist/client/assets/{input-cQlwYX14.js → input-CY_xbCC1.js} +1 -1
  161. package/dist/client/assets/{input-BdGTWCdG.js → input-Dsubxg1J.js} +3 -3
  162. package/dist/client/assets/{integration-icon-BEDt5ixx.js → integration-icon-B8zb5l7K.js} +1 -1
  163. package/dist/client/assets/{jira-icon-CKOwWChZ.js → jira-icon-CQAGuV2G.js} +1 -1
  164. package/dist/client/assets/{label-4-MnDGKW.js → label-BrB_d8st.js} +1 -1
  165. package/dist/client/assets/{layout-DKnCDpGu.js → layout-gphUJcuu.js} +1 -1
  166. package/dist/client/assets/{legacy-agents-deep-DLGtr7jt.js → legacy-agents-deep-CVxOaXa7.js} +1 -1
  167. package/dist/client/assets/{legacy-main-redirect-Qlpuj-nH.js → legacy-main-redirect-WqO1j6y_.js} +1 -1
  168. package/dist/client/assets/library-YJdPBcsq.js +1 -0
  169. package/dist/client/assets/{library-tab-CkVkDVba.js → library-tab-ChNPvFjS.js} +1 -1
  170. package/dist/client/assets/{login-CQ3a5yC5.js → login-o-JLuwfW.js} +1 -1
  171. package/dist/client/assets/{markdown-Cnsn7OZ-.js → markdown-B6KxKFZ3.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-CiP1G5M8.js → mcp-app-renderer-CHuB1ZI6.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-BTUPlYVf.js → mcp-oauth-B-d-VRg6.js} +1 -1
  174. package/dist/client/assets/{mcp-oauth-Dr4hlCrA.js → mcp-oauth-B_CRpHbq.js} +1 -1
  175. package/dist/client/assets/{members-COpX9ByA.js → members-CPD6F51f.js} +1 -1
  176. package/dist/client/assets/{memory-BNe0QYUK.js → memory-OJn5uV0V.js} +1 -1
  177. package/dist/client/assets/{mini-report-page-DR1HcGbn.js → mini-report-page-CwDyJAfz.js} +1 -1
  178. package/dist/client/assets/{mock-board-DxAY2kop.js → mock-board-CGiZtaDq.js} +1 -1
  179. package/dist/client/assets/{monaco-editor-BEzZFZkL.js → monaco-editor-BgXIJi37.js} +1 -1
  180. package/dist/client/assets/{monitoring-stats-row-Bz9gliRr.js → monitoring-stats-row-CRYRt9jM.js} +1 -1
  181. package/dist/client/assets/{multi-select-BrALXGoH.js → multi-select-2LqqBNod.js} +1 -1
  182. package/dist/client/assets/{mustache-DW9HpHJ_.js → mustache-D2pCj9iS.js} +1 -1
  183. package/dist/client/assets/{new-project-dialog-DYby_l6E.js → new-project-dialog-Civny35s.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-Cwr39tOx.js → oauth-callback-CITtYS7F.js} +1 -1
  185. package/dist/client/assets/{oauth-callback-ai-provider-CAcEy37s.js → oauth-callback-ai-provider-7ZDGQrFN.js} +1 -1
  186. package/dist/client/assets/{onboarding-CVS4iTKP.js → onboarding-BQWHCZlV.js} +1 -1
  187. package/dist/client/assets/{openai-conversation-CaqCggLj.js → openai-conversation-utJbcv70.js} +1 -1
  188. package/dist/client/assets/{optimistic-project-sidebar-views-BMdWVdaT.js → optimistic-project-sidebar-views-_XftP7OV.js} +1 -1
  189. package/dist/client/assets/{organization-choice-CAlyIO1z.js → organization-choice-1vh8HAPM.js} +1 -1
  190. package/dist/client/assets/{orgs-DxKiUnBb.js → orgs-BZ-5AWHQ.js} +1 -1
  191. package/dist/client/assets/{page-seo-form-CPT8Z29L.js → page-seo-form-DeitPdcq.js} +1 -1
  192. package/dist/client/assets/{pair-DVoctykA.js → pair-DikNYdKi.js} +1 -1
  193. package/dist/client/assets/{plan-ladder-BN-BvP0u.js → plan-ladder-CIXyMEqm.js} +1 -1
  194. package/dist/client/assets/{popover-gs_i-X_H.js → popover-KA4f1Rso.js} +1 -1
  195. package/dist/client/assets/{post-calendar-F4sonI91.js → post-calendar-P7Yczeyh.js} +1 -1
  196. package/dist/client/assets/{post-editor-hlGNe5ye.js → post-editor-D48qgVZF.js} +1 -1
  197. package/dist/client/assets/{preview-content-C5kFNgwQ.js → preview-content-CsRoC8kG.js} +1 -1
  198. package/dist/client/assets/{preview-dialog-Qbq8z8Qs.js → preview-dialog-CgACqBPB.js} +1 -1
  199. package/dist/client/assets/{preview-panel-_aZ2oLHQ.js → preview-panel-Bz6heUxj.js} +1 -1
  200. package/dist/client/assets/{product-picker-dialog-DlNUPfQ_.js → product-picker-dialog-Bj-cxr4D.js} +1 -1
  201. package/dist/client/assets/{profile-BRCYDOAe.js → profile-DttmzwVP.js} +1 -1
  202. package/dist/client/assets/{project-app-view-Ck5FRtUs.js → project-app-view-B-LHkLR3.js} +1 -1
  203. package/dist/client/assets/{project-feed-QapOYIZm.js → project-feed-nuT0MGeK.js} +1 -1
  204. package/dist/client/assets/{project-icon-CgKRb1hz.js → project-icon-BCIWlbB2.js} +1 -1
  205. package/dist/client/assets/project-reports-BuDozDAg.js +1 -0
  206. package/dist/client/assets/project-tasks-Bq0HB4Ij.js +1 -0
  207. package/dist/client/assets/{projects-nbQYC9f9.js → projects-6rC_NtTv.js} +1 -1
  208. package/dist/client/assets/{projects-empty-state-C8avo7T4.js → projects-empty-state-BLhvUm-A.js} +1 -1
  209. package/dist/client/assets/{prompts-DKX8SExm.js → prompts-Ba_KG-2c.js} +1 -1
  210. package/dist/client/assets/record-editor-5kx4kvLF.js +1 -0
  211. package/dist/client/assets/redirect-editor-Bv9sv8zV.js +1 -0
  212. package/dist/client/assets/{reports-BbWvr6H5.js → reports-D958VfvH.js} +1 -1
  213. package/dist/client/assets/reports-DkLsDhHf.js +1 -0
  214. package/dist/client/assets/{reports-onboarding-tih0kZo9.js → reports-onboarding-Lt3lfqUL.js} +1 -1
  215. package/dist/client/assets/{reports-tab-yBLzRcur.js → reports-tab-ZR-CeLn9.js} +2 -2
  216. package/dist/client/assets/{repositories-KCRi18iu.js → repositories-OT41oi2h.js} +1 -1
  217. package/dist/client/assets/{repository-binding-Bz8gaDWp.js → repository-binding-C_rNGJZH.js} +1 -1
  218. package/dist/client/assets/{repository-import-picker-OXXLG8_F.js → repository-import-picker-yVMNVJAW.js} +1 -1
  219. package/dist/client/assets/{repository-picker-CUJZTLEq.js → repository-picker-B4dJGi5H.js} +1 -1
  220. package/dist/client/assets/{require-capability-B2UH2rc6.js → require-capability-Dh9KM2TE.js} +1 -1
  221. package/dist/client/assets/{required-auth-layout-Btbks3py.js → required-auth-layout-CDnv3SsX.js} +1 -1
  222. package/dist/client/assets/{reset-password-CUN3lKnX.js → reset-password-BBDI4kwV.js} +1 -1
  223. package/dist/client/assets/{resizable-Db2VNPZt.js → resizable-E6xc07q4.js} +1 -1
  224. package/dist/client/assets/{resolve-tab-icon-BtnjGWT-.js → resolve-tab-icon-BF6rqPgZ.js} +1 -1
  225. package/dist/client/assets/{review-settings-Ct7OUs4h.js → review-settings-NJYjR7BK.js} +1 -1
  226. package/dist/client/assets/{rich-text-link-control-COOeDn-U.js → rich-text-link-control-CrNCYAJu.js} +1 -1
  227. package/dist/client/assets/{roles-u-T2VmM2.js → roles-DH7V2rhC.js} +1 -1
  228. package/dist/client/assets/route-CUxOTTob.js +1 -0
  229. package/dist/client/assets/{route-Bc9IilYL.js → route-Cj8uDmsr.js} +1 -1
  230. package/dist/client/assets/{route-CTn-1Nr7.js → route-FBtmoSQ8.js} +1 -1
  231. package/dist/client/assets/{runnable-block-editor-C2U07j1a.js → runnable-block-editor-CSPOZTx9.js} +4 -4
  232. package/dist/client/assets/{sandbox-lifecycle-context-Dhj-bJE2.js → sandbox-lifecycle-context-BFOchDNn.js} +1 -1
  233. package/dist/client/assets/{schema-DDRR7qV7.js → schema-Cx5CAoQi.js} +1 -1
  234. package/dist/client/assets/{scroll-area-PFGh7bgI.js → scroll-area-gEfzLhri.js} +1 -1
  235. package/dist/client/assets/{search-input-vG9YkvpS.js → search-input-tSXGNIP6.js} +1 -1
  236. package/dist/client/assets/{search-toggle-BfYvpGc1.js → search-toggle-B2ZvA7nT.js} +1 -1
  237. package/dist/client/assets/{secret-picker-C5tfGGz3.js → secret-picker-BsE6_iwf.js} +1 -1
  238. package/dist/client/assets/{secrets-4lhKX4tY.js → secrets-D_3DGm4u.js} +1 -1
  239. package/dist/client/assets/sections-editor-CBUhadYU.js +4 -0
  240. package/dist/client/assets/{select-DbQGrGQ8.js → select-CbOgbS2d.js} +1 -1
  241. package/dist/client/assets/{select-model-DNM2aBIM.js → select-model-DsSD6E8C.js} +1 -1
  242. package/dist/client/assets/{seo-editor-l91X5kZv.js → seo-editor-CnWdtXQc.js} +1 -1
  243. package/dist/client/assets/{separator-DFhoNpuy.js → separator-Caj2juFE.js} +1 -1
  244. package/dist/client/assets/{settings-tab-tVRweOC9.js → settings-tab-DqBSlRVf.js} +1 -1
  245. package/dist/client/assets/{sheet-DOAMDmx1.js → sheet-CcUwyeyx.js} +1 -1
  246. package/dist/client/assets/{shell-layout-fIZDbVTW.js → shell-layout-DQzu_3a6.js} +1 -1
  247. package/dist/client/assets/{skills-BxKYMJ49.js → skills-BAdMhSAc.js} +1 -1
  248. package/dist/client/assets/{slider-BSnjHAZ-.js → slider-CfGhYSgO.js} +1 -1
  249. package/dist/client/assets/{sortable.esm-Bs4X-lz9.js → sortable.esm-Djdx6Fqm.js} +1 -1
  250. package/dist/client/assets/{sso-B3Ei1QLd.js → sso-BdAlAmAg.js} +1 -1
  251. package/dist/client/assets/{suggestion-GJMxb511.js → suggestion-BNgiJ1ZJ.js} +1 -1
  252. package/dist/client/assets/{switch-DjuAzQl7.js → switch-BhazVYJL.js} +1 -1
  253. package/dist/client/assets/{symbol-BW5SQq5r.js → symbol-D7hSGlXb.js} +1 -1
  254. package/dist/client/assets/{synced-repos-pXak6fc3.js → synced-repos-BC9YVpiQ.js} +1 -1
  255. package/dist/client/assets/{tab-icon-glyph-RcqrgDwB.js → tab-icon-glyph-BYA6exv3.js} +1 -1
  256. package/dist/client/assets/{table-BXl79O5k.js → table-BCWwFa46.js} +1 -1
  257. package/dist/client/assets/{tabs-BOZVTPjF.js → tabs-ygNtOTGD.js} +1 -1
  258. package/dist/client/assets/{task-board-C57y0iD-.js → task-board-CGKcZmT3.js} +1 -1
  259. package/dist/client/assets/{task-route-Cjd8CAnK.js → task-route-Bc1A0MFY.js} +1 -1
  260. package/dist/client/assets/{task-status-CAJCzZIn.js → task-status-VxTqyW4d.js} +1 -1
  261. package/dist/client/assets/taskboard-analytics-BXD65o9V.js +1 -0
  262. package/dist/client/assets/{tasks-D9zTcMtd.js → tasks-LlnLf8Q6.js} +1 -1
  263. package/dist/client/assets/tasks-qcYGJhAG.js +1 -0
  264. package/dist/client/assets/{textarea-CPiGh4Bi.js → textarea-Cz2yfMWd.js} +1 -1
  265. package/dist/client/assets/{thread-analytics-B_7_b3yj.js → thread-analytics-DYe_it_u.js} +1 -1
  266. package/dist/client/assets/{thread-button-Qtn3TibT.js → thread-button-DbPrz4-p.js} +1 -1
  267. package/dist/client/assets/{thread-intent-4Oc5TOnJ.js → thread-intent-oxPmiLpE.js} +1 -1
  268. package/dist/client/assets/{thread-route-D6XzI9r7.js → thread-route-CydsZIWs.js} +1 -1
  269. package/dist/client/assets/{thread-route-iNikIgfP.js → thread-route-fmJJCDUN.js} +1 -1
  270. package/dist/client/assets/{thread-sheet-body-Di9tG30P.js → thread-sheet-body-D55xnaP7.js} +1 -1
  271. package/dist/client/assets/{time-range-picker-CDHHOsBr.js → time-range-picker-GRQ6ZyNo.js} +1 -1
  272. package/dist/client/assets/{toggle-group-DAqrdZL7.js → toggle-group-BoHp8d1Q.js} +1 -1
  273. package/dist/client/assets/{tool-namespace-BjEWyMab.js → tool-namespace-BxpjstzE.js} +1 -1
  274. package/dist/client/assets/{toolbar-icon-button-BfQeMxca.js → toolbar-icon-button-BmfLDUbS.js} +1 -1
  275. package/dist/client/assets/{tooltip-suYIqFBg.js → tooltip-D9dKhMcM.js} +1 -1
  276. package/dist/client/assets/{tooltipContext-CMLuW3HN.js → tooltipContext-C42keTPt.js} +1 -1
  277. package/dist/client/assets/{track-EcNm8jZX.js → track-B7AEg5DI.js} +1 -1
  278. package/dist/client/assets/{types-D15JKPMl.js → types-DhTd2fZN.js} +1 -1
  279. package/dist/client/assets/{url-slug-BRCwD3Fe.js → url-slug-BF1zPW8D.js} +1 -1
  280. package/dist/client/assets/{usage-stats-DsRsPtyV.js → usage-stats-y9uwYGvN.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-C3Kx53JX.js → use-ai-providers-CEZuf2wE.js} +1 -1
  282. package/dist/client/assets/{use-automations-Crtp2oCM.js → use-automations-BbCwFFfW.js} +1 -1
  283. package/dist/client/assets/{use-autosave-C0fdGzgj.js → use-autosave-CNjnDRHj.js} +1 -1
  284. package/dist/client/assets/{use-chat-layout-state-B26tNhCJ.js → use-chat-layout-state-Dl5fbmt9.js} +1 -1
  285. package/dist/client/assets/{use-chat-navigation-Bmt_svKF.js → use-chat-navigation-Dlyibisy.js} +1 -1
  286. package/dist/client/assets/{use-clock-tick-C_wm8Myy.js → use-clock-tick-BMU-GnSw.js} +1 -1
  287. package/dist/client/assets/{use-connect-companion-F5oUhtvG.js → use-connect-companion-DKwI-FYz.js} +1 -1
  288. package/dist/client/assets/{use-connection-Dzl69g_7.js → use-connection-Bjwl8al7.js} +1 -1
  289. package/dist/client/assets/{use-copy-Cs1Dtpg9.js → use-copy-DWwjFTFc.js} +1 -1
  290. package/dist/client/assets/{use-create-virtual-mcp-Dt66Blst.js → use-create-virtual-mcp-Cq6u3V6a.js} +1 -1
  291. package/dist/client/assets/{use-date-fns-locale-CsYh8bS5.js → use-date-fns-locale-BTXcqaiw.js} +1 -1
  292. package/dist/client/assets/{use-debounced-autosave-DErH3S0W.js → use-debounced-autosave-DS6-D0Z3.js} +1 -1
  293. package/dist/client/assets/{use-debounced-value-ukFTa1_g.js → use-debounced-value-BWgwAYQ4.js} +1 -1
  294. package/dist/client/assets/{use-deco-credits-CiEYY96V.js → use-deco-credits-B2DLMpWA.js} +1 -1
  295. package/dist/client/assets/{use-decopilot-events-CbkNqFn8.js → use-decopilot-events-CaQ-ifBF.js} +1 -1
  296. package/dist/client/assets/{use-delete-connection-D8Z-KWmD.js → use-delete-connection-BDlKnwpK.js} +1 -1
  297. package/dist/client/assets/{use-deployment-admin-D_WFI7oj.js → use-deployment-admin-DkCmIWo6.js} +1 -1
  298. package/dist/client/assets/{use-ensure-project-folder-AaBo8kSZ.js → use-ensure-project-folder-CqRNoawD.js} +1 -1
  299. package/dist/client/assets/use-fast-preview-draft-url-UzD2wX6r.js +1 -0
  300. package/dist/client/assets/{use-file-configs-B5izc2Rd.js → use-file-configs-BlVRbWGm.js} +1 -1
  301. package/dist/client/assets/{use-infinite-scroll-C28hKaW1.js → use-infinite-scroll-TxEXws4q.js} +1 -1
  302. package/dist/client/assets/{use-join-requests-Duz41fBj.js → use-join-requests-B2UcVFtB.js} +1 -1
  303. package/dist/client/assets/{use-main-panel-tabs-DtdvkapJ.js → use-main-panel-tabs-CMS20W_c.js} +1 -1
  304. package/dist/client/assets/{use-mcp-auth-status-CPXPh7cI.js → use-mcp-auth-status-CPFHVJ3y.js} +1 -1
  305. package/dist/client/assets/{use-mcp-client-eXA2w8ZE.js → use-mcp-client-hyHjvXHS.js} +1 -1
  306. package/dist/client/assets/{use-mcp-prompts-DmU6o9Xc.js → use-mcp-prompts-B4XQOyIC.js} +1 -1
  307. package/dist/client/assets/{use-mcp-tools-B4tf0I9F.js → use-mcp-tools-DCX9XGmF.js} +1 -1
  308. package/dist/client/assets/{use-members-4sfHvlaj.js → use-members-BppTtT4e.js} +1 -1
  309. package/dist/client/assets/{use-mobile-HT4128sM.js → use-mobile-BfC7cdl6.js} +1 -1
  310. package/dist/client/assets/{use-navigate-to-agent-B7zN39On.js → use-navigate-to-agent-DbxbeXIC.js} +1 -1
  311. package/dist/client/assets/use-new-blocks-editor-DMV0JNBq.js +1 -0
  312. package/dist/client/assets/{use-open-billing-url-2qxFombc.js → use-open-billing-url-BlRE_825.js} +1 -1
  313. package/dist/client/assets/{use-org-auth-client-BMEgAdHb.js → use-org-auth-client-BpOVJa8q.js} +1 -1
  314. package/dist/client/assets/{use-org-fs-B3DmwHAZ.js → use-org-fs-CpG4Ftj0.js} +1 -1
  315. package/dist/client/assets/{use-org-repo-syncs-D3ekcvfg.js → use-org-repo-syncs-DAOwh9J_.js} +1 -1
  316. package/dist/client/assets/{use-org-sso-DS8GzAQg.js → use-org-sso-D2PH-QV7.js} +1 -1
  317. package/dist/client/assets/{use-organization-roles-6zOVe4o-.js → use-organization-roles-CG61KaMc.js} +1 -1
  318. package/dist/client/assets/{use-organization-settings-Bz6BeBAj.js → use-organization-settings-CPOQOxKw.js} +1 -1
  319. package/dist/client/assets/{use-panel-navigate-EBCZsVQ_.js → use-panel-navigate-DFsIXY6f.js} +1 -1
  320. package/dist/client/assets/{use-project-scope-Bb0vPnr8.js → use-project-scope-BDGuEIbQ.js} +1 -1
  321. package/dist/client/assets/{use-releases-ClwElQgx.js → use-releases-POJh7lfH.js} +1 -1
  322. package/dist/client/assets/{use-reports-diagnostic-BK1w_pLQ.js → use-reports-diagnostic-BtTiu6Jz.js} +1 -1
  323. package/dist/client/assets/{use-sandbox-events-Chsot9e6.js → use-sandbox-events-D1UC0d1h.js} +1 -1
  324. package/dist/client/assets/{use-secrets-kYdI8lvW.js → use-secrets-CcQOv1cy.js} +1 -1
  325. package/dist/client/assets/{use-section-preview-base-D4dQm6ck.js → use-section-preview-base-DvkGVoSM.js} +1 -1
  326. package/dist/client/assets/{use-tags-vapSsi06.js → use-tags-DP90qdqE.js} +1 -1
  327. package/dist/client/assets/{use-task-board-analytics-YT4Volqy.js → use-task-board-analytics-BoVEsyvv.js} +1 -1
  328. package/dist/client/assets/{use-task-board-events-bAA1XgLM.js → use-task-board-events-C6vPjypN.js} +1 -1
  329. package/dist/client/assets/{use-task-board-item-prs-B0FT2W07.js → use-task-board-item-prs-C0LWlrKc.js} +1 -1
  330. package/dist/client/assets/{use-task-board-items-C9LMZrBO.js → use-task-board-items-Cx--Z4EY.js} +1 -1
  331. package/dist/client/assets/{use-task-metadata-DgjDbAXI.js → use-task-metadata-DXtRT11o.js} +1 -1
  332. package/dist/client/assets/{use-thread-analytics-B9q4Ebge.js → use-thread-analytics-DSKonBCj.js} +1 -1
  333. package/dist/client/assets/{use-thread-outputs-BZE9K3Hp.js → use-thread-outputs-DR80xdVS.js} +1 -1
  334. package/dist/client/assets/useInfiniteQuery-D602T7Oc.js +1 -0
  335. package/dist/client/assets/{useQueries-BhA2JM5X.js → useQueries-BZ4QkddU.js} +1 -1
  336. package/dist/client/assets/useSuspenseInfiniteQuery-TMfZO9fH.js +1 -0
  337. package/dist/client/assets/{users-DDE8Tbam.js → users-CdPfAxNL.js} +1 -1
  338. package/dist/client/assets/{utils-QsQ2yEbh.js → utils-DVQBiT32.js} +1 -1
  339. package/dist/client/assets/{variant-calendar-77oeK5vi.js → variant-calendar-W8FuVjAz.js} +1 -1
  340. package/dist/client/assets/{variant-matcher-override-ChXktSn7.js → variant-matcher-override-DWmch-z_.js} +1 -1
  341. package/dist/client/assets/{view-mode-toggle-BrFGbylt.js → view-mode-toggle-DpnRn8BO.js} +1 -1
  342. package/dist/client/assets/{virtual-mcp-DYpYm5Qi.js → virtual-mcp-CadqoFCO.js} +1 -1
  343. package/dist/client/assets/{watch-sse-pool-YrM1VSdM.js → watch-sse-pool-BK0LBG5W.js} +1 -1
  344. package/dist/client/index.html +2 -2
  345. package/dist/server/server.js +1 -1
  346. package/package.json +1 -1
  347. package/dist/client/assets/agent-app-BXjPfkyc.js +0 -1
  348. package/dist/client/assets/agent-deck-CtmtBmBx.js +0 -1
  349. package/dist/client/assets/agent-library-Dh7CWaTR.js +0 -1
  350. package/dist/client/assets/agent-library-file-G7_pw9sf.js +0 -1
  351. package/dist/client/assets/agent-settings-C_Xfu2fI.js +0 -1
  352. package/dist/client/assets/agent-site-editor-code-C2cYJ1gd.js +0 -2
  353. package/dist/client/assets/agent-site-editor-preview-C-Q3v0ql.js +0 -518
  354. package/dist/client/assets/agent-view-DXlTANvs.js +0 -1
  355. package/dist/client/assets/api-keys-BpjBduhZ.js +0 -1
  356. package/dist/client/assets/app-editor-DUK0IXGU.js +0 -1
  357. package/dist/client/assets/claim-phase-copy-D3VDMBEf.js +0 -1
  358. package/dist/client/assets/flat-project-CJztueGN.js +0 -1
  359. package/dist/client/assets/index-D7k-FSss.css +0 -1
  360. package/dist/client/assets/library-CEzuKcTE.js +0 -1
  361. package/dist/client/assets/project-reports-CyBWkEE2.js +0 -1
  362. package/dist/client/assets/project-tasks-CMRv6uE5.js +0 -1
  363. package/dist/client/assets/record-editor-DwX0B9ip.js +0 -1
  364. package/dist/client/assets/redirect-editor-CCi0diD6.js +0 -1
  365. package/dist/client/assets/reports-BFZBOAI-.js +0 -1
  366. package/dist/client/assets/route-4yKkCbUJ.js +0 -1
  367. package/dist/client/assets/sections-editor-CoHecr0y.js +0 -1
  368. package/dist/client/assets/taskboard-analytics-Bw1zkfYC.js +0 -1
  369. package/dist/client/assets/tasks-DC4SpO7e.js +0 -1
  370. package/dist/client/assets/use-fast-preview-draft-url-Cm7cfRW8.js +0 -1
  371. package/dist/client/assets/use-new-blocks-editor-BXHg7Zkj.js +0 -1
  372. package/dist/client/assets/useInfiniteQuery-DNPgGGZO.js +0 -1
  373. package/dist/client/assets/useSuspenseInfiniteQuery-CD5WtYqv.js +0 -1
@@ -0,0 +1,551 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-CBUhadYU.js","assets/index-U7sxkCtg.js","assets/index-DQO0lnZr.css","assets/chat-context-kJ7vpE9_.js","assets/use-panel-navigate-DFsIXY6f.js","assets/thread-route-CydsZIWs.js","assets/use-project-scope-BDGuEIbQ.js","assets/repository-binding-C_rNGJZH.js","assets/use-mcp-client-hyHjvXHS.js","assets/auth-DpVa9FBr.js","assets/autosend-Dna7U2HC.js","assets/thread-intent-oxPmiLpE.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-BK0LBG5W.js","assets/task-board-CGKcZmT3.js","assets/schema-Cx5CAoQi.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-CaQ-ifBF.js","assets/use-ai-providers-CEZuf2wE.js","assets/use-chat-navigation-Dlyibisy.js","assets/location-BjlyegC2.js","assets/use-organization-settings-CPOQOxKw.js","assets/use-new-blocks-editor-DMV0JNBq.js","assets/runnable-block-editor-CSPOZTx9.js","assets/input-Dsubxg1J.js","assets/usage-stats-y9uwYGvN.js","assets/tool-namespace-BxpjstzE.js","assets/form-iGrCLiiK.js","assets/label-BrB_d8st.js","assets/utils-CVEq3hMx.js","assets/markdown-B6KxKFZ3.js","assets/use-copy-DWwjFTFc.js","assets/Copy01-D52Dm87Z.js","assets/ZoomOut-CK4FVubR.js","assets/use-mobile-BfC7cdl6.js","assets/tooltip-D9dKhMcM.js","assets/index-BlqL9SMO.js","assets/agent-icon-BnC2DyaZ.js","assets/AlertCircle-CWfOEKki.js","assets/Tool01-BTVhARMR.js","assets/ArrowUp-BhTDxCnH.js","assets/ArrowLeft-B5i4q13h.js","assets/LinkBroken01-ClQXqp6D.js","assets/ShoppingBag01-CXpLfOIN.js","assets/Building02-BB32RZGw.js","assets/CheckCircle-BAAjR6Yz.js","assets/ChevronUp-D2V0rxEI.js","assets/ChevronSelectorVertical-iTIvKtkg.js","assets/UserSquare-Gs4U-X0G.js","assets/CreditCard01-ukHBKeCx.js","assets/DotsVertical-D3Nk6PKk.js","assets/Image01-CBMbNlWB.js","assets/Globe04-CD1Fa9uc.js","assets/SwitchHorizontal01-Be__kNWY.js","assets/Key01-DqMMqipC.js","assets/Link01-CnfFWr1B.js","assets/Monitor01-CWjK0W6g.js","assets/Sun-CQyxb836.js","assets/Play-CiT2g6kK.js","assets/Plus-DKtqOzS_.js","assets/SearchMd-Eodh17Ne.js","assets/Trash01-Cplj2Ik4.js","assets/Upload01-B6X2kk3D.js","assets/User01-CqwCn9hE.js","assets/Users01-HGukenVX.js","assets/XClose-57_ntdgF.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-CsR1tF4_.js","assets/file-type-icon-SA_GdG2N.js","assets/shell-layout-DQzu_3a6.js","assets/avatar-DkyZyTLO.js","assets/use-clock-tick-BMU-GnSw.js","assets/command-DW8vpIAn.js","assets/index-CHnZ1OML.js","assets/integration-icon-B8zb5l7K.js","assets/project-icon-BCIWlbB2.js","assets/new-project-dialog-Civny35s.js","assets/repository-import-picker-yVMNVJAW.js","assets/use-navigate-to-agent-DbxbeXIC.js","assets/repository-picker-B4dJGi5H.js","assets/useInfiniteQuery-D602T7Oc.js","assets/infiniteQueryObserver-CXx-MaO_.js","assets/collection-search-CTKjuIpa.js","assets/use-debounced-value-BWgwAYQ4.js","assets/required-auth-layout-CDnv3SsX.js","assets/use-org-sso-D2PH-QV7.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-BS9tIUoh.js","assets/select-CbOgbS2d.js","assets/index-BdQq_4o_.js","assets/tabs-ygNtOTGD.js","assets/use-deco-credits-B2DLMpWA.js","assets/toggle-group-BoHp8d1Q.js","assets/use-open-billing-url-BlRE_825.js","assets/index-Ci7HVjCb.js","assets/checkbox-CS0Igoet.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-KA4f1Rso.js","assets/drawer-CPnx75cL.js","assets/input-CY_xbCC1.js","assets/suggestion-BNgiJ1ZJ.js","assets/use-chat-layout-state-Dl5fbmt9.js","assets/use-file-configs-BlVRbWGm.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-B4XQOyIC.js","assets/use-org-fs-CpG4Ftj0.js","assets/question-004-sINsf4GQ.js","assets/use-members-BppTtT4e.js","assets/use-org-auth-client-BpOVJa8q.js","assets/feature-paywall-CgdVUKa4.js","assets/plan-ladder-CIXyMEqm.js","assets/add-connection-dialog-B6QIFmOE.js","assets/extract-connection-data-B8QJH0-o.js","assets/metadata-D72DunRR.js","assets/connection-CpR5iu5o.js","assets/url-slug-BF1zPW8D.js","assets/connection-card-HH41R-gb.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-Cz2yfMWd.js","assets/use-connection-Bjwl8al7.js","assets/connection-form-helpers-DmYbPB1E.js","assets/authenticate-and-persist-oauth-CbYI0Hyu.js","assets/mcp-oauth-B_CRpHbq.js","assets/mcp-oauth-B-d-VRg6.js","assets/collection-tabs-HaSRL7BY.js","assets/badge-8YPtojDh.js","assets/use-infinite-scroll-TxEXws4q.js","assets/useSuspenseInfiniteQuery-TMfZO9fH.js","assets/use-task-board-events-C6vPjypN.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-CxTfX9Sr.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-DikNYdKi.js","assets/collapsible-BeEr-w4N.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CHuB1ZI6.js","assets/types-DhTd2fZN.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-CcUwyeyx.js","assets/use-thread-outputs-DR80xdVS.js","assets/utils-DVQBiT32.js","assets/scroll-area-gEfzLhri.js","assets/monaco-editor-BgXIJi37.js","assets/editor-yCqmKD--.js","assets/calendar-NFkdhgk9.js","assets/rich-text-link-control-CrNCYAJu.js","assets/switch-BhazVYJL.js","assets/core.esm-C9y_2p9u.js","assets/sortable.esm-Djdx6Fqm.js","assets/view-mode-toggle-DpnRn8BO.js","assets/combobox-C6uurxAD.js","assets/alert-dialog-DaPrRw6H.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-tSXGNIP6.js","assets/asset-utils-BViQjnRQ.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-D2pCj9iS.js","assets/page-seo-form-DeitPdcq.js","assets/use-section-preview-base-DvkGVoSM.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-DWmch-z_.js"])))=>i.map(i=>d[i]);
2
+ import{r as v,aD as Et,aW as Ye,aE as Ee,c as fe,b as Te,j as s,q as Xn,D as Zn,K as Xs,s as es,v as ts,e as Zs,h as jt,I as Rn,B as Ue,w as er,a6 as ns,aX as tr,a2 as tn,aY as nr,aV as sr,a0 as Ln,a1 as On,l as Ht,P as _n,y as rr,t as An}from"./index-U7sxkCtg.js";import{A as ar}from"./agent-view-guard-BmBvgVKz.js";import{F as ir}from"./feature-gate-BW7iq-dj.js";import{a as or,b as Nt,r as ss,l as rs,f as lr,w as cr}from"./chat-context-kJ7vpE9_.js";import{t as dr}from"./ChevronUp-D2V0rxEI.js";import{I as as,R as ur,S as mr,d as fr,T as pr,U as hr,V as gr,W as vr,X as Bn,K as br}from"./agent-icon-BnC2DyaZ.js";import{a as xr}from"./UserSquare-Gs4U-X0G.js";import{s as yr}from"./Plus-DKtqOzS_.js";import{P as wr,a as kr,b as Pr}from"./popover-KA4f1Rso.js";import{e as it,b as ot,c as is,f as os,C as ls,a as cs}from"./command-DW8vpIAn.js";import{c as Sr,a as Er}from"./repository-binding-C_rNGJZH.js";import{b as nn}from"./sandbox-lifecycle-context-BFOchDNn.js";import{e as jr}from"./backoff-CrEUbyZT.js";import{f as Nr}from"./thread-intent-oxPmiLpE.js";import{a as ds}from"./input-Dsubxg1J.js";import{N as Tr,c as Cr,s as lt,n as sn,d as us,f as $e,v as ms,h as Rr,u as Lr,j as Or,k as _r,l as Ar,m as Br,o as Fn}from"./claim-phase-copy-CxTfX9Sr.js";import{u as Fr}from"./use-mobile-BfC7cdl6.js";import{b as Vt,T as qt,a as Wt}from"./tooltip-D9dKhMcM.js";import{T as nt}from"./toolbar-icon-button-BmfLDUbS.js";import{b as $r,a as Mr,u as fs,g as Dr,c as Kr,B as Gt,P as zr,r as Ir,R as Ur,d as Hr,e as rn,f as ps,h as Vr,i as qr,j as Wr,l as Gr,m as Jr,p as Yr,k as Qr,S as Jt}from"./runnable-block-editor-CSPOZTx9.js";import{w as yt,i as Xr}from"./variant-matcher-override-DWmch-z_.js";import{r as Zr,w as ea,D as ta,b as $n,a as na}from"./section-preview-url-7zfngvgW.js";import{u as sa}from"./use-fast-preview-draft-url-UzD2wX6r.js";import{u as ra,w as Mn}from"./device-hint-D_MZXPt4.js";import{a as aa,c as hs}from"./shell-layout-DQzu_3a6.js";import{u as gs,b as ia}from"./use-sandbox-events-D1UC0d1h.js";import{u as Xt}from"./useQueries-BZ4QkddU.js";import{i as oa}from"./LinkBroken01-ClQXqp6D.js";import{u as vs}from"./blocks-preview-workspace-context-B1X4jaIN.js";import{i as la}from"./AlertCircle-CWfOEKki.js";import{E as an}from"./empty-state-dTT22idT.js";import{M as ca}from"./monaco-editor-BgXIJi37.js";import{u as da}from"./use-new-blocks-editor-DMV0JNBq.js";import{a as ua}from"./utils-DVQBiT32.js";import{R as Dn,a as wt,b as Kn}from"./resizable-E6xc07q4.js";import{r as ma}from"./virtual-mcp-CadqoFCO.js";import{d as fa}from"./delay-CnY5UFtP.js";import{a as Yt}from"./use-chat-layout-state-Dl5fbmt9.js";import{G as zn}from"./repository-picker-B4dJGi5H.js";import{R as pa}from"./repository-import-picker-yVMNVJAW.js";import{r as ha}from"./use-main-panel-tabs-CMS20W_c.js";import{u as ga}from"./use-task-metadata-DXtRT11o.js";import{b as va}from"./thread-route-CydsZIWs.js";import"./use-panel-navigate-DFsIXY6f.js";import"./use-project-scope-BDGuEIbQ.js";import"./feature-paywall-CgdVUKa4.js";import"./plan-ladder-CIXyMEqm.js";import"./use-decopilot-events-CaQ-ifBF.js";import"./watch-sse-pool-BK0LBG5W.js";import"./task-board-CGKcZmT3.js";import"./schema-Cx5CAoQi.js";import"./autosend-Dna7U2HC.js";import"./use-mcp-client-hyHjvXHS.js";import"./auth-DpVa9FBr.js";import"./use-ai-providers-CEZuf2wE.js";import"./use-chat-navigation-Dlyibisy.js";import"./location-BjlyegC2.js";import"./use-organization-settings-CPOQOxKw.js";import"./Tool01-BTVhARMR.js";import"./ArrowUp-BhTDxCnH.js";import"./ArrowLeft-B5i4q13h.js";import"./ShoppingBag01-CXpLfOIN.js";import"./ZoomOut-CK4FVubR.js";import"./Building02-BB32RZGw.js";import"./CheckCircle-BAAjR6Yz.js";import"./ChevronSelectorVertical-iTIvKtkg.js";import"./Copy01-D52Dm87Z.js";import"./CreditCard01-ukHBKeCx.js";import"./DotsVertical-D3Nk6PKk.js";import"./Image01-CBMbNlWB.js";import"./Globe04-CD1Fa9uc.js";import"./SwitchHorizontal01-Be__kNWY.js";import"./Key01-DqMMqipC.js";import"./Link01-CnfFWr1B.js";import"./Monitor01-CWjK0W6g.js";import"./Sun-CQyxb836.js";import"./Play-CiT2g6kK.js";import"./SearchMd-Eodh17Ne.js";import"./Trash01-Cplj2Ik4.js";import"./Upload01-B6X2kk3D.js";import"./User01-CqwCn9hE.js";import"./Users01-HGukenVX.js";import"./XClose-57_ntdgF.js";import"./index-CHnZ1OML.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-y9uwYGvN.js";import"./tool-namespace-BxpjstzE.js";import"./form-iGrCLiiK.js";import"./label-BrB_d8st.js";import"./utils-CVEq3hMx.js";import"./markdown-B6KxKFZ3.js";import"./use-copy-DWwjFTFc.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-CsR1tF4_.js";import"./file-type-icon-SA_GdG2N.js";import"./chat-draft-BS9tIUoh.js";import"./select-CbOgbS2d.js";import"./index-BdQq_4o_.js";import"./index-BlqL9SMO.js";import"./tabs-ygNtOTGD.js";import"./use-deco-credits-B2DLMpWA.js";import"./toggle-group-BoHp8d1Q.js";import"./use-open-billing-url-BlRE_825.js";import"./index-Ci7HVjCb.js";import"./checkbox-CS0Igoet.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DkyZyTLO.js";import"./drawer-CPnx75cL.js";import"./input-CY_xbCC1.js";import"./suggestion-BNgiJ1ZJ.js";import"./use-mcp-prompts-B4XQOyIC.js";import"./use-org-fs-CpG4Ftj0.js";import"./useInfiniteQuery-D602T7Oc.js";import"./infiniteQueryObserver-CXx-MaO_.js";import"./question-004-sINsf4GQ.js";import"./use-members-BppTtT4e.js";import"./use-org-auth-client-BpOVJa8q.js";import"./add-connection-dialog-B6QIFmOE.js";import"./collection-search-CTKjuIpa.js";import"./extract-connection-data-B8QJH0-o.js";import"./metadata-D72DunRR.js";import"./connection-CpR5iu5o.js";import"./url-slug-BF1zPW8D.js";import"./connection-card-HH41R-gb.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-B8zb5l7K.js";import"./textarea-Cz2yfMWd.js";import"./use-connection-Bjwl8al7.js";import"./connection-form-helpers-DmYbPB1E.js";import"./authenticate-and-persist-oauth-CbYI0Hyu.js";import"./mcp-oauth-B_CRpHbq.js";import"./mcp-oauth-B-d-VRg6.js";import"./collection-tabs-HaSRL7BY.js";import"./badge-8YPtojDh.js";import"./use-infinite-scroll-TxEXws4q.js";import"./useSuspenseInfiniteQuery-TMfZO9fH.js";import"./use-task-board-events-C6vPjypN.js";import"./pair-DikNYdKi.js";import"./collapsible-BeEr-w4N.js";import"./use-clock-tick-BMU-GnSw.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CHuB1ZI6.js";import"./types-DhTd2fZN.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CcUwyeyx.js";import"./use-navigate-to-agent-DbxbeXIC.js";import"./use-thread-outputs-DR80xdVS.js";import"./scroll-area-gEfzLhri.js";import"./calendar-NFkdhgk9.js";import"./rich-text-link-control-CrNCYAJu.js";import"./switch-BhazVYJL.js";import"./core.esm-C9y_2p9u.js";import"./sortable.esm-Djdx6Fqm.js";import"./view-mode-toggle-DpnRn8BO.js";import"./combobox-C6uurxAD.js";import"./alert-dialog-DaPrRw6H.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-tSXGNIP6.js";import"./use-debounced-value-BWgwAYQ4.js";import"./use-file-configs-BlVRbWGm.js";import"./asset-utils-BViQjnRQ.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-BCIWlbB2.js";import"./new-project-dialog-Civny35s.js";import"./required-auth-layout-CDnv3SsX.js";import"./use-org-sso-D2PH-QV7.js";import"./editor-yCqmKD--.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-DCX9XGmF.js";import"./resolve-tab-icon-BF6rqPgZ.js";const ba={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function xa(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ba:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ya=1e4,wa=1e3,ka=3e4;function Pa({iframeRef:t,src:e,active:n}){const r=v.useRef(0),i=v.useRef(null),u=v.useRef(null),l=v.useRef(e),c=v.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ya)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=jr(ka,wa,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const b=t.current,P=l.current;!b||!P||!c.current||(b.src=P,d())},j)},f=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return v.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:f,handleError:p}}const Sa=Et({tag:Ee(),id:Ee(),classes:Ee(),text:Ee(),html:Ee(),manifestKey:Ee().nullable(),componentName:Ee().nullable(),parents:Ee(),url:Ee(),path:Ee(),viewport:Et({width:Ye(),height:Ye()}),position:Et({x:Ye(),y:Ye()})}),Ea=`(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 ja(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,u=e.length;if(!i||!u)return n;const l=(p,j)=>{const b=t[r[p]??0];return!b||!b.length?1:b.indexOf(e[j]??"")>=0?2:0},c=[],o=[];for(let p=0;p<=i;p++)c.push(new Array(u+1).fill(0)),o.push(new Array(u+1).fill(2));for(let p=1;p<=i;p++){const j=c[p-1]??[],b=c[p]??[],P=o[p]??[];for(let g=1;g<=u;g++){let E=j[g]??0,N=2;const y=b[g-1]??0;y>E&&(E=y,N=0);const w=l(p-1,g-1),k=(j[g-1]??0)+w;w>0&&k>E&&(E=k,N=1),b[g]=E,P[g]=N}}let d=0,h=i,f=u;for(;h>0&&f>0;){const p=o[h]?.[f]??2;p===1?(n[r[h-1]??0]=f-1,d++,h--,f--):p===0?f--:h--}if(d===0&&u===i)for(let p=0;p<i;p++)n[r[p]??0]=p;return n}const Na=Et({sectionIndex:Ye(),manifestKey:Ee(),clickSeq:Ye()}),In=`(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 = ${ja.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 Zt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===Tr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Zt(o,e)??[])l.includes(d)||l.push(d)}return l}if(Cr(r)){const i=n.section&&typeof n.section=="object"?Zt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Je(t){return t.replace(/[`*_]/g,"\\$&")}function Ta(t,e){const n=[`The user selected an element on the live preview and asked: **"${Je(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Je(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Je(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Je(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Je(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Je(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
551
+ `)}function Ca(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),f=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:f/o*100}}function Ra(t){const e=fe.c(45),{element:n,onDismiss:r}=t,[i,u]=v.useState(""),l=v.useRef(null),{sendMessage:c}=or(),{openSidePanel:o}=aa(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const F=Ta(n,i);o(),c({parts:[{type:"text",text:F}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const f=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=Ca(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,b=`${j.leftPct}%`,P=`${j.topPct}%`;let g;e[9]!==b||e[10]!==P?(g={left:b,top:P,width:"320px"},e[9]=b,e[10]=P,e[11]=g):g=e[11];let E;e[12]!==f?(E=F=>{F.preventDefault(),f()},e[12]=f,e[13]=E):E=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=F=>u(F.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=F=>{F.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==d?(w=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let x;e[23]!==i?(x=i.trim(),e[23]=i,e[24]=x):x=e[24];const B=!x;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let I;e[27]!==d?(I=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=I):I=e[28];let $;e[29]!==I?($=s.jsx("title",{children:I}),e[29]=I,e[30]=$):$=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==$?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[$,M]}),e[32]=$,e[33]=L):L=e[33];let R;e[34]!==B||e[35]!==S||e[36]!==L?(R=s.jsx("button",{type:"submit",disabled:B,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=B,e[35]=S,e[36]=L,e[37]=R):R=e[37];let U;e[38]!==k||e[39]!==R||e[40]!==E?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:E,children:[k,R]}),e[38]=k,e[39]=R,e[40]=E,e[41]=U):U=e[41];let D;return e[42]!==U||e[43]!==g?(D=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:U}),e[42]=U,e[43]=g,e[44]=D):D=e[44],D}const Un="site-links",La=/details?page|\bpdp\b/i,Oa=/listingpage|\bplp\b/i;function _a(t,e,n){const r=new Set;for(const c of n)La.test(c)&&r.add("product"),Oa.test(c)&&r.add("category");const i=lt(sn(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Aa=["rosa","preto","pink","black"];function kt(t,e){const n=e.trim();return n?t(n):Aa.flatMap(r=>t(r))}function Ba(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const bs=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function on(t){return t.split("/")[0]??""}function Fa(t){const e=new Set;for(const n of t){const r=on(n);bs.has(r)&&e.add(r)}return e}function $a(t,e){const n=on(t);return!bs.has(n)||e.size===0?!0:e.has(n)}const Ma=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>kt(n=>Ba(t,n),e),optionsFromPayload:Pt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Pt},{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:Va}];function Da(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Ma){if(d.kind!==c)continue;const h=r.find(f=>d.test(f)&&$a(f,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(on(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ka(t.has("category")?"category":"product")),l}function Ka(t){return{kind:t,id:Un,resolveType:Un,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ya(e,n)}}function Ie(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function za(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Ie(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Ie(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function xs(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 ys(t){try{return decodeURIComponent(t)}catch{return t}}function Ia(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ia(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function ws(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=lt(sn(e)),{pattern:u,order:l}=Ua(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ys(d):null}function Pt(t,e){const n=Ie(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Ie(l);if(!c)continue;const o=ws(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Ie(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,f=Array.isArray(c.image)?Ie(c.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ha(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?ys(n):null}function Va(t){const e=[],n=new Set,r=(i,u)=>{const l=Ie(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Ha(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const qa=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 Wa(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Ga(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ja(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ya(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=ws(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&qa.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Wa(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ja(t))i(u,l,"product",c);for(const{href:u,text:l}of Ga(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function st(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ks=1e4;function Qa(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 Xa(t,{resolveType:e,props:n}){const r=await fetch($r(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ks)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Hn(t,e){const n=await fetch(Mr(t,e),{signal:AbortSignal.timeout(ks)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Za(t,e,n){const r=e.optionsFromPayload(await Hn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=$e(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Hn(t,u),n).filter(c=>c.kind==="product");return xs([r,l])}catch{return r}}function ei(t,e,n){return Xs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function ti(t,e,n,r){if(e.homepageLinks)return Za(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Xa(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return xs(l.map(c=>e.optionsFromPayload(c,r)))}function en(t,e,n,r,i){return{queryKey:ei(t,e,n),queryFn:()=>ti(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function rt(t){const e=fe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let f;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(f=p=>s.jsxs(ot,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(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(as,{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:$e(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=f):f=e[12],d=i.map(f),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(it,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function Vn(t){const e=fe.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 ni(t){const e=fe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=v.useState(!1),[f,p]=v.useState(""),[j,b]=v.useState(""),P=v.useRef(null),g=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,E=Qa(o),y=[...new Set(n.map(K=>E[K.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,x={template:r,paramName:i};let B;e[3]!==f?(B=(K,C)=>({source:K,query:C,options:K.clientFilter?st(C.data??[],f):C.data??[]}),e[3]=f,e[4]=B):B=e[4];const S=B,I=n.filter(di),$=n.filter(ci),M=Xt({queries:I.map(K=>en(l,K,j,x,d))});let L;e[5]!==M||e[6]!==S?(L=(K,C)=>S(K,M[C]),e[5]=M,e[6]=S,e[7]=L):L=e[7];const R=I.map(L),U=R.length===0||R.every(li),D=Xt({queries:$.map(K=>en(l,K,j,x,d&&U))});let F;e[8]!==D||e[9]!==S?(F=(K,C)=>S(K,D[C]),e[8]=D,e[9]=S,e[10]=F):F=e[10];const H=$.map(F),W=U?H:R,V=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,O=V&&!V.query.isLoading&&!V.query.isError?V?.query.data??[]:[],ne=st(O.filter(oi),f),q=st(O.filter(ii),f),G=ne.length>0&&q.length>0,Q=K=>{h(K),P.current&&clearTimeout(P.current),p(K?u:""),b(K?u:"")};let Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=K=>{p(K),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{b(K)},300)},e[11]=Y):Y=e[11];const te=Y,ae=K=>{c(K),Q(!1)},X=us(f),J=$e(r,{[i]:X}),se=Zn,ve=Xn,pe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=ai;let ie;e[12]!==g||e[13]!==o?(ie=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=o,e[14]=ie):ie=e[14];let ue;e[15]!==ie?(ue=s.jsx(es,{className:"sr-only",children:s.jsx(ts,{children:ie})}),e[15]=ie,e[16]=ue):ue=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(as,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==o?(Z=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=Z):Z=e[19];let oe;e[20]!==g?(oe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=oe):oe=e[21];let he;e[22]!==Z||e[23]!==oe?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",oe]})]}),e[22]=Z,e[23]=oe,e[24]=he):he=e[24];const ge=os,Me=!1,Le="min-h-0 flex-1";let Oe;e[25]!==k||e[26]!==f?(Oe=s.jsx(ls,{autoFocus:!0,placeholder:k,value:f,onValueChange:te}),e[25]=k,e[26]=f,e[27]=Oe):Oe=e[27];const He=is,xe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ye;e[28]!==o?(ye=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=ye):ye=e[29];let je;e[30]!==ye?(je=s.jsx(cs,{children:ye}),e[30]=ye,e[31]=je):je=e[31];const De=X&&s.jsx(it,{className:"shrink-0",children:s.jsxs(ot,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>ae(X),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(oa,{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:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:J})]})]})}),_e=G?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(rt,{heading:E.category.heading,iconKind:"category",options:ne,template:r,paramName:i,keyPrefix:`${V?.source.id}:cat`,onSelect:ae})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:q,template:r,paramName:i,keyPrefix:`${V?.source.id}:prod`,onSelect:ae})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(K=>{const{source:C,query:me,options:Be}=K,{noun:Tt}=E[C.kind];if(me.isLoading)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.loading",{noun:Tt})},C.id);if(me.isError)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},C.id);if(C.homepageLinks){const Qe=me.data??[];return s.jsxs(v.Fragment,{children:[s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:st(Qe.filter(ri),f),template:r,paramName:i,keyPrefix:`${C.id}:cat`,onSelect:ae}),s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:st(Qe.filter(si),f),template:r,paramName:i,keyPrefix:`${C.id}:prod`,onSelect:ae})]},C.id)}return s.jsx(rt,{heading:W.length>1?E[C.kind].heading:void 0,iconKind:C.kind,options:Be,template:r,paramName:i,keyPrefix:C.id,onSelect:ae},C.id)})});let Ae;e[32]!==He||e[33]!==je||e[34]!==De||e[35]!==_e?(Ae=s.jsxs(He,{className:xe,children:[je,De,_e]}),e[32]=He,e[33]=je,e[34]=De,e[35]=_e,e[36]=Ae):Ae=e[36];let we;e[37]!==ge||e[38]!==Oe||e[39]!==Ae?(we=s.jsxs(ge,{shouldFilter:Me,className:Le,children:[Oe,Ae]}),e[37]=ge,e[38]=Oe,e[39]=Ae,e[40]=we):we=e[40];let Ce;e[41]!==ve||e[42]!==ue||e[43]!==he||e[44]!==we||e[45]!==de?(Ce=s.jsxs(ve,{className:pe,onClick:de,children:[ue,he,we]}),e[41]=ve,e[42]=ue,e[43]=he,e[44]=we,e[45]=de,e[46]=Ce):Ce=e[46];let Ke;return e[47]!==se||e[48]!==Q||e[49]!==d||e[50]!==Ce?(Ke=s.jsx(se,{open:d,onOpenChange:Q,children:Ce}),e[47]=se,e[48]=Q,e[49]=d,e[50]=Ce,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:K=>{K.stopPropagation(),Q(!0)},children:u||g}),Ke]})}function si(t){return t.kind==="product"}function ri(t){return t.kind!=="product"}function ai(t){return t.stopPropagation()}function ii(t){return t.kind==="product"}function oi(t){return t.kind!=="product"}function li(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ci(t){return t.isFallback}function di(t){return!t.isFallback}function ui(t){const e=fe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},b=n.filter(mi);o=Xt,c=b.map(P=>en(u,P,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[f,p]=v.useState(!1);if(!f)for(const j of h){if(j.isLoading)break;const b=j.data?.[0];if(b){p(!0),queueMicrotask(()=>l(b.value));break}}return null}function mi(t){return!t.isFallback}function fi(t){const e=fe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=v.useState(r),[o,d]=v.useState(!1),h=v.useRef(!1);let f;e[0]!==n||e[1]!==u?(f=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=f):f=e[2];const p=f,j=l||p;let b;e[3]!==j?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=b):b=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let g,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>c(S.target.value),E=()=>d(!0),e[8]=g,e[9]=E):(g=e[8],E=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=us(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==l||e[17]!==p||e[18]!==P||e[19]!==N||e[20]!==y?(w=s.jsx("input",{type:"text",value:l,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:pi,onChange:g,onFocus:E,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=P,e[19]=N,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==b||e[23]!==w?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,w]}),e[22]=b,e[23]=w,e[24]=k):k=e[24];let x;e[25]!==o||e[26]!==u?(x=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(ur,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=x):x=e[27];let B;return e[28]!==x||e[29]!==k?(B=s.jsxs(s.Fragment,{children:[k,x]}),e[28]=x,e[29]=k,e[30]=B):B=e[30],B}function pi(t){return t.stopPropagation()}function hi(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 gi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function vi(t){const e=fe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=fs(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Dr(l),h=o?{...o,name:l,path:c}:Kr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Zs(i)}function bi(t){const e=fe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[f,p]=v.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[b,P]=v.useState(j),[g,E]=v.useState(Gt),[N,y]=v.useState(null),[w,k]=v.useState(n);n!==w&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),P(d("sectionsEditor.createPageModal.defaultPagePath")),E(Gt),y(null)));const x=!!l?.length;let B;e[4]!==o||e[5]!==r?(B=Z=>{!Z&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=B):B=e[6];const S=B;let I;e[7]!==o||e[8]!==f||e[9]!==c||e[10]!==b||e[11]!==x||e[12]!==g?(I=async Z=>{Z.preventDefault();const oe=f.trim(),he=b.trim();if(!oe||!he||o)return;const ge=ms(he);if(ge){y(ge);return}y(null),await c({name:oe,path:he,templateKey:x&&g!==Gt?g:null})},e[7]=o,e[8]=f,e[9]=c,e[10]=b,e[11]=x,e[12]=g,e[13]=I):I=e[13];const $=I,M=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let R;e[16]!==L?(R=s.jsx(es,{children:s.jsx(ts,{children:L})}),e[16]=L,e[17]=R):R=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let D;e[20]!==U?(D=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=D):D=e[21];let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=Z=>p(Z.target.value),e[22]=F):F=e[22];let H;e[23]!==d?(H=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=H):H=e[24];let W;e[25]!==o||e[26]!==f||e[27]!==H?(W=s.jsx(Rn,{id:"new-page-name",value:f,onChange:F,placeholder:H,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=H,e[28]=W):W=e[28];let V;e[29]!==W||e[30]!==D?(V=s.jsxs("div",{className:"space-y-1.5",children:[D,W]}),e[29]=W,e[30]=D,e[31]=V):V=e[31];let ee;e[32]!==d?(ee=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:ee}),e[34]=ee,e[35]=O):O=e[35];let ne;e[36]===Symbol.for("react.memo_cache_sentinel")?(ne=Z=>P(Z.target.value),e[36]=ne):ne=e[36];let q;e[37]!==d?(q=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=q):q=e[38];let G;e[39]!==o||e[40]!==b||e[41]!==q?(G=s.jsx(Rn,{id:"new-page-path",value:b,onChange:ne,placeholder:q,disabled:o}),e[39]=o,e[40]=b,e[41]=q,e[42]=G):G=e[42];let Q;e[43]!==O||e[44]!==G?(Q=s.jsxs("div",{className:"space-y-1.5",children:[O,G]}),e[43]=O,e[44]=G,e[45]=Q):Q=e[45];let Y;e[46]!==o||e[47]!==x||e[48]!==d||e[49]!==g||e[50]!==l?(Y=x&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(zr,{id:"new-page-template",value:g,onChange:E,templates:l??[],disabled:o})]}),e[46]=o,e[47]=x,e[48]=d,e[49]=g,e[50]=l,e[51]=Y):Y=e[51];let te;e[52]!==M?(te=M&&s.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=te):te=e[53];let ae;e[54]!==V||e[55]!==Q||e[56]!==Y||e[57]!==te?(ae=s.jsxs("div",{className:"space-y-4 py-4",children:[V,Q,Y,te]}),e[54]=V,e[55]=Q,e[56]=Y,e[57]=te,e[58]=ae):ae=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let J;e[61]!==d?(J=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=J):J=e[62];let se;e[63]!==o||e[64]!==X||e[65]!==J?(se=s.jsx(Ue,{type:"button",variant:"outline",onClick:X,disabled:o,children:J}),e[63]=o,e[64]=X,e[65]=J,e[66]=se):se=e[66];let ve;e[67]!==o||e[68]!==f||e[69]!==b?(ve=!f.trim()||!b.trim()||o,e[67]=o,e[68]=f,e[69]=b,e[70]=ve):ve=e[70];let pe;e[71]!==o||e[72]!==d?(pe=o?s.jsxs(s.Fragment,{children:[s.jsx(jt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=pe):pe=e[73];let de;e[74]!==ve||e[75]!==pe?(de=s.jsx(Ue,{type:"submit",disabled:ve,children:pe}),e[74]=ve,e[75]=pe,e[76]=de):de=e[76];let ie;e[77]!==se||e[78]!==de?(ie=s.jsxs(er,{children:[se,de]}),e[77]=se,e[78]=de,e[79]=ie):ie=e[79];let ue;e[80]!==$||e[81]!==ae||e[82]!==ie||e[83]!==R?(ue=s.jsx(Xn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:$,children:[R,ae,ie]})}),e[80]=$,e[81]=ae,e[82]=ie,e[83]=R,e[84]=ue):ue=e[84];let be;return e[85]!==S||e[86]!==n||e[87]!==ue?(be=s.jsx(Zn,{open:n,onOpenChange:S,children:ue}),e[85]=S,e[86]=n,e[87]=ue,e[88]=be):be=e[88],be}function xi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const f=fs(h);let p;e[4]!==f?(p=Hr((k,x)=>f.mutate({blockKey:k,data:x})),e[4]=f,e[5]=p):p=e[5];const j=p;let b;e[6]!==o||e[7]!==c?(b=Ir(c,o),e[6]=o,e[7]=c,e[8]=b):b=e[8];const{resolveType:P,props:g,title:E}=b;if(!P){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let x;return e[11]!==k?(x=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=x):x=e[12],x}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==E?(y={mode:"saved",blockKey:o,resolveType:P,title:E},e[13]=o,e[14]=P,e[15]=E,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==f.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(w=s.jsx(Ur,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:g,isCreating:f.isPending,onCreate:yi,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=g,e[23]=f.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function yi(){}function wi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function qn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:wi(t.error)}}function ki(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 Pi(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=ki(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 Si="https://github.com/decocms/blocks";function Ei(){const t=fe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(mr,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ns,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(Ue,{size:"sm",asChild:!0,children:s.jsxs("a",{href:Si,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(an,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function ji(t){const e=fe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(la,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(Ue,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let f;return e[11]!==l||e[12]!==o||e[13]!==h?(f=s.jsx(an,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=f):f=e[14],f}const Ni=v.lazy(()=>tr(()=>import("./sections-editor-CBUhadYU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162])).then(t=>({default:t.SectionsEditor})));function Wn(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=tn(),{currentBranch:c,taskId:o}=Nt(),d=gs(),h=nn(),f=vs(),p=d.lifecycle.phase==="running",j=h.previewUrl;let b;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(b=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=b):b=e[5];const P=b;let g;e[6]!==p?(g={fetchEnabled:p},e[6]=p,e[7]=g):g=e[7];const E=rn(P,g);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=ps(P,N),w=Pi({lifecyclePhase:d.lifecycle.phase,decofile:qn(E),meta:qn(y),hasEditableContent:Rr(E.data,y.data),fastPreviewActive:ds(n).runtime==="cms"}),k=Ti;if(w.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(nr,{})),e[10]=O):O=e[10],O}if(w.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(Ei,{})),e[11]=O):O=e[11],O}if(w.kind==="error"){let O;e[12]!==E||e[13]!==h||e[14]!==y||e[15]!==w.source?(O=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([E.refetch(),y.refetch()])},e[12]=E,e[13]=h,e[14]=y,e[15]=w.source,e[16]=O):O=e[16];const ne=O;let q;return e[17]!==ne||e[18]!==w.source?(q=k(s.jsx(ji,{source:w.source,onRetry:ne})),e[17]=ne,e[18]=w.source,e[19]=q):q=e[19],q}let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=O=>k(s.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=x):x=e[20];const B=x,S=f.state.target;if(S?.kind==="loader"&&E.data&&y.data){const O=c??"",ne=j??null;let q;return e[21]!==E.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==O||e[25]!==ne||e[26]!==S.key||e[27]!==n?(q=B(s.jsx(xi,{orgSlug:l.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:E.data,blockKey:S.key})),e[21]=E.data,e[22]=y.data,e[23]=l.slug,e[24]=O,e[25]=ne,e[26]=S.key,e[27]=n,e[28]=q):q=e[28],q}let I;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(I=S||!c?null:ss(rs(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=I):I=e[33];const $=I;let M="/",L=null,R=null;S?.kind==="page"?(M=S.path,L=S.key):S?.kind==="section"?R=S.key:$&&(M=$.path,L=$.pageKey);const U=L?`page:${L}`:R?`section:${R}`:`path:${M}`;let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}),e[34]=D):D=e[34];const F=c??"",H=j??void 0,W=R?null:u,V=!!L&&f.state.editSeoPageKey===L;let ee;return e[35]!==R||e[36]!==L||e[37]!==M||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==W||e[42]!==V||e[43]!==F||e[44]!==H||e[45]!==n||e[46]!==f.consumeEditSeo||e[47]!==f.setFocusedBlock||e[48]!==f.setVariantOverride?(ee=B(s.jsx(v.Suspense,{fallback:D,children:s.jsx(Ni,{orgSlug:l.slug,virtualMcpId:n,branch:F,previewReady:!0,previewUrl:H,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:R,externalSelection:W,initialEditSeo:V,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=R,e[36]=L,e[37]=M,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=W,e[42]=V,e[43]=F,e[44]=H,e[45]=n,e[46]=f.consumeEditSeo,e[47]=f.setFocusedBlock,e[48]=f.setVariantOverride,e[49]=ee):ee=e[49],ee}function Ti(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Gn(t){const e=fe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=da(),o=Vr(n);let d;e[0]!==o||e[1]!==r?(d=qr(o,ua(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:f}=tn(),{currentBranch:p,taskId:j}=Nt(),P=nn().previewUrl;let g;e[3]!==p||e[4]!==f.slug||e[5]!==P||e[6]!==j||e[7]!==n?(g=p?{orgSlug:f.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:P}:null,e[3]=p,e[4]=f.slug,e[5]=P,e[6]=j,e[7]=n,e[8]=g):g=e[8];const N=rn(g),y=p??"";let w;e[9]!==f.slug||e[10]!==y||e[11]!==n?(w={orgSlug:f.slug,virtualMcpId:n,branch:y},e[9]=f.slug,e[10]=y,e[11]=n,e[12]=w):w=e[12];const{save:k,flush:x}=Wr(w),B=N.data?.[r],S=N.data===void 0&&N.isLoading,I=N.data!==void 0&&B===void 0,$=!p||I||S;let M;e[13]!==B?(M=B===void 0?"":JSON.stringify(B,null,2),e[13]=B,e[14]=M):M=e[14];const L=M;let R;e[15]!==r||e[16]!==$||e[17]!==k?(R=V=>{if($)return;let ee;try{ee=JSON.parse(V)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||k(r,ee)},e[15]=r,e[16]=$,e[17]=k,e[18]=R):R=e[18];const U=R;let D;e[19]!==x?(D=()=>({flush:x}),e[19]=x,e[20]=D):D=e[20],v.useImperativeHandle(u,D);let F;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?(F=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):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:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(Ue,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(sr,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=F):F=e[25];let H;e[26]!==N.data||e[27]!==x||e[28]!==L||e[29]!==S||e[30]!==I||e[31]!==r||e[32]!==$||e[33]!==U||e[34]!==l?(H=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}):I?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ca,{code:L,language:"json",readOnly:$,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),x()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=x,e[28]=L,e[29]=S,e[30]=I,e[31]=r,e[32]=$,e[33]=U,e[34]=l,e[35]=H):H=e[35];let W;return e[36]!==F||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[F,H]}),e[36]=F,e[37]=H,e[38]=W):W=e[38],W}function Ps(t){return t.contentEditingEnabled&&!t.isMobile}function Ci(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Ri(t,e){return t==="blocks"?"preview":e?"blocks":t}function Li(t){return Ps({contentEditingEnabled:hs(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Oi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const _i=15e3;function Ai(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 Jn(t){return t.loading?{...t,loading:!1}:t}const Bi=500,Fi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Yn=1,St=["desktop","mobile","tablet"],$i=["preview","visual","blocks"],Qn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Mi(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 at(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Qt(t,e){try{return new URL(t,e).href}catch{return null}}function Di(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 Ki(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function zi(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ii(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ui({virtualMcpId:t}){const e=Te(),n=Fr(),{currentBranch:r,taskId:i,virtualMcpId:u}=Nt(),l=vs(),c=Sr(u===t?t:null),o=ds(t),d=ma(c?.metadata?.ui?.layout??null),h=hs(d),f=Ps({contentEditingEnabled:h,isMobile:n}),[p]=v.useState(()=>Li({cmsMode:d,isMobile:n})),[j,b]=Ln(On.previewEditingMode(t),a=>a&&$i.includes(a)?a:null),P=j??p,[g,E]=Ln(On.previewDeviceSize(t),a=>a&&St.includes(a)?a:"desktop"),[N,y]=v.useState(null),[w,k]=v.useState(null),x=v.useRef(null),B=v.useRef(null),[S,I]=v.useState(!1),$=v.useRef(null),M=()=>{$.current?.flush(),I(!1)},L=()=>I(a=>(a&&$.current?.flush(),!a)),[R,U]=v.useState({width:0,height:0}),[D,F]=v.useState(!1),[H,W]=v.useState(""),V=v.useRef(null),[ee,O]=v.useState(!1),[ne,q]=v.useState(),[G,Q]=v.useState(null),[Y,te]=v.useState(null),[ae,X]=v.useState(null),[J,se]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[ve,pe]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[de,ie]=v.useState({}),[ue,be]=v.useState(!1),Z=v.useRef(null),oe=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},he=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:ge}=tn(),Me=gs(),Le=nn(),Oe=Le.vmEntry,He=Me.lifecycle.phase,{url:xe}=Lr(t),ye=xe??Le.previewUrl,je=!!xe||He==="running",De=c?.id===t?Nr(c.metadata):null,_e=!xe&&c?.id===t&&o.runtime==="cms",Ae=o.projectDefault==="cms",we=Zr({sandboxUrl:ye,previewServerUrl:De,fastPreviewActive:_e}),Ce=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:ye}:null,Ke=rn(Ce,{fetchEnabled:je}),K=ps(Ce,{fetchEnabled:je}),C=Ke.data,me=K.data,Be=C?Or(C).sort((a,m)=>a.name.localeCompare(m.name)):[],Tt=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r}:null,Qe=vi(Tt),Ct=C&&me?_r(C,me):[],ln=C&&me?Gr(me,C,"loaders"):[],cn=H?(()=>{const a=H.toLowerCase();return Be.map(m=>({page:m,score:zi(m.name,m.path,a)})).filter(({score:m})=>m>0).sort((m,T)=>T.score-m.score||m.page.path.length-T.page.path.length).map(({page:m})=>m)})():Be,dn=Ct.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.name.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),un=f?ln:[],mn=un.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.title.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),ct=Y?ln.find(a=>a.key===Y)??null:null,Ne=sn,Rt=G||Y?null:Ar(Be,J,ve),z=Rt?.key??null,Ve=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??z,dt=Rt?.path??null,qe=(z?de[z]:void 0)??{},ke=$e(J,qe),Lt={};if(je&&ye&&me&&C){const a=Jr(me,"loaders"),m=z?C[z]:void 0,T=za(m,C,re=>a.has(re)),A=Fa(T);for(const re of lt(J)){if(re.type!=="param")continue;const Re=_a(J,re.name,T),Se=Da(Re,a,A);Se.length>0&&(Lt[re.name]=Se)}}const ut=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,fn=C&&z?Br(C,z,0):[],pn=C?Yr(fn,C):[],Ot=pn.map(a=>a.isSavedBlock?a.label:""),_t=pn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),At=fn.map(a=>Zt(a,C??{})),hn=v.useRef(null),Pe=v.useRef(null),Ss=Me.status.state==="paused",Bt=Me.phase,gn=Qr({claimPhase:Bt,lifecycle:Me.lifecycle}),ze=Le.previewState,Es=Le.userStopped,js=ra(ge.slug,t??"",r??""),{url:Fe}=sa(_e&&t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,previewServerUrl:De??null,path:ke}:null),Ns=Ae&&o.runtime==="sandbox",_=xa({previewState:ze,progressStatus:gn.status,previewServerUrl:De,fastPreviewActive:_e,fastPreviewReady:!!Fe,codingSession:Ns,localPreviewUrl:xe}),mt=_.mode!=="none",Ts=_.mode==="production"&&_.iframeBase?at(_.iframeBase):null,We=_.mode==="production"?Ts:at(ye),Cs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Xe=xe?_.mode==="sandbox"&&f&&P==="blocks":_.mode==="production"&&_e&&Cs&&f&&P==="blocks",vn=v.useRef(null),{pin:Rs,effective:Ls}=Di(vn.current,{inPlaceRenderActive:Xe,draftPreviewUrl:Fe,resolvedPath:ke});vn.current=Rs;const Ge=Mi(_.mode==="sandbox"?yt(Mn(ae??Qt(ke,_.iframeBase)??_.iframeBase,g),l.state.variantOverride??[]):_.mode==="production"?yt(Mn(ea(ae??Ls??Qt(ke,_.iframeBase)??_.iframeBase,_.showWakingPill?ta:null),g),l.state.variantOverride??[]):null),bn=Fe??(_.iframeBase?Qt(ke,_.iframeBase):null),Os=_.mode==="production"?bn?yt(bn,l.state.variantOverride??[]):null:Ge??_.iframeBase,_s=()=>{const a=Os;a&&window.open(a,"_blank","noopener")},Ze=t&&r?rs(ge.slug,t,r):null,et=a=>{Ze&&cr(Ze,a)},le=l.state.target;v.useEffect(()=>{if(!(!le||!we||!me))if(le.kind==="page"){const a=de[le.key]??{};Pe.current=$e(le.path,a),Q(null),te(null),X(null),pe(le.key),se(le.path),et({path:le.path,pageKey:le.key,params:a})}else if(le.kind==="loader")Pe.current=null,Q(null),te(le.key),X(null);else{const a=Ct.find(m=>m.key===le.key);if(a){Pe.current=null;const m=Fn(me);te(null),Q(a),X($n(we,m,a.key))}}},[le,we,me,de]),v.useEffect(()=>{!z||dt===null||le?.kind==="page"&&le.key===z&&le.path===dt||l.selectTarget({kind:"page",key:z,path:dt})},[z,dt,le]);const[xn,As]=v.useState(null);if(ze.kind==="iframe"&&xn!==ze.previewUrl){const a=xn!==null;As(ze.previewUrl);const m=Ze?ss(Ze):null;if(m){if(Pe.current=$e(m.path,m.params),se(m.path),pe(m.pageKey),X(null),Q(null),te(null),m.pageKey&&Object.keys(m.params).length>0){const T=m.pageKey;ie(A=>({...A,[T]:m.params}))}}else a&&(Pe.current=null,se("/"),X(null),pe(null),Q(null),te(null))}hn.current=Ge;const Bs=_.mode==="production"&&!!Fe&&!xe,[yn,Ft]=v.useState({src:Ge??void 0,loading:!1}),ft=Ai(yn,Ge??void 0,Bs);ft!==yn&&Ft(ft);const tt=ft.src,wn=ft.loading,kn=Pa({iframeRef:x,src:_.mode==="sandbox"?Ge:null,active:_.mode==="sandbox"}),Pn=v.useRef(null);v.useEffect(()=>{const a=wn?setTimeout(()=>Ft(Jn),_i):null,m=()=>{a&&clearTimeout(a)};if(!Fe||!tt||Pn.current===Fe)return m;Pn.current=Fe;const T=x.current;return T&&T.getAttribute("src")!==tt&&(oe(),T.src=tt),m},[Fe,tt,wn]);const Sn=()=>{const a=x.current?.contentWindow,m=We;if(!a||!m||!C||!z)return;const T=C[z];if(!T||typeof T!="object")return;const A=na({previewBaseUrl:m,pageBlock:T,decofile:C,path:ke,pathTemplate:J});if(!A)return;const re=yt(A.src,Xr(l.state.variantOverride??[],z));a.postMessage({type:"cms-editor::render",src:re,body:A.body},m)},$t=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){$t.current=null;return}const a={nav:JSON.stringify({page:z,path:ke,pathTemplate:J}),content:JSON.stringify(C)},m=Ki($t.current,a);$t.current=a,m&&Sn()},[C,Xe,G,Y,z,ke,J]);const Mt=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){Mt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Mt.current;Mt.current={page:z,sig:a},!(!m||m.page!==z||m.sig===a)&&Sn()},[l.state.variantOverride,Xe,G,Y,z]);const Fs=!!t&&!!r&&!Me.notFound&&!Es&&!Ss&&(Bt?.kind==="ready"||He!=="idle"),ce=Oi({editingMode:P,sandboxDisplay:_.mode==="sandbox",blocksEditingEnabled:f});v.useEffect(()=>{const a=We;if(!a)return;const m=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=Sa.safeParse(T.data.payload);A.success&&y(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=Na.safeParse(T.data.payload);A.success&&k({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?oe():T.data?.type==="cms-editor::render-end"?(he(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},a)):T.data?.type==="cms-editor::render-error"&&he()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[We,Ot,_t,At]);const En=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::activate",script:Ea},m)},$s=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Dt=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage(_.mode==="production"||xe?{type:"editor::inject",args:{script:In}}:{type:"visual-editor::activate",script:In},m),a.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},m))},Ms=()=>{const a=x.current?.contentWindow,m=We;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},Ds=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},pt=a=>{if(a==="blocks"&&!f)return;const m=P;!n&&a!==m&&(a==="blocks"?B.current?.resize("30%"):B.current?.collapse()),b(a),y(null),k(null),a!=="blocks"&&te(null),m==="visual"&&$s(),a==="visual"&&En(),m==="blocks"&&a!=="blocks"&&Ms(),a==="blocks"&&Dt()},Ks=()=>{pt(Ci(P,f))},zs=()=>{pt(Ri(P,f))};ia(()=>{const a=x.current;if(!a)return;oe();const m=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ii(a,hn.current);let A;const re=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const Re=document.activeElement;(!Re||Re===document.body||Re===a)&&m?.focus(),a.removeEventListener("load",re)};a.addEventListener("load",re),A=setTimeout(re,3e3)});const Is=()=>{const a=St.indexOf(g);E(St[(a+1)%St.length])},Kt=(a,m)=>{if(!z)return;const T=z,A={...qe,[a]:m};Pe.current=$e(J,A),ie(re=>({...re,[T]:A})),et({path:J,pageKey:T,params:A})},Us=hi({iframeBase:_.iframeBase,resolvedPath:ke,activeGlobalSectionName:G?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),jn=a=>{const m=de[a.key]??{},T=$e(a.path,m);(G||Ne(T)!==Ne(ke))&&oe(),Pe.current=T,Q(null),te(null),X(null),k(null),pe(a.key),se(a.path),et({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})};lr(Ze,a=>{(G||Ne(a)!==Ne(ke))&&oe(),Pe.current=a,Q(null),te(null),X(null),k(null),pe(null),se(a),et({path:a,pageKey:null,params:{}})});const Hs=a=>{if(!we||!me){An.error(e("sandbox.preview.previewMetadataNotReady"));return}oe(),Pe.current=null;const m=Fn(me),T=$n(we,m,a.key);Q(a),te(null),X(T),k(null),l.selectTarget({kind:"section",key:a.key})},Vs=a=>{f&&(Q(null),te(a.key),X(null),pt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},qs=async({name:a,path:m,templateKey:T})=>{if(!t||!r)return;const A=ms(m);if(A){q(A);return}const re=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Be.some(Se=>Ne(Se.path)===Ne(re))){q(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Re;if(T&&(Re=C?.[T],!Re)){q(e("sandbox.preview.templateNoLongerExists"));return}q(void 0);try{const Se=await Qe.mutateAsync({name:a,path:re,template:Re});O(!1),An.success(e("sandbox.preview.pageCreated",{name:a})),await fa(Bi),jn({key:Se.key,name:Se.name,path:Se.path}),pt("blocks")}catch(Se){q(Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},ht=mt&&(Fs||_.mode==="production"),Ws=gi({showPreviewToolbar:ht,contentEditingEnabled:h}),gt=()=>{F(!1),W("")},zt=G?.name??ct?.title??Rt?.name,It=Ke.isPending||K.isPending,Ut=It?at(_.iframeBase):zt,vt=G?`section:${G.key}`:Y?`loader:${Y}`:z?`page:${z}`:void 0,Gs=ht?Ws?s.jsxs(wr,{open:D,onOpenChange:a=>{F(a),a||W("")},children:[s.jsx(kr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:It?Ut??void 0:G||ct?zt:[zt,J].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[G&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(fr,{size:11}),e("sandbox.preview.globalBadge")]}),ct&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(pr,{size:11}),e("sandbox.preview.loaderBadge")]}),Ut&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Ut}),!It&&!G&&!ct&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:J}),s.jsx(dr,{size:12,className:Ht("shrink-0 transition-transform",D&&"rotate-180")})]})})}),s.jsxs(Pr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(os,{shouldFilter:!1,defaultValue:vt,children:[s.jsx(ls,{value:H,onValueChange:a=>{W(a),V.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(is,{ref:V,className:"max-h-80",children:[s.jsx(cs,{children:Be.length===0&&Ct.length===0&&un.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),cn.length>0&&s.jsx(it,{children:cn.map(a=>s.jsxs(ot,{value:`page:${a.key}`,"aria-current":vt===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{gt(),jn(a)},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:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),dn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalComponents"),children:dn.map(a=>s.jsx(ot,{value:`section:${a.key}`,"aria-current":vt===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Hs(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),mn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalLoaders"),children:mn.map(a=>s.jsx(ot,{value:`loader:${a.key}`,"aria-current":vt===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Vs(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!G&&!Y&&lt(J).some(a=>a.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:lt(J).map((a,m)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${m}`);const T=Lt[a.name];return T&&ut?s.jsx(ni,{sources:T,template:J,paramName:a.name,value:qe[a.name]??"",sandboxRef:ut,onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`):s.jsx(fi,{name:a.name,value:qe[a.name]??"",onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Ue,{variant:"ghost",className:"w-full justify-start",onClick:()=>{gt(),q(void 0),O(!0)},children:[s.jsx(yr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Us}):null,Nn=ht||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:Is,"aria-label":e(Qn[g]),children:g==="mobile"?s.jsx(hr,{size:16}):g==="tablet"?s.jsx(gr,{size:16}):s.jsx(vr,{size:16})})}),s.jsx(Wt,{children:e(Qn[g])})]}),Gs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(nt,{onClick:_s,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(ns,{size:16})})})]}):null,Js=_.mode==="sandbox",bt=Fi[g],xt=g==="desktop"&&(R.width===0||R.width>=bt.width+2*Yn),Tn=xt?1:Math.min(R.width>0?R.width/(bt.width+2*Yn):1,1),Ys=xt?{width:"100%",height:"100%"}:{width:`${bt.width}px`,height:R.height>0?`${R.height/Tn}px`:`${bt.height}px`,transform:`scale(${Tn})`,transformOrigin:"top center"},Cn=s.jsxs(s.Fragment,{children:[Js&&(ht||h)&&s.jsx(nt,{onClick:Ks,"aria-pressed":ce==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ce==="visual",children:s.jsx(Bn,{size:16})}),f&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:zs,"aria-pressed":ce==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ce==="blocks",children:s.jsx(xr,{size:16})})}),s.jsx(Wt,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:L,"aria-pressed":S,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:S,children:s.jsx(br,{size:16})})}),s.jsx(Wt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Qs=!!Y&&ce==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[ut&&Object.entries(Lt).map(([a,m])=>(qe[a]??"")===""?s.jsx(ui,{sources:m,template:J,paramName:a,sandboxRef:ut,onFill:T=>Kt(a,T)},`${z}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(_n.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Nn}),children:Nn}),s.jsx(_n.Toolbar.Right.Portal,{fallback:Cn,children:Cn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Qs?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L}),S&&Ve&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]}):s.jsxs(Dn,{orientation:"horizontal",disabled:ce!=="blocks",className:"relative isolate",children:[s.jsx(wt,{ref:B,id:"preview-blocks-editor",defaultSize:ce==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ce==="blocks"&&s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L})}),ce==="blocks"&&s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-canvas",defaultSize:ce==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Dn,{orientation:"horizontal",disabled:!(S&&Ve),children:[s.jsx(wt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const m=()=>U(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});m();const T=new ResizeObserver(m);return T.observe(a),()=>T.disconnect()},className:Ht("h-full relative overflow-clip flex justify-center",mt&&!xt&&"bg-muted/30"),children:[(ue||js)&&mt&&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"})}),_.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"starting",progress:gn,claimPhase:Bt})}),!xe&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"suspended",onResume:Le.resume})}),!xe&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"errored",error:ze.error,onRetry:Le.retry,connectionsHref:`/${ge.slug}/settings/connections`})}),_.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(jt,{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")})]})]}),ce==="visual"&&!N&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Bn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ce==="visual"&&N&&s.jsx(Ra,{element:N,onDismiss:()=>y(null)}),mt&&Ge&&s.jsx("div",{className:Ht("shrink-0",!xt&&"border-x border-border bg-background shadow-sm"),style:Ys,onMouseLeave:Ds,children:s.jsx("iframe",{ref:x,src:tt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:kn.handleError,onLoad:()=>{if(Ft(Jn),kn.handleLoad(),he(),_.mode!=="sandbox"||xe){(_.mode==="production"&&!_.showWakingPill||xe)&&ce==="blocks"&&Dt();return}if(rr("vm_preview_loaded",{view_mode:ce,vm_id:Oe?.sandboxHandle??null}),!G)try{const a=x.current?.contentWindow?.location?.pathname;if(!a)return;const m=Pe.current;if(m!==null&&(Pe.current=null,Ne(a)!==Ne(m))||Ne(a)===Ne(ke))return;se(a),et({path:a,pageKey:ve,params:qe})}catch{}ce==="visual"&&En(),ce==="blocks"&&Dt()}},_.iframeBase)})]})}),S&&Ve&&s.jsxs(s.Fragment,{children:[s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]})]})})]})}),s.jsx(bi,{open:ee,onOpenChange:O,isPending:Qe.isPending,error:ne,templates:Be,onSubmit:qs})]})}function Hi(t){const e=fe.c(22),{virtualMcpId:n}=t,r=Te(),i=Er(n),{activeTask:u,taskId:l,currentBranch:c}=Nt(),o=ga(l),[d,h]=v.useState(!1);if(ha({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Yt(i?.metadata),threadHasRepo:Yt(o)||Yt(u?.metadata)})==="none"){let j;e[0]===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(zn,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let b;e[1]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=b):b=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let g,E;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!0),E=s.jsx(zn,{className:"size-4"}),e[5]=g,e[6]=E):(g=e[5],E=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(Ue,{onClick:g,children:[E,N]}),e[9]=N,e[10]=y):y=e[10];let w;e[11]!==b||e[12]!==P||e[13]!==y?(w=s.jsx(an,{className:"h-full",image:j,title:b,description:P,actions:y}),e[11]=b,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==d?(k=s.jsx(pa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let x;return e[17]!==w||e[18]!==k?(x=s.jsxs(s.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=x):x=e[19],x}let p;return e[20]!==n?(p=s.jsx(Ui,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function rd(){const t=fe.c(2),e=va();let n;return t[0]!==e?(n=s.jsx(ar,{tabId:"site-editor",children:s.jsx(ir,{feature:"cms",children:s.jsx(Hi,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{rd as default};