decocms 4.524.0 → 4.524.2

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 (407) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-gwLrBsiR.js → ActiveShapeUtils-C-rHC-K0.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-COLuN3Qe.js → AlertCircle-CIClX1OX.js} +1 -1
  3. package/dist/client/assets/{AreaChart-Dud7jvcC.js → AreaChart-CFefRI3l.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BYNlToA0.js → ArrowLeft-hUis4zpK.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CRFAWnPc.js → ArrowUp-DvNrLRdk.js} +1 -1
  6. package/dist/client/assets/{BarChart-JFNliGSV.js → BarChart-BD4Z4ti7.js} +1 -1
  7. package/dist/client/assets/{Building02-DinMBe3_.js → Building02-DyaG8VRs.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-Cjgu2ECY.js → CartesianChart-Cm6m5mMn.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-Bx8yFu23.js → CategoricalChart-B2xwR0Vg.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-DCMOdEuL.js → CheckCircle-IjQMURt4.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Dwu4Nr-2.js → ChevronSelectorVertical-DSrF7Kt-.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-4EkxqYyz.js → ChevronUp-DZpXGp6s.js} +1 -1
  13. package/dist/client/assets/{Copy01-Tog1jA1S.js → Copy01-DelcC4NE.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-B7MC6SfH.js → CreditCard01-cYImG8Bl.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-qUaZHjqd.js → DotsVertical-Cd1ayiT8.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-C1p765z-.js → ErrorBarContext-3Qb2LA4z.js} +1 -1
  17. package/dist/client/assets/{Globe04-CGEgYyKw.js → Globe04-C3AUDQA6.js} +1 -1
  18. package/dist/client/assets/{Image01-CW7Pcq-W.js → Image01-BmkGkBEJ.js} +1 -1
  19. package/dist/client/assets/{Key01-D_nzK0xg.js → Key01-BJu0utQ9.js} +1 -1
  20. package/dist/client/assets/{Link01-CpcYQ7Qt.js → Link01-CpEeBnOB.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-Ctb4MZUK.js → LinkBroken01-BbJzP52K.js} +1 -1
  22. package/dist/client/assets/{Minus-DoRDGpun.js → Minus-Beni9ibl.js} +1 -1
  23. package/dist/client/assets/{Monitor01-L9jyZGZ2.js → Monitor01-DIpgHRZ3.js} +1 -1
  24. package/dist/client/assets/{Play-Du5BNsRy.js → Play-CeJs-Z9F.js} +1 -1
  25. package/dist/client/assets/{Plus-BfnmJh1R.js → Plus-Dp5dZDoY.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-DCCnHWMQ.js → ReferenceLine-BlgL76sy.js} +1 -1
  27. package/dist/client/assets/{SearchMd-JUAl7Zv6.js → SearchMd-DkOimU4h.js} +1 -1
  28. package/dist/client/assets/{Sector-DL6Ad47o.js → Sector-DYInMAbx.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-usYkWunw.js → ShoppingBag01-CrAecsFE.js} +1 -1
  30. package/dist/client/assets/{Sun-B7TolJAG.js → Sun-Dm3m8VPj.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DcP8c_x_.js → SwitchHorizontal01-BvXNAenZ.js} +1 -1
  32. package/dist/client/assets/{Tool01-Bon-ixH5.js → Tool01-CyfGI7T6.js} +1 -1
  33. package/dist/client/assets/{Trash01-cH2tYIUn.js → Trash01-BneWuuYf.js} +1 -1
  34. package/dist/client/assets/{Upload01-Bo60o4T6.js → Upload01-CNkWpiz7.js} +1 -1
  35. package/dist/client/assets/{UserSquare-DsAVH788.js → UserSquare-BWlOHIw0.js} +1 -1
  36. package/dist/client/assets/{Users01-Bo_9DitT.js → Users01-ugdEQXdG.js} +1 -1
  37. package/dist/client/assets/{XClose-DhoOL-T1.js → XClose-BHn8yO7p.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-B1U_CHeD.js → ZoomOut-Csm0orCM.js} +1 -1
  39. package/dist/client/assets/{access-gate-CGDwkzkf.js → access-gate-AGX410gm.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-8gQOdlVv.js → add-connection-dialog-7qj2kjMr.js} +1 -1
  41. package/dist/client/assets/agent-analytics-Cbdz4epN.js +1 -0
  42. package/dist/client/assets/agent-app-B-kKN9Kk.js +1 -0
  43. package/dist/client/assets/{agent-assets-Q4lV98mF.js → agent-assets-r6VBDeE0.js} +1 -1
  44. package/dist/client/assets/{agent-automation-Dsupi3DF.js → agent-automation-DM7_Ee5Y.js} +1 -1
  45. package/dist/client/assets/{agent-automations-BonoDEyJ.js → agent-automations-BUj7_vKE.js} +1 -1
  46. package/dist/client/assets/agent-calendar-D_we3tsY.js +1 -0
  47. package/dist/client/assets/{agent-connect-sources-C0oR1IIZ.js → agent-connect-sources-IL9oYYUF.js} +1 -1
  48. package/dist/client/assets/agent-deck-w0DJ8inL.js +1 -0
  49. package/dist/client/assets/{agent-e2e-nbY2lllw.js → agent-e2e-CAHEpLI3.js} +1 -1
  50. package/dist/client/assets/agent-experiments-zafEuLfN.js +1 -0
  51. package/dist/client/assets/{agent-file-DKmgj6b-.js → agent-file-CtLzmiB2.js} +1 -1
  52. package/dist/client/assets/{agent-hosting-BC5YnVoX.js → agent-hosting-Bu4SIylb.js} +1 -1
  53. package/dist/client/assets/{agent-icon-CVEMdYFU.js → agent-icon-BXl9rcx1.js} +1 -1
  54. package/dist/client/assets/agent-library-B6GAeK3B.js +1 -0
  55. package/dist/client/assets/agent-library-file-_ugelwAI.js +1 -0
  56. package/dist/client/assets/agent-monitor-BYj2OHl4.js +1 -0
  57. package/dist/client/assets/{agent-overview-DU1IP4XS.js → agent-overview-DT8rD_2N.js} +1 -1
  58. package/dist/client/assets/{agent-releases-BuXXsH8W.js → agent-releases-lt59FkfL.js} +1 -1
  59. package/dist/client/assets/agent-settings-CkcXvyCB.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-DSqJlDXx.js → agent-site-editor-DWKoTev5.js} +1 -1
  61. package/dist/client/assets/agent-site-editor-code-BNXkN8TJ.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-BG_Zli2l.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-DLqn9oce.js +1 -0
  64. package/dist/client/assets/agent-view-Bvz_UFEk.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-Bvqt9A7d.js → agent-view-guard-C0-5YLfj.js} +1 -1
  66. package/dist/client/assets/{agents-list-BV-RY6eO.js → agents-list-BvjBZO8s.js} +1 -1
  67. package/dist/client/assets/{ai-providers-D8opLVHp.js → ai-providers-COtiWMIM.js} +1 -1
  68. package/dist/client/assets/{alert-CYZdSIKq.js → alert-BxwQ9GWi.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-BqhdlzKZ.js → analytics-sections-CC5Y9IMF.js} +1 -1
  70. package/dist/client/assets/{analytics-tab-BWgFTW72.js → analytics-tab-BHmGa-59.js} +1 -1
  71. package/dist/client/assets/api-keys-C1TdMpH9.js +1 -0
  72. package/dist/client/assets/{api-keys-Dj50tYQ9.js → api-keys-MQsmca-c.js} +1 -1
  73. package/dist/client/assets/app-editor-C-CTy5jL.js +1 -0
  74. package/dist/client/assets/{asset-utils-DcPLl2K6.js → asset-utils-CDMjNYFJ.js} +1 -1
  75. package/dist/client/assets/{auth-CEIITB7d.js → auth-BkqoCGcx.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-CEBn1SGS.js → auth-catchall-D_N41KBC.js} +1 -1
  77. package/dist/client/assets/{auth-entry-iXHgBQJV.js → auth-entry-BV7CL8vh.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-CsXqgaOS.js → auth-split-layout-DzZGmD-Q.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-CN-ocXe3.js → authenticate-and-persist-oauth-BD9brsY_.js} +1 -1
  80. package/dist/client/assets/{automation-list-row-JOMePUFR.js → automation-list-row-BjMjCaBD.js} +1 -1
  81. package/dist/client/assets/{automation-runs-KPGkDZAM.js → automation-runs-DCUB5KLk.js} +1 -1
  82. package/dist/client/assets/{automations-BTtfVGNa.js → automations-1qHtjGaW.js} +1 -1
  83. package/dist/client/assets/{autosend-CbkP_bEt.js → autosend-1U_b-i1h.js} +1 -1
  84. package/dist/client/assets/{badge-DeNt4-FX.js → badge-DESNookz.js} +1 -1
  85. package/dist/client/assets/{block-document-BzAW7wGZ.js → block-document-CcGRU5CL.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-aUwmyorT.js → blocks-preview-workspace-context-CVuSXtvf.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-PBqE8hLO.js → blocks-tab-states-Bji5rJXk.js} +1 -1
  88. package/dist/client/assets/{blog-schema-BYLQdC9S.js → blog-schema-BNIKCmEY.js} +1 -1
  89. package/dist/client/assets/{buckets-CFL4z0d-.js → buckets-DnnlOaFn.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-BpkVMxpg.js → build-improve-prompt-doc-CiV-KlOc.js} +1 -1
  91. package/dist/client/assets/{calendar-GMyXKkbA.js → calendar-sUXRafM_.js} +1 -1
  92. package/dist/client/assets/{campaigns-view-iaGM9YLd.js → campaigns-view-3-zGJglb.js} +1 -1
  93. package/dist/client/assets/{capability-load-error-juzFeQ-_.js → capability-load-error--G3e97qI.js} +1 -1
  94. package/dist/client/assets/category-editor-CS1KKmTs.js +1 -0
  95. package/dist/client/assets/{cdn-tab-QH34WF_J.js → cdn-tab-CrOE0j6D.js} +1 -1
  96. package/dist/client/assets/{chart-D9k22T0E.js → chart-CaDJ4F39.js} +1 -1
  97. package/dist/client/assets/{chat-context-C56OVvQP.js → chat-context-BvBN6HgF.js} +1 -1
  98. package/dist/client/assets/{chat-draft-DNgi8tda.js → chat-draft-XY_NNpgA.js} +1 -1
  99. package/dist/client/assets/{checkbox-B6N4ay58.js → checkbox-D-LzvMyz.js} +1 -1
  100. package/dist/client/assets/{choose-editor-CcEH03W4.js → choose-editor-CRTIidNs.js} +1 -1
  101. package/dist/client/assets/{cli-auth-success-CkyWspHU.js → cli-auth-success-M-vNesnJ.js} +1 -1
  102. package/dist/client/assets/{client-icons-DyjyTud6.js → client-icons-DJfzDzX4.js} +1 -1
  103. package/dist/client/assets/cms-settings-editor-DQJghv4n.js +1 -0
  104. package/dist/client/assets/{collapsible-D3gNdr7N.js → collapsible-B9h9LvCC.js} +1 -1
  105. package/dist/client/assets/{collection-detail-D66AIxA0.js → collection-detail-DB5YnYwu.js} +1 -1
  106. package/dist/client/assets/{collection-display-button-C28fH98T.js → collection-display-button-BZ7DzDHo.js} +1 -1
  107. package/dist/client/assets/{collection-search-BIuQ3VPN.js → collection-search-D_HANk-F.js} +1 -1
  108. package/dist/client/assets/{collection-table-wrapper-7w5ciWB4.js → collection-table-wrapper-BH6lYVpk.js} +1 -1
  109. package/dist/client/assets/{collection-tabs-m2567Q_Z.js → collection-tabs-H7yEtuRH.js} +1 -1
  110. package/dist/client/assets/{column-rules-DsLrWs5p.js → column-rules-CNwPb3ah.js} +1 -1
  111. package/dist/client/assets/{combobox-BEVN0Tvl.js → combobox-BfNsB6Ea.js} +1 -1
  112. package/dist/client/assets/{command-N9BazZHl.js → command-DoejxN8Q.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-BQyuFD3F.js → companion-mcps-section-DQptjkfL.js} +1 -1
  114. package/dist/client/assets/{config-BmN9tmsx.js → config-CjsHeG1l.js} +1 -1
  115. package/dist/client/assets/{connect-CefgSXIv.js → connect-KGH4OYue.js} +1 -1
  116. package/dist/client/assets/{connect-layout-CUTmKBkE.js → connect-layout-C8XNo1vh.js} +1 -1
  117. package/dist/client/assets/{connect-source-dialog-CBjVXCAe.js → connect-source-dialog-CKPrWV3W.js} +1 -1
  118. package/dist/client/assets/{connection-CQKYiXol.js → connection-DgmraTnv.js} +1 -1
  119. package/dist/client/assets/{connection-card-CvmG6XsV.js → connection-card-nzYl3iaE.js} +1 -1
  120. package/dist/client/assets/{connection-detail-BloLauxz.js → connection-detail-thguseWo.js} +1 -1
  121. package/dist/client/assets/{connection-form-helpers-ytOA1Nl6.js → connection-form-helpers-DQAPN_By.js} +1 -1
  122. package/dist/client/assets/{connections-BxS3FS9g.js → connections-DGmAEet-.js} +1 -1
  123. package/dist/client/assets/{content-tab-BwyJP-DI.js → content-tab-BskMZIA-.js} +3 -3
  124. package/dist/client/assets/context-BTZ4zLZ6.js +1 -0
  125. package/dist/client/assets/{context-menu-C4h1P6Vl.js → context-menu-DXOWR6Jg.js} +1 -1
  126. package/dist/client/assets/{context-shell-BxB7W0br.js → context-shell-C9dd2zeB.js} +3 -3
  127. package/dist/client/assets/{core.esm-BYOMVmVh.js → core.esm-kr0nDMAf.js} +1 -1
  128. package/dist/client/assets/{create-organization-dialog-DqU6G9od.js → create-organization-dialog-VXkZbmzL.js} +1 -1
  129. package/dist/client/assets/{daily-pulse-BlxIy31E.js → daily-pulse-WpcSkDI1.js} +1 -1
  130. package/dist/client/assets/{discover-DMRyKZWE.js → discover-BwWAcy7q.js} +1 -1
  131. package/dist/client/assets/{domain-settings-Cj-cRa8T.js → domain-settings-B3KwV4Bi.js} +1 -1
  132. package/dist/client/assets/{drawer-B7ajVnwC.js → drawer-BxmRq7z0.js} +1 -1
  133. package/dist/client/assets/{editor-classes-BinXFbFk.js → editor-classes-C1mRh06j.js} +1 -1
  134. package/dist/client/assets/{editor-B7sIq_vQ.js → editor-vxR6fGAu.js} +1 -1
  135. package/dist/client/assets/{empty-state-Cc_qF1X6.js → empty-state-BXpVXa8p.js} +1 -1
  136. package/dist/client/assets/{empty-state-RpLaBfip.js → empty-state-C0q6FDCT.js} +1 -1
  137. package/dist/client/assets/{experiments-tab-choice-DZqY092h.js → experiments-tab-choice-CJW0rlLk.js} +1 -1
  138. package/dist/client/assets/{experiments-tab-BlgfPezU.js → experiments-tab-vC9IxL9H.js} +1 -1
  139. package/dist/client/assets/{extract-connection-data-ClMH8dL9.js → extract-connection-data-DyihSSH6.js} +1 -1
  140. package/dist/client/assets/{feature-gate-Wo8Dn-M0.js → feature-gate-B2DL7P_r.js} +1 -1
  141. package/dist/client/assets/{feature-paywall-C1_xpbwO.js → feature-paywall-CaUW3vBu.js} +1 -1
  142. package/dist/client/assets/{file-explorer-DCgzwH3u.js → file-explorer-B6YWvV4f.js} +1 -1
  143. package/dist/client/assets/{file-preview-DFHvVsCR.js → file-preview-p8MVe0Co.js} +1 -1
  144. package/dist/client/assets/{file-share-button-DMtXDXf3.js → file-share-button-BwVAEVZB.js} +1 -1
  145. package/dist/client/assets/{file-type-icon-may_hs3N.js → file-type-icon-T5-JgFJO.js} +1 -1
  146. package/dist/client/assets/{folder-icon-DREaQWIx.js → folder-icon-U3eZ3MHL.js} +1 -1
  147. package/dist/client/assets/{form-Gz8fbLdb.js → form-BKxpLzV1.js} +1 -1
  148. package/dist/client/assets/{general-DBULqBSQ.js → general-twaLFZ_x.js} +1 -1
  149. package/dist/client/assets/{held-block-view-DTUWWRfL.js → held-block-view-DF-dsPP4.js} +7 -7
  150. package/dist/client/assets/{home-DnXsGhyo.js → home-B70oGoSa.js} +1 -1
  151. package/dist/client/assets/{icon-button-TQkFyvqB.js → icon-button-BpGFmmxF.js} +1 -1
  152. package/dist/client/assets/{index-C6_m0mjP.js → index-B54Dwq_E.js} +1 -1
  153. package/dist/client/assets/{index-CqFACk2B.js → index-B5KgRDmR.js} +1 -1
  154. package/dist/client/assets/{index-BNmzMNlZ.js → index-BGCeOWuH.js} +7 -7
  155. package/dist/client/assets/{index-kd3fyZ9a.js → index-BHWlfC8b.js} +1 -1
  156. package/dist/client/assets/{index-DENKa8lW.js → index-C5dWtjQZ.js} +1 -1
  157. package/dist/client/assets/{index-CaH8ekvn.js → index-C91ph34T.js} +1 -1
  158. package/dist/client/assets/{index-DusHyRie.js → index-CSsLL5lB.js} +1 -1
  159. package/dist/client/assets/{index-bf-OLKAU.js → index-C_H0V1sq.js} +1 -1
  160. package/dist/client/assets/{index-BNtuHmZB.js → index-CbIYCvQg.js} +1 -1
  161. package/dist/client/assets/{index-B9NLvHLf.js → index-CiU3Lit1.js} +1 -1
  162. package/dist/client/assets/{index-DgWAoWIc.js → index-DEhotlUt.js} +1 -1
  163. package/dist/client/assets/{index-DNHxXhrW.js → index-FG3t9V84.js} +1 -1
  164. package/dist/client/assets/{index-iynQP1if.js → index-Y7xr7TpK.js} +1 -1
  165. package/dist/client/assets/{index-BEX8cmtV.js → index-jBUTr_mZ.js} +1 -1
  166. package/dist/client/assets/{index-redirect-DAPRiYQw.js → index-redirect-BrPjqRgi.js} +1 -1
  167. package/dist/client/assets/{index-BGcfYf5c.js → index-vWFZdxRo.js} +1 -1
  168. package/dist/client/assets/{infiniteQueryObserver-ClGIthQz.js → infiniteQueryObserver-DdJGfIBw.js} +1 -1
  169. package/dist/client/assets/{infra-billing-Bn8rlKTp.js → infra-billing-DA3iH8RT.js} +1 -1
  170. package/dist/client/assets/{input-BS4EACP3.js → input-BJWjsMTr.js} +3 -3
  171. package/dist/client/assets/{input-DZSiMfCa.js → input-DdaB0aDZ.js} +1 -1
  172. package/dist/client/assets/{integration-icon-BrTM8z-s.js → integration-icon-IfDXGweg.js} +1 -1
  173. package/dist/client/assets/{jira-icon-CvveHm37.js → jira-icon-Btvsno6j.js} +1 -1
  174. package/dist/client/assets/{label-BCxqhVIq.js → label-_maV4eWQ.js} +1 -1
  175. package/dist/client/assets/{layout-C_-T37yU.js → layout-BnRLK8Je.js} +1 -1
  176. package/dist/client/assets/{legacy-agents-deep-HN0h-Vgf.js → legacy-agents-deep-EQC0E9us.js} +1 -1
  177. package/dist/client/assets/{legacy-main-redirect-HqwAGFUC.js → legacy-main-redirect-C8Z33lV9.js} +1 -1
  178. package/dist/client/assets/library-DwSKFwop.js +1 -0
  179. package/dist/client/assets/{login-D25rkjo_.js → login-CRL4Hxp0.js} +1 -1
  180. package/dist/client/assets/{markdown-P8cO0xLZ.js → markdown-Pxz-NCAq.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-CKUvsXnq.js → mcp-app-renderer-C-WjAbV3.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-C9hLQucs.js → mcp-oauth-UPAY9qQh.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-DBMA8wIh.js → mcp-oauth-ZXLBTZQF.js} +1 -1
  184. package/dist/client/assets/{members-C_tx9w5g.js → members-wnvPkZUo.js} +1 -1
  185. package/dist/client/assets/{memory-CsXGZJq1.js → memory-5e8aSOvx.js} +1 -1
  186. package/dist/client/assets/{mini-report-page-DGZYey3l.js → mini-report-page-BJU2AtSk.js} +1 -1
  187. package/dist/client/assets/{mock-board-BWzTY2k-.js → mock-board-KL7JXnQ3.js} +3 -3
  188. package/dist/client/assets/{monaco-editor-CBJkBgIU.js → monaco-editor-CEz6AH84.js} +1 -1
  189. package/dist/client/assets/{monitoring-BLnrFAQj.js → monitoring-CSgf9qta.js} +1 -1
  190. package/dist/client/assets/{monitoring-stats-row-vWHUOUB3.js → monitoring-stats-row-CQA6lBFw.js} +1 -1
  191. package/dist/client/assets/{multi-select-BNfLnIfI.js → multi-select-BRkampvt.js} +1 -1
  192. package/dist/client/assets/{mustache-Crsi4VAX.js → mustache-D-9UMI1S.js} +1 -1
  193. package/dist/client/assets/{named-rule-uses-D5gjZwOp.js → named-rule-uses-5Sl1aIdP.js} +1 -1
  194. package/dist/client/assets/{named-rule-view-BVCpec2I.js → named-rule-view-ChwtdSTO.js} +1 -1
  195. package/dist/client/assets/{new-project-dialog-BzJmdXI6.js → new-project-dialog-BZU_MI3Q.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-CwZ-b3nE.js → oauth-callback-CIbrOy6h.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-CujNNAU2.js → oauth-callback-ai-provider-DEFfXzWj.js} +1 -1
  198. package/dist/client/assets/{onboarding-Csy3KW6h.js → onboarding-BB5U3n3W.js} +1 -1
  199. package/dist/client/assets/{openai-conversation-DJfgyA82.js → openai-conversation-CeRUtzJI.js} +1 -1
  200. package/dist/client/assets/{optimistic-project-sidebar-views-XzUayXF_.js → optimistic-project-sidebar-views-BpMb4HEN.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-BUk1fjA6.js → order-monitor-day-DUguCaIU.js} +1 -1
  202. package/dist/client/assets/{organization-choice-BG-EMl8L.js → organization-choice-HyxmQkdd.js} +1 -1
  203. package/dist/client/assets/{orgs-BOi51Yxa.js → orgs-C96LReuI.js} +1 -1
  204. package/dist/client/assets/{page-seo-form-D4gneorY.js → page-seo-form-Dx0hMHSf.js} +1 -1
  205. package/dist/client/assets/{pair-Dh_1oqHi.js → pair-DVCmCnBf.js} +1 -1
  206. package/dist/client/assets/{parse-sections-B30A8ECY.js → parse-sections-BHOqhf01.js} +1 -1
  207. package/dist/client/assets/{plan-BXu8SQ3T.js → plan-D4Ztu-Mv.js} +1 -1
  208. package/dist/client/assets/{plan-ladder-CN5p5ylK.js → plan-ladder-BT3Oz8Ev.js} +1 -1
  209. package/dist/client/assets/{popover-DauDBkON.js → popover-SHWbH4i8.js} +1 -1
  210. package/dist/client/assets/post-calendar-WzBoQET7.js +1 -0
  211. package/dist/client/assets/{post-editor-BChaRDNt.js → post-editor-CtDaen5o.js} +1 -1
  212. package/dist/client/assets/{preview-content-BvhoJjFR.js → preview-content-BhIMVcYB.js} +1 -1
  213. package/dist/client/assets/{preview-dialog-iRKqzeeN.js → preview-dialog-DoeqGaQU.js} +1 -1
  214. package/dist/client/assets/{preview-panel-DcbhbW1H.js → preview-panel-DMNxFjEG.js} +1 -1
  215. package/dist/client/assets/{preview-tab-ClK0lOMy.js → preview-tab-C2Feq6DP.js} +3 -3
  216. package/dist/client/assets/{product-picker-dialog-CsTqbwXT.js → product-picker-dialog-BF4qIVtr.js} +1 -1
  217. package/dist/client/assets/{profile-DE1V4tEF.js → profile-CA9XT1yH.js} +1 -1
  218. package/dist/client/assets/{project-app-view-BpeI5cMf.js → project-app-view-DnVvuNnI.js} +1 -1
  219. package/dist/client/assets/{project-apps-CNRV3DAE.js → project-apps-BfDjxodR.js} +1 -1
  220. package/dist/client/assets/{project-feed-BcaTqzKD.js → project-feed-q9sZKOfh.js} +1 -1
  221. package/dist/client/assets/{project-icon-9kbQzXfH.js → project-icon-CjQuZIIb.js} +1 -1
  222. package/dist/client/assets/project-reports-5DLZwE2I.js +1 -0
  223. package/dist/client/assets/project-tasks-ByxD-zBq.js +1 -0
  224. package/dist/client/assets/{projects-Kz2HQD_e.js → projects-DvPJEsmw.js} +1 -1
  225. package/dist/client/assets/{projects-empty-state-Df7eS0pA.js → projects-empty-state-CEDwkoTb.js} +1 -1
  226. package/dist/client/assets/{prompts-B4KLkb4I.js → prompts-B3mSxUa6.js} +1 -1
  227. package/dist/client/assets/record-editor-hmgA54LD.js +1 -0
  228. package/dist/client/assets/redirect-editor-DS-wqNcI.js +1 -0
  229. package/dist/client/assets/{releases-api-BDl7LEw1.js → releases-api-BmEWQbgz.js} +1 -1
  230. package/dist/client/assets/{reports-Cp14zg57.js → reports-BrWasOQ1.js} +1 -1
  231. package/dist/client/assets/reports-DklBonJw.js +1 -0
  232. package/dist/client/assets/{reports-onboarding-D2UqC4mS.js → reports-onboarding-DU-PrPll.js} +1 -1
  233. package/dist/client/assets/{reports-tab-C51R-6vi.js → reports-tab-ChwZOe5G.js} +2 -2
  234. package/dist/client/assets/{repositories-CHKGn0VU.js → repositories-BcpDx93s.js} +1 -1
  235. package/dist/client/assets/repositories-CUKAU9Zy.js +1 -0
  236. package/dist/client/assets/{repository-binding-BZ7FmJ0X.js → repository-binding-Meqp5p71.js} +1 -1
  237. package/dist/client/assets/{repository-import-picker-Bjws7k2-.js → repository-import-picker-FH262XPV.js} +1 -1
  238. package/dist/client/assets/{repository-picker-DkvIZLAj.js → repository-picker-DCYyzOOP.js} +1 -1
  239. package/dist/client/assets/{require-capability-Bm5pde_M.js → require-capability-oXulJiLn.js} +1 -1
  240. package/dist/client/assets/{required-auth-layout-Dn8nNstE.js → required-auth-layout-tipFurup.js} +1 -1
  241. package/dist/client/assets/{reset-password-CHMCFAp9.js → reset-password-3NrSj3Hp.js} +1 -1
  242. package/dist/client/assets/{resizable-BYZDi11K.js → resizable-DhKaPyjj.js} +1 -1
  243. package/dist/client/assets/{resolve-tab-icon-DLcHhSBW.js → resolve-tab-icon-Dllm1_fu.js} +1 -1
  244. package/dist/client/assets/{review-settings-DEFTQSp0.js → review-settings-8QMhy3Lg.js} +1 -1
  245. package/dist/client/assets/{roles-BIj8m30-.js → roles-BEcXWCxJ.js} +1 -1
  246. package/dist/client/assets/{route-CwIKlFpH.js → route-7AN9YEMz.js} +1 -1
  247. package/dist/client/assets/{route-DQxiKHs8.js → route-CMo6fdQZ.js} +1 -1
  248. package/dist/client/assets/route-lyp-fDsn.js +1 -0
  249. package/dist/client/assets/{sandbox-lifecycle-context-DMfngoi-.js → sandbox-lifecycle-context-D9P5uTE7.js} +1 -1
  250. package/dist/client/assets/{schema-DoiqvTL7.js → schema-Db9nAPbV.js} +1 -1
  251. package/dist/client/assets/{schema-DEyBWI2y.js → schema-LbfQM_um.js} +1 -1
  252. package/dist/client/assets/{scroll-area-Cfsm1vBV.js → scroll-area-Do3s8MFg.js} +1 -1
  253. package/dist/client/assets/{search-input-DBKkXR0y.js → search-input-BiW12RB7.js} +1 -1
  254. package/dist/client/assets/{search-toggle-CzYTwp_L.js → search-toggle-C_s2zUEP.js} +1 -1
  255. package/dist/client/assets/{secret-picker-CqxG24X7.js → secret-picker-4kZnJB0L.js} +1 -1
  256. package/dist/client/assets/{secrets-CtByih4R.js → secrets-D3OOpubP.js} +1 -1
  257. package/dist/client/assets/section-array-field-DlpdCCcl.js +1 -0
  258. package/dist/client/assets/{sections-CCcpB_PT.js → sections-NxijzCAP.js} +1 -1
  259. package/dist/client/assets/sections-editor-DZMEPtw_.js +1 -0
  260. package/dist/client/assets/{select-CTAm_W2d.js → select-C0Q0f4At.js} +1 -1
  261. package/dist/client/assets/{select-model-Cvj2OnbU.js → select-model-DlU2H5oA.js} +1 -1
  262. package/dist/client/assets/seo-editor-DOL-unZx.js +1 -0
  263. package/dist/client/assets/{separator-BeYssz5V.js → separator-DcYK5L3O.js} +1 -1
  264. package/dist/client/assets/settings-tab-Dk0U9Ztd.js +1 -0
  265. package/dist/client/assets/{sheet-C52S-h6R.js → sheet-C3lf7JiX.js} +1 -1
  266. package/dist/client/assets/{shell-layout-DYY0I41_.js → shell-layout-aaJ-Ow-a.js} +1 -1
  267. package/dist/client/assets/{site-draft-actions-DwqQ-cQC.js → site-draft-actions-BdvwngLt.js} +7 -7
  268. package/dist/client/assets/site-draft-view-DJ-2XrRv.js +2 -0
  269. package/dist/client/assets/site-editor-DssQOjHQ.js +1 -0
  270. package/dist/client/assets/{site-editor-toast-CT4NtD1f.js → site-editor-toast-DS0_fxT0.js} +1 -1
  271. package/dist/client/assets/{skills-_WDetSCi.js → skills-Db9hF38T.js} +1 -1
  272. package/dist/client/assets/{slider-rNbrBC-4.js → slider-Brs1MiDz.js} +1 -1
  273. package/dist/client/assets/{sortable.esm-Cw5kBwgn.js → sortable.esm-DR7ZsZlW.js} +1 -1
  274. package/dist/client/assets/{sso-DSG3YPMw.js → sso-BKJEgj1Q.js} +1 -1
  275. package/dist/client/assets/{suggestion-Dd_Uy5Bv.js → suggestion-BqSBag09.js} +1 -1
  276. package/dist/client/assets/{switch-nUFQi60k.js → switch-DXvm-pfC.js} +1 -1
  277. package/dist/client/assets/{symbol-C3kEOGZ_.js → symbol-DhjzVarJ.js} +1 -1
  278. package/dist/client/assets/{synced-repos-DBmibobg.js → synced-repos-BshDcf0T.js} +1 -1
  279. package/dist/client/assets/{tab-icon-glyph-Bzpngl6a.js → tab-icon-glyph-x6aTS8aC.js} +1 -1
  280. package/dist/client/assets/{table-CxQHf5NT.js → table-CsgmIfM7.js} +1 -1
  281. package/dist/client/assets/{tabs-BwD6LFyC.js → tabs-snNNT2OQ.js} +1 -1
  282. package/dist/client/assets/{task-assignee-avatar-Bg9ijzoY.js → task-assignee-avatar-CIFZYxqw.js} +1 -1
  283. package/dist/client/assets/{task-board-DreQgJBj.js → task-board-DZ8Kzwkd.js} +1 -1
  284. package/dist/client/assets/{task-route-B6QYswnx.js → task-route-B3yf9UbZ.js} +1 -1
  285. package/dist/client/assets/{task-status-DcCdeelW.js → task-status-BXAKMLjX.js} +1 -1
  286. package/dist/client/assets/{taskboard-analytics-C_aUAX7S.js → taskboard-analytics-CzU6hvG8.js} +1 -1
  287. package/dist/client/assets/{tasks-CYY9XlJ3.js → tasks-BfBA5dNC.js} +1 -1
  288. package/dist/client/assets/tasks-DxdBuhqv.js +1 -0
  289. package/dist/client/assets/{textarea-y7TWtoua.js → textarea-PZ5-N42X.js} +1 -1
  290. package/dist/client/assets/{thread-analytics-BD8n1a8E.js → thread-analytics-C0N5WioR.js} +1 -1
  291. package/dist/client/assets/{thread-intent-cB2EtHpg.js → thread-intent-DH83rsLQ.js} +1 -1
  292. package/dist/client/assets/{thread-route-Cr5f3jw8.js → thread-route-C8i0NIbO.js} +1 -1
  293. package/dist/client/assets/{thread-route-D01w_vQB.js → thread-route-D9dyzfFR.js} +1 -1
  294. package/dist/client/assets/{thread-sheet-body-C0IyWshl.js → thread-sheet-body-6YAeci0o.js} +1 -1
  295. package/dist/client/assets/{time-range-picker-bp6BeGMC.js → time-range-picker-CVmtrNYi.js} +1 -1
  296. package/dist/client/assets/{toggle-group-BIu6qfZV.js → toggle-group-CUFIN5dE.js} +1 -1
  297. package/dist/client/assets/{tool-namespace-Crbzrqv8.js → tool-namespace-Y0TJrGSX.js} +1 -1
  298. package/dist/client/assets/{toolbar-icon-button-ByMmG3VL.js → toolbar-icon-button-C6e2VzUh.js} +1 -1
  299. package/dist/client/assets/{tooltip-DibJz0Jl.js → tooltip-9LLsMgGV.js} +1 -1
  300. package/dist/client/assets/{tooltipContext-BzrsG1UN.js → tooltipContext-D1XV88gx.js} +1 -1
  301. package/dist/client/assets/{track-C-8tVJFa.js → track-BDVG3U2y.js} +1 -1
  302. package/dist/client/assets/{types-BdOsWOEi.js → types-BO2WHIDA.js} +1 -1
  303. package/dist/client/assets/{url-slug-CPCergXm.js → url-slug-DonaWwCk.js} +1 -1
  304. package/dist/client/assets/{usage-stats-DDafRqWC.js → usage-stats-DBeLsjRR.js} +1 -1
  305. package/dist/client/assets/{use-ai-providers-Bsehd5pg.js → use-ai-providers-BHsc3bDD.js} +1 -1
  306. package/dist/client/assets/{use-apply-named-rule-CeNTU7vM.js → use-apply-named-rule---oSjx7n.js} +1 -1
  307. package/dist/client/assets/{use-automations-BscjsX1o.js → use-automations-1YEM9DbK.js} +1 -1
  308. package/dist/client/assets/{use-autosave-D0y0c0lt.js → use-autosave-B-Iuf8KI.js} +1 -1
  309. package/dist/client/assets/{use-chat-layout-state-DpOxQYv4.js → use-chat-layout-state-C15u8M2V.js} +1 -1
  310. package/dist/client/assets/{use-clock-tick-jRUiEK1v.js → use-clock-tick-DIHPLwxm.js} +1 -1
  311. package/dist/client/assets/{use-connect-companion-BGtpVGmA.js → use-connect-companion-V3BIIJeW.js} +1 -1
  312. package/dist/client/assets/{use-connection-CAR6Cxbr.js → use-connection-BQFGYTV6.js} +1 -1
  313. package/dist/client/assets/{use-content-sync-bYlxy6np.js → use-content-sync-DPGe01L6.js} +1 -1
  314. package/dist/client/assets/{use-copy-Dpm_jhm-.js → use-copy-CxT0JeDz.js} +1 -1
  315. package/dist/client/assets/{use-create-virtual-mcp-DcCX7uo7.js → use-create-virtual-mcp-CAv-1I_T.js} +1 -1
  316. package/dist/client/assets/{use-date-fns-locale-hUyExEVb.js → use-date-fns-locale-BQCqx0nl.js} +1 -1
  317. package/dist/client/assets/{use-debounced-autosave-By6os5xD.js → use-debounced-autosave-DXyNDYcX.js} +1 -1
  318. package/dist/client/assets/{use-debounced-value-BtR2lyTj.js → use-debounced-value-N-JjpU1V.js} +1 -1
  319. package/dist/client/assets/{use-deco-credits-DRIA1g3T.js → use-deco-credits-DDwwBuMm.js} +1 -1
  320. package/dist/client/assets/{use-decopilot-events-C4OBhauN.js → use-decopilot-events-CqPtaVnx.js} +1 -1
  321. package/dist/client/assets/{use-delete-connection-BM5PcuGQ.js → use-delete-connection-BSNr2bC3.js} +1 -1
  322. package/dist/client/assets/{use-deployment-admin-BmDeutjQ.js → use-deployment-admin-aELFz-ee.js} +1 -1
  323. package/dist/client/assets/{use-fast-preview-draft-url-BUDoPHon.js → use-fast-preview-draft-url-4INawxcX.js} +1 -1
  324. package/dist/client/assets/{use-file-configs-CuVchUT-.js → use-file-configs-DH6Ac5Y5.js} +1 -1
  325. package/dist/client/assets/{use-inbox-feed-Bi03vVLM.js → use-inbox-feed-CXjwjyxO.js} +1 -1
  326. package/dist/client/assets/{use-infinite-scroll-0YRynoMy.js → use-infinite-scroll-CNc2NI3i.js} +1 -1
  327. package/dist/client/assets/{use-join-requests-BhMSzUBO.js → use-join-requests-B0daTOT_.js} +1 -1
  328. package/dist/client/assets/{use-main-panel-tabs-QcdwwtJ8.js → use-main-panel-tabs-BhdlgJp6.js} +1 -1
  329. package/dist/client/assets/{use-mcp-auth-status-Ddp-NElL.js → use-mcp-auth-status-CF5TaDec.js} +1 -1
  330. package/dist/client/assets/{use-mcp-client-ClU7gdfw.js → use-mcp-client-P41n2mxI.js} +1 -1
  331. package/dist/client/assets/{use-mcp-prompts-CFFfSPcj.js → use-mcp-prompts-B3Nr4ZJG.js} +1 -1
  332. package/dist/client/assets/{use-mcp-tools-CsGOzrhW.js → use-mcp-tools-BNi1ikeO.js} +1 -1
  333. package/dist/client/assets/{use-mobile-nW9hYb6L.js → use-mobile-jFUNwYYf.js} +1 -1
  334. package/dist/client/assets/{use-move-blocks-BKlQlSno.js → use-move-blocks-B-yW6Slv.js} +1 -1
  335. package/dist/client/assets/{use-navigate-to-agent-CvuO-uuz.js → use-navigate-to-agent-Dm6cdVpv.js} +1 -1
  336. package/dist/client/assets/{use-open-billing-url-6zduD8ZA.js → use-open-billing-url-Byo1M4SG.js} +1 -1
  337. package/dist/client/assets/{use-org-fs-BcT14y41.js → use-org-fs-BrF4BnPF.js} +1 -1
  338. package/dist/client/assets/{use-org-repo-syncs-BdTpYW4-.js → use-org-repo-syncs-6ClvuhZj.js} +1 -1
  339. package/dist/client/assets/{use-org-sso-DdzTjSOo.js → use-org-sso-BhUG19nu.js} +1 -1
  340. package/dist/client/assets/{use-organization-roles-DQlsWqEE.js → use-organization-roles-DGB0g1Kk.js} +1 -1
  341. package/dist/client/assets/{use-organization-settings-DeXdcCtZ.js → use-organization-settings-BiInrSf0.js} +1 -1
  342. package/dist/client/assets/{use-panel-navigate-BrjENNrA.js → use-panel-navigate-BJRHz9-t.js} +1 -1
  343. package/dist/client/assets/{use-project-native-view-presence-OgGOYaV4.js → use-project-native-view-presence-7WN9qseE.js} +1 -1
  344. package/dist/client/assets/{use-project-scope-DryffHrf.js → use-project-scope-B0Sibn6g.js} +1 -1
  345. package/dist/client/assets/{use-recent-apps-CMgGjBH4.js → use-recent-apps-C1A023Yo.js} +1 -1
  346. package/dist/client/assets/{use-releases-BQePeR_j.js → use-releases-tJmW6WNc.js} +1 -1
  347. package/dist/client/assets/{use-reports-diagnostic-KZB3C_26.js → use-reports-diagnostic-DOFdWvCv.js} +1 -1
  348. package/dist/client/assets/{use-sandbox-events-ClbDdVRn.js → use-sandbox-events-BNCiNcVF.js} +1 -1
  349. package/dist/client/assets/{use-secrets-Cjihb12f.js → use-secrets-D7gMnlZB.js} +1 -1
  350. package/dist/client/assets/{use-section-preview-base-go9VMYa4.js → use-section-preview-base-wA756W4w.js} +1 -1
  351. package/dist/client/assets/{use-session-runtime-CQOTzbKn.js → use-session-runtime-CQn-52Ez.js} +1 -1
  352. package/dist/client/assets/{use-sidebar-collapsed-CUSnfCt-.js → use-sidebar-collapsed-BPZlAUWE.js} +1 -1
  353. package/dist/client/assets/{use-tags-CMyUN8Qd.js → use-tags-BqkalJgS.js} +1 -1
  354. package/dist/client/assets/{use-task-board-analytics-BWzR51Kh.js → use-task-board-analytics-CGnOgEtr.js} +1 -1
  355. package/dist/client/assets/{use-task-board-events-DlFBtyOL.js → use-task-board-events-DBa8GRgx.js} +1 -1
  356. package/dist/client/assets/{use-task-board-item-prs-D9Aj6NRX.js → use-task-board-item-prs-Cz375X0D.js} +1 -1
  357. package/dist/client/assets/{use-task-metadata-DcdDwiSS.js → use-task-metadata-DYMge1Ms.js} +1 -1
  358. package/dist/client/assets/{use-thread-analytics-cLhxQI8B.js → use-thread-analytics-BgqERo23.js} +1 -1
  359. package/dist/client/assets/{use-thread-outputs-D8Bvo55q.js → use-thread-outputs-CxOHL03a.js} +1 -1
  360. package/dist/client/assets/useInfiniteQuery-B_LZh1B0.js +1 -0
  361. package/dist/client/assets/{useQueries-B8DPRYfS.js → useQueries-CunEDk2w.js} +1 -1
  362. package/dist/client/assets/useSuspenseInfiniteQuery-CgbZRhlW.js +1 -0
  363. package/dist/client/assets/{users-BIP3dsuH.js → users-Ckolvc6J.js} +1 -1
  364. package/dist/client/assets/{utils-DeFulDMz.js → utils-OgCNPQQr.js} +1 -1
  365. package/dist/client/assets/{variant-calendar-C37bfPDk.js → variant-calendar-CVJKB37H.js} +1 -1
  366. package/dist/client/assets/{variant-matcher-override-B4pYtxaz.js → variant-matcher-override-DMBn3So8.js} +1 -1
  367. package/dist/client/assets/{virtual-mcp-D_aBBfQL.js → virtual-mcp-CjF7Cu1C.js} +1 -1
  368. package/dist/client/assets/{watch-sse-pool-Bk0Yni6j.js → watch-sse-pool-D75R450R.js} +1 -1
  369. package/dist/client/index.html +1 -1
  370. package/dist/server/server.js +1111 -1111
  371. package/package.json +2 -2
  372. package/dist/client/assets/agent-analytics-Bd5QSkcr.js +0 -1
  373. package/dist/client/assets/agent-app-DSGhLy_N.js +0 -1
  374. package/dist/client/assets/agent-calendar-WpcQ_E3l.js +0 -1
  375. package/dist/client/assets/agent-deck-Y0SX6UB9.js +0 -1
  376. package/dist/client/assets/agent-experiments-XS7LGaQh.js +0 -1
  377. package/dist/client/assets/agent-library-CYxkIVFl.js +0 -1
  378. package/dist/client/assets/agent-library-file-DPhxbUtG.js +0 -1
  379. package/dist/client/assets/agent-monitor-C01cwPL-.js +0 -1
  380. package/dist/client/assets/agent-settings-B7CchDfJ.js +0 -1
  381. package/dist/client/assets/agent-site-editor-code-uiPbclqT.js +0 -2
  382. package/dist/client/assets/agent-site-editor-content-B9B2SztQ.js +0 -1
  383. package/dist/client/assets/agent-site-editor-preview-CQGXtn5w.js +0 -1
  384. package/dist/client/assets/agent-view-BNK8YJ86.js +0 -1
  385. package/dist/client/assets/api-keys-MofJBQfW.js +0 -1
  386. package/dist/client/assets/app-editor-BcJaA3eR.js +0 -1
  387. package/dist/client/assets/category-editor-lTx7E71S.js +0 -1
  388. package/dist/client/assets/cms-settings-editor-CjDcV3Uq.js +0 -1
  389. package/dist/client/assets/context-BakNzIE5.js +0 -1
  390. package/dist/client/assets/library-D2Mrm5WM.js +0 -1
  391. package/dist/client/assets/post-calendar-Ceopsk1u.js +0 -1
  392. package/dist/client/assets/project-reports-DZCmLCmE.js +0 -1
  393. package/dist/client/assets/project-tasks-D6qNETK3.js +0 -1
  394. package/dist/client/assets/record-editor-C5XOx_LV.js +0 -1
  395. package/dist/client/assets/redirect-editor-BxKT3ntE.js +0 -1
  396. package/dist/client/assets/reports-DBFNTtm-.js +0 -1
  397. package/dist/client/assets/repositories-C77B6dOt.js +0 -1
  398. package/dist/client/assets/route-L2EzRsks.js +0 -1
  399. package/dist/client/assets/secret-ciphertext-cTA7BSVY.js +0 -1
  400. package/dist/client/assets/sections-editor-DpO_mTF7.js +0 -1
  401. package/dist/client/assets/seo-editor-BPToAJRY.js +0 -1
  402. package/dist/client/assets/settings-tab-BRtykuoH.js +0 -1
  403. package/dist/client/assets/site-draft-view-CiKU2Icp.js +0 -2
  404. package/dist/client/assets/site-editor-CuXmo07G.js +0 -1
  405. package/dist/client/assets/tasks-CeouZ3tS.js +0 -1
  406. package/dist/client/assets/useInfiniteQuery-DWVaUM2t.js +0 -1
  407. package/dist/client/assets/useSuspenseInfiniteQuery-6Ovi3jRe.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-editor-BcJaA3eR.js","assets/index-BNmzMNlZ.js","assets/index-BQfNeaI1.css","assets/chat-context-C56OVvQP.js","assets/use-panel-navigate-BrjENNrA.js","assets/thread-route-D01w_vQB.js","assets/use-project-scope-DryffHrf.js","assets/repository-binding-BZ7FmJ0X.js","assets/use-mcp-client-ClU7gdfw.js","assets/auth-CEIITB7d.js","assets/autosend-CbkP_bEt.js","assets/thread-intent-cB2EtHpg.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-Bk0Yni6j.js","assets/task-board-DreQgJBj.js","assets/schema-DoiqvTL7.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-C4OBhauN.js","assets/use-ai-providers-Bsehd5pg.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-DeXdcCtZ.js","assets/scroll-area-Cfsm1vBV.js","assets/index-BdQq_4o_.js","assets/use-section-preview-base-go9VMYa4.js","assets/UserSquare-DsAVH788.js","assets/agent-icon-CVEMdYFU.js","assets/AlertCircle-COLuN3Qe.js","assets/Tool01-Bon-ixH5.js","assets/ArrowUp-CRFAWnPc.js","assets/ArrowLeft-BYNlToA0.js","assets/LinkBroken01-Ctb4MZUK.js","assets/ShoppingBag01-usYkWunw.js","assets/ZoomOut-B1U_CHeD.js","assets/Building02-DinMBe3_.js","assets/CheckCircle-DCMOdEuL.js","assets/ChevronUp-4EkxqYyz.js","assets/ChevronSelectorVertical-Dwu4Nr-2.js","assets/Copy01-Tog1jA1S.js","assets/CreditCard01-B7MC6SfH.js","assets/DotsVertical-qUaZHjqd.js","assets/Image01-CW7Pcq-W.js","assets/Globe04-CGEgYyKw.js","assets/SwitchHorizontal01-DcP8c_x_.js","assets/Key01-D_nzK0xg.js","assets/Link01-CpcYQ7Qt.js","assets/Minus-DoRDGpun.js","assets/Monitor01-L9jyZGZ2.js","assets/Sun-B7TolJAG.js","assets/Play-Du5BNsRy.js","assets/Plus-BfnmJh1R.js","assets/SearchMd-JUAl7Zv6.js","assets/Trash01-cH2tYIUn.js","assets/Upload01-Bo60o4T6.js","assets/Users01-Bo_9DitT.js","assets/XClose-DhoOL-T1.js","assets/held-block-view-DTUWWRfL.js","assets/utils-DeFulDMz.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-Dh_1oqHi.js","assets/collapsible-D3gNdr7N.js","assets/use-copy-Dpm_jhm-.js","assets/usage-stats-DDafRqWC.js","assets/tool-namespace-Crbzrqv8.js","assets/form-Gz8fbLdb.js","assets/label-BCxqhVIq.js","assets/utils-CVEq3hMx.js","assets/markdown-P8cO0xLZ.js","assets/use-mobile-nW9hYb6L.js","assets/tooltip-DibJz0Jl.js","assets/index-CaH8ekvn.js","assets/use-clock-tick-jRUiEK1v.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CKUvsXnq.js","assets/types-BdOsWOEi.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-DYY0I41_.js","assets/command-N9BazZHl.js","assets/index-kd3fyZ9a.js","assets/integration-icon-BrTM8z-s.js","assets/project-icon-9kbQzXfH.js","assets/new-project-dialog-BzJmdXI6.js","assets/repository-import-picker-Bjws7k2-.js","assets/use-navigate-to-agent-CvuO-uuz.js","assets/repository-picker-DkvIZLAj.js","assets/useInfiniteQuery-DWVaUM2t.js","assets/infiniteQueryObserver-ClGIthQz.js","assets/collection-search-BIuQ3VPN.js","assets/use-debounced-value-BtR2lyTj.js","assets/required-auth-layout-Dn8nNstE.js","assets/use-org-sso-DdzTjSOo.js","assets/shell-layout-CE2Eihra.css","assets/sheet-C52S-h6R.js","assets/use-connection-CAR6Cxbr.js","assets/use-mcp-prompts-CFFfSPcj.js","assets/use-thread-outputs-D8Bvo55q.js","assets/file-type-icon-may_hs3N.js","assets/secret-ciphertext-cTA7BSVY.js","assets/alert-CYZdSIKq.js","assets/parse-sections-B30A8ECY.js","assets/blocks-tab-states-PBqE8hLO.js","assets/slider-rNbrBC-4.js","assets/index-C6_m0mjP.js","assets/tooltipContext-BzrsG1UN.js","assets/CategoricalChart-Bx8yFu23.js","assets/index-DgWAoWIc.js","assets/ActiveShapeUtils-gwLrBsiR.js","assets/Sector-DL6Ad47o.js","assets/symbol-C3kEOGZ_.js","assets/site-editor-toast-CT4NtD1f.js","assets/use-session-runtime-CQOTzbKn.js","assets/experiments-tab-choice-DZqY092h.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-ClbDdVRn.js","assets/sandbox-git-api-CH_-QFpD.js","assets/empty-state-Cc_qF1X6.js","assets/switch-nUFQi60k.js","assets/textarea-y7TWtoua.js","assets/popover-DauDBkON.js","assets/monaco-editor-CBJkBgIU.js","assets/editor-B7sIq_vQ.js","assets/calendar-GMyXKkbA.js","assets/select-CTAm_W2d.js","assets/editor-classes-BinXFbFk.js","assets/core.esm-BYOMVmVh.js","assets/sortable.esm-Cw5kBwgn.js","assets/toggle-group-BIu6qfZV.js","assets/active-indicator-CCMhAsc_.js","assets/combobox-BEVN0Tvl.js","assets/search-input-DBKkXR0y.js","assets/tabs-BwD6LFyC.js","assets/use-file-configs-CuVchUT-.js","assets/asset-utils-DcPLl2K6.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/section-preview-url-7zfngvgW.js","assets/mustache-Crsi4VAX.js","assets/use-content-sync-bYlxy6np.js","assets/sandbox-lifecycle-context-DMfngoi-.js","assets/checkbox-B6N4ay58.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-BKlQlSno.js","assets/badge-DeNt4-FX.js","assets/empty-state-RpLaBfip.js","assets/cms-settings-editor-CjDcV3Uq.js","assets/post-editor-BChaRDNt.js","assets/multi-select-BNfLnIfI.js","assets/block-document-BzAW7wGZ.js","assets/suggestion-Dd_Uy5Bv.js","assets/product-picker-dialog-CsTqbwXT.js","assets/index-iynQP1if.js","assets/blog-schema-BYLQdC9S.js","assets/use-fast-preview-draft-url-BUDoPHon.js","assets/preview-link-C762yHOt.js","assets/variant-draft-pointer-BeAKcq_c.js","assets/use-autosave-D0y0c0lt.js","assets/record-editor-C5XOx_LV.js","assets/context-BakNzIE5.js","assets/index-DENKa8lW.js","assets/use-org-fs-BcT14y41.js","assets/icon-button-TQkFyvqB.js","assets/category-editor-lTx7E71S.js","assets/sections-editor-DpO_mTF7.js","assets/page-seo-form-D4gneorY.js","assets/use-apply-named-rule-CeNTU7vM.js","assets/variant-matcher-override-B4pYtxaz.js","assets/seo-editor-BPToAJRY.js","assets/variant-calendar-C37bfPDk.js","assets/campaigns-view-iaGM9YLd.js","assets/named-rule-view-BVCpec2I.js","assets/named-rule-uses-D5gjZwOp.js","assets/post-calendar-Ceopsk1u.js","assets/redirect-editor-BxKT3ntE.js"])))=>i.map(i=>d[i]);
2
- import{c as pe,j as o,q as ri,e as li,K as ci,b as _e,l as ve,r as L,h as Tt,w as bs,x as ts,I as Bt,B as Oe,y as ys,v as ss,D as ns,aY as En,t as fe,aq as di,b5 as us,bf as rs,V as Is,b6 as Qn,Y as Fs,Z as zs,b7 as Bn,aZ as ui,X as at,ay as Ms,bg as Dn,bh as pi,bi as mi,aj as mn,at as fi,a4 as gi,bj as hi,u as Ko,bk as Zn,be as He,aS as xi,aR as bi,aO as yi,aM as vi,aN as ki,aQ as Si,aP as ji,bl as wi,bm as Ci}from"./index-BNmzMNlZ.js";import{a as On}from"./use-organization-settings-DeXdcCtZ.js";import{u as Zs,c as Rn}from"./chat-context-C56OVvQP.js";import{H as Ni,i as _i,u as Pi,S as Ti,C as Ai,N as Ei}from"./blocks-tab-states-PBqE8hLO.js";import{f as fn,e as Bi,c as Di,g as Io,B as gn,P as Oi,h as Ri,i as Fo,j as $i,k as Li,n as Ki,L as Ii,u as en,l as Fi,o as zi,R as Mi,E as jt,p as zo,r as Vi,q as Ui,a as Mo,s as Gi,t as ze,H as Vo,v as Hi,w as Uo,x as Yi,M as qi,d as Wi,y as Xi,z as Ji,A as Qi,b as Zi,S as er,C as eo,D as tr,N as sr}from"./held-block-view-DTUWWRfL.js";import{i as fs}from"./AlertCircle-COLuN3Qe.js";import{a1 as Go,F as to,r as so,a2 as Ho,a3 as $n,a4 as Yo,b as Vs,X as qo,a5 as nr,a6 as or,a7 as ar,a8 as ir,a9 as jn,n as rr,aa as Wo,ab as lr,ac as cr,ad as dr,k as no,ae as ur,a0 as Xo}from"./agent-icon-CVEMdYFU.js";import{a as Jo,s as Us,i as Ln,d as pr,e as oo}from"./UserSquare-DsAVH788.js";import{b as Qo,i as Zo}from"./ZoomOut-B1U_CHeD.js";import{c as ea,i as mr}from"./SwitchHorizontal01-DcP8c_x_.js";import{s as Kn}from"./Plus-BfnmJh1R.js";import{t as ta}from"./Users01-Bo_9DitT.js";import{S as tn}from"./scroll-area-Cfsm1vBV.js";import{T as Ze,a as et,c as tt}from"./tooltip-DibJz0Jl.js";import{o as fr,c as sa,F as gr,G as hr,H as xr,I as br,q as na,J as oa,u as In,m as aa,v as yr,l as vr,n as kr,b as Sr}from"./site-editor-toast-CT4NtD1f.js";import{k as Fn,S as jr,l as wr,m as Cr,o as Nr,q as ia,n as $s,v as _r,R as Pr,t as Tr,u as Ar,w as Er,p as Br,x as Dr,e as ao,y as io,z as Or,b as Rr,A as $r,h as Lr,B as ra,g as Kr,C as Ir,D as Fr,E as zr}from"./parse-sections-B30A8ECY.js";import{u as Mr,S as Vr}from"./mustache-Crsi4VAX.js";import{u as Ur}from"./use-content-sync-bYlxy6np.js";import{s as Gr}from"./sandbox-git-api-CH_-QFpD.js";import{u as zn}from"./use-session-runtime-CQOTzbKn.js";import{b as la}from"./sandbox-url-D3mC8qhT.js";import{d as Hr}from"./utils-DeFulDMz.js";import{a as Yr}from"./use-panel-navigate-BrjENNrA.js";import{a as ca,c as da}from"./repository-binding-BZ7FmJ0X.js";import{n as ua}from"./ShoppingBag01-usYkWunw.js";import{t as gs}from"./ChevronUp-4EkxqYyz.js";import{C as qr,a as Wr,b as Xr}from"./collapsible-D3gNdr7N.js";import{u as Jr}from"./use-sandbox-events-ClbDdVRn.js";import{a as Qr}from"./sandbox-lifecycle-context-DMfngoi-.js";import{C as sn}from"./checkbox-B6N4ay58.js";import{L as _t}from"./label-BCxqhVIq.js";import{c as Zr,b as el,a as tl,d as sl,S as nl}from"./select-CTAm_W2d.js";import{s as ol}from"./thread-intent-cB2EtHpg.js";import{s as al}from"./date-utils-CrvIKg-s.js";import{u as il}from"./use-move-blocks-BKlQlSno.js";import{i as rl}from"./CheckCircle-DCMOdEuL.js";import{a as Mn}from"./Copy01-Tog1jA1S.js";import{s as Vn}from"./Trash01-cH2tYIUn.js";import{i as hn}from"./Upload01-Bo60o4T6.js";import{B as Un}from"./badge-DeNt4-FX.js";import{E as ll}from"./empty-state-RpLaBfip.js";import{u as cl}from"./use-ai-providers-Bsehd5pg.js";import{T as ro}from"./textarea-y7TWtoua.js";import{u as dl}from"./use-file-configs-CuVchUT-.js";import{MonacoCodeEditor as pa}from"./monaco-editor-CBJkBgIU.js";import"./core.esm-BYOMVmVh.js";import"./sortable.esm-Cw5kBwgn.js";import{b as ul}from"./Tool01-Bon-ixH5.js";import{a as lo}from"./experiments-tab-choice-DZqY092h.js";import{E as pl}from"./empty-state-Cc_qF1X6.js";import{G as co}from"./repository-picker-DkvIZLAj.js";import{R as ml}from"./repository-import-picker-Bjws7k2-.js";function ma(){return On("blog_ai_enabled")}function fl(t,e){if(!t||!e?.length)return t;const s=Object.fromEntries(Object.entries(t.properties??{}).filter(([n])=>!e.includes(n)));return Object.keys(s).length>0?{...t,properties:s}:t}function gl(t,e,s){return typeof t!="string"?null:fl(Fn(t,e),s)}function fa(t,e,s){if(!e||typeof t!="string")return!1;const n=gl(t,e,s);return!!n&&Object.keys(n.properties??{}).length>0}const uo="CMS",wn="cms-settings";function hl(t){const e=t?.manifest?.blocks??{};return Object.values(e).some(s=>!!s&&Object.hasOwn(s,wn))}function km(t){const e=Object.hasOwn(t,uo)?t[uo]:void 0;if(e==null)return{kind:"absent",block:{__resolveType:wn}};const s=typeof e=="object"&&!Array.isArray(e)?e.__resolveType:void 0;return s!==wn?{kind:"conflict",resolveType:typeof s=="string"?s:""}:{kind:"saved",block:e}}const xl=[{blockKey:"deco-vtex",vendor:"deco",app:"vtex",title:"VTEX",description:"Loaders, actions and workflows for adding VTEX Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vtex/logo.png"},{blockKey:"deco-shopify",vendor:"deco",app:"shopify",title:"Shopify",description:"Loaders, actions and workflows for adding Shopify Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/shopify/logo.png"},{blockKey:"deco-vnda",vendor:"deco",app:"vnda",title:"VNDA",description:"Loaders, actions and workflows for adding VNDA Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vnda/logo.png"},{blockKey:"deco-wake",vendor:"deco",app:"wake",title:"Wake",description:"Loaders, actions and workflows for adding Wake Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/wake/logo.png"},{blockKey:"deco-nuvemshop",vendor:"deco",app:"nuvemshop",title:"Nuvemshop",description:"Loaders, actions and workflows for adding Nuvemshop Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/nuvemshop.png"},{blockKey:"deco-linx",vendor:"deco",app:"linx",title:"Linx",description:"Loaders, actions and workflows for adding Linx Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/linx.png"},{blockKey:"deco-wap",vendor:"deco",app:"wap",title:"Uappi",description:"Loaders, actions and workflows for adding Uappi Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/uappi.png"},{blockKey:"deco-sap",vendor:"deco",app:"sap",title:"SAP Commerce",description:"Loaders, actions and workflows for adding SAP Commerce Platform to your website.",category:"Ecommerce",logo:"https://decoims.com/decocms/389b8d9b-e102-4ee7-9e9b-9c81c433581a/Sap_fav.png"},{blockKey:"deco-streamshop",vendor:"deco",app:"streamshop",title:"Streamshop",description:"Incorporate videos into your eCommerce. Boost sales significantly with Video Commerce Streamshop.",category:"Ecommerce"},{blockKey:"deco-algolia",vendor:"deco",app:"algolia",title:"Algolia",description:"Product search & discovery that increases conversions at scale.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/algolia/logo.png"},{blockKey:"deco-typesense",vendor:"deco",app:"typesense",title:"TypeSense",description:"Open source search engine meticulously engineered for performance & ease-of-use.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/typesense/logo.png"},{blockKey:"deco-smarthint",vendor:"deco",app:"smarthint",title:"SmartHint",description:"Smart search and product recommendation to improve your eCommerce customer experience.",category:"Search",logo:"https://github.com/deco-cx/apps/blob/main/smarthint/logo.png?raw=true"},{blockKey:"deco-linx-impulse",vendor:"deco",app:"linx-impulse",title:"Linx Impulse",description:"Build, manage and deliver B2B, B2C and Marketplace commerce experiences.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/linx-impulse/logo.png"},{blockKey:"deco-verified-reviews",vendor:"deco",app:"verified-reviews",title:"Verified Reviews",description:"A specialized solution in the collection of customer reviews",category:"Review",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/verified-reviews/logo.png"},{blockKey:"deco-power-reviews",vendor:"deco",app:"power-reviews",title:"Power Reviews",description:"Collect more and better Ratings & Reviews and other UGC. Create UGC displays that convert. Analyze to enhance product experience and positioning.",category:"Review",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/power-reviews/logo.png"},{blockKey:"deco-konfidency",vendor:"deco",app:"konfidency",title:"Konfidency",description:"Product reviews and store reviews.",category:"Review",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/konfidency.png"},{blockKey:"deco-ra-trustvox",vendor:"deco",app:"ra-trustvox",title:"RA Trustvox",description:"RA Trustvox reviews.",category:"Review",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/ra-trustvox.png"},{blockKey:"deco-analytics",vendor:"deco",app:"analytics",title:"Deco Analytics",description:"Measure your site traffic at a glance in a simple and modern web analytics dashboard.",category:"Analytics",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/analytics/logo.png"},{blockKey:"deco-posthog",vendor:"deco",app:"posthog",title:"PostHog",description:"All-in-one platform for product analytics, feature flags, session replays, experiments, and surveys, built for developers.",category:"Analytics",logo:"https://decoims.com/decocms/cb17e9dc-8772-4873-8dae-f5a9f99694d4/posthog-icon-logo-png_seeklogo-483563.png"},{blockKey:"deco-resend",vendor:"deco",app:"resend",title:"Resend",description:"Resend is an email platform that helps developers build and send transactional and marketing emails.",category:"Email",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/resend-logo.png"},{blockKey:"deco-mailchimp",vendor:"deco",app:"mailchimp",title:"Mailchimp",description:"Email and marketing automations platform for growing businesses.",category:"Email",logo:"https://assets.decocache.com/admin/094cf93f-f1cb-4ef1-b993-9d9785b3cd0c/channels4_profile-(1).jpg"},{blockKey:"deco-blog",vendor:"deco",app:"blog",title:"Deco Blog",description:"Manage your posts.",category:"Content",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png"},{blockKey:"deco-weather",vendor:"deco",app:"weather",title:"Weather",description:"Vary your content based on the current weather of your visitors.",category:"Tool",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png"}],bl=[{blockKey:"deco-vtex",vendor:"deco",app:"vtex",title:"VTEX",description:"VTEX IO commerce integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vtex/logo.png",npm:{name:"@decocms/apps-vtex",registryExport:"VTEX_REGISTRY_ENTRY"}},{blockKey:"deco-shopify",vendor:"deco",app:"shopify",title:"Shopify",description:"Shopify Storefront API commerce integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/shopify/logo.png",npm:{name:"@decocms/apps-shopify",registryExport:"SHOPIFY_REGISTRY_ENTRY"}},{blockKey:"deco-wake",vendor:"deco",app:"wake",title:"Wake",description:"Wake Commerce (Storefront API) integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/wake/logo.png",npm:{name:"@decocms/apps-wake",registryExport:"WAKE_REGISTRY_ENTRY"}},{blockKey:"deco-nuvemshop",vendor:"deco",app:"nuvemshop",title:"Nuvemshop",description:"Nuvemshop (Tiendanube) Storefront API commerce integration",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/nuvemshop.png",npm:{name:"@decocms/apps-nuvemshop",registryExport:"NUVEMSHOP_REGISTRY_ENTRY"}},{blockKey:"deco-resend",vendor:"deco",app:"resend",title:"Resend",description:"Transactional email via Resend",category:"Email",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/resend-logo.png",npm:{name:"@decocms/apps-resend",registryExport:"RESEND_REGISTRY_ENTRY"}},{blockKey:"deco-blog",vendor:"deco",app:"blog",title:"Blog",description:"Blog posts, categories, and authors from CMS collections",category:"Content",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png",npm:{name:"@decocms/apps-blog",registryExport:"BLOG_REGISTRY_ENTRY"}}];function nn(t,e){return`${t}-${e}`}function Gn(t,e){return`site/apps/${t}/${e}.ts`}const yl="@decocms/",vl=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function kl(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const Sl={"tanstack-start":"tanstack"};function jl(t){return t?Sl[t]??null:"deno"}function ga(t){if(!t)return null;try{const e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function ha(t){const e={};for(const s of["dependencies","devDependencies"]){const n=t[s];if(!(!n||typeof n!="object"||Array.isArray(n)))for(const[a,i]of Object.entries(n))typeof i=="string"&&!(a in e)&&(e[a]=i)}return e}const wl=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function xa(t){return wl.test(t)}function Cl(t){const e=ga(t);if(!e)return null;const s=ha(e),n=[...vl,...Object.keys(s).filter(i=>i.startsWith(yl)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!xa(r))return r;a??=r}}return a}function Nl(t,e){const s=ga(t);return s?ha(s)[e]??null:null}function _l(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:Cl(t.packageJson)}:null}class Fe extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function Pl(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return`${/^[0-9]/.test(s)?`app${s}`:s}Mod`}function Tl(t){const e=`apps/${t.app}/mod.ts`;return{path:`apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${e}";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-editor-C-CTy5jL.js","assets/index-BGCeOWuH.js","assets/index-BQfNeaI1.css","assets/chat-context-BvBN6HgF.js","assets/use-panel-navigate-BJRHz9-t.js","assets/thread-route-D9dyzfFR.js","assets/use-project-scope-B0Sibn6g.js","assets/repository-binding-Meqp5p71.js","assets/use-mcp-client-P41n2mxI.js","assets/auth-BkqoCGcx.js","assets/autosend-1U_b-i1h.js","assets/thread-intent-DH83rsLQ.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-D75R450R.js","assets/task-board-DZ8Kzwkd.js","assets/schema-Db9nAPbV.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-CqPtaVnx.js","assets/use-ai-providers-BHsc3bDD.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-BiInrSf0.js","assets/scroll-area-Do3s8MFg.js","assets/index-BdQq_4o_.js","assets/use-section-preview-base-wA756W4w.js","assets/UserSquare-BWlOHIw0.js","assets/agent-icon-BXl9rcx1.js","assets/AlertCircle-CIClX1OX.js","assets/Tool01-CyfGI7T6.js","assets/ArrowUp-DvNrLRdk.js","assets/ArrowLeft-hUis4zpK.js","assets/LinkBroken01-BbJzP52K.js","assets/ShoppingBag01-CrAecsFE.js","assets/ZoomOut-Csm0orCM.js","assets/Building02-DyaG8VRs.js","assets/CheckCircle-IjQMURt4.js","assets/ChevronUp-DZpXGp6s.js","assets/ChevronSelectorVertical-DSrF7Kt-.js","assets/Copy01-DelcC4NE.js","assets/CreditCard01-cYImG8Bl.js","assets/DotsVertical-Cd1ayiT8.js","assets/Image01-BmkGkBEJ.js","assets/Globe04-C3AUDQA6.js","assets/SwitchHorizontal01-BvXNAenZ.js","assets/Key01-BJu0utQ9.js","assets/Link01-CpEeBnOB.js","assets/Minus-Beni9ibl.js","assets/Monitor01-DIpgHRZ3.js","assets/Sun-Dm3m8VPj.js","assets/Play-CeJs-Z9F.js","assets/Plus-Dp5dZDoY.js","assets/SearchMd-DkOimU4h.js","assets/Trash01-BneWuuYf.js","assets/Upload01-CNkWpiz7.js","assets/Users01-ugdEQXdG.js","assets/XClose-BHn8yO7p.js","assets/held-block-view-DF-dsPP4.js","assets/utils-OgCNPQQr.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-DVCmCnBf.js","assets/collapsible-B9h9LvCC.js","assets/use-copy-CxT0JeDz.js","assets/usage-stats-DBeLsjRR.js","assets/tool-namespace-Y0TJrGSX.js","assets/form-BKxpLzV1.js","assets/label-_maV4eWQ.js","assets/utils-CVEq3hMx.js","assets/markdown-Pxz-NCAq.js","assets/use-mobile-jFUNwYYf.js","assets/tooltip-9LLsMgGV.js","assets/index-C91ph34T.js","assets/use-clock-tick-DIHPLwxm.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-C-WjAbV3.js","assets/types-BO2WHIDA.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-aaJ-Ow-a.js","assets/command-DoejxN8Q.js","assets/index-BHWlfC8b.js","assets/integration-icon-IfDXGweg.js","assets/project-icon-CjQuZIIb.js","assets/new-project-dialog-BZU_MI3Q.js","assets/repository-import-picker-FH262XPV.js","assets/use-navigate-to-agent-Dm6cdVpv.js","assets/repository-picker-DCYyzOOP.js","assets/useInfiniteQuery-B_LZh1B0.js","assets/infiniteQueryObserver-DdJGfIBw.js","assets/collection-search-D_HANk-F.js","assets/use-debounced-value-N-JjpU1V.js","assets/required-auth-layout-tipFurup.js","assets/use-org-sso-BhUG19nu.js","assets/shell-layout-CE2Eihra.css","assets/sheet-C3lf7JiX.js","assets/use-connection-BQFGYTV6.js","assets/use-mcp-prompts-B3Nr4ZJG.js","assets/use-thread-outputs-CxOHL03a.js","assets/file-type-icon-T5-JgFJO.js","assets/section-array-field-DlpdCCcl.js","assets/alert-BxwQ9GWi.js","assets/parse-sections-BHOqhf01.js","assets/blocks-tab-states-Bji5rJXk.js","assets/slider-Brs1MiDz.js","assets/index-B54Dwq_E.js","assets/tooltipContext-D1XV88gx.js","assets/CategoricalChart-B2xwR0Vg.js","assets/index-DEhotlUt.js","assets/ActiveShapeUtils-C-rHC-K0.js","assets/Sector-DYInMAbx.js","assets/symbol-DhjzVarJ.js","assets/site-editor-toast-DS0_fxT0.js","assets/use-session-runtime-CQn-52Ez.js","assets/experiments-tab-choice-CJW0rlLk.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-BNCiNcVF.js","assets/sandbox-git-api-CH_-QFpD.js","assets/empty-state-BXpVXa8p.js","assets/switch-DXvm-pfC.js","assets/textarea-PZ5-N42X.js","assets/popover-SHWbH4i8.js","assets/monaco-editor-CEz6AH84.js","assets/editor-vxR6fGAu.js","assets/calendar-sUXRafM_.js","assets/select-C0Q0f4At.js","assets/editor-classes-C1mRh06j.js","assets/core.esm-kr0nDMAf.js","assets/sortable.esm-DR7ZsZlW.js","assets/toggle-group-CUFIN5dE.js","assets/active-indicator-CCMhAsc_.js","assets/combobox-BfNsB6Ea.js","assets/search-input-BiW12RB7.js","assets/tabs-snNNT2OQ.js","assets/use-file-configs-DH6Ac5Y5.js","assets/asset-utils-CDMjNYFJ.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/section-preview-url-7zfngvgW.js","assets/mustache-D-9UMI1S.js","assets/use-content-sync-DPGe01L6.js","assets/sandbox-lifecycle-context-D9P5uTE7.js","assets/checkbox-D-LzvMyz.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-B-yW6Slv.js","assets/badge-DESNookz.js","assets/empty-state-C0q6FDCT.js","assets/cms-settings-editor-DQJghv4n.js","assets/post-editor-CtDaen5o.js","assets/multi-select-BRkampvt.js","assets/block-document-CcGRU5CL.js","assets/suggestion-BqSBag09.js","assets/product-picker-dialog-BF4qIVtr.js","assets/index-Y7xr7TpK.js","assets/blog-schema-BNIKCmEY.js","assets/use-fast-preview-draft-url-4INawxcX.js","assets/preview-link-C762yHOt.js","assets/variant-draft-pointer-BeAKcq_c.js","assets/use-autosave-B-Iuf8KI.js","assets/record-editor-hmgA54LD.js","assets/context-BTZ4zLZ6.js","assets/index-C5dWtjQZ.js","assets/use-org-fs-BrF4BnPF.js","assets/icon-button-BpGFmmxF.js","assets/category-editor-CS1KKmTs.js","assets/sections-editor-DZMEPtw_.js","assets/page-seo-form-Dx0hMHSf.js","assets/use-apply-named-rule---oSjx7n.js","assets/variant-matcher-override-DMBn3So8.js","assets/seo-editor-DOL-unZx.js","assets/variant-calendar-CVJKB37H.js","assets/campaigns-view-3-zGJglb.js","assets/named-rule-view-ChwtdSTO.js","assets/named-rule-uses-5Sl1aIdP.js","assets/post-calendar-WzBoQET7.js","assets/redirect-editor-DS-wqNcI.js"])))=>i.map(i=>d[i]);
2
+ import{c as pe,j as o,q as ri,e as li,K as ci,b as _e,l as ve,r as L,h as Tt,w as bs,x as ts,I as Bt,B as Oe,y as ys,v as ss,D as ns,aY as En,t as fe,aq as di,b5 as us,bf as rs,V as Is,b6 as Qn,Y as Fs,Z as zs,b7 as Bn,aZ as ui,X as at,ay as Ms,bg as Dn,bh as pi,bi as mi,aj as mn,at as fi,a4 as gi,bj as hi,u as Ko,bk as Zn,be as He,aS as xi,aR as bi,aO as yi,aM as vi,aN as ki,aQ as Si,aP as ji,bl as wi,bm as Ci}from"./index-BGCeOWuH.js";import{a as On}from"./use-organization-settings-BiInrSf0.js";import{u as Zs,c as Rn}from"./chat-context-BvBN6HgF.js";import{H as Ni,i as _i,u as Pi,S as Ti,C as Ai,N as Ei}from"./blocks-tab-states-Bji5rJXk.js";import{f as fn,e as Bi,c as Di,g as Io,B as gn,P as Oi,h as Ri,i as Fo,j as $i,k as Li,n as Ki,L as Ii,u as en,l as Fi,o as zi,R as Mi,E as jt,p as zo,r as Vi,q as Ui,a as Mo,s as Gi,t as ze,H as Vo,v as Hi,w as Uo,x as Yi,M as qi,d as Wi,y as Xi,z as Ji,A as Qi,b as Zi,S as er,C as eo,D as tr,N as sr}from"./held-block-view-DF-dsPP4.js";import{i as fs}from"./AlertCircle-CIClX1OX.js";import{a1 as Go,F as to,r as so,a2 as Ho,a3 as $n,a4 as Yo,b as Vs,X as qo,a5 as nr,a6 as or,a7 as ar,a8 as ir,a9 as jn,n as rr,aa as Wo,ab as lr,ac as cr,ad as dr,k as no,ae as ur,a0 as Xo}from"./agent-icon-BXl9rcx1.js";import{a as Jo,s as Us,i as Ln,d as pr,e as oo}from"./UserSquare-BWlOHIw0.js";import{b as Qo,i as Zo}from"./ZoomOut-Csm0orCM.js";import{c as ea,i as mr}from"./SwitchHorizontal01-BvXNAenZ.js";import{s as Kn}from"./Plus-Dp5dZDoY.js";import{t as ta}from"./Users01-ugdEQXdG.js";import{S as tn}from"./scroll-area-Do3s8MFg.js";import{T as Ze,a as et,c as tt}from"./tooltip-9LLsMgGV.js";import{o as fr,c as sa,F as gr,G as hr,H as xr,I as br,q as na,J as oa,u as In,m as aa,v as yr,l as vr,n as kr,b as Sr}from"./site-editor-toast-DS0_fxT0.js";import{k as Fn,S as jr,l as wr,m as Cr,o as Nr,q as ia,n as $s,v as _r,R as Pr,t as Tr,u as Ar,w as Er,p as Br,x as Dr,e as ao,y as io,z as Or,b as Rr,A as $r,h as Lr,B as ra,g as Kr,C as Ir,D as Fr,E as zr}from"./parse-sections-BHOqhf01.js";import{u as Mr,S as Vr}from"./mustache-D-9UMI1S.js";import{u as Ur}from"./use-content-sync-DPGe01L6.js";import{s as Gr}from"./sandbox-git-api-CH_-QFpD.js";import{u as zn}from"./use-session-runtime-CQn-52Ez.js";import{b as la}from"./sandbox-url-D3mC8qhT.js";import{d as Hr}from"./utils-OgCNPQQr.js";import{a as Yr}from"./use-panel-navigate-BJRHz9-t.js";import{a as ca,c as da}from"./repository-binding-Meqp5p71.js";import{n as ua}from"./ShoppingBag01-CrAecsFE.js";import{t as gs}from"./ChevronUp-DZpXGp6s.js";import{C as qr,a as Wr,b as Xr}from"./collapsible-B9h9LvCC.js";import{u as Jr}from"./use-sandbox-events-BNCiNcVF.js";import{a as Qr}from"./sandbox-lifecycle-context-D9P5uTE7.js";import{C as sn}from"./checkbox-D-LzvMyz.js";import{L as _t}from"./label-_maV4eWQ.js";import{c as Zr,b as el,a as tl,d as sl,S as nl}from"./select-C0Q0f4At.js";import{s as ol}from"./thread-intent-DH83rsLQ.js";import{s as al}from"./date-utils-CrvIKg-s.js";import{u as il}from"./use-move-blocks-B-yW6Slv.js";import{i as rl}from"./CheckCircle-IjQMURt4.js";import{a as Mn}from"./Copy01-DelcC4NE.js";import{s as Vn}from"./Trash01-BneWuuYf.js";import{i as hn}from"./Upload01-CNkWpiz7.js";import{B as Un}from"./badge-DESNookz.js";import{E as ll}from"./empty-state-C0q6FDCT.js";import{u as cl}from"./use-ai-providers-BHsc3bDD.js";import{T as ro}from"./textarea-PZ5-N42X.js";import{u as dl}from"./use-file-configs-DH6Ac5Y5.js";import{MonacoCodeEditor as pa}from"./monaco-editor-CEz6AH84.js";import"./core.esm-kr0nDMAf.js";import"./sortable.esm-DR7ZsZlW.js";import{b as ul}from"./Tool01-CyfGI7T6.js";import{a as lo}from"./experiments-tab-choice-CJW0rlLk.js";import{E as pl}from"./empty-state-BXpVXa8p.js";import{G as co}from"./repository-picker-DCYyzOOP.js";import{R as ml}from"./repository-import-picker-FH262XPV.js";function ma(){return On("blog_ai_enabled")}function fl(t,e){if(!t||!e?.length)return t;const s=Object.fromEntries(Object.entries(t.properties??{}).filter(([n])=>!e.includes(n)));return Object.keys(s).length>0?{...t,properties:s}:t}function gl(t,e,s){return typeof t!="string"?null:fl(Fn(t,e),s)}function fa(t,e,s){if(!e||typeof t!="string")return!1;const n=gl(t,e,s);return!!n&&Object.keys(n.properties??{}).length>0}const uo="CMS",wn="cms-settings";function hl(t){const e=t?.manifest?.blocks??{};return Object.values(e).some(s=>!!s&&Object.hasOwn(s,wn))}function km(t){const e=Object.hasOwn(t,uo)?t[uo]:void 0;if(e==null)return{kind:"absent",block:{__resolveType:wn}};const s=typeof e=="object"&&!Array.isArray(e)?e.__resolveType:void 0;return s!==wn?{kind:"conflict",resolveType:typeof s=="string"?s:""}:{kind:"saved",block:e}}const xl=[{blockKey:"deco-vtex",vendor:"deco",app:"vtex",title:"VTEX",description:"Loaders, actions and workflows for adding VTEX Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vtex/logo.png"},{blockKey:"deco-shopify",vendor:"deco",app:"shopify",title:"Shopify",description:"Loaders, actions and workflows for adding Shopify Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/shopify/logo.png"},{blockKey:"deco-vnda",vendor:"deco",app:"vnda",title:"VNDA",description:"Loaders, actions and workflows for adding VNDA Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vnda/logo.png"},{blockKey:"deco-wake",vendor:"deco",app:"wake",title:"Wake",description:"Loaders, actions and workflows for adding Wake Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/wake/logo.png"},{blockKey:"deco-nuvemshop",vendor:"deco",app:"nuvemshop",title:"Nuvemshop",description:"Loaders, actions and workflows for adding Nuvemshop Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/nuvemshop.png"},{blockKey:"deco-linx",vendor:"deco",app:"linx",title:"Linx",description:"Loaders, actions and workflows for adding Linx Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/linx.png"},{blockKey:"deco-wap",vendor:"deco",app:"wap",title:"Uappi",description:"Loaders, actions and workflows for adding Uappi Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/uappi.png"},{blockKey:"deco-sap",vendor:"deco",app:"sap",title:"SAP Commerce",description:"Loaders, actions and workflows for adding SAP Commerce Platform to your website.",category:"Ecommerce",logo:"https://decoims.com/decocms/389b8d9b-e102-4ee7-9e9b-9c81c433581a/Sap_fav.png"},{blockKey:"deco-streamshop",vendor:"deco",app:"streamshop",title:"Streamshop",description:"Incorporate videos into your eCommerce. Boost sales significantly with Video Commerce Streamshop.",category:"Ecommerce"},{blockKey:"deco-algolia",vendor:"deco",app:"algolia",title:"Algolia",description:"Product search & discovery that increases conversions at scale.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/algolia/logo.png"},{blockKey:"deco-typesense",vendor:"deco",app:"typesense",title:"TypeSense",description:"Open source search engine meticulously engineered for performance & ease-of-use.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/typesense/logo.png"},{blockKey:"deco-smarthint",vendor:"deco",app:"smarthint",title:"SmartHint",description:"Smart search and product recommendation to improve your eCommerce customer experience.",category:"Search",logo:"https://github.com/deco-cx/apps/blob/main/smarthint/logo.png?raw=true"},{blockKey:"deco-linx-impulse",vendor:"deco",app:"linx-impulse",title:"Linx Impulse",description:"Build, manage and deliver B2B, B2C and Marketplace commerce experiences.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/linx-impulse/logo.png"},{blockKey:"deco-verified-reviews",vendor:"deco",app:"verified-reviews",title:"Verified Reviews",description:"A specialized solution in the collection of customer reviews",category:"Review",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/verified-reviews/logo.png"},{blockKey:"deco-power-reviews",vendor:"deco",app:"power-reviews",title:"Power Reviews",description:"Collect more and better Ratings & Reviews and other UGC. Create UGC displays that convert. Analyze to enhance product experience and positioning.",category:"Review",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/power-reviews/logo.png"},{blockKey:"deco-konfidency",vendor:"deco",app:"konfidency",title:"Konfidency",description:"Product reviews and store reviews.",category:"Review",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/konfidency.png"},{blockKey:"deco-ra-trustvox",vendor:"deco",app:"ra-trustvox",title:"RA Trustvox",description:"RA Trustvox reviews.",category:"Review",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/ra-trustvox.png"},{blockKey:"deco-analytics",vendor:"deco",app:"analytics",title:"Deco Analytics",description:"Measure your site traffic at a glance in a simple and modern web analytics dashboard.",category:"Analytics",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/analytics/logo.png"},{blockKey:"deco-posthog",vendor:"deco",app:"posthog",title:"PostHog",description:"All-in-one platform for product analytics, feature flags, session replays, experiments, and surveys, built for developers.",category:"Analytics",logo:"https://decoims.com/decocms/cb17e9dc-8772-4873-8dae-f5a9f99694d4/posthog-icon-logo-png_seeklogo-483563.png"},{blockKey:"deco-resend",vendor:"deco",app:"resend",title:"Resend",description:"Resend is an email platform that helps developers build and send transactional and marketing emails.",category:"Email",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/resend-logo.png"},{blockKey:"deco-mailchimp",vendor:"deco",app:"mailchimp",title:"Mailchimp",description:"Email and marketing automations platform for growing businesses.",category:"Email",logo:"https://assets.decocache.com/admin/094cf93f-f1cb-4ef1-b993-9d9785b3cd0c/channels4_profile-(1).jpg"},{blockKey:"deco-blog",vendor:"deco",app:"blog",title:"Deco Blog",description:"Manage your posts.",category:"Content",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png"},{blockKey:"deco-weather",vendor:"deco",app:"weather",title:"Weather",description:"Vary your content based on the current weather of your visitors.",category:"Tool",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png"}],bl=[{blockKey:"deco-vtex",vendor:"deco",app:"vtex",title:"VTEX",description:"VTEX IO commerce integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vtex/logo.png",npm:{name:"@decocms/apps-vtex",registryExport:"VTEX_REGISTRY_ENTRY"}},{blockKey:"deco-shopify",vendor:"deco",app:"shopify",title:"Shopify",description:"Shopify Storefront API commerce integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/shopify/logo.png",npm:{name:"@decocms/apps-shopify",registryExport:"SHOPIFY_REGISTRY_ENTRY"}},{blockKey:"deco-wake",vendor:"deco",app:"wake",title:"Wake",description:"Wake Commerce (Storefront API) integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/wake/logo.png",npm:{name:"@decocms/apps-wake",registryExport:"WAKE_REGISTRY_ENTRY"}},{blockKey:"deco-nuvemshop",vendor:"deco",app:"nuvemshop",title:"Nuvemshop",description:"Nuvemshop (Tiendanube) Storefront API commerce integration",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/nuvemshop.png",npm:{name:"@decocms/apps-nuvemshop",registryExport:"NUVEMSHOP_REGISTRY_ENTRY"}},{blockKey:"deco-resend",vendor:"deco",app:"resend",title:"Resend",description:"Transactional email via Resend",category:"Email",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/resend-logo.png",npm:{name:"@decocms/apps-resend",registryExport:"RESEND_REGISTRY_ENTRY"}},{blockKey:"deco-blog",vendor:"deco",app:"blog",title:"Blog",description:"Blog posts, categories, and authors from CMS collections",category:"Content",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png",npm:{name:"@decocms/apps-blog",registryExport:"BLOG_REGISTRY_ENTRY"}}];function nn(t,e){return`${t}-${e}`}function Gn(t,e){return`site/apps/${t}/${e}.ts`}const yl="@decocms/",vl=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function kl(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const Sl={"tanstack-start":"tanstack"};function jl(t){return t?Sl[t]??null:"deno"}function ga(t){if(!t)return null;try{const e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function ha(t){const e={};for(const s of["dependencies","devDependencies"]){const n=t[s];if(!(!n||typeof n!="object"||Array.isArray(n)))for(const[a,i]of Object.entries(n))typeof i=="string"&&!(a in e)&&(e[a]=i)}return e}const wl=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function xa(t){return wl.test(t)}function Cl(t){const e=ga(t);if(!e)return null;const s=ha(e),n=[...vl,...Object.keys(s).filter(i=>i.startsWith(yl)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!xa(r))return r;a??=r}}return a}function Nl(t,e){const s=ga(t);return s?ha(s)[e]??null:null}function _l(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:Cl(t.packageJson)}:null}class Fe extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function Pl(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return`${/^[0-9]/.test(s)?`app${s}`:s}Mod`}function Tl(t){const e=`apps/${t.app}/mod.ts`;return{path:`apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${e}";
3
3
  export * from "${e}";
4
4
  `}}function Al(t,e){return{path:`src/apps/${t.vendor}/${t.app}.ts`,content:`export * from "${e}/mod";
5
5
  `}}function El(t,e){let s=0,n=null;for(let a=e;a<t.length;a++){const i=t[a];if(n){i==="\\"?a++:i===n&&(n=null);continue}if(i==='"'||i==="'")n=i;else if(i==="{")s++;else if(i==="}"&&--s===0)return a}throw new Fe("package.json: unbalanced braces")}function po(t,e){let s=e;for(;s<t.length&&` \r
@@ -19,4 +19,4 @@ ${m.replace(/^\s*\]/,"]")}`:m].join("")}function Ll(t){const{entry:e,technology:
19
19
  <strong>Gaveta HortiNatura:</strong> frescor por duas vezes mais tempo;`,style:"unordered"},BlockImage:{url:"https://cdn.exemplo.com/2026/10/mochila.webp",alt:"Mochila escolar azul apoiada em uma cadeira de sala de aula",size:"full"},Video:{url:"https://www.youtube.com/watch?v=dQw4w9WgXcQ",caption:"Como medir a capacidade da mala"},Divider:{},Cta:{text:"Ver toda a linha Escolar",href:"/escolar"},Callout:{title:"VOCÊ SABIA?",body:"Pediatras recomendam que a mochila carregada não passe de 10% do peso da criança.",variant:"tip"},Code:{code:"const total = itens.length;",language:"ts"},Stat:{value:"30%",label:"menos desperdício",description:"Comparado ao modelo anterior da mesma linha."},StatGroup:{stats:'[{"value":"30%","label":"menos desperdício"},{"value":"2x","label":"mais frescor"}]'},CardGroup:{cards:'[{"title":"Pré-escola","body":"Pouco material, mochila pequena."},{"title":"Fundamental","body":"Cadernos e livros pesam; considere rodinhas."}]'},Checklist:{title:"Antes de comprar, confira",items:'["Capacidade em litros","Alças acolchoadas","Compartimento para notebook"]'},Steps:{title:"Como medir",steps:'[{"title":"Meça a altura","description":"Da base ao topo, sem as alças."},{"title":"Some a profundidade"}]'},Comparison:{left:'{"title":"Com rodinhas","items":["Poupa a coluna","Mais pesada vazia"]}',right:'{"title":"De costas","items":["Mais leve","Exige ajuste das alças"]}'},Table:{headers:'["Modelo","Capacidade","Preço"]',rows:'[["Bordo","38L","R$ 399"],["Média","68L","R$ 599"]]'}},Td=600;function Ad(t,e){for(const{payload:s}of Xe(e,"posts"))for(const n of Ge(s.sections)){const a=Se(n);if(!a||a.__resolveType!==t)continue;const{__resolveType:i,...r}=a;if(Object.keys(r).length!==0&&!(JSON.stringify(r).length>Td))return r}}function Ed(t,e,s,n){const a=hd(e,n),i=qn(e,n),r=new Set(Va(t.value,i)),l=a.filter(g=>r.has(g.resolveType)),c=l.length>0?l:a,d=new Set,m=[];for(const g of c){if(d.has(g.name)||i[g.name]!==g.resolveType)continue;d.add(g.name);const f=Ad(g.resolveType,s)??Pd[g.name];m.push({name:g.name,title:g.title,description:g.description??"",schema:_d(Cd(g.resolveType,e),f),example:f})}return m}function qn(t,e){const s={};for(const n of La(t,e)){const a=rn(n.resolveType);a in s||(s[a]=n.resolveType)}return s}function Bd(t,e,s={}){const n=[];for(const a of t){const i=e[a.type];if(!i)continue;const r=Rd(a.props,a.productIds??[],s[a.type]);n.push({__resolveType:i,...r})}return n}const Dd=["product","products"];function Od(t){const e=Se(t);return e?Dd.find(s=>s in e)??null:null}function Rd(t,e,s){const n=e.filter(Boolean),a=Od(s);if(n.length===0||!a)return t;const i=s[a];return{...t,[a]:Ac(i,n)}}const Wn=80;function Ya(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,Wn)}function Vm(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+/,"").slice(0,Wn)}function jo(t,e){const s=Wn-e.length-1;return`${t.slice(0,s).replace(/-+$/,"")}-${e}`}function qa(t,e,s){const n=Ya(t)||`${s}-${os(6)}`,a=new Set(e);if(!a.has(n))return n;for(let i=2;i<100;i++){const r=jo(n,String(i));if(!a.has(r))return r}return jo(n,os(4))}function Wa(t,e){return qa(t,e,"post")}function $d(t,e){return qa(t,e,"category")}function Ld({draft:t,resolveTypes:e,productShapes:s,categories:n,authors:a,planning:i,takenSlugs:r,now:l}){const c=new Set(t.categorySlugs),d=new Set(t.authorEmails),m={title:t.title,slug:Wa(t.title,r),date:l.toISOString().slice(0,10),excerpt:t.excerpt,image:t.cover.url,alt:t.cover.alt,authors:a.filter(g=>d.has(g.email)),categories:n.filter(g=>c.has(g.slug)),seo:{title:t.seo.title,description:t.seo.description,image:t.cover.url},sections:Bd(t.sections,e,s),planning:i??{}};return Gs(m,"awaiting_review",l)}function Ws(t){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const Xa=/^(\d{4})-(\d{2})-(\d{2})$/;function Xs(t){const e=t.trim();if(!e)return null;const s=Xa.exec(e);if(s){const a=Number(s[1]),i=Number(s[2])-1,r=Number(s[3]),l=new Date(a,i,r);return l.getMonth()===i&&l.getDate()===r?l:null}const n=new Date(e);return Number.isNaN(n.getTime())?null:al(n)}function Kd(t){const e=new Date(t.getFullYear(),t.getMonth(),t.getDate(),Pa);return{...Ra("posts"),status:"scheduled",scheduledDatetime:e.toISOString(),date:Ws(t)}}function Id(t){if(typeof t!="string")return null;const e=t.trim();if(!e)return null;if(Xa.test(e))return Xs(e);const s=new Date(e);return Number.isNaN(s.getTime())?null:s}function Fd(t,e){const s=Id(t.scheduledDatetime);if(!s)return null;const n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),a={...t,scheduledDatetime:n.toISOString()};return(typeof t.date=="string"?t.date:"")===Ws(s)&&(a.date=Ws(n)),a}function zd(t){return Xs(t.scheduledDatetime)??Xs(t.date)}function Um(t){const e=new Map,s=[];for(const a of t){const i={post:a,scheduled:Xs(a.scheduledDatetime)!==null},r=zd(a);if(!r){s.push(i);continue}const l=Ws(r),c=e.get(l);c?c.push(i):e.set(l,[i])}const n=(a,i)=>Number(i.scheduled)-Number(a.scheduled)||a.post.title.localeCompare(i.post.title);for(const a of e.values())a.sort(n);return s.sort(n),{byDay:e,undated:s}}const Js={draft:"sandbox.postBoard.laneDraft",generating:"sandbox.postBoard.laneGenerating",awaiting_review:"sandbox.postBoard.laneAwaitingReview",scheduled:"sandbox.postBoard.laneScheduled",published:"sandbox.postBoard.lanePublished",archived:"sandbox.postBoard.laneArchived"};function Md({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,onMoved:a}){const i=_e(),r=il({orgSlug:t,virtualMcpId:e,branch:s}),[l,c]=L.useState(new Set),d=p=>At(n[p],"posts"),m=(p,u,b=d(p))=>u==="generating"?{kind:"not-a-target"}:l.has(ms(p))?{kind:"in-flight"}:zc(b,u)?{kind:"incomplete"}:null,g=p=>{switch(p.kind){case"incomplete":return i("sandbox.postBoard.moveBlocked");case"in-flight":return i("sandbox.postBoard.moveInFlight");case"not-a-target":return i("sandbox.postBoard.moveNotATarget");default:return String(p)}};return{apply:async(p,u,b,h)=>{const _=b??d(p);if(as(_)===u)return null;const y=m(p,u,_);if(y)return y.kind!=="in-flight"&&fe.error(g(y)),null;const j=ms(p);c(v=>new Set(v).add(j));const w=Yc({key:p,payload:_},u,new Date),N=Object.keys(w.writes)[0]??p;N!==p&&a?.(p,N);try{return await r.move(w,{shown:h}),N}catch(v){return N!==p&&a?.(N,p),v instanceof Ni||fe.error(v instanceof Error?v.message:i("sandbox.postBoard.moveFailed")),null}finally{c(v=>{const E=new Set(v);return E.delete(j),E})}},refuse:m,reasonText:g,isMoving:p=>l.has(ms(p))}}function Ja(){return On("hide_default_blog_blocks")}function Vd(t){const e=pe.c(15),{value:s,onChange:n,placeholder:a,className:i,onFocus:r,onBlur:l,onKeyDown:c,spellCheck:d,readOnly:m,inputRef:g}=t,f=d===void 0?!0:d;let p;e[0]!==n?(p=h=>n(h.target.value),e[0]=n,e[1]=p):p=e[1];let u;e[2]!==i?(u=ve("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",i),e[2]=i,e[3]=u):u=e[3];let b;return e[4]!==g||e[5]!==l||e[6]!==r||e[7]!==c||e[8]!==a||e[9]!==m||e[10]!==f||e[11]!==p||e[12]!==u||e[13]!==s?(b=o.jsx("textarea",{ref:g,value:s,onChange:p,onInput:Ud,onFocus:r,onBlur:l,onKeyDown:c,placeholder:a,spellCheck:f,readOnly:m,rows:1,className:u}),e[4]=g,e[5]=l,e[6]=r,e[7]=c,e[8]=a,e[9]=m,e[10]=f,e[11]=p,e[12]=u,e[13]=s,e[14]=b):b=e[14],b}function Ud(t){const e=t.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function We(t){return typeof t=="string"?t:""}function Gm(t){const e=pe.c(11);let s,n;e[0]!==t?({className:s,...n}=t,e[0]=t,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let a;e[3]!==s?(a=ve(s,"pr-9"),e[3]=s,e[4]=a):a=e[4];let i;e[5]!==n||e[6]!==a?(i=o.jsx(Vd,{...n,className:a}),e[5]=n,e[6]=a,e[7]=i):i=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(or,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=r):r=e[8];let l;return e[9]!==i?(l=o.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-accent focus-within:bg-muted/50",children:[i,r]}),e[9]=i,e[10]=l):l=e[10],l}function Hm(t){const e=pe.c(5),{label:s,onClick:n,disabled:a}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(Kn,{size:13}),e[0]=i):i=e[0];let r;return e[1]!==a||e[2]!==s||e[3]!==n?(r=o.jsxs("button",{type:"button",onClick:n,disabled:a,className:"flex items-center gap-1.5 rounded-lg border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[i,s]}),e[1]=a,e[2]=s,e[3]=n,e[4]=r):r=e[4],r}function Ym(t){const e=pe.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Vn,{className:"size-3.25"}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx(Oe,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":s,onClick:n,className:"opacity-0 transition-opacity group-hover/item:opacity-100",children:a}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function qm(t){const e=pe.c(2),{children:s}=t;let n;return e[0]!==s?(n=o.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:s}),e[0]=s,e[1]=n):n=e[1],n}function Wm(t){if(Array.isArray(t))return t;if(typeof t!="string"||t.trim()==="")return[];try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}}function wo(t){const e=pe.c(14),{options:s,value:n,emptyLabel:a,onChange:i}=t;let r;e[0]!==a||e[1]!==i||e[2]!==n?(r=a&&o.jsx(Co,{active:!n,onClick:()=>i(""),children:a}),e[0]=a,e[1]=i,e[2]=n,e[3]=r):r=e[3];let l;if(e[4]!==i||e[5]!==s||e[6]!==n){let d;e[8]!==i||e[9]!==n?(d=m=>o.jsx(Co,{active:m===n,onClick:()=>i(m),children:m},m),e[8]=i,e[9]=n,e[10]=d):d=e[10],l=s.filter(Boolean).map(d),e[4]=i,e[5]=s,e[6]=n,e[7]=l}else l=e[7];let c;return e[11]!==r||e[12]!==l?(c=o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,l]}),e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function Co(t){const e=pe.c(7),{active:s,onClick:n,children:a}=t,i=s?"border-primary bg-primary text-primary-foreground":"bg-card hover:bg-accent";let r;e[0]!==i?(r=ve("cursor-pointer rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",i),e[0]=i,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==a||e[4]!==n||e[5]!==r?(l=o.jsx("button",{type:"button","aria-pressed":s,onClick:n,className:r,children:a}),e[2]=s,e[3]=a,e[4]=n,e[5]=r,e[6]=l):l=e[6],l}function Xm(t,e=[]){return typeof t=="string"?t:JSON.stringify(t??e)}const Bs=[{id:"campaign",label:"sandbox.generatePost.stepCampaign"},{id:"format",label:"sandbox.generatePost.stepFormat"},{id:"extra",label:"sandbox.generatePost.stepExtra"}],Gd=[1,2,3],Hd={companyName:"sandbox.blogBrand.companyNameLabel",language:"sandbox.blogBrand.languageLabel",description:"sandbox.blogBrand.descriptionLabel",tone:"sandbox.blogBrand.toneLabel",targetAudience:"sandbox.blogBrand.audienceLabel",dos:"sandbox.blogBrand.tabDos",avoid:"sandbox.blogBrand.tabGuardrails"};function Yd({open:t,onOpenChange:e,decofile:s,hasAi:n,onGenerate:a}){const i=_e(),r=dl(),[l,c]=L.useState("campaign"),[d,m]=L.useState(""),[g,f]=L.useState(""),[p,u]=L.useState(""),[b,h]=L.useState(""),[_,y]=L.useState(1),{merged:j}=Fa(s),w=yd(j),N=md(s).filter(C=>C.status!=="finished"),v=N.find(C=>C.key===d),E=s[fd],S=Ue(Me(E?.formats)),k=()=>{c("campaign"),m(""),f(""),u(""),h(""),y(1)},T=C=>{e(C),C||k()},B=Bs.findIndex(C=>C.id===l),O=l==="campaign"?!!v:l==="format"?g.trim().length>0&&p.trim().length>0:!0,D=l==="extra",z=()=>{v&&(a({campaign:v,format:{name:g.trim(),value:p.trim()},extraInstructions:b.trim()||void 0,count:_,fileConfigId:Ki(r.data?.configs??[],null,typeof window<"u"?window.localStorage.getItem(Ii):null)??void 0}),T(!1))};return o.jsx(ns,{open:t,onOpenChange:T,children:o.jsxs(ss,{className:"flex max-h-[85vh] flex-col sm:max-w-2xl",children:[o.jsxs(bs,{children:[o.jsx(ts,{children:i("sandbox.generatePost.title")}),o.jsx(En,{children:i("sandbox.generatePost.subtitle")})]}),w.length>0?o.jsx("p",{className:"text-sm text-muted-foreground",children:i("sandbox.generatePost.blockedBrand",{fields:w.map(C=>i(Hd[C])).join(", ")})}):o.jsxs(o.Fragment,{children:[o.jsx("ol",{className:"flex shrink-0 items-center gap-1.5 text-xs",children:Bs.map((C,A)=>o.jsx("li",{className:ve("rounded-md px-2 py-1",A===B?"bg-primary text-primary-foreground":A<B?"text-foreground":"text-muted-foreground"),children:i(C.label)},C.id))}),o.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto py-1",children:[l==="campaign"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.campaignHint")}),N.length===0?o.jsx("p",{className:"rounded-lg border border-dashed px-3 py-6 text-center text-sm text-muted-foreground",children:i("sandbox.generatePost.noCampaigns")}):o.jsx(qd,{campaigns:N,chosen:d,onChoose:m})]}),l==="format"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatHint")}),o.jsx(wo,{options:S.map(C=>C.name),value:g,onChange:C=>{f(C),u(S.find(A=>A.name===C)?.value??"")}}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(_t,{htmlFor:"generate-format-name",children:i("sandbox.generatePost.formatNameLabel")}),o.jsx(Bt,{id:"generate-format-name",value:g,onChange:C=>f(C.target.value),placeholder:i("sandbox.generatePost.formatNamePlaceholder")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(_t,{htmlFor:"generate-format-value",children:i("sandbox.generatePost.formatValueLabel")}),o.jsx(ro,{id:"generate-format-value",value:p,onChange:C=>u(C.target.value),placeholder:i("sandbox.generatePost.formatValuePlaceholder"),rows:4})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatBlocksHint")})]}),l==="extra"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(_t,{htmlFor:"generate-extra",children:i("sandbox.generatePost.extraLabel")}),o.jsx(ro,{id:"generate-extra",value:b,onChange:C=>h(C.target.value),placeholder:i("sandbox.generatePost.extraPlaceholder"),rows:4})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(_t,{children:i("sandbox.generatePost.countLabel")}),o.jsx(wo,{options:Gd.map(String),value:String(_),onChange:C=>y(Number(C)||1)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.countHint")})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.coverHint")})]})]}),o.jsxs(ys,{className:"shrink-0 sm:justify-between",children:[o.jsx(Oe,{type:"button",variant:"outline",disabled:B===0,onClick:()=>c(Bs[B-1].id),children:i("sandbox.generatePost.back")}),D?o.jsxs(Oe,{type:"button",disabled:!n,onClick:z,children:[o.jsx(Us,{size:14}),i("sandbox.generatePost.generate",{count:String(_)})]}):o.jsx(Oe,{type:"button",disabled:!O,onClick:()=>c(Bs[B+1].id),children:i("sandbox.generatePost.next")})]})]})]})})}function qd(t){const e=pe.c(11),{campaigns:s,chosen:n,onChoose:a}=t,i=_e();let r;if(e[0]!==s||e[1]!==n||e[2]!==a||e[3]!==i){let c;e[5]!==n||e[6]!==a||e[7]!==i?(c=d=>o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>a(d.key),className:ve("w-full cursor-pointer rounded-lg border bg-card p-2.5 text-left transition-colors hover:border-primary/40",n===d.key&&"border-primary"),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:d.name||i("sandbox.campaigns.untitled")}),o.jsx(Un,{variant:"outline",size:"sm",className:"shrink-0",children:d.intent.products.length>0?i("sandbox.generatePost.campaignProducts",{count:String(d.intent.products.length)}):i("sandbox.generatePost.campaignNoProducts")})]}),d.trigger.note&&o.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:d.trigger.note})]})},d.key),e[5]=n,e[6]=a,e[7]=i,e[8]=c):c=e[8],r=s.map(c),e[0]=s,e[1]=n,e[2]=a,e[3]=i,e[4]=r}else r=e[4];let l;return e[9]!==r?(l=o.jsx("ul",{className:"space-y-1.5",children:r}),e[9]=r,e[10]=l):l=e[10],l}function Wd(t){const e=[];for(let s=0;e.length<ho;s+=1){const n=e.length;for(const a of t){const i=a.images?.[s];if(i&&(e.push(i),e.length>=ho))return e}if(e.length===n)break}return e}const Xd={"no-store-data":"sandbox.generatePost.gapNoStoreData","sections-dropped":"sandbox.generatePost.gapSectionsDropped","no-bucket":"sandbox.generatePost.gapNoBucket","no-image-model":"sandbox.generatePost.gapNoImageModel","images-failed":"sandbox.generatePost.gapImagesFailed","drafts-failed":"sandbox.generatePost.gapDraftsFailed"};function Jd({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,meta:a,onStarted:i}){const r=_e(),l=di(),c=Ja(),d=en({orgSlug:t,virtualMcpId:e,branch:s});return async m=>{const g={campaignKey:m.campaign.key,format:m.format,brief:m.campaign.trigger.note},f=Gs(Ba({title:m.campaign.name,planning:g,now:new Date}),"generating",new Date),p=Array.from({length:m.count},()=>Hs(_n())),{merged:u}=Fa(n),b=id(u),h=Xe(n,"categories").map(({payload:S})=>({name:We(S.name),slug:We(S.slug)})).filter(S=>S.slug),_=Kc(n),y=Ed(m.format,a,n,{hideDefaults:c}),j=Object.fromEntries(y.map(S=>[S.name,S.example])),w=async(S,k=p.length)=>{for(const T of p.slice(S,k))try{await d.mutateAsync({blockKey:T,data:Et(T,Gs(f,"draft",new Date))})}catch(B){console.warn("[generatePost] could not reset a card",B)}},N=async(S,k)=>{if(!k.fileConfigId||S.length===0)return new Map;try{const T=await l.call("BLOG_POST_ILLUSTRATE",{requests:S.map((B,O)=>({id:String(O),prompt:B.cover.prompt,alt:B.cover.alt})),productImages:Wd(k.campaign.intent.products),companyName:b.companyName??"",fileConfigId:k.fileConfigId});return new Map(T.images.map(B=>[B.id,B.url]))}catch(T){return console.warn("[generatePost] illustrating failed",T),new Map}};let v=0;try{for(const S of p)await d.mutateAsync({blockKey:S,data:Et(S,f)}),v+=1}catch(S){await w(0,v),fe.error(S instanceof Error?S.message:r("sandbox.generatePost.failed"));return}i?.(p);let E=0;try{const S=await l.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"post",focus:`${m.campaign.name}: ${m.campaign.trigger.note}`,language:b.language}).catch(D=>{console.warn("[generatePost] grounding failed",D)}),k=await l.call("BLOG_POST_DRAFT",{virtualMcpId:e,grounding:S?{report:S.report,outcome:S.outcome}:void 0,brand:{companyName:b.companyName,description:b.description,language:b.language,storeUrl:b.storeUrl,targetAudience:b.targetAudience,tone:b.tone,dos:b.dos,avoid:b.avoid,vocabulary:b.vocabulary,voiceExamples:b.voiceExamples},campaign:{name:m.campaign.name,period:m.campaign.period,trigger:m.campaign.trigger,intent:{objective:m.campaign.intent.objective,targets:m.campaign.intent.targets,products:m.campaign.intent.products,keywords:m.campaign.intent.keywords},guardrails:m.campaign.guardrails},format:m.format,blocks:y,categories:h,authors:_.map(({name:D,email:z})=>({name:D,email:z})),extraInstructions:m.extraInstructions?.trim()||void 0,count:m.count}),T=await N(k.posts,m),B=qn(a,{hideDefaults:c}),O=Ta(n).map(D=>D.slug);for(const[D,z]of k.posts.entries()){const C=p[D];if(!C)break;const A=Ld({draft:{...z,cover:{...z.cover,url:T.get(String(D))??""}},resolveTypes:B,productShapes:j,categories:h,authors:_,planning:g,takenSlugs:O,now:new Date});O.push(We(A.slug)),await d.mutateAsync({blockKey:C,data:Et(C,A)}),E=D+1}await w(E),k.posts.length>0&&fe.success(r("sandbox.generatePost.done",{count:String(k.posts.length)}));for(const D of k.gaps)fe.warning(r(Xd[D.code],{count:D.count??0}))}catch(S){await w(E),fe.error(S instanceof Error?S.message:r("sandbox.generatePost.failed"))}}}const Qd=/<(h[1-6]|p|ul|ol|div|img|br|blockquote|section|article|figure)\b|<\/[a-z]/i;function Qa(t){return Qd.test(t)}function Zd(t){const e=t.trim();return e?Qa(e)?ru(e):cu(e):{title:"",sections:[]}}function Xn(t){return t.replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#0?39;|&apos;/gi,"'").replace(/&amp;/gi,"&")}function ds(t){let e=t,s;do s=e,e=e.replace(/<[^>]+>/g,"");while(e!==s);return Xn(e).replace(/\s+/g," ").trim()}function eu(t){let e=t,s;do s=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==s);return e}function tu(t){let e=t,s;do s=e,e=e.replace(/<(script|style)\b[\s\S]*?<\/\1\s*>/gi,"");while(e!==s);return e}function Za(t){let e=t,s;do s=e,e=tu(eu(e));while(e!==s);return e}const su=/^(a|b|strong|i|em|u|s|code|br|span|sub|sup)$/;function Qs(t){let e="";for(const s of t)s.charCodeAt(0)>31&&(e+=s);return e=e.trim(),!/^[a-z][a-z0-9+.-]*:/i.test(e)||/^(https?|mailto|tel):/i.test(e)}function nu(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const ou=/^<\/?([a-z][a-z0-9]*)\b([^>]*)>/i;function au(t,e,s){const n=e.toLowerCase();if(!su.test(n))return"";if(t.startsWith("</"))return`</${n}>`;if(n!=="a")return`<${n}>`;const a=Xn(s.match(/href\s*=\s*"([^"]*)"/i)?.[1]??"");return Qs(a)&&a?`<a href="${nu(a)}">`:"<a>"}function ei(t){const e=Za(t);let s="",n=0;for(;n<e.length;){const a=e.indexOf("<",n);if(a===-1){s+=e.slice(n);break}s+=e.slice(n,a);const i=ou.exec(e.slice(a));if(!i){s+="&lt;",n=a+1;continue}s+=au(i[0],i[1]??"",i[2]??""),n=a+i[0].length}return s}function Ds(t,e){const s=t.match(new RegExp(`${e}\\s*=\\s*"([^"]*)"`,"i"));return s?.[1]?Xn(s[1]):""}const iu=/<(h[1-6]|p|ul|ol|blockquote|figure)\b[^>]*>([\s\S]*?)<\/\1\s*>|<hr\b[^>]*\/?>|<img\b[^>]*>/gi;function ru(t){const e=Za(t);let s="";const n=[];for(const a of e.matchAll(iu)){const i=a[1]?.toLowerCase(),r=a[2]??"",l=a[0];if(!i){if(/^<img/i.test(l)){const c=Ds(l,"src");c&&Qs(c)&&n.push({kind:"image",url:c,alt:Ds(l,"alt"),caption:""})}else n.push({kind:"divider"});continue}if(/^h[1-6]$/.test(i)){const c=ds(r);if(!c)continue;if(i==="h1"&&!s){s=c;continue}n.push({kind:"heading",text:c,level:i.slice(1)})}else if(i==="p"){const c=ei(r.trim());ds(c)&&n.push({kind:"paragraph",html:c})}else if(i==="ul"||i==="ol"){const c=[...r.matchAll(/<li\b[^>]*>([\s\S]*?)<\/li\s*>/gi)].map(d=>ds(d[1]??"")).filter(Boolean);c.length&&n.push({kind:"list",items:c,ordered:i==="ol"})}else if(i==="blockquote"){const c=ds(r);c&&n.push({kind:"quote",text:c})}else if(i==="figure"){const c=r.match(/<img\b[^>]*>/i)?.[0],d=c?Ds(c,"src"):"",m=ds(r.match(/<figcaption\b[^>]*>([\s\S]*?)<\/figcaption\s*>/i)?.[1]??"");d&&Qs(d)&&n.push({kind:"image",url:d,alt:c?Ds(c,"alt"):"",caption:m})}}return{title:s,sections:n}}function lu(t){return t.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,'<a href="$2">$1</a>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*])\*([^*]+)\*/g,"$1<em>$2</em>").replace(/`([^`]+)`/g,"<code>$1</code>")}function cu(t){const e=t.replace(/\r\n?/g,`
20
20
  `).split(`
21
21
  `);let s="";const n=[];let a=[],i=null,r=[];const l=()=>{a.length&&(n.push({kind:"paragraph",html:ei(lu(a.join(" ")))}),a=[])},c=()=>{i&&(n.push({kind:"list",items:i.items,ordered:i.ordered}),i=null)},d=()=>{r.length&&(n.push({kind:"quote",text:r.join(" ")}),r=[])},m=()=>{l(),c(),d()};for(const g of e){const f=g.trimEnd(),p=f.match(/^(#{1,6})\s+(.*)$/),u=f.match(/^!\[([^\]]*)\]\(([^)\s]+)\)\s*$/),b=f.match(/^\s*(?:[-*+]|\d+\.)\s+(.*)$/),h=/^\s*\d+\./.test(f),_=f.match(/^>\s?(.*)$/);if(!f.trim())m();else if(p){m();const y=p[2]?.trim()??"",j=String(p[1]?.length??1);j==="1"&&!s?s=y:y&&n.push({kind:"heading",text:y,level:j})}else if(/^(-{3,}|\*{3,}|_{3,})$/.test(f.trim()))m(),n.push({kind:"divider"});else if(u){m();const y=u[2]??"";Qs(y)&&n.push({kind:"image",url:y,alt:u[1]??"",caption:""})}else b?(l(),d(),i||(i={items:[],ordered:h}),i.items.push(b[1]?.trim()??"")):_?(l(),c(),r.push(_[1]?.trim()??"")):(c(),d(),a.push(f.trim()))}return m(),{title:s,sections:n}}const du={heading:"Heading",paragraph:"Paragraph",list:"List",quote:"Quote",divider:"Divider",image:"BlockImage"};function uu(t,e){const s=[];for(const n of t){const a=e[du[n.kind]];if(a)switch(n.kind){case"heading":s.push({__resolveType:a,text:n.text,level:n.level});break;case"paragraph":s.push({__resolveType:a,html:n.html});break;case"list":s.push({__resolveType:a,items:n.items.join(`
22
- `),style:n.ordered?"ordered":"unordered"});break;case"quote":s.push({__resolveType:a,quote:n.text});break;case"divider":s.push({__resolveType:a});break;case"image":s.push({__resolveType:a,url:n.url,alt:n.alt,caption:n.caption,size:"normal"});break}}return s}function pu({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?Wa(a,s):Ya(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const No="__all__",_o={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},mu={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},Po="status:";function To(t){if(!t.startsWith(Po))return null;const e=t.slice(Po.length);return Yn.includes(e)?e:null}const Ao=L.forwardRef(function(e,s){const n=pe.c(20);let a,i,r,l,c;n[0]!==e?({icon:a,active:i,value:c,className:r,...l}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=l,n[5]=c):(a=n[1],i=n[2],r=n[3],l=n[4],c=n[5]);const d=i?"text-foreground":"text-muted-foreground";let m;n[6]!==r||n[7]!==d?(m=ve("gap-1 px-1.5 text-xs",d,r),n[6]=r,n[7]=d,n[8]=m):m=n[8];let g;n[9]!==a?(g=o.jsx(a,{size:14,className:"shrink-0"}),n[9]=a,n[10]=g):g=n[10];let f;n[11]!==c?(f=c&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),n[11]=c,n[12]=f):f=n[12];let p;n[13]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(gs,{size:12,className:"shrink-0 opacity-60"}),n[13]=p):p=n[13];let u;return n[14]!==l||n[15]!==s||n[16]!==m||n[17]!==g||n[18]!==f?(u=o.jsxs(Oe,{ref:s,type:"button",variant:"ghost",size:"sm",className:m,...l,children:[g,f,p]}),n[14]=l,n[15]=s,n[16]=m,n[17]=g,n[18]=f,n[19]=u):u=n[19],u});function Jn(t){const e=pe.c(2),{count:s}=t;let n;return e[0]!==s?(n=o.jsx("span",{className:"ml-auto pl-3 text-xs text-muted-foreground tabular-nums",children:s}),e[0]=s,e[1]=n):n=e[1],n}function fu(t){const e=pe.c(19),{value:s,onChange:n}=t,a=_e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=f=>n(f.target.value),e[1]=n,e[2]=r):r=e[2];let l;e[3]!==a?(l=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=l):l=e[4];let c;e[5]!==a?(c=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=c):c=e[6];let d;e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==s?(d=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:l,"aria-label":c,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=l,e[9]=c,e[10]=s,e[11]=d):d=e[11];let m;e[12]!==n||e[13]!==a||e[14]!==s?(m=s&&o.jsx(ti,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=m):m=e[15];let g;return e[16]!==d||e[17]!==m?(g=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,d,m]}),e[16]=d,e[17]=m,e[18]=g):g=e[18],g}function gu(t){const e=pe.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:l,sort:c,onCategoryFilterChange:d,onAuthorFilterChange:m,onStatusFilterChange:g,onSortChange:f}=t,p=_e();let u;if(e[0]!==s||e[1]!==i){let X;e[3]!==i?(X=ee=>ee.slug===i,e[3]=i,e[4]=X):X=e[4],u=s.find(X),e[0]=s,e[1]=i,e[2]=u}else u=e[2];const b=u;let h;if(e[5]!==r||e[6]!==n){let X;e[8]!==r?(X=ee=>ee.email===r,e[8]=r,e[9]=X):X=e[9],h=n.find(X),e[5]=r,e[6]=n,e[7]=h}else h=e[7];const _=h,y=!!(i||r||l);let j;e[10]!==_?.name||e[11]!==b?.name||e[12]!==l||e[13]!==p?(j=b?.name??_?.name??p(l?Js[l]:"sandbox.postToolbar.filterLabel"),e[10]=_?.name,e[11]=b?.name,e[12]=l,e[13]=p,e[14]=j):j=e[14];const w=j,N=i?`cat:${i}`:r?`author:${r}`:l?`status:${l}`:No;let v;e[15]!==m||e[16]!==d||e[17]!==g?(v=()=>{d(null),m(null),g(null)},e[15]=m,e[16]=d,e[17]=g,e[18]=v):v=e[18];const E=v;let S;e[19]!==E||e[20]!==m||e[21]!==d||e[22]!==g?(S=X=>{X.startsWith("cat:")?(m(null),g(null),d(X.slice(4))):X.startsWith("author:")?(d(null),g(null),m(X.slice(7))):To(X)?(d(null),m(null),g(To(X))):E()},e[19]=E,e[20]=m,e[21]=d,e[22]=g,e[23]=S):S=e[23];const k=S;let T;e[24]!==w||e[25]!==y?(T=o.jsx(Is,{asChild:!0,children:o.jsx(Ao,{icon:ar,active:y,value:w,className:"min-w-0 shrink"})}),e[24]=w,e[25]=y,e[26]=T):T=e[26];let B;e[27]!==p?(B=p("sandbox.postToolbar.filterBy"),e[27]=p,e[28]=B):B=e[28];let O;e[29]!==B?(O=o.jsx(rs,{children:B}),e[29]=B,e[30]=O):O=e[30];let D;e[31]!==p?(D=p("sandbox.postToolbar.allPosts"),e[31]=p,e[32]=D):D=e[32];let z;e[33]!==D?(z=o.jsx(us,{value:No,children:D}),e[33]=D,e[34]=z):z=e[34];let C;e[35]!==p?(C=p("sandbox.postToolbar.statusLabel"),e[35]=p,e[36]=C):C=e[36];let A;e[37]!==C?(A=o.jsx(rs,{className:"text-muted-foreground/70",children:C}),e[37]=C,e[38]=A):A=e[38];let V;e[39]!==a||e[40]!==p?(V=Yn.map(X=>o.jsxs(us,{value:`status:${X}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:p(Js[X])}),o.jsx(Jn,{count:a[X]??0})]},`status:${X}`)),e[39]=a,e[40]=p,e[41]=V):V=e[41];let U;e[42]!==s.length||e[43]!==p?(U=s.length>0&&o.jsx(rs,{className:"text-muted-foreground/70",children:p("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=p,e[44]=U):U=e[44];let Q;e[45]!==s?(Q=s.map(xu),e[45]=s,e[46]=Q):Q=e[46];let Y;e[47]!==n.length||e[48]!==p?(Y=n.length>0&&o.jsx(rs,{className:"text-muted-foreground/70",children:p("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=p,e[49]=Y):Y=e[49];let q;e[50]!==n?(q=n.map(hu),e[50]=n,e[51]=q):q=e[51];let G;e[52]!==N||e[53]!==k||e[54]!==z||e[55]!==A||e[56]!==V||e[57]!==U||e[58]!==Q||e[59]!==Y||e[60]!==q?(G=o.jsxs(Qn,{value:N,onValueChange:k,children:[z,A,V,U,Q,Y,q]}),e[52]=N,e[53]=k,e[54]=z,e[55]=A,e[56]=V,e[57]=U,e[58]=Q,e[59]=Y,e[60]=q,e[61]=G):G=e[61];let M;e[62]!==G||e[63]!==O?(M=o.jsxs(Fs,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[O,G]}),e[62]=G,e[63]=O,e[64]=M):M=e[64];let K;e[65]!==M||e[66]!==T?(K=o.jsxs(zs,{children:[T,M]}),e[65]=M,e[66]=T,e[67]=K):K=e[67];let J;e[68]!==E||e[69]!==y||e[70]!==p?(J=y&&o.jsx(ti,{label:p("sandbox.postToolbar.clearFilter"),onClick:E}),e[68]=E,e[69]=y,e[70]=p,e[71]=J):J=e[71];const oe=mu[c];let ge;e[72]!==p||e[73]!==oe?(ge=p(oe),e[72]=p,e[73]=oe,e[74]=ge):ge=e[74];let re;e[75]!==ge?(re=o.jsx(Is,{asChild:!0,children:o.jsx(Ao,{icon:ir,active:!0,value:ge})}),e[75]=ge,e[76]=re):re=e[76];let le;e[77]!==p?(le=p("sandbox.postToolbar.sortBy"),e[77]=p,e[78]=le):le=e[78];let he;e[79]!==le?(he=o.jsx(rs,{children:le}),e[79]=le,e[80]=he):he=e[80];let de;e[81]!==f?(de=X=>f(X),e[81]=f,e[82]=de):de=e[82];let be;e[83]===Symbol.for("react.memo_cache_sentinel")?(be=Object.keys(_o),e[83]=be):be=e[83];let se;e[84]!==p?(se=be.map(X=>o.jsx(us,{value:X,children:p(_o[X])},X)),e[84]=p,e[85]=se):se=e[85];let me;e[86]!==c||e[87]!==de||e[88]!==se?(me=o.jsx(Qn,{value:c,onValueChange:de,children:se}),e[86]=c,e[87]=de,e[88]=se,e[89]=me):me=e[89];let ae;e[90]!==he||e[91]!==me?(ae=o.jsxs(Fs,{align:"end",className:"w-44",children:[he,me]}),e[90]=he,e[91]=me,e[92]=ae):ae=e[92];let ce;e[93]!==re||e[94]!==ae?(ce=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(zs,{children:[re,ae]})}),e[93]=re,e[94]=ae,e[95]=ce):ce=e[95];let W;return e[96]!==K||e[97]!==J||e[98]!==ce?(W=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[K,J,ce]}),e[96]=K,e[97]=J,e[98]=ce,e[99]=W):W=e[99],W}function hu(t){return o.jsxs(us,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Jn,{count:t.count})]},`author:${t.email}`)}function xu(t){return o.jsxs(us,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Jn,{count:t.count})]},`cat:${t.slug}`)}function ti(t){const e=pe.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Bn,{size:12}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx("button",{type:"button","aria-label":s,onClick:n,className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer rounded-lg",children:a}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function bu(t){const e=pe.c(18),{checked:s,disabled:n,onToggle:a}=t,i=_e();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==s||e[3]!==i?(l=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==l?(c=o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:yu,children:o.jsx(sn,{checked:s,disabled:n,onCheckedChange:r,"aria-label":l})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=l,e[9]=c):c=e[9];let d;e[10]!==s||e[11]!==i?(d=i(s?"sandbox.postToolbar.deselectAll":"sandbox.postToolbar.selectAll"),e[10]=s,e[11]=i,e[12]=d):d=e[12];let m;e[13]!==d?(m=o.jsx(et,{side:"bottom",children:d}),e[13]=d,e[14]=m):m=e[14];let g;return e[15]!==c||e[16]!==m?(g=o.jsxs(tt,{children:[c,m]}),e[15]=c,e[16]=m,e[17]=g):g=e[17],g}function yu(t){return t.stopPropagation()}function vu(t){const e=pe.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,l=_e();let c;e[0]!==n||e[1]!==a?(c=o.jsx(bu,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=c):c=e[2];let d;e[3]!==s||e[4]!==l?(d=l("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=l,e[5]=d):d=e[5];let m;e[6]!==d?(m=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:d}),e[6]=d,e[7]=m):m=e[7];const g=s===0;let f;e[8]!==l?(f=l("sandbox.postToolbar.archiveSelectedPosts"),e[8]=l,e[9]=f):f=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(ui,{size:14}),e[10]=p):p=e[10];let u;e[11]!==i||e[12]!==g||e[13]!==f?(u=o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",disabled:g,onClick:i,"aria-label":f,children:p})}),e[11]=i,e[12]=g,e[13]=f,e[14]=u):u=e[14];let b;e[15]!==l?(b=l("sandbox.postToolbar.archiveSelected"),e[15]=l,e[16]=b):b=e[16];let h;e[17]!==b?(h=o.jsx(et,{side:"bottom",children:b}),e[17]=b,e[18]=h):h=e[18];let _;e[19]!==u||e[20]!==h?(_=o.jsxs(tt,{children:[u,h]}),e[19]=u,e[20]=h,e[21]=_):_=e[21];let y;e[22]!==l?(y=l("sandbox.postToolbar.exitSelection"),e[22]=l,e[23]=y):y=e[23];let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(Bn,{size:14}),e[24]=j):j=e[24];let w;e[25]!==r||e[26]!==y?(w=o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":y,children:j})}),e[25]=r,e[26]=y,e[27]=w):w=e[27];let N;e[28]!==l?(N=l("sandbox.postToolbar.exitSelection"),e[28]=l,e[29]=N):N=e[29];let v;e[30]!==N?(v=o.jsx(et,{side:"bottom",children:N}),e[30]=N,e[31]=v):v=e[31];let E;e[32]!==w||e[33]!==v?(E=o.jsxs(tt,{children:[w,v]}),e[32]=w,e[33]=v,e[34]=E):E=e[34];let S;e[35]!==_||e[36]!==E?(S=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[_,E]}),e[35]=_,e[36]=E,e[37]=S):S=e[37];let k;return e[38]!==c||e[39]!==S||e[40]!==m?(k=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[c,m,S]}),e[38]=c,e[39]=S,e[40]=m,e[41]=k):k=e[41],k}const ku={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},An="generating",Su=[An,...Yn.filter(t=>t!==An)],Eo=t=>t.scheduledDatetime||t.date||"",ju=(t,e)=>Eo(e).localeCompare(Eo(t)),wu=t=>t==="scheduled"||t==="published",si="application/x-post-key";function Cu(t){const e=pe.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:l,onViewChange:c,onOpen:d,onClose:m,move:g,meta:f,renderDetail:p}=t,u=_e();let b;e[0]!==a||e[1]!==s||e[2]!==n?(b={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=b):b=e[3];const h=en(b),_=cl().length>0,y=ma(),j=Ja(),[w,N]=L.useState(null),[v,E]=L.useState(!1),[S,k]=L.useState(!1),[T,B]=L.useState(!1),[O,D]=L.useState(""),z=L.useRef(null);let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C={},e[4]=C):C=e[4];const[A,V]=L.useState(C);let U;e[5]!==A?(U=(I,ne)=>A[I]??ne,e[5]=A,e[6]=U):U=e[6];const Q=U;let Y;e[7]===Symbol.for("react.memo_cache_sentinel")?(Y=(I,ne)=>V(De=>({...De,[I]:ne})),e[7]=Y):Y=e[7];const q=Y;let G;e[8]!==d?(G=I=>{const ne=I[0];ne&&d(ne)},e[8]=d,e[9]=G):G=e[9];let M;e[10]!==a||e[11]!==i||e[12]!==f||e[13]!==s||e[14]!==G||e[15]!==n?(M={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:f,onStarted:G},e[10]=a,e[11]=i,e[12]=f,e[13]=s,e[14]=G,e[15]=n,e[16]=M):M=e[16];const K=Jd(M),J=Hc(i);let oe;e[17]!==i?(oe=I=>At(i[I],"posts"),e[17]=i,e[18]=oe):oe=e[18];const ge=oe,re=l&&J.some(I=>I.key===l)?l:J[0]?.key??null;let le;e[19]!==g||e[20]!==u?(le=async I=>{await g.apply(I.key,"archived")&&fe.success(u("sandbox.postBoard.archived"))},e[19]=g,e[20]=u,e[21]=le):le=e[21];const he=le,[de,be]=L.useState(null),[se,me]=L.useState(null),[ae,ce]=L.useState(null),[W,X]=L.useState("date-desc"),[ee,P]=L.useState("");let H;e[22]===Symbol.for("react.memo_cache_sentinel")?(H=new Set,e[22]=H):H=e[22];const[ue,xe]=L.useState(H),Be=J.reduce(Au,{}),Pe=I=>{const ne=new Map;for(const De of J)for(const Nt of I(De))ne.set(Nt,(ne.get(Nt)??0)+1);return ne},Re=Pe(Tu),Ae=Pe(Pu),Ce=Xe(i,"categories").map(I=>{const{payload:ne}=I;return{slug:We(ne.slug),name:We(ne.name)||We(ne.slug),count:Re.get(We(ne.slug))??0}}),Ee=Xe(i,"authors").map(I=>{const{payload:ne}=I;return{email:We(ne.email),name:We(ne.name)||We(ne.email),count:Ae.get(We(ne.email))??0}}),ie=ee.trim().toLowerCase();let Ne;e[23]!==de?(Ne=I=>!de||I.categorySlugs.includes(de),e[23]=de,e[24]=Ne):Ne=e[24];let Le;e[25]!==se?(Le=I=>!se||I.authorEmails.includes(se),e[25]=se,e[26]=Le):Le=e[26];let F;e[27]!==ae?(F=I=>!ae||I.status===ae,e[27]=ae,e[28]=F):F=e[28];let ye;e[29]!==W?(ye=(I,ne)=>{if(W==="az")return I.title.localeCompare(ne.title);if(W==="za")return ne.title.localeCompare(I.title);const De=(I.scheduledDatetime||I.date).localeCompare(ne.scheduledDatetime||ne.date);return W==="date-asc"?De:-De},e[29]=W,e[30]=ye):ye=e[30];const ke=J.filter(Ne).filter(Le).filter(F).filter(I=>!ie||I.title.toLowerCase().includes(ie)||I.slug.toLowerCase().includes(ie)).sort(ye),Te=ue.size>0;let Ve;e[31]===Symbol.for("react.memo_cache_sentinel")?(Ve=I=>xe(ne=>{const De=new Set(ne);return De.delete(I)||De.add(I),De}),e[31]=Ve):Ve=e[31];const vs=Ve,lt=()=>xe(I=>ke.every(ne=>I.has(ne.key))?new Set:new Set(ke.map(_u)));let wt;e[32]!==g||e[33]!==ue||e[34]!==u?(wt=async()=>{let I=0;for(const ne of ue)await g.apply(ne,"archived")&&(I=I+1);xe(new Set),I>0&&fe.success(u("sandbox.postBoard.archived"))},e[32]=g,e[33]=ue,e[34]=u,e[35]=wt):wt=e[35];const Dt=wt;let Ot;e[36]!==g?(Ot=(I,ne)=>{N(null),g.apply(ne,I)},e[36]=g,e[37]=Ot):Ot=e[37];const ct=Ot;let Ye;e[38]!==d||e[39]!==h?(Ye=()=>{const I=Hs(_n()),ne=Ba({title:"",now:new Date});h.mutate({blockKey:I,data:Et(I,ne)}),d(I)},e[38]=d,e[39]=h,e[40]=Ye):Ye=e[40];const Ct=Ye,dn=()=>{const I=Zd(O),ne=uu(I.sections,qn(f,{hideDefaults:j}));if(ne.length===0&&!I.title.trim()){fe.error(u("sandbox.postBoard.importEmpty"));return}const De=Hs(_n()),Nt=pu({title:I.title,blocks:ne,takenSlugs:J.map(Nu).filter(Boolean),now:new Date});h.mutate({blockKey:De,data:Et(De,Nt)}),B(!1),D(""),fe.success(u("sandbox.postBoard.imported")),d(De)},Rt=r==="list";let Je;e[41]!==c?(Je=()=>c("list"),e[41]=c,e[42]=Je):Je=e[42];let $t;e[43]===Symbol.for("react.memo_cache_sentinel")?($t=o.jsx(mr,{size:14}),e[43]=$t):$t=e[43];let dt;e[44]!==u?(dt=u("sandbox.postBoard.viewList"),e[44]=u,e[45]=dt):dt=e[45];let st;e[46]!==Rt||e[47]!==Je||e[48]!==dt?(st=o.jsx(Bo,{active:Rt,onClick:Je,icon:$t,label:dt}),e[46]=Rt,e[47]=Je,e[48]=dt,e[49]=st):st=e[49];const is=r==="board";let ut;e[50]!==c?(ut=()=>c("board"),e[50]=c,e[51]=ut):ut=e[51];let Lt;e[52]===Symbol.for("react.memo_cache_sentinel")?(Lt=o.jsx(rr,{size:14}),e[52]=Lt):Lt=e[52];let pt;e[53]!==u?(pt=u("sandbox.postBoard.viewBoard"),e[53]=u,e[54]=pt):pt=e[54];let mt;e[55]!==is||e[56]!==ut||e[57]!==pt?(mt=o.jsx(Bo,{active:is,onClick:ut,icon:Lt,label:pt}),e[55]=is,e[56]=ut,e[57]=pt,e[58]=mt):mt=e[58];let Kt;e[59]!==st||e[60]!==mt?(Kt=o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg border p-0.5",children:[st,mt]})}),e[59]=st,e[60]=mt,e[61]=Kt):Kt=e[61];let It;e[62]===Symbol.for("react.memo_cache_sentinel")?(It=o.jsx(Kn,{size:14}),e[62]=It):It=e[62];let ft;e[63]!==u?(ft=u("sandbox.postBoard.newPost"),e[63]=u,e[64]=ft):ft=e[64];let Ft;e[65]===Symbol.for("react.memo_cache_sentinel")?(Ft=o.jsx(gs,{size:14}),e[65]=Ft):Ft=e[65];let gt;e[66]!==ft?(gt=o.jsx(Is,{asChild:!0,children:o.jsxs(Oe,{type:"button",size:"sm",children:[It,ft,Ft]})}),e[66]=ft,e[67]=gt):gt=e[67];let ht;e[68]!==y||e[69]!==u?(ht=y&&o.jsxs(at,{onClick:()=>k(!0),children:[o.jsx(Us,{size:14}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{children:u("sandbox.postBoard.newPostGenerate")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:u("sandbox.postBoard.newPostGenerateHint")})]})]}),e[68]=y,e[69]=u,e[70]=ht):ht=e[70];let zt;e[71]===Symbol.for("react.memo_cache_sentinel")?(zt=o.jsx(pr,{size:14}),e[71]=zt):zt=e[71];let xt;e[72]!==u?(xt=u("sandbox.postBoard.newPostWrite"),e[72]=u,e[73]=xt):xt=e[73];let bt;e[74]!==xt?(bt=o.jsx("span",{children:xt}),e[74]=xt,e[75]=bt):bt=e[75];let yt;e[76]!==u?(yt=u("sandbox.postBoard.newPostWriteHint"),e[76]=u,e[77]=yt):yt=e[77];let vt;e[78]!==yt?(vt=o.jsx("span",{className:"text-xs text-muted-foreground",children:yt}),e[78]=yt,e[79]=vt):vt=e[79];let kt;e[80]!==bt||e[81]!==vt?(kt=o.jsxs("div",{className:"flex flex-col",children:[bt,vt]}),e[80]=bt,e[81]=vt,e[82]=kt):kt=e[82];let St;e[83]!==kt||e[84]!==Ct?(St=o.jsxs(at,{onClick:Ct,children:[zt,kt]}),e[83]=kt,e[84]=Ct,e[85]=St):St=e[85];let Mt,Vt;e[86]===Symbol.for("react.memo_cache_sentinel")?(Mt=()=>B(!0),Vt=o.jsx(hn,{size:14}),e[86]=Mt,e[87]=Vt):(Mt=e[86],Vt=e[87]);let qe;e[88]!==u?(qe=u("sandbox.postBoard.importContent"),e[88]=u,e[89]=qe):qe=e[89];let x;e[90]!==qe?(x=o.jsx("span",{children:qe}),e[90]=qe,e[91]=x):x=e[91];let $;e[92]!==u?($=u("sandbox.postBoard.importContentHint"),e[92]=u,e[93]=$):$=e[93];let Z;e[94]!==$?(Z=o.jsx("span",{className:"text-xs text-muted-foreground",children:$}),e[94]=$,e[95]=Z):Z=e[95];let te;e[96]!==x||e[97]!==Z?(te=o.jsxs(at,{onClick:Mt,children:[Vt,o.jsxs("div",{className:"flex flex-col",children:[x,Z]})]}),e[96]=x,e[97]=Z,e[98]=te):te=e[98];let je;e[99]!==ht||e[100]!==St||e[101]!==te?(je=o.jsxs(Fs,{align:"end",className:"w-56",children:[ht,St,te]}),e[99]=ht,e[100]=St,e[101]=te,e[102]=je):je=e[102];let we;e[103]!==gt||e[104]!==je?(we=o.jsxs(zs,{children:[gt,je]}),e[103]=gt,e[104]=je,e[105]=we):we=e[105];let Ie;e[106]!==y||e[107]!==i||e[108]!==S||e[109]!==K||e[110]!==_?(Ie=y&&o.jsx(Yd,{open:S,onOpenChange:k,decofile:i,hasAi:_,onGenerate:I=>{K(I)}}),e[106]=y,e[107]=i,e[108]=S,e[109]=K,e[110]=_,e[111]=Ie):Ie=e[111];let nt;e[112]!==u?(nt=u("sandbox.postBoard.importTitle"),e[112]=u,e[113]=nt):nt=e[113];let ot;e[114]!==nt?(ot=o.jsx(ts,{children:nt}),e[114]=nt,e[115]=ot):ot=e[115];let Ut;e[116]!==u?(Ut=u("sandbox.postBoard.importDescription"),e[116]=u,e[117]=Ut):Ut=e[117];let Gt;e[118]!==Ut?(Gt=o.jsx(En,{children:Ut}),e[118]=Ut,e[119]=Gt):Gt=e[119];let ks;e[120]!==ot||e[121]!==Gt?(ks=o.jsxs(bs,{children:[ot,Gt]}),e[120]=ot,e[121]=Gt,e[122]=ks):ks=e[122];const un=Qa(O)?"html":"markdown";let Ss;e[123]===Symbol.for("react.memo_cache_sentinel")?(Ss=I=>D(I??""),e[123]=Ss):Ss=e[123];let Ht;e[124]!==O||e[125]!==un?(Ht=o.jsx("div",{className:"h-72 overflow-hidden rounded-[var(--studio-control-radius,var(--radius-xl))] border bg-[var(--studio-input-background)]",children:o.jsx(pa,{code:O,language:un,height:"100%",autoFocus:!0,onChange:Ss})}),e[124]=O,e[125]=un,e[126]=Ht):Ht=e[126];let js;e[127]===Symbol.for("react.memo_cache_sentinel")?(js=o.jsx("input",{ref:z,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async I=>{const ne=I.target.files?.[0];ne&&D(await ne.text()),I.target.value=""}}),e[127]=js):js=e[127];let ws,Cs;e[128]===Symbol.for("react.memo_cache_sentinel")?(ws=()=>z.current?.click(),Cs=o.jsx(hn,{size:14}),e[128]=ws,e[129]=Cs):(ws=e[128],Cs=e[129]);let Yt;e[130]!==u?(Yt=u("sandbox.postBoard.importUpload"),e[130]=u,e[131]=Yt):Yt=e[131];let qt;e[132]!==Yt?(qt=o.jsxs(Oe,{type:"button",variant:"outline",size:"sm",onClick:ws,children:[Cs,Yt]}),e[132]=Yt,e[133]=qt):qt=e[133];let Ns;e[134]!==Ht||e[135]!==qt?(Ns=o.jsxs("div",{className:"space-y-3",children:[Ht,js,qt]}),e[134]=Ht,e[135]=qt,e[136]=Ns):Ns=e[136];let _s;e[137]!==O?(_s=O.trim(),e[137]=O,e[138]=_s):_s=e[138];let Ps;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ps=o.jsx(hn,{size:14}),e[139]=Ps):Ps=e[139];let Ts;e[140]!==u?(Ts=u("sandbox.postBoard.importRun"),e[140]=u,e[141]=Ts):Ts=e[141];let As;e[142]!==v||e[143]!==m||e[144]!==p||e[145]!==l||e[146]!==r?(As=r==="board"&&l&&v&&p&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:p(l,{expanded:!0,onToggleExpand:()=>E(!1),onClose:()=>{E(!1),m?.()}})}),e[142]=v,e[143]=m,e[144]=p,e[145]=l,e[146]=r,e[147]=As):As=e[147];const pn=r==="board"&&!!l&&!v;let Wt;e[148]!==m?(Wt=I=>{I||(E(!1),m?.())},e[148]=m,e[149]=Wt):Wt=e[149];let Xt;e[150]!==u?(Xt=u("sandbox.collectionsSidebar.posts"),e[150]=u,e[151]=Xt):Xt=e[151];let Jt;e[152]!==Xt?(Jt=o.jsx(ts,{className:"sr-only",children:Xt}),e[152]=Xt,e[153]=Jt):Jt=e[153];let Qt;e[154]!==m||e[155]!==p||e[156]!==l?(Qt=l&&p?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(jn,{size:20,className:"animate-spin text-muted-foreground"})}),children:p(l,{expanded:!1,onToggleExpand:()=>E(!0),onClose:()=>m?.()})}):null,e[154]=m,e[155]=p,e[156]=l,e[157]=Qt):Qt=e[157];let Zt;e[158]!==Jt||e[159]!==Qt?(Zt=o.jsxs(ss,{closeButtonClassName:"hidden",className:"left-auto right-4 top-4 bottom-4 flex h-auto translate-x-0 translate-y-0 flex-col gap-0 overflow-hidden p-0 sm:max-w-3xl",children:[Jt,Qt]}),e[158]=Jt,e[159]=Qt,e[160]=Zt):Zt=e[160];let Es;return e[161]!==pn||e[162]!==Wt||e[163]!==Zt?(Es=o.jsx(ns,{open:pn,onOpenChange:Wt,children:Zt}),e[161]=pn,e[162]=Wt,e[163]=Zt,e[164]=Es):Es=e[164],o.jsxs("div",{className:"relative flex h-full min-w-0 flex-col",children:[o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-3 border-b px-6 py-3",children:[Kt,o.jsxs("div",{className:"flex items-center gap-2",children:[we,Ie,o.jsx(ns,{open:T,onOpenChange:B,children:o.jsxs(ss,{className:"max-h-[85vh] sm:max-w-2xl",children:[ks,Ns,o.jsx(ys,{children:o.jsxs(Oe,{type:"button",disabled:!_s,onClick:dn,children:[Ps,Ts]})})]})})]})]}),J.length===0?o.jsx(ll,{className:"flex-1",icon:o.jsx(Us,{size:22}),title:u("sandbox.postBoard.emptyTitle"),description:u("sandbox.postBoard.emptyDescription"),buttonProps:{children:u("sandbox.postBoard.newPost"),onClick:Ct}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:Su.map(I=>{const ne=u(Js[I]),De=J.filter($e=>$e.status===I);wu(I)&&De.sort(ju);const Nt=Q(I,De.length===0);return o.jsxs(L.Fragment,{children:[o.jsx("div",{onDragOver:$e=>{$e.preventDefault(),N(I)},onDragLeave:()=>N($e=>$e===I?null:$e),onDrop:$e=>{$e.preventDefault(),ct(I,$e.dataTransfer.getData(si))},className:ve("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",Nt?"w-11":"w-72",w===I&&"border-primary bg-primary/5"),children:Nt?o.jsxs("button",{type:"button",onClick:()=>q(I,!1),"aria-label":u("sandbox.postBoard.expandLane",{lane:ne}),"aria-expanded":!1,className:"flex min-h-0 flex-1 cursor-pointer flex-col items-center gap-2 py-2.5 text-muted-foreground hover:text-foreground",children:[o.jsx(Ms,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:De.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:ne})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 text-sm font-medium",children:[o.jsxs("button",{type:"button",onClick:()=>q(I,!0),"aria-label":u("sandbox.postBoard.collapseLane",{lane:ne}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(gs,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:ne})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:De.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:De.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.postBoard.laneEmpty")}):De.map($e=>o.jsx(Du,{post:$e,payload:ge($e.key),moving:g.isMoving($e.key),onOpen:()=>d($e.key),onArchive:$e.status==="archived"?void 0:()=>{he($e)}},$e.key))})]})}),I===An&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},I)})}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r",children:[o.jsx(fu,{value:ee,onChange:P}),Te?o.jsx(vu,{count:ue.size,allSelected:ke.length>0&&ke.every(I=>ue.has(I.key)),onToggleSelectAll:lt,onArchive:()=>{Dt()},onExit:()=>xe(new Set)}):o.jsx(gu,{categories:Ce,authors:Ee,statusCounts:Be,categoryFilter:de,authorFilter:se,statusFilter:ae,sort:W,onCategoryFilterChange:be,onAuthorFilterChange:me,onStatusFilterChange:ce,onSortChange:X}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(Eu,{posts:ke,selectedKey:re,selectionActive:Te,selectedKeys:ue,onToggleSelect:vs,onOpen:d,isMoving:g.isMoving,onArchive:I=>{he(I)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:re&&p?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(jn,{size:20,className:"animate-spin text-muted-foreground"})}),children:p(re)}):o.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:u("sandbox.postBoard.selectPrompt")})})]}),As,Es]})}function Nu(t){return t.slug}function _u(t){return t.key}function Pu(t){return t.authorEmails}function Tu(t){return t.categorySlugs}function Au(t,e){return t[e.status]=(t[e.status]??0)+1,t}function Bo(t){const e=pe.c(7),{active:s,onClick:n,icon:a,label:i}=t,r=s?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground";let l;e[0]!==r?(l=ve("inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",r),e[0]=r,e[1]=l):l=e[1];let c;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==l?(c=o.jsxs("button",{type:"button",onClick:n,className:l,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=c):c=e[6],c}function Eu(t){const e=pe.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:l,isMoving:c,onArchive:d}=t,m=_e();if(s.length===0){let p;e[0]!==m?(p=m("sandbox.postList.noMatches"),e[0]=m,e[1]=p):p=e[1];let u;return e[2]!==p?(u=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p}),e[2]=p,e[3]=u):u=e[3],u}let g;if(e[4]!==c||e[5]!==d||e[6]!==l||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let p;e[13]!==c||e[14]!==d||e[15]!==l||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(p=u=>o.jsx(Bu,{post:u,selected:u.key===n,selectionActive:a,checked:i.has(u.key),onToggleSelect:()=>r(u.key),moving:c(u.key),onOpen:()=>l(u.key),onArchive:u.status==="archived"?void 0:()=>d(u)},u.key),e[13]=c,e[14]=d,e[15]=l,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=p):p=e[20],g=s.map(p),e[4]=c,e[5]=d,e[6]=l,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=g}else g=e[12];let f;return e[21]!==g?(f=o.jsx("ul",{className:"divide-y",children:g}),e[21]=g,e[22]=f):f=e[22],f}function Bu(t){const e=pe.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:l,onOpen:c,onArchive:d}=t,m=_e(),g=s.status==="awaiting_review"&&s.missing.length>0,f=s.status==="scheduled"||s.status==="published",p=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let u;e[0]!==p?(u=ve("absolute left-3 top-3 z-10 transition-opacity",p),e[0]=p,e[1]=u):u=e[1];let b;e[2]!==r?(b=()=>r(),e[2]=r,e[3]=b):b=e[3];let h;e[4]!==s.title||e[5]!==m?(h=s.title||m("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=m,e[6]=h):h=e[6];let _;e[7]!==i||e[8]!==b||e[9]!==h?(_=o.jsx(sn,{checked:i,onCheckedChange:b,"aria-label":h}),e[7]=i,e[8]=b,e[9]=h,e[10]=_):_=e[10];let y;e[11]!==u||e[12]!==_?(y=o.jsx("span",{className:u,children:_}),e[11]=u,e[12]=_,e[13]=y):y=e[13];let j;e[14]!==l||e[15]!==d||e[16]!==a?(j=d&&!a&&o.jsx(ni,{onArchive:d,disabled:l,className:"top-2.5"}),e[14]=l,e[15]=d,e[16]=a,e[17]=j):j=e[17];let w;e[18]!==c||e[19]!==r||e[20]!==a?(w=()=>a?r():c(),e[18]=c,e[19]=r,e[20]=a,e[21]=w):w=e[21];const N=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let v;e[22]!==N?(v=ve("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",N),e[22]=N,e[23]=v):v=e[23];let E;e[24]!==s.title||e[25]!==m?(E=s.title||m("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=m,e[26]=E):E=e[26];let S;e[27]!==E?(S=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:E}),e[27]=E,e[28]=S):S=e[28];const k=ku[s.status],T=Js[s.status];let B;e[29]!==m||e[30]!==T?(B=m(T),e[29]=m,e[30]=T,e[31]=B):B=e[31];let O;e[32]!==k||e[33]!==B?(O=o.jsx(Un,{variant:k,className:"shrink-0",children:B}),e[32]=k,e[33]=B,e[34]=O):O=e[34];let D;e[35]!==g||e[36]!==s.missing?(D=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(fs,{size:12}),s.missing.length]}),e[35]=g,e[36]=s.missing,e[37]=D):D=e[37];let z;e[38]!==s.duplicateTitle||e[39]!==m?(z=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:m("sandbox.postBoard.duplicateTitle"),children:[o.jsx(Mn,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:m("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=m,e[40]=z):z=e[40];let C;e[41]!==f||e[42]!==s.date||e[43]!==s.scheduledDatetime?(C=f&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx($n,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=f,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=C):C=e[44];let A;e[45]!==O||e[46]!==D||e[47]!==z||e[48]!==C?(A=o.jsxs("div",{className:"flex items-center gap-2",children:[O,D,z,C]}),e[45]=O,e[46]=D,e[47]=z,e[48]=C,e[49]=A):A=e[49];let V;e[50]!==n||e[51]!==v||e[52]!==S||e[53]!==A||e[54]!==w?(V=o.jsxs("button",{type:"button",onClick:w,"aria-current":n,className:v,children:[S,A]}),e[50]=n,e[51]=v,e[52]=S,e[53]=A,e[54]=w,e[55]=V):V=e[55];let U;return e[56]!==V||e[57]!==y||e[58]!==j?(U=o.jsxs("li",{className:"group/row relative",children:[y,j,V]}),e[56]=V,e[57]=y,e[58]=j,e[59]=U):U=e[59],U}function Du(t){const e=pe.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,l=_e(),c=s.status!=="generating"&&!a;let d;e[0]!==n?(d=Uc(n),e[0]=n,e[1]=d):d=e[1];const m=d,g=!c&&"opacity-80";let f;e[2]!==g?(f=ve("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",g),e[2]=g,e[3]=f):f=e[3];let p;e[4]!==a||e[5]!==r?(p=r&&o.jsx(ni,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=p):p=e[6];let u;e[7]!==s.key?(u=B=>B.dataTransfer.setData(si,s.key),e[7]=s.key,e[8]=u):u=e[8];const b=c?"cursor-grab active:cursor-grabbing":"cursor-pointer";let h;e[9]!==b?(h=ve("block w-full p-3 text-left",b),e[9]=b,e[10]=h):h=e[10];let _;e[11]!==s.title||e[12]!==l?(_=s.title||l("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=l,e[13]=_):_=e[13];let y;e[14]!==_?(y=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:_}),e[14]=_,e[15]=y):y=e[15];let j;e[16]!==m||e[17]!==s.status?(j=s.status==="draft"&&m.format?.name&&o.jsx(Un,{variant:"outline",className:"max-w-full truncate",children:m.format.name}),e[16]=m,e[17]=s.status,e[18]=j):j=e[18];let w;e[19]!==s.status||e[20]!==l?(w=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(jn,{size:12,className:"animate-spin"}),l("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=l,e[21]=w):w=e[21];let N;e[22]!==s.missing||e[23]!==s.status||e[24]!==l?(N=s.status==="awaiting_review"&&(s.missing.length>0?o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(fs,{size:12}),l("sandbox.postBoard.nIssues",{count:String(s.missing.length)})]}):o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-success",children:[o.jsx(rl,{size:12}),l("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=l,e[25]=N):N=e[25];let v;e[26]!==s.date||e[27]!==s.scheduledDatetime||e[28]!==s.status?(v=(s.status==="scheduled"||s.status==="published")&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[o.jsx($n,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[26]=s.date,e[27]=s.scheduledDatetime,e[28]=s.status,e[29]=v):v=e[29];let E;e[30]!==s.duplicateTitle||e[31]!==l?(E=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Mn,{size:12,"aria-hidden":!0}),l("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=l,e[32]=E):E=e[32];let S;e[33]!==j||e[34]!==w||e[35]!==N||e[36]!==v||e[37]!==E?(S=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[j,w,N,v,E]}),e[33]=j,e[34]=w,e[35]=N,e[36]=v,e[37]=E,e[38]=S):S=e[38];let k;e[39]!==c||e[40]!==i||e[41]!==S||e[42]!==u||e[43]!==h||e[44]!==y?(k=o.jsxs("button",{type:"button",draggable:c,onDragStart:u,onClick:i,className:h,children:[y,S]}),e[39]=c,e[40]=i,e[41]=S,e[42]=u,e[43]=h,e[44]=y,e[45]=k):k=e[45];let T;return e[46]!==k||e[47]!==f||e[48]!==p?(T=o.jsxs("div",{className:f,children:[p,k]}),e[46]=k,e[47]=f,e[48]=p,e[49]=T):T=e[49],T}function ni(t){const e=pe.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=_e();let l;e[0]!==s||e[1]!==r?(l=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=l):l=e[2];const c=l;let d;e[3]!==n?(d=p=>{p.stopPropagation(),n()},e[3]=n,e[4]=d):d=e[4];let m;e[5]!==i?(m=ve("absolute right-2 z-10 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/card:opacity-100 group-hover/row:opacity-100",i),e[5]=i,e[6]=m):m=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Vn,{className:"size-3.25"}),e[7]=g):g=e[7];let f;return e[8]!==a||e[9]!==d||e[10]!==m||e[11]!==c?(f=o.jsx(Oe,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":c,title:c,onClick:d,className:m,children:g}),e[8]=a,e[9]=d,e[10]=m,e[11]=c,e[12]=f):f=e[12],f}function Qe(t){const e=pe.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:l,variantCount:c,trailing:d,selectable:m,selectionActive:g,selected:f,invalid:p,invalidReason:u,warning:b,warningReason:h,onToggleSelect:_,onClick:y,menu:j}=t,w=_e(),N=l==="global";let v;e[0]!==s||e[1]!==r||e[2]!==N||e[3]!==n?(v=n?o.jsx("img",{src:n,alt:"",className:"size-8 shrink-0 rounded-lg object-cover bg-muted"}):o.jsx("span",{className:ve("flex size-8 shrink-0 items-center justify-center rounded-lg",N?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:ve("shrink-0",!N&&(r?"text-accent-foreground":"text-muted-foreground")),style:N?{color:Dn}:void 0})}),e[0]=s,e[1]=r,e[2]=N,e[3]=n,e[4]=v):v=e[4];const E=v,S=r?N?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":N?"hover:bg-global-section/10":"hover:bg-accent";let k;e[5]!==S?(k=ve("group relative flex min-w-0 items-center rounded-md transition-colors",S),e[5]=S,e[6]=k):k=e[6];let T;e[7]!==_||e[8]!==m||e[9]!==f||e[10]!==g||e[11]!==w||e[12]!==a?(T=m&&o.jsx("span",{className:ve("flex shrink-0 items-center pl-2.5 transition-opacity",f||g?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:Ou,children:o.jsx(sn,{checked:f,onCheckedChange:()=>_?.(),"aria-label":w("sandbox.itemRow.selectItem",{title:a})})}),e[7]=_,e[8]=m,e[9]=f,e[10]=g,e[11]=w,e[12]=a,e[13]=T):T=e[13];const B=p&&!r&&"text-destructive";let O;e[14]!==B?(O=ve("block truncate text-sm font-medium",B),e[14]=B,e[15]=O):O=e[15];let D;e[16]!==O||e[17]!==a?(D=o.jsx("span",{className:O,children:a}),e[16]=O,e[17]=a,e[18]=D):D=e[18];const z=r?"text-accent-foreground/70":"text-muted-foreground";let C;e[19]!==z?(C=ve("block truncate text-xs",z),e[19]=z,e[20]=C):C=e[20];let A;e[21]!==i||e[22]!==C?(A=o.jsx("span",{className:C,children:i}),e[21]=i,e[22]=C,e[23]=A):A=e[23];let V;e[24]!==A||e[25]!==D?(V=o.jsxs("span",{className:"min-w-0 flex-1",children:[D,A]}),e[24]=A,e[25]=D,e[26]=V):V=e[26];let U;e[27]!==r||e[28]!==w||e[29]!==c?(U=c!==void 0&&c>1&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsxs("span",{className:ve("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Wo,{size:14}),c]})}),o.jsx(et,{side:"bottom",children:w("sandbox.itemRow.variantCount",{count:c})})]}),e[27]=r,e[28]=w,e[29]=c,e[30]=U):U=e[30];let Q;e[31]!==b||e[32]!==h?(Q=b&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(fs,{size:14})})}),h&&o.jsx(et,{side:"bottom",children:h})]}),e[31]=b,e[32]=h,e[33]=Q):Q=e[33];let Y;e[34]!==r||e[35]!==p||e[36]!==u?(Y=p&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:ve("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(fs,{size:14})})}),u&&o.jsx(et,{side:"bottom",children:u})]}),e[34]=r,e[35]=p,e[36]=u,e[37]=Y):Y=e[37];let q;e[38]!==y||e[39]!==E||e[40]!==V||e[41]!==U||e[42]!==Q||e[43]!==Y||e[44]!==d?(q=o.jsxs("button",{type:"button",onClick:y,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[E,V,U,Q,Y,d]}),e[38]=y,e[39]=E,e[40]=V,e[41]=U,e[42]=Q,e[43]=Y,e[44]=d,e[45]=q):q=e[45];let G;e[46]!==r||e[47]!==j?(G=j&&o.jsx("div",{className:ve("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:j}),e[46]=r,e[47]=j,e[48]=G):G=e[48];let M;return e[49]!==q||e[50]!==G||e[51]!==k||e[52]!==T?(M=o.jsxs("div",{className:k,children:[T,q,G]}),e[49]=q,e[50]=G,e[51]=k,e[52]=T,e[53]=M):M=e[53],M}function Ou(t){return t.stopPropagation()}const Ru={loaders:qo,actions:Zo},$u={loaders:"Loaders",actions:"Actions"},Lu={analytics:dr,blog:ua,commerce:cr,site:lr,website:Vs};function Ku(t,e){return e===0?Lu[t.toLowerCase()]??no:no}function Os(t,e){return e===0?Ui(t):t}function Iu(t){const e=pe.c(105),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c}=t,d=_e();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[g,f]=L.useState(m),[p,u]=L.useState(null),[b,h]=L.useState(""),[_,y]=L.useState(Yu),[j,w]=L.useState(c);j!==c&&(w(c),f([]),u(null),h(""),y(new Set));let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N=K=>{y(J=>{const oe=new Set(J);return oe.has(K)?oe.delete(K):oe.add(K),oe})},e[1]=N):N=e[1];const v=N;let E;e[2]!==a||e[3]!==s||e[4]!==n?(E={orgSlug:s,virtualMcpId:n,branch:a},e[2]=a,e[3]=s,e[4]=n,e[5]=E):E=e[5];const S=en(E);let k;e[6]!==S?(k=Mo((K,J)=>S.mutate({blockKey:K,data:J})),e[6]=S,e[7]=k):k=e[7];const T=k;let B;e[8]!==c?(B=Gi(c),e[8]=c,e[9]=B):B=e[9];const O=B,D=Ru[c];let z,C,A,V,U,Q,Y;if(e[10]!==D||e[11]!==a||e[12]!==l||e[13]!==c||e[14]!==r||e[15]!==_||e[16]!==s||e[17]!==g||e[18]!==i||e[19]!==S||e[20]!==T||e[21]!==b||e[22]!==p||e[23]!==O||e[24]!==d||e[25]!==n){A=Symbol.for("react.early_return_sentinel");e:{const K=[...Fi(r,l,c).map(Hu),...zi(r,c).map(Gu)],J=b.trim().toLowerCase(),oe=J.length>0,ge=oe?K.filter(F=>F.title.toLowerCase().includes(J)||F.resolveType.toLowerCase().includes(J)):[],re=new Map,le=[],he=new Map;if(!oe){for(const F of K){const ye=F.folderPath;if(!(ye.length<g.length)&&g.every((ke,Te)=>ye[Te]===ke))if(ye.length===g.length)if(F.savedKey!==void 0){const ke=he.get(F.resolveType);ke?ke.push(F):he.set(F.resolveType,[F])}else le.push(F);else{const ke=ye[g.length],Te=re.get(ke)??{count:0,savedCount:0};F.savedKey!==void 0?Te.savedCount=Te.savedCount+1:Te.count=Te.count+1,re.set(ke,Te)}}le.sort(Uu);for(const F of he.values())F.sort(Vu)}const de=[...he.entries()].filter(F=>{const[ye]=F;return!le.some(ke=>ke.resolveType===ye)}).flatMap(Mu).sort(zu);let be;e[33]!==g?(be=(F,ye)=>Os(F.name,g.length).localeCompare(Os(ye.name,g.length)),e[33]=g,e[34]=be):be=e[34];const se=[...re.entries()].map(Fu).sort(be);let me;e[35]===Symbol.for("react.memo_cache_sentinel")?(me=F=>{u(F.savedKey!==void 0?{mode:"saved",key:F.savedKey}:{mode:"available",resolveType:F.resolveType,title:F.title})},e[35]=me):me=e[35];const ae=me;let ce;e[36]!==S||e[37]!==O||e[38]!==d?(ce=async(F,ye)=>{const ke=await S.mutateAsync({blockKey:F,data:ye,create:!0});ze(ke)||fe.success(d("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:O,blockId:F})),u({mode:"saved",key:F})},e[36]=S,e[37]=O,e[38]=d,e[39]=ce):ce=e[39];const W=ce;let X;e[40]!==l||e[41]!==p?(X=qu(p,l),e[40]=l,e[41]=p,e[42]=X):X=e[42];const ee=X;if(ee){const F=`${ee.mode}:${ee.mode==="saved"?ee.blockKey:ee.resolveType}`,ye=ee.mode==="saved"&&ee.blockKey||"";let ke;e[43]===Symbol.for("react.memo_cache_sentinel")?(ke=()=>u(null),e[43]=ke):ke=e[43];let Te;e[44]!==a||e[45]!==l||e[46]!==F||e[47]!==W||e[48]!==c||e[49]!==r||e[50]!==s||e[51]!==i||e[52]!==S.isPending||e[53]!==T||e[54]!==ee.editorTarget||e[55]!==ee.initialValue||e[56]!==n?(Te=o.jsx(Mi,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c,target:ee.editorTarget,initialValue:ee.initialValue,isCreating:S.isPending,onCreate:W,onSaveReferencedBlock:T,onBack:ke},F),e[44]=a,e[45]=l,e[46]=F,e[47]=W,e[48]=c,e[49]=r,e[50]=s,e[51]=i,e[52]=S.isPending,e[53]=T,e[54]=ee.editorTarget,e[55]=ee.initialValue,e[56]=n,e[57]=Te):Te=e[57];let Ve;e[58]!==a||e[59]!==F||e[60]!==s||e[61]!==ye||e[62]!==Te||e[63]!==n?(Ve=o.jsx(Vo,{orgSlug:s,virtualMcpId:n,branch:a,blockKey:ye,present:void 0,children:Te},F),e[58]=a,e[59]=F,e[60]=s,e[61]=ye,e[62]=Te,e[63]=n,e[64]=Ve):Ve=e[64],A=Ve;break e}Y="flex h-full w-full min-w-0 flex-col";let P;e[65]!==d?(P=d("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[65]=d,e[66]=P):P=e[66];let H;e[67]===Symbol.for("react.memo_cache_sentinel")?(H=()=>f([]),e[67]=H):H=e[67];const ue=g.length===0?"font-medium text-foreground":"text-muted-foreground";let xe;e[68]!==ue?(xe=ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",ue),e[68]=ue,e[69]=xe):xe=e[69];const Be=$u[c];let Pe;e[70]!==xe||e[71]!==Be?(Pe=o.jsx("button",{type:"button",onClick:H,className:xe,children:Be}),e[70]=xe,e[71]=Be,e[72]=Pe):Pe=e[72];let Re;e[73]!==g?(Re=g.map((F,ye)=>{const ke=ye===g.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(Ms,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>f(g.slice(0,ye+1)),className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",ke?"font-medium text-foreground":"text-muted-foreground"),children:Os(F,ye)})]},`${F}-${ye}`)}),e[73]=g,e[74]=Re):Re=e[74];let Ae;e[75]!==P||e[76]!==Pe||e[77]!==Re?(Ae=o.jsxs("nav",{"aria-label":P,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[Pe,Re]}),e[75]=P,e[76]=Pe,e[77]=Re,e[78]=Ae):Ae=e[78];let Ce;e[79]===Symbol.for("react.memo_cache_sentinel")?(Ce=o.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[79]=Ce):Ce=e[79];let Ee;e[80]===Symbol.for("react.memo_cache_sentinel")?(Ee=F=>h(F.target.value),e[80]=Ee):Ee=e[80];let ie;e[81]!==c||e[82]!==d?(ie=d("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:c}),e[81]=c,e[82]=d,e[83]=ie):ie=e[83];let Ne;e[84]!==c||e[85]!==d?(Ne=d("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:c}),e[84]=c,e[85]=d,e[86]=Ne):Ne=e[86];let Le;e[87]!==b||e[88]!==ie||e[89]!==Ne?(Le=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Ce,o.jsx("input",{type:"text",value:b,onChange:Ee,placeholder:ie,"aria-label":Ne,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[87]=b,e[88]=ie,e[89]=Ne,e[90]=Le):Le=e[90],e[91]!==Ae||e[92]!==Le?(C=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[Ae,Le]}),e[91]=Ae,e[92]=Le,e[93]=C):C=e[93],z=tn,Q="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",V="mx-auto w-full max-w-4xl px-6 py-5",U=oe?ge.length===0?o.jsx(jt,{title:d("sandbox.runnableBlocksBrowser.noSearchResults",{kind:c,query:b.trim()}),description:d("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:ge.map(F=>o.jsx(Qe,{icon:D,accent:F.savedKey!==void 0?"global":void 0,title:F.title,subtitle:F.resolveType,active:!1,onClick:()=>ae(F)},F.savedKey??F.resolveType))}):se.length===0&&le.length===0&&de.length===0?o.jsx(jt,{title:d("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:c}),description:g.length===0?d("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):d("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[se.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:se.map(F=>{const ye=Ku(F.name,g.length);return o.jsxs("button",{type:"button",onClick:()=>f([...g,F.name]),className:"flex items-center gap-2.5 rounded-lg border px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[o.jsx(ye,{size:18,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-medium",children:Os(F.name,g.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[F.count," ",F.count===1?O:c,F.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",d("sandbox.runnableBlocksBrowser.savedCountLabel",{count:F.savedCount})]})]})]})]},F.name)})}),(le.length>0||de.length>0)&&o.jsxs("div",{className:ve("flex flex-col gap-1",se.length>0&&"mt-4"),children:[le.map(F=>{const ye=he.get(F.resolveType)??[],ke=_.has(F.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(Qe,{icon:D,title:F.title,subtitle:F.resolveType,active:!1,onClick:()=>ae(F)}),ye.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>v(F.resolveType),"aria-expanded":ke,className:"flex items-center gap-1 self-start rounded-lg px-2.5 py-1 text-xs font-medium transition-colors hover:bg-global-section/10 cursor-pointer ml-11",style:{color:Dn},children:[ke?o.jsx(gs,{size:12,className:"shrink-0"}):o.jsx(Ms,{size:12,className:"shrink-0"}),d(ke?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",ye.length,")"]}),ke&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:ye.map(Te=>o.jsx(Qe,{icon:D,accent:"global",title:Te.title,subtitle:Te.resolveType,active:!1,onClick:()=>ae(Te)},Te.savedKey))})]})]},F.resolveType)}),de.map(F=>o.jsx(Qe,{icon:D,accent:"global",title:F.title,subtitle:F.resolveType,active:!1,onClick:()=>ae(F)},F.savedKey))]})]})}e[10]=D,e[11]=a,e[12]=l,e[13]=c,e[14]=r,e[15]=_,e[16]=s,e[17]=g,e[18]=i,e[19]=S,e[20]=T,e[21]=b,e[22]=p,e[23]=O,e[24]=d,e[25]=n,e[26]=z,e[27]=C,e[28]=A,e[29]=V,e[30]=U,e[31]=Q,e[32]=Y}else z=e[26],C=e[27],A=e[28],V=e[29],U=e[30],Q=e[31],Y=e[32];if(A!==Symbol.for("react.early_return_sentinel"))return A;let q;e[94]!==V||e[95]!==U?(q=o.jsx("div",{className:V,children:U}),e[94]=V,e[95]=U,e[96]=q):q=e[96];let G;e[97]!==z||e[98]!==q||e[99]!==Q?(G=o.jsx(z,{className:Q,children:q}),e[97]=z,e[98]=q,e[99]=Q,e[100]=G):G=e[100];let M;return e[101]!==C||e[102]!==G||e[103]!==Y?(M=o.jsxs("div",{className:Y,children:[C,G]}),e[101]=C,e[102]=G,e[103]=Y,e[104]=M):M=e[104],M}function Fu(t){const[e,s]=t;return{name:e,...s}}function zu(t,e){return t.title.localeCompare(e.title)}function Mu(t){const[,e]=t;return e}function Vu(t,e){return t.title.localeCompare(e.title)}function Uu(t,e){return t.title.localeCompare(e.title)}function Gu(t){return{resolveType:t.resolveType,title:t.title,folderPath:zo(t.resolveType)}}function Hu(t){return{resolveType:t.resolveType,title:t.title,folderPath:zo(t.resolveType),savedKey:t.key}}function Yu(){return new Set}function qu(t,e){if(!t)return null;if(t.mode==="available")return{mode:"available",resolveType:t.resolveType,editorTarget:{mode:"available",resolveType:t.resolveType,title:t.title},initialValue:{}};const{resolveType:s,props:n,title:a}=Vi(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function Wu(t){const e=pe.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,resolveType:c,title:d,defaultBlockId:m,isCreating:g,onCreate:f,onSaveReferencedBlock:p}=t,u=_e(),b=Zs(),h=b?.virtualMcpId,y=da(h===n?n:null)?.metadata?.siteSlug??null;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={},e[0]=j):j=e[0];const[w,N]=L.useState(j);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[1]=v):v=e[1];const[E,S]=L.useState(v),[k,T]=L.useState(0),[B,O]=L.useState(!1);let D;e[2]!==r||e[3]!==c?(D=Fn(c,r),e[2]=r,e[3]=c,e[4]=D):D=e[4];const z=D;let C,A,V,U,Q,Y,q,G;if(e[5]!==y||e[6]!==a||e[7]!==l||e[8]!==E||e[9]!==w||e[10]!==g||e[11]!==f||e[12]!==s||e[13]!==i||e[14]!==c||e[15]!==u||e[16]!==b?.taskId||e[17]!==d||e[18]!==n){const le=c.split("/").pop()?.replace(/\.tsx?$/,"")??c,he=b?.taskId??null,de=i??void 0;let be;e[27]!==y||e[28]!==a||e[29]!==s||e[30]!==de||e[31]!==he||e[32]!==n?(be={orgSlug:s,virtualMcpId:n,branch:a,threadId:he,previewUrl:de,siteSlug:y},e[27]=y,e[28]=a,e[29]=s,e[30]=de,e[31]=he,e[32]=n,e[33]=be):be=e[33],A=be;let se,me,ae,ce;if(e[34]!==l||e[35]!==E||e[36]!==w||e[37]!==f||e[38]!==u||e[39]!==d){const Pe=[d,...E],Re=Ce=>{S(E.slice(0,Ce)),T(Xu)};let Ae;e[48]!==l||e[49]!==w||e[50]!==f?(Ae=async Ce=>{const Ee=Yi(Ce,l);if(Ee){fe.error(Ee);return}await f(Ce,w),O(!1)},e[48]=l,e[49]=w,e[50]=f,e[51]=Ae):Ae=e[51],C=Ae,G="flex h-full w-full min-w-0",q="flex min-w-0 flex-1 flex-col",Q="shrink-0 border-b px-3 py-2.5",ce="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==u?(se=u("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=u,e[53]=se):se=e[53],me="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",ae=Pe.map((Ce,Ee)=>{const ie=Ee===Pe.length-1,Ne=Hi(Ce);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[Ee>0&&o.jsx(Ms,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>Re(Ee),title:Ne,className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",ie?"font-medium text-foreground":"text-muted-foreground"),children:Ne})]},`${Ne}-${Ee}`)}),e[34]=l,e[35]=E,e[36]=w,e[37]=f,e[38]=u,e[39]=d,e[40]=C,e[41]=se,e[42]=me,e[43]=ae,e[44]=ce,e[45]=Q,e[46]=q,e[47]=G}else C=e[40],se=e[41],me=e[42],ae=e[43],ce=e[44],Q=e[45],q=e[46],G=e[47];let W;e[54]!==se||e[55]!==me||e[56]!==ae?(W=o.jsx("nav",{"aria-label":se,className:me,children:ae}),e[54]=se,e[55]=me,e[56]=ae,e[57]=W):W=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=()=>O(!0),e[58]=X):X=e[58];let ee;e[59]!==u?(ee=u("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=u,e[60]=ee):ee=e[60];let P;e[61]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(ur,{size:14}),e[61]=P):P=e[61];let H;e[62]!==g||e[63]!==ee?(H=o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{size:"icon",className:"shrink-0",disabled:g,onClick:X,"aria-label":ee,children:P})}),e[62]=g,e[63]=ee,e[64]=H):H=e[64];let ue;e[65]!==u?(ue=u("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=u,e[66]=ue):ue=e[66];let xe;e[67]!==ue?(xe=o.jsx(et,{side:"bottom",children:ue}),e[67]=ue,e[68]=xe):xe=e[68];let Be;e[69]!==H||e[70]!==xe?(Be=o.jsxs(tt,{children:[H,xe]}),e[69]=H,e[70]=xe,e[71]=Be):Be=e[71],e[72]!==ce||e[73]!==W||e[74]!==Be?(Y=o.jsxs("div",{className:ce,children:[W,Be]}),e[72]=ce,e[73]=W,e[74]=Be,e[75]=Y):Y=e[75],V="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",U=u("sandbox.availableSectionEditor.localEditsHint",{typeLabel:le}),e[5]=y,e[6]=a,e[7]=l,e[8]=E,e[9]=w,e[10]=g,e[11]=f,e[12]=s,e[13]=i,e[14]=c,e[15]=u,e[16]=b?.taskId,e[17]=d,e[18]=n,e[19]=C,e[20]=A,e[21]=V,e[22]=U,e[23]=Q,e[24]=Y,e[25]=q,e[26]=G}else C=e[19],A=e[20],V=e[21],U=e[22],Q=e[23],Y=e[24],q=e[25],G=e[26];let M;e[76]!==V||e[77]!==U?(M=o.jsx("p",{className:V,children:U}),e[76]=V,e[77]=U,e[78]=M):M=e[78];let K;e[79]!==M||e[80]!==Q||e[81]!==Y?(K=o.jsxs("div",{className:Q,children:[Y,M]}),e[79]=M,e[80]=Q,e[81]=Y,e[82]=K):K=e[82];let J;e[83]!==l||e[84]!==E||e[85]!==k||e[86]!==w||e[87]!==r||e[88]!==p||e[89]!==A||e[90]!==z||e[91]!==u?(J=o.jsx(tn,{className:"min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:z?o.jsx(Uo,{schema:z,value:w,onChange:le=>N(le),basePath:"",breadcrumbPath:E,onBreadcrumbChange:S,meta:r,decofile:l,onSaveReferencedBlock:p,sandbox:A},k):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=l,e[84]=E,e[85]=k,e[86]=w,e[87]=r,e[88]=p,e[89]=A,e[90]=z,e[91]=u,e[92]=J):J=e[92];let oe;e[93]!==K||e[94]!==J||e[95]!==q?(oe=o.jsxs("div",{className:q,children:[K,J]}),e[93]=K,e[94]=J,e[95]=q,e[96]=oe):oe=e[96];let ge;e[97]!==m||e[98]!==C||e[99]!==g||e[100]!==B?(ge=o.jsx(qi,{open:B,onOpenChange:O,defaultBlockId:m,isPending:g,onSubmit:C}),e[97]=m,e[98]=C,e[99]=g,e[100]=B,e[101]=ge):ge=e[101];let re;return e[102]!==oe||e[103]!==ge||e[104]!==G?(re=o.jsxs("div",{className:G,children:[oe,ge]}),e[102]=oe,e[103]=ge,e[104]=G,e[105]=re):re=e[105],re}function Xu(t){return t+1}function Ju(t,e,s){const n={__resolveType:t},a=Br([n],e)[0];return a?mi(n,a,e,s):null}function Qu({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:l}){const c=_e(),d=Zs(),m=d?.virtualMcpId,f=da(m===e?e:null)?.metadata?.siteSlug??null,[p]=L.useState(()=>Ju(r,i,pi(a))),[u,b]=L.useState(p?.data??{}),[h,_]=L.useState([]),[y,j]=L.useState(0),[w,N]=L.useState(!1),[v,E]=L.useState(null),S=v!==null,{save:k,flush:T}=Wi({orgSlug:t,virtualMcpId:e,branch:s},{holdsCopy:!0}),B=p?.resolveType?Fn(p.resolveType,a):null,O=In(e,s),D=O.kind==="protocol"&&O.source==="github",z=i[r],C=z?Er(r,z):r,A=d?.taskId??null,V={orgSlug:t,virtualMcpId:e,branch:s,threadId:A,previewUrl:n??void 0,siteSlug:f},U=M=>{b(M),k(r,M)},Q=()=>{S?(E(null),N(!1),j(M=>M+1)):E(JSON.stringify(u,null,2))},Y=M=>{const K=M??"";try{const J=JSON.parse(K);if(J&&typeof J=="object"&&!Array.isArray(J)){N(!1),U(J);return}N(!0)}catch{N(!0)}},q=[C,...h],G=M=>{_(h.slice(0,M)),j(K=>K+1)};return o.jsx("div",{className:"flex h-full w-full min-w-0",children:o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx(Xi,{crumbs:q,onSelect:G}),o.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Dn},"aria-hidden":!0}),D?o.jsx("span",{className:"min-w-0 truncate text-sm font-medium","data-testid":"saved-section-title",children:C}):null,o.jsx("div",{className:"flex-1"}),o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{variant:S?"default":"ghost",size:"icon",className:"shrink-0",onClick:Q,"aria-label":c(S?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":S,children:S?o.jsx(Bn,{size:14}):o.jsx(Xo,{size:14})})}),o.jsx(et,{side:"bottom",children:c(S?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson")})]})]}),o.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:c("sandbox.savedSectionEditor.globalSectionDescription")})]}),o.jsxs("div",{className:"relative min-h-0 flex-1",children:[o.jsx(tn,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:B?o.jsx(Uo,{schema:B,value:u,onChange:M=>U(M),basePath:"",breadcrumbPath:h,onBreadcrumbChange:_,meta:a,decofile:i,onSaveReferencedBlock:l,sandbox:V},y):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sandbox.savedSectionEditor.noEditableFields")})})})}),v!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[w&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(pa,{language:"json",height:"100%",code:v,onChange:Y,onSave:M=>{Y(M),T()}})})]})]})]})})}function Zu(t){const e=pe.c(46),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,isCreating:d,onCreateAvailable:m,onSaveReferencedBlock:g}=t,f=_e();if(!s){let y;e[0]!==f?(y=f("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=f,e[1]=y):y=e[1];let j;e[2]!==f?(j=f("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=f,e[3]=j):j=e[3];let w;return e[4]!==y||e[5]!==j?(w=o.jsx(jt,{title:y,description:j}),e[4]=y,e[5]=j,e[6]=w):w=e[6],w}if(s.collection==="available-section"){const y=`available:${s.resolveType}`,j=s.resolveType,w=s.title;let N;e[7]!==s.title?(N=Ji(s.title),e[7]=s.title,e[8]=N):N=e[8];let v;e[9]!==m||e[10]!==s.resolveType?(v=(S,k)=>m(s.resolveType,S,k),e[9]=m,e[10]=s.resolveType,e[11]=v):v=e[11];let E;return e[12]!==i||e[13]!==c||e[14]!==d||e[15]!==l||e[16]!==g||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==y||e[22]!==N||e[23]!==v||e[24]!==a?(E=o.jsx(Wu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,resolveType:j,title:w,defaultBlockId:N,isCreating:d,onCreate:v,onSaveReferencedBlock:g},y),e[12]=i,e[13]=c,e[14]=d,e[15]=l,e[16]=g,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=y,e[22]=N,e[23]=v,e[24]=a,e[25]=E):E=e[25],E}const p=`saved:${s.key}`,u=s.key;let b;e[26]!==c||e[27]!==s.key?(b=Object.hasOwn(c,s.key),e[26]=c,e[27]=s.key,e[28]=b):b=e[28];let h;e[29]!==i||e[30]!==c||e[31]!==l||e[32]!==g||e[33]!==n||e[34]!==r||e[35]!==s.key||e[36]!==a?(h=o.jsx(Qu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,blockKey:s.key,onSaveReferencedBlock:g}),e[29]=i,e[30]=c,e[31]=l,e[32]=g,e[33]=n,e[34]=r,e[35]=s.key,e[36]=a,e[37]=h):h=e[37];let _;return e[38]!==i||e[39]!==n||e[40]!==s.key||e[41]!==p||e[42]!==b||e[43]!==h||e[44]!==a?(_=o.jsx(Vo,{orgSlug:n,virtualMcpId:a,branch:i,blockKey:u,present:b,children:h},p),e[38]=i,e[39]=n,e[40]=s.key,e[41]=p,e[42]=b,e[43]=h,e[44]=a,e[45]=_):_=e[45],_}function Rs(t){const e=pe.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:l}=t,c=_e();let d;e[0]!==c?(d=c("sandbox.itemActions.moreActions"),e[0]=c,e[1]=d):d=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(fi,{size:14}),e[2]=m):m=e[2];let g;e[3]!==d?(g=o.jsx(Is,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":d,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer",onClick:ep,children:m})}),e[3]=d,e[4]=g):g=e[4];let f;e[5]!==n||e[6]!==c?(f=n&&o.jsxs(at,{onClick:n,children:[o.jsx(ul,{size:14}),c("sandbox.itemActions.rename")]}),e[5]=n,e[6]=c,e[7]=f):f=e[7];let p;e[8]!==s||e[9]!==c?(p=s&&o.jsxs(at,{onClick:s,children:[o.jsx(Mn,{size:14}),c("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=c,e[10]=p):p=e[10];let u;e[11]!==a||e[12]!==c?(u=a&&o.jsxs(o.Fragment,{children:[o.jsx(mn,{}),o.jsxs(at,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Wo,{size:14}),c("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=c,e[13]=u):u=e[13];let b;e[14]!==i||e[15]!==r||e[16]!==c?(b=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(mn,{}),i&&o.jsxs(at,{onClick:i,children:[o.jsx(Yo,{size:14}),c("sandbox.itemActions.editSeo")]}),r&&o.jsxs(at,{onClick:r,children:[o.jsx(Xo,{size:14}),c("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=c,e[17]=b):b=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(mn,{}),e[18]=h):h=e[18];let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Vn,{size:14}),e[19]=_):_=e[19];let y;e[20]!==c?(y=c("sandbox.itemActions.delete"),e[20]=c,e[21]=y):y=e[21];let j;e[22]!==l||e[23]!==y?(j=o.jsxs(at,{onClick:l,className:"text-destructive focus:text-destructive",children:[_,y]}),e[22]=l,e[23]=y,e[24]=j):j=e[24];let w;e[25]!==j||e[26]!==f||e[27]!==p||e[28]!==u||e[29]!==b?(w=o.jsxs(Fs,{align:"end",className:"w-44",children:[f,p,u,b,h,j]}),e[25]=j,e[26]=f,e[27]=p,e[28]=u,e[29]=b,e[30]=w):w=e[30];let N;return e[31]!==w||e[32]!==g?(N=o.jsxs(zs,{children:[g,w]}),e[31]=w,e[32]=g,e[33]=N):N=e[33],N}function ep(t){return t.stopPropagation()}function Do(t,e,{neverPublished:s=!1}={}){return e&&s?t==="post"?"sandbox.postEditor.deletePostConfirmBodyNeverPublished":"sandbox.contentBrowser.deleteDialog.descriptionNeverPublished":t==="section"?e?"sandbox.contentBrowser.deleteDialog.descriptionSectionDraft":"sandbox.contentBrowser.deleteDialog.descriptionSection":t==="post"?e?"sandbox.postEditor.deletePostConfirmBodyDraft":"sandbox.postEditor.deletePostConfirmBody":e?"sandbox.contentBrowser.deleteDialog.descriptionDraft":"sandbox.contentBrowser.deleteDialog.descriptionPermanent"}const oi=4;function ln(t){const e=new Map;for(const s of t)s.slug&&!e.has(s.slug)&&e.set(s.slug,s);return e}function cn(t,e){const s=t.parentSlug;if(!t.slug||!s||s===t.slug)return;const n=e.get(s);return n===t?void 0:n}function ai(t,e){const s=ln(e),n=[],a=new Set;let i=s.get(t);for(;i&&!a.has(i.slug??"")&&(a.add(i.slug??""),n.push(i),!(n.length>=oi));)i=cn(i,s);return n.reverse()}function ii(t,e){const s=new Map;for(const n of t){const a=cn(n,e);if(!a?.slug)continue;const i=s.get(a);i?i.push(n):s.set(a,[n])}for(const n of s.values())n.sort((a,i)=>a.label.localeCompare(i.label));return s}function Jm(t,e){const s=ln(e),n=ii(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const l=[];for(const c of r)for(const d of n.get(c)??[])d.slug&&!a.has(d.slug)&&(a.add(d.slug),l.push(d));r=l}return a.delete(t),a}function Qm(t,e){if(!t)return[];const s=ln(e),n=ai(t,e),a=n[0];return!a||cn(a,s)?[t]:n.map(i=>i.slug??"")}function tp(t){const e=ln(t),s=ii(t,e),n=new Set,a=[],i=(l,c)=>{if(!n.has(l)&&(n.add(l),a.push({entry:l,depth:c}),!(c+1>=oi)))for(const d of s.get(l)??[])i(d,c+1)},r=t.filter(l=>!cn(l,e)).sort((l,c)=>l.label.localeCompare(c.label));for(const l of r)i(l,0);for(const l of t)i(l,0);return a}function sp(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function np(t){const e=new Map;for(const s of t){const n=sp(s.resolveType),a=e.get(n);a?a.push(s):e.set(n,[s])}return[...e.entries()].map(([s,n])=>({label:s,sections:n})).sort((s,n)=>s.label.localeCompare(n.label))}function Oo(t){const e=pe.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=ve("flex items-center gap-1.5 px-2.5 pb-1 pt-1 text-xs font-medium text-muted-foreground/70",a),e[0]=a,e[1]=i):i=e[1];let r;e[2]!==s?(r=o.jsx(s,{size:13,className:"shrink-0"}),e[2]=s,e[3]=r):r=e[3];let l;return e[4]!==n||e[5]!==i||e[6]!==r?(l=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=l):l=e[7],l}const Ro=L.lazy(()=>He(()=>import("./app-editor-BcJaA3eR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142])).then(t=>({default:t.AppEditor}))),op=L.lazy(()=>He(()=>import("./cms-settings-editor-CjDcV3Uq.js"),__vite__mapDeps([143,1,2,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,109,110,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,111,112,57,113,114,0,22,23,24,56,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,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142])).then(t=>({default:t.CmsSettingsEditor}))),ap=L.lazy(()=>He(()=>import("./post-editor-BChaRDNt.js"),__vite__mapDeps([144,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,65,145,141,138,77,78,118,130,127,116,117,56,57,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,23,103,104,105,106,107,108,109,110,111,112,113,114,115,22,119,120,121,122,123,124,125,126,128,129,131,132,133,146,147,134,148,149,150,135,151,152,153,154,136,137,139,140,142])).then(t=>({default:t.PostEditor}))),ip=L.lazy(()=>He(()=>import("./record-editor-C5XOx_LV.js"),__vite__mapDeps([155,1,2,65,122,23,70,36,117,56,57,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,66,67,20,68,4,5,6,7,8,9,69,18,11,12,13,14,15,16,17,3,10,19,21,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,118,22,119,120,121,123,124,125,126,127,128,129,130,131,132,133,150,154,135,136,137,138,139,140,141,142])).then(t=>({default:t.RecordEditor}))),rp=L.lazy(()=>He(()=>import("./context-BakNzIE5.js"),__vite__mapDeps([156,1,2,100,30,50,77,78,51,65,101,102,23,103,104,105,106,107,108,26,27,28,29,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,52,53,54,55,99,109,110,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,111,112,57,113,114,115,141,116,117,118,56,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,22,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,154,157,147,149,158,159,135,148,136,137,138,139,140,142])).then(t=>({default:t.BlogContext}))),lp=L.lazy(()=>He(()=>import("./category-editor-lTx7E71S.js"),__vite__mapDeps([160,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,31,33,25,65,122,23,70,36,150,26,28,29,30,32,34,35,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,66,67,68,69,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,22,119,120,121,123,124,125,126,127,128,129,130,131,132,133,146,147,134,148,149,140,151,152,153,154,135,136,137,138,139,141,142])).then(t=>({default:t.CategoryEditor}))),cp=L.lazy(()=>He(()=>import("./sections-editor-DpO_mTF7.js"),__vite__mapDeps([161,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,56,57,33,41,26,27,28,29,30,31,32,34,35,36,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,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,23,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,22,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,135,24,134,162,163,140,164,153])).then(t=>({default:t.SectionsEditor}))),dp=L.lazy(()=>He(()=>import("./seo-editor-BPToAJRY.js"),__vite__mapDeps([165,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,22,23,56,57,58,59,60,61,62,63,64,65,66,67,20,68,4,5,6,7,8,9,69,70,18,11,12,13,14,15,16,17,3,10,19,21,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,162])).then(t=>({default:t.SeoEditor}))),up=L.lazy(()=>He(()=>import("./variant-calendar-C37bfPDk.js"),__vite__mapDeps([166,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,65,22,23,116,69,70,126,127,139])).then(t=>({default:t.VariantCalendar}))),pp=L.lazy(()=>He(()=>import("./campaigns-view-iaGM9YLd.js"),__vite__mapDeps([167,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,141,22,23,126,127,69,70,168,65,99,100,77,78,101,102,103,104,105,106,107,108,109,110,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,111,112,57,113,114,115,169,163,140,139])).then(t=>({default:t.CampaignsView}))),mp=L.lazy(()=>He(()=>import("./post-calendar-Ceopsk1u.js"),__vite__mapDeps([170,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,22,23,139,21,16,15,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,100,77,78,65,101,102,103,104,105,106,107,108,99,109,110,111,112,57,113,114,115,56,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,135,136,137,138,140,141,142])).then(t=>({default:t.PostCalendar}))),fp=L.lazy(()=>He(()=>import("./redirect-editor-BxKT3ntE.js"),__vite__mapDeps([171,1,2,138,46,65,122,23,70,36,56,57,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,66,67,20,68,4,5,6,7,8,9,69,18,11,12,13,14,15,16,17,3,10,19,21,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,22,119,120,121,123,124,125,126,127,128,129,130,131,132,133,154])).then(t=>({default:t.RedirectEditor})));function gp(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"campaigns":!s&&t==="campaigns"?"calendar":t}function hp(t,e){return t&&(Pt(t)||e&&(t==="sections"||t==="campaigns"))?t:null}function xp(t){const e=pe.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=Rn(),{org:i}=gi(),r=Jr(),l=Qr(),{runtime:c,previewServerUrl:d}=zn(a),m=c==="cms",g=In(a,n);let f,p;e[0]!==g||e[1]!==m||e[2]!==l.previewState||e[3]!==r.lifecycle.phase?(f=aa(g),p=nc({fastPreviewActive:m||f,previewState:l.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=g,e[1]=m,e[2]=l.previewState,e[3]=r.lifecycle.phase,e[4]=f,e[5]=p):(f=e[4],p=e[5]);const u=p;if(u.kind==="sandbox-card"){const y=`/${i.slug}/settings/connections`;let j;return e[6]!==u.state||e[7]!==l.start||e[8]!==y||e[9]!==r.lifecycle||e[10]!==r.phase?(j=o.jsx(tc,{state:u.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:l.start,connectionsHref:y}),e[6]=u.state,e[7]=l.start,e[8]=y,e[9]=r.lifecycle,e[10]=r.phase,e[11]=j):j=e[11],j}if(!a||!n){let y;return e[12]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(jt,{title:"Waiting for sandbox context…"}),e[12]=y):y=e[12],y}if(_i(g)){let y;return e[13]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Ti,{}),e[13]=y):y=e[13],y}if(g.kind==="pending"){let y;return e[14]!==g?(y=o.jsx(Ai,{backend:g}),e[14]=g,e[15]=y):y=e[15],y}const b=f?null:l.previewUrl;let h;e[16]!==g||e[17]!==m||e[18]!==l.previewUrl||e[19]!==d?(h=g.kind==="protocol"&&g.source==="local"?yr(g):m?d:l.previewUrl,e[16]=g,e[17]=m,e[18]=l.previewUrl,e[19]=d,e[20]=h):h=e[20];let _;return e[21]!==n||e[22]!==s||e[23]!==u.devServerReady||e[24]!==u.sandboxWarming||e[25]!==i.slug||e[26]!==b||e[27]!==h||e[28]!==a?(_=o.jsx(yp,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:b,sitePreviewUrl:h,deepLinkPage:s,devServerReady:u.devServerReady,sandboxWarming:u.sandboxWarming}),e[21]=n,e[22]=s,e[23]=u.devServerReady,e[24]=u.sandboxWarming,e[25]=i.slug,e[26]=b,e[27]=h,e[28]=a,e[29]=_):_=e[29],_}const $o=2e3,bp=15;function Lo(t,e,s,n){return typeof e!="string"||s&&(fa(e,s,n)||t.state.dataUpdateCount>=bp)?!1:$o}function yp({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:l}){const c=_e(),d=Zs()?.taskId??null,m={orgSlug:t,virtualMcpId:e,branch:s,threadId:d,previewUrl:n},g=In(e,s),f=!aa(g),p=g.kind==="protocol"&&g.source==="github";hi(p);const u=Qi({orgSlug:t,virtualMcpId:e,branch:s}),b=Zi()===void 0,{data:h,isLoading:_}=vr(m,{fetchEnabled:r}),y=Ko({strict:!1}),[j,w]=L.useState(()=>hp(y.contentCollection,!f)??"pages"),N=ma(),v=gp(j,N,!f),{openPanel:E}=Yr(),S={open:x=>{if(x==="campaigns"){T(null),w("campaigns");return}E("experiments")}},[k,T]=L.useState(()=>y.contentItem&&(Pt(v)||v==="sections")?{collection:v,key:y.contentItem}:null),[B,O]=L.useState(()=>{const x=f?null:Zn(y);return x&&y.contentItem&&k?{blockKey:y.contentItem,focus:x,seq:1}:null}),D=k&&"key"in k?k.key:null;B&&B.blockKey!==D&&O(null);const[z,C]=L.useState(null),{data:A,isLoading:V,isFetching:U}=Pi(m,{fetchEnabled:r,refetchInterval:x=>{const $=x.state.data;if(v==="apps"&&k&&k.collection==="apps"){const Z=h?.[k.key];return Lo(x,typeof Z?.__resolveType=="string"?Z.__resolveType:void 0,$)}if(v==="site"&&h){const Z=$?io(h,$):null,te=h.site,je=Z?.resolveType??(typeof te?.__resolveType=="string"?te.__resolveType:void 0);return Lo(x,je,$,["seo"])}return!1}}),Q=!!(i?.pageId||i?.path||i?.pathTemplate),[Y,q]=L.useState(!1);if(Q&&!Y&&k===null&&h&&!V){q(!0);const x=Dr(ao(h,A),i??{});if(x){w("pages"),T({collection:"pages",key:x.key,path:x.path});const $=f?null:Zn(y);$&&O({blockKey:x.key,focus:$,seq:1})}}const[G,M]=L.useState(""),[K,J]=L.useState("list"),oe=x=>{T(x),C(null)},[ge,re]=L.useState(v);ge!==v&&(re(v),M(""));const le=(x,$)=>!fa(x,A,$)&&(V||U),{createTask:he}=Rn(),de=zn(e),be=Xl(e,A??void 0),se=sa(e).url,me=On("site_apps_install_enabled")&&be!==null&&!se,ae=A&&h?Gl(be?ya(be):[],A,h):[],ce=Yl({orgSlug:t,virtualMcpId:e,branch:s}),W=en(m),X=Mr(m),ee=Md({orgSlug:t,virtualMcpId:e,branch:s,decofile:h??{},onMoved:(x,$)=>T(Z=>Z?.collection==="posts"&&Z.key===x?{collection:"posts",key:$}:Z)}),[P,H]=L.useState(null),[ue,xe]=L.useState(),[Be,Pe]=L.useState(!1),[Re,Ae]=L.useState(),[Ce,Ee]=L.useState(null),[ie,Ne]=L.useState(null),Le=ie?.kind==="blog"?ps[ie.blogKind]:ie?.kind??"item",F=ie?.kind==="section"?c(Do("section",p,{neverPublished:u(ie.key)}),{label:ie.label}):ie?c(Do("block",p,{neverPublished:u(ie.key)}),{label:ie.label}):null,ye=c("sandbox.contentBrowser.deleteDialog.title",{noun:Le}),ke=xc(F===null?null:{title:ye,description:F},p),[Te,Ve]=L.useState(null),vs=!h||!A;if(_||V||b||vs&&l)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(Tt,{className:"size-5 text-muted-foreground"})});if(vs)return o.jsx(jt,{title:"Could not load site data."});if(kr(A))return o.jsx(er,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h});const lt=ao(h,A).sort((x,$)=>x.name.localeCompare($.name)),wt=Or(h).sort((x,$)=>x.from.localeCompare($.from)),Dt=Rr(h,A),Ot=v==="sections"?$r(A):[],ct=io(h,A),Ye=Na(h),Ct=Hn.some(x=>Ye[x].length>0),dn=Pt(v)?Ye[v]:[],Rt=eo(A,"loaders"),Je=eo(A,"actions"),$t=f?["settings","campaigns"]:["calendar","apps",...ct?[]:["site"],...Je===0?["actions"]:[],...hl(A)?[]:["settings"]];if(!Lr(h,A)&&!Ct&&Rt===0&&Je===0)return o.jsx(jt,{icon:fs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const dt={pages:lt.length,sections:Dt.length,apps:f?ae.length:0,loaders:Rt,actions:Je,redirects:wt.length,posts:Ye.posts.length,authors:Ye.authors.length,categories:Ye.categories.length},st=new Set(lt.map(x=>$s(x.path))),is=new Set(lt.map(x=>x.name)),ut=new Set(Dt.map(x=>x.name)),Lt=async x=>{const $=h[x.key];if(!$)return;const Z=ra(h,x.key),te=Kr(h,x.key,Math.max(0,Z-1)),je=Ir($.sections,te,A,!f);if(je)try{const we=await W.mutateAsync({blockKey:x.key,data:{...$,sections:je.sections}});ze(we)||fe.success(`Variant added to "${x.name}"`),T({collection:"pages",key:x.key,path:x.path})}catch(we){fe.error(we instanceof Error?we.message:"Could not add variant")}},pt=()=>{xe(void 0),H({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},mt=x=>{xe(void 0),H({mode:"duplicate",sourceKey:x.key,initialName:fo(is,x.name),initialPath:oc(st,x.path)})},Kt=x=>{xe(void 0),H({mode:"rename",sourceKey:x.key,initialName:x.name,initialPath:x.path})},It=async x=>{if(!P)return;const{mode:$,sourceKey:Z}=P;try{if($==="create"){let te;if(x.templateKey){const Ie=h[x.templateKey];if(!Ie)throw new Error("Selected template no longer exists.");te={...Ie,name:x.name,path:x.path}}else te=rc(x.name,x.path,f?void 0:A);const je=cc(h,x.name),we=await W.mutateAsync({blockKey:je,data:te});ze(we)||fe.success(`Created "${x.name}"`),T({collection:"pages",key:je,path:x.path})}else if($==="duplicate"&&Z){const te=h[Z];if(!te)throw new Error("Source page not found");const{key:je,data:we}=ic({source:te,pages:lt,newName:x.name,newPath:x.path}),Ie=await W.mutateAsync({blockKey:je,data:we});ze(Ie)||fe.success(`Duplicated as "${x.name}"`),T({collection:"pages",key:je,path:x.path})}else if($==="rename"&&Z){const te=h[Z];if(!te)throw new Error("Page not found");const je={...te,name:x.name,path:x.path},we=await W.mutateAsync({blockKey:Z,data:je});ze(we)||fe.success("Page updated"),k?.collection==="pages"&&k.key===Z&&T({collection:"pages",key:Z,path:x.path})}H(null)}catch(te){xe(te instanceof Error?te.message:"Save failed")}},ft=({path:x})=>{if(!P)return null;const $=$s(x);return(P.mode==="rename"?$s(P.initialPath):null)!==$&&st.has($)?`A page with path "${x}" already exists.`:null},Ft=async(x,$,Z)=>{const te=await W.mutateAsync({blockKey:$,data:{...Z,name:$,__resolveType:x},create:!0});ze(te)||fe.success(c("sandbox.contentBrowser.createdSection",{name:$})),T({collection:"sections",key:$})},gt=Mo((x,$)=>W.mutate({blockKey:x,data:$})),ht=async x=>{const $=h[x.key];if(!$){fe.error(c("sandbox.contentBrowser.sectionNotFound"));return}const Z=ac(h,x.key),te=fo(ut,x.name),je={...$,name:te};try{const we=await W.mutateAsync({blockKey:Z,data:je,create:!0});ze(we)||fe.success(c("sandbox.contentBrowser.duplicatedSection",{name:x.name})),T({collection:"sections",key:Z})}catch(we){fe.error(we instanceof Error?we.message:c("sandbox.contentBrowser.duplicateFailed"))}},zt=async x=>{if(!Ce)return;const $=h[Ce];if(!$){fe.error(c("sandbox.contentBrowser.sectionNotFound"));return}try{const Z=await W.mutateAsync({blockKey:Ce,data:{...$,name:x}});ze(Z)||fe.success(c("sandbox.contentBrowser.sectionRenamed")),Ee(null)}catch(Z){fe.error(Z instanceof Error?Z.message:c("sandbox.contentBrowser.renameFailed"))}},xt=()=>{Ae(void 0),Pe(!0)},bt=async x=>{const $=Fr(h,x.from),Z=zr(x);try{const te=await W.mutateAsync({blockKey:$,data:Z});ze(te)||fe.success("Created redirect"),Pe(!1),T({collection:"redirects",key:$})}catch(te){Ae(te instanceof Error?te.message:"Could not create redirect")}},yt=async x=>{const $=Sn(h,x),Z=es($,x,Ra(x));try{const te=await W.mutateAsync({blockKey:$,data:Z});ze(te)||fe.success(`Created ${ps[x]}`),T({collection:x,key:$})}catch(te){fe.error(te instanceof Error?te.message:"Could not create")}},vt=async x=>{const $=Sn(h,"posts"),Z=es($,"posts",Kd(x));try{const te=await W.mutateAsync({blockKey:$,data:Z});ze(te)||fe.success(c("sandbox.postCalendar.createdScheduledPost")),w("posts"),re("posts"),T({collection:"posts",key:$}),C(null)}catch(te){fe.error(te instanceof Error?te.message:c("sandbox.postCalendar.couldNotCreate"))}},kt=async(x,$)=>{const Z=h[x],te=Z?Fd(At(Z,"posts"),$):null;if(!te){fe.error(c("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await W.mutateAsync({blockKey:x,data:es(x,"posts",te)})}catch(je){fe.error(je instanceof Error?je.message:c("sandbox.postCalendar.couldNotReschedule"))}},St=async x=>{const $=h[x.key];if(!$){fe.error("Record not found.");return}const Z=Sn(h,x.kind),te=x.kind==="posts"?"title":"name",je={...structuredClone(At($,x.kind)),[te]:`${x.label} (copy)`};if(x.kind==="categories"){const we=Ye.categories.map(Ie=>Ie.slug??"").filter(Boolean);je.slug=$d(String(je.slug??""),we)}try{const we=await W.mutateAsync({blockKey:Z,data:es(Z,x.kind,je)});ze(we)||fe.success(`Duplicated "${x.label}"`),T({collection:x.kind,key:Z})}catch(we){fe.error(we instanceof Error?we.message:"Duplicate failed")}},Mt=()=>{w("posts"),re("posts"),T(null),C(null),M("")},Vt=async()=>{if(!ie)return;let x;try{const{kind:$,key:Z,label:te}=ie;if($==="blog"){if(ie.blogKind==="categories"){const je=At(h[Z],"categories").slug,we=typeof je=="string"?je:"";if(we)for(const{key:Ie,payload:nt}of Oa(h)){const ot=Wc(nt,we);ot!==nt&&await W.mutateAsync({blockKey:Ie,data:Gc(Ie,Xc(ot))})}}x=await X.mutateAsync({blockKey:Z})}else x=await X.mutateAsync({blockKey:Z});if(Ne(null),ze(x))return;fe.success(`Deleted "${te}"`),k&&k.collection!=="available-section"&&k.key===Z&&T(null),Ne(null)}catch($){fe.error($ instanceof Error?$.message:"Delete failed")}},qe=X.isPending||W.isPending;return o.jsx(tr,{value:!f,children:o.jsxs("div",{className:"flex h-full w-full",children:[o.jsx(Zl,{active:v,counts:dt,hidden:$t,showBlog:Ct,showContext:N,onSelect:x=>{w(x),T(null),C(null)}}),v!=="seo"&&v!=="site"&&v!=="settings"&&v!=="context"&&v!=="calendar"&&v!=="campaigns"&&v!=="post-schedule"&&v!=="posts"&&v!=="loaders"&&v!=="actions"&&o.jsx(vp,{activeCollection:v,pages:lt,redirects:wt,sections:Dt,availableSections:Ot,appCatalog:ae,canInstallApps:me,installingAppId:ce.isPending?ce.variables?.blockKey??null:null,onInstallApp:x=>{if(de.resolved){if(de.runtime==="cms"){fe.error(c("sandbox.appEditor.installNeedsCodingSession"),{action:{label:c("chat.fastPreview.startCodingSession"),onClick:()=>he({runtime:"sandbox"})}});return}ce.mutate({blockKey:x.id},{onSuccess:$=>oe({collection:"apps",key:$.key}),onError:$=>fe.error($.message)})}},blogEntries:dn,decofile:h,searchQuery:G,onSearchChange:M,selection:k,onSelect:oe,onCreate:()=>{v==="pages"?pt():v==="redirects"?xt():Pt(v)&&yt(v)},onDuplicatePage:mt,onRenamePage:Kt,onAddPageVariant:Lt,onDeletePage:x=>Ne({kind:"page",key:x.key,label:x.name}),onEditPageSeo:x=>{const $={collection:"pages",key:x.key,path:x.path};T($),C(x.key)},onViewPageJson:x=>Ve(x.key),onDuplicateSection:ht,onRenameSection:x=>Ee(x.key),onDeleteSection:x=>Ne({kind:"section",key:x.key,label:x.name}),onDeleteRedirect:x=>Ne({kind:"redirect",key:x.key,label:x.from||x.key}),onDuplicateBlog:St,onDeleteBlog:x=>Ne({kind:"blog",blogKind:x.kind,key:x.key,label:x.label})}),o.jsx("div",{className:"flex-1 min-w-0",children:v==="loaders"||v==="actions"?o.jsx(Iu,{orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:A,decofile:h,kind:v}):o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(Tt,{className:"size-5 text-muted-foreground"})}),children:v==="calendar"?o.jsx(up,{decofile:h}):v==="campaigns"?o.jsx(pp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A,onOpenUse:x=>{O($=>({blockKey:x.blockKey,focus:x.focus??{},seq:($?.seq??0)+1})),x.blockKind==="page"&&x.path!==void 0?(w("pages"),oe({collection:"pages",key:x.blockKey,path:x.path})):(w("sections"),oe({collection:"sections",key:x.blockKey}))}}):v==="post-schedule"?o.jsx(mp,{decofile:h,isCreating:W.isPending,onCreate:x=>{vt(x)},onReschedule:(x,$)=>{kt(x,$)},onSelect:x=>{w("posts"),re("posts"),T({collection:"posts",key:x}),C(null)}}):v==="site"?ct?o.jsx(Ro,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:ct.key,block:h[ct.key],decofile:h,meta:A,title:"Site",excludeFields:["seo"],schemaPending:le(ct.resolveType,["seo"]),previewBaseUrl:n},`site:${ct.key}`):o.jsx(jt,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):v==="settings"?o.jsx(op,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A}):v==="context"?o.jsx(rp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A}):v==="seo"?o.jsx(dp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A,target:{kind:"site"},previewBaseUrl:a}):v==="sections"?o.jsx(Zu,{selection:k?.collection==="sections"||k?.collection==="available-section"?k:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:A,decofile:h,isCreating:W.isPending,onCreateAvailable:Ft,onSaveReferencedBlock:gt}):v==="posts"?o.jsx(Cu,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,view:K,selectedKey:k?.collection==="posts"?k.key:null,onViewChange:x=>{J(x),T(null)},onClose:()=>T(null),onOpen:x=>{T({collection:"posts",key:x}),C(null)},move:ee,meta:A,renderDetail:(x,$)=>o.jsx(ap,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:x,block:h[x],decofile:h,meta:A,previewBaseUrl:a,move:ee,onClose:$?.onClose,expanded:$?.expanded,onToggleExpand:$?.onToggleExpand},`post:${ms(x)}`)}):k&&k.collection!=="available-section"?k.collection==="apps"?o.jsx(Ro,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:k.key,block:h[k.key],decofile:h,meta:A,previewBaseUrl:n,schemaPending:le(typeof h[k.key]?.__resolveType=="string"?String(h[k.key].__resolveType):void 0)},`app:${k.key}`):k.collection==="categories"?o.jsx(lp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:k.key,block:h[k.key],decofile:h,meta:A,onManagePosts:()=>Mt(),onOpenPost:x=>{w("posts"),re("posts"),T({collection:"posts",key:x}),C(null)},previewBaseUrl:a},`category:${k.key}`):k.collection==="authors"?o.jsx(ip,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:k.key,block:h[k.key],meta:A,decofile:h},`authors:${k.key}`):k.collection==="redirects"?o.jsx(fp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:k.key,block:h[k.key]},`redirect:${k.key}`):o.jsx(Ei,{value:S,children:o.jsx(cp,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:k.collection==="pages"?k.path:"/",activePageBlockKey:k.collection==="pages"?k.key:null,activeGlobalBlockKey:k.collection==="sections"?k.key:null,initialEditSeo:k.collection==="pages"&&z===k.key,onExitSeo:()=>C(null),focusVariant:B?.blockKey===k.key?{...B.focus,seq:B.seq}:null,onSelectRoot:()=>{T(null),C(null)}},k.collection==="pages"?`page:${k.key}`:`section:${k.key}`)}):o.jsx(jt,{title:`Select ${Pt(v)?`a ${ps[v]}`:v==="pages"?"a page":v==="apps"?"an app":v==="redirects"?"a redirect":"a section"} to edit`,description:v==="apps"?"Browse all apps and select an installed one to edit its settings.":'Pick an item from the list, or click "+" to create one.'})})}),P&&o.jsx(mc,{open:!!P,mode:P.mode,initialName:P.initialName,initialPath:P.initialPath,isPending:W.isPending,error:ue,templates:lt,validate:ft,onSubmit:It,onOpenChange:x=>{x||(H(null),xe(void 0))}}),o.jsx(gc,{open:Be,isPending:W.isPending,error:Re,onSubmit:bt,onOpenChange:x=>{x||(Pe(!1),Ae(void 0))}}),Ce&&o.jsx(hc,{open:!!Ce,blockKey:Ce,initialName:Dt.find(x=>x.key===Ce)?.name??Ce,isPending:W.isPending,onSubmit:zt,onOpenChange:x=>{x||Ee(null)}}),Te&&o.jsx(Vr,{open:!!Te,onOpenChange:x=>{x||Ve(null)},pageKey:Te,decofile:h,params:m}),o.jsx(xi,{open:!!ie,onOpenChange:x=>{!x&&!qe&&Ne(null)},children:o.jsxs(bi,{children:[o.jsxs(yi,{children:[o.jsx(vi,{children:ke?.title??ye}),o.jsx(ki,{children:ke?.description??null})]}),o.jsxs(Si,{children:[o.jsx(ji,{disabled:qe,children:c("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(wi,{onClick:x=>{x.preventDefault(),Vt()},disabled:qe,className:ve(Ci({variant:"destructive"})),children:qe?o.jsxs(o.Fragment,{children:[o.jsx(Tt,{className:"size-3.5"}),c("sandbox.contentBrowser.deleteDialog.deleting")]}):c("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function vp(t){const e=pe.c(60),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:l,canInstallApps:c,installingAppId:d,onInstallApp:m,blogEntries:g,decofile:f,searchQuery:p,onSearchChange:u,selection:b,onSelect:h,onCreate:_,onDuplicatePage:y,onRenamePage:j,onAddPageVariant:w,onDeletePage:N,onEditPageSeo:v,onViewPageJson:E,onDuplicateSection:S,onRenameSection:k,onDeleteSection:T,onDeleteRedirect:B,onDuplicateBlog:O,onDeleteBlog:D}=t,z=_e();let C,A,V,U,Q,Y;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==g||e[4]!==c||e[5]!==f||e[6]!==d||e[7]!==w||e[8]!==_||e[9]!==D||e[10]!==N||e[11]!==B||e[12]!==T||e[13]!==O||e[14]!==y||e[15]!==S||e[16]!==v||e[17]!==m||e[18]!==j||e[19]!==k||e[20]!==u||e[21]!==h||e[22]!==E||e[23]!==n||e[24]!==a||e[25]!==p||e[26]!==i||e[27]!==b||e[28]!==z){const K=p.toLowerCase(),J=n.filter(P=>!K||P.name.toLowerCase().includes(K)||P.path.toLowerCase().includes(K)),oe=a.filter(P=>!K||P.from.toLowerCase().includes(K)||P.to.toLowerCase().includes(K)),ge=i.filter(P=>!K||P.name.toLowerCase().includes(K)||P.key.toLowerCase().includes(K)||P.resolveType.toLowerCase().includes(K)),re=r.filter(P=>!K||P.title.toLowerCase().includes(K)||P.resolveType.toLowerCase().includes(K)||(P.description?.toLowerCase().includes(K)??!1)),le=np(ge),he=l.filter(P=>!K||P.title.toLowerCase().includes(K)||P.app.toLowerCase().includes(K)||P.vendor.toLowerCase().includes(K)||P.category.toLowerCase().includes(K)),de=g.filter(P=>!K||P.label.toLowerCase().includes(K)||P.subtitle.toLowerCase().includes(K)),be=s==="categories"&&!K?tp(de):de.map(Sp),se=`Search ${s}…`,me=Pt(s)?`Create new ${ps[s]}`:s==="redirects"?"Create new redirect":"Create new page",ae=s!=="apps"&&s!=="sections";Q="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let ce;e[35]===Symbol.for("react.memo_cache_sentinel")?(ce=o.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[35]=ce):ce=e[35];let W;e[36]!==u?(W=P=>u(P.target.value),e[36]=u,e[37]=W):W=e[37];let X;e[38]!==se||e[39]!==p||e[40]!==W?(X=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[ce,o.jsx("input",{type:"text",value:p,onChange:W,placeholder:se,"aria-label":se,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[38]=se,e[39]=p,e[40]=W,e[41]=X):X=e[41];let ee;e[42]!==me||e[43]!==_||e[44]!==ae?(ee=ae&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{variant:"ghost",size:"icon",onClick:_,"aria-label":me,children:o.jsx(Kn,{size:14})})}),o.jsx(et,{side:"bottom",children:me})]}),e[42]=me,e[43]=_,e[44]=ae,e[45]=ee):ee=e[45],e[46]!==X||e[47]!==ee?(Y=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[X,ee]}),e[46]=X,e[47]=ee,e[48]=Y):Y=e[48],C=tn,U="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",A="flex flex-col gap-1 p-1.5",V=s==="pages"?J.length===0?o.jsx(ls,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):J.map(P=>{const H=b?.collection==="pages"&&b.key===P.key,ue=ra(f,P.key);return o.jsx(Qe,{icon:Jo,title:P.name,subtitle:P.path,active:H,variantCount:ue,onClick:()=>h({collection:"pages",key:P.key,path:P.path}),menu:o.jsx(Rs,{onDuplicate:()=>y(P),onRename:()=>j(P),onAddVariant:()=>w(P),onEditSeo:()=>v(P),onViewJson:()=>E(P),onDelete:()=>N(P)})},P.key)}):s==="sections"?ge.length===0&&re.length===0?o.jsx(ls,{hasItems:i.length>0||r.length>0,emptyLabel:"No sections yet.",emptyHint:"Save a section from a page, or start the preview dev server."}):o.jsxs(o.Fragment,{children:[le.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Oo,{icon:Vs,label:"Saved sections"}),le.map(P=>o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("div",{className:"px-2.5 pt-1 pb-0.5 text-2xs font-medium text-muted-foreground/60",children:P.label}),P.sections.map(H=>{const ue=b?.collection==="sections"&&b.key===H.key;return o.jsx(Qe,{icon:Vs,accent:"global",title:H.name,subtitle:P.label,active:ue,onClick:()=>h({collection:"sections",key:H.key}),menu:o.jsx(Rs,{onDuplicate:()=>S(H),onRename:()=>k(H),onDelete:()=>T(H)})},H.key)})]},P.label))]}),re.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Oo,{icon:oo,label:"Available sections",className:ve(le.length>0&&"mt-3")}),re.map(P=>{const H=b?.collection==="available-section"&&b.resolveType===P.resolveType,ue=P.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(Qe,{icon:oo,title:P.title,subtitle:ue??P.resolveType,active:H,onClick:()=>h({collection:"available-section",resolveType:P.resolveType,title:P.title})},P.resolveType)})]})]}):s==="apps"?he.length===0?o.jsx(ls,{hasItems:l.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):he.map(P=>{const H=b?.collection==="apps"&&P.blockKey!==null&&b.key===P.blockKey,ue=d===P.id;return o.jsx(Qe,{icon:ea,logoUrl:P.logo,title:P.title,subtitle:P.category,active:H,trailing:P.installed?o.jsx("span",{className:"shrink-0 rounded-full bg-success/15 px-1.5 py-0.5 text-2xs font-medium text-success",children:"Installed"}):ue?o.jsx(Tt,{className:"size-3.5 shrink-0 text-muted-foreground"}):P.installable&&c?o.jsx("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:"Install"}):void 0,onClick:()=>{if(P.installed&&P.blockKey){h({collection:"apps",key:P.blockKey});return}if(!P.installable||!c){fe.message(`${P.title} is not installed on this site.`);return}d===null&&m(P)}},P.id)}):s==="redirects"?oe.length===0?o.jsx(ls,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):oe.map(P=>o.jsx(Qe,{icon:Go,title:P.from||"(no source)",subtitle:`→ ${P.to||"(no target)"}`,active:b?.collection==="redirects"&&b.key===P.key,trailing:o.jsx(bc,{redirect:P}),onClick:()=>h({collection:"redirects",key:P.key}),menu:o.jsx(Rs,{onDelete:()=>B(P)})},P.key)):de.length===0?o.jsx(ls,{hasItems:g.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${Pt(s)?ps[s]:"item"}.`}):be.map(P=>{const{entry:H,depth:ue}=P,xe=b?.collection===H.kind&&b.key===H.key;return o.jsx("div",{style:{paddingLeft:ue*16},children:o.jsx(Qe,{icon:H.kind==="posts"?Qo:H.kind==="authors"?ta:Ho,title:H.label,invalid:H.missing.length>0,invalidReason:H.missing.length>0?z("sandbox.itemRow.missingFields",{fields:Fc(H.missing,z)}):void 0,warning:H.duplicateName,warningReason:z("sandbox.itemRow.duplicateName"),subtitle:ue>0?ai(H.slug??"",de).map(kp).join(" / "):H.subtitle,active:xe,onClick:()=>h({collection:H.kind,key:H.key}),menu:o.jsx(Rs,{onDuplicate:()=>O(H),onDelete:()=>D(H)})})},H.key)}),e[0]=s,e[1]=l,e[2]=r,e[3]=g,e[4]=c,e[5]=f,e[6]=d,e[7]=w,e[8]=_,e[9]=D,e[10]=N,e[11]=B,e[12]=T,e[13]=O,e[14]=y,e[15]=S,e[16]=v,e[17]=m,e[18]=j,e[19]=k,e[20]=u,e[21]=h,e[22]=E,e[23]=n,e[24]=a,e[25]=p,e[26]=i,e[27]=b,e[28]=z,e[29]=C,e[30]=A,e[31]=V,e[32]=U,e[33]=Q,e[34]=Y}else C=e[29],A=e[30],V=e[31],U=e[32],Q=e[33],Y=e[34];let q;e[49]!==A||e[50]!==V?(q=o.jsx("div",{className:A,children:V}),e[49]=A,e[50]=V,e[51]=q):q=e[51];let G;e[52]!==C||e[53]!==U||e[54]!==q?(G=o.jsx(C,{className:U,children:q}),e[52]=C,e[53]=U,e[54]=q,e[55]=G):G=e[55];let M;return e[56]!==Q||e[57]!==Y||e[58]!==G?(M=o.jsxs("div",{className:Q,children:[Y,G]}),e[56]=Q,e[57]=Y,e[58]=G,e[59]=M):M=e[59],M}function kp(t){return t.slug}function Sp(t){return{entry:t,depth:0}}function Zm(t){const e=pe.c(25),{virtualMcpId:s}=t,n=_e(),[a,i]=L.useState(!1),r=ca(s),{connection:l}=Sr(s),{activeTask:c}=Rn();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const m=Ko(d);if(!(lo(r?.metadata)||lo(c?.metadata))&&!l){let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(co,{className:"size-7 text-foreground"})}),e[1]=p):p=e[1];let u;e[2]!==n?(u=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=u):u=e[3];let b;e[4]!==n?(b=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=b):b=e[5];let h,_;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=()=>i(!0),_=o.jsx(co,{className:"size-4"}),e[6]=h,e[7]=_):(h=e[6],_=e[7]);let y;e[8]!==n?(y=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=y):y=e[9];let j;e[10]!==y?(j=o.jsxs(Oe,{onClick:h,children:[_,y]}),e[10]=y,e[11]=j):j=e[11];let w;e[12]!==u||e[13]!==b||e[14]!==j?(w=o.jsx(pl,{className:"h-full",image:p,title:u,description:b,actions:j}),e[12]=u,e[13]=b,e[14]=j,e[15]=w):w=e[15];let N;e[16]!==a?(N=o.jsx(ml,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=N):N=e[17];let v;return e[18]!==N||e[19]!==w?(v=o.jsxs(o.Fragment,{children:[w,N]}),e[18]=N,e[19]=w,e[20]=v):v=e[20],v}let f;return e[21]!==m.contentPageId||e[22]!==m.contentPath||e[23]!==m.contentPathTemplate?(f=o.jsx(sr,{children:o.jsx(xp,{deepLinkPage:{pageId:m.contentPageId,path:m.contentPath,pathTemplate:m.contentPathTemplate}})}),e[21]=m.contentPageId,e[22]=m.contentPath,e[23]=m.contentPathTemplate,e[24]=f):f=e[24],f}export{kc as $,Hm as A,Wm as B,Zm as C,Sm as D,Gm as E,qm as F,Ac as G,ed as H,Vd as I,sd as J,Xm as K,Ja as L,La as M,Ca as N,es as O,Yn as P,$m as Q,Ym as R,md as S,id as T,Lm as U,Om as V,on as W,dd as X,pd as Y,yc as Z,vc as _,km as a,wo as a0,Sc as a1,Me as a2,jc as a3,Bm as a4,Em as a5,Dm as a6,Rm as a7,nd as a8,od as a9,Nm as aA,Um as aB,Ws as aC,fd as aa,_m as ab,hd as ac,qn as ad,Am as ae,Ka as af,Ia as ag,Ue as ah,Im as ai,Pm as aj,Ys as ak,Tm as al,Km as am,hs as an,Pn as ao,qs as ap,Fm as aq,zm as ar,Hc as as,Jm as at,tp as au,oi as av,qc as aw,$d as ax,Oa as ay,Cm as az,uo as b,rn as c,Gc as d,We as e,wm as f,At as g,Mm as h,Fc as i,Do as j,jm as k,Ta as l,an as m,ac as n,Xe as o,as as p,Ya as q,gl as r,Xc as s,Wa as t,ma as u,Vm as v,Js as w,Na as x,Qm as y,Fa as z};
22
+ `),style:n.ordered?"ordered":"unordered"});break;case"quote":s.push({__resolveType:a,quote:n.text});break;case"divider":s.push({__resolveType:a});break;case"image":s.push({__resolveType:a,url:n.url,alt:n.alt,caption:n.caption,size:"normal"});break}}return s}function pu({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?Wa(a,s):Ya(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const No="__all__",_o={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},mu={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},Po="status:";function To(t){if(!t.startsWith(Po))return null;const e=t.slice(Po.length);return Yn.includes(e)?e:null}const Ao=L.forwardRef(function(e,s){const n=pe.c(20);let a,i,r,l,c;n[0]!==e?({icon:a,active:i,value:c,className:r,...l}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=l,n[5]=c):(a=n[1],i=n[2],r=n[3],l=n[4],c=n[5]);const d=i?"text-foreground":"text-muted-foreground";let m;n[6]!==r||n[7]!==d?(m=ve("gap-1 px-1.5 text-xs",d,r),n[6]=r,n[7]=d,n[8]=m):m=n[8];let g;n[9]!==a?(g=o.jsx(a,{size:14,className:"shrink-0"}),n[9]=a,n[10]=g):g=n[10];let f;n[11]!==c?(f=c&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),n[11]=c,n[12]=f):f=n[12];let p;n[13]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(gs,{size:12,className:"shrink-0 opacity-60"}),n[13]=p):p=n[13];let u;return n[14]!==l||n[15]!==s||n[16]!==m||n[17]!==g||n[18]!==f?(u=o.jsxs(Oe,{ref:s,type:"button",variant:"ghost",size:"sm",className:m,...l,children:[g,f,p]}),n[14]=l,n[15]=s,n[16]=m,n[17]=g,n[18]=f,n[19]=u):u=n[19],u});function Jn(t){const e=pe.c(2),{count:s}=t;let n;return e[0]!==s?(n=o.jsx("span",{className:"ml-auto pl-3 text-xs text-muted-foreground tabular-nums",children:s}),e[0]=s,e[1]=n):n=e[1],n}function fu(t){const e=pe.c(19),{value:s,onChange:n}=t,a=_e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=f=>n(f.target.value),e[1]=n,e[2]=r):r=e[2];let l;e[3]!==a?(l=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=l):l=e[4];let c;e[5]!==a?(c=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=c):c=e[6];let d;e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==s?(d=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:l,"aria-label":c,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=l,e[9]=c,e[10]=s,e[11]=d):d=e[11];let m;e[12]!==n||e[13]!==a||e[14]!==s?(m=s&&o.jsx(ti,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=m):m=e[15];let g;return e[16]!==d||e[17]!==m?(g=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,d,m]}),e[16]=d,e[17]=m,e[18]=g):g=e[18],g}function gu(t){const e=pe.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:l,sort:c,onCategoryFilterChange:d,onAuthorFilterChange:m,onStatusFilterChange:g,onSortChange:f}=t,p=_e();let u;if(e[0]!==s||e[1]!==i){let X;e[3]!==i?(X=ee=>ee.slug===i,e[3]=i,e[4]=X):X=e[4],u=s.find(X),e[0]=s,e[1]=i,e[2]=u}else u=e[2];const b=u;let h;if(e[5]!==r||e[6]!==n){let X;e[8]!==r?(X=ee=>ee.email===r,e[8]=r,e[9]=X):X=e[9],h=n.find(X),e[5]=r,e[6]=n,e[7]=h}else h=e[7];const _=h,y=!!(i||r||l);let j;e[10]!==_?.name||e[11]!==b?.name||e[12]!==l||e[13]!==p?(j=b?.name??_?.name??p(l?Js[l]:"sandbox.postToolbar.filterLabel"),e[10]=_?.name,e[11]=b?.name,e[12]=l,e[13]=p,e[14]=j):j=e[14];const w=j,N=i?`cat:${i}`:r?`author:${r}`:l?`status:${l}`:No;let v;e[15]!==m||e[16]!==d||e[17]!==g?(v=()=>{d(null),m(null),g(null)},e[15]=m,e[16]=d,e[17]=g,e[18]=v):v=e[18];const E=v;let S;e[19]!==E||e[20]!==m||e[21]!==d||e[22]!==g?(S=X=>{X.startsWith("cat:")?(m(null),g(null),d(X.slice(4))):X.startsWith("author:")?(d(null),g(null),m(X.slice(7))):To(X)?(d(null),m(null),g(To(X))):E()},e[19]=E,e[20]=m,e[21]=d,e[22]=g,e[23]=S):S=e[23];const k=S;let T;e[24]!==w||e[25]!==y?(T=o.jsx(Is,{asChild:!0,children:o.jsx(Ao,{icon:ar,active:y,value:w,className:"min-w-0 shrink"})}),e[24]=w,e[25]=y,e[26]=T):T=e[26];let B;e[27]!==p?(B=p("sandbox.postToolbar.filterBy"),e[27]=p,e[28]=B):B=e[28];let O;e[29]!==B?(O=o.jsx(rs,{children:B}),e[29]=B,e[30]=O):O=e[30];let D;e[31]!==p?(D=p("sandbox.postToolbar.allPosts"),e[31]=p,e[32]=D):D=e[32];let z;e[33]!==D?(z=o.jsx(us,{value:No,children:D}),e[33]=D,e[34]=z):z=e[34];let C;e[35]!==p?(C=p("sandbox.postToolbar.statusLabel"),e[35]=p,e[36]=C):C=e[36];let A;e[37]!==C?(A=o.jsx(rs,{className:"text-muted-foreground/70",children:C}),e[37]=C,e[38]=A):A=e[38];let V;e[39]!==a||e[40]!==p?(V=Yn.map(X=>o.jsxs(us,{value:`status:${X}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:p(Js[X])}),o.jsx(Jn,{count:a[X]??0})]},`status:${X}`)),e[39]=a,e[40]=p,e[41]=V):V=e[41];let U;e[42]!==s.length||e[43]!==p?(U=s.length>0&&o.jsx(rs,{className:"text-muted-foreground/70",children:p("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=p,e[44]=U):U=e[44];let Q;e[45]!==s?(Q=s.map(xu),e[45]=s,e[46]=Q):Q=e[46];let Y;e[47]!==n.length||e[48]!==p?(Y=n.length>0&&o.jsx(rs,{className:"text-muted-foreground/70",children:p("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=p,e[49]=Y):Y=e[49];let q;e[50]!==n?(q=n.map(hu),e[50]=n,e[51]=q):q=e[51];let G;e[52]!==N||e[53]!==k||e[54]!==z||e[55]!==A||e[56]!==V||e[57]!==U||e[58]!==Q||e[59]!==Y||e[60]!==q?(G=o.jsxs(Qn,{value:N,onValueChange:k,children:[z,A,V,U,Q,Y,q]}),e[52]=N,e[53]=k,e[54]=z,e[55]=A,e[56]=V,e[57]=U,e[58]=Q,e[59]=Y,e[60]=q,e[61]=G):G=e[61];let M;e[62]!==G||e[63]!==O?(M=o.jsxs(Fs,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[O,G]}),e[62]=G,e[63]=O,e[64]=M):M=e[64];let K;e[65]!==M||e[66]!==T?(K=o.jsxs(zs,{children:[T,M]}),e[65]=M,e[66]=T,e[67]=K):K=e[67];let J;e[68]!==E||e[69]!==y||e[70]!==p?(J=y&&o.jsx(ti,{label:p("sandbox.postToolbar.clearFilter"),onClick:E}),e[68]=E,e[69]=y,e[70]=p,e[71]=J):J=e[71];const oe=mu[c];let ge;e[72]!==p||e[73]!==oe?(ge=p(oe),e[72]=p,e[73]=oe,e[74]=ge):ge=e[74];let re;e[75]!==ge?(re=o.jsx(Is,{asChild:!0,children:o.jsx(Ao,{icon:ir,active:!0,value:ge})}),e[75]=ge,e[76]=re):re=e[76];let le;e[77]!==p?(le=p("sandbox.postToolbar.sortBy"),e[77]=p,e[78]=le):le=e[78];let he;e[79]!==le?(he=o.jsx(rs,{children:le}),e[79]=le,e[80]=he):he=e[80];let de;e[81]!==f?(de=X=>f(X),e[81]=f,e[82]=de):de=e[82];let be;e[83]===Symbol.for("react.memo_cache_sentinel")?(be=Object.keys(_o),e[83]=be):be=e[83];let se;e[84]!==p?(se=be.map(X=>o.jsx(us,{value:X,children:p(_o[X])},X)),e[84]=p,e[85]=se):se=e[85];let me;e[86]!==c||e[87]!==de||e[88]!==se?(me=o.jsx(Qn,{value:c,onValueChange:de,children:se}),e[86]=c,e[87]=de,e[88]=se,e[89]=me):me=e[89];let ae;e[90]!==he||e[91]!==me?(ae=o.jsxs(Fs,{align:"end",className:"w-44",children:[he,me]}),e[90]=he,e[91]=me,e[92]=ae):ae=e[92];let ce;e[93]!==re||e[94]!==ae?(ce=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(zs,{children:[re,ae]})}),e[93]=re,e[94]=ae,e[95]=ce):ce=e[95];let W;return e[96]!==K||e[97]!==J||e[98]!==ce?(W=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[K,J,ce]}),e[96]=K,e[97]=J,e[98]=ce,e[99]=W):W=e[99],W}function hu(t){return o.jsxs(us,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Jn,{count:t.count})]},`author:${t.email}`)}function xu(t){return o.jsxs(us,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Jn,{count:t.count})]},`cat:${t.slug}`)}function ti(t){const e=pe.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Bn,{size:12}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx("button",{type:"button","aria-label":s,onClick:n,className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer rounded-lg",children:a}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function bu(t){const e=pe.c(18),{checked:s,disabled:n,onToggle:a}=t,i=_e();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==s||e[3]!==i?(l=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==l?(c=o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:yu,children:o.jsx(sn,{checked:s,disabled:n,onCheckedChange:r,"aria-label":l})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=l,e[9]=c):c=e[9];let d;e[10]!==s||e[11]!==i?(d=i(s?"sandbox.postToolbar.deselectAll":"sandbox.postToolbar.selectAll"),e[10]=s,e[11]=i,e[12]=d):d=e[12];let m;e[13]!==d?(m=o.jsx(et,{side:"bottom",children:d}),e[13]=d,e[14]=m):m=e[14];let g;return e[15]!==c||e[16]!==m?(g=o.jsxs(tt,{children:[c,m]}),e[15]=c,e[16]=m,e[17]=g):g=e[17],g}function yu(t){return t.stopPropagation()}function vu(t){const e=pe.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,l=_e();let c;e[0]!==n||e[1]!==a?(c=o.jsx(bu,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=c):c=e[2];let d;e[3]!==s||e[4]!==l?(d=l("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=l,e[5]=d):d=e[5];let m;e[6]!==d?(m=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:d}),e[6]=d,e[7]=m):m=e[7];const g=s===0;let f;e[8]!==l?(f=l("sandbox.postToolbar.archiveSelectedPosts"),e[8]=l,e[9]=f):f=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(ui,{size:14}),e[10]=p):p=e[10];let u;e[11]!==i||e[12]!==g||e[13]!==f?(u=o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",disabled:g,onClick:i,"aria-label":f,children:p})}),e[11]=i,e[12]=g,e[13]=f,e[14]=u):u=e[14];let b;e[15]!==l?(b=l("sandbox.postToolbar.archiveSelected"),e[15]=l,e[16]=b):b=e[16];let h;e[17]!==b?(h=o.jsx(et,{side:"bottom",children:b}),e[17]=b,e[18]=h):h=e[18];let _;e[19]!==u||e[20]!==h?(_=o.jsxs(tt,{children:[u,h]}),e[19]=u,e[20]=h,e[21]=_):_=e[21];let y;e[22]!==l?(y=l("sandbox.postToolbar.exitSelection"),e[22]=l,e[23]=y):y=e[23];let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(Bn,{size:14}),e[24]=j):j=e[24];let w;e[25]!==r||e[26]!==y?(w=o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":y,children:j})}),e[25]=r,e[26]=y,e[27]=w):w=e[27];let N;e[28]!==l?(N=l("sandbox.postToolbar.exitSelection"),e[28]=l,e[29]=N):N=e[29];let v;e[30]!==N?(v=o.jsx(et,{side:"bottom",children:N}),e[30]=N,e[31]=v):v=e[31];let E;e[32]!==w||e[33]!==v?(E=o.jsxs(tt,{children:[w,v]}),e[32]=w,e[33]=v,e[34]=E):E=e[34];let S;e[35]!==_||e[36]!==E?(S=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[_,E]}),e[35]=_,e[36]=E,e[37]=S):S=e[37];let k;return e[38]!==c||e[39]!==S||e[40]!==m?(k=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[c,m,S]}),e[38]=c,e[39]=S,e[40]=m,e[41]=k):k=e[41],k}const ku={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},An="generating",Su=[An,...Yn.filter(t=>t!==An)],Eo=t=>t.scheduledDatetime||t.date||"",ju=(t,e)=>Eo(e).localeCompare(Eo(t)),wu=t=>t==="scheduled"||t==="published",si="application/x-post-key";function Cu(t){const e=pe.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:l,onViewChange:c,onOpen:d,onClose:m,move:g,meta:f,renderDetail:p}=t,u=_e();let b;e[0]!==a||e[1]!==s||e[2]!==n?(b={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=b):b=e[3];const h=en(b),_=cl().length>0,y=ma(),j=Ja(),[w,N]=L.useState(null),[v,E]=L.useState(!1),[S,k]=L.useState(!1),[T,B]=L.useState(!1),[O,D]=L.useState(""),z=L.useRef(null);let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C={},e[4]=C):C=e[4];const[A,V]=L.useState(C);let U;e[5]!==A?(U=(I,ne)=>A[I]??ne,e[5]=A,e[6]=U):U=e[6];const Q=U;let Y;e[7]===Symbol.for("react.memo_cache_sentinel")?(Y=(I,ne)=>V(De=>({...De,[I]:ne})),e[7]=Y):Y=e[7];const q=Y;let G;e[8]!==d?(G=I=>{const ne=I[0];ne&&d(ne)},e[8]=d,e[9]=G):G=e[9];let M;e[10]!==a||e[11]!==i||e[12]!==f||e[13]!==s||e[14]!==G||e[15]!==n?(M={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:f,onStarted:G},e[10]=a,e[11]=i,e[12]=f,e[13]=s,e[14]=G,e[15]=n,e[16]=M):M=e[16];const K=Jd(M),J=Hc(i);let oe;e[17]!==i?(oe=I=>At(i[I],"posts"),e[17]=i,e[18]=oe):oe=e[18];const ge=oe,re=l&&J.some(I=>I.key===l)?l:J[0]?.key??null;let le;e[19]!==g||e[20]!==u?(le=async I=>{await g.apply(I.key,"archived")&&fe.success(u("sandbox.postBoard.archived"))},e[19]=g,e[20]=u,e[21]=le):le=e[21];const he=le,[de,be]=L.useState(null),[se,me]=L.useState(null),[ae,ce]=L.useState(null),[W,X]=L.useState("date-desc"),[ee,P]=L.useState("");let H;e[22]===Symbol.for("react.memo_cache_sentinel")?(H=new Set,e[22]=H):H=e[22];const[ue,xe]=L.useState(H),Be=J.reduce(Au,{}),Pe=I=>{const ne=new Map;for(const De of J)for(const Nt of I(De))ne.set(Nt,(ne.get(Nt)??0)+1);return ne},Re=Pe(Tu),Ae=Pe(Pu),Ce=Xe(i,"categories").map(I=>{const{payload:ne}=I;return{slug:We(ne.slug),name:We(ne.name)||We(ne.slug),count:Re.get(We(ne.slug))??0}}),Ee=Xe(i,"authors").map(I=>{const{payload:ne}=I;return{email:We(ne.email),name:We(ne.name)||We(ne.email),count:Ae.get(We(ne.email))??0}}),ie=ee.trim().toLowerCase();let Ne;e[23]!==de?(Ne=I=>!de||I.categorySlugs.includes(de),e[23]=de,e[24]=Ne):Ne=e[24];let Le;e[25]!==se?(Le=I=>!se||I.authorEmails.includes(se),e[25]=se,e[26]=Le):Le=e[26];let F;e[27]!==ae?(F=I=>!ae||I.status===ae,e[27]=ae,e[28]=F):F=e[28];let ye;e[29]!==W?(ye=(I,ne)=>{if(W==="az")return I.title.localeCompare(ne.title);if(W==="za")return ne.title.localeCompare(I.title);const De=(I.scheduledDatetime||I.date).localeCompare(ne.scheduledDatetime||ne.date);return W==="date-asc"?De:-De},e[29]=W,e[30]=ye):ye=e[30];const ke=J.filter(Ne).filter(Le).filter(F).filter(I=>!ie||I.title.toLowerCase().includes(ie)||I.slug.toLowerCase().includes(ie)).sort(ye),Te=ue.size>0;let Ve;e[31]===Symbol.for("react.memo_cache_sentinel")?(Ve=I=>xe(ne=>{const De=new Set(ne);return De.delete(I)||De.add(I),De}),e[31]=Ve):Ve=e[31];const vs=Ve,lt=()=>xe(I=>ke.every(ne=>I.has(ne.key))?new Set:new Set(ke.map(_u)));let wt;e[32]!==g||e[33]!==ue||e[34]!==u?(wt=async()=>{let I=0;for(const ne of ue)await g.apply(ne,"archived")&&(I=I+1);xe(new Set),I>0&&fe.success(u("sandbox.postBoard.archived"))},e[32]=g,e[33]=ue,e[34]=u,e[35]=wt):wt=e[35];const Dt=wt;let Ot;e[36]!==g?(Ot=(I,ne)=>{N(null),g.apply(ne,I)},e[36]=g,e[37]=Ot):Ot=e[37];const ct=Ot;let Ye;e[38]!==d||e[39]!==h?(Ye=()=>{const I=Hs(_n()),ne=Ba({title:"",now:new Date});h.mutate({blockKey:I,data:Et(I,ne)}),d(I)},e[38]=d,e[39]=h,e[40]=Ye):Ye=e[40];const Ct=Ye,dn=()=>{const I=Zd(O),ne=uu(I.sections,qn(f,{hideDefaults:j}));if(ne.length===0&&!I.title.trim()){fe.error(u("sandbox.postBoard.importEmpty"));return}const De=Hs(_n()),Nt=pu({title:I.title,blocks:ne,takenSlugs:J.map(Nu).filter(Boolean),now:new Date});h.mutate({blockKey:De,data:Et(De,Nt)}),B(!1),D(""),fe.success(u("sandbox.postBoard.imported")),d(De)},Rt=r==="list";let Je;e[41]!==c?(Je=()=>c("list"),e[41]=c,e[42]=Je):Je=e[42];let $t;e[43]===Symbol.for("react.memo_cache_sentinel")?($t=o.jsx(mr,{size:14}),e[43]=$t):$t=e[43];let dt;e[44]!==u?(dt=u("sandbox.postBoard.viewList"),e[44]=u,e[45]=dt):dt=e[45];let st;e[46]!==Rt||e[47]!==Je||e[48]!==dt?(st=o.jsx(Bo,{active:Rt,onClick:Je,icon:$t,label:dt}),e[46]=Rt,e[47]=Je,e[48]=dt,e[49]=st):st=e[49];const is=r==="board";let ut;e[50]!==c?(ut=()=>c("board"),e[50]=c,e[51]=ut):ut=e[51];let Lt;e[52]===Symbol.for("react.memo_cache_sentinel")?(Lt=o.jsx(rr,{size:14}),e[52]=Lt):Lt=e[52];let pt;e[53]!==u?(pt=u("sandbox.postBoard.viewBoard"),e[53]=u,e[54]=pt):pt=e[54];let mt;e[55]!==is||e[56]!==ut||e[57]!==pt?(mt=o.jsx(Bo,{active:is,onClick:ut,icon:Lt,label:pt}),e[55]=is,e[56]=ut,e[57]=pt,e[58]=mt):mt=e[58];let Kt;e[59]!==st||e[60]!==mt?(Kt=o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg border p-0.5",children:[st,mt]})}),e[59]=st,e[60]=mt,e[61]=Kt):Kt=e[61];let It;e[62]===Symbol.for("react.memo_cache_sentinel")?(It=o.jsx(Kn,{size:14}),e[62]=It):It=e[62];let ft;e[63]!==u?(ft=u("sandbox.postBoard.newPost"),e[63]=u,e[64]=ft):ft=e[64];let Ft;e[65]===Symbol.for("react.memo_cache_sentinel")?(Ft=o.jsx(gs,{size:14}),e[65]=Ft):Ft=e[65];let gt;e[66]!==ft?(gt=o.jsx(Is,{asChild:!0,children:o.jsxs(Oe,{type:"button",size:"sm",children:[It,ft,Ft]})}),e[66]=ft,e[67]=gt):gt=e[67];let ht;e[68]!==y||e[69]!==u?(ht=y&&o.jsxs(at,{onClick:()=>k(!0),children:[o.jsx(Us,{size:14}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{children:u("sandbox.postBoard.newPostGenerate")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:u("sandbox.postBoard.newPostGenerateHint")})]})]}),e[68]=y,e[69]=u,e[70]=ht):ht=e[70];let zt;e[71]===Symbol.for("react.memo_cache_sentinel")?(zt=o.jsx(pr,{size:14}),e[71]=zt):zt=e[71];let xt;e[72]!==u?(xt=u("sandbox.postBoard.newPostWrite"),e[72]=u,e[73]=xt):xt=e[73];let bt;e[74]!==xt?(bt=o.jsx("span",{children:xt}),e[74]=xt,e[75]=bt):bt=e[75];let yt;e[76]!==u?(yt=u("sandbox.postBoard.newPostWriteHint"),e[76]=u,e[77]=yt):yt=e[77];let vt;e[78]!==yt?(vt=o.jsx("span",{className:"text-xs text-muted-foreground",children:yt}),e[78]=yt,e[79]=vt):vt=e[79];let kt;e[80]!==bt||e[81]!==vt?(kt=o.jsxs("div",{className:"flex flex-col",children:[bt,vt]}),e[80]=bt,e[81]=vt,e[82]=kt):kt=e[82];let St;e[83]!==kt||e[84]!==Ct?(St=o.jsxs(at,{onClick:Ct,children:[zt,kt]}),e[83]=kt,e[84]=Ct,e[85]=St):St=e[85];let Mt,Vt;e[86]===Symbol.for("react.memo_cache_sentinel")?(Mt=()=>B(!0),Vt=o.jsx(hn,{size:14}),e[86]=Mt,e[87]=Vt):(Mt=e[86],Vt=e[87]);let qe;e[88]!==u?(qe=u("sandbox.postBoard.importContent"),e[88]=u,e[89]=qe):qe=e[89];let x;e[90]!==qe?(x=o.jsx("span",{children:qe}),e[90]=qe,e[91]=x):x=e[91];let $;e[92]!==u?($=u("sandbox.postBoard.importContentHint"),e[92]=u,e[93]=$):$=e[93];let Z;e[94]!==$?(Z=o.jsx("span",{className:"text-xs text-muted-foreground",children:$}),e[94]=$,e[95]=Z):Z=e[95];let te;e[96]!==x||e[97]!==Z?(te=o.jsxs(at,{onClick:Mt,children:[Vt,o.jsxs("div",{className:"flex flex-col",children:[x,Z]})]}),e[96]=x,e[97]=Z,e[98]=te):te=e[98];let je;e[99]!==ht||e[100]!==St||e[101]!==te?(je=o.jsxs(Fs,{align:"end",className:"w-56",children:[ht,St,te]}),e[99]=ht,e[100]=St,e[101]=te,e[102]=je):je=e[102];let we;e[103]!==gt||e[104]!==je?(we=o.jsxs(zs,{children:[gt,je]}),e[103]=gt,e[104]=je,e[105]=we):we=e[105];let Ie;e[106]!==y||e[107]!==i||e[108]!==S||e[109]!==K||e[110]!==_?(Ie=y&&o.jsx(Yd,{open:S,onOpenChange:k,decofile:i,hasAi:_,onGenerate:I=>{K(I)}}),e[106]=y,e[107]=i,e[108]=S,e[109]=K,e[110]=_,e[111]=Ie):Ie=e[111];let nt;e[112]!==u?(nt=u("sandbox.postBoard.importTitle"),e[112]=u,e[113]=nt):nt=e[113];let ot;e[114]!==nt?(ot=o.jsx(ts,{children:nt}),e[114]=nt,e[115]=ot):ot=e[115];let Ut;e[116]!==u?(Ut=u("sandbox.postBoard.importDescription"),e[116]=u,e[117]=Ut):Ut=e[117];let Gt;e[118]!==Ut?(Gt=o.jsx(En,{children:Ut}),e[118]=Ut,e[119]=Gt):Gt=e[119];let ks;e[120]!==ot||e[121]!==Gt?(ks=o.jsxs(bs,{children:[ot,Gt]}),e[120]=ot,e[121]=Gt,e[122]=ks):ks=e[122];const un=Qa(O)?"html":"markdown";let Ss;e[123]===Symbol.for("react.memo_cache_sentinel")?(Ss=I=>D(I??""),e[123]=Ss):Ss=e[123];let Ht;e[124]!==O||e[125]!==un?(Ht=o.jsx("div",{className:"h-72 overflow-hidden rounded-[var(--studio-control-radius,var(--radius-xl))] border bg-[var(--studio-input-background)]",children:o.jsx(pa,{code:O,language:un,height:"100%",autoFocus:!0,onChange:Ss})}),e[124]=O,e[125]=un,e[126]=Ht):Ht=e[126];let js;e[127]===Symbol.for("react.memo_cache_sentinel")?(js=o.jsx("input",{ref:z,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async I=>{const ne=I.target.files?.[0];ne&&D(await ne.text()),I.target.value=""}}),e[127]=js):js=e[127];let ws,Cs;e[128]===Symbol.for("react.memo_cache_sentinel")?(ws=()=>z.current?.click(),Cs=o.jsx(hn,{size:14}),e[128]=ws,e[129]=Cs):(ws=e[128],Cs=e[129]);let Yt;e[130]!==u?(Yt=u("sandbox.postBoard.importUpload"),e[130]=u,e[131]=Yt):Yt=e[131];let qt;e[132]!==Yt?(qt=o.jsxs(Oe,{type:"button",variant:"outline",size:"sm",onClick:ws,children:[Cs,Yt]}),e[132]=Yt,e[133]=qt):qt=e[133];let Ns;e[134]!==Ht||e[135]!==qt?(Ns=o.jsxs("div",{className:"space-y-3",children:[Ht,js,qt]}),e[134]=Ht,e[135]=qt,e[136]=Ns):Ns=e[136];let _s;e[137]!==O?(_s=O.trim(),e[137]=O,e[138]=_s):_s=e[138];let Ps;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ps=o.jsx(hn,{size:14}),e[139]=Ps):Ps=e[139];let Ts;e[140]!==u?(Ts=u("sandbox.postBoard.importRun"),e[140]=u,e[141]=Ts):Ts=e[141];let As;e[142]!==v||e[143]!==m||e[144]!==p||e[145]!==l||e[146]!==r?(As=r==="board"&&l&&v&&p&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:p(l,{expanded:!0,onToggleExpand:()=>E(!1),onClose:()=>{E(!1),m?.()}})}),e[142]=v,e[143]=m,e[144]=p,e[145]=l,e[146]=r,e[147]=As):As=e[147];const pn=r==="board"&&!!l&&!v;let Wt;e[148]!==m?(Wt=I=>{I||(E(!1),m?.())},e[148]=m,e[149]=Wt):Wt=e[149];let Xt;e[150]!==u?(Xt=u("sandbox.collectionsSidebar.posts"),e[150]=u,e[151]=Xt):Xt=e[151];let Jt;e[152]!==Xt?(Jt=o.jsx(ts,{className:"sr-only",children:Xt}),e[152]=Xt,e[153]=Jt):Jt=e[153];let Qt;e[154]!==m||e[155]!==p||e[156]!==l?(Qt=l&&p?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(jn,{size:20,className:"animate-spin text-muted-foreground"})}),children:p(l,{expanded:!1,onToggleExpand:()=>E(!0),onClose:()=>m?.()})}):null,e[154]=m,e[155]=p,e[156]=l,e[157]=Qt):Qt=e[157];let Zt;e[158]!==Jt||e[159]!==Qt?(Zt=o.jsxs(ss,{closeButtonClassName:"hidden",className:"left-auto right-4 top-4 bottom-4 flex h-auto translate-x-0 translate-y-0 flex-col gap-0 overflow-hidden p-0 sm:max-w-3xl",children:[Jt,Qt]}),e[158]=Jt,e[159]=Qt,e[160]=Zt):Zt=e[160];let Es;return e[161]!==pn||e[162]!==Wt||e[163]!==Zt?(Es=o.jsx(ns,{open:pn,onOpenChange:Wt,children:Zt}),e[161]=pn,e[162]=Wt,e[163]=Zt,e[164]=Es):Es=e[164],o.jsxs("div",{className:"relative flex h-full min-w-0 flex-col",children:[o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-3 border-b px-6 py-3",children:[Kt,o.jsxs("div",{className:"flex items-center gap-2",children:[we,Ie,o.jsx(ns,{open:T,onOpenChange:B,children:o.jsxs(ss,{className:"max-h-[85vh] sm:max-w-2xl",children:[ks,Ns,o.jsx(ys,{children:o.jsxs(Oe,{type:"button",disabled:!_s,onClick:dn,children:[Ps,Ts]})})]})})]})]}),J.length===0?o.jsx(ll,{className:"flex-1",icon:o.jsx(Us,{size:22}),title:u("sandbox.postBoard.emptyTitle"),description:u("sandbox.postBoard.emptyDescription"),buttonProps:{children:u("sandbox.postBoard.newPost"),onClick:Ct}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:Su.map(I=>{const ne=u(Js[I]),De=J.filter($e=>$e.status===I);wu(I)&&De.sort(ju);const Nt=Q(I,De.length===0);return o.jsxs(L.Fragment,{children:[o.jsx("div",{onDragOver:$e=>{$e.preventDefault(),N(I)},onDragLeave:()=>N($e=>$e===I?null:$e),onDrop:$e=>{$e.preventDefault(),ct(I,$e.dataTransfer.getData(si))},className:ve("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",Nt?"w-11":"w-72",w===I&&"border-primary bg-primary/5"),children:Nt?o.jsxs("button",{type:"button",onClick:()=>q(I,!1),"aria-label":u("sandbox.postBoard.expandLane",{lane:ne}),"aria-expanded":!1,className:"flex min-h-0 flex-1 cursor-pointer flex-col items-center gap-2 py-2.5 text-muted-foreground hover:text-foreground",children:[o.jsx(Ms,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:De.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:ne})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 text-sm font-medium",children:[o.jsxs("button",{type:"button",onClick:()=>q(I,!0),"aria-label":u("sandbox.postBoard.collapseLane",{lane:ne}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(gs,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:ne})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:De.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:De.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.postBoard.laneEmpty")}):De.map($e=>o.jsx(Du,{post:$e,payload:ge($e.key),moving:g.isMoving($e.key),onOpen:()=>d($e.key),onArchive:$e.status==="archived"?void 0:()=>{he($e)}},$e.key))})]})}),I===An&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},I)})}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r",children:[o.jsx(fu,{value:ee,onChange:P}),Te?o.jsx(vu,{count:ue.size,allSelected:ke.length>0&&ke.every(I=>ue.has(I.key)),onToggleSelectAll:lt,onArchive:()=>{Dt()},onExit:()=>xe(new Set)}):o.jsx(gu,{categories:Ce,authors:Ee,statusCounts:Be,categoryFilter:de,authorFilter:se,statusFilter:ae,sort:W,onCategoryFilterChange:be,onAuthorFilterChange:me,onStatusFilterChange:ce,onSortChange:X}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(Eu,{posts:ke,selectedKey:re,selectionActive:Te,selectedKeys:ue,onToggleSelect:vs,onOpen:d,isMoving:g.isMoving,onArchive:I=>{he(I)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:re&&p?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(jn,{size:20,className:"animate-spin text-muted-foreground"})}),children:p(re)}):o.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:u("sandbox.postBoard.selectPrompt")})})]}),As,Es]})}function Nu(t){return t.slug}function _u(t){return t.key}function Pu(t){return t.authorEmails}function Tu(t){return t.categorySlugs}function Au(t,e){return t[e.status]=(t[e.status]??0)+1,t}function Bo(t){const e=pe.c(7),{active:s,onClick:n,icon:a,label:i}=t,r=s?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground";let l;e[0]!==r?(l=ve("inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",r),e[0]=r,e[1]=l):l=e[1];let c;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==l?(c=o.jsxs("button",{type:"button",onClick:n,className:l,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=c):c=e[6],c}function Eu(t){const e=pe.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:l,isMoving:c,onArchive:d}=t,m=_e();if(s.length===0){let p;e[0]!==m?(p=m("sandbox.postList.noMatches"),e[0]=m,e[1]=p):p=e[1];let u;return e[2]!==p?(u=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p}),e[2]=p,e[3]=u):u=e[3],u}let g;if(e[4]!==c||e[5]!==d||e[6]!==l||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let p;e[13]!==c||e[14]!==d||e[15]!==l||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(p=u=>o.jsx(Bu,{post:u,selected:u.key===n,selectionActive:a,checked:i.has(u.key),onToggleSelect:()=>r(u.key),moving:c(u.key),onOpen:()=>l(u.key),onArchive:u.status==="archived"?void 0:()=>d(u)},u.key),e[13]=c,e[14]=d,e[15]=l,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=p):p=e[20],g=s.map(p),e[4]=c,e[5]=d,e[6]=l,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=g}else g=e[12];let f;return e[21]!==g?(f=o.jsx("ul",{className:"divide-y",children:g}),e[21]=g,e[22]=f):f=e[22],f}function Bu(t){const e=pe.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:l,onOpen:c,onArchive:d}=t,m=_e(),g=s.status==="awaiting_review"&&s.missing.length>0,f=s.status==="scheduled"||s.status==="published",p=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let u;e[0]!==p?(u=ve("absolute left-3 top-3 z-10 transition-opacity",p),e[0]=p,e[1]=u):u=e[1];let b;e[2]!==r?(b=()=>r(),e[2]=r,e[3]=b):b=e[3];let h;e[4]!==s.title||e[5]!==m?(h=s.title||m("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=m,e[6]=h):h=e[6];let _;e[7]!==i||e[8]!==b||e[9]!==h?(_=o.jsx(sn,{checked:i,onCheckedChange:b,"aria-label":h}),e[7]=i,e[8]=b,e[9]=h,e[10]=_):_=e[10];let y;e[11]!==u||e[12]!==_?(y=o.jsx("span",{className:u,children:_}),e[11]=u,e[12]=_,e[13]=y):y=e[13];let j;e[14]!==l||e[15]!==d||e[16]!==a?(j=d&&!a&&o.jsx(ni,{onArchive:d,disabled:l,className:"top-2.5"}),e[14]=l,e[15]=d,e[16]=a,e[17]=j):j=e[17];let w;e[18]!==c||e[19]!==r||e[20]!==a?(w=()=>a?r():c(),e[18]=c,e[19]=r,e[20]=a,e[21]=w):w=e[21];const N=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let v;e[22]!==N?(v=ve("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",N),e[22]=N,e[23]=v):v=e[23];let E;e[24]!==s.title||e[25]!==m?(E=s.title||m("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=m,e[26]=E):E=e[26];let S;e[27]!==E?(S=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:E}),e[27]=E,e[28]=S):S=e[28];const k=ku[s.status],T=Js[s.status];let B;e[29]!==m||e[30]!==T?(B=m(T),e[29]=m,e[30]=T,e[31]=B):B=e[31];let O;e[32]!==k||e[33]!==B?(O=o.jsx(Un,{variant:k,className:"shrink-0",children:B}),e[32]=k,e[33]=B,e[34]=O):O=e[34];let D;e[35]!==g||e[36]!==s.missing?(D=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(fs,{size:12}),s.missing.length]}),e[35]=g,e[36]=s.missing,e[37]=D):D=e[37];let z;e[38]!==s.duplicateTitle||e[39]!==m?(z=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:m("sandbox.postBoard.duplicateTitle"),children:[o.jsx(Mn,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:m("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=m,e[40]=z):z=e[40];let C;e[41]!==f||e[42]!==s.date||e[43]!==s.scheduledDatetime?(C=f&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx($n,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=f,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=C):C=e[44];let A;e[45]!==O||e[46]!==D||e[47]!==z||e[48]!==C?(A=o.jsxs("div",{className:"flex items-center gap-2",children:[O,D,z,C]}),e[45]=O,e[46]=D,e[47]=z,e[48]=C,e[49]=A):A=e[49];let V;e[50]!==n||e[51]!==v||e[52]!==S||e[53]!==A||e[54]!==w?(V=o.jsxs("button",{type:"button",onClick:w,"aria-current":n,className:v,children:[S,A]}),e[50]=n,e[51]=v,e[52]=S,e[53]=A,e[54]=w,e[55]=V):V=e[55];let U;return e[56]!==V||e[57]!==y||e[58]!==j?(U=o.jsxs("li",{className:"group/row relative",children:[y,j,V]}),e[56]=V,e[57]=y,e[58]=j,e[59]=U):U=e[59],U}function Du(t){const e=pe.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,l=_e(),c=s.status!=="generating"&&!a;let d;e[0]!==n?(d=Uc(n),e[0]=n,e[1]=d):d=e[1];const m=d,g=!c&&"opacity-80";let f;e[2]!==g?(f=ve("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",g),e[2]=g,e[3]=f):f=e[3];let p;e[4]!==a||e[5]!==r?(p=r&&o.jsx(ni,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=p):p=e[6];let u;e[7]!==s.key?(u=B=>B.dataTransfer.setData(si,s.key),e[7]=s.key,e[8]=u):u=e[8];const b=c?"cursor-grab active:cursor-grabbing":"cursor-pointer";let h;e[9]!==b?(h=ve("block w-full p-3 text-left",b),e[9]=b,e[10]=h):h=e[10];let _;e[11]!==s.title||e[12]!==l?(_=s.title||l("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=l,e[13]=_):_=e[13];let y;e[14]!==_?(y=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:_}),e[14]=_,e[15]=y):y=e[15];let j;e[16]!==m||e[17]!==s.status?(j=s.status==="draft"&&m.format?.name&&o.jsx(Un,{variant:"outline",className:"max-w-full truncate",children:m.format.name}),e[16]=m,e[17]=s.status,e[18]=j):j=e[18];let w;e[19]!==s.status||e[20]!==l?(w=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(jn,{size:12,className:"animate-spin"}),l("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=l,e[21]=w):w=e[21];let N;e[22]!==s.missing||e[23]!==s.status||e[24]!==l?(N=s.status==="awaiting_review"&&(s.missing.length>0?o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(fs,{size:12}),l("sandbox.postBoard.nIssues",{count:String(s.missing.length)})]}):o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-success",children:[o.jsx(rl,{size:12}),l("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=l,e[25]=N):N=e[25];let v;e[26]!==s.date||e[27]!==s.scheduledDatetime||e[28]!==s.status?(v=(s.status==="scheduled"||s.status==="published")&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[o.jsx($n,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[26]=s.date,e[27]=s.scheduledDatetime,e[28]=s.status,e[29]=v):v=e[29];let E;e[30]!==s.duplicateTitle||e[31]!==l?(E=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Mn,{size:12,"aria-hidden":!0}),l("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=l,e[32]=E):E=e[32];let S;e[33]!==j||e[34]!==w||e[35]!==N||e[36]!==v||e[37]!==E?(S=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[j,w,N,v,E]}),e[33]=j,e[34]=w,e[35]=N,e[36]=v,e[37]=E,e[38]=S):S=e[38];let k;e[39]!==c||e[40]!==i||e[41]!==S||e[42]!==u||e[43]!==h||e[44]!==y?(k=o.jsxs("button",{type:"button",draggable:c,onDragStart:u,onClick:i,className:h,children:[y,S]}),e[39]=c,e[40]=i,e[41]=S,e[42]=u,e[43]=h,e[44]=y,e[45]=k):k=e[45];let T;return e[46]!==k||e[47]!==f||e[48]!==p?(T=o.jsxs("div",{className:f,children:[p,k]}),e[46]=k,e[47]=f,e[48]=p,e[49]=T):T=e[49],T}function ni(t){const e=pe.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=_e();let l;e[0]!==s||e[1]!==r?(l=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=l):l=e[2];const c=l;let d;e[3]!==n?(d=p=>{p.stopPropagation(),n()},e[3]=n,e[4]=d):d=e[4];let m;e[5]!==i?(m=ve("absolute right-2 z-10 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/card:opacity-100 group-hover/row:opacity-100",i),e[5]=i,e[6]=m):m=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Vn,{className:"size-3.25"}),e[7]=g):g=e[7];let f;return e[8]!==a||e[9]!==d||e[10]!==m||e[11]!==c?(f=o.jsx(Oe,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":c,title:c,onClick:d,className:m,children:g}),e[8]=a,e[9]=d,e[10]=m,e[11]=c,e[12]=f):f=e[12],f}function Qe(t){const e=pe.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:l,variantCount:c,trailing:d,selectable:m,selectionActive:g,selected:f,invalid:p,invalidReason:u,warning:b,warningReason:h,onToggleSelect:_,onClick:y,menu:j}=t,w=_e(),N=l==="global";let v;e[0]!==s||e[1]!==r||e[2]!==N||e[3]!==n?(v=n?o.jsx("img",{src:n,alt:"",className:"size-8 shrink-0 rounded-lg object-cover bg-muted"}):o.jsx("span",{className:ve("flex size-8 shrink-0 items-center justify-center rounded-lg",N?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:ve("shrink-0",!N&&(r?"text-accent-foreground":"text-muted-foreground")),style:N?{color:Dn}:void 0})}),e[0]=s,e[1]=r,e[2]=N,e[3]=n,e[4]=v):v=e[4];const E=v,S=r?N?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":N?"hover:bg-global-section/10":"hover:bg-accent";let k;e[5]!==S?(k=ve("group relative flex min-w-0 items-center rounded-md transition-colors",S),e[5]=S,e[6]=k):k=e[6];let T;e[7]!==_||e[8]!==m||e[9]!==f||e[10]!==g||e[11]!==w||e[12]!==a?(T=m&&o.jsx("span",{className:ve("flex shrink-0 items-center pl-2.5 transition-opacity",f||g?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:Ou,children:o.jsx(sn,{checked:f,onCheckedChange:()=>_?.(),"aria-label":w("sandbox.itemRow.selectItem",{title:a})})}),e[7]=_,e[8]=m,e[9]=f,e[10]=g,e[11]=w,e[12]=a,e[13]=T):T=e[13];const B=p&&!r&&"text-destructive";let O;e[14]!==B?(O=ve("block truncate text-sm font-medium",B),e[14]=B,e[15]=O):O=e[15];let D;e[16]!==O||e[17]!==a?(D=o.jsx("span",{className:O,children:a}),e[16]=O,e[17]=a,e[18]=D):D=e[18];const z=r?"text-accent-foreground/70":"text-muted-foreground";let C;e[19]!==z?(C=ve("block truncate text-xs",z),e[19]=z,e[20]=C):C=e[20];let A;e[21]!==i||e[22]!==C?(A=o.jsx("span",{className:C,children:i}),e[21]=i,e[22]=C,e[23]=A):A=e[23];let V;e[24]!==A||e[25]!==D?(V=o.jsxs("span",{className:"min-w-0 flex-1",children:[D,A]}),e[24]=A,e[25]=D,e[26]=V):V=e[26];let U;e[27]!==r||e[28]!==w||e[29]!==c?(U=c!==void 0&&c>1&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsxs("span",{className:ve("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Wo,{size:14}),c]})}),o.jsx(et,{side:"bottom",children:w("sandbox.itemRow.variantCount",{count:c})})]}),e[27]=r,e[28]=w,e[29]=c,e[30]=U):U=e[30];let Q;e[31]!==b||e[32]!==h?(Q=b&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(fs,{size:14})})}),h&&o.jsx(et,{side:"bottom",children:h})]}),e[31]=b,e[32]=h,e[33]=Q):Q=e[33];let Y;e[34]!==r||e[35]!==p||e[36]!==u?(Y=p&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:ve("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(fs,{size:14})})}),u&&o.jsx(et,{side:"bottom",children:u})]}),e[34]=r,e[35]=p,e[36]=u,e[37]=Y):Y=e[37];let q;e[38]!==y||e[39]!==E||e[40]!==V||e[41]!==U||e[42]!==Q||e[43]!==Y||e[44]!==d?(q=o.jsxs("button",{type:"button",onClick:y,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[E,V,U,Q,Y,d]}),e[38]=y,e[39]=E,e[40]=V,e[41]=U,e[42]=Q,e[43]=Y,e[44]=d,e[45]=q):q=e[45];let G;e[46]!==r||e[47]!==j?(G=j&&o.jsx("div",{className:ve("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:j}),e[46]=r,e[47]=j,e[48]=G):G=e[48];let M;return e[49]!==q||e[50]!==G||e[51]!==k||e[52]!==T?(M=o.jsxs("div",{className:k,children:[T,q,G]}),e[49]=q,e[50]=G,e[51]=k,e[52]=T,e[53]=M):M=e[53],M}function Ou(t){return t.stopPropagation()}const Ru={loaders:qo,actions:Zo},$u={loaders:"Loaders",actions:"Actions"},Lu={analytics:dr,blog:ua,commerce:cr,site:lr,website:Vs};function Ku(t,e){return e===0?Lu[t.toLowerCase()]??no:no}function Os(t,e){return e===0?Ui(t):t}function Iu(t){const e=pe.c(105),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c}=t,d=_e();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[g,f]=L.useState(m),[p,u]=L.useState(null),[b,h]=L.useState(""),[_,y]=L.useState(Yu),[j,w]=L.useState(c);j!==c&&(w(c),f([]),u(null),h(""),y(new Set));let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N=K=>{y(J=>{const oe=new Set(J);return oe.has(K)?oe.delete(K):oe.add(K),oe})},e[1]=N):N=e[1];const v=N;let E;e[2]!==a||e[3]!==s||e[4]!==n?(E={orgSlug:s,virtualMcpId:n,branch:a},e[2]=a,e[3]=s,e[4]=n,e[5]=E):E=e[5];const S=en(E);let k;e[6]!==S?(k=Mo((K,J)=>S.mutate({blockKey:K,data:J})),e[6]=S,e[7]=k):k=e[7];const T=k;let B;e[8]!==c?(B=Gi(c),e[8]=c,e[9]=B):B=e[9];const O=B,D=Ru[c];let z,C,A,V,U,Q,Y;if(e[10]!==D||e[11]!==a||e[12]!==l||e[13]!==c||e[14]!==r||e[15]!==_||e[16]!==s||e[17]!==g||e[18]!==i||e[19]!==S||e[20]!==T||e[21]!==b||e[22]!==p||e[23]!==O||e[24]!==d||e[25]!==n){A=Symbol.for("react.early_return_sentinel");e:{const K=[...Fi(r,l,c).map(Hu),...zi(r,c).map(Gu)],J=b.trim().toLowerCase(),oe=J.length>0,ge=oe?K.filter(F=>F.title.toLowerCase().includes(J)||F.resolveType.toLowerCase().includes(J)):[],re=new Map,le=[],he=new Map;if(!oe){for(const F of K){const ye=F.folderPath;if(!(ye.length<g.length)&&g.every((ke,Te)=>ye[Te]===ke))if(ye.length===g.length)if(F.savedKey!==void 0){const ke=he.get(F.resolveType);ke?ke.push(F):he.set(F.resolveType,[F])}else le.push(F);else{const ke=ye[g.length],Te=re.get(ke)??{count:0,savedCount:0};F.savedKey!==void 0?Te.savedCount=Te.savedCount+1:Te.count=Te.count+1,re.set(ke,Te)}}le.sort(Uu);for(const F of he.values())F.sort(Vu)}const de=[...he.entries()].filter(F=>{const[ye]=F;return!le.some(ke=>ke.resolveType===ye)}).flatMap(Mu).sort(zu);let be;e[33]!==g?(be=(F,ye)=>Os(F.name,g.length).localeCompare(Os(ye.name,g.length)),e[33]=g,e[34]=be):be=e[34];const se=[...re.entries()].map(Fu).sort(be);let me;e[35]===Symbol.for("react.memo_cache_sentinel")?(me=F=>{u(F.savedKey!==void 0?{mode:"saved",key:F.savedKey}:{mode:"available",resolveType:F.resolveType,title:F.title})},e[35]=me):me=e[35];const ae=me;let ce;e[36]!==S||e[37]!==O||e[38]!==d?(ce=async(F,ye)=>{const ke=await S.mutateAsync({blockKey:F,data:ye,create:!0});ze(ke)||fe.success(d("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:O,blockId:F})),u({mode:"saved",key:F})},e[36]=S,e[37]=O,e[38]=d,e[39]=ce):ce=e[39];const W=ce;let X;e[40]!==l||e[41]!==p?(X=qu(p,l),e[40]=l,e[41]=p,e[42]=X):X=e[42];const ee=X;if(ee){const F=`${ee.mode}:${ee.mode==="saved"?ee.blockKey:ee.resolveType}`,ye=ee.mode==="saved"&&ee.blockKey||"";let ke;e[43]===Symbol.for("react.memo_cache_sentinel")?(ke=()=>u(null),e[43]=ke):ke=e[43];let Te;e[44]!==a||e[45]!==l||e[46]!==F||e[47]!==W||e[48]!==c||e[49]!==r||e[50]!==s||e[51]!==i||e[52]!==S.isPending||e[53]!==T||e[54]!==ee.editorTarget||e[55]!==ee.initialValue||e[56]!==n?(Te=o.jsx(Mi,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c,target:ee.editorTarget,initialValue:ee.initialValue,isCreating:S.isPending,onCreate:W,onSaveReferencedBlock:T,onBack:ke},F),e[44]=a,e[45]=l,e[46]=F,e[47]=W,e[48]=c,e[49]=r,e[50]=s,e[51]=i,e[52]=S.isPending,e[53]=T,e[54]=ee.editorTarget,e[55]=ee.initialValue,e[56]=n,e[57]=Te):Te=e[57];let Ve;e[58]!==a||e[59]!==F||e[60]!==s||e[61]!==ye||e[62]!==Te||e[63]!==n?(Ve=o.jsx(Vo,{orgSlug:s,virtualMcpId:n,branch:a,blockKey:ye,present:void 0,children:Te},F),e[58]=a,e[59]=F,e[60]=s,e[61]=ye,e[62]=Te,e[63]=n,e[64]=Ve):Ve=e[64],A=Ve;break e}Y="flex h-full w-full min-w-0 flex-col";let P;e[65]!==d?(P=d("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[65]=d,e[66]=P):P=e[66];let H;e[67]===Symbol.for("react.memo_cache_sentinel")?(H=()=>f([]),e[67]=H):H=e[67];const ue=g.length===0?"font-medium text-foreground":"text-muted-foreground";let xe;e[68]!==ue?(xe=ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",ue),e[68]=ue,e[69]=xe):xe=e[69];const Be=$u[c];let Pe;e[70]!==xe||e[71]!==Be?(Pe=o.jsx("button",{type:"button",onClick:H,className:xe,children:Be}),e[70]=xe,e[71]=Be,e[72]=Pe):Pe=e[72];let Re;e[73]!==g?(Re=g.map((F,ye)=>{const ke=ye===g.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(Ms,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>f(g.slice(0,ye+1)),className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",ke?"font-medium text-foreground":"text-muted-foreground"),children:Os(F,ye)})]},`${F}-${ye}`)}),e[73]=g,e[74]=Re):Re=e[74];let Ae;e[75]!==P||e[76]!==Pe||e[77]!==Re?(Ae=o.jsxs("nav",{"aria-label":P,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[Pe,Re]}),e[75]=P,e[76]=Pe,e[77]=Re,e[78]=Ae):Ae=e[78];let Ce;e[79]===Symbol.for("react.memo_cache_sentinel")?(Ce=o.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[79]=Ce):Ce=e[79];let Ee;e[80]===Symbol.for("react.memo_cache_sentinel")?(Ee=F=>h(F.target.value),e[80]=Ee):Ee=e[80];let ie;e[81]!==c||e[82]!==d?(ie=d("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:c}),e[81]=c,e[82]=d,e[83]=ie):ie=e[83];let Ne;e[84]!==c||e[85]!==d?(Ne=d("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:c}),e[84]=c,e[85]=d,e[86]=Ne):Ne=e[86];let Le;e[87]!==b||e[88]!==ie||e[89]!==Ne?(Le=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Ce,o.jsx("input",{type:"text",value:b,onChange:Ee,placeholder:ie,"aria-label":Ne,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[87]=b,e[88]=ie,e[89]=Ne,e[90]=Le):Le=e[90],e[91]!==Ae||e[92]!==Le?(C=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[Ae,Le]}),e[91]=Ae,e[92]=Le,e[93]=C):C=e[93],z=tn,Q="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",V="mx-auto w-full max-w-4xl px-6 py-5",U=oe?ge.length===0?o.jsx(jt,{title:d("sandbox.runnableBlocksBrowser.noSearchResults",{kind:c,query:b.trim()}),description:d("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:ge.map(F=>o.jsx(Qe,{icon:D,accent:F.savedKey!==void 0?"global":void 0,title:F.title,subtitle:F.resolveType,active:!1,onClick:()=>ae(F)},F.savedKey??F.resolveType))}):se.length===0&&le.length===0&&de.length===0?o.jsx(jt,{title:d("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:c}),description:g.length===0?d("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):d("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[se.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:se.map(F=>{const ye=Ku(F.name,g.length);return o.jsxs("button",{type:"button",onClick:()=>f([...g,F.name]),className:"flex items-center gap-2.5 rounded-lg border px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[o.jsx(ye,{size:18,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-medium",children:Os(F.name,g.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[F.count," ",F.count===1?O:c,F.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",d("sandbox.runnableBlocksBrowser.savedCountLabel",{count:F.savedCount})]})]})]})]},F.name)})}),(le.length>0||de.length>0)&&o.jsxs("div",{className:ve("flex flex-col gap-1",se.length>0&&"mt-4"),children:[le.map(F=>{const ye=he.get(F.resolveType)??[],ke=_.has(F.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(Qe,{icon:D,title:F.title,subtitle:F.resolveType,active:!1,onClick:()=>ae(F)}),ye.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>v(F.resolveType),"aria-expanded":ke,className:"flex items-center gap-1 self-start rounded-lg px-2.5 py-1 text-xs font-medium transition-colors hover:bg-global-section/10 cursor-pointer ml-11",style:{color:Dn},children:[ke?o.jsx(gs,{size:12,className:"shrink-0"}):o.jsx(Ms,{size:12,className:"shrink-0"}),d(ke?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",ye.length,")"]}),ke&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:ye.map(Te=>o.jsx(Qe,{icon:D,accent:"global",title:Te.title,subtitle:Te.resolveType,active:!1,onClick:()=>ae(Te)},Te.savedKey))})]})]},F.resolveType)}),de.map(F=>o.jsx(Qe,{icon:D,accent:"global",title:F.title,subtitle:F.resolveType,active:!1,onClick:()=>ae(F)},F.savedKey))]})]})}e[10]=D,e[11]=a,e[12]=l,e[13]=c,e[14]=r,e[15]=_,e[16]=s,e[17]=g,e[18]=i,e[19]=S,e[20]=T,e[21]=b,e[22]=p,e[23]=O,e[24]=d,e[25]=n,e[26]=z,e[27]=C,e[28]=A,e[29]=V,e[30]=U,e[31]=Q,e[32]=Y}else z=e[26],C=e[27],A=e[28],V=e[29],U=e[30],Q=e[31],Y=e[32];if(A!==Symbol.for("react.early_return_sentinel"))return A;let q;e[94]!==V||e[95]!==U?(q=o.jsx("div",{className:V,children:U}),e[94]=V,e[95]=U,e[96]=q):q=e[96];let G;e[97]!==z||e[98]!==q||e[99]!==Q?(G=o.jsx(z,{className:Q,children:q}),e[97]=z,e[98]=q,e[99]=Q,e[100]=G):G=e[100];let M;return e[101]!==C||e[102]!==G||e[103]!==Y?(M=o.jsxs("div",{className:Y,children:[C,G]}),e[101]=C,e[102]=G,e[103]=Y,e[104]=M):M=e[104],M}function Fu(t){const[e,s]=t;return{name:e,...s}}function zu(t,e){return t.title.localeCompare(e.title)}function Mu(t){const[,e]=t;return e}function Vu(t,e){return t.title.localeCompare(e.title)}function Uu(t,e){return t.title.localeCompare(e.title)}function Gu(t){return{resolveType:t.resolveType,title:t.title,folderPath:zo(t.resolveType)}}function Hu(t){return{resolveType:t.resolveType,title:t.title,folderPath:zo(t.resolveType),savedKey:t.key}}function Yu(){return new Set}function qu(t,e){if(!t)return null;if(t.mode==="available")return{mode:"available",resolveType:t.resolveType,editorTarget:{mode:"available",resolveType:t.resolveType,title:t.title},initialValue:{}};const{resolveType:s,props:n,title:a}=Vi(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function Wu(t){const e=pe.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,resolveType:c,title:d,defaultBlockId:m,isCreating:g,onCreate:f,onSaveReferencedBlock:p}=t,u=_e(),b=Zs(),h=b?.virtualMcpId,y=da(h===n?n:null)?.metadata?.siteSlug??null;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={},e[0]=j):j=e[0];const[w,N]=L.useState(j);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[1]=v):v=e[1];const[E,S]=L.useState(v),[k,T]=L.useState(0),[B,O]=L.useState(!1);let D;e[2]!==r||e[3]!==c?(D=Fn(c,r),e[2]=r,e[3]=c,e[4]=D):D=e[4];const z=D;let C,A,V,U,Q,Y,q,G;if(e[5]!==y||e[6]!==a||e[7]!==l||e[8]!==E||e[9]!==w||e[10]!==g||e[11]!==f||e[12]!==s||e[13]!==i||e[14]!==c||e[15]!==u||e[16]!==b?.taskId||e[17]!==d||e[18]!==n){const le=c.split("/").pop()?.replace(/\.tsx?$/,"")??c,he=b?.taskId??null,de=i??void 0;let be;e[27]!==y||e[28]!==a||e[29]!==s||e[30]!==de||e[31]!==he||e[32]!==n?(be={orgSlug:s,virtualMcpId:n,branch:a,threadId:he,previewUrl:de,siteSlug:y},e[27]=y,e[28]=a,e[29]=s,e[30]=de,e[31]=he,e[32]=n,e[33]=be):be=e[33],A=be;let se,me,ae,ce;if(e[34]!==l||e[35]!==E||e[36]!==w||e[37]!==f||e[38]!==u||e[39]!==d){const Pe=[d,...E],Re=Ce=>{S(E.slice(0,Ce)),T(Xu)};let Ae;e[48]!==l||e[49]!==w||e[50]!==f?(Ae=async Ce=>{const Ee=Yi(Ce,l);if(Ee){fe.error(Ee);return}await f(Ce,w),O(!1)},e[48]=l,e[49]=w,e[50]=f,e[51]=Ae):Ae=e[51],C=Ae,G="flex h-full w-full min-w-0",q="flex min-w-0 flex-1 flex-col",Q="shrink-0 border-b px-3 py-2.5",ce="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==u?(se=u("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=u,e[53]=se):se=e[53],me="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",ae=Pe.map((Ce,Ee)=>{const ie=Ee===Pe.length-1,Ne=Hi(Ce);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[Ee>0&&o.jsx(Ms,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>Re(Ee),title:Ne,className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",ie?"font-medium text-foreground":"text-muted-foreground"),children:Ne})]},`${Ne}-${Ee}`)}),e[34]=l,e[35]=E,e[36]=w,e[37]=f,e[38]=u,e[39]=d,e[40]=C,e[41]=se,e[42]=me,e[43]=ae,e[44]=ce,e[45]=Q,e[46]=q,e[47]=G}else C=e[40],se=e[41],me=e[42],ae=e[43],ce=e[44],Q=e[45],q=e[46],G=e[47];let W;e[54]!==se||e[55]!==me||e[56]!==ae?(W=o.jsx("nav",{"aria-label":se,className:me,children:ae}),e[54]=se,e[55]=me,e[56]=ae,e[57]=W):W=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=()=>O(!0),e[58]=X):X=e[58];let ee;e[59]!==u?(ee=u("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=u,e[60]=ee):ee=e[60];let P;e[61]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(ur,{size:14}),e[61]=P):P=e[61];let H;e[62]!==g||e[63]!==ee?(H=o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{size:"icon",className:"shrink-0",disabled:g,onClick:X,"aria-label":ee,children:P})}),e[62]=g,e[63]=ee,e[64]=H):H=e[64];let ue;e[65]!==u?(ue=u("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=u,e[66]=ue):ue=e[66];let xe;e[67]!==ue?(xe=o.jsx(et,{side:"bottom",children:ue}),e[67]=ue,e[68]=xe):xe=e[68];let Be;e[69]!==H||e[70]!==xe?(Be=o.jsxs(tt,{children:[H,xe]}),e[69]=H,e[70]=xe,e[71]=Be):Be=e[71],e[72]!==ce||e[73]!==W||e[74]!==Be?(Y=o.jsxs("div",{className:ce,children:[W,Be]}),e[72]=ce,e[73]=W,e[74]=Be,e[75]=Y):Y=e[75],V="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",U=u("sandbox.availableSectionEditor.localEditsHint",{typeLabel:le}),e[5]=y,e[6]=a,e[7]=l,e[8]=E,e[9]=w,e[10]=g,e[11]=f,e[12]=s,e[13]=i,e[14]=c,e[15]=u,e[16]=b?.taskId,e[17]=d,e[18]=n,e[19]=C,e[20]=A,e[21]=V,e[22]=U,e[23]=Q,e[24]=Y,e[25]=q,e[26]=G}else C=e[19],A=e[20],V=e[21],U=e[22],Q=e[23],Y=e[24],q=e[25],G=e[26];let M;e[76]!==V||e[77]!==U?(M=o.jsx("p",{className:V,children:U}),e[76]=V,e[77]=U,e[78]=M):M=e[78];let K;e[79]!==M||e[80]!==Q||e[81]!==Y?(K=o.jsxs("div",{className:Q,children:[Y,M]}),e[79]=M,e[80]=Q,e[81]=Y,e[82]=K):K=e[82];let J;e[83]!==l||e[84]!==E||e[85]!==k||e[86]!==w||e[87]!==r||e[88]!==p||e[89]!==A||e[90]!==z||e[91]!==u?(J=o.jsx(tn,{className:"min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:z?o.jsx(Uo,{schema:z,value:w,onChange:le=>N(le),basePath:"",breadcrumbPath:E,onBreadcrumbChange:S,meta:r,decofile:l,onSaveReferencedBlock:p,sandbox:A},k):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=l,e[84]=E,e[85]=k,e[86]=w,e[87]=r,e[88]=p,e[89]=A,e[90]=z,e[91]=u,e[92]=J):J=e[92];let oe;e[93]!==K||e[94]!==J||e[95]!==q?(oe=o.jsxs("div",{className:q,children:[K,J]}),e[93]=K,e[94]=J,e[95]=q,e[96]=oe):oe=e[96];let ge;e[97]!==m||e[98]!==C||e[99]!==g||e[100]!==B?(ge=o.jsx(qi,{open:B,onOpenChange:O,defaultBlockId:m,isPending:g,onSubmit:C}),e[97]=m,e[98]=C,e[99]=g,e[100]=B,e[101]=ge):ge=e[101];let re;return e[102]!==oe||e[103]!==ge||e[104]!==G?(re=o.jsxs("div",{className:G,children:[oe,ge]}),e[102]=oe,e[103]=ge,e[104]=G,e[105]=re):re=e[105],re}function Xu(t){return t+1}function Ju(t,e,s){const n={__resolveType:t},a=Br([n],e)[0];return a?mi(n,a,e,s):null}function Qu({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:l}){const c=_e(),d=Zs(),m=d?.virtualMcpId,f=da(m===e?e:null)?.metadata?.siteSlug??null,[p]=L.useState(()=>Ju(r,i,pi(a))),[u,b]=L.useState(p?.data??{}),[h,_]=L.useState([]),[y,j]=L.useState(0),[w,N]=L.useState(!1),[v,E]=L.useState(null),S=v!==null,{save:k,flush:T}=Wi({orgSlug:t,virtualMcpId:e,branch:s},{holdsCopy:!0}),B=p?.resolveType?Fn(p.resolveType,a):null,O=In(e,s),D=O.kind==="protocol"&&O.source==="github",z=i[r],C=z?Er(r,z):r,A=d?.taskId??null,V={orgSlug:t,virtualMcpId:e,branch:s,threadId:A,previewUrl:n??void 0,siteSlug:f},U=M=>{b(M),k(r,M)},Q=()=>{S?(E(null),N(!1),j(M=>M+1)):E(JSON.stringify(u,null,2))},Y=M=>{const K=M??"";try{const J=JSON.parse(K);if(J&&typeof J=="object"&&!Array.isArray(J)){N(!1),U(J);return}N(!0)}catch{N(!0)}},q=[C,...h],G=M=>{_(h.slice(0,M)),j(K=>K+1)};return o.jsx("div",{className:"flex h-full w-full min-w-0",children:o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx(Xi,{crumbs:q,onSelect:G}),o.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Dn},"aria-hidden":!0}),D?o.jsx("span",{className:"min-w-0 truncate text-sm font-medium","data-testid":"saved-section-title",children:C}):null,o.jsx("div",{className:"flex-1"}),o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{variant:S?"default":"ghost",size:"icon",className:"shrink-0",onClick:Q,"aria-label":c(S?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":S,children:S?o.jsx(Bn,{size:14}):o.jsx(Xo,{size:14})})}),o.jsx(et,{side:"bottom",children:c(S?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson")})]})]}),o.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:c("sandbox.savedSectionEditor.globalSectionDescription")})]}),o.jsxs("div",{className:"relative min-h-0 flex-1",children:[o.jsx(tn,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:B?o.jsx(Uo,{schema:B,value:u,onChange:M=>U(M),basePath:"",breadcrumbPath:h,onBreadcrumbChange:_,meta:a,decofile:i,onSaveReferencedBlock:l,sandbox:V},y):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sandbox.savedSectionEditor.noEditableFields")})})})}),v!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[w&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(pa,{language:"json",height:"100%",code:v,onChange:Y,onSave:M=>{Y(M),T()}})})]})]})]})})}function Zu(t){const e=pe.c(46),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,isCreating:d,onCreateAvailable:m,onSaveReferencedBlock:g}=t,f=_e();if(!s){let y;e[0]!==f?(y=f("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=f,e[1]=y):y=e[1];let j;e[2]!==f?(j=f("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=f,e[3]=j):j=e[3];let w;return e[4]!==y||e[5]!==j?(w=o.jsx(jt,{title:y,description:j}),e[4]=y,e[5]=j,e[6]=w):w=e[6],w}if(s.collection==="available-section"){const y=`available:${s.resolveType}`,j=s.resolveType,w=s.title;let N;e[7]!==s.title?(N=Ji(s.title),e[7]=s.title,e[8]=N):N=e[8];let v;e[9]!==m||e[10]!==s.resolveType?(v=(S,k)=>m(s.resolveType,S,k),e[9]=m,e[10]=s.resolveType,e[11]=v):v=e[11];let E;return e[12]!==i||e[13]!==c||e[14]!==d||e[15]!==l||e[16]!==g||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==y||e[22]!==N||e[23]!==v||e[24]!==a?(E=o.jsx(Wu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,resolveType:j,title:w,defaultBlockId:N,isCreating:d,onCreate:v,onSaveReferencedBlock:g},y),e[12]=i,e[13]=c,e[14]=d,e[15]=l,e[16]=g,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=y,e[22]=N,e[23]=v,e[24]=a,e[25]=E):E=e[25],E}const p=`saved:${s.key}`,u=s.key;let b;e[26]!==c||e[27]!==s.key?(b=Object.hasOwn(c,s.key),e[26]=c,e[27]=s.key,e[28]=b):b=e[28];let h;e[29]!==i||e[30]!==c||e[31]!==l||e[32]!==g||e[33]!==n||e[34]!==r||e[35]!==s.key||e[36]!==a?(h=o.jsx(Qu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,blockKey:s.key,onSaveReferencedBlock:g}),e[29]=i,e[30]=c,e[31]=l,e[32]=g,e[33]=n,e[34]=r,e[35]=s.key,e[36]=a,e[37]=h):h=e[37];let _;return e[38]!==i||e[39]!==n||e[40]!==s.key||e[41]!==p||e[42]!==b||e[43]!==h||e[44]!==a?(_=o.jsx(Vo,{orgSlug:n,virtualMcpId:a,branch:i,blockKey:u,present:b,children:h},p),e[38]=i,e[39]=n,e[40]=s.key,e[41]=p,e[42]=b,e[43]=h,e[44]=a,e[45]=_):_=e[45],_}function Rs(t){const e=pe.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:l}=t,c=_e();let d;e[0]!==c?(d=c("sandbox.itemActions.moreActions"),e[0]=c,e[1]=d):d=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(fi,{size:14}),e[2]=m):m=e[2];let g;e[3]!==d?(g=o.jsx(Is,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":d,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer",onClick:ep,children:m})}),e[3]=d,e[4]=g):g=e[4];let f;e[5]!==n||e[6]!==c?(f=n&&o.jsxs(at,{onClick:n,children:[o.jsx(ul,{size:14}),c("sandbox.itemActions.rename")]}),e[5]=n,e[6]=c,e[7]=f):f=e[7];let p;e[8]!==s||e[9]!==c?(p=s&&o.jsxs(at,{onClick:s,children:[o.jsx(Mn,{size:14}),c("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=c,e[10]=p):p=e[10];let u;e[11]!==a||e[12]!==c?(u=a&&o.jsxs(o.Fragment,{children:[o.jsx(mn,{}),o.jsxs(at,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Wo,{size:14}),c("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=c,e[13]=u):u=e[13];let b;e[14]!==i||e[15]!==r||e[16]!==c?(b=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(mn,{}),i&&o.jsxs(at,{onClick:i,children:[o.jsx(Yo,{size:14}),c("sandbox.itemActions.editSeo")]}),r&&o.jsxs(at,{onClick:r,children:[o.jsx(Xo,{size:14}),c("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=c,e[17]=b):b=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(mn,{}),e[18]=h):h=e[18];let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Vn,{size:14}),e[19]=_):_=e[19];let y;e[20]!==c?(y=c("sandbox.itemActions.delete"),e[20]=c,e[21]=y):y=e[21];let j;e[22]!==l||e[23]!==y?(j=o.jsxs(at,{onClick:l,className:"text-destructive focus:text-destructive",children:[_,y]}),e[22]=l,e[23]=y,e[24]=j):j=e[24];let w;e[25]!==j||e[26]!==f||e[27]!==p||e[28]!==u||e[29]!==b?(w=o.jsxs(Fs,{align:"end",className:"w-44",children:[f,p,u,b,h,j]}),e[25]=j,e[26]=f,e[27]=p,e[28]=u,e[29]=b,e[30]=w):w=e[30];let N;return e[31]!==w||e[32]!==g?(N=o.jsxs(zs,{children:[g,w]}),e[31]=w,e[32]=g,e[33]=N):N=e[33],N}function ep(t){return t.stopPropagation()}function Do(t,e,{neverPublished:s=!1}={}){return e&&s?t==="post"?"sandbox.postEditor.deletePostConfirmBodyNeverPublished":"sandbox.contentBrowser.deleteDialog.descriptionNeverPublished":t==="section"?e?"sandbox.contentBrowser.deleteDialog.descriptionSectionDraft":"sandbox.contentBrowser.deleteDialog.descriptionSection":t==="post"?e?"sandbox.postEditor.deletePostConfirmBodyDraft":"sandbox.postEditor.deletePostConfirmBody":e?"sandbox.contentBrowser.deleteDialog.descriptionDraft":"sandbox.contentBrowser.deleteDialog.descriptionPermanent"}const oi=4;function ln(t){const e=new Map;for(const s of t)s.slug&&!e.has(s.slug)&&e.set(s.slug,s);return e}function cn(t,e){const s=t.parentSlug;if(!t.slug||!s||s===t.slug)return;const n=e.get(s);return n===t?void 0:n}function ai(t,e){const s=ln(e),n=[],a=new Set;let i=s.get(t);for(;i&&!a.has(i.slug??"")&&(a.add(i.slug??""),n.push(i),!(n.length>=oi));)i=cn(i,s);return n.reverse()}function ii(t,e){const s=new Map;for(const n of t){const a=cn(n,e);if(!a?.slug)continue;const i=s.get(a);i?i.push(n):s.set(a,[n])}for(const n of s.values())n.sort((a,i)=>a.label.localeCompare(i.label));return s}function Jm(t,e){const s=ln(e),n=ii(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const l=[];for(const c of r)for(const d of n.get(c)??[])d.slug&&!a.has(d.slug)&&(a.add(d.slug),l.push(d));r=l}return a.delete(t),a}function Qm(t,e){if(!t)return[];const s=ln(e),n=ai(t,e),a=n[0];return!a||cn(a,s)?[t]:n.map(i=>i.slug??"")}function tp(t){const e=ln(t),s=ii(t,e),n=new Set,a=[],i=(l,c)=>{if(!n.has(l)&&(n.add(l),a.push({entry:l,depth:c}),!(c+1>=oi)))for(const d of s.get(l)??[])i(d,c+1)},r=t.filter(l=>!cn(l,e)).sort((l,c)=>l.label.localeCompare(c.label));for(const l of r)i(l,0);for(const l of t)i(l,0);return a}function sp(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function np(t){const e=new Map;for(const s of t){const n=sp(s.resolveType),a=e.get(n);a?a.push(s):e.set(n,[s])}return[...e.entries()].map(([s,n])=>({label:s,sections:n})).sort((s,n)=>s.label.localeCompare(n.label))}function Oo(t){const e=pe.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=ve("flex items-center gap-1.5 px-2.5 pb-1 pt-1 text-xs font-medium text-muted-foreground/70",a),e[0]=a,e[1]=i):i=e[1];let r;e[2]!==s?(r=o.jsx(s,{size:13,className:"shrink-0"}),e[2]=s,e[3]=r):r=e[3];let l;return e[4]!==n||e[5]!==i||e[6]!==r?(l=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=l):l=e[7],l}const Ro=L.lazy(()=>He(()=>import("./app-editor-C-CTy5jL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142])).then(t=>({default:t.AppEditor}))),op=L.lazy(()=>He(()=>import("./cms-settings-editor-DQJghv4n.js"),__vite__mapDeps([143,1,2,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,109,110,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,111,112,57,113,114,0,22,23,24,56,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,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142])).then(t=>({default:t.CmsSettingsEditor}))),ap=L.lazy(()=>He(()=>import("./post-editor-CtDaen5o.js"),__vite__mapDeps([144,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,65,145,141,138,77,78,118,130,127,116,117,56,57,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,23,103,104,105,106,107,108,109,110,111,112,113,114,115,22,119,120,121,122,123,124,125,126,128,129,131,132,133,146,147,134,148,149,150,135,151,152,153,154,136,137,139,140,142])).then(t=>({default:t.PostEditor}))),ip=L.lazy(()=>He(()=>import("./record-editor-hmgA54LD.js"),__vite__mapDeps([155,1,2,65,122,23,70,36,117,56,57,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,66,67,20,68,4,5,6,7,8,9,69,18,11,12,13,14,15,16,17,3,10,19,21,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,118,22,119,120,121,123,124,125,126,127,128,129,130,131,132,133,150,154,135,136,137,138,139,140,141,142])).then(t=>({default:t.RecordEditor}))),rp=L.lazy(()=>He(()=>import("./context-BTZ4zLZ6.js"),__vite__mapDeps([156,1,2,100,30,50,77,78,51,65,101,102,23,103,104,105,106,107,108,26,27,28,29,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,52,53,54,55,99,109,110,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,111,112,57,113,114,115,141,116,117,118,56,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,22,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,154,157,147,149,158,159,135,148,136,137,138,139,140,142])).then(t=>({default:t.BlogContext}))),lp=L.lazy(()=>He(()=>import("./category-editor-CS1KKmTs.js"),__vite__mapDeps([160,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,31,33,25,65,122,23,70,36,150,26,28,29,30,32,34,35,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,66,67,68,69,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,22,119,120,121,123,124,125,126,127,128,129,130,131,132,133,146,147,134,148,149,140,151,152,153,154,135,136,137,138,139,141,142])).then(t=>({default:t.CategoryEditor}))),cp=L.lazy(()=>He(()=>import("./sections-editor-DZMEPtw_.js"),__vite__mapDeps([161,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,56,57,33,41,26,27,28,29,30,31,32,34,35,36,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,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,23,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,22,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,135,24,134,162,163,140,164,153])).then(t=>({default:t.SectionsEditor}))),dp=L.lazy(()=>He(()=>import("./seo-editor-DOL-unZx.js"),__vite__mapDeps([165,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,22,23,56,57,58,59,60,61,62,63,64,65,66,67,20,68,4,5,6,7,8,9,69,70,18,11,12,13,14,15,16,17,3,10,19,21,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,162])).then(t=>({default:t.SeoEditor}))),up=L.lazy(()=>He(()=>import("./variant-calendar-CVJKB37H.js"),__vite__mapDeps([166,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,65,22,23,116,69,70,126,127,139])).then(t=>({default:t.VariantCalendar}))),pp=L.lazy(()=>He(()=>import("./campaigns-view-3-zGJglb.js"),__vite__mapDeps([167,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,141,22,23,126,127,69,70,168,65,99,100,77,78,101,102,103,104,105,106,107,108,109,110,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,111,112,57,113,114,115,169,163,140,139])).then(t=>({default:t.CampaignsView}))),mp=L.lazy(()=>He(()=>import("./post-calendar-WzBoQET7.js"),__vite__mapDeps([170,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,22,23,139,21,16,15,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,100,77,78,65,101,102,103,104,105,106,107,108,99,109,110,111,112,57,113,114,115,56,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,135,136,137,138,140,141,142])).then(t=>({default:t.PostCalendar}))),fp=L.lazy(()=>He(()=>import("./redirect-editor-DS-wqNcI.js"),__vite__mapDeps([171,1,2,138,46,65,122,23,70,36,56,57,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,66,67,20,68,4,5,6,7,8,9,69,18,11,12,13,14,15,16,17,3,10,19,21,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,22,119,120,121,123,124,125,126,127,128,129,130,131,132,133,154])).then(t=>({default:t.RedirectEditor})));function gp(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"campaigns":!s&&t==="campaigns"?"calendar":t}function hp(t,e){return t&&(Pt(t)||e&&(t==="sections"||t==="campaigns"))?t:null}function xp(t){const e=pe.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=Rn(),{org:i}=gi(),r=Jr(),l=Qr(),{runtime:c,previewServerUrl:d}=zn(a),m=c==="cms",g=In(a,n);let f,p;e[0]!==g||e[1]!==m||e[2]!==l.previewState||e[3]!==r.lifecycle.phase?(f=aa(g),p=nc({fastPreviewActive:m||f,previewState:l.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=g,e[1]=m,e[2]=l.previewState,e[3]=r.lifecycle.phase,e[4]=f,e[5]=p):(f=e[4],p=e[5]);const u=p;if(u.kind==="sandbox-card"){const y=`/${i.slug}/settings/connections`;let j;return e[6]!==u.state||e[7]!==l.start||e[8]!==y||e[9]!==r.lifecycle||e[10]!==r.phase?(j=o.jsx(tc,{state:u.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:l.start,connectionsHref:y}),e[6]=u.state,e[7]=l.start,e[8]=y,e[9]=r.lifecycle,e[10]=r.phase,e[11]=j):j=e[11],j}if(!a||!n){let y;return e[12]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(jt,{title:"Waiting for sandbox context…"}),e[12]=y):y=e[12],y}if(_i(g)){let y;return e[13]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Ti,{}),e[13]=y):y=e[13],y}if(g.kind==="pending"){let y;return e[14]!==g?(y=o.jsx(Ai,{backend:g}),e[14]=g,e[15]=y):y=e[15],y}const b=f?null:l.previewUrl;let h;e[16]!==g||e[17]!==m||e[18]!==l.previewUrl||e[19]!==d?(h=g.kind==="protocol"&&g.source==="local"?yr(g):m?d:l.previewUrl,e[16]=g,e[17]=m,e[18]=l.previewUrl,e[19]=d,e[20]=h):h=e[20];let _;return e[21]!==n||e[22]!==s||e[23]!==u.devServerReady||e[24]!==u.sandboxWarming||e[25]!==i.slug||e[26]!==b||e[27]!==h||e[28]!==a?(_=o.jsx(yp,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:b,sitePreviewUrl:h,deepLinkPage:s,devServerReady:u.devServerReady,sandboxWarming:u.sandboxWarming}),e[21]=n,e[22]=s,e[23]=u.devServerReady,e[24]=u.sandboxWarming,e[25]=i.slug,e[26]=b,e[27]=h,e[28]=a,e[29]=_):_=e[29],_}const $o=2e3,bp=15;function Lo(t,e,s,n){return typeof e!="string"||s&&(fa(e,s,n)||t.state.dataUpdateCount>=bp)?!1:$o}function yp({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:l}){const c=_e(),d=Zs()?.taskId??null,m={orgSlug:t,virtualMcpId:e,branch:s,threadId:d,previewUrl:n},g=In(e,s),f=!aa(g),p=g.kind==="protocol"&&g.source==="github";hi(p);const u=Qi({orgSlug:t,virtualMcpId:e,branch:s}),b=Zi()===void 0,{data:h,isLoading:_}=vr(m,{fetchEnabled:r}),y=Ko({strict:!1}),[j,w]=L.useState(()=>hp(y.contentCollection,!f)??"pages"),N=ma(),v=gp(j,N,!f),{openPanel:E}=Yr(),S={open:x=>{if(x==="campaigns"){T(null),w("campaigns");return}E("experiments")}},[k,T]=L.useState(()=>y.contentItem&&(Pt(v)||v==="sections")?{collection:v,key:y.contentItem}:null),[B,O]=L.useState(()=>{const x=f?null:Zn(y);return x&&y.contentItem&&k?{blockKey:y.contentItem,focus:x,seq:1}:null}),D=k&&"key"in k?k.key:null;B&&B.blockKey!==D&&O(null);const[z,C]=L.useState(null),{data:A,isLoading:V,isFetching:U}=Pi(m,{fetchEnabled:r,refetchInterval:x=>{const $=x.state.data;if(v==="apps"&&k&&k.collection==="apps"){const Z=h?.[k.key];return Lo(x,typeof Z?.__resolveType=="string"?Z.__resolveType:void 0,$)}if(v==="site"&&h){const Z=$?io(h,$):null,te=h.site,je=Z?.resolveType??(typeof te?.__resolveType=="string"?te.__resolveType:void 0);return Lo(x,je,$,["seo"])}return!1}}),Q=!!(i?.pageId||i?.path||i?.pathTemplate),[Y,q]=L.useState(!1);if(Q&&!Y&&k===null&&h&&!V){q(!0);const x=Dr(ao(h,A),i??{});if(x){w("pages"),T({collection:"pages",key:x.key,path:x.path});const $=f?null:Zn(y);$&&O({blockKey:x.key,focus:$,seq:1})}}const[G,M]=L.useState(""),[K,J]=L.useState("list"),oe=x=>{T(x),C(null)},[ge,re]=L.useState(v);ge!==v&&(re(v),M(""));const le=(x,$)=>!fa(x,A,$)&&(V||U),{createTask:he}=Rn(),de=zn(e),be=Xl(e,A??void 0),se=sa(e).url,me=On("site_apps_install_enabled")&&be!==null&&!se,ae=A&&h?Gl(be?ya(be):[],A,h):[],ce=Yl({orgSlug:t,virtualMcpId:e,branch:s}),W=en(m),X=Mr(m),ee=Md({orgSlug:t,virtualMcpId:e,branch:s,decofile:h??{},onMoved:(x,$)=>T(Z=>Z?.collection==="posts"&&Z.key===x?{collection:"posts",key:$}:Z)}),[P,H]=L.useState(null),[ue,xe]=L.useState(),[Be,Pe]=L.useState(!1),[Re,Ae]=L.useState(),[Ce,Ee]=L.useState(null),[ie,Ne]=L.useState(null),Le=ie?.kind==="blog"?ps[ie.blogKind]:ie?.kind??"item",F=ie?.kind==="section"?c(Do("section",p,{neverPublished:u(ie.key)}),{label:ie.label}):ie?c(Do("block",p,{neverPublished:u(ie.key)}),{label:ie.label}):null,ye=c("sandbox.contentBrowser.deleteDialog.title",{noun:Le}),ke=xc(F===null?null:{title:ye,description:F},p),[Te,Ve]=L.useState(null),vs=!h||!A;if(_||V||b||vs&&l)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(Tt,{className:"size-5 text-muted-foreground"})});if(vs)return o.jsx(jt,{title:"Could not load site data."});if(kr(A))return o.jsx(er,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h});const lt=ao(h,A).sort((x,$)=>x.name.localeCompare($.name)),wt=Or(h).sort((x,$)=>x.from.localeCompare($.from)),Dt=Rr(h,A),Ot=v==="sections"?$r(A):[],ct=io(h,A),Ye=Na(h),Ct=Hn.some(x=>Ye[x].length>0),dn=Pt(v)?Ye[v]:[],Rt=eo(A,"loaders"),Je=eo(A,"actions"),$t=f?["settings","campaigns"]:["calendar","apps",...ct?[]:["site"],...Je===0?["actions"]:[],...hl(A)?[]:["settings"]];if(!Lr(h,A)&&!Ct&&Rt===0&&Je===0)return o.jsx(jt,{icon:fs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const dt={pages:lt.length,sections:Dt.length,apps:f?ae.length:0,loaders:Rt,actions:Je,redirects:wt.length,posts:Ye.posts.length,authors:Ye.authors.length,categories:Ye.categories.length},st=new Set(lt.map(x=>$s(x.path))),is=new Set(lt.map(x=>x.name)),ut=new Set(Dt.map(x=>x.name)),Lt=async x=>{const $=h[x.key];if(!$)return;const Z=ra(h,x.key),te=Kr(h,x.key,Math.max(0,Z-1)),je=Ir($.sections,te,A,!f);if(je)try{const we=await W.mutateAsync({blockKey:x.key,data:{...$,sections:je.sections}});ze(we)||fe.success(`Variant added to "${x.name}"`),T({collection:"pages",key:x.key,path:x.path})}catch(we){fe.error(we instanceof Error?we.message:"Could not add variant")}},pt=()=>{xe(void 0),H({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},mt=x=>{xe(void 0),H({mode:"duplicate",sourceKey:x.key,initialName:fo(is,x.name),initialPath:oc(st,x.path)})},Kt=x=>{xe(void 0),H({mode:"rename",sourceKey:x.key,initialName:x.name,initialPath:x.path})},It=async x=>{if(!P)return;const{mode:$,sourceKey:Z}=P;try{if($==="create"){let te;if(x.templateKey){const Ie=h[x.templateKey];if(!Ie)throw new Error("Selected template no longer exists.");te={...Ie,name:x.name,path:x.path}}else te=rc(x.name,x.path,f?void 0:A);const je=cc(h,x.name),we=await W.mutateAsync({blockKey:je,data:te});ze(we)||fe.success(`Created "${x.name}"`),T({collection:"pages",key:je,path:x.path})}else if($==="duplicate"&&Z){const te=h[Z];if(!te)throw new Error("Source page not found");const{key:je,data:we}=ic({source:te,pages:lt,newName:x.name,newPath:x.path}),Ie=await W.mutateAsync({blockKey:je,data:we});ze(Ie)||fe.success(`Duplicated as "${x.name}"`),T({collection:"pages",key:je,path:x.path})}else if($==="rename"&&Z){const te=h[Z];if(!te)throw new Error("Page not found");const je={...te,name:x.name,path:x.path},we=await W.mutateAsync({blockKey:Z,data:je});ze(we)||fe.success("Page updated"),k?.collection==="pages"&&k.key===Z&&T({collection:"pages",key:Z,path:x.path})}H(null)}catch(te){xe(te instanceof Error?te.message:"Save failed")}},ft=({path:x})=>{if(!P)return null;const $=$s(x);return(P.mode==="rename"?$s(P.initialPath):null)!==$&&st.has($)?`A page with path "${x}" already exists.`:null},Ft=async(x,$,Z)=>{const te=await W.mutateAsync({blockKey:$,data:{...Z,name:$,__resolveType:x},create:!0});ze(te)||fe.success(c("sandbox.contentBrowser.createdSection",{name:$})),T({collection:"sections",key:$})},gt=Mo((x,$)=>W.mutate({blockKey:x,data:$})),ht=async x=>{const $=h[x.key];if(!$){fe.error(c("sandbox.contentBrowser.sectionNotFound"));return}const Z=ac(h,x.key),te=fo(ut,x.name),je={...$,name:te};try{const we=await W.mutateAsync({blockKey:Z,data:je,create:!0});ze(we)||fe.success(c("sandbox.contentBrowser.duplicatedSection",{name:x.name})),T({collection:"sections",key:Z})}catch(we){fe.error(we instanceof Error?we.message:c("sandbox.contentBrowser.duplicateFailed"))}},zt=async x=>{if(!Ce)return;const $=h[Ce];if(!$){fe.error(c("sandbox.contentBrowser.sectionNotFound"));return}try{const Z=await W.mutateAsync({blockKey:Ce,data:{...$,name:x}});ze(Z)||fe.success(c("sandbox.contentBrowser.sectionRenamed")),Ee(null)}catch(Z){fe.error(Z instanceof Error?Z.message:c("sandbox.contentBrowser.renameFailed"))}},xt=()=>{Ae(void 0),Pe(!0)},bt=async x=>{const $=Fr(h,x.from),Z=zr(x);try{const te=await W.mutateAsync({blockKey:$,data:Z});ze(te)||fe.success("Created redirect"),Pe(!1),T({collection:"redirects",key:$})}catch(te){Ae(te instanceof Error?te.message:"Could not create redirect")}},yt=async x=>{const $=Sn(h,x),Z=es($,x,Ra(x));try{const te=await W.mutateAsync({blockKey:$,data:Z});ze(te)||fe.success(`Created ${ps[x]}`),T({collection:x,key:$})}catch(te){fe.error(te instanceof Error?te.message:"Could not create")}},vt=async x=>{const $=Sn(h,"posts"),Z=es($,"posts",Kd(x));try{const te=await W.mutateAsync({blockKey:$,data:Z});ze(te)||fe.success(c("sandbox.postCalendar.createdScheduledPost")),w("posts"),re("posts"),T({collection:"posts",key:$}),C(null)}catch(te){fe.error(te instanceof Error?te.message:c("sandbox.postCalendar.couldNotCreate"))}},kt=async(x,$)=>{const Z=h[x],te=Z?Fd(At(Z,"posts"),$):null;if(!te){fe.error(c("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await W.mutateAsync({blockKey:x,data:es(x,"posts",te)})}catch(je){fe.error(je instanceof Error?je.message:c("sandbox.postCalendar.couldNotReschedule"))}},St=async x=>{const $=h[x.key];if(!$){fe.error("Record not found.");return}const Z=Sn(h,x.kind),te=x.kind==="posts"?"title":"name",je={...structuredClone(At($,x.kind)),[te]:`${x.label} (copy)`};if(x.kind==="categories"){const we=Ye.categories.map(Ie=>Ie.slug??"").filter(Boolean);je.slug=$d(String(je.slug??""),we)}try{const we=await W.mutateAsync({blockKey:Z,data:es(Z,x.kind,je)});ze(we)||fe.success(`Duplicated "${x.label}"`),T({collection:x.kind,key:Z})}catch(we){fe.error(we instanceof Error?we.message:"Duplicate failed")}},Mt=()=>{w("posts"),re("posts"),T(null),C(null),M("")},Vt=async()=>{if(!ie)return;let x;try{const{kind:$,key:Z,label:te}=ie;if($==="blog"){if(ie.blogKind==="categories"){const je=At(h[Z],"categories").slug,we=typeof je=="string"?je:"";if(we)for(const{key:Ie,payload:nt}of Oa(h)){const ot=Wc(nt,we);ot!==nt&&await W.mutateAsync({blockKey:Ie,data:Gc(Ie,Xc(ot))})}}x=await X.mutateAsync({blockKey:Z})}else x=await X.mutateAsync({blockKey:Z});if(Ne(null),ze(x))return;fe.success(`Deleted "${te}"`),k&&k.collection!=="available-section"&&k.key===Z&&T(null),Ne(null)}catch($){fe.error($ instanceof Error?$.message:"Delete failed")}},qe=X.isPending||W.isPending;return o.jsx(tr,{value:!f,children:o.jsxs("div",{className:"flex h-full w-full",children:[o.jsx(Zl,{active:v,counts:dt,hidden:$t,showBlog:Ct,showContext:N,onSelect:x=>{w(x),T(null),C(null)}}),v!=="seo"&&v!=="site"&&v!=="settings"&&v!=="context"&&v!=="calendar"&&v!=="campaigns"&&v!=="post-schedule"&&v!=="posts"&&v!=="loaders"&&v!=="actions"&&o.jsx(vp,{activeCollection:v,pages:lt,redirects:wt,sections:Dt,availableSections:Ot,appCatalog:ae,canInstallApps:me,installingAppId:ce.isPending?ce.variables?.blockKey??null:null,onInstallApp:x=>{if(de.resolved){if(de.runtime==="cms"){fe.error(c("sandbox.appEditor.installNeedsCodingSession"),{action:{label:c("chat.fastPreview.startCodingSession"),onClick:()=>he({runtime:"sandbox"})}});return}ce.mutate({blockKey:x.id},{onSuccess:$=>oe({collection:"apps",key:$.key}),onError:$=>fe.error($.message)})}},blogEntries:dn,decofile:h,searchQuery:G,onSearchChange:M,selection:k,onSelect:oe,onCreate:()=>{v==="pages"?pt():v==="redirects"?xt():Pt(v)&&yt(v)},onDuplicatePage:mt,onRenamePage:Kt,onAddPageVariant:Lt,onDeletePage:x=>Ne({kind:"page",key:x.key,label:x.name}),onEditPageSeo:x=>{const $={collection:"pages",key:x.key,path:x.path};T($),C(x.key)},onViewPageJson:x=>Ve(x.key),onDuplicateSection:ht,onRenameSection:x=>Ee(x.key),onDeleteSection:x=>Ne({kind:"section",key:x.key,label:x.name}),onDeleteRedirect:x=>Ne({kind:"redirect",key:x.key,label:x.from||x.key}),onDuplicateBlog:St,onDeleteBlog:x=>Ne({kind:"blog",blogKind:x.kind,key:x.key,label:x.label})}),o.jsx("div",{className:"flex-1 min-w-0",children:v==="loaders"||v==="actions"?o.jsx(Iu,{orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:A,decofile:h,kind:v}):o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(Tt,{className:"size-5 text-muted-foreground"})}),children:v==="calendar"?o.jsx(up,{decofile:h}):v==="campaigns"?o.jsx(pp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A,onOpenUse:x=>{O($=>({blockKey:x.blockKey,focus:x.focus??{},seq:($?.seq??0)+1})),x.blockKind==="page"&&x.path!==void 0?(w("pages"),oe({collection:"pages",key:x.blockKey,path:x.path})):(w("sections"),oe({collection:"sections",key:x.blockKey}))}}):v==="post-schedule"?o.jsx(mp,{decofile:h,isCreating:W.isPending,onCreate:x=>{vt(x)},onReschedule:(x,$)=>{kt(x,$)},onSelect:x=>{w("posts"),re("posts"),T({collection:"posts",key:x}),C(null)}}):v==="site"?ct?o.jsx(Ro,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:ct.key,block:h[ct.key],decofile:h,meta:A,title:"Site",excludeFields:["seo"],schemaPending:le(ct.resolveType,["seo"]),previewBaseUrl:n},`site:${ct.key}`):o.jsx(jt,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):v==="settings"?o.jsx(op,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A}):v==="context"?o.jsx(rp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A}):v==="seo"?o.jsx(dp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,meta:A,target:{kind:"site"},previewBaseUrl:a}):v==="sections"?o.jsx(Zu,{selection:k?.collection==="sections"||k?.collection==="available-section"?k:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:A,decofile:h,isCreating:W.isPending,onCreateAvailable:Ft,onSaveReferencedBlock:gt}):v==="posts"?o.jsx(Cu,{orgSlug:t,virtualMcpId:e,branch:s,decofile:h,view:K,selectedKey:k?.collection==="posts"?k.key:null,onViewChange:x=>{J(x),T(null)},onClose:()=>T(null),onOpen:x=>{T({collection:"posts",key:x}),C(null)},move:ee,meta:A,renderDetail:(x,$)=>o.jsx(ap,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:x,block:h[x],decofile:h,meta:A,previewBaseUrl:a,move:ee,onClose:$?.onClose,expanded:$?.expanded,onToggleExpand:$?.onToggleExpand},`post:${ms(x)}`)}):k&&k.collection!=="available-section"?k.collection==="apps"?o.jsx(Ro,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:k.key,block:h[k.key],decofile:h,meta:A,previewBaseUrl:n,schemaPending:le(typeof h[k.key]?.__resolveType=="string"?String(h[k.key].__resolveType):void 0)},`app:${k.key}`):k.collection==="categories"?o.jsx(lp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:k.key,block:h[k.key],decofile:h,meta:A,onManagePosts:()=>Mt(),onOpenPost:x=>{w("posts"),re("posts"),T({collection:"posts",key:x}),C(null)},previewBaseUrl:a},`category:${k.key}`):k.collection==="authors"?o.jsx(ip,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:k.key,block:h[k.key],meta:A,decofile:h},`authors:${k.key}`):k.collection==="redirects"?o.jsx(fp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:k.key,block:h[k.key]},`redirect:${k.key}`):o.jsx(Ei,{value:S,children:o.jsx(cp,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:k.collection==="pages"?k.path:"/",activePageBlockKey:k.collection==="pages"?k.key:null,activeGlobalBlockKey:k.collection==="sections"?k.key:null,initialEditSeo:k.collection==="pages"&&z===k.key,onExitSeo:()=>C(null),focusVariant:B?.blockKey===k.key?{...B.focus,seq:B.seq}:null,onSelectRoot:()=>{T(null),C(null)}},k.collection==="pages"?`page:${k.key}`:`section:${k.key}`)}):o.jsx(jt,{title:`Select ${Pt(v)?`a ${ps[v]}`:v==="pages"?"a page":v==="apps"?"an app":v==="redirects"?"a redirect":"a section"} to edit`,description:v==="apps"?"Browse all apps and select an installed one to edit its settings.":'Pick an item from the list, or click "+" to create one.'})})}),P&&o.jsx(mc,{open:!!P,mode:P.mode,initialName:P.initialName,initialPath:P.initialPath,isPending:W.isPending,error:ue,templates:lt,validate:ft,onSubmit:It,onOpenChange:x=>{x||(H(null),xe(void 0))}}),o.jsx(gc,{open:Be,isPending:W.isPending,error:Re,onSubmit:bt,onOpenChange:x=>{x||(Pe(!1),Ae(void 0))}}),Ce&&o.jsx(hc,{open:!!Ce,blockKey:Ce,initialName:Dt.find(x=>x.key===Ce)?.name??Ce,isPending:W.isPending,onSubmit:zt,onOpenChange:x=>{x||Ee(null)}}),Te&&o.jsx(Vr,{open:!!Te,onOpenChange:x=>{x||Ve(null)},pageKey:Te,decofile:h,params:m}),o.jsx(xi,{open:!!ie,onOpenChange:x=>{!x&&!qe&&Ne(null)},children:o.jsxs(bi,{children:[o.jsxs(yi,{children:[o.jsx(vi,{children:ke?.title??ye}),o.jsx(ki,{children:ke?.description??null})]}),o.jsxs(Si,{children:[o.jsx(ji,{disabled:qe,children:c("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(wi,{onClick:x=>{x.preventDefault(),Vt()},disabled:qe,className:ve(Ci({variant:"destructive"})),children:qe?o.jsxs(o.Fragment,{children:[o.jsx(Tt,{className:"size-3.5"}),c("sandbox.contentBrowser.deleteDialog.deleting")]}):c("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function vp(t){const e=pe.c(60),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:l,canInstallApps:c,installingAppId:d,onInstallApp:m,blogEntries:g,decofile:f,searchQuery:p,onSearchChange:u,selection:b,onSelect:h,onCreate:_,onDuplicatePage:y,onRenamePage:j,onAddPageVariant:w,onDeletePage:N,onEditPageSeo:v,onViewPageJson:E,onDuplicateSection:S,onRenameSection:k,onDeleteSection:T,onDeleteRedirect:B,onDuplicateBlog:O,onDeleteBlog:D}=t,z=_e();let C,A,V,U,Q,Y;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==g||e[4]!==c||e[5]!==f||e[6]!==d||e[7]!==w||e[8]!==_||e[9]!==D||e[10]!==N||e[11]!==B||e[12]!==T||e[13]!==O||e[14]!==y||e[15]!==S||e[16]!==v||e[17]!==m||e[18]!==j||e[19]!==k||e[20]!==u||e[21]!==h||e[22]!==E||e[23]!==n||e[24]!==a||e[25]!==p||e[26]!==i||e[27]!==b||e[28]!==z){const K=p.toLowerCase(),J=n.filter(P=>!K||P.name.toLowerCase().includes(K)||P.path.toLowerCase().includes(K)),oe=a.filter(P=>!K||P.from.toLowerCase().includes(K)||P.to.toLowerCase().includes(K)),ge=i.filter(P=>!K||P.name.toLowerCase().includes(K)||P.key.toLowerCase().includes(K)||P.resolveType.toLowerCase().includes(K)),re=r.filter(P=>!K||P.title.toLowerCase().includes(K)||P.resolveType.toLowerCase().includes(K)||(P.description?.toLowerCase().includes(K)??!1)),le=np(ge),he=l.filter(P=>!K||P.title.toLowerCase().includes(K)||P.app.toLowerCase().includes(K)||P.vendor.toLowerCase().includes(K)||P.category.toLowerCase().includes(K)),de=g.filter(P=>!K||P.label.toLowerCase().includes(K)||P.subtitle.toLowerCase().includes(K)),be=s==="categories"&&!K?tp(de):de.map(Sp),se=`Search ${s}…`,me=Pt(s)?`Create new ${ps[s]}`:s==="redirects"?"Create new redirect":"Create new page",ae=s!=="apps"&&s!=="sections";Q="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let ce;e[35]===Symbol.for("react.memo_cache_sentinel")?(ce=o.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[35]=ce):ce=e[35];let W;e[36]!==u?(W=P=>u(P.target.value),e[36]=u,e[37]=W):W=e[37];let X;e[38]!==se||e[39]!==p||e[40]!==W?(X=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[ce,o.jsx("input",{type:"text",value:p,onChange:W,placeholder:se,"aria-label":se,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[38]=se,e[39]=p,e[40]=W,e[41]=X):X=e[41];let ee;e[42]!==me||e[43]!==_||e[44]!==ae?(ee=ae&&o.jsxs(tt,{children:[o.jsx(Ze,{asChild:!0,children:o.jsx(Oe,{variant:"ghost",size:"icon",onClick:_,"aria-label":me,children:o.jsx(Kn,{size:14})})}),o.jsx(et,{side:"bottom",children:me})]}),e[42]=me,e[43]=_,e[44]=ae,e[45]=ee):ee=e[45],e[46]!==X||e[47]!==ee?(Y=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[X,ee]}),e[46]=X,e[47]=ee,e[48]=Y):Y=e[48],C=tn,U="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",A="flex flex-col gap-1 p-1.5",V=s==="pages"?J.length===0?o.jsx(ls,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):J.map(P=>{const H=b?.collection==="pages"&&b.key===P.key,ue=ra(f,P.key);return o.jsx(Qe,{icon:Jo,title:P.name,subtitle:P.path,active:H,variantCount:ue,onClick:()=>h({collection:"pages",key:P.key,path:P.path}),menu:o.jsx(Rs,{onDuplicate:()=>y(P),onRename:()=>j(P),onAddVariant:()=>w(P),onEditSeo:()=>v(P),onViewJson:()=>E(P),onDelete:()=>N(P)})},P.key)}):s==="sections"?ge.length===0&&re.length===0?o.jsx(ls,{hasItems:i.length>0||r.length>0,emptyLabel:"No sections yet.",emptyHint:"Save a section from a page, or start the preview dev server."}):o.jsxs(o.Fragment,{children:[le.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Oo,{icon:Vs,label:"Saved sections"}),le.map(P=>o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("div",{className:"px-2.5 pt-1 pb-0.5 text-2xs font-medium text-muted-foreground/60",children:P.label}),P.sections.map(H=>{const ue=b?.collection==="sections"&&b.key===H.key;return o.jsx(Qe,{icon:Vs,accent:"global",title:H.name,subtitle:P.label,active:ue,onClick:()=>h({collection:"sections",key:H.key}),menu:o.jsx(Rs,{onDuplicate:()=>S(H),onRename:()=>k(H),onDelete:()=>T(H)})},H.key)})]},P.label))]}),re.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Oo,{icon:oo,label:"Available sections",className:ve(le.length>0&&"mt-3")}),re.map(P=>{const H=b?.collection==="available-section"&&b.resolveType===P.resolveType,ue=P.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(Qe,{icon:oo,title:P.title,subtitle:ue??P.resolveType,active:H,onClick:()=>h({collection:"available-section",resolveType:P.resolveType,title:P.title})},P.resolveType)})]})]}):s==="apps"?he.length===0?o.jsx(ls,{hasItems:l.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):he.map(P=>{const H=b?.collection==="apps"&&P.blockKey!==null&&b.key===P.blockKey,ue=d===P.id;return o.jsx(Qe,{icon:ea,logoUrl:P.logo,title:P.title,subtitle:P.category,active:H,trailing:P.installed?o.jsx("span",{className:"shrink-0 rounded-full bg-success/15 px-1.5 py-0.5 text-2xs font-medium text-success",children:"Installed"}):ue?o.jsx(Tt,{className:"size-3.5 shrink-0 text-muted-foreground"}):P.installable&&c?o.jsx("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:"Install"}):void 0,onClick:()=>{if(P.installed&&P.blockKey){h({collection:"apps",key:P.blockKey});return}if(!P.installable||!c){fe.message(`${P.title} is not installed on this site.`);return}d===null&&m(P)}},P.id)}):s==="redirects"?oe.length===0?o.jsx(ls,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):oe.map(P=>o.jsx(Qe,{icon:Go,title:P.from||"(no source)",subtitle:`→ ${P.to||"(no target)"}`,active:b?.collection==="redirects"&&b.key===P.key,trailing:o.jsx(bc,{redirect:P}),onClick:()=>h({collection:"redirects",key:P.key}),menu:o.jsx(Rs,{onDelete:()=>B(P)})},P.key)):de.length===0?o.jsx(ls,{hasItems:g.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${Pt(s)?ps[s]:"item"}.`}):be.map(P=>{const{entry:H,depth:ue}=P,xe=b?.collection===H.kind&&b.key===H.key;return o.jsx("div",{style:{paddingLeft:ue*16},children:o.jsx(Qe,{icon:H.kind==="posts"?Qo:H.kind==="authors"?ta:Ho,title:H.label,invalid:H.missing.length>0,invalidReason:H.missing.length>0?z("sandbox.itemRow.missingFields",{fields:Fc(H.missing,z)}):void 0,warning:H.duplicateName,warningReason:z("sandbox.itemRow.duplicateName"),subtitle:ue>0?ai(H.slug??"",de).map(kp).join(" / "):H.subtitle,active:xe,onClick:()=>h({collection:H.kind,key:H.key}),menu:o.jsx(Rs,{onDuplicate:()=>O(H),onDelete:()=>D(H)})})},H.key)}),e[0]=s,e[1]=l,e[2]=r,e[3]=g,e[4]=c,e[5]=f,e[6]=d,e[7]=w,e[8]=_,e[9]=D,e[10]=N,e[11]=B,e[12]=T,e[13]=O,e[14]=y,e[15]=S,e[16]=v,e[17]=m,e[18]=j,e[19]=k,e[20]=u,e[21]=h,e[22]=E,e[23]=n,e[24]=a,e[25]=p,e[26]=i,e[27]=b,e[28]=z,e[29]=C,e[30]=A,e[31]=V,e[32]=U,e[33]=Q,e[34]=Y}else C=e[29],A=e[30],V=e[31],U=e[32],Q=e[33],Y=e[34];let q;e[49]!==A||e[50]!==V?(q=o.jsx("div",{className:A,children:V}),e[49]=A,e[50]=V,e[51]=q):q=e[51];let G;e[52]!==C||e[53]!==U||e[54]!==q?(G=o.jsx(C,{className:U,children:q}),e[52]=C,e[53]=U,e[54]=q,e[55]=G):G=e[55];let M;return e[56]!==Q||e[57]!==Y||e[58]!==G?(M=o.jsxs("div",{className:Q,children:[Y,G]}),e[56]=Q,e[57]=Y,e[58]=G,e[59]=M):M=e[59],M}function kp(t){return t.slug}function Sp(t){return{entry:t,depth:0}}function Zm(t){const e=pe.c(25),{virtualMcpId:s}=t,n=_e(),[a,i]=L.useState(!1),r=ca(s),{connection:l}=Sr(s),{activeTask:c}=Rn();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const m=Ko(d);if(!(lo(r?.metadata)||lo(c?.metadata))&&!l){let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(co,{className:"size-7 text-foreground"})}),e[1]=p):p=e[1];let u;e[2]!==n?(u=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=u):u=e[3];let b;e[4]!==n?(b=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=b):b=e[5];let h,_;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=()=>i(!0),_=o.jsx(co,{className:"size-4"}),e[6]=h,e[7]=_):(h=e[6],_=e[7]);let y;e[8]!==n?(y=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=y):y=e[9];let j;e[10]!==y?(j=o.jsxs(Oe,{onClick:h,children:[_,y]}),e[10]=y,e[11]=j):j=e[11];let w;e[12]!==u||e[13]!==b||e[14]!==j?(w=o.jsx(pl,{className:"h-full",image:p,title:u,description:b,actions:j}),e[12]=u,e[13]=b,e[14]=j,e[15]=w):w=e[15];let N;e[16]!==a?(N=o.jsx(ml,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=N):N=e[17];let v;return e[18]!==N||e[19]!==w?(v=o.jsxs(o.Fragment,{children:[w,N]}),e[18]=N,e[19]=w,e[20]=v):v=e[20],v}let f;return e[21]!==m.contentPageId||e[22]!==m.contentPath||e[23]!==m.contentPathTemplate?(f=o.jsx(sr,{children:o.jsx(xp,{deepLinkPage:{pageId:m.contentPageId,path:m.contentPath,pathTemplate:m.contentPathTemplate}})}),e[21]=m.contentPageId,e[22]=m.contentPath,e[23]=m.contentPathTemplate,e[24]=f):f=e[24],f}export{kc as $,Hm as A,Wm as B,Zm as C,Sm as D,Gm as E,qm as F,Ac as G,ed as H,Vd as I,sd as J,Xm as K,Ja as L,La as M,Ca as N,es as O,Yn as P,$m as Q,Ym as R,md as S,id as T,Lm as U,Om as V,on as W,dd as X,pd as Y,yc as Z,vc as _,km as a,wo as a0,Sc as a1,Me as a2,jc as a3,Bm as a4,Em as a5,Dm as a6,Rm as a7,nd as a8,od as a9,Nm as aA,Um as aB,Ws as aC,fd as aa,_m as ab,hd as ac,qn as ad,Am as ae,Ka as af,Ia as ag,Ue as ah,Im as ai,Pm as aj,Ys as ak,Tm as al,Km as am,hs as an,Pn as ao,qs as ap,Fm as aq,zm as ar,Hc as as,Jm as at,tp as au,oi as av,qc as aw,$d as ax,Oa as ay,Cm as az,uo as b,rn as c,Gc as d,We as e,wm as f,At as g,Mm as h,Fc as i,Do as j,jm as k,Ta as l,an as m,ac as n,Xe as o,as as p,Ya as q,gl as r,Xc as s,Wa as t,ma as u,Vm as v,Js as w,Na as x,Qm as y,Fa as z};