decocms 4.373.5 → 4.373.7

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 (369) hide show
  1. package/dist/client/assets/{AlertCircle-DRpebp4h.js → AlertCircle-CXObGjo9.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B0gnunw-.js → AreaChart-DqDljoV0.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-Cqy0IIEv.js → ArrowLeft-DYVyI_VG.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-b56ImWX_.js → ArrowRight-Cv4zV_hc.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-C2RQRHDD.js → ArrowUp-XB4fXiiA.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-BQINx9xQ.js → CartesianChart-BpMsLvRa.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-jHqe_fbp.js → CheckCircle-D3mNvYSi.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-BipIqZKN.js → ChevronUp-COTbQwLk.js} +1 -1
  9. package/dist/client/assets/{Copy01-BXOyEXn_.js → Copy01-C0HaQSS8.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-gK8a476R.js → CreditCard01-gKGlu4j-.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-CBmcX5ZQ.js → DotsVertical-z36agsZZ.js} +1 -1
  12. package/dist/client/assets/{Download01-BqdbVKkx.js → Download01-D7z7LnPX.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-ii8yIYGv.js → ErrorBarContext-Dzdgq1-3.js} +1 -1
  14. package/dist/client/assets/{Eye-NHkb_0Hv.js → Eye-CXpgS73d.js} +1 -1
  15. package/dist/client/assets/{Globe01-NGWhOOw4.js → Globe01-CqtCtiHp.js} +1 -1
  16. package/dist/client/assets/{Globe04-DaWdeD_h.js → Globe04-C5uUk5Wv.js} +1 -1
  17. package/dist/client/assets/{Image01-DRwEr3Il.js → Image01-4jrKoIdv.js} +1 -1
  18. package/dist/client/assets/{Key01-CMNC3L72.js → Key01-DYs1tDuk.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-ULL_7jIQ.js → LayoutLeft-BpVRh-Po.js} +1 -1
  20. package/dist/client/assets/{Line-DQ9rkjlL.js → Line-yBtP1IeB.js} +1 -1
  21. package/dist/client/assets/{Link01-DkJLSZKm.js → Link01-jdgi1qSD.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-DRJgOkS5.js → LinkExternal01-m42q_S_M.js} +1 -1
  23. package/dist/client/assets/{Monitor01-BMO5GW_Z.js → Monitor01-os8PKA1I.js} +1 -1
  24. package/dist/client/assets/{Package-CX9rDgp4.js → Package-B3Q-5KDE.js} +1 -1
  25. package/dist/client/assets/{Palette-BaZfD7NH.js → Palette-BZvH2eOz.js} +1 -1
  26. package/dist/client/assets/{Play-R6tzdzJz.js → Play-bRRuQABN.js} +1 -1
  27. package/dist/client/assets/{Plus-Bhgtdwjl.js → Plus-DvvrKyBv.js} +1 -1
  28. package/dist/client/assets/{SearchLg-CaDGdzKV.js → SearchLg-5yTiPdYy.js} +1 -1
  29. package/dist/client/assets/{SearchMd-DqAc-aF0.js → SearchMd-DdnZB_kH.js} +1 -1
  30. package/dist/client/assets/{Sector-lggKGspb.js → Sector-Brx5vUUx.js} +1 -1
  31. package/dist/client/assets/{Settings02-CqejvZCP.js → Settings02-ZFXhGSke.js} +1 -1
  32. package/dist/client/assets/{Share07-BRS1J9YL.js → Share07-DGjT3Gg9.js} +1 -1
  33. package/dist/client/assets/{Stars01-_MpByilY.js → Stars01-eV7VwQCe.js} +1 -1
  34. package/dist/client/assets/{Sun-BuiE9-Qr.js → Sun-DVzczttw.js} +1 -1
  35. package/dist/client/assets/{Tool01-DHgpsL-M.js → Tool01-Dve18ohO.js} +1 -1
  36. package/dist/client/assets/{Tool02-DC4h3G7C.js → Tool02-FrnZhmLN.js} +1 -1
  37. package/dist/client/assets/{Trash01-CePc620H.js → Trash01-BxwqIhkU.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-BRi4yW6T.js → TrendUp01-BzCYvWKO.js} +1 -1
  39. package/dist/client/assets/{Upload01-DX6JXeV7.js → Upload01-BWCu2tgO.js} +1 -1
  40. package/dist/client/assets/{User01-CuXkeRZu.js → User01-8Vlf0BeC.js} +1 -1
  41. package/dist/client/assets/{UserSquare-DgZ1lpys.js → UserSquare-CAG4tDFW.js} +1 -1
  42. package/dist/client/assets/{Users01-4GrNqNW2.js → Users01-DMz77Cu0.js} +1 -1
  43. package/dist/client/assets/{X-Bg-qbBOB.js → X-CWoNRiFw.js} +1 -1
  44. package/dist/client/assets/{XCircle-bO1WYRjm.js → XCircle-vli4jB2_.js} +1 -1
  45. package/dist/client/assets/{XClose-BL7URSGz.js → XClose-D6yrqOaZ.js} +1 -1
  46. package/dist/client/assets/{Zap-C63eteO6.js → Zap-Dqam1FUT.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-B8Fl4ZUs.js → ZoomOut-DC6ee7Oj.js} +1 -1
  48. package/dist/client/assets/{access-gate-Cy6tml22.js → access-gate-IRFVWqWN.js} +1 -1
  49. package/dist/client/assets/{add-connection-dialog-D3_IjFEm.js → add-connection-dialog-qeiy7HKX.js} +1 -1
  50. package/dist/client/assets/{agent-analytics-CMgNDs8a.js → agent-analytics-Bal4tjAS.js} +1 -1
  51. package/dist/client/assets/agent-app-Bs18TbCe.js +1 -0
  52. package/dist/client/assets/{agent-assets-EiqAguQ9.js → agent-assets-C-A9NHFt.js} +1 -1
  53. package/dist/client/assets/{agent-automation-BWve3gQX.js → agent-automation-B24pdiho.js} +1 -1
  54. package/dist/client/assets/{agent-automations-BfhaWGsH.js → agent-automations-Del1HI76.js} +1 -1
  55. package/dist/client/assets/{agent-connect-sources-Bnr4gy7g.js → agent-connect-sources-hHcDuVmN.js} +1 -1
  56. package/dist/client/assets/agent-deck-BscJIS_P.js +1 -0
  57. package/dist/client/assets/{agent-e2e--u42ofiU.js → agent-e2e-BOVmkr3K.js} +1 -1
  58. package/dist/client/assets/{agent-experiments-IK8fH0P-.js → agent-experiments-BUN41rlZ.js} +1 -1
  59. package/dist/client/assets/agent-file-CVhA0OcV.js +1 -0
  60. package/dist/client/assets/{agent-git-D-_UYNlm.js → agent-git-B3vsmLYz.js} +1 -1
  61. package/dist/client/assets/{agent-hosting-VQrHq4HJ.js → agent-hosting-GlpT5_h1.js} +1 -1
  62. package/dist/client/assets/{agent-icon-DufTIfP9.js → agent-icon-Bjs6S0CQ.js} +1 -1
  63. package/dist/client/assets/agent-library-file-DiqRejTV.js +1 -0
  64. package/dist/client/assets/{agent-monitor-nqntXwEO.js → agent-monitor-Ceuf3mOK.js} +1 -1
  65. package/dist/client/assets/{agent-overview-DV_onvSv.js → agent-overview-BHYclhvy.js} +1 -1
  66. package/dist/client/assets/agent-settings-Cj1YsjPE.js +1 -0
  67. package/dist/client/assets/{agent-site-editor-DfqbHKh0.js → agent-site-editor-C_lpxPD5.js} +1 -1
  68. package/dist/client/assets/agent-site-editor-code-Dca54yqX.js +2 -0
  69. package/dist/client/assets/{agent-site-editor-content-fL2OHuSD.js → agent-site-editor-content-BjCvbdA4.js} +2 -2
  70. package/dist/client/assets/agent-site-editor-preview-BL2LXrMT.js +518 -0
  71. package/dist/client/assets/agent-view-Ch2X8bSc.js +1 -0
  72. package/dist/client/assets/{agent-view-guard-C7QN_-Wr.js → agent-view-guard-BrMR85_5.js} +1 -1
  73. package/dist/client/assets/{agents-list-DdmCCR4o.js → agents-list-WQZIjjxR.js} +1 -1
  74. package/dist/client/assets/{ai-providers-qMsDd_5B.js → ai-providers-DX9KvVWk.js} +1 -1
  75. package/dist/client/assets/{alert-DRbzNrSq.js → alert-DlYgy_Yd.js} +1 -1
  76. package/dist/client/assets/{alert-dialog-MFqJ1LQJ.js → alert-dialog-rSqyPJdx.js} +1 -1
  77. package/dist/client/assets/api-keys-BgOtz-Ht.js +1 -0
  78. package/dist/client/assets/{api-keys-CB3qdQG6.js → api-keys-Zkt0C4Y4.js} +1 -1
  79. package/dist/client/assets/app-editor-B1Gz7Y4y.js +1 -0
  80. package/dist/client/assets/{asset-utils-DB6jdzK1.js → asset-utils-BPb7WD0z.js} +1 -1
  81. package/dist/client/assets/{auth-BuR8_3Rx.js → auth-BVidexnt.js} +1 -1
  82. package/dist/client/assets/{auth-catchall-BzOKlpso.js → auth-catchall-DetVOLyh.js} +1 -1
  83. package/dist/client/assets/{auth-entry-LKNKnOD-.js → auth-entry-DrCwtnqV.js} +1 -1
  84. package/dist/client/assets/{auth-split-layout-CJz16SJc.js → auth-split-layout-DG8v3H1v.js} +1 -1
  85. package/dist/client/assets/{authenticate-and-persist-oauth-B6q4FvBV.js → authenticate-and-persist-oauth-D2mr70b5.js} +1 -1
  86. package/dist/client/assets/{automation-list-row-BU2qQeTT.js → automation-list-row-BjtdVywE.js} +1 -1
  87. package/dist/client/assets/{automation-runs-DrWZY5pK.js → automation-runs-C3GDmqkT.js} +1 -1
  88. package/dist/client/assets/{automations-Cp3T58uS.js → automations-DQb9PBR9.js} +1 -1
  89. package/dist/client/assets/{autosend-LI2Q470J.js → autosend-DhKZ-7Id.js} +1 -1
  90. package/dist/client/assets/{avatar-YUwJoSeh.js → avatar-BEirR4QZ.js} +1 -1
  91. package/dist/client/assets/{badge-D82o8bXv.js → badge-BlwQXU-3.js} +1 -1
  92. package/dist/client/assets/{block-document-DgNuL_aZ.js → block-document-DUnX455M.js} +1 -1
  93. package/dist/client/assets/{blocks-preview-workspace-context-Br_u1FrC.js → blocks-preview-workspace-context-C7mxkjx_.js} +1 -1
  94. package/dist/client/assets/{breadcrumb-DeKFrMun.js → breadcrumb-0XDvcsPM.js} +1 -1
  95. package/dist/client/assets/{buckets-YW8Wxi0L.js → buckets-C4XZCSC4.js} +1 -1
  96. package/dist/client/assets/{build-improve-prompt-doc-BK7E3I7G.js → build-improve-prompt-doc-BDF07SEi.js} +1 -1
  97. package/dist/client/assets/{bulk-category-panel-BzItHmfT.js → bulk-category-panel-DYMT6JBB.js} +1 -1
  98. package/dist/client/assets/{calendar-Bz7iq98w.js → calendar-l9xfjDYn.js} +1 -1
  99. package/dist/client/assets/{capability-load-error-QZCwPJn0.js → capability-load-error-1wwGM6rc.js} +1 -1
  100. package/dist/client/assets/category-editor-sp4g_570.js +1 -0
  101. package/dist/client/assets/{chart-tNixenOU.js → chart-DKRXwtHz.js} +1 -1
  102. package/dist/client/assets/{chat-context-TY-WfTe2.js → chat-context-Jt-YG5w6.js} +1 -1
  103. package/dist/client/assets/{chat-draft-C8DDqrbp.js → chat-draft-YqoicDVc.js} +1 -1
  104. package/dist/client/assets/{checkbox-Bd0pVkFs.js → checkbox-BcokHpmO.js} +1 -1
  105. package/dist/client/assets/{choose-editor-BhSXf4h9.js → choose-editor-vXvIB3tj.js} +1 -1
  106. package/dist/client/assets/{cli-auth-success-Cx8uqzVU.js → cli-auth-success-DYf6zl1s.js} +1 -1
  107. package/dist/client/assets/{client-icons-CawGhhPp.js → client-icons-Pl4uFh0P.js} +1 -1
  108. package/dist/client/assets/{collapsible-DoaJMwv0.js → collapsible-Gb28gIwz.js} +1 -1
  109. package/dist/client/assets/{collection-detail-BYvG1zRo.js → collection-detail-DUKSMOme.js} +1 -1
  110. package/dist/client/assets/{collection-display-button-Cdh_DfEz.js → collection-display-button-BWm9BHjU.js} +1 -1
  111. package/dist/client/assets/{collection-search-Rv_Famau.js → collection-search-DbspoT4A.js} +1 -1
  112. package/dist/client/assets/{collection-table-wrapper-B-Zk2Djn.js → collection-table-wrapper-Bu3jscEz.js} +1 -1
  113. package/dist/client/assets/{collection-tabs-BW0ALmEv.js → collection-tabs-efLKST4X.js} +1 -1
  114. package/dist/client/assets/{combobox-gVLR5Rh5.js → combobox-D8bdRuYK.js} +1 -1
  115. package/dist/client/assets/{command-BUbzDbU_.js → command-DfGhPxBi.js} +1 -1
  116. package/dist/client/assets/{companion-mcps-section-D5wFIiPY.js → companion-mcps-section-Bj7o3KIz.js} +1 -1
  117. package/dist/client/assets/{connect-8mQdxEHY.js → connect-Ddc3swJH.js} +1 -1
  118. package/dist/client/assets/{connect-layout-BmiheUuP.js → connect-layout-6U5HIw46.js} +1 -1
  119. package/dist/client/assets/{connection-card-B_j7JUAi.js → connection-card-EEV5RvVm.js} +1 -1
  120. package/dist/client/assets/{connection-detail-DPLFAzV5.js → connection-detail-CDWFs7gF.js} +1 -1
  121. package/dist/client/assets/{connection-form-helpers-BD3Obe6z.js → connection-form-helpers-B5eHSGU1.js} +1 -1
  122. package/dist/client/assets/{connection-DWSp4370.js → connection-t1VT-unh.js} +1 -1
  123. package/dist/client/assets/{connections-BBQrx9eV.js → connections-CXW04041.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-DFg7ZEy_.js → create-organization-dialog-CHQK_PCD.js} +1 -1
  125. package/dist/client/assets/{decofile-api-D5j1--HW.js → decofile-api-HVWfDjp0.js} +1 -1
  126. package/dist/client/assets/decopilot-qPtGJHD7.js +4 -0
  127. package/dist/client/assets/{dialog-HZ9qQm76.js → dialog-C--lZgof.js} +1 -1
  128. package/dist/client/assets/{discover-D4ESd7Tz.js → discover-Cv66zRxS.js} +1 -1
  129. package/dist/client/assets/{domain-settings-BvNgL15z.js → domain-settings-C6KOnx3t.js} +1 -1
  130. package/dist/client/assets/{download-app-dialog-D40FFt_i.js → download-app-dialog-BtZtXNI9.js} +1 -1
  131. package/dist/client/assets/{drawer-CJCVps1a.js → drawer-CEqu2w31.js} +1 -1
  132. package/dist/client/assets/{editor-BeNEyFY1.js → editor-B5vd68L-.js} +1 -1
  133. package/dist/client/assets/{empty-state-D-oQVUen.js → empty-state-B1ydSXWY.js} +1 -1
  134. package/dist/client/assets/{empty-state-BSFJHfgC.js → empty-state-CEB0oJKi.js} +1 -1
  135. package/dist/client/assets/{extract-connection-data-CK3_iI7H.js → extract-connection-data-KrzjqLuM.js} +1 -1
  136. package/dist/client/assets/{feature-gate-D0BTSOOI.js → feature-gate-BOdfxa6n.js} +1 -1
  137. package/dist/client/assets/{feature-paywall-DZmgqu99.js → feature-paywall-7K4PvnS0.js} +1 -1
  138. package/dist/client/assets/{file-explorer-CpHhO0a0.js → file-explorer-j6UoKVn5.js} +1 -1
  139. package/dist/client/assets/{file-preview-C1g6pPFA.js → file-preview-zAM78A_T.js} +1 -1
  140. package/dist/client/assets/{file-share-button-CtVm5jXG.js → file-share-button-9GIbyfKR.js} +1 -1
  141. package/dist/client/assets/{file-type-icon-BZYncmwg.js → file-type-icon-Pf6_vVpV.js} +1 -1
  142. package/dist/client/assets/{folder-icon-DvyCwyeo.js → folder-icon-Dv9hcmmv.js} +1 -1
  143. package/dist/client/assets/{form-CBihhH6R.js → form-B4mb6aA2.js} +1 -1
  144. package/dist/client/assets/{gateway-client-zpb6f42t.js → gateway-client-DMcPw42e.js} +1 -1
  145. package/dist/client/assets/{general-8dGImt4k.js → general-BCl_Z8Bh.js} +1 -1
  146. package/dist/client/assets/{github-icon-BXivHfH-.js → github-icon-Cfhj_wer.js} +1 -1
  147. package/dist/client/assets/{home-BJ7LX3kr.js → home-DHKKQu7c.js} +1 -1
  148. package/dist/client/assets/{hooks-Cr7z1jDa.js → hooks-D2gm49jG.js} +1 -1
  149. package/dist/client/assets/{hooks-B6_FetIS.js → hooks-bPRy8u8s.js} +1 -1
  150. package/dist/client/assets/{icon-button-W-WM76O5.js → icon-button-BO4HCHp0.js} +1 -1
  151. package/dist/client/assets/{index-Rr3pxwiA.js → index-10C-9CGu.js} +1 -1
  152. package/dist/client/assets/{index-D36LSiH7.js → index-BBiS8WcV.js} +1 -1
  153. package/dist/client/assets/index-BNah-P_g.css +1 -0
  154. package/dist/client/assets/{index-Bn9GxS8i.js → index-C6xX9qhC.js} +1 -1
  155. package/dist/client/assets/{index-B6Lhlxso.js → index-CiHQIzJV.js} +1 -1
  156. package/dist/client/assets/{index-hQd2Rs55.js → index-CjkLOdl7.js} +1 -1
  157. package/dist/client/assets/{index-DyQrMS9n.js → index-D2ml-yR0.js} +1 -1
  158. package/dist/client/assets/{index-C1neAU7j.js → index-D3tvzSZq.js} +1 -1
  159. package/dist/client/assets/{index-mYx9uY_O.js → index-D9m900WG.js} +1 -1
  160. package/dist/client/assets/{index-D06_-0n3.js → index-DYDDTRPr.js} +1 -1
  161. package/dist/client/assets/{index-LuQPyfHg.js → index-DchoXpDB.js} +4 -4
  162. package/dist/client/assets/{index-CEibrSC7.js → index-DiUmEYGt.js} +1 -1
  163. package/dist/client/assets/{index-CpQcdffy.js → index-FF1Uic9v.js} +1 -1
  164. package/dist/client/assets/{index-DkT0vWt0.js → index-WvdQ3Gxl.js} +1 -1
  165. package/dist/client/assets/{index-Zd0dTvge.js → index-gtaWgUXF.js} +1 -1
  166. package/dist/client/assets/{index-redirect-Bsh-JRej.js → index-redirect-D9sbt-_X.js} +1 -1
  167. package/dist/client/assets/{infiniteQueryObserver-DWBRQw_v.js → infiniteQueryObserver-BL_-HzVK.js} +1 -1
  168. package/dist/client/assets/{infra-billing-CnTJps2P.js → infra-billing-B5KHCfIC.js} +1 -1
  169. package/dist/client/assets/input-6mmYXX78.js +8 -0
  170. package/dist/client/assets/{input-9TmKngWX.js → input-DMPSPO9s.js} +1 -1
  171. package/dist/client/assets/{input-C9oONNic.js → input-DVioDw5w.js} +1 -1
  172. package/dist/client/assets/{integration-icon-CyoFiiYN.js → integration-icon-DeB9boY9.js} +1 -1
  173. package/dist/client/assets/{label-DioQ1YA1.js → label-Y8wAPB2q.js} +1 -1
  174. package/dist/client/assets/{last-preview-page-d2hxbLrX.js → last-preview-page-BgQv46C7.js} +1 -1
  175. package/dist/client/assets/{layout-BzONNt5i.js → layout-CwpWqIQR.js} +1 -1
  176. package/dist/client/assets/{legacy-agents-deep-k6vHlYIk.js → legacy-agents-deep-8Ijpjfwy.js} +1 -1
  177. package/dist/client/assets/{legacy-main-redirect-CnGyVzes.js → legacy-main-redirect-BxyLUVXH.js} +1 -1
  178. package/dist/client/assets/{library-BHLqAjeY.js → library-DBXekQC2.js} +1 -1
  179. package/dist/client/assets/{login-BlgcnYJK.js → login-ChFbzLUJ.js} +1 -1
  180. package/dist/client/assets/{markdown-B7dRWvN8.js → markdown-C-nDCgcb.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-shF9Uwqi.js → mcp-app-renderer-WfI_r1XP.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-CgVup_iI.js → mcp-oauth-9UY56aRO.js} +1 -1
  183. package/dist/client/assets/{members-C_bPhhDi.js → members-CndlpNqz.js} +1 -1
  184. package/dist/client/assets/{message-templates-DqAaNZFI.js → message-templates-CIJnZckN.js} +1 -1
  185. package/dist/client/assets/{mini-report-page-B9laPd-F.js → mini-report-page-O1ka8zPz.js} +1 -1
  186. package/dist/client/assets/{mock-board-BjEfqSrD.js → mock-board-DtJ4HoLE.js} +3 -3
  187. package/dist/client/assets/{monaco-editor-yW0L-r5i.js → monaco-editor-EsHcroTM.js} +2 -2
  188. package/dist/client/assets/{monitoring-stats-row-C6QS0tj3.js → monitoring-stats-row-CEYixzoO.js} +1 -1
  189. package/dist/client/assets/{multi-select-DawxxHTL.js → multi-select-Ckyymkwo.js} +1 -1
  190. package/dist/client/assets/{mustache-CmprohQX.js → mustache-CuwE7puy.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-CztQgjwi.js → oauth-callback-BNkt6gec.js} +1 -1
  192. package/dist/client/assets/{oauth-callback-ai-provider-BIp0Es5j.js → oauth-callback-ai-provider-DHpdgtqM.js} +1 -1
  193. package/dist/client/assets/{onboarding-Cyk3OCOl.js → onboarding-D8PMxB-s.js} +1 -1
  194. package/dist/client/assets/{optimistic-project-sidebar-views-P4YvxIWX.js → optimistic-project-sidebar-views-BCGYnvYt.js} +1 -1
  195. package/dist/client/assets/{org-file-open-context-CgoXVQJH.js → org-file-open-context-CMO7iKuZ.js} +1 -1
  196. package/dist/client/assets/{organization-choice-BvjNuVed.js → organization-choice-DZzgEVOP.js} +1 -1
  197. package/dist/client/assets/{orgs-Clek1XKs.js → orgs-BqY0yaVR.js} +1 -1
  198. package/dist/client/assets/{page-seo-form-DXBYSuZJ.js → page-seo-form-CTlWi1Po.js} +1 -1
  199. package/dist/client/assets/pair-CoIev9t8.js +47 -0
  200. package/dist/client/assets/{plan-ladder-LtgpxZ9m.js → plan-ladder-CvB1itcq.js} +1 -1
  201. package/dist/client/assets/{popover-D3y1e9f_.js → popover-9q4JZeId.js} +1 -1
  202. package/dist/client/assets/{post-calendar-jqhB8Tz3.js → post-calendar-CYufLBXX.js} +1 -1
  203. package/dist/client/assets/{post-editor-Bh2EUOqL.js → post-editor-5QBEdVxG.js} +1 -1
  204. package/dist/client/assets/{preview-content-CNXZwsI5.js → preview-content-r3ikGmVF.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-6ys1_8tR.js → preview-dialog-B2JbllxA.js} +1 -1
  206. package/dist/client/assets/{primitives-djWhLh7P.js → primitives-Cv4H5Nct.js} +1 -1
  207. package/dist/client/assets/{profile-CwG9h9dy.js → profile-BZRe-jTH.js} +1 -1
  208. package/dist/client/assets/{project-app-view-CR53PtA0.js → project-app-view-aFzz4Hl1.js} +1 -1
  209. package/dist/client/assets/{project-feed-BXQJU-Lq.js → project-feed-C4AlM1te.js} +1 -1
  210. package/dist/client/assets/{project-icon-BNaK4V-S.js → project-icon-Cs1wRsjO.js} +1 -1
  211. package/dist/client/assets/project-reports-BZ6FLXpB.js +1 -0
  212. package/dist/client/assets/project-tasks-FUPQeMum.js +1 -0
  213. package/dist/client/assets/{prompts-BUBw9WOd.js → prompts-CzdVZxSC.js} +1 -1
  214. package/dist/client/assets/record-editor-BqFOJxMy.js +1 -0
  215. package/dist/client/assets/{redirect-editor-DIiWBnTQ.js → redirect-editor-Dlg_KzWH.js} +1 -1
  216. package/dist/client/assets/registry-CW1a_ClX.js +2 -0
  217. package/dist/client/assets/{registry-layout-BxyJZ4a0.js → registry-layout-okZb1g1s.js} +1 -1
  218. package/dist/client/assets/reports-B-YVMYcn.js +1 -0
  219. package/dist/client/assets/{reports-DtGwTvyg.js → reports-CTuZToR8.js} +1 -1
  220. package/dist/client/assets/{reports-onboarding-Dndz3euc.js → reports-onboarding-BEZ_DYpX.js} +1 -1
  221. package/dist/client/assets/{reports-tab-CFhnwYBJ.js → reports-tab-DKSH99pu.js} +2 -2
  222. package/dist/client/assets/{repositories-DVy9gi28.js → repositories-DU8-zudZ.js} +1 -1
  223. package/dist/client/assets/{repository-import-picker-DZK5nFkw.js → repository-import-picker-B60WWGEA.js} +1 -1
  224. package/dist/client/assets/{repository-picker-DKVkzLp4.js → repository-picker-D3wNiL0V.js} +1 -1
  225. package/dist/client/assets/{require-capability-BmfInhOP.js → require-capability-Cq8oAb4v.js} +1 -1
  226. package/dist/client/assets/{required-auth-layout-C8rnLRRD.js → required-auth-layout-BpkWu-t8.js} +1 -1
  227. package/dist/client/assets/{reset-password-DDnt0oDT.js → reset-password-C2Evn_oF.js} +1 -1
  228. package/dist/client/assets/{resizable-_gRklRa4.js → resizable-B57Inv2v.js} +1 -1
  229. package/dist/client/assets/{review-settings-DGbhEqkr.js → review-settings-D7hZcq1J.js} +1 -1
  230. package/dist/client/assets/{rich-text-link-control-BwrZ0Rq8.js → rich-text-link-control-6DPaw7w9.js} +1 -1
  231. package/dist/client/assets/{roles-B3FGUjGZ.js → roles-9hXehRlM.js} +1 -1
  232. package/dist/client/assets/{route-CURW_i6J.js → route-CCz-m16n.js} +1 -1
  233. package/dist/client/assets/route-DE3oMCr6.js +1 -0
  234. package/dist/client/assets/{route-D4jdB3Jz.js → route-nb5BJjgq.js} +1 -1
  235. package/dist/client/assets/{route-page-header-7RPoLHvN.js → route-page-header-DUGnMnSb.js} +1 -1
  236. package/dist/client/assets/runnable-block-editor-C7mMzEhS.js +16 -0
  237. package/dist/client/assets/{sandbox-lifecycle-context-BmqpyoGL.js → sandbox-lifecycle-context-DbhP_ZKf.js} +1 -1
  238. package/dist/client/assets/{schema-CTcdIHci.js → schema-CyoxnrUK.js} +1 -1
  239. package/dist/client/assets/{scroll-area--p0oLuFI.js → scroll-area-8cM0jUp8.js} +1 -1
  240. package/dist/client/assets/{search-input-CBDtuFaQ.js → search-input-4arcaAW2.js} +1 -1
  241. package/dist/client/assets/{search-toggle-CorYcgG4.js → search-toggle-CVU_W4rb.js} +1 -1
  242. package/dist/client/assets/{secrets-DP9PDxVT.js → secrets-CbsFbTL1.js} +1 -1
  243. package/dist/client/assets/{sections-editor-DohMT2TR.js → sections-editor-CF2JhbMl.js} +1 -1
  244. package/dist/client/assets/{select-CE4utxRu.js → select-iTTfftCZ.js} +1 -1
  245. package/dist/client/assets/{select-model-DPfWtNra.js → select-model-BWH6xXDk.js} +1 -1
  246. package/dist/client/assets/{seo-editor--VYOVmP-.js → seo-editor-C47l8Up_.js} +1 -1
  247. package/dist/client/assets/{separator-CfEbfObm.js → separator--zFGzlfq.js} +1 -1
  248. package/dist/client/assets/{settings-tab-BUfox-t7.js → settings-tab-OVYz7kJC.js} +1 -1
  249. package/dist/client/assets/{sheet-B4Gi1sGY.js → sheet-CTSfPJfp.js} +1 -1
  250. package/dist/client/assets/{shell-layout-DskZ7YaE.js → shell-layout-CrUq0jPv.js} +1 -1
  251. package/dist/client/assets/{sidebar-C4iuLw3C.js → sidebar-D65-nxRC.js} +1 -1
  252. package/dist/client/assets/{skill-preview-CDRAH_WW.js → skill-preview-BPNz5ecd.js} +1 -1
  253. package/dist/client/assets/{skills-CU5P7Nd-.js → skills-DWGlvsKU.js} +1 -1
  254. package/dist/client/assets/{sso-D2yzX9Hl.js → sso-C2B2IEHp.js} +1 -1
  255. package/dist/client/assets/store-C8aipHxi.js +1 -0
  256. package/dist/client/assets/store-registry-cFM4EICa.js +2 -0
  257. package/dist/client/assets/{switch-PUAtlc1q.js → switch-RkyqhR5_.js} +1 -1
  258. package/dist/client/assets/{synced-repos-C8iBzP3z.js → synced-repos-B9fTsbsA.js} +1 -1
  259. package/dist/client/assets/{table-DSBp_pkp.js → table-Krbc3thx.js} +1 -1
  260. package/dist/client/assets/{tabs-CVORM5c5.js → tabs-XTQugW45.js} +1 -1
  261. package/dist/client/assets/{task-board--VJa6ODn.js → task-board-Cm9EWODX.js} +1 -1
  262. package/dist/client/assets/{task-route-Kwsi_MjW.js → task-route-CABrMb25.js} +1 -1
  263. package/dist/client/assets/{task-status-Dozb4AYU.js → task-status-Bx9OcBPG.js} +1 -1
  264. package/dist/client/assets/{taskboard-analytics-CKBpuKL1.js → taskboard-analytics-CbPYOvM9.js} +1 -1
  265. package/dist/client/assets/{tasks-fP9QfttY.js → tasks-BWDjKNyr.js} +1 -1
  266. package/dist/client/assets/tasks-Cbjm127d.js +1 -0
  267. package/dist/client/assets/{textarea-DGI1GnBQ.js → textarea-DC3jkWUy.js} +1 -1
  268. package/dist/client/assets/{thread-button-RY43Y8bB.js → thread-button-DJeNUo9R.js} +1 -1
  269. package/dist/client/assets/{thread-intent-BlR8TpCF.js → thread-intent-CLzqcEU3.js} +1 -1
  270. package/dist/client/assets/{thread-route-mS20Kc2d.js → thread-route-DZN2ic4S.js} +1 -1
  271. package/dist/client/assets/{thread-route-bGs9fSMP.js → thread-route-DxxV5drh.js} +1 -1
  272. package/dist/client/assets/{thread-sheet-body-9W9w7Xfz.js → thread-sheet-body-D1CrYpWP.js} +1 -1
  273. package/dist/client/assets/{toggle-group-nSkm1Zz5.js → toggle-group-BqY-6bY9.js} +1 -1
  274. package/dist/client/assets/{toolbar-icon-button-I3CeX274.js → toolbar-icon-button-DJHsDbMM.js} +1 -1
  275. package/dist/client/assets/{tooltip-SRIuIppn.js → tooltip-BO_pu764.js} +1 -1
  276. package/dist/client/assets/{track-D7QItdrm.js → track-B90PSyM6.js} +1 -1
  277. package/dist/client/assets/{types-CZuWZKU6.js → types-Cm14EUfH.js} +1 -1
  278. package/dist/client/assets/{usage-stats-Cm6Eeoxn.js → usage-stats-mieFxyzL.js} +1 -1
  279. package/dist/client/assets/{use-ai-providers-D5fiM2J9.js → use-ai-providers-BVP3fRwy.js} +1 -1
  280. package/dist/client/assets/{use-automations-DgjQzBnx.js → use-automations-C8YBgJEl.js} +1 -1
  281. package/dist/client/assets/{use-autosave-CF1OYBpf.js → use-autosave-eQtMPG4q.js} +1 -1
  282. package/dist/client/assets/{use-connect-companion-C4pkyL7z.js → use-connect-companion-CkitXg8n.js} +1 -1
  283. package/dist/client/assets/{use-connection--1qJj6iq.js → use-connection-BOuOkJFp.js} +1 -1
  284. package/dist/client/assets/{use-copy-DIi60N72.js → use-copy-CNbPbYhg.js} +1 -1
  285. package/dist/client/assets/{use-create-virtual-mcp-DRR090Qw.js → use-create-virtual-mcp-7CzSoD-L.js} +1 -1
  286. package/dist/client/assets/{use-date-fns-locale-ZzEUAiXb.js → use-date-fns-locale-C1VwFFXm.js} +1 -1
  287. package/dist/client/assets/{use-debounced-autosave-D_K_B-C2.js → use-debounced-autosave-CefDn1RA.js} +1 -1
  288. package/dist/client/assets/{use-debounced-value-COVYb0FX.js → use-debounced-value-B_JY9vlk.js} +1 -1
  289. package/dist/client/assets/{use-deco-credits-D6cSv2pt.js → use-deco-credits-CaGCL5MU.js} +1 -1
  290. package/dist/client/assets/{use-decopilot-events-Btc9Hw20.js → use-decopilot-events-CWxPTNzJ.js} +1 -1
  291. package/dist/client/assets/{use-delete-connection-DZ9HC2Qt.js → use-delete-connection-D-LhpVeL.js} +1 -1
  292. package/dist/client/assets/{use-deployment-admin-B-oXcfbg.js → use-deployment-admin-CKo-T7Eb.js} +1 -1
  293. package/dist/client/assets/{use-entitlements-CAw-4ybd.js → use-entitlements-CC65FOYV.js} +1 -1
  294. package/dist/client/assets/{use-fast-preview-draft-url-B17zQ9G8.js → use-fast-preview-draft-url-DgjS5SSz.js} +1 -1
  295. package/dist/client/assets/{use-file-configs-Blz7gQxO.js → use-file-configs-MPfKiulr.js} +1 -1
  296. package/dist/client/assets/{use-in-settings-0JyiK4rA.js → use-in-settings-CILWVZ4T.js} +1 -1
  297. package/dist/client/assets/{use-infinite-scroll-CFc4g2v0.js → use-infinite-scroll-BaznBXwh.js} +1 -1
  298. package/dist/client/assets/{use-join-requests-wgTigAL0.js → use-join-requests-B9oU4o3y.js} +1 -1
  299. package/dist/client/assets/{use-main-panel-tabs-BP48EtIS.js → use-main-panel-tabs-B9wSa9W4.js} +1 -1
  300. package/dist/client/assets/{use-mcp-auth-status--iOFjxjN.js → use-mcp-auth-status-jE5a0qIj.js} +1 -1
  301. package/dist/client/assets/{use-mcp-client-Bd-tc7BB.js → use-mcp-client-D0pIiesT.js} +1 -1
  302. package/dist/client/assets/{use-mcp-prompts-CNvxhVoK.js → use-mcp-prompts-Ic7ahI1X.js} +1 -1
  303. package/dist/client/assets/{use-mcp-tools-Cdzxtrxv.js → use-mcp-tools-BtN2PT6e.js} +1 -1
  304. package/dist/client/assets/{use-members-2Ck9xtlB.js → use-members-DYJTRB0U.js} +1 -1
  305. package/dist/client/assets/{use-mobile-YjO30zbo.js → use-mobile-Bu7Wccwz.js} +1 -1
  306. package/dist/client/assets/{use-navigate-to-agent-DLz5eqnM.js → use-navigate-to-agent-DYg7-gGj.js} +1 -1
  307. package/dist/client/assets/{use-open-billing-url-BbkkoILM.js → use-open-billing-url-rtNU2eua.js} +1 -1
  308. package/dist/client/assets/{use-org-auth-client-BWwsKUxX.js → use-org-auth-client-CSCN7lCL.js} +1 -1
  309. package/dist/client/assets/{use-org-fs-OA7i6aZv.js → use-org-fs-DlcNR7vX.js} +1 -1
  310. package/dist/client/assets/{use-org-repo-syncs-DQZqAtpE.js → use-org-repo-syncs-z1ETIeFw.js} +1 -1
  311. package/dist/client/assets/{use-org-sso-DKeFIwB6.js → use-org-sso-ZB2a3WbX.js} +1 -1
  312. package/dist/client/assets/{use-organization-roles-D0gVnuqV.js → use-organization-roles-DV_GvZAA.js} +1 -1
  313. package/dist/client/assets/{use-organization-settings-Dt8pz_Xc.js → use-organization-settings-DII_zEg9.js} +1 -1
  314. package/dist/client/assets/{use-panel-navigate-lA5Vutgx.js → use-panel-navigate-51kyo5Hp.js} +1 -1
  315. package/dist/client/assets/{use-project-native-view-presence-BIIs2cxk.js → use-project-native-view-presence-8G9ck166.js} +1 -1
  316. package/dist/client/assets/{use-project-scope-BQji3uMT.js → use-project-scope-DUxZnbD4.js} +1 -1
  317. package/dist/client/assets/{use-registry-connections-04qEX4iQ.js → use-registry-connections-CQ8ideOh.js} +1 -1
  318. package/dist/client/assets/{use-releases-Ck_Ppkv1.js → use-releases-CpWi2pQX.js} +1 -1
  319. package/dist/client/assets/{use-reports-diagnostic-CyoYUJW-.js → use-reports-diagnostic-BLFNMAM-.js} +1 -1
  320. package/dist/client/assets/{use-route-default-main-C-_nMKb3.js → use-route-default-main-CJi8VLJN.js} +1 -1
  321. package/dist/client/assets/{use-secrets-B5_Etu9P.js → use-secrets-Dj8txWSV.js} +1 -1
  322. package/dist/client/assets/{use-section-preview-base-CpYHheIc.js → use-section-preview-base-DC-dg1Cw.js} +1 -1
  323. package/dist/client/assets/{use-session-runtime-Az3IhpTV.js → use-session-runtime-DCalQxWt.js} +1 -1
  324. package/dist/client/assets/{use-tags-V2rRKyJt.js → use-tags-DtCzd_Sb.js} +1 -1
  325. package/dist/client/assets/{use-task-board-analytics-CrwEUHpD.js → use-task-board-analytics-DEmCs_28.js} +1 -1
  326. package/dist/client/assets/{use-task-metadata-C_07VLsf.js → use-task-metadata-rWoSUFPv.js} +1 -1
  327. package/dist/client/assets/{use-thread-outputs-iNfVWX0R.js → use-thread-outputs-BiDHyJUa.js} +1 -1
  328. package/dist/client/assets/{use-view-mode-BFNc3zM5.js → use-view-mode-C2Q-CKrI.js} +1 -1
  329. package/dist/client/assets/{use-virtual-mcp-DNJANJ1O.js → use-virtual-mcp-BVtrT8hZ.js} +1 -1
  330. package/dist/client/assets/useInfiniteQuery-BgdYAtVa.js +1 -0
  331. package/dist/client/assets/{useQueries-DVNbBLH1.js → useQueries-CVema_nz.js} +1 -1
  332. package/dist/client/assets/useSuspenseInfiniteQuery-CvQX2uaq.js +1 -0
  333. package/dist/client/assets/{users-BNPX8AQC.js → users-DwODRPhB.js} +1 -1
  334. package/dist/client/assets/{utils-DfrVSNtD.js → utils-BOXbJriL.js} +1 -1
  335. package/dist/client/assets/{variant-calendar-BpWvSSM7.js → variant-calendar-DEyE6YbX.js} +1 -1
  336. package/dist/client/assets/{variant-matcher-override-CC-cqTMb.js → variant-matcher-override-Di3N7bnv.js} +1 -1
  337. package/dist/client/assets/{view-mode-toggle-C1_SFL-z.js → view-mode-toggle-DAUAXLsv.js} +1 -1
  338. package/dist/client/assets/{virtual-mcp-D9YcK0wc.js → virtual-mcp-Cu8lvtqm.js} +1 -1
  339. package/dist/client/index.html +2 -2
  340. package/dist/server/cli.js +1 -1
  341. package/dist/server/server.js +1 -1
  342. package/package.json +1 -1
  343. package/dist/client/assets/agent-app-BCo5yjGs.js +0 -1
  344. package/dist/client/assets/agent-deck-BESZ0xNS.js +0 -1
  345. package/dist/client/assets/agent-file-CjHnsYA8.js +0 -1
  346. package/dist/client/assets/agent-library-file-CYOgcRbq.js +0 -1
  347. package/dist/client/assets/agent-settings-rUuwRxqm.js +0 -1
  348. package/dist/client/assets/agent-site-editor-code-9Q1n2G2W.js +0 -2
  349. package/dist/client/assets/agent-site-editor-preview-yn1fEVn-.js +0 -518
  350. package/dist/client/assets/agent-view-BZR2NJ34.js +0 -1
  351. package/dist/client/assets/api-keys-C6VdQLSB.js +0 -1
  352. package/dist/client/assets/app-editor-BFF_l3do.js +0 -1
  353. package/dist/client/assets/category-editor-uC2n6-MT.js +0 -1
  354. package/dist/client/assets/decopilot-CoQZcLAw.js +0 -4
  355. package/dist/client/assets/index-BOHOyAF8.css +0 -1
  356. package/dist/client/assets/input-BdRVbgEc.js +0 -8
  357. package/dist/client/assets/pair-SamLaVqt.js +0 -47
  358. package/dist/client/assets/project-reports-blyXSmXr.js +0 -1
  359. package/dist/client/assets/project-tasks-DuGjGSVk.js +0 -1
  360. package/dist/client/assets/record-editor-DYdyenUG.js +0 -1
  361. package/dist/client/assets/registry-DnDVb5H8.js +0 -2
  362. package/dist/client/assets/reports-CcJrOO_r.js +0 -1
  363. package/dist/client/assets/route-Br7-Mf2P.js +0 -1
  364. package/dist/client/assets/runnable-block-editor-Bpz2RYcL.js +0 -16
  365. package/dist/client/assets/store-NkRf_ILk.js +0 -1
  366. package/dist/client/assets/store-registry-BtXeT7wN.js +0 -2
  367. package/dist/client/assets/tasks-E8_VR8R0.js +0 -1
  368. package/dist/client/assets/useInfiniteQuery-COtwxc8g.js +0 -1
  369. package/dist/client/assets/useSuspenseInfiniteQuery-CgAI7poF.js +0 -1
@@ -1,518 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-DohMT2TR.js","assets/index-LuQPyfHg.js","assets/index-BOHOyAF8.css","assets/chat-context-TY-WfTe2.js","assets/use-panel-navigate-lA5Vutgx.js","assets/thread-route-mS20Kc2d.js","assets/use-project-scope-BQji3uMT.js","assets/use-virtual-mcp-DNJANJ1O.js","assets/use-mcp-client-Bd-tc7BB.js","assets/auth-BuR8_3Rx.js","assets/github-repo-BknN0SVI.js","assets/autosend-LI2Q470J.js","assets/thread-intent-BlR8TpCF.js","assets/slugify-CEUa2lfQ.js","assets/hooks-B6_FetIS.js","assets/backoff-8mStPHYB.js","assets/task-board--VJa6ODn.js","assets/schema-CTcdIHci.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-CAw-4ybd.js","assets/use-ai-providers-D5fiM2J9.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-Btc9Hw20.js","assets/use-organization-settings-Dt8pz_Xc.js","assets/ChevronUp-BipIqZKN.js","assets/agent-icon-DufTIfP9.js","assets/AlertCircle-DRpebp4h.js","assets/Tool01-DHgpsL-M.js","assets/ArrowUp-C2RQRHDD.js","assets/ArrowLeft-Cqy0IIEv.js","assets/Tool02-DC4h3G7C.js","assets/ArrowRight-b56ImWX_.js","assets/TrendUp01-BRi4yW6T.js","assets/ZoomOut-B8Fl4ZUs.js","assets/Globe04-DaWdeD_h.js","assets/CheckCircle-jHqe_fbp.js","assets/UserSquare-DgZ1lpys.js","assets/Copy01-BXOyEXn_.js","assets/CreditCard01-gK8a476R.js","assets/DotsVertical-CBmcX5ZQ.js","assets/Download01-BqdbVKkx.js","assets/Settings02-CqejvZCP.js","assets/Eye-NHkb_0Hv.js","assets/Share07-BRS1J9YL.js","assets/Globe01-NGWhOOw4.js","assets/XClose-BL7URSGz.js","assets/Image01-DRwEr3Il.js","assets/Key01-CMNC3L72.js","assets/LayoutLeft-ULL_7jIQ.js","assets/Link01-DkJLSZKm.js","assets/LinkExternal01-DRJgOkS5.js","assets/Monitor01-BMO5GW_Z.js","assets/Sun-BuiE9-Qr.js","assets/Package-CX9rDgp4.js","assets/Palette-BaZfD7NH.js","assets/Play-R6tzdzJz.js","assets/Plus-Bhgtdwjl.js","assets/SearchLg-CaDGdzKV.js","assets/SearchMd-DqAc-aF0.js","assets/Stars01-_MpByilY.js","assets/Trash01-CePc620H.js","assets/Upload01-DX6JXeV7.js","assets/User01-CuXkeRZu.js","assets/Users01-4GrNqNW2.js","assets/XCircle-bO1WYRjm.js","assets/X-Bg-qbBOB.js","assets/Zap-C63eteO6.js","assets/scroll-area--p0oLuFI.js","assets/select-CE4utxRu.js","assets/index-Zd0dTvge.js","assets/tooltip-SRIuIppn.js","assets/dialog-HZ9qQm76.js","assets/input-9TmKngWX.js","assets/runnable-block-editor-Bpz2RYcL.js","assets/use-session-runtime-Az3IhpTV.js","assets/decofile-api-D5j1--HW.js","assets/utils-DfrVSNtD.js","assets/sandbox-url-D3mC8qhT.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-SamLaVqt.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-DoaJMwv0.js","assets/use-copy-DIi60N72.js","assets/usage-stats-Cm6Eeoxn.js","assets/markdown-B7dRWvN8.js","assets/org-file-open-context-CgoXVQJH.js","assets/use-mobile-YjO30zbo.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-shF9Uwqi.js","assets/types-CZuWZKU6.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-zpb6f42t.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/shell-layout-DskZ7YaE.js","assets/avatar-YUwJoSeh.js","assets/download-app-dialog-D40FFt_i.js","assets/command-BUbzDbU_.js","assets/index-Rr3pxwiA.js","assets/integration-icon-CyoFiiYN.js","assets/project-icon-BNaK4V-S.js","assets/required-auth-layout-C8rnLRRD.js","assets/use-org-sso-DKeFIwB6.js","assets/shell-layout-CE2Eihra.css","assets/sheet-B4Gi1sGY.js","assets/use-connection--1qJj6iq.js","assets/use-navigate-to-agent-DLz5eqnM.js","assets/use-mcp-prompts-CNvxhVoK.js","assets/index-DkT0vWt0.js","assets/form-CBihhH6R.js","assets/label-DioQ1YA1.js","assets/use-thread-outputs-iNfVWX0R.js","assets/file-type-icon-BZYncmwg.js","assets/popover-D3y1e9f_.js","assets/monaco-editor-yW0L-r5i.js","assets/editor-BeNEyFY1.js","assets/calendar-Bz7iq98w.js","assets/textarea-DGI1GnBQ.js","assets/rich-text-link-control-BwrZ0Rq8.js","assets/switch-PUAtlc1q.js","assets/safe-image-url-D5z803Ot.js","assets/search-input-CBDtuFaQ.js","assets/tabs-CVORM5c5.js","assets/use-debounced-value-COVYb0FX.js","assets/use-file-configs-Blz7gQxO.js","assets/asset-utils-DB6jdzK1.js","assets/useInfiniteQuery-COtwxc8g.js","assets/infiniteQueryObserver-DWBRQw_v.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-nSkm1Zz5.js","assets/alert-dialog-MFqJ1LQJ.js","assets/sandbox-git-api-CMdpE2TE.js","assets/mustache-CmprohQX.js","assets/page-seo-form-DXBYSuZJ.js","assets/use-section-preview-base-CpYHheIc.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-CC-cqTMb.js"])))=>i.map(i=>d[i]);
2
- import{r as x,ao as Ft,aI as et,ap as Ee,c as ue,b as Le,j as n,K as as,e as is,h as Mt,B as Je,aJ as os,a0 as mn,aK as ls,Z as cs,l as ze,aH as Hn,P as Zt,q as ds,t as Un}from"./index-LuQPyfHg.js";import{A as us}from"./agent-view-guard-C7QN_-Wr.js";import{F as ms}from"./feature-gate-D0BTSOOI.js";import{a as fs,b as Bt}from"./chat-context-TY-WfTe2.js";import{t as Wn}from"./ChevronUp-BipIqZKN.js";import{v as pr,D as ps,E as hs,j as Xt,F as en,G as Vn,H as qn,I as Gn,z as gs,J as tn}from"./agent-icon-DufTIfP9.js";import{n as ln}from"./LinkExternal01-DRJgOkS5.js";import{s as Jn}from"./Plus-Bhgtdwjl.js";import{i as vs}from"./SearchLg-CaDGdzKV.js";import{P as xs,a as bs,b as ys}from"./popover-D3y1e9f_.js";import{a as pt,b as ht,c as hr,d as gr,e as vr,C as xr}from"./command-BUbzDbU_.js";import{d as ws,a as ks}from"./use-virtual-mcp-DNJANJ1O.js";import{c as br,d as fn,f as Ps}from"./sandbox-lifecycle-context-BmqpyoGL.js";import{e as Ss,d as js}from"./backoff-8mStPHYB.js";import{a as Es}from"./thread-intent-BlR8TpCF.js";import{u as yr}from"./use-session-runtime-Az3IhpTV.js";import{u as Ns}from"./use-mobile-YjO30zbo.js";import{c as lt,T as ct,a as dt}from"./tooltip-SRIuIppn.js";import{T as Ie}from"./toolbar-icon-button-I3CeX274.js";import{b as Cs,a as Rs,u as wr,g as Ts,c as Ls,B as nn,P as Os,r as _s,R as As,d as Ds,e as pn,f as kr,h as $s,l as Fs,m as Ms,i as Bs,p as zs,j as Is,S as rn}from"./runnable-block-editor-Bpz2RYcL.js";import{w as Ot}from"./variant-matcher-override-CC-cqTMb.js";import{N as Ks,b as Hs,s as tt,n as hn,c as Pr,f as Ke,v as Sr,h as Us,e as Ws,d as Vs,j as qs,k as Yn}from"./claim-phase-copy-0btUuJoC.js";import{r as Gs,w as Js,D as Ys,b as Qn,a as Qs}from"./section-preview-url-Csj0_ZDg.js";import{u as Zs}from"./use-fast-preview-draft-url-B17zQ9G8.js";import{r as jr,l as Er,u as Xs,w as ea}from"./last-preview-page-d2hxbLrX.js";import{u as ta}from"./use-is-desktop-app-BNujXJc_.js";import{a as na,c as Nr}from"./shell-layout-DskZ7YaE.js";import{u as cn}from"./useQueries-DVNbBLH1.js";import{i as ra}from"./ArrowRight-b56ImWX_.js";import{b as Cr,D as Rr,c as Tr,d as Lr,e as sa}from"./dialog-HZ9qQm76.js";import{I as Zn}from"./input-9TmKngWX.js";import{u as Or}from"./blocks-preview-workspace-context-Br_u1FrC.js";import{i as aa}from"./AlertCircle-DRpebp4h.js";import{E as gn}from"./empty-state-BSFJHfgC.js";import{i as ia}from"./X-Bg-qbBOB.js";import{M as oa}from"./monaco-editor-yW0L-r5i.js";import{R as Xn,a as _t,b as er}from"./resizable-_gRklRa4.js";import{r as la}from"./virtual-mcp-D9YcK0wc.js";import{b as sn}from"./use-project-scope-BQji3uMT.js";import{G as tr}from"./github-icon-BXivHfH-.js";import{R as ca}from"./repository-import-picker-DZK5nFkw.js";import{r as da}from"./use-main-panel-tabs-BP48EtIS.js";import{u as ua}from"./use-task-metadata-C_07VLsf.js";import{b as ma}from"./thread-route-mS20Kc2d.js";import"./use-panel-navigate-lA5Vutgx.js";import"./feature-paywall-DZmgqu99.js";import"./plan-ladder-LtgpxZ9m.js";import"./use-entitlements-CAw-4ybd.js";import"./autosend-LI2Q470J.js";import"./hooks-B6_FetIS.js";import"./use-mcp-client-Bd-tc7BB.js";import"./auth-BuR8_3Rx.js";import"./task-board--VJa6ODn.js";import"./schema-CTcdIHci.js";import"./use-ai-providers-D5fiM2J9.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Btc9Hw20.js";import"./use-organization-settings-Dt8pz_Xc.js";import"./Tool01-DHgpsL-M.js";import"./ArrowUp-C2RQRHDD.js";import"./ArrowLeft-Cqy0IIEv.js";import"./Tool02-DC4h3G7C.js";import"./TrendUp01-BRi4yW6T.js";import"./ZoomOut-B8Fl4ZUs.js";import"./Globe04-DaWdeD_h.js";import"./CheckCircle-jHqe_fbp.js";import"./UserSquare-DgZ1lpys.js";import"./Copy01-BXOyEXn_.js";import"./CreditCard01-gK8a476R.js";import"./DotsVertical-CBmcX5ZQ.js";import"./Download01-BqdbVKkx.js";import"./Settings02-CqejvZCP.js";import"./Eye-NHkb_0Hv.js";import"./Share07-BRS1J9YL.js";import"./Globe01-NGWhOOw4.js";import"./XClose-BL7URSGz.js";import"./Image01-DRwEr3Il.js";import"./Key01-CMNC3L72.js";import"./LayoutLeft-ULL_7jIQ.js";import"./Link01-DkJLSZKm.js";import"./Monitor01-BMO5GW_Z.js";import"./Sun-BuiE9-Qr.js";import"./Package-CX9rDgp4.js";import"./Palette-BaZfD7NH.js";import"./Play-R6tzdzJz.js";import"./SearchMd-DqAc-aF0.js";import"./Stars01-_MpByilY.js";import"./Trash01-CePc620H.js";import"./Upload01-DX6JXeV7.js";import"./User01-CuXkeRZu.js";import"./Users01-4GrNqNW2.js";import"./XCircle-bO1WYRjm.js";import"./Zap-C63eteO6.js";import"./index-Rr3pxwiA.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./index-Zd0dTvge.js";import"./decofile-api-D5j1--HW.js";import"./utils-DfrVSNtD.js";import"./pair-SamLaVqt.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-DoaJMwv0.js";import"./use-copy-DIi60N72.js";import"./usage-stats-Cm6Eeoxn.js";import"./markdown-B7dRWvN8.js";import"./org-file-open-context-CgoXVQJH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-shF9Uwqi.js";import"./types-CZuWZKU6.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-zpb6f42t.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-B4Gi1sGY.js";import"./integration-icon-CyoFiiYN.js";import"./use-connection--1qJj6iq.js";import"./use-navigate-to-agent-DLz5eqnM.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-CNvxhVoK.js";import"./index-DkT0vWt0.js";import"./form-CBihhH6R.js";import"./label-DioQ1YA1.js";import"./use-thread-outputs-iNfVWX0R.js";import"./file-type-icon-BZYncmwg.js";import"./scroll-area--p0oLuFI.js";import"./select-CE4utxRu.js";import"./calendar-Bz7iq98w.js";import"./textarea-DGI1GnBQ.js";import"./rich-text-link-control-BwrZ0Rq8.js";import"./switch-PUAtlc1q.js";import"./safe-image-url-D5z803Ot.js";import"./search-input-CBDtuFaQ.js";import"./tabs-CVORM5c5.js";import"./use-debounced-value-COVYb0FX.js";import"./use-file-configs-Blz7gQxO.js";import"./asset-utils-DB6jdzK1.js";import"./useInfiniteQuery-COtwxc8g.js";import"./infiniteQueryObserver-DWBRQw_v.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-nSkm1Zz5.js";import"./alert-dialog-MFqJ1LQJ.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-YUwJoSeh.js";import"./download-app-dialog-D40FFt_i.js";import"./project-icon-BNaK4V-S.js";import"./required-auth-layout-C8rnLRRD.js";import"./use-org-sso-DKeFIwB6.js";import"./editor-BeNEyFY1.js";import"./repository-picker-DKVkzLp4.js";import"./collection-search-Rv_Famau.js";import"./use-route-default-main-C-_nMKb3.js";import"./use-mcp-tools-Cdzxtrxv.js";import"./index-C1neAU7j.js";import"./drawer-CJCVps1a.js";import"./input-BdRVbgEc.js";import"./chat-draft-C8DDqrbp.js";import"./use-deco-credits-D6cSv2pt.js";import"./use-open-billing-url-BbkkoILM.js";import"./decopilot-CoQZcLAw.js";import"./checkbox-Bd0pVkFs.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-DyQrMS9n.js";import"./input-C9oONNic.js";import"./hooks-Cr7z1jDa.js";import"./use-org-fs-OA7i6aZv.js";import"./question-004-sINsf4GQ.js";import"./use-members-2Ck9xtlB.js";import"./use-org-auth-client-BWwsKUxX.js";import"./add-connection-dialog-D3_IjFEm.js";import"./extract-connection-data-CK3_iI7H.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DWSp4370.js";import"./connection-card-B_j7JUAi.js";import"./use-registry-connections-04qEX4iQ.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-BD3Obe6z.js";import"./authenticate-and-persist-oauth-B6q4FvBV.js";import"./mcp-oauth-CgVup_iI.js";import"./collection-tabs-BW0ALmEv.js";import"./badge-D82o8bXv.js";import"./use-infinite-scroll-CFc4g2v0.js";import"./useSuspenseInfiniteQuery-CgAI7poF.js";import"./use-project-native-view-presence-BIIs2cxk.js";import"./site-slug-uya6Wp4-.js";const fa={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function pa(t){const{previewState:e,progressStatus:s,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,c=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?fa:r&&i&&c?{mode:"production",iframeBase:c,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&s!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:c?{mode:"production",iframeBase:c,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ha=1e4,ga=1e3,va=3e4;function xa({iframeRef:t,src:e,active:s}){const r=x.useRef(0),i=x.useRef(null),u=x.useRef(null),c=x.useRef(e),d=x.useRef(s);c.current=e,d.current=s;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},l=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ha)},h=()=>{if(!d.current||!c.current)return;u.current&&clearTimeout(u.current);const E=Ss(va,ga,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,P=c.current;!g||!P||!d.current||(g.src=P,l())},E)},f=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),r.current=0,!(!s||!e))return l(),o},[e,s]),{handleLoad:f,handleError:p}}var nr;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(nr||(nr={}));const ba=Ft({tag:Ee(),id:Ee(),classes:Ee(),text:Ee(),html:Ee(),manifestKey:Ee().nullable(),componentName:Ee().nullable(),parents:Ee(),url:Ee(),path:Ee(),viewport:Ft({width:et(),height:et()}),position:Ft({x:et(),y:et()})}),ya=`(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 wa(t,e){const s=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 s;const c=(p,E)=>{const g=t[r[p]??0];return!g||!g.length?1:g.indexOf(e[E]??"")>=0?2:0},d=[],o=[];for(let p=0;p<=i;p++)d.push(new Array(u+1).fill(0)),o.push(new Array(u+1).fill(2));for(let p=1;p<=i;p++){const E=d[p-1]??[],g=d[p]??[],P=o[p]??[];for(let b=1;b<=u;b++){let v=E[b]??0,R=2;const y=g[b-1]??0;y>v&&(v=y,R=0);const w=c(p-1,b-1),k=(E[b-1]??0)+w;w>0&&k>v&&(v=k,R=1),g[b]=v,P[b]=R}}let l=0,h=i,f=u;for(;h>0&&f>0;){const p=o[h]?.[f]??2;p===1?(s[r[h-1]??0]=f-1,l++,h--,f--):p===0?f--:h--}if(l===0&&u===i)for(let p=0;p<i;p++)s[r[p]??0]=p;return s}const ka=Ft({sectionIndex:et(),manifestKey:Ee(),clickSeq:et()}),rr=`(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 = ${wa.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
- var renderInPlace = function(src, body) {
426
- if (renderCtrl) renderCtrl.abort();
427
- var ctrl = new AbortController();
428
- renderCtrl = ctrl;
429
- renderPending = true;
430
- highlight.style.display = "none";
431
- badge.style.display = "none";
432
- window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
433
- renderQueue = renderQueue.then(function() {
434
- return fetch(src, {
435
- method: "POST",
436
- body: body,
437
- signal: ctrl.signal,
438
- headers: { accept: "text/html", "content-type": "application/json" }
439
- }).then(function(res) {
440
- if (!res.ok) throw new Error("render " + res.status);
441
- return res.text();
442
- }).then(function(html) {
443
- var swap = function() {
444
- document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
445
- document.body.appendChild(highlight);
446
- document.body.appendChild(badge);
447
- // Old section is gone; hide the overlay until the next hover repositions it.
448
- highlight.style.display = "none";
449
- badge.style.display = "none";
450
- lastSection = null;
451
- };
452
- var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
453
- var doc = new DOMParser().parseFromString(headHtml, "text/html");
454
- var sheets = Array.prototype.map.call(
455
- doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
456
- function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
457
- );
458
- return Promise.all(sheets).then(function() {
459
- if (typeof document.startViewTransition === "function") {
460
- return document.startViewTransition(swap).finished;
461
- }
462
- swap();
463
- });
464
- }).then(function() {
465
- var t = document.getElementById("deco-disable-transitions");
466
- if (t) t.remove();
467
- if (ctrl === renderCtrl) renderPending = false;
468
- window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
469
- }).catch(function(err) {
470
- if (ctrl === renderCtrl) renderPending = false;
471
- if (err && err.name === "AbortError") return;
472
- window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
473
- });
474
- });
475
- };
476
-
477
- window.addEventListener("message", function(e) {
478
- // Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
479
- if (e.source !== window.parent) return;
480
- if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
481
- renderInPlace(e.data.src, e.data.body);
482
- return;
483
- }
484
- if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
485
- sectionLabels = e.data.labels;
486
- if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
487
- if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
488
- if (lastSection) {
489
- lastLabel = labelFor(lastSection);
490
- lastKind = kindFor(lastSection);
491
- applyColor(lastKind);
492
- if (highlight.style.display !== "none") positionHighlight(lastSection);
493
- }
494
- return;
495
- }
496
- // Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
497
- if (e.data && e.data.type === "cms-editor::clear-hover") {
498
- highlight.style.display = "none";
499
- badge.style.display = "none";
500
- lastSection = null;
501
- return;
502
- }
503
- if (e.data && e.data.type === "cms-editor::deactivate") {
504
- highlight.remove();
505
- badge.remove();
506
- document.removeEventListener("mousemove", moveHandler, true);
507
- document.removeEventListener("mouseout", outHandler, true);
508
- document.removeEventListener("click", clickHandler, true);
509
- // Or the page stays unnavigable after leaving Blocks mode.
510
- document.removeEventListener("click", navBlocker, true);
511
- document.removeEventListener("submit", submitBlocker, true);
512
- window.removeEventListener("scroll", reposition, { capture: true });
513
- window.removeEventListener("resize", reposition);
514
- window.__cmsEditorActive = false;
515
- }
516
- });
517
- })();`;function dn(t,e){let s=t,r=typeof s?.__resolveType=="string"?s.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const c=u.__resolveType;if(typeof c=="string"&&c&&c!==r){s=u,r=c;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(s.variants)?s.variants:[];if(i.length===0||i.every(d=>d?.rule?.__resolveType===Ks))return null;const c=[];for(const d of i){const o=d?.value;if(o&&typeof o=="object")for(const l of dn(o,e)??[])c.includes(l)||c.push(l)}return c}if(Hs(r)){const i=s.section&&typeof s.section=="object"?dn(s.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Xe(t){return t.replace(/[`*_]/g,"\\$&")}function Pa(t,e){const s=[`The user selected an element on the live preview and asked: **"${Xe(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&s.push(`**Section resolveType:** \`${Xe(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Xe(t.classes)}"`:""}>`;s.push(`**Clicked element:** \`${r}\``),t.parents&&s.push(`**DOM breadcrumb:** ${Xe(t.parents)} > ${t.tag}`),t.text&&s.push(`**Text content:** "${Xe(t.text)}"`),t.componentName&&s.push(`**Component name:** ${Xe(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return s.push("","**HTML snippet:**","```html",i,"```"),s.push("","Please read the source file, locate the element, and apply the requested change."),s.join(`
518
- `)}function Sa(t,e,s=320,r=44,i=12){const{x:u,y:c}=t,{width:d,height:o}=e,l=Math.max(i,Math.min(u-s/2,d-s-i)),f=c/o>.68?Math.max(i,c-r-18):Math.min(c+18,o-r-i);return{leftPct:l/d*100,topPct:f/o*100}}function ja(t){const e=ue.c(45),{element:s,onDismiss:r}=t,[i,u]=x.useState(""),c=x.useRef(null),{sendMessage:d}=fs(),{openSidePanel:o}=na(),l=Le();let h;e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==d?(h=()=>{if(!i.trim())return;const B=Pa(s,i);o(),d({parts:[{type:"text",text:B}]}),r()},e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=d,e[5]=h):h=e[5];const f=h;let p;e[6]!==s.position||e[7]!==s.viewport?(p=Sa(s.position,s.viewport),e[6]=s.position,e[7]=s.viewport,e[8]=p):p=e[8];const E=p,g=`${E.leftPct}%`,P=`${E.topPct}%`;let b;e[9]!==g||e[10]!==P?(b={left:g,top:P,width:"320px"},e[9]=g,e[10]=P,e[11]=b):b=e[11];let v;e[12]!==f?(v=B=>{B.preventDefault(),f()},e[12]=f,e[13]=v):v=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=B=>u(B.target.value),e[14]=R):R=e[14];let y;e[15]!==r?(y=B=>{B.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==l?(w=l("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=l,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=n.jsx("input",{ref:c,autoFocus:!0,type:"text",value:i,onChange:R,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 S;e[23]!==i?(S=i.trim(),e[23]=i,e[24]=S):S=e[24];const T=!S;let j;e[25]!==l?(j=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=j):j=e[26];let H;e[27]!==l?(H=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=H):H=e[28];let J;e[29]!==H?(J=n.jsx("title",{children:H}),e[29]=H,e[30]=J):J=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=n.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]!==J?(L=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[J,M]}),e[32]=J,e[33]=L):L=e[33];let _;e[34]!==T||e[35]!==j||e[36]!==L?(_=n.jsx("button",{type:"submit",disabled:T,className:"flex h-6 w-6 shrink-0 items-center justify-center classic:rounded-full compact:rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:L}),e[34]=T,e[35]=j,e[36]=L,e[37]=_):_=e[37];let A;e[38]!==k||e[39]!==_||e[40]!==v?(A=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:v,children:[k,_]}),e[38]=k,e[39]=_,e[40]=v,e[41]=A):A=e[41];let W;return e[42]!==A||e[43]!==b?(W=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:A}),e[42]=A,e[43]=b,e[44]=W):W=e[44],W}const sr="site-links",Ea=/details?page|\bpdp\b/i,Na=/listingpage|\bplp\b/i;function Ca(t,e,s){const r=new Set;for(const d of s)Ea.test(d)&&r.add("product"),Na.test(d)&&r.add("category");const i=tt(hn(t)),u=i[i.length-1],c=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&c?.type==="param"&&c.name===e&&r.add("product"),e==="*"&&i.some(d=>d.type==="param"&&d.name==="*")&&r.add("category"),r}const Ra=["rosa","preto","pink","black"];function At(t,e){const s=e.trim();return s?t(s):Ra.flatMap(r=>t(r))}function Ta(t,e){const s=e.trim(),r=[];/^\d+$/.test(s)&&r.push({resolveType:t,props:{ids:[s]}});const u=s.includes("-")&&!/\s/.test(s)?s.replace(/-+/g," "):s;return r.push({resolveType:t,props:{query:u,count:10}}),r}const _r=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function vn(t){return t.split("/")[0]??""}function La(t){const e=new Set;for(const s of t){const r=vn(s);_r.has(r)&&e.add(r)}return e}function Oa(t,e){const s=vn(t);return!_r.has(s)||e.size===0?!0:e.has(s)}const _a=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>At(s=>Ta(t,s),e),optionsFromPayload:Dt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>At(s=>[{resolveType:t,props:{props:{search:s,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Dt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>At(s=>[{resolveType:t,props:{term:s,hitsPerPage:10}}],e),optionsFromPayload:Dt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>At(s=>[{resolveType:t,props:{query:s,term:s,count:10,hitsPerPage:10}}],e),optionsFromPayload:Dt},{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:za}];function Aa(t,e,s=new Set){const r=[...e],i=d=>{const o=[];for(const l of _a){if(l.kind!==d)continue;const h=r.find(f=>l.test(f)&&Oa(f,s));h&&o.push({cand:l,resolveType:h})}return o.find(l=>s.has(vn(l.resolveType)))??o[0]},u=(d,o,l)=>({kind:d.kind,id:`${d.kind}:${o}`,resolveType:o,clientFilter:d.clientFilter,isFallback:l,buildRequests:h=>d.buildRequests(o,h),optionsFromPayload:d.optionsFromPayload}),c=[];for(const d of["product","category"]){if(!t.has(d))continue;const o=i(d);o&&c.push(u(o.cand,o.resolveType,!1))}return t.size>0&&c.push(Da(t.has("category")?"category":"product")),c}function Da(t){return{kind:t,id:sr,resolveType:sr,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,s)=>Wa(e,s)}}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function $a(t,e,s){const r=new Set,i=new Set,u=c=>{if(Array.isArray(c)){for(const l of c)u(l);return}const d=Ge(c);if(!d)return;const o=d.__resolveType;if(typeof o=="string"){if(s(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const l=Ge(e[o])?.__resolveType;typeof l=="string"&&s(l)&&r.add(o),u(e[o])}}for(const l of Object.values(d))u(l)};return u(t),r}function Ar(t){const e=new Set,s=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),s.push(i));return s}function Dr(t){try{return decodeURIComponent(t)}catch{return t}}function Fa(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ma(t){const e=[];let s="^";for(const r of t)r.type==="text"?s+=Fa(r.text):(e.push(r.name),s+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${s}$`),order:e}}function $r(t,e,s){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=tt(hn(e)),{pattern:u,order:c}=Ma(i),d=c.indexOf(s);if(d===-1)return null;const o=r.match(u);if(!o)return null;const l=o[d+1]?.replace(/^\/+|\/+$/g,"");return l?Dr(l):null}function Dt(t,e){const s=Ge(t),r=Array.isArray(t)?t:Array.isArray(s?.products)?s.products:Array.isArray(s?.list)?s.list:[],i=[],u=new Set;for(const c of r){const d=Ge(c);if(!d)continue;const o=$r(d.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const l=Ge(d.isVariantOf),h=typeof l?.name=="string"&&l.name||typeof d.name=="string"&&d.name||o,f=Array.isArray(d.image)?Ge(d.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ba(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const s=e.replace(/^\/+|\/+$/g,"");return s?Dr(s):null}function za(t){const e=[],s=new Set,r=(i,u)=>{const c=Ge(i);if(!c)return;const d=typeof c.name=="string"&&c.name?c.name:"",o=d?[...u,d]:u,l=Ba(c.url);if(l&&!s.has(l)&&(s.add(l),e.push({value:l,label:o.join(" › ")||l})),Array.isArray(c.children))for(const h of c.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Ia=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 Ka(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,s=>s.toUpperCase())}function Ha(t){if(typeof t!="string"||!t)return[];const e=[],s=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=s.exec(t))!==null&&i++<5e3;){const u=r[1]??"",c=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:c})}return e}function Ua(t){if(typeof t!="string"||!t)return[];const e=[],s=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,c=0;for(;(u=r.exec(t))!==null&&c++<3e3;){const d=(u[1]??"").replace(/\\\//g,"/");if(!d||s.has(d))continue;s.add(d);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:d,name:u[2]??"",image:o||void 0})}return e}function Wa(t,e){const s=[],r=new Set,i=(u,c,d,o)=>{if(s.length>=200)return;const l=$r(u,e.template,e.paramName);!l||r.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||d==="category"&&Ia.has(l.split("/")[0]??"")||(r.add(l),s.push({value:l,label:c&&c.length<=80?c:Ka(l),kind:d,image:o}))};for(const{url:u,name:c,image:d}of Ua(t))i(u,c,"product",d);for(const{href:u,text:c}of Ha(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,c,"category");return s}function ut(t,e,s=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,s)}const Fr=1e4;function Va(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 qa(t,{resolveType:e,props:s}){const r=await fetch(Cs(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...s}),signal:AbortSignal.timeout(Fr)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function ar(t,e){const s=await fetch(Rs(t,e),{signal:AbortSignal.timeout(Fr)});if(!s.ok)throw new Error(`Failed to fetch page: ${s.status}`);return s.text()}async function Ga(t,e,s){const r=e.optionsFromPayload(await ar(t,"/"),s),i=r.find(c=>c.kind==="category");if(!i)return r;const u=Ke(s.template,{[s.paramName]:i.value});if(u==="/")return r;try{const c=e.optionsFromPayload(await ar(t,u),s).filter(d=>d.kind==="product");return Ar([r,c])}catch{return r}}function Ja(t,e,s){return as.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":s}`)}async function Ya(t,e,s,r){if(e.homepageLinks)return Ga(t,e,r);const i=e.buildRequests?.(s)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(d=>qa(t,d))),c=u.filter(d=>d.status==="fulfilled").map(d=>d.value);if(c.length===0){const d=u.find(o=>o.status==="rejected");throw d?d.reason:new Error("Failed to fetch options")}return Ar(c.map(d=>e.optionsFromPayload(d,r)))}function un(t,e,s,r,i){return{queryKey:Ja(t,e,s),queryFn:()=>Ya(t,e,s,r),enabled:i,staleTime:6e4,retry:1}}function mt(t){const e=ue.c(16),{heading:s,iconKind:r,options:i,template:u,paramName:c,keyPrefix:d,onSelect:o}=t;if(i.length===0)return null;let l;if(e[0]!==r||e[1]!==d||e[2]!==o||e[3]!==i||e[4]!==c||e[5]!==u){let f;e[7]!==r||e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==u?(f=p=>n.jsxs(ht,{value:`${d}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?n.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(pr,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:p.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Ke(u,{[c]:p.value})})]})]},`${d}:${p.value}`),e[7]=r,e[8]=d,e[9]=o,e[10]=c,e[11]=u,e[12]=f):f=e[12],l=i.map(f),e[0]=r,e[1]=d,e[2]=o,e[3]=i,e[4]=c,e[5]=u,e[6]=l}else l=e[6];let h;return e[13]!==s||e[14]!==l?(h=n.jsx(pt,{heading:s,children:l}),e[13]=s,e[14]=l,e[15]=h):h=e[15],h}function ir(t){const e=ue.c(2),{text:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function or(t){const e=ue.c(52),{sources:s,template:r,paramName:i,value:u,sandboxRef:c,onCommit:d}=t,o=Le(),[l,h]=x.useState(!1),[f,p]=x.useState(""),[E,g]=x.useState(""),P=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,v=Va(o),y=[...new Set(s.map(V=>v[V.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,S={template:r,paramName:i};let T;e[3]!==f?(T=(V,Z)=>({source:V,query:Z,options:V.clientFilter?ut(Z.data??[],f):Z.data??[]}),e[3]=f,e[4]=T):T=e[4];const j=T,H=s.filter(si),J=s.filter(ri),M=cn({queries:H.map(V=>un(c,V,E,S,l))});let L;e[5]!==M||e[6]!==j?(L=(V,Z)=>j(V,M[Z]),e[5]=M,e[6]=j,e[7]=L):L=e[7];const _=H.map(L),A=_.length===0||_.every(ni),W=cn({queries:J.map(V=>un(c,V,E,S,l&&A))});let B;e[8]!==W||e[9]!==j?(B=(V,Z)=>j(V,W[Z]),e[8]=W,e[9]=j,e[10]=B):B=e[10];const X=J.map(B),I=A?X:_,$=I.length===1&&I[0]?.source.homepageLinks?I[0]:null,C=$&&!$.query.isLoading&&!$.query.isError?$?.query.data??[]:[],se=ut(C.filter(ti),f),Y=ut(C.filter(ei),f),Ne=se.length>0&&Y.length>0,ee=V=>{h(V),P.current&&clearTimeout(P.current),p(V?u:""),g(V?u:"")};let F;e[11]===Symbol.for("react.memo_cache_sentinel")?(F=V=>{p(V),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{g(V)},300)},e[11]=F):F=e[11];const ae=F,q=V=>{d(V),ee(!1)},Q=Pr(f),we=Ke(r,{[i]:Q}),te=Rr,K=Cr,me="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",pe=Xa;let ne;e[12]!==b||e[13]!==o?(ne=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=o,e[14]=ne):ne=e[14];let re;e[15]!==ne?(re=n.jsx(Tr,{className:"sr-only",children:n.jsx(Lr,{children:ne})}),e[15]=ne,e[16]=re):re=e[16];let xe;e[17]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(pr,{size:16,className:"shrink-0 text-foreground"}),e[17]=xe):xe=e[17];let le;e[18]!==o?(le=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=le):le=e[19];let he;e[20]!==b?(he=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=he):he=e[21];let ie;e[22]!==le||e[23]!==he?(ie=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[xe,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[le," ",he]})]}),e[22]=le,e[23]=he,e[24]=ie):ie=e[24];const ge=gr,nt=!1,Oe="min-h-0 flex-1";let be;e[25]!==k||e[26]!==f?(be=n.jsx(vr,{autoFocus:!0,placeholder:k,value:f,onValueChange:ae}),e[25]=k,e[26]=f,e[27]=be):be=e[27];const Ce=hr,zt="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let fe;e[28]!==o?(fe=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=fe):fe=e[29];let _e;e[30]!==fe?(_e=n.jsx(xr,{children:fe}),e[30]=fe,e[31]=_e):_e=e[31];const He=Q&&n.jsx(pt,{className:"shrink-0",children:n.jsxs(ht,{value:`__raw__:${Q}`,className:"gap-3 py-2",onSelect:()=>q(Q),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(ra,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:Q,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:we})]})]})}),$e=Ne?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(mt,{heading:v.category.heading,iconKind:"category",options:se,template:r,paramName:i,keyPrefix:`${$?.source.id}:cat`,onSelect:q})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(mt,{heading:v.product.heading,iconKind:"product",options:Y,template:r,paramName:i,keyPrefix:`${$?.source.id}:prod`,onSelect:q})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:I.map(V=>{const{source:Z,query:G,options:ve}=V,{noun:Ae}=v[Z.kind];if(G.isLoading)return n.jsx(ir,{text:o("sandbox.pathParamPickerChip.loading",{noun:Ae})},Z.id);if(G.isError)return n.jsx(ir,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},Z.id);if(Z.homepageLinks){const gt=G.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(mt,{heading:v.category.heading,iconKind:"category",options:ut(gt.filter(Za),f),template:r,paramName:i,keyPrefix:`${Z.id}:cat`,onSelect:q}),n.jsx(mt,{heading:v.product.heading,iconKind:"product",options:ut(gt.filter(Qa),f),template:r,paramName:i,keyPrefix:`${Z.id}:prod`,onSelect:q})]},Z.id)}return n.jsx(mt,{heading:I.length>1?v[Z.kind].heading:void 0,iconKind:Z.kind,options:ve,template:r,paramName:i,keyPrefix:Z.id,onSelect:q},Z.id)})});let ke;e[32]!==Ce||e[33]!==_e||e[34]!==He||e[35]!==$e?(ke=n.jsxs(Ce,{className:zt,children:[_e,He,$e]}),e[32]=Ce,e[33]=_e,e[34]=He,e[35]=$e,e[36]=ke):ke=e[36];let Fe;e[37]!==ge||e[38]!==be||e[39]!==ke?(Fe=n.jsxs(ge,{shouldFilter:nt,className:Oe,children:[be,ke]}),e[37]=ge,e[38]=be,e[39]=ke,e[40]=Fe):Fe=e[40];let ye;e[41]!==K||e[42]!==re||e[43]!==ie||e[44]!==Fe||e[45]!==pe?(ye=n.jsxs(K,{className:me,onClick:pe,children:[re,ie,Fe]}),e[41]=K,e[42]=re,e[43]=ie,e[44]=Fe,e[45]=pe,e[46]=ye):ye=e[46];let Ue;return e[47]!==te||e[48]!==ee||e[49]!==l||e[50]!==ye?(Ue=n.jsx(te,{open:l,onOpenChange:ee,children:ye}),e[47]=te,e[48]=ee,e[49]=l,e[50]=ye,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate classic:rounded-sm compact:rounded-lg bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:V=>{V.stopPropagation(),ee(!0)},children:u||b}),Ue]})}function Qa(t){return t.kind==="product"}function Za(t){return t.kind!=="product"}function Xa(t){return t.stopPropagation()}function ei(t){return t.kind==="product"}function ti(t){return t.kind!=="product"}function ni(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ri(t){return t.isFallback}function si(t){return!t.isFallback}function ai(t){const e=ue.c(8),{sources:s,template:r,paramName:i,sandboxRef:u,onFill:c}=t;let d,o;if(e[0]!==i||e[1]!==u||e[2]!==s||e[3]!==r){const E={template:r,paramName:i},g=s.filter(ii);o=cn,d=g.map(P=>un(u,P,"",E,!0)),e[0]=i,e[1]=u,e[2]=s,e[3]=r,e[4]=d,e[5]=o}else d=e[4],o=e[5];let l;e[6]!==d?(l={queries:d},e[6]=d,e[7]=l):l=e[7];const h=o(l),[f,p]=x.useState(!1);if(!f)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){p(!0),queueMicrotask(()=>c(g.value));break}}return null}function ii(t){return!t.isFallback}function lr(t){const e=ue.c(31),{name:s,value:r,onCommit:i}=t,u=Le(),[c,d]=x.useState(r),[o,l]=x.useState(!1),h=x.useRef(!1);let f;e[0]!==s||e[1]!==u?(f=s==="*"?u("sandbox.preview.catchAllParamLabel"):`:${s}`,e[0]=s,e[1]=u,e[2]=f):f=e[2];const p=f,E=c||p;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let 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 b,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>d(j.target.value),v=()=>l(!0),e[8]=b,e[9]=v):(b=e[8],v=e[9]);let R;e[10]!==r?(R=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,d(r),j.currentTarget.blur())},e[10]=r,e[11]=R):R=e[11];let y;e[12]!==c||e[13]!==i||e[14]!==r?(y=()=>{if(l(!1),h.current){h.current=!1;return}const j=Pr(c);d(j),j!==r&&i(j)},e[12]=c,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==c||e[17]!==p||e[18]!==P||e[19]!==R||e[20]!==y?(w=n.jsx("input",{type:"text",value:c,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:oi,onChange:b,onFocus:v,onKeyDown:R,onBlur:y}),e[16]=c,e[17]=p,e[18]=P,e[19]=R,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==g||e[23]!==w?(k=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,w]}),e[22]=g,e[23]=w,e[24]=k):k=e[24];let S;e[25]!==o||e[26]!==u?(S=o&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(ps,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=S):S=e[27];let T;return e[28]!==S||e[29]!==k?(T=n.jsxs(n.Fragment,{children:[k,S]}),e[28]=S,e[29]=k,e[30]=T):T=e[30],T}function oi(t){return t.stopPropagation()}function li(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const s=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${s.host}${r}`}catch{return e}}function ci(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function di(t){const e=ue.c(5);let s;e[0]!==t?(s=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=s):s=e[1];const r=wr(s);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:c,path:d,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const l=Ts(c),h=o?{...o,name:c,path:d}:Ls(c,d);return await r.mutateAsync({blockKey:l,data:h}),{key:l,name:c,path:d}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],is(i)}function ui(t){const e=ue.c(89),{open:s,onOpenChange:r,isPending:i,error:u,templates:c,onSubmit:d}=t,o=i===void 0?!1:i,l=Le();let h;e[0]!==l?(h=l("sectionsEditor.createPageModal.defaultPageName"),e[0]=l,e[1]=h):h=e[1];const[f,p]=x.useState(h);let E;e[2]!==l?(E=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=E):E=e[3];const[g,P]=x.useState(E),[b,v]=x.useState(nn),[R,y]=x.useState(null),[w,k]=x.useState(s);s!==w&&(k(s),s&&(p(l("sectionsEditor.createPageModal.defaultPageName")),P(l("sectionsEditor.createPageModal.defaultPagePath")),v(nn),y(null)));const S=!!c?.length;let T;e[4]!==o||e[5]!==r?(T=le=>{!le&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=T):T=e[6];const j=T;let H;e[7]!==o||e[8]!==f||e[9]!==d||e[10]!==g||e[11]!==S||e[12]!==b?(H=async le=>{le.preventDefault();const he=f.trim(),ie=g.trim();if(!he||!ie||o)return;const ge=Sr(ie);if(ge){y(ge);return}y(null),await d({name:he,path:ie,templateKey:S&&b!==nn?b:null})},e[7]=o,e[8]=f,e[9]=d,e[10]=g,e[11]=S,e[12]=b,e[13]=H):H=e[13];const J=H,M=R??u;let L;e[14]!==l?(L=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=L):L=e[15];let _;e[16]!==L?(_=n.jsx(Tr,{children:n.jsx(Lr,{children:L})}),e[16]=L,e[17]=_):_=e[17];let A;e[18]!==l?(A=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=A):A=e[19];let W;e[20]!==A?(W=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:A}),e[20]=A,e[21]=W):W=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=le=>p(le.target.value),e[22]=B):B=e[22];let X;e[23]!==l?(X=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=X):X=e[24];let I;e[25]!==o||e[26]!==f||e[27]!==X?(I=n.jsx(Zn,{id:"new-page-name",value:f,onChange:B,placeholder:X,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=X,e[28]=I):I=e[28];let $;e[29]!==I||e[30]!==W?($=n.jsxs("div",{className:"space-y-1.5",children:[W,I]}),e[29]=I,e[30]=W,e[31]=$):$=e[31];let U;e[32]!==l?(U=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=U):U=e[33];let C;e[34]!==U?(C=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:U}),e[34]=U,e[35]=C):C=e[35];let se;e[36]===Symbol.for("react.memo_cache_sentinel")?(se=le=>P(le.target.value),e[36]=se):se=e[36];let Y;e[37]!==l?(Y=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=Y):Y=e[38];let Ne;e[39]!==o||e[40]!==g||e[41]!==Y?(Ne=n.jsx(Zn,{id:"new-page-path",value:g,onChange:se,placeholder:Y,disabled:o}),e[39]=o,e[40]=g,e[41]=Y,e[42]=Ne):Ne=e[42];let ee;e[43]!==C||e[44]!==Ne?(ee=n.jsxs("div",{className:"space-y-1.5",children:[C,Ne]}),e[43]=C,e[44]=Ne,e[45]=ee):ee=e[45];let F;e[46]!==o||e[47]!==S||e[48]!==l||e[49]!==b||e[50]!==c?(F=S&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:l("sectionsEditor.createPageModal.templateLabel")}),n.jsx(Os,{id:"new-page-template",value:b,onChange:v,templates:c??[],disabled:o})]}),e[46]=o,e[47]=S,e[48]=l,e[49]=b,e[50]=c,e[51]=F):F=e[51];let ae;e[52]!==M?(ae=M&&n.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=ae):ae=e[53];let q;e[54]!==$||e[55]!==ee||e[56]!==F||e[57]!==ae?(q=n.jsxs("div",{className:"space-y-4 py-4",children:[$,ee,F,ae]}),e[54]=$,e[55]=ee,e[56]=F,e[57]=ae,e[58]=q):q=e[58];let Q;e[59]!==r?(Q=()=>r(!1),e[59]=r,e[60]=Q):Q=e[60];let we;e[61]!==l?(we=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=we):we=e[62];let te;e[63]!==o||e[64]!==Q||e[65]!==we?(te=n.jsx(Je,{type:"button",variant:"outline",onClick:Q,disabled:o,children:we}),e[63]=o,e[64]=Q,e[65]=we,e[66]=te):te=e[66];let K;e[67]!==o||e[68]!==f||e[69]!==g?(K=!f.trim()||!g.trim()||o,e[67]=o,e[68]=f,e[69]=g,e[70]=K):K=e[70];let me;e[71]!==o||e[72]!==l?(me=o?n.jsxs(n.Fragment,{children:[n.jsx(Mt,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=l,e[73]=me):me=e[73];let pe;e[74]!==K||e[75]!==me?(pe=n.jsx(Je,{type:"submit",disabled:K,children:me}),e[74]=K,e[75]=me,e[76]=pe):pe=e[76];let ne;e[77]!==te||e[78]!==pe?(ne=n.jsxs(sa,{children:[te,pe]}),e[77]=te,e[78]=pe,e[79]=ne):ne=e[79];let re;e[80]!==J||e[81]!==q||e[82]!==ne||e[83]!==_?(re=n.jsx(Cr,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:J,children:[_,q,ne]})}),e[80]=J,e[81]=q,e[82]=ne,e[83]=_,e[84]=re):re=e[84];let xe;return e[85]!==j||e[86]!==s||e[87]!==re?(xe=n.jsx(Rr,{open:s,onOpenChange:j,children:re}),e[85]=j,e[86]=s,e[87]=re,e[88]=xe):xe=e[88],xe}function mi(t){const e=ue.c(29),{orgSlug:s,virtualMcpId:r,branch:i,previewUrl:u,meta:c,decofile:d,blockKey:o}=t,l=Le();let h;e[0]!==i||e[1]!==s||e[2]!==r?(h={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=h):h=e[3];const f=wr(h);let p;e[4]!==f?(p=Ds((k,S)=>f.mutate({blockKey:k,data:S})),e[4]=f,e[5]=p):p=e[5];const E=p;let g;e[6]!==o||e[7]!==d?(g=_s(d,o),e[6]=o,e[7]=d,e[8]=g):g=e[8];const{resolveType:P,props:b,title:v}=g;if(!P){let k;e[9]!==l?(k=l("sandbox.preview.loaderNoLongerExists"),e[9]=l,e[10]=k):k=e[10];let S;return e[11]!==k?(S=n.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]=S):S=e[12],S}const R=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==v?(y={mode:"saved",blockKey:o,resolveType:P,title:v},e[13]=o,e[14]=P,e[15]=v,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==d||e[19]!==c||e[20]!==s||e[21]!==u||e[22]!==b||e[23]!==f.isPending||e[24]!==E||e[25]!==R||e[26]!==y||e[27]!==r?(w=n.jsx(As,{orgSlug:s,virtualMcpId:r,branch:i,previewUrl:u,meta:c,decofile:d,kind:"loaders",target:y,initialValue:b,isCreating:f.isPending,onCreate:fi,onSaveReferencedBlock:E,showRun:!1},R),e[17]=i,e[18]=d,e[19]=c,e[20]=s,e[21]=u,e[22]=b,e[23]=f.isPending,e[24]=E,e[25]=R,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function fi(){}function pi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function cr(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:pi(t.error)}}function hi(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 gi(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=hi(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const s=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return s&&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"}:s?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 vi="https://github.com/decocms/blocks";function xi(){const t=ue.c(14),e=Le();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(hs,{size:48,className:"text-muted-foreground"}),t[0]=s):s=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 c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ln,{size:14}),t[7]=c):c=t[7];let d;t[8]!==u?(d=n.jsx(Je,{size:"sm",asChild:!0,children:n.jsxs("a",{href:vi,target:"_blank",rel:"noreferrer",children:[u,c]})}),t[8]=u,t[9]=d):d=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==d?(o=n.jsx(gn,{className:"h-full w-full",image:s,title:r,description:i,actions:d}),t[10]=r,t[11]=i,t[12]=d,t[13]=o):o=t[13],o}function bi(t){const e=ue.c(15),{source:s,onRetry:r}=t,i=Le();let u;e[0]!==s||e[1]!==i?(u=i(s==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=s,e[1]=i,e[2]=u):u=e[2];const c=u;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(aa,{size:48,className:"text-muted-foreground"}),e[3]=d):d=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let l;e[6]!==i?(l=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=l):l=e[7];let h;e[8]!==r||e[9]!==l?(h=n.jsx(Je,{variant:"outline",size:"sm",onClick:r,children:l}),e[8]=r,e[9]=l,e[10]=h):h=e[10];let f;return e[11]!==c||e[12]!==o||e[13]!==h?(f=n.jsx(gn,{image:d,title:o,description:c,actions:h}),e[11]=c,e[12]=o,e[13]=h,e[14]=f):f=e[14],f}const yi=x.lazy(()=>os(()=>import("./sections-editor-DohMT2TR.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])).then(t=>({default:t.SectionsEditor})));function dr(t){const e=ue.c(49),{virtualMcpId:s,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:c}=mn(),{currentBranch:d,taskId:o}=Bt(),l=br(),h=fn(),f=Or(),p=l.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==d||e[1]!==c||e[2]!==E||e[3]!==o||e[4]!==s?(g=d?{orgSlug:c.slug,virtualMcpId:s,branch:d,threadId:o??null,previewUrl:E}:null,e[0]=d,e[1]=c,e[2]=E,e[3]=o,e[4]=s,e[5]=g):g=e[5];const P=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const v=pn(P,b);let R;e[8]!==p?(R={fetchEnabled:p},e[8]=p,e[9]=R):R=e[9];const y=kr(P,R),w=gi({lifecyclePhase:l.lifecycle.phase,decofile:cr(v),meta:cr(y),hasEditableContent:Us(v.data,y.data),fastPreviewActive:yr(s).runtime==="cms"}),k=wi;if(w.kind==="loading"){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=k(n.jsx(ls,{})),e[10]=C):C=e[10],C}if(w.kind==="empty"){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=k(n.jsx(xi,{})),e[11]=C):C=e[11],C}if(w.kind==="error"){let C;e[12]!==v||e[13]!==h||e[14]!==y||e[15]!==w.source?(C=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([v.refetch(),y.refetch()])},e[12]=v,e[13]=h,e[14]=y,e[15]=w.source,e[16]=C):C=e[16];const se=C;let Y;return e[17]!==se||e[18]!==w.source?(Y=k(n.jsx(bi,{source:w.source,onRetry:se})),e[17]=se,e[18]=w.source,e[19]=Y):Y=e[19],Y}let S;e[20]===Symbol.for("react.memo_cache_sentinel")?(S=C=>k(n.jsx("div",{className:"h-full min-h-0",children:C})),e[20]=S):S=e[20];const T=S,j=f.state.target;if(j?.kind==="loader"&&v.data&&y.data){const C=d??"",se=E??null;let Y;return e[21]!==v.data||e[22]!==y.data||e[23]!==c.slug||e[24]!==C||e[25]!==se||e[26]!==j.key||e[27]!==s?(Y=T(n.jsx(mi,{orgSlug:c.slug,virtualMcpId:s,branch:C,previewUrl:se,meta:y.data,decofile:v.data,blockKey:j.key})),e[21]=v.data,e[22]=y.data,e[23]=c.slug,e[24]=C,e[25]=se,e[26]=j.key,e[27]=s,e[28]=Y):Y=e[28],Y}let H;e[29]!==d||e[30]!==c.slug||e[31]!==j||e[32]!==s?(H=j||!d?null:jr(Er(c.slug,s,d)),e[29]=d,e[30]=c.slug,e[31]=j,e[32]=s,e[33]=H):H=e[33];const J=H;let M="/",L=null,_=null;j?.kind==="page"?(M=j.path,L=j.key):j?.kind==="section"?_=j.key:J&&(M=J.path,L=J.pageKey);const A=L?`page:${L}`:_?`section:${_}`:`path:${M}`;let W;e[34]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(Mt,{className:"size-5 text-muted-foreground"})}),e[34]=W):W=e[34];const B=d??"",X=E??void 0,I=_?null:u,$=!!L&&f.state.editSeoPageKey===L;let U;return e[35]!==_||e[36]!==L||e[37]!==M||e[38]!==A||e[39]!==i||e[40]!==c.slug||e[41]!==I||e[42]!==$||e[43]!==B||e[44]!==X||e[45]!==s||e[46]!==f.consumeEditSeo||e[47]!==f.setVariantOverride?(U=T(n.jsx(x.Suspense,{fallback:W,children:n.jsx(yi,{orgSlug:c.slug,virtualMcpId:s,branch:B,previewReady:!0,previewUrl:X,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:_,externalSelection:I,initialEditSeo:$,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onViewJsonFile:i},A)})),e[35]=_,e[36]=L,e[37]=M,e[38]=A,e[39]=i,e[40]=c.slug,e[41]=I,e[42]=$,e[43]=B,e[44]=X,e[45]=s,e[46]=f.consumeEditSeo,e[47]=f.setVariantOverride,e[48]=U):U=e[48],U}function wi(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function ur(t){const e=ue.c(44),{virtualMcpId:s,pageKey:r,onClose:i,ref:u}=t,c=Le(),{org:d}=mn(),{currentBranch:o,taskId:l}=Bt(),f=fn().previewUrl;let p;e[0]!==o||e[1]!==d.slug||e[2]!==f||e[3]!==l||e[4]!==s?(p=o?{orgSlug:d.slug,virtualMcpId:s,branch:o,threadId:l??null,previewUrl:f}:null,e[0]=o,e[1]=d.slug,e[2]=f,e[3]=l,e[4]=s,e[5]=p):p=e[5];const g=pn(p),P=o??"";let b;e[6]!==d.slug||e[7]!==P||e[8]!==s?(b={orgSlug:d.slug,virtualMcpId:s,branch:P},e[6]=d.slug,e[7]=P,e[8]=s,e[9]=b):b=e[9];const{save:v,flush:R}=$s(b),y=g.data?.[r],w=g.data===void 0&&g.isLoading,k=g.data!==void 0&&y===void 0,S=!o||k||w;let T;e[10]!==y?(T=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=T):T=e[11];const j=T;let H;e[12]!==r||e[13]!==S||e[14]!==v?(H=U=>{if(S)return;let C;try{C=JSON.parse(U)}catch{return}C===null||typeof C!="object"||Array.isArray(C)||v(r,C)},e[12]=r,e[13]=S,e[14]=v,e[15]=H):H=e[15];const J=H;let M;e[16]!==R?(M=()=>({flush:R}),e[16]=R,e[17]=M):M=e[17],x.useImperativeHandle(u,M);let L;e[18]!==c?(L=c("sectionsEditor.pageJsonDialog.titleShort"),e[18]=c,e[19]=L):L=e[19];let _;e[20]!==L?(_=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:L}),e[20]=L,e[21]=_):_=e[21];let A;e[22]!==c?(A=c("sectionsEditor.pageJsonDialog.close"),e[22]=c,e[23]=A):A=e[23];let W;e[24]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(ia,{size:14}),e[24]=W):W=e[24];let B;e[25]!==i||e[26]!==A?(B=n.jsx(Je,{variant:"ghost",size:"icon",onClick:i,"aria-label":A,className:"size-7 shrink-0",children:W}),e[25]=i,e[26]=A,e[27]=B):B=e[27];let X;e[28]!==B||e[29]!==_?(X=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[_,B]}),e[28]=B,e[29]=_,e[30]=X):X=e[30];let I;e[31]!==g.data||e[32]!==R||e[33]!==j||e[34]!==w||e[35]!==k||e[36]!==r||e[37]!==S||e[38]!==J||e[39]!==c?(I=w?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(Mt,{className:"size-5 text-muted-foreground"})}):k?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",c("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(oa,{code:j,language:"json",readOnly:S,height:"100%",onChange:U=>J(U??""),onSave:U=>{J(U),R()}},`${r}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=R,e[33]=j,e[34]=w,e[35]=k,e[36]=r,e[37]=S,e[38]=J,e[39]=c,e[40]=I):I=e[40];let $;return e[41]!==X||e[42]!==I?($=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[X,I]}),e[41]=X,e[42]=I,e[43]=$):$=e[43],$}function Mr(t){return t.contentEditingEnabled&&!t.isMobile}function ki(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Pi(t){return Mr({contentEditingEnabled:Nr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Si(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const ji=500,Ei={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},mr=1,an=["desktop","mobile","tablet"],$t={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function fr(t,e){try{const s=new URL(t,window.location.href);return s.searchParams.set("deviceHint",e),s.href}catch{return t}}function Ni(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function ft(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function on(t,e){try{return new URL(t,e).href}catch{return null}}function Ci(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 s={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:s,effective:s.url}}return{pin:t,effective:t?.url??null}}function Ri(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ti(t,e,s){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),c=o=>{if(o===s)return 100;const l=o.indexOf(s);if(l===-1)return 0;let h=40;return l===0?h+=30:/[\s/-]/.test(o[l-1]??"")&&(h+=20),h+=Math.round(s.length/o.length*20),h};let d=Math.max(c(r),c(i));return u.at(-1)===s?d=Math.max(d,95):u.includes(s)&&(d=Math.max(d,90)),d}function Li(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Oi({virtualMcpId:t}){const e=cs(),s=x.useRef(null),r=Le(),i=ta(),u=Ns(),{currentBranch:c,taskId:d,virtualMcpId:o}=Bt(),l=Or(),h=ws(o===t?t:null),f=yr(t),p=la(h?.metadata?.ui?.layout??null),E=Nr(p),g=Mr({contentEditingEnabled:E,isMobile:u}),[P,b]=x.useState(()=>Pi({cmsMode:p,isMobile:u})),[v,R]=x.useState("desktop"),[y,w]=x.useState(null),[k,S]=x.useState(null),T=x.useRef(null),j=x.useRef(null),[H,J]=x.useState(!1),M=x.useRef(null),L=()=>{M.current?.flush(),J(!1)},_=()=>J(a=>(a&&M.current?.flush(),!a)),[A,W]=x.useState({width:0,height:0}),[B,X]=x.useState(null),[I,$]=x.useState(!1),[U,C]=x.useState(""),[se,Y]=x.useState(!1),[Ne,ee]=x.useState(),[F,ae]=x.useState(null),[q,Q]=x.useState(null),[we,te]=x.useState(null),[K,me]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[pe,ne]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[re,xe]=x.useState({}),[le,he]=x.useState(!1),ie=x.useRef(null),ge=()=>{he(!0),ie.current&&clearTimeout(ie.current),ie.current=setTimeout(()=>he(!1),15e3)},nt=()=>{ie.current&&(clearTimeout(ie.current),ie.current=null),he(!1)},{org:Oe}=mn(),be=br(),Ce=fn(),zt=Ce.vmEntry,fe=Ce.previewUrl,_e=be.lifecycle.phase,He=_e==="running",$e=h?.id===t?Es(h.metadata):null,ke=h?.id===t&&f.runtime==="cms",Fe=f.projectDefault==="cms",ye=Gs({sandboxUrl:fe,previewServerUrl:$e,fastPreviewActive:ke}),Ue=t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c,threadId:d??null,previewUrl:fe}:null,V=pn(Ue,{fetchEnabled:He}),Z=kr(Ue,{fetchEnabled:He}),G=V.data,ve=Z.data,Ae=G?Ws(G).sort((a,m)=>a.name.localeCompare(m.name)):[],gt=t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c}:null,xn=di(gt),vt=G&&ve?Vs(G,ve):[],bn=G&&ve?Fs(ve,G,"loaders"):[],Me=U?(()=>{const a=U.toLowerCase();return Ae.map(m=>({page:m,score:Ti(m.name,m.path,a)})).filter(({score:m})=>m>0).sort((m,N)=>N.score-m.score||m.page.path.length-N.page.path.length).map(({page:m})=>m)})():Ae,Ye=vt.filter(a=>{if(!U)return!0;const m=U.toLowerCase();return a.name.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),It=g?bn:[],rt=It.filter(a=>{if(!U)return!0;const m=U.toLowerCase();return a.title.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),We=q?bn.find(a=>a.key===q)??null:null,Re=hn,xt=F||q?null:qs(Ae,K,pe),Kt=F?F.name:We?.title??xt?.name,D=xt?.key??null,bt=xt?.path??null,Be=(D?re[D]:void 0)??{},Pe=Ke(K,Be),yt={};if(He&&fe&&ve&&G){const a=Ms(ve,"loaders"),m=D?G[D]:void 0,N=$a(m,G,oe=>a.has(oe)),O=La(N);for(const oe of tt(K)){if(oe.type!=="param")continue;const De=Ca(K,oe.name,N),je=Aa(De,a,O);je.length>0&&(yt[oe.name]=je)}}const Qe=t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c,threadId:d??null}:null,yn=G&&D?Bs(G,D,0):[],wn=G?zs(yn,G):[],Ht=wn.map(a=>a.isSavedBlock?a.label:""),Ut=wn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Wt=yn.map(a=>dn(a,G??{})),kn=x.useRef(null),Te=x.useRef(null),Br=be.status.state==="paused",Vt=be.phase,Pn=Is({claimPhase:Vt,lifecycle:be.lifecycle}),Ve=Ce.previewState,zr=Ce.userStopped,Ir=Xs(Oe.slug,t??"",c??""),{url:qe}=Zs(ke&&t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c,previewServerUrl:$e??null,path:Pe}:null),Kr=Fe&&f.runtime==="sandbox",z=pa({previewState:Ve,progressStatus:Pn.status,previewServerUrl:$e,fastPreviewActive:ke,fastPreviewReady:!!qe,codingSession:Kr}),st=z.mode!=="none",Sn=z.mode==="production"&&z.iframeBase?ft(z.iframeBase):null,Hr=!i,Ze=z.mode==="production"?Sn:ft(fe),Ur=h?.id===t&&h.metadata?.fastPreviewInPlace===!0,at=z.mode==="production"&&ke&&Ur&&g&&P==="blocks",jn=x.useRef(null),{pin:Wr,effective:Vr}=Ci(jn.current,{inPlaceRenderActive:at,draftPreviewUrl:qe,resolvedPath:Pe});jn.current=Wr;const Se=Ni(z.mode==="sandbox"?Ot(fr(we??on(Pe,z.iframeBase)??z.iframeBase,v),l.state.variantOverride??[]):z.mode==="production"&&Hr?Ot(fr(Js(we??Vr??on(Pe,z.iframeBase)??z.iframeBase,z.showWakingPill?Ys:null),v),l.state.variantOverride??[]):null);x.useEffect(()=>{},[i,Sn,B]);const qt="sandbox.preview.openInNewTab",En=qe??(z.iframeBase?on(Pe,z.iframeBase):null),qr=z.mode==="production"?En?Ot(En,l.state.variantOverride??[]):null:Se??z.iframeBase,Nn=async()=>{const a=qr;if(a){window.open(a,"_blank","noopener");return}},wt=t&&c?Er(Oe.slug,t,c):null,kt=a=>{wt&&ea(wt,a)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!ye||!ve))if(ce.kind==="page"){const a=re[ce.key]??{};Te.current=Ke(ce.path,a),ae(null),Q(null),te(null),ne(ce.key),me(ce.path),kt({path:ce.path,pageKey:ce.key,params:a})}else if(ce.kind==="loader")Te.current=null,ae(null),Q(ce.key),te(null);else{const a=vt.find(m=>m.key===ce.key);if(a){Te.current=null;const m=Yn(ve);Q(null),ae(a),te(Qn(ye,m,a.key))}}},[ce,ye,ve,re]),x.useEffect(()=>{!D||bt===null||ce?.kind==="page"&&ce.key===D&&ce.path===bt||l.selectTarget({kind:"page",key:D,path:bt})},[D,bt,ce]);const[Cn,Gr]=x.useState(null);if(Ve.kind==="iframe"&&Cn!==Ve.previewUrl){const a=Cn!==null;Gr(Ve.previewUrl);const m=wt?jr(wt):null;if(m){if(Te.current=Ke(m.path,m.params),me(m.path),ne(m.pageKey),te(null),ae(null),Q(null),m.pageKey&&Object.keys(m.params).length>0){const N=m.pageKey;xe(O=>({...O,[N]:m.params}))}}else a&&(Te.current=null,me("/"),te(null),ne(null),ae(null),Q(null))}kn.current=Se;const Rn=xa({iframeRef:T,src:z.mode==="sandbox"?Se:null,active:z.mode==="sandbox"}),Tn=x.useRef(null);x.useEffect(()=>{if(!qe||!Se||Tn.current===qe)return;Tn.current=qe;const a=T.current;a&&a.getAttribute("src")!==Se&&(ge(),a.src=Se)},[qe,Se]);const Ln=()=>{const a=T.current?.contentWindow,m=Ze;if(!a||!m||!G||!D)return;const N=G[D];if(!N||typeof N!="object")return;const O=Qs({previewBaseUrl:m,pageBlock:N,decofile:G,path:Pe,pathTemplate:K});if(!O)return;const oe=Ot(O.src,l.state.variantOverride??[]);a.postMessage({type:"cms-editor::render",src:oe,body:O.body},m)},Gt=x.useRef(null);x.useEffect(()=>{if(!at||F||q||!D||!G){Gt.current=null;return}const a={nav:JSON.stringify({page:D,path:Pe,pathTemplate:K}),content:JSON.stringify(G)},m=Ri(Gt.current,a);Gt.current=a,m&&Ln()},[G,at,F,q,D,Pe,K]);const Jt=x.useRef(null);x.useEffect(()=>{if(!at||F||q||!D||!G){Jt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Jt.current;Jt.current={page:D,sig:a},!(!m||m.page!==D||m.sig===a)&&Ln()},[l.state.variantOverride,at,F,q,D]);const Jr=!!t&&!!c&&!be.notFound&&!zr&&!Br&&(Vt?.kind==="ready"||_e!=="idle"),de=Si({editingMode:P,sandboxDisplay:z.mode==="sandbox",blocksEditingEnabled:g});x.useEffect(()=>{const a=Ze;if(!a)return;const m=N=>{if(N.origin===a)if(N.data?.type==="visual-editor::element-clicked"){const O=ba.safeParse(N.data.payload);O.success&&w(O.data)}else if(N.data?.type==="cms-editor::section-clicked"){const O=ka.safeParse(N.data.payload);O.success&&S({index:O.data.sectionIndex,seq:O.data.clickSeq})}else N.data?.type==="cms-editor::render-start"?ge():N.data?.type==="cms-editor::render-end"?(nt(),T.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Ht,kinds:Ut,keys:Wt},a)):N.data?.type==="cms-editor::render-error"&&nt()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[Ze,Ht,Ut,Wt]);const On=()=>{const a=T.current?.contentWindow,m=ft(fe);!a||!m||a.postMessage({type:"visual-editor::activate",script:ya},m)},Yr=()=>{const a=T.current?.contentWindow,m=ft(fe);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Yt=()=>{const a=T.current?.contentWindow,m=Ze;!a||!m||(a.postMessage(z.mode==="production"?{type:"editor::inject",args:{script:rr}}:{type:"visual-editor::activate",script:rr},m),a.postMessage({type:"cms-editor::set-labels",labels:Ht,kinds:Ut,keys:Wt},m))},Qr=()=>{const a=T.current?.contentWindow,m=Ze;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},Zr=()=>{const a=T.current?.contentWindow,m=Ze;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},Qt=a=>{if(a==="blocks"&&!g)return;const m=P;!u&&a!==m&&(a==="blocks"?j.current?.resize("30%"):j.current?.collapse()),a!=="blocks"&&L(),b(a),w(null),S(null),a!=="blocks"&&Q(null),m==="visual"&&Yr(),a==="visual"&&On(),m==="blocks"&&a!=="blocks"&&Qr(),a==="blocks"&&Yt()},_n=()=>{Qt(ki(P,g))},An=()=>{if(!T.current||!Se)return;ge();const a=T.current;a.src=Se};Ps(()=>{const a=T.current;if(!a)return;ge();const m=document.activeElement,N=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Li(a,kn.current);let O;const oe=()=>{clearTimeout(O),a.tabIndex=N,a.style.pointerEvents="";const De=document.activeElement;(!De||De===document.body||De===a)&&m?.focus(),a.removeEventListener("load",oe)};a.addEventListener("load",oe),O=setTimeout(oe,3e3)});const Dn=()=>{const a=an.indexOf(v);R(an[(a+1)%an.length])},it=(a,m)=>{if(!D)return;const N=D,O={...Be,[a]:m};Te.current=Ke(K,O),xe(oe=>({...oe,[N]:O})),kt({path:K,pageKey:N,params:O})},Pt=li({iframeBase:z.iframeBase,resolvedPath:Pe,activeGlobalSectionName:F?.name??null,noServerLabel:r("sandbox.preview.noServerRunning")}),St=a=>{const m=re[a.key]??{},N=Ke(a.path,m);(F||Re(N)!==Re(Pe))&&ge(),Te.current=N,ae(null),Q(null),te(null),S(null),ne(a.key),me(a.path),kt({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})},$n=a=>{if(!ye||!ve){Un.error(r("sandbox.preview.previewMetadataNotReady"));return}ge(),Te.current=null;const m=Yn(ve),N=Qn(ye,m,a.key);ae(a),Q(null),te(N),S(null),l.selectTarget({kind:"section",key:a.key})},Fn=a=>{g&&(ae(null),Q(a.key),te(null),Qt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Xr=async({name:a,path:m,templateKey:N})=>{if(!t||!c)return;const O=Sr(m);if(O){ee(O);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Ae.some(je=>Re(je.path)===Re(oe))){ee(r("sandbox.preview.pageAlreadyExists",{path:oe}));return}let De;if(N&&(De=G?.[N],!De)){ee(r("sandbox.preview.templateNoLongerExists"));return}ee(void 0);try{const je=await xn.mutateAsync({name:a,path:oe,template:De});Y(!1),Un.success(r("sandbox.preview.pageCreated",{name:a})),await js(ji),St({key:je.key,name:je.name,path:je.path}),Qt("blocks")}catch(je){ee(je instanceof Error?je.message:r("sandbox.preview.failedToCreatePage"))}},ot=st&&(Jr||z.mode==="production"),Mn=ci({showPreviewToolbar:ot,contentEditingEnabled:E}),jt=()=>{$(!1),C("")},Et=ft($e??fe),Nt=F?.name??We?.title??xt?.name,Ct=F?`section:${F.key}`:q?`loader:${q}`:D?`page:${D}`:void 0,es=ot?Mn?n.jsxs(xs,{open:I,onOpenChange:a=>{$(a),a||C("")},children:[n.jsx(bs,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":r("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:F||We?Nt:[Et,Nt,K].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-0 items-stretch overflow-hidden whitespace-nowrap rounded-lg 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:[!F&&!We&&Et&&n.jsx("span",{"data-testid":"preview-page-origin",className:"flex min-w-0 max-w-56 items-center border-r border-border/60 bg-muted/60 px-2 font-mono text-muted-foreground @max-xl/panel-toolbar:max-w-1/4",children:n.jsx("span",{className:"truncate",children:Et})}),n.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[F&&n.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:[n.jsx(Xt,{size:11}),r("sandbox.preview.globalBadge")]}),We&&n.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:[n.jsx(en,{size:11}),r("sandbox.preview.loaderBadge")]}),(Nt||!Et)&&n.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:Nt??Pt}),!F&&!We&&n.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:K}),n.jsx(Wn,{size:12,className:ze("shrink-0 transition-transform",I&&"rotate-180")})]})]})}),n.jsxs(ys,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[n.jsxs(gr,{shouldFilter:!1,defaultValue:Ct,children:[n.jsx(vr,{value:U,onValueChange:C,placeholder:r("sandbox.preview.searchPagesAndComponents")}),n.jsxs(hr,{className:"max-h-80",children:[n.jsx(xr,{children:Ae.length===0&&vt.length===0&&It.length===0?r("sandbox.preview.noPagesFound"):r("sandbox.preview.noSearchResults")}),Me.length>0&&n.jsx(pt,{children:Me.map(a=>n.jsxs(ht,{value:`page:${a.key}`,"aria-current":Ct===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{jt(),St(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),n.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))}),Ye.length>0&&n.jsx(pt,{heading:r("sandbox.preview.globalComponents"),children:Ye.map(a=>n.jsx(ht,{value:`section:${a.key}`,"aria-current":Ct===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{jt(),$n(a)},children:n.jsx("span",{className:"truncate",children:a.name})},a.key))}),rt.length>0&&n.jsx(pt,{heading:r("sandbox.preview.globalLoaders"),children:rt.map(a=>n.jsx(ht,{value:`loader:${a.key}`,"aria-current":Ct===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{jt(),Fn(a)},children:n.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!F&&!q&&tt(K).some(a=>a.type!=="text")&&n.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:tt(K).map((a,m)=>{if(a.type==="text")return n.jsx("span",{children:a.text},`text-${m}`);const N=yt[a.name];return N&&Qe?n.jsx(or,{sources:N,template:K,paramName:a.name,value:Be[a.name]??"",sandboxRef:Qe,onCommit:O=>it(a.name,O)},`${D}:${a.name}`):n.jsx(lr,{name:a.name,value:Be[a.name]??"",onCommit:O=>it(a.name,O)},`${D}:${a.name}`)})}),n.jsx("div",{className:"border-t p-1.5",children:n.jsxs(Je,{variant:"ghost",className:"w-full justify-start",onClick:()=>{jt(),ee(void 0),Y(!0)},children:[n.jsx(Jn,{size:16}),r("sandbox.preview.createNewPage")]})})]})]}):n.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Pt}):null,Bn=ot||E?n.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:Dn,"aria-label":r($t[v]),children:v==="mobile"?n.jsx(Vn,{size:16}):v==="tablet"?n.jsx(qn,{size:16}):n.jsx(Gn,{size:16})})}),n.jsx(dt,{children:r($t[v])})]}),es,n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(Ie,{onClick:()=>{Nn()},"aria-label":r(qt),children:n.jsx(ln,{size:16})}),n.jsx(Ie,{onClick:An,"aria-label":r("sandbox.preview.refresh"),children:n.jsx(Hn,{size:16})})]})]}):null,Rt=!e&&ot?n.jsxs(n.Fragment,{children:[n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:An,"aria-label":r("sandbox.preview.refresh"),children:n.jsx(Hn,{size:16})})}),n.jsx(dt,{side:"bottom",children:r("sandbox.preview.refresh")})]}),Mn?n.jsxs("div",{ref:s,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>$(a=>!a),children:[F&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(Xt,{size:11}),r("sandbox.preview.globalBadge")]}),We&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(en,{size:11}),r("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:ze("text-[13px] font-medium text-foreground",Kt==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Kt??Pt}),!F&&!q&&Kt!=null&&K&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:tt(K).map((a,m)=>{if(a.type==="text")return n.jsx("span",{className:ze(m===0?"min-w-0 truncate":"shrink-0"),children:a.text},`text-${m}`);const N=yt[a.name];return N&&Qe?n.jsx(or,{sources:N,template:K,paramName:a.name,value:Be[a.name]??"",sandboxRef:Qe,onCommit:O=>it(a.name,O)},`${D}:${a.name}`):n.jsx(lr,{name:a.name,value:Be[a.name]??"",onCommit:O=>it(a.name,O)},`${D}:${a.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>$(a=>!a),"aria-label":r("sandbox.preview.choosePage"),"aria-expanded":I,children:n.jsx(Wn,{size:12,className:ze("shrink-0 text-muted-foreground transition-transform",I&&"rotate-180")})})]}),I&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(vs,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:U,onChange:a=>C(a.target.value),onKeyDown:a=>{if(a.key!=="Enter")return;const m=U.trim();if(!m)return;const N=Me.find(O=>Re(O.path)===Re(m));N&&(a.preventDefault(),$(!1),C(""),St(N))},placeholder:r("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:a=>{a.preventDefault(),$(!1),C(""),ee(void 0),Y(!0)},children:[n.jsx(Jn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:r("sandbox.preview.createNewPage")})]})}),Me.length===0&&Ye.length===0&&rt.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Ae.length===0&&vt.length===0&&It.length===0?r("sandbox.preview.noPagesFound"):r("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[Me.length>0&&n.jsx("div",{className:"p-1.5",children:Me.map(a=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),$(!1),C(""),St(a)},children:[n.jsx(gs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:a.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a.path})]},a.key))}),Ye.length>0&&n.jsxs("div",{className:ze("p-1.5",Me.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:r("sandbox.preview.globalComponents")}),Ye.map(a=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),$(!1),C(""),$n(a)},children:[n.jsx(Xt,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:a.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},a.key))]}),rt.length>0&&n.jsxs("div",{className:ze("p-1.5",(Me.length>0||Ye.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:r("sandbox.preview.globalLoaders")}),rt.map(a=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),$(!1),C(""),Fn(a)},children:[n.jsx(en,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:a.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},a.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:Pt}),n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{"aria-label":r(qt),onClick:()=>{Nn()},children:n.jsx(ln,{size:16})})}),n.jsx(dt,{side:"bottom",children:r(qt)})]})]}):null,ts=Rt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:Rt}):null,zn=z.mode==="sandbox",Tt=Ei[v],Lt=v==="desktop"&&(A.width===0||A.width>=Tt.width+2*mr),In=Lt?1:Math.min(A.width>0?A.width/(Tt.width+2*mr):1,1),ns=Lt?{width:"100%",height:"100%"}:{width:`${Tt.width}px`,height:A.height>0?`${A.height/In}px`:`${Tt.height}px`,transform:`scale(${In})`,transformOrigin:"top center"},Kn=zn&&(ot||E)?n.jsx(Ie,{onClick:_n,"aria-pressed":de==="visual","aria-label":r("sandbox.preview.visualEditor"),active:de==="visual",children:n.jsx(tn,{size:16})}):null,rs=!e&&st?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[zn&&n.jsxs(n.Fragment,{children:[n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:_n,"aria-pressed":de==="visual","aria-label":r("sandbox.preview.visualEditor"),active:de==="visual",className:"rounded-full",children:n.jsx(tn,{size:16})})}),n.jsx(dt,{side:"top",children:r("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:Dn,"aria-label":r($t[v]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[v==="mobile"&&n.jsx(Vn,{size:16}),v==="tablet"&&n.jsx(qn,{size:16}),v==="desktop"&&n.jsx(Gn,{size:16})]},v)})}),n.jsx(dt,{side:"top",children:r($t[v])})]})]})}):null,ss=!!q&&de==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[Qe&&Object.entries(yt).map(([a,m])=>(Be[a]??"")===""?n.jsx(ai,{sources:m,template:K,paramName:a,sandboxRef:Qe,onFill:N=>it(a,N)},`${D}:${a}`):null),e?n.jsxs(n.Fragment,{children:[n.jsx(Zt.Toolbar.Center.Portal,{fallback:n.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Bn}),children:Bn}),n.jsx(Zt.Toolbar.Right.Portal,{fallback:Kn,children:Kn})]}):n.jsx(n.Fragment,{children:n.jsx(Zt.Topbar.Center.Portal,{fallback:Rt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:Rt}),n.jsx("div",{className:"flex-1"})]}),children:ts})}),n.jsx("div",{className:"flex-1 overflow-hidden compact:relative",children:ss?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(dr,{virtualMcpId:t,externalSelection:k,onViewJsonFile:_}),H&&D&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(ur,{ref:M,virtualMcpId:t,pageKey:D,onClose:L})})]}):n.jsxs(Xn,{orientation:"horizontal",disabled:de!=="blocks",className:"relative isolate",children:[n.jsx(_t,{ref:j,id:"preview-blocks-editor",defaultSize:de==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:de==="blocks"&&n.jsx(dr,{virtualMcpId:t,externalSelection:k,onViewJsonFile:_})}),de==="blocks"&&n.jsx(er,{withHandle:!0}),n.jsx(_t,{id:"preview-canvas",defaultSize:de==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden compact:relative compact:z-0",children:n.jsxs(Xn,{orientation:"horizontal",disabled:!(H&&D),children:[H&&D&&n.jsxs(n.Fragment,{children:[n.jsx(_t,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(ur,{ref:M,virtualMcpId:t,pageKey:D,onClose:L})}),n.jsx(er,{withHandle:!0})]}),n.jsx(_t,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:a=>{if(!a)return;const m=()=>W(O=>O.width===a.clientWidth&&O.height===a.clientHeight?O:{width:a.clientWidth,height:a.clientHeight});m();const N=new ResizeObserver(m);return N.observe(a),()=>N.disconnect()},className:ze("h-full relative overflow-clip flex justify-center",st&&!Lt&&"bg-muted/30"),children:[(le||Ir)&&st&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),z.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(rn,{kind:"starting",progress:Pn,claimPhase:Vt})}),Ve.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(rn,{kind:"suspended",onResume:Ce.resume})}),Ve.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(rn,{kind:"errored",error:Ve.error,onRetry:Ce.retry,connectionsHref:`/${Oe.slug}/settings/connections`})}),z.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(Mt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:r("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:r("sandbox.preview.startingPreviewHint")})]})]}),de==="visual"&&!y&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(tn,{size:12}),r("sandbox.preview.clickElementToAsk")]}),de==="visual"&&y&&n.jsx(ja,{element:y,onDismiss:()=>w(null)}),rs,st&&Se&&n.jsx("div",{className:ze("shrink-0",!Lt&&"border-x border-border bg-background shadow-sm"),style:ns,onMouseLeave:Zr,children:n.jsx("iframe",{ref:T,src:Se,className:"w-full h-full border-0",title:r("sandbox.preview.devServerPreviewTitle"),onError:Rn.handleError,onLoad:()=>{if(Rn.handleLoad(),nt(),z.mode!=="sandbox"){z.mode==="production"&&!z.showWakingPill&&de==="blocks"&&Yt();return}if(ds("vm_preview_loaded",{view_mode:de,vm_id:zt?.sandboxHandle??null}),!F)try{const a=T.current?.contentWindow?.location?.pathname;if(!a)return;const m=Te.current;if(m!==null&&(Te.current=null,Re(a)!==Re(m))||Re(a)===Re(Pe))return;me(a),kt({path:a,pageKey:pe,params:Be})}catch{}de==="visual"&&On(),de==="blocks"&&Yt()}},z.iframeBase)})]})})]})})]})}),n.jsx(ui,{open:se,onOpenChange:Y,isPending:xn.isPending,error:Ne,templates:Ae,onSubmit:Xr})]})}function _i(t){const e=ue.c(22),{virtualMcpId:s}=t,r=Le(),i=ks(s),{activeTask:u,taskId:c,currentBranch:d}=Bt(),o=ua(c),[l,h]=x.useState(!1);if(da({threadId:c,sandboxBranch:u?.branch??d,agentHasRepo:sn(i?.metadata),threadHasRepo:sn(o)||sn(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(tr,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==r?(g=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=g):g=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let b,v;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),v=n.jsx(tr,{className:"size-4"}),e[5]=b,e[6]=v):(b=e[5],v=e[6]);let R;e[7]!==r?(R=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=R):R=e[8];let y;e[9]!==R?(y=n.jsxs(Je,{onClick:b,children:[v,R]}),e[9]=R,e[10]=y):y=e[10];let w;e[11]!==g||e[12]!==P||e[13]!==y?(w=n.jsx(gn,{className:"h-full",image:E,title:g,description:P,actions:y}),e[11]=g,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==l?(k=n.jsx(ca,{open:l,onOpenChange:h,mode:"agent"}),e[15]=l,e[16]=k):k=e[16];let S;return e[17]!==w||e[18]!==k?(S=n.jsxs(n.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=S):S=e[19],S}let p;return e[20]!==s?(p=n.jsx(Oi,{virtualMcpId:s}),e[20]=s,e[21]=p):p=e[21],p}function ld(){const t=ue.c(2),e=ma();let s;return t[0]!==e?(s=n.jsx(us,{tabId:"site-editor",children:n.jsx(ms,{feature:"cms",children:n.jsx(_i,{virtualMcpId:e})})}),t[0]=e,t[1]=s):s=t[1],s}export{ld as default};