decocms 4.562.1 → 4.562.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 (379) hide show
  1. package/dist/client/assets/{AlertCircle-Cwj2JDLb.js → AlertCircle-BPGyk76P.js} +1 -1
  2. package/dist/client/assets/{AreaChart-M71cxP0N.js → AreaChart-Dwi8bZZ1.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-D6im8CSl.js → ArrowLeft-DRdw9Nza.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-zoWFBt83.js → ArrowUp-BJTv4ddc.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-CkRq1ukN.js → CartesianChart-DHyrpR7F.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-CJyVrm-b.js → CategoricalChart-CVu6TY4_.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Dycaqr3_.js → CheckCircle-y3P873c6.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-Cq__IjWt.js → ChevronSelectorVertical-TIONA5Zl.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B0uKxpVg.js → ChevronUp-CDe5Gfov.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-CMHPxKus.js → CreditCard01-abk_vBBR.js} +1 -1
  11. package/dist/client/assets/{Globe04-BLpPYUUd.js → Globe04-Dr1jk8eS.js} +1 -1
  12. package/dist/client/assets/{Key01-KS2Cdqso.js → Key01-DzZgIVqE.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-CFo-1erV.js → LinkBroken01-4j6Z2AOF.js} +1 -1
  14. package/dist/client/assets/{Minus-CR14C6Ew.js → Minus-B2u_zm0f.js} +1 -1
  15. package/dist/client/assets/{Monitor01-PjSuNm4O.js → Monitor01-DWylBoOJ.js} +1 -1
  16. package/dist/client/assets/{Play-DAD0wkps.js → Play-CV8_Sy8a.js} +1 -1
  17. package/dist/client/assets/{Plus-Caq968Zm.js → Plus-BtfY7EHX.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-DEAQfOjW.js → ReferenceLine-DN9gAkkU.js} +1 -1
  19. package/dist/client/assets/{SearchMd-BionSqTl.js → SearchMd-DD6kw-fs.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-DUpALglE.js → ShoppingBag01-CY137tVP.js} +1 -1
  21. package/dist/client/assets/{Sun-x19ShBxe.js → Sun-CyYLfv8E.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-Dghq_Bvd.js → SwitchHorizontal01-C3qdjyVX.js} +1 -1
  23. package/dist/client/assets/{Tool01-GdBdG6P_.js → Tool01-CyX9Nllj.js} +1 -1
  24. package/dist/client/assets/{Tooltip-CDDThlKy.js → Tooltip-DVBICxdG.js} +1 -1
  25. package/dist/client/assets/{Trash01-DhMVlpac.js → Trash01-DSJ1LUhI.js} +1 -1
  26. package/dist/client/assets/{Upload01-hsehoAUh.js → Upload01-DC0joCKG.js} +1 -1
  27. package/dist/client/assets/{UserSquare-T5uOviXx.js → UserSquare-DmeGszKa.js} +1 -1
  28. package/dist/client/assets/{Users01-DDaeVlhF.js → Users01-B-OacssU.js} +1 -1
  29. package/dist/client/assets/{XClose-NmocES7U.js → XClose-avSrIpAi.js} +1 -1
  30. package/dist/client/assets/{Zap-aTbgq59l.js → Zap--C2rij07.js} +1 -1
  31. package/dist/client/assets/{access-gate-CpAtBb_h.js → access-gate-Bd3vMxaX.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-BFqv_pWT.js → add-connection-dialog-uIVnUFji.js} +1 -1
  33. package/dist/client/assets/agent-app-BkJxaBM5.js +1 -0
  34. package/dist/client/assets/{agent-assets-kQe7VufN.js → agent-assets-CWN2kTtA.js} +1 -1
  35. package/dist/client/assets/{agent-automation-7-KjK-1c.js → agent-automation-BgD0bRSV.js} +1 -1
  36. package/dist/client/assets/{agent-automations-DnNwxwTt.js → agent-automations-DfordlM0.js} +1 -1
  37. package/dist/client/assets/{agent-calendar-CbAiDaBT.js → agent-calendar-z2j3yA6d.js} +1 -1
  38. package/dist/client/assets/{agent-capabilities-DKq2l6j_.js → agent-capabilities-4Kae1N0E.js} +1 -1
  39. package/dist/client/assets/{agent-connect-sources-SuTyB8Qe.js → agent-connect-sources-C33PwxBc.js} +1 -1
  40. package/dist/client/assets/agent-deck-Lf3f7IO8.js +1 -0
  41. package/dist/client/assets/{agent-e2e-C9FJgu1a.js → agent-e2e-C44IfVz9.js} +1 -1
  42. package/dist/client/assets/{agent-file-D5ZobkO7.js → agent-file-D8S6ohDB.js} +1 -1
  43. package/dist/client/assets/{agent-hosting-Df5G-pNf.js → agent-hosting-D6CnE5uR.js} +1 -1
  44. package/dist/client/assets/{agent-icon-DD6O0sln.js → agent-icon-Nkid6y9z.js} +1 -1
  45. package/dist/client/assets/agent-library-Co5WQMIF.js +1 -0
  46. package/dist/client/assets/agent-library-file-BPJi6RfX.js +1 -0
  47. package/dist/client/assets/agent-overview-D73rnnSU.js +1 -0
  48. package/dist/client/assets/{agent-releases-6IDVzk1I.js → agent-releases-WO1DzowK.js} +1 -1
  49. package/dist/client/assets/agent-settings-DK2xDr1_.js +1 -0
  50. package/dist/client/assets/{agent-site-editor-YGSo4JHf.js → agent-site-editor-CVSVIfgT.js} +1 -1
  51. package/dist/client/assets/agent-site-editor-code-21UDx-VP.js +2 -0
  52. package/dist/client/assets/agent-site-editor-content-ycS9Pz-a.js +1 -0
  53. package/dist/client/assets/agent-site-editor-preview-CM8uT3ZM.js +1 -0
  54. package/dist/client/assets/agent-view-CnIONLQC.js +1 -0
  55. package/dist/client/assets/{agent-view-guard-Ud9RVhUT.js → agent-view-guard-BkTiwrL7.js} +1 -1
  56. package/dist/client/assets/{ai-providers-CdWvTe6E.js → ai-providers-C77po6hX.js} +1 -1
  57. package/dist/client/assets/{alert-rSlkmSpl.js → alert-8ZKgnOi9.js} +1 -1
  58. package/dist/client/assets/{analytics-sections-CdJGMHGj.js → analytics-sections-D2pjEazH.js} +1 -1
  59. package/dist/client/assets/api-keys-CJdXbN4c.js +1 -0
  60. package/dist/client/assets/{api-keys-CgV7T2W3.js → api-keys-CalFVYGL.js} +1 -1
  61. package/dist/client/assets/{app-editor-DQrUb2qq.js → app-editor--cZ0paPb.js} +1 -1
  62. package/dist/client/assets/{asset-utils-DJaTbmOK.js → asset-utils-CwwYcMA6.js} +1 -1
  63. package/dist/client/assets/{auth-catchall-BzI646tE.js → auth-catchall--6gbNuLd.js} +1 -1
  64. package/dist/client/assets/{auth-entry-BA2dv7O1.js → auth-entry-CsdiTapN.js} +1 -1
  65. package/dist/client/assets/{auth-split-layout-3t1_TKos.js → auth-split-layout-BqtGBv-Q.js} +1 -1
  66. package/dist/client/assets/{auth-Dfx2bf9S.js → auth-xvjttF9D.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-EuyAX3Gy.js → authenticate-and-persist-oauth-DdntocF2.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-BK5XD6ZY.js → automation-list-row-DtkMgEsK.js} +1 -1
  69. package/dist/client/assets/{automation-runs-BekfbsHI.js → automation-runs-DxsRwY7z.js} +1 -1
  70. package/dist/client/assets/{automations-ocOVuWpR.js → automations-DXGl5rDB.js} +1 -1
  71. package/dist/client/assets/{autosend-BLYIlkXq.js → autosend-DbfDzqlB.js} +1 -1
  72. package/dist/client/assets/{badge-9UZ-oy57.js → badge-BLk85LCv.js} +1 -1
  73. package/dist/client/assets/{block-document-B5Xpou_B.js → block-document-CSsqtozZ.js} +1 -1
  74. package/dist/client/assets/{blocks-preview-workspace-context-CGoI0EUn.js → blocks-preview-workspace-context-C59bKt9w.js} +1 -1
  75. package/dist/client/assets/{blocks-tab-states-CNkB95lx.js → blocks-tab-states-DP3rjaHt.js} +1 -1
  76. package/dist/client/assets/{blog-schema-DMB79fe6.js → blog-schema-B65cUy5G.js} +1 -1
  77. package/dist/client/assets/{buckets-C5e8GKB5.js → buckets-CNCQh0A_.js} +1 -1
  78. package/dist/client/assets/{build-improve-prompt-doc-aExDV9Mz.js → build-improve-prompt-doc-DUmEW7kR.js} +1 -1
  79. package/dist/client/assets/{calendar-CKcdkgh5.js → calendar-CDcnOKeY.js} +1 -1
  80. package/dist/client/assets/{capability-load-error-D8AT7eAw.js → capability-load-error-BZMPli2s.js} +1 -1
  81. package/dist/client/assets/{category-editor-DDFXYf_d.js → category-editor-BFW4v6Zt.js} +1 -1
  82. package/dist/client/assets/{chart-Ch4wXn1G.js → chart-W6WUctG8.js} +1 -1
  83. package/dist/client/assets/{chat-context-tsaqCp6v.js → chat-context-yHOaM07v.js} +1 -1
  84. package/dist/client/assets/{chat-draft-DeOYn8wH.js → chat-draft-BKLG-IxC.js} +1 -1
  85. package/dist/client/assets/{checkbox-bO8ZnM7n.js → checkbox-Dv6iFznu.js} +1 -1
  86. package/dist/client/assets/{choose-editor-B-1DX2pl.js → choose-editor-BbaXuEWm.js} +1 -1
  87. package/dist/client/assets/{cli-auth-success-WUcj8Laj.js → cli-auth-success-CINmtrn-.js} +1 -1
  88. package/dist/client/assets/{client-icons-CJKwmsS5.js → client-icons-CRCSqe4B.js} +1 -1
  89. package/dist/client/assets/{cms-settings-editor-CL1HXF3j.js → cms-settings-editor-BKSzHFaJ.js} +1 -1
  90. package/dist/client/assets/{cms-store-drafts-C_ZG08jQ.js → cms-store-drafts-BRph2qKQ.js} +1 -1
  91. package/dist/client/assets/{collapsible-CehJ-xlR.js → collapsible-WPiOb2df.js} +1 -1
  92. package/dist/client/assets/{collection-detail-w7NYTWNb.js → collection-detail-DeLh0iGu.js} +1 -1
  93. package/dist/client/assets/{collection-display-button-CVOVdzmi.js → collection-display-button-X03nm1ka.js} +1 -1
  94. package/dist/client/assets/{collection-search-Lm88VC-w.js → collection-search-CPadQqKp.js} +1 -1
  95. package/dist/client/assets/{collection-table-wrapper-LUTykEyP.js → collection-table-wrapper-DbE8PRZm.js} +1 -1
  96. package/dist/client/assets/{collection-tabs-BW9NTpao.js → collection-tabs-B05-I-04.js} +1 -1
  97. package/dist/client/assets/{combobox-C8IS_aP5.js → combobox-AFeNX90_.js} +1 -1
  98. package/dist/client/assets/{command-B42vqDSm.js → command-CSFENWMV.js} +1 -1
  99. package/dist/client/assets/{companion-mcps-section-gN7svOR8.js → companion-mcps-section-DByl9EP4.js} +1 -1
  100. package/dist/client/assets/{config--cZAprAj.js → config-BuNaSsQb.js} +1 -1
  101. package/dist/client/assets/{connect-BAZtz6qy.js → connect-B5ODvCMk.js} +1 -1
  102. package/dist/client/assets/{connect-layout-FGHNVpHc.js → connect-layout-CrQKfs54.js} +1 -1
  103. package/dist/client/assets/{connect-source-dialog-BlacChCY.js → connect-source-dialog-dT9CEaaL.js} +1 -1
  104. package/dist/client/assets/{connection-Brtus8mh.js → connection-9Wtillpb.js} +1 -1
  105. package/dist/client/assets/{connection-card-CSkWTxJN.js → connection-card-B7mEOoWU.js} +1 -1
  106. package/dist/client/assets/{connection-detail-Dz92Js40.js → connection-detail-CVkLDsqd.js} +1 -1
  107. package/dist/client/assets/{connection-form-helpers-CQaJSXmJ.js → connection-form-helpers-ZOfZ5xVa.js} +1 -1
  108. package/dist/client/assets/{connection-slug-DREkgXeA.js → connection-slug-BCjSI_lE.js} +1 -1
  109. package/dist/client/assets/{connections-BZUJ_roU.js → connections-B2Pjgwb4.js} +1 -1
  110. package/dist/client/assets/{content-tab-Bc_Tg1a4.js → content-tab-D6POg5eV.js} +3 -3
  111. package/dist/client/assets/{context-2NK4t-Lg.js → context-D9Jnu7vN.js} +1 -1
  112. package/dist/client/assets/{context-menu-D-JkcRvL.js → context-menu-Cgl4PGwR.js} +1 -1
  113. package/dist/client/assets/{context-shell-Bwve3xDx.js → context-shell-xJwj29nG.js} +3 -3
  114. package/dist/client/assets/{core.esm-ByTukYOF.js → core.esm-C3kzKmQL.js} +1 -1
  115. package/dist/client/assets/{create-organization-dialog-BIe1f-Sz.js → create-organization-dialog-C6jgiT68.js} +1 -1
  116. package/dist/client/assets/{device-hint-Djy4F7LR.js → device-hint-B0gKGTHi.js} +1 -1
  117. package/dist/client/assets/{discover-D050EtE3.js → discover-hzv5-quf.js} +1 -1
  118. package/dist/client/assets/{domain-settings-DPbJEdjs.js → domain-settings-CUR5XLBa.js} +1 -1
  119. package/dist/client/assets/{drawer-Dijofbhl.js → drawer-1kqkgpFK.js} +1 -1
  120. package/dist/client/assets/{editor-BODVgWYK.js → editor-CrG4V3zO.js} +1 -1
  121. package/dist/client/assets/{editor-classes-BdpfcKyR.js → editor-classes-LBX4QjrW.js} +1 -1
  122. package/dist/client/assets/{empty-state-CwfRxt_B.js → empty-state-CVOGmYU9.js} +1 -1
  123. package/dist/client/assets/{empty-state-Drt9QRbX.js → empty-state-CbRq3C3n.js} +1 -1
  124. package/dist/client/assets/{extract-connection-data-Pe-Tip3g.js → extract-connection-data-C6MDLhDM.js} +1 -1
  125. package/dist/client/assets/{feature-gate-2Z3FyCIy.js → feature-gate-Uh4gtHbP.js} +1 -1
  126. package/dist/client/assets/{feature-paywall-CpM-erQe.js → feature-paywall-BVXAF3Vl.js} +1 -1
  127. package/dist/client/assets/{feedback-DcWPFhR_.js → feedback-Bx6uae5t.js} +1 -1
  128. package/dist/client/assets/{file-explorer-xWdf34ip.js → file-explorer-B33pnQXI.js} +1 -1
  129. package/dist/client/assets/{file-preview-Ca_4k6rv.js → file-preview-DifPTXD4.js} +1 -1
  130. package/dist/client/assets/{file-share-button-DgOCZ5mM.js → file-share-button-OD6j_Xmo.js} +1 -1
  131. package/dist/client/assets/{file-type-icon-DiS0iV28.js → file-type-icon-jLU7FJUL.js} +1 -1
  132. package/dist/client/assets/{folder-icon-swAD3bQU.js → folder-icon-Bk-fEOJa.js} +1 -1
  133. package/dist/client/assets/{form-CRja9i9j.js → form-DE5X7SPR.js} +1 -1
  134. package/dist/client/assets/{general-C7SfdAAF.js → general-DxPCrqDE.js} +1 -1
  135. package/dist/client/assets/{github-icon-tpEVyIwD.js → github-icon-Bvc_Uep-.js} +1 -1
  136. package/dist/client/assets/{home-overview-CMI03yPH.js → home-overview-3LLMJPVW.js} +1 -1
  137. package/dist/client/assets/{home-DsrjQvGT.js → home-z2EXALAZ.js} +1 -1
  138. package/dist/client/assets/{hosted-reconcile-BnVn2LVL.js → hosted-reconcile-gHkwH1BF.js} +1 -1
  139. package/dist/client/assets/{icon-button-BZ9f2Pt9.js → icon-button-1xC_JQLB.js} +1 -1
  140. package/dist/client/assets/{index-Dt7ZIwRY.js → index-BHtZ5LOo.js} +1 -1
  141. package/dist/client/assets/{index-BW7-bbk0.js → index-BJKjGJrF.js} +1 -1
  142. package/dist/client/assets/{index-D-DRzVEB.js → index-BtlZo3IV.js} +1 -1
  143. package/dist/client/assets/{index-C2wTYLQr.js → index-C1iaIX-s.js} +1 -1
  144. package/dist/client/assets/{index-B8Pa92mK.js → index-Chg--78J.js} +1 -1
  145. package/dist/client/assets/{index-DQAtcq3Z.js → index-Czm9RrRY.js} +1 -1
  146. package/dist/client/assets/{index-68Cr2r1N.js → index-DOaDUx72.js} +1 -1
  147. package/dist/client/assets/{index-Cvc22Qvh.js → index-DWvRfTwV.js} +3 -3
  148. package/dist/client/assets/{index-BGom2FnM.js → index-DyoVCnKR.js} +1 -1
  149. package/dist/client/assets/{index-LnWr599j.js → index-J6dVRDZu.js} +1 -1
  150. package/dist/client/assets/{index-D0G5dFqT.js → index-KGPpyCdi.js} +1 -1
  151. package/dist/client/assets/{index-Dw1u8oXT.js → index-L3rSytXD.js} +1 -1
  152. package/dist/client/assets/{index-CbuCRTrW.js → index-Wodin-tK.js} +1 -1
  153. package/dist/client/assets/{index-Z8XjhDCo.js → index-eKAZ8rFQ.js} +1 -1
  154. package/dist/client/assets/{index-CcZq_9Fb.js → index-pqEXXiDC.js} +1 -1
  155. package/dist/client/assets/{index-redirect-PbFd_QHU.js → index-redirect-D52J_8O4.js} +1 -1
  156. package/dist/client/assets/{index-CZXPJi4-.js → index-xAQMjVHe.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-CmujZk55.js → infiniteQueryObserver-O1nZgTsK.js} +1 -1
  158. package/dist/client/assets/{infra-billing-BlZrBUYP.js → infra-billing-CsrcHH3z.js} +1 -1
  159. package/dist/client/assets/{input-C7_FCkgY.js → input-Lv9puCyJ.js} +3 -3
  160. package/dist/client/assets/{input-D6ZRMHIB.js → input-Z4x7UYYS.js} +1 -1
  161. package/dist/client/assets/{integration-icon-DMt85Vdd.js → integration-icon-BCp7DD7C.js} +1 -1
  162. package/dist/client/assets/{jira-icon-C0C7R9Uf.js → jira-icon-Cgp_nHIG.js} +1 -1
  163. package/dist/client/assets/{label-RB5C5N6z.js → label-BkzEUDUr.js} +1 -1
  164. package/dist/client/assets/{layout-CBfnb3CZ.js → layout-pqxzJsxG.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-zWqSTSjP.js → legacy-agents-deep-C88GLYmw.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-BZlpoESe.js → legacy-main-redirect-DcmC8SjE.js} +1 -1
  167. package/dist/client/assets/library-D4o0AtWq.js +1 -0
  168. package/dist/client/assets/{library-tab-C7gKe5iN.js → library-tab-DI44ELWs.js} +1 -1
  169. package/dist/client/assets/{login-D9zRzHBo.js → login-DQICOGIE.js} +1 -1
  170. package/dist/client/assets/{markdown-HhU9_nSI.js → markdown-DkmjrNqn.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-DeLjk14w.js → mcp-app-renderer-CIky1nBi.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-C-i6IZ7F.js → mcp-oauth-CNMWqwMp.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-DLwsgkOm.js → mcp-oauth-SAUpfbwO.js} +1 -1
  174. package/dist/client/assets/{members-DocomT72.js → members-BT1BIG15.js} +1 -1
  175. package/dist/client/assets/{memory-BP3-K3oo.js → memory-BDRH6Og0.js} +1 -1
  176. package/dist/client/assets/{mock-board-CoWf0eSd.js → mock-board-BF-mAr4y.js} +3 -3
  177. package/dist/client/assets/{monaco-editor-oUmtqDLR.js → monaco-editor-Dff4ZjU3.js} +1 -1
  178. package/dist/client/assets/{monitoring-DKfNSCeR.js → monitoring-BPV_CuUX.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-XSvwSWAi.js → monitoring-stats-row-ZCTbL6bH.js} +1 -1
  180. package/dist/client/assets/{multi-select-CISJC82c.js → multi-select-B4WkKxx8.js} +1 -1
  181. package/dist/client/assets/{mustache-D4zVU9iA.js → mustache-DCgM4RQC.js} +1 -1
  182. package/dist/client/assets/{named-rule-view-BTwHmZ5L.js → named-rule-view-D8WSLrw8.js} +1 -1
  183. package/dist/client/assets/{new-project-dialog-BA0jmhgS.js → new-project-dialog-Kvs8XyHN.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-C1NevZMJ.js → oauth-callback-CIFexUJN.js} +1 -1
  185. package/dist/client/assets/{oauth-callback-ai-provider-BJwoy8qA.js → oauth-callback-ai-provider-3-_RChJi.js} +1 -1
  186. package/dist/client/assets/{oauth-consent-BTT41r6l.js → oauth-consent-vlJReqsl.js} +1 -1
  187. package/dist/client/assets/{onboarding-C2uIwwWY.js → onboarding-CC0xFJ-5.js} +1 -1
  188. package/dist/client/assets/{openai-conversation-pUSF1vof.js → openai-conversation-D9tyQTXT.js} +1 -1
  189. package/dist/client/assets/{optimistic-project-sidebar-views-BnUNFsLR.js → optimistic-project-sidebar-views-BmsZ-Me-.js} +1 -1
  190. package/dist/client/assets/{order-monitor-day-BzMajB7Y.js → order-monitor-day-Cxsz6w2q.js} +1 -1
  191. package/dist/client/assets/{organization-choice-5ra3ZqkQ.js → organization-choice-4fOAxXZj.js} +1 -1
  192. package/dist/client/assets/{orgs-ZeqGcjOU.js → orgs-nKU8niHO.js} +1 -1
  193. package/dist/client/assets/{own-accounts-section-Dd8ELrvu.js → own-accounts-section-B2chKMQ0.js} +1 -1
  194. package/dist/client/assets/{pair-Bx1LbJmC.js → pair-BwCxrq_f.js} +1 -1
  195. package/dist/client/assets/{parse-sections-BTDQNPKy.js → parse-sections-CK6AHU3E.js} +3 -3
  196. package/dist/client/assets/{plan-bz8_rmrJ.js → plan-C4kJq3a0.js} +1 -1
  197. package/dist/client/assets/{plan-ladder-CZUMQESY.js → plan-ladder-wSfhs4No.js} +1 -1
  198. package/dist/client/assets/{plan-usage-card-SygAb3OS.js → plan-usage-card-CBlBUX6I.js} +1 -1
  199. package/dist/client/assets/{popover-D5YX99Kp.js → popover-CpDRMXBS.js} +1 -1
  200. package/dist/client/assets/{post-calendar-BIBU13NF.js → post-calendar-C4WCdLXl.js} +1 -1
  201. package/dist/client/assets/{post-editor-BAf1z147.js → post-editor-BHEvn_Zz.js} +1 -1
  202. package/dist/client/assets/{preview-content-TDEad-bh.js → preview-content-C4WlFzcj.js} +1 -1
  203. package/dist/client/assets/{preview-dialog-BkHpQdXG.js → preview-dialog-CSGQDL5A.js} +1 -1
  204. package/dist/client/assets/{preview-panel-DduOnxXk.js → preview-panel-BMN_Ysm9.js} +1 -1
  205. package/dist/client/assets/{preview-tab-Cgfndmyh.js → preview-tab-sRIuk4Ej.js} +3 -3
  206. package/dist/client/assets/{product-picker-dialog-DDkB9ByB.js → product-picker-dialog-DzFQlf9n.js} +1 -1
  207. package/dist/client/assets/{profile-DHJVxDvo.js → profile-DGzRd8vX.js} +1 -1
  208. package/dist/client/assets/{project-app-view-BfcPf6du.js → project-app-view-ByacUDvM.js} +1 -1
  209. package/dist/client/assets/{project-apps-Bny6_T2A.js → project-apps-DzbYoXyd.js} +1 -1
  210. package/dist/client/assets/{project-icon-eZOGIGwj.js → project-icon-DTA6ZXhl.js} +1 -1
  211. package/dist/client/assets/{project-index-BSMjLbxc.js → project-index-BmalKoU9.js} +1 -1
  212. package/dist/client/assets/project-reports-DPgVezio.js +1 -0
  213. package/dist/client/assets/{project-sidebar-views-CrRbPbLq.js → project-sidebar-views-BxNR4pgO.js} +1 -1
  214. package/dist/client/assets/project-tasks-C8oeh0BH.js +1 -0
  215. package/dist/client/assets/{projects-D7HB1QKY.js → projects-BIj_kuAC.js} +1 -1
  216. package/dist/client/assets/{projects-empty-state-DBWek16Y.js → projects-empty-state-DVir8yX9.js} +1 -1
  217. package/dist/client/assets/{prompts-MMmII7eb.js → prompts-BmgauEg8.js} +1 -1
  218. package/dist/client/assets/record-editor-BZSwvkut.js +1 -0
  219. package/dist/client/assets/{redirect-editor-cm3-huyu.js → redirect-editor-BxlqORGw.js} +1 -1
  220. package/dist/client/assets/{reports-D0VzI1C_.js → reports-7rmI992n.js} +1 -1
  221. package/dist/client/assets/reports-Be7TvXFw.js +1 -0
  222. package/dist/client/assets/{reports-onboarding-DonafHiF.js → reports-onboarding-DPzdd7qa.js} +1 -1
  223. package/dist/client/assets/{reports-tab-Wl9IyKm6.js → reports-tab-C_NZHfzv.js} +2 -2
  224. package/dist/client/assets/{repositories-9kTJbSW8.js → repositories-D3yxw4y-.js} +1 -1
  225. package/dist/client/assets/repositories-DFHveJlo.js +1 -0
  226. package/dist/client/assets/{repository-binding-B7A7NBUB.js → repository-binding-CeErFm4l.js} +1 -1
  227. package/dist/client/assets/{repository-picker-CI7xSsin.js → repository-picker-C3C3_E5g.js} +1 -1
  228. package/dist/client/assets/{require-capability-BTBUQsVM.js → require-capability-BOrIzed0.js} +1 -1
  229. package/dist/client/assets/{required-auth-layout-ClYF4eFR.js → required-auth-layout-nGThcCwM.js} +1 -1
  230. package/dist/client/assets/{reset-password-Ah3K7D-l.js → reset-password-xu4Q0lXY.js} +1 -1
  231. package/dist/client/assets/{resizable-DzzgKGKP.js → resizable-gNSqe3KZ.js} +1 -1
  232. package/dist/client/assets/{resolve-tab-icon-DMbVCUvi.js → resolve-tab-icon-D4I4sh6v.js} +1 -1
  233. package/dist/client/assets/{review-settings-Fxdols3J.js → review-settings-CjrtYBLa.js} +1 -1
  234. package/dist/client/assets/{role-color-CEkb11P4.js → role-color-DQHx1mqZ.js} +1 -1
  235. package/dist/client/assets/{roles-CqJ0hOtT.js → roles-C_hPZ63M.js} +1 -1
  236. package/dist/client/assets/route-04y-cUhL.js +1 -0
  237. package/dist/client/assets/{route-BA7jjOjA.js → route-CijJVC7q.js} +1 -1
  238. package/dist/client/assets/{route-DGCMYgfH.js → route-D7Ke7Nww.js} +1 -1
  239. package/dist/client/assets/{sandbox-lifecycle-context-WaQV2LhH.js → sandbox-lifecycle-context-CuiD9fGV.js} +1 -1
  240. package/dist/client/assets/{schema-DHahXPsT.js → schema-DiUKA_SL.js} +1 -1
  241. package/dist/client/assets/{schema-BH82js-o.js → schema-DvxWNZKz.js} +1 -1
  242. package/dist/client/assets/{scroll-area-BN87AboJ.js → scroll-area-CUevVS4T.js} +1 -1
  243. package/dist/client/assets/{search-input-BBYghT-z.js → search-input-DWWqDlal.js} +1 -1
  244. package/dist/client/assets/{search-toggle-pLnMgrhP.js → search-toggle-Z6tLdJtz.js} +1 -1
  245. package/dist/client/assets/{secret-picker-DWWFQJzg.js → secret-picker-BK4dq3ip.js} +1 -1
  246. package/dist/client/assets/{secrets-CM4b3_qA.js → secrets-DrGLagdz.js} +1 -1
  247. package/dist/client/assets/{sections-CgO1w_IT.js → sections-CC9QneUq.js} +1 -1
  248. package/dist/client/assets/{sections-editor-Uk83RbMN.js → sections-editor-CEHFL2VN.js} +1 -1
  249. package/dist/client/assets/{select-GzsOSPza.js → select-gJgQvQZg.js} +1 -1
  250. package/dist/client/assets/{select-model-BU2ssn1V.js → select-model-ivosxEc9.js} +1 -1
  251. package/dist/client/assets/{seo-editor-dMXY0ofk.js → seo-editor-CaLY6KkG.js} +1 -1
  252. package/dist/client/assets/{separator-CuwdHpjW.js → separator-PY5RFBB-.js} +1 -1
  253. package/dist/client/assets/settings-tab-DeCOk8kh.js +1 -0
  254. package/dist/client/assets/{sheet-BIQm-3An.js → sheet-BKUVqko3.js} +1 -1
  255. package/dist/client/assets/{shell-layout-CH0j9rog.js → shell-layout-Bx4AZ_YV.js} +1 -1
  256. package/dist/client/assets/{site-draft-view-C74WkBDm.js → site-draft-view-B8TmuovZ.js} +1 -1
  257. package/dist/client/assets/site-editor-BeO4XfO2.js +1 -0
  258. package/dist/client/assets/{site-editor-toast-DrW9VMK5.js → site-editor-toast-B-FxlfJP.js} +1 -1
  259. package/dist/client/assets/{skills-C71x-yhC.js → skills-CZlPyCDI.js} +1 -1
  260. package/dist/client/assets/{slider-BTgIuWj6.js → slider-CnnTZZH8.js} +1 -1
  261. package/dist/client/assets/{sortable.esm-Dd1EVaQb.js → sortable.esm-YReNzob1.js} +1 -1
  262. package/dist/client/assets/{sso-BfwIPTh8.js → sso-B0Izx2rk.js} +1 -1
  263. package/dist/client/assets/{suggestion-CsEyXKDY.js → suggestion-D-YZpsQl.js} +1 -1
  264. package/dist/client/assets/{switch-BRZA_xq0.js → switch-UpbwlQtZ.js} +1 -1
  265. package/dist/client/assets/{synced-repos-Do7bESqI.js → synced-repos-DJZhlM-5.js} +1 -1
  266. package/dist/client/assets/{tab-icon-glyph-BsVyyg_A.js → tab-icon-glyph-BA8eumIA.js} +1 -1
  267. package/dist/client/assets/{table-DJd8n4EY.js → table-D9nZzqmf.js} +1 -1
  268. package/dist/client/assets/{tabs-D5AMuciq.js → tabs-BFXzZPNk.js} +1 -1
  269. package/dist/client/assets/{task-board-DN88kD7h.js → task-board-CzrPT-OZ.js} +1 -1
  270. package/dist/client/assets/{task-route-4C0M-4XY.js → task-route-DrqrKj8M.js} +1 -1
  271. package/dist/client/assets/{task-status-B2JNuBbQ.js → task-status-B5fYlW4s.js} +1 -1
  272. package/dist/client/assets/{taskboard-analytics-D_AXxVNg.js → taskboard-analytics-Bo8Bxm9q.js} +1 -1
  273. package/dist/client/assets/{tasks-dMEgvkta.js → tasks-BFPPo49C.js} +1 -1
  274. package/dist/client/assets/tasks-CI7wGKXW.js +1 -0
  275. package/dist/client/assets/{textarea-D7HQlMVo.js → textarea-BVq0fBVJ.js} +1 -1
  276. package/dist/client/assets/{thread-analytics-BQjHh_yV.js → thread-analytics-j4C-4XbM.js} +1 -1
  277. package/dist/client/assets/{thread-intent-Bs-Q7fma.js → thread-intent-BONVdhUb.js} +1 -1
  278. package/dist/client/assets/{thread-route-C-uX4C4C.js → thread-route-CDlnAMQ3.js} +1 -1
  279. package/dist/client/assets/{thread-route-B44higRI.js → thread-route-DMWye38f.js} +1 -1
  280. package/dist/client/assets/{thread-sheet-body-BNo76_XD.js → thread-sheet-body-C1Yi4Tsp.js} +1 -1
  281. package/dist/client/assets/{time-range-picker-D4sglVBw.js → time-range-picker-DuQ-XfqJ.js} +1 -1
  282. package/dist/client/assets/{toggle-group-BBgjmF6C.js → toggle-group-Bw4R79dp.js} +1 -1
  283. package/dist/client/assets/{tool-namespace-l4eN7YZ5.js → tool-namespace-CmEhPnkj.js} +1 -1
  284. package/dist/client/assets/{tool-set-selector-Bi-Sw2KD.js → tool-set-selector-DAvZ69Ky.js} +1 -1
  285. package/dist/client/assets/{toolbar-icon-button-nrUHQe-I.js → toolbar-icon-button-CRZySHtx.js} +1 -1
  286. package/dist/client/assets/{tooltip-C0GWPsi8.js → tooltip-BVv5wAeF.js} +1 -1
  287. package/dist/client/assets/{tooltipContext-DdEokZtY.js → tooltipContext-DwFHeBjZ.js} +1 -1
  288. package/dist/client/assets/{track-29FVOdFL.js → track-CHjUqURA.js} +1 -1
  289. package/dist/client/assets/{types-DKuFfsqr.js → types-7R44AYrk.js} +1 -1
  290. package/dist/client/assets/{url-slug-5t39ocbn.js → url-slug-CoT8zovb.js} +1 -1
  291. package/dist/client/assets/{usage-stats-CHeI7dPd.js → usage-stats-qZh3WQDj.js} +1 -1
  292. package/dist/client/assets/{use-ai-providers-BbVlPdZd.js → use-ai-providers-CCcuLCZt.js} +1 -1
  293. package/dist/client/assets/{use-apply-named-rule-CnOcORn0.js → use-apply-named-rule-BRjLBznN.js} +1 -1
  294. package/dist/client/assets/use-ask-in-chat-DQs0YHUB.js +1 -0
  295. package/dist/client/assets/{use-automations-BoyfX_H0.js → use-automations-jhigzQzP.js} +1 -1
  296. package/dist/client/assets/{use-autosave-CZD-Fkyk.js → use-autosave--xoi8yhU.js} +1 -1
  297. package/dist/client/assets/{use-chat-layout-state-BC5WrKKn.js → use-chat-layout-state-Dnl_7DMo.js} +1 -1
  298. package/dist/client/assets/{use-cms-publish-actions-BbDVRUuf.js → use-cms-publish-actions-CgLBJwXN.js} +1 -1
  299. package/dist/client/assets/{use-connect-companion-DEAJWvqA.js → use-connect-companion-BVtzi_36.js} +1 -1
  300. package/dist/client/assets/{use-connection-Dqyf1wn8.js → use-connection-BQpfU6u4.js} +1 -1
  301. package/dist/client/assets/{use-content-sync-vr73v2b2.js → use-content-sync-DjDHeqFk.js} +1 -1
  302. package/dist/client/assets/{use-copy-BGfQrJIh.js → use-copy-CMfnyhoo.js} +1 -1
  303. package/dist/client/assets/{use-date-fns-locale-C4jbLuwI.js → use-date-fns-locale-CRoKnCN9.js} +1 -1
  304. package/dist/client/assets/{use-debounced-autosave-BrjHHNNB.js → use-debounced-autosave-D1fE_-TK.js} +1 -1
  305. package/dist/client/assets/{use-debounced-value-BF84eZeF.js → use-debounced-value-DiJ2aJN8.js} +1 -1
  306. package/dist/client/assets/{use-deco-credits-MCc3vHir.js → use-deco-credits-D1bpdE32.js} +1 -1
  307. package/dist/client/assets/{use-decopilot-events-uSeDcfUe.js → use-decopilot-events-CZSx1Itd.js} +1 -1
  308. package/dist/client/assets/{use-delete-connection-CLe-XFxn.js → use-delete-connection-BFOvb9ed.js} +1 -1
  309. package/dist/client/assets/{use-deployment-admin-ShnoFTNr.js → use-deployment-admin-DQ5wNSYp.js} +1 -1
  310. package/dist/client/assets/{use-entitlements-wE65MYfi.js → use-entitlements-BChYmsyZ.js} +1 -1
  311. package/dist/client/assets/{use-fast-preview-draft-url-BmUgrEyk.js → use-fast-preview-draft-url-CO3Nwa6o.js} +1 -1
  312. package/dist/client/assets/{use-file-configs-D9BR1kJU.js → use-file-configs-DRzFKzj4.js} +1 -1
  313. package/dist/client/assets/{use-id-selection-BcfcmGZl.js → use-id-selection-DexUoI58.js} +1 -1
  314. package/dist/client/assets/{use-inbox-feed-EYADn16y.js → use-inbox-feed-BvqULLI3.js} +1 -1
  315. package/dist/client/assets/{use-infinite-scroll-Ds1Wd1cw.js → use-infinite-scroll-C7IQ9e5j.js} +1 -1
  316. package/dist/client/assets/{use-join-requests-CkWiAH0i.js → use-join-requests-Dr_qAJ4N.js} +1 -1
  317. package/dist/client/assets/{use-main-panel-tabs-DTMcBtUc.js → use-main-panel-tabs-DZKpYMQg.js} +1 -1
  318. package/dist/client/assets/{use-mcp-auth-status-DhFx8XVQ.js → use-mcp-auth-status-D0-JLgq9.js} +1 -1
  319. package/dist/client/assets/{use-mcp-client-BfCmeMHR.js → use-mcp-client-Z8a6jg-w.js} +1 -1
  320. package/dist/client/assets/{use-mcp-prompts-DoojBZhS.js → use-mcp-prompts-KWx0e75o.js} +1 -1
  321. package/dist/client/assets/{use-mcp-tools-DwTtnjNb.js → use-mcp-tools-C4Fqpw4S.js} +1 -1
  322. package/dist/client/assets/{use-mobile-C1stVK0E.js → use-mobile-B7UqukPG.js} +1 -1
  323. package/dist/client/assets/{use-move-blocks-Bclcq-Qe.js → use-move-blocks-DqXCo5PB.js} +1 -1
  324. package/dist/client/assets/{use-navigate-to-agent-D2d0cpFU.js → use-navigate-to-agent-9BOtBFjV.js} +1 -1
  325. package/dist/client/assets/{use-org-fs-DHnEDbF9.js → use-org-fs-DU8c86TB.js} +1 -1
  326. package/dist/client/assets/{use-org-repo-syncs-CcoLGdUP.js → use-org-repo-syncs-DGuZeud_.js} +1 -1
  327. package/dist/client/assets/{use-org-sso-d82WgyRM.js → use-org-sso-nKgxHjqa.js} +1 -1
  328. package/dist/client/assets/{use-organization-settings-a6mUKPHv.js → use-organization-settings-DqaBVcmT.js} +1 -1
  329. package/dist/client/assets/{use-project-scope-C0EKXyqg.js → use-project-scope-B4B7p1mj.js} +1 -1
  330. package/dist/client/assets/{use-recent-apps-DEMyNf2W.js → use-recent-apps-CQ2MLxK5.js} +1 -1
  331. package/dist/client/assets/{use-reports-diagnostic-rjeHGSYu.js → use-reports-diagnostic-MABLwKiU.js} +1 -1
  332. package/dist/client/assets/{use-secrets-CifnNbah.js → use-secrets-DP80TxaK.js} +1 -1
  333. package/dist/client/assets/{use-section-preview-base-SkN8HQaB.js → use-section-preview-base-C7kw5vsr.js} +1 -1
  334. package/dist/client/assets/{use-sidebar-collapsed-DwcGl0-e.js → use-sidebar-collapsed-Dz5RfxtZ.js} +1 -1
  335. package/dist/client/assets/{use-tags-CgXVAtG9.js → use-tags-BMj-zonr.js} +1 -1
  336. package/dist/client/assets/{use-task-board-analytics-BTZNDNnK.js → use-task-board-analytics-Bxag-9wC.js} +1 -1
  337. package/dist/client/assets/{use-task-board-events-DCguN7A5.js → use-task-board-events-B8bEY6A0.js} +1 -1
  338. package/dist/client/assets/{use-task-board-item-prs-CnqmEndd.js → use-task-board-item-prs-JXA8OC5C.js} +1 -1
  339. package/dist/client/assets/{use-task-board-items-BmpaMZkF.js → use-task-board-items-DFDnaPnO.js} +1 -1
  340. package/dist/client/assets/{use-task-board-prompts-DdSO4gLi.js → use-task-board-prompts-CeCaGQl-.js} +1 -1
  341. package/dist/client/assets/{use-task-metadata-D3xqf4sH.js → use-task-metadata-D6_-qyJw.js} +1 -1
  342. package/dist/client/assets/{use-thread-outputs-D6sQTVJo.js → use-thread-outputs-DIlmUcwz.js} +1 -1
  343. package/dist/client/assets/useInfiniteQuery-DAm-dYuC.js +1 -0
  344. package/dist/client/assets/{useQueries-BuMODvFG.js → useQueries-DlmzJSx8.js} +1 -1
  345. package/dist/client/assets/useSuspenseInfiniteQuery-BTqieOpO.js +1 -0
  346. package/dist/client/assets/{users-Ct3PwBMT.js → users-BIMbDMRH.js} +1 -1
  347. package/dist/client/assets/{utils-DA49HMaO.js → utils-B-ZZ1C4f.js} +1 -1
  348. package/dist/client/assets/{variant-calendar-CPtUMCAS.js → variant-calendar-CPbvwCiJ.js} +1 -1
  349. package/dist/client/assets/{variant-matcher-override-DnlLYEoa.js → variant-matcher-override-BDeSqmx4.js} +1 -1
  350. package/dist/client/assets/{view-header-CAO18iqy.js → view-header-BTUnAkrc.js} +1 -1
  351. package/dist/client/assets/{virtual-mcp-C4mAz3N8.js → virtual-mcp-D-xL-K_P.js} +1 -1
  352. package/dist/client/assets/{watch-sse-pool-BI4P-Lkx.js → watch-sse-pool-B6ObjuCT.js} +1 -1
  353. package/dist/client/index.html +1 -1
  354. package/dist/server/server.js +464 -464
  355. package/package.json +1 -1
  356. package/dist/client/assets/agent-app-ZW_Vm-c7.js +0 -1
  357. package/dist/client/assets/agent-deck-8VVMhl7J.js +0 -1
  358. package/dist/client/assets/agent-library-C_HTRhOS.js +0 -1
  359. package/dist/client/assets/agent-library-file-8gKy0Im-.js +0 -1
  360. package/dist/client/assets/agent-overview-CSsPaJjm.js +0 -1
  361. package/dist/client/assets/agent-settings-uWS3yWiw.js +0 -1
  362. package/dist/client/assets/agent-site-editor-code-wtgSW_Bw.js +0 -2
  363. package/dist/client/assets/agent-site-editor-content-BC5jgNMj.js +0 -1
  364. package/dist/client/assets/agent-site-editor-preview-Dd0H-yKP.js +0 -1
  365. package/dist/client/assets/agent-view-C4jCWfsN.js +0 -1
  366. package/dist/client/assets/api-keys-CmWPTVBS.js +0 -1
  367. package/dist/client/assets/library-pMQg4GCR.js +0 -1
  368. package/dist/client/assets/project-reports-BzA8d8hO.js +0 -1
  369. package/dist/client/assets/project-tasks-BCE2SgoF.js +0 -1
  370. package/dist/client/assets/record-editor-DVouiUmR.js +0 -1
  371. package/dist/client/assets/reports-BHAVwnBG.js +0 -1
  372. package/dist/client/assets/repositories-bPxFm30V.js +0 -1
  373. package/dist/client/assets/route-DJbiUXJl.js +0 -1
  374. package/dist/client/assets/settings-tab-FvtSSyQC.js +0 -1
  375. package/dist/client/assets/site-editor-CazX9Ijc.js +0 -1
  376. package/dist/client/assets/tasks-BlrmxtrG.js +0 -1
  377. package/dist/client/assets/use-ask-in-chat-Cp_wqFIx.js +0 -1
  378. package/dist/client/assets/useInfiniteQuery-P9--kf7E.js +0 -1
  379. package/dist/client/assets/useSuspenseInfiniteQuery-C2ZhOGvp.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-editor-DQrUb2qq.js","assets/index-Cvc22Qvh.js","assets/index-ug7KC70Z.css","assets/chat-context-tsaqCp6v.js","assets/autosend-BLYIlkXq.js","assets/thread-route-B44higRI.js","assets/use-project-scope-C0EKXyqg.js","assets/repository-binding-B7A7NBUB.js","assets/use-mcp-client-BfCmeMHR.js","assets/auth-Dfx2bf9S.js","assets/thread-intent-Bs-Q7fma.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-BI4P-Lkx.js","assets/task-board-DN88kD7h.js","assets/schema-BH82js-o.js","assets/use-entitlements-wE65MYfi.js","assets/use-ai-providers-BbVlPdZd.js","assets/use-decopilot-events-uSeDcfUe.js","assets/use-organization-settings-a6mUKPHv.js","assets/input-C7_FCkgY.js","assets/usage-stats-CHeI7dPd.js","assets/tool-namespace-l4eN7YZ5.js","assets/form-CRja9i9j.js","assets/label-RB5C5N6z.js","assets/utils-CVEq3hMx.js","assets/markdown-HhU9_nSI.js","assets/use-copy-BGfQrJIh.js","assets/agent-icon-DD6O0sln.js","assets/AlertCircle-Cwj2JDLb.js","assets/Tool01-GdBdG6P_.js","assets/ArrowUp-zoWFBt83.js","assets/ArrowLeft-D6im8CSl.js","assets/LinkBroken01-CFo-1erV.js","assets/ShoppingBag01-DUpALglE.js","assets/Globe04-BLpPYUUd.js","assets/CheckCircle-Dycaqr3_.js","assets/ChevronUp-B0uKxpVg.js","assets/ChevronSelectorVertical-Cq__IjWt.js","assets/UserSquare-T5uOviXx.js","assets/CreditCard01-CMHPxKus.js","assets/SwitchHorizontal01-Dghq_Bvd.js","assets/Key01-KS2Cdqso.js","assets/Minus-CR14C6Ew.js","assets/Monitor01-PjSuNm4O.js","assets/Sun-x19ShBxe.js","assets/Play-DAD0wkps.js","assets/Plus-Caq968Zm.js","assets/SearchMd-BionSqTl.js","assets/Trash01-DhMVlpac.js","assets/Upload01-hsehoAUh.js","assets/Users01-DDaeVlhF.js","assets/XClose-NmocES7U.js","assets/Zap-aTbgq59l.js","assets/use-mobile-C1stVK0E.js","assets/tooltip-C0GWPsi8.js","assets/index-LnWr599j.js","assets/icon-button-BZ9f2Pt9.js","assets/file-type-icon-DiS0iV28.js","assets/chat-draft-DeOYn8wH.js","assets/select-GzsOSPza.js","assets/index-BdQq_4o_.js","assets/tabs-D5AMuciq.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-MCc3vHir.js","assets/toggle-group-BBgjmF6C.js","assets/index-D0G5dFqT.js","assets/checkbox-bO8ZnM7n.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/popover-D5YX99Kp.js","assets/drawer-Dijofbhl.js","assets/input-D6ZRMHIB.js","assets/suggestion-CsEyXKDY.js","assets/use-mcp-prompts-DoojBZhS.js","assets/use-org-fs-DHnEDbF9.js","assets/useInfiniteQuery-P9--kf7E.js","assets/infiniteQueryObserver-CmujZk55.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-CpM-erQe.js","assets/plan-ladder-CZUMQESY.js","assets/add-connection-dialog-BFqv_pWT.js","assets/collection-search-Lm88VC-w.js","assets/extract-connection-data-Pe-Tip3g.js","assets/metadata-D72DunRR.js","assets/connection-Brtus8mh.js","assets/url-slug-5t39ocbn.js","assets/connection-card-CSkWTxJN.js","assets/connection-slug-DREkgXeA.js","assets/integration-icon-DMt85Vdd.js","assets/textarea-D7HQlMVo.js","assets/use-connection-Dqyf1wn8.js","assets/schema-DHahXPsT.js","assets/connection-form-helpers-CQaJSXmJ.js","assets/authenticate-and-persist-oauth-EuyAX3Gy.js","assets/mcp-oauth-DLwsgkOm.js","assets/mcp-oauth-C-i6IZ7F.js","assets/collection-tabs-BW9NTpao.js","assets/badge-9UZ-oy57.js","assets/use-infinite-scroll-Ds1Wd1cw.js","assets/useSuspenseInfiniteQuery-C2ZhOGvp.js","assets/use-task-board-events-DCguN7A5.js","assets/use-chat-layout-state-BC5WrKKn.js","assets/input-Bwd_JSM8.css","assets/scroll-area-BN87AboJ.js","assets/use-section-preview-base-SkN8HQaB.js","assets/parse-sections-BTDQNPKy.js","assets/utils-DA49HMaO.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-Bx1LbJmC.js","assets/collapsible-CehJ-xlR.js","assets/shell-layout-CH0j9rog.js","assets/use-deployment-admin-ShnoFTNr.js","assets/admin-fetch-BhTJlAsX.js","assets/command-B42vqDSm.js","assets/index-DQAtcq3Z.js","assets/project-icon-eZOGIGwj.js","assets/use-navigate-to-agent-D2d0cpFU.js","assets/new-project-dialog-BA0jmhgS.js","assets/repository-picker-CI7xSsin.js","assets/github-icon-tpEVyIwD.js","assets/use-debounced-value-BF84eZeF.js","assets/required-auth-layout-ClYF4eFR.js","assets/use-org-sso-d82WgyRM.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DeLjk14w.js","assets/types-DKuFfsqr.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-BIQm-3An.js","assets/use-thread-outputs-D6sQTVJo.js","assets/blocks-tab-states-CNkB95lx.js","assets/site-editor-toast-DrW9VMK5.js","assets/agent-capabilities-DKq2l6j_.js","assets/sandbox-url-D3mC8qhT.js","assets/index-D-DRzVEB.js","assets/sandbox-git-api-DcqI6XE4.js","assets/empty-state-Drt9QRbX.js","assets/hosted-reconcile-BnVn2LVL.js","assets/slider-BTgIuWj6.js","assets/index-BW7-bbk0.js","assets/tooltipContext-DdEokZtY.js","assets/CategoricalChart-CJyVrm-b.js","assets/index-Dw1u8oXT.js","assets/switch-BRZA_xq0.js","assets/monaco-editor-oUmtqDLR.js","assets/editor-BODVgWYK.js","assets/calendar-CKcdkgh5.js","assets/editor-classes-BdpfcKyR.js","assets/core.esm-ByTukYOF.js","assets/sortable.esm-Dd1EVaQb.js","assets/combobox-C8IS_aP5.js","assets/search-input-BBYghT-z.js","assets/use-file-configs-D9BR1kJU.js","assets/asset-utils-DJaTbmOK.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/view-header-CAO18iqy.js","assets/use-cms-publish-actions-BbDVRUuf.js","assets/use-content-sync-vr73v2b2.js","assets/mustache-D4zVU9iA.js","assets/sandbox-lifecycle-context-WaQV2LhH.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-Bclcq-Qe.js","assets/empty-state-CwfRxt_B.js","assets/collection-table-wrapper-LUTykEyP.js","assets/table-DJd8n4EY.js","assets/cms-settings-editor-CL1HXF3j.js","assets/post-editor-BAf1z147.js","assets/multi-select-CISJC82c.js","assets/block-document-B5Xpou_B.js","assets/product-picker-dialog-DDkB9ByB.js","assets/index-CcZq_9Fb.js","assets/blog-schema-DMB79fe6.js","assets/use-fast-preview-draft-url-BmUgrEyk.js","assets/use-autosave-CZD-Fkyk.js","assets/record-editor-DVouiUmR.js","assets/context-2NK4t-Lg.js","assets/index-C2wTYLQr.js","assets/category-editor-DDFXYf_d.js","assets/sections-editor-Uk83RbMN.js","assets/seo-editor-dMXY0ofk.js","assets/use-apply-named-rule-CnOcORn0.js","assets/variant-matcher-override-DnlLYEoa.js","assets/variant-calendar-CPtUMCAS.js","assets/post-calendar-BIBU13NF.js","assets/redirect-editor-cm3-huyu.js"])))=>i.map(i=>d[i]);
2
- import{c as ce,b as Ee,j as o,B as De,h as mt,q as qi,e as Xi,K as ko,m as je,r as F,w as Ys,x as Es,I as ms,y as Ws,v as Ps,D as As,aT as Xn,ba as Qi,aG as Ji,t as ke,ak as Zi,bb as Fs,bc as $s,X as nn,bd as jo,Z as on,_ as an,b2 as Qn,aU as el,Y as Ot,as as ln,be as Jn,bf as tl,bg as sl,au as _n,am as nl,bh as ma,a5 as ol,bi as al,u as ga,b9 as xt,aN as il,aM as ll,aJ as rl,aH as cl,aI as dl,aL as ul,aK as pl,bj as fl,bk as ml}from"./index-Cvc22Qvh.js";import{a as Zn}from"./use-organization-settings-a6mUKPHv.js";import{u as yn,c as eo}from"./chat-context-tsaqCp6v.js";import{H as gl,N as hl}from"./hosted-reconcile-BnVn2LVL.js";import{f as Dn,e as xl,c as bl,g as ha,B as Bn,P as yl,h as vl,i as xa,j as kl,k as jl,n as wl,L as Sl,u as vn,l as Cl,o as Nl,R as Tl,E as ft,q as ba,r as El,s as Pl,a as ya,t as Al,v as et,H as va,w as _l,x as ka,y as Dl,M as Bl,d as Rl,z as $l,p as Ol,A as Ll,C as Il,b as Kl,S as Fl,D as wo,F as zl,N as Ml}from"./parse-sections-BTDQNPKy.js";import{S as Vl,a as Ul}from"./view-header-CAO18iqy.js";import{i as Vs}from"./AlertCircle-Cwj2JDLb.js";import{Y as ja,l as zn,u as Gl,Z as wa,_ as Sa,$ as to,a0 as Ca,b as rn,S as Na,a1 as Hl,a2 as Yl,a3 as Wl,a4 as ql,a5 as Mn,e as so,n as Xl,a6 as Ta,a7 as Ql,a8 as Jl,a9 as Zl,m as So,aa as er,X as Ea}from"./agent-icon-DD6O0sln.js";import{a as Pa,s as cn,i as no,d as tr,e as Co}from"./UserSquare-T5uOviXx.js";import{c as oo,i as sr}from"./SwitchHorizontal01-Dghq_Bvd.js";import{s as kn}from"./Plus-Caq968Zm.js";import{t as Aa}from"./Users01-DDaeVlhF.js";import{S as qs}from"./scroll-area-BN87AboJ.js";import{T as wt,a as St,c as Ct}from"./tooltip-C0GWPsi8.js";import{o as nr,c as _a,W as or,X as ar,Y as ir,Z as lr,q as Da,_ as ao,u as io,m as Ba,z as rr,$ as cr,a0 as dr,a1 as ur,l as pr,a2 as fr,E as No,n as mr,b as gr}from"./site-editor-toast-DrW9VMK5.js";import{m as hr,o as xr,q as br,t as yr,w as vr,x as Ra,n as Kt,v as kr,R as jr,y as wr,z as Sr,A as Cr,D as $a,E as Nr,F as Oa,G as Tr,H as Er,I as Pr,J as Ar,g as La,i as _r,K as Qs,u as Dr,L as Br,e as To,M as Eo,S as Rr,C as $r,O as Or,c as Lr,P as Ir,h as Kr,Q as Ia,T as Fr,U as zr,V as Mr,W as Vr,X as Ur,Y as Gr,Z as Hr,_ as Yr}from"./blocks-tab-states-CNkB95lx.js";import{C as Ka,u as Wr,h as Po}from"./use-cms-publish-actions-BbDVRUuf.js";import{u as qr,S as Xr}from"./mustache-D4zVU9iA.js";import{u as Qr}from"./use-content-sync-vr73v2b2.js";import{s as Jr}from"./sandbox-git-api-DcqI6XE4.js";import{a as lo}from"./input-C7_FCkgY.js";import{b as ro}from"./sandbox-url-D3mC8qhT.js";import{d as Zr}from"./utils-DA49HMaO.js";import{a as ec}from"./autosend-BLYIlkXq.js";import{u as Fa,b as za}from"./repository-binding-B7A7NBUB.js";import{n as Ma}from"./ShoppingBag01-DUpALglE.js";import{t as Us}from"./ChevronUp-B0uKxpVg.js";import{i as Va}from"./Zap-aTbgq59l.js";import{C as tc,a as sc,b as nc}from"./collapsible-CehJ-xlR.js";import{u as oc}from"./index-D-DRzVEB.js";import{a as ac}from"./sandbox-lifecycle-context-WaQV2LhH.js";import{C as jn}from"./checkbox-bO8ZnM7n.js";import{L as cs}from"./label-RB5C5N6z.js";import{c as ic,b as lc,a as rc,d as cc,S as dc}from"./select-GzsOSPza.js";import{s as uc}from"./thread-intent-Bs-Q7fma.js";import{s as pc}from"./date-utils-CrvIKg-s.js";import{u as fc}from"./use-move-blocks-Bclcq-Qe.js";import{i as mc}from"./CheckCircle-Dycaqr3_.js";import{s as co}from"./Trash01-DhMVlpac.js";import{i as Rn}from"./Upload01-hsehoAUh.js";import{B as wn}from"./badge-9UZ-oy57.js";import{E as gc}from"./empty-state-CwfRxt_B.js";import{u as hc}from"./use-ai-providers-BbVlPdZd.js";import{T as Ao}from"./textarea-D7HQlMVo.js";import{u as xc}from"./use-file-configs-D9BR1kJU.js";import{MonacoCodeEditor as Ua}from"./monaco-editor-oUmtqDLR.js";import"./core.esm-ByTukYOF.js";import"./sortable.esm-Dd1EVaQb.js";import{c as bc}from"./Tool01-GdBdG6P_.js";import{S as yc}from"./search-input-BBYghT-z.js";import{a as vc,T as $n}from"./toggle-group-BBgjmF6C.js";import{C as kc}from"./collection-table-wrapper-LUTykEyP.js";import{a as _o}from"./agent-capabilities-DKq2l6j_.js";import{E as jc}from"./empty-state-Drt9QRbX.js";import{G as Do}from"./github-icon-tpEVyIwD.js";import{R as wc}from"./new-project-dialog-BA0jmhgS.js";function Ga(){return Zn("blog_ai_enabled")}const Bo=2e3,Sc=45;function Cc(t){const{resolveType:e,meta:s,reads:n,window:a}=t;return typeof e!="string"||e===""?{interval:!1,window:null}:s&&hr(e,s)?{interval:!1,window:null}:!a||a.resolveType!==e?{interval:Bo,window:{resolveType:e,reads:n}}:n-a.reads>=Sc?{interval:!1,window:a}:{interval:Bo,window:a}}const Nc=[{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"}],Tc=[{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 Sn(t,e){return`${t}-${e}`}function Cn(t,e){return`site/apps/${t}/${e}.ts`}const Ec="@decocms/",Pc=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function Ac(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const _c={"tanstack-start":"tanstack"};function Dc(t){return t?_c[t]??null:"deno"}function Ha(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 Ya(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 Bc=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function Wa(t){return Bc.test(t)}function Rc(t){const e=Ha(t);if(!e)return null;const s=Ya(e),n=[...Pc,...Object.keys(s).filter(i=>i.startsWith(Ec)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!Wa(r))return r;a??=r}}return a}function $c(t,e){const s=Ha(t);return s?Ya(s)[e]??null:null}function Oc(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:Rc(t.packageJson)}:null}class Me extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function qa(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return/^[0-9]/.test(s)?`app${s}`:s}function Lc(t){return`${qa(t)}Mod`}const Ic=/"apps"\s*:\s*\{/;function Ro(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--cZ0paPb.js","assets/index-DWvRfTwV.js","assets/index-ug7KC70Z.css","assets/chat-context-yHOaM07v.js","assets/autosend-DbfDzqlB.js","assets/thread-route-DMWye38f.js","assets/use-project-scope-B4B7p1mj.js","assets/repository-binding-CeErFm4l.js","assets/use-mcp-client-Z8a6jg-w.js","assets/auth-xvjttF9D.js","assets/thread-intent-BONVdhUb.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-B6ObjuCT.js","assets/task-board-CzrPT-OZ.js","assets/schema-DvxWNZKz.js","assets/use-entitlements-BChYmsyZ.js","assets/use-ai-providers-CCcuLCZt.js","assets/use-decopilot-events-CZSx1Itd.js","assets/use-organization-settings-DqaBVcmT.js","assets/input-Lv9puCyJ.js","assets/usage-stats-qZh3WQDj.js","assets/tool-namespace-CmEhPnkj.js","assets/form-DE5X7SPR.js","assets/label-BkzEUDUr.js","assets/utils-CVEq3hMx.js","assets/markdown-DkmjrNqn.js","assets/use-copy-CMfnyhoo.js","assets/agent-icon-Nkid6y9z.js","assets/AlertCircle-BPGyk76P.js","assets/Tool01-CyX9Nllj.js","assets/ArrowUp-BJTv4ddc.js","assets/ArrowLeft-DRdw9Nza.js","assets/LinkBroken01-4j6Z2AOF.js","assets/ShoppingBag01-CY137tVP.js","assets/Globe04-Dr1jk8eS.js","assets/CheckCircle-y3P873c6.js","assets/ChevronUp-CDe5Gfov.js","assets/ChevronSelectorVertical-TIONA5Zl.js","assets/UserSquare-DmeGszKa.js","assets/CreditCard01-abk_vBBR.js","assets/SwitchHorizontal01-C3qdjyVX.js","assets/Key01-DzZgIVqE.js","assets/Minus-B2u_zm0f.js","assets/Monitor01-DWylBoOJ.js","assets/Sun-CyYLfv8E.js","assets/Play-CV8_Sy8a.js","assets/Plus-BtfY7EHX.js","assets/SearchMd-DD6kw-fs.js","assets/Trash01-DSJ1LUhI.js","assets/Upload01-DC0joCKG.js","assets/Users01-B-OacssU.js","assets/XClose-avSrIpAi.js","assets/Zap--C2rij07.js","assets/use-mobile-B7UqukPG.js","assets/tooltip-BVv5wAeF.js","assets/index-J6dVRDZu.js","assets/icon-button-1xC_JQLB.js","assets/file-type-icon-jLU7FJUL.js","assets/chat-draft-BKLG-IxC.js","assets/select-gJgQvQZg.js","assets/index-BdQq_4o_.js","assets/tabs-BFXzZPNk.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-D1bpdE32.js","assets/toggle-group-Bw4R79dp.js","assets/index-KGPpyCdi.js","assets/checkbox-Dv6iFznu.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/popover-CpDRMXBS.js","assets/drawer-1kqkgpFK.js","assets/input-Z4x7UYYS.js","assets/suggestion-D-YZpsQl.js","assets/use-mcp-prompts-KWx0e75o.js","assets/use-org-fs-DU8c86TB.js","assets/useInfiniteQuery-DAm-dYuC.js","assets/infiniteQueryObserver-O1nZgTsK.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-BVXAF3Vl.js","assets/plan-ladder-wSfhs4No.js","assets/add-connection-dialog-uIVnUFji.js","assets/collection-search-CPadQqKp.js","assets/extract-connection-data-C6MDLhDM.js","assets/metadata-D72DunRR.js","assets/connection-9Wtillpb.js","assets/url-slug-CoT8zovb.js","assets/connection-card-B7mEOoWU.js","assets/connection-slug-BCjSI_lE.js","assets/integration-icon-BCp7DD7C.js","assets/textarea-BVq0fBVJ.js","assets/use-connection-BQpfU6u4.js","assets/schema-DiUKA_SL.js","assets/connection-form-helpers-ZOfZ5xVa.js","assets/authenticate-and-persist-oauth-DdntocF2.js","assets/mcp-oauth-SAUpfbwO.js","assets/mcp-oauth-CNMWqwMp.js","assets/collection-tabs-B05-I-04.js","assets/badge-BLk85LCv.js","assets/use-infinite-scroll-C7IQ9e5j.js","assets/useSuspenseInfiniteQuery-BTqieOpO.js","assets/use-task-board-events-B8bEY6A0.js","assets/use-chat-layout-state-Dnl_7DMo.js","assets/input-Bwd_JSM8.css","assets/scroll-area-CUevVS4T.js","assets/use-section-preview-base-C7kw5vsr.js","assets/parse-sections-CK6AHU3E.js","assets/utils-B-ZZ1C4f.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-BwCxrq_f.js","assets/collapsible-WPiOb2df.js","assets/shell-layout-Bx4AZ_YV.js","assets/use-deployment-admin-DQ5wNSYp.js","assets/admin-fetch-BhTJlAsX.js","assets/command-CSFENWMV.js","assets/index-Czm9RrRY.js","assets/project-icon-DTA6ZXhl.js","assets/use-navigate-to-agent-9BOtBFjV.js","assets/new-project-dialog-Kvs8XyHN.js","assets/repository-picker-C3C3_E5g.js","assets/github-icon-Bvc_Uep-.js","assets/use-debounced-value-DiJ2aJN8.js","assets/required-auth-layout-nGThcCwM.js","assets/use-org-sso-nKgxHjqa.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CIky1nBi.js","assets/types-7R44AYrk.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-BKUVqko3.js","assets/use-thread-outputs-DIlmUcwz.js","assets/blocks-tab-states-DP3rjaHt.js","assets/site-editor-toast-B-FxlfJP.js","assets/agent-capabilities-4Kae1N0E.js","assets/sandbox-url-D3mC8qhT.js","assets/index-BtlZo3IV.js","assets/sandbox-git-api-DcqI6XE4.js","assets/empty-state-CbRq3C3n.js","assets/hosted-reconcile-gHkwH1BF.js","assets/slider-CnnTZZH8.js","assets/index-BJKjGJrF.js","assets/tooltipContext-DwFHeBjZ.js","assets/CategoricalChart-CVu6TY4_.js","assets/index-L3rSytXD.js","assets/switch-UpbwlQtZ.js","assets/monaco-editor-Dff4ZjU3.js","assets/editor-CrG4V3zO.js","assets/calendar-CDcnOKeY.js","assets/editor-classes-LBX4QjrW.js","assets/core.esm-C3kzKmQL.js","assets/sortable.esm-YReNzob1.js","assets/combobox-AFeNX90_.js","assets/search-input-DWWqDlal.js","assets/use-file-configs-DRzFKzj4.js","assets/asset-utils-CwwYcMA6.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/view-header-BTUnAkrc.js","assets/use-cms-publish-actions-CgLBJwXN.js","assets/use-content-sync-DjDHeqFk.js","assets/mustache-DCgM4RQC.js","assets/sandbox-lifecycle-context-CuiD9fGV.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-DqXCo5PB.js","assets/empty-state-CVOGmYU9.js","assets/collection-table-wrapper-DbE8PRZm.js","assets/table-D9nZzqmf.js","assets/cms-settings-editor-BKSzHFaJ.js","assets/post-editor-BHEvn_Zz.js","assets/multi-select-B4WkKxx8.js","assets/block-document-CSsqtozZ.js","assets/product-picker-dialog-DzFQlf9n.js","assets/index-pqEXXiDC.js","assets/blog-schema-B65cUy5G.js","assets/use-fast-preview-draft-url-CO3Nwa6o.js","assets/use-autosave--xoi8yhU.js","assets/record-editor-BZSwvkut.js","assets/context-D9Jnu7vN.js","assets/index-C1iaIX-s.js","assets/category-editor-BFW4v6Zt.js","assets/sections-editor-CEHFL2VN.js","assets/seo-editor-CaLY6KkG.js","assets/use-apply-named-rule-BRjLBznN.js","assets/variant-matcher-override-BDeSqmx4.js","assets/variant-calendar-CPbvwCiJ.js","assets/post-calendar-C4WCdLXl.js","assets/redirect-editor-BxlqORGw.js"])))=>i.map(i=>d[i]);
2
+ import{c as ce,b as Ee,j as o,B as De,h as mt,q as qi,e as Xi,K as ko,m as je,r as F,w as Ys,x as Es,I as ms,y as Ws,v as Ps,D as As,aT as Xn,ba as Qi,aG as Ji,t as ke,ak as Zi,bb as Fs,bc as $s,X as nn,bd as jo,Z as on,_ as an,b2 as Qn,aU as el,Y as Ot,as as ln,be as Jn,bf as tl,bg as sl,au as _n,am as nl,bh as ma,a5 as ol,bi as al,u as ga,b9 as xt,aN as il,aM as ll,aJ as rl,aH as cl,aI as dl,aL as ul,aK as pl,bj as fl,bk as ml}from"./index-DWvRfTwV.js";import{a as Zn}from"./use-organization-settings-DqaBVcmT.js";import{u as yn,c as eo}from"./chat-context-yHOaM07v.js";import{H as gl,N as hl}from"./hosted-reconcile-gHkwH1BF.js";import{f as Dn,e as xl,c as bl,g as ha,B as Bn,P as yl,h as vl,i as xa,j as kl,k as jl,n as wl,L as Sl,u as vn,l as Cl,o as Nl,R as Tl,E as ft,q as ba,r as El,s as Pl,a as ya,t as Al,v as et,H as va,w as _l,x as ka,y as Dl,M as Bl,d as Rl,z as $l,p as Ol,A as Ll,C as Il,b as Kl,S as Fl,D as wo,F as zl,N as Ml}from"./parse-sections-CK6AHU3E.js";import{S as Vl,a as Ul}from"./view-header-BTUnAkrc.js";import{i as Vs}from"./AlertCircle-BPGyk76P.js";import{Y as ja,l as zn,u as Gl,Z as wa,_ as Sa,$ as to,a0 as Ca,b as rn,S as Na,a1 as Hl,a2 as Yl,a3 as Wl,a4 as ql,a5 as Mn,e as so,n as Xl,a6 as Ta,a7 as Ql,a8 as Jl,a9 as Zl,m as So,aa as er,X as Ea}from"./agent-icon-Nkid6y9z.js";import{a as Pa,s as cn,i as no,d as tr,e as Co}from"./UserSquare-DmeGszKa.js";import{c as oo,i as sr}from"./SwitchHorizontal01-C3qdjyVX.js";import{s as kn}from"./Plus-BtfY7EHX.js";import{t as Aa}from"./Users01-B-OacssU.js";import{S as qs}from"./scroll-area-CUevVS4T.js";import{T as wt,a as St,c as Ct}from"./tooltip-BVv5wAeF.js";import{o as nr,c as _a,W as or,X as ar,Y as ir,Z as lr,q as Da,_ as ao,u as io,m as Ba,z as rr,$ as cr,a0 as dr,a1 as ur,l as pr,a2 as fr,E as No,n as mr,b as gr}from"./site-editor-toast-B-FxlfJP.js";import{m as hr,o as xr,q as br,t as yr,w as vr,x as Ra,n as Kt,v as kr,R as jr,y as wr,z as Sr,A as Cr,D as $a,E as Nr,F as Oa,G as Tr,H as Er,I as Pr,J as Ar,g as La,i as _r,K as Qs,u as Dr,L as Br,e as To,M as Eo,S as Rr,C as $r,O as Or,c as Lr,P as Ir,h as Kr,Q as Ia,T as Fr,U as zr,V as Mr,W as Vr,X as Ur,Y as Gr,Z as Hr,_ as Yr}from"./blocks-tab-states-DP3rjaHt.js";import{C as Ka,u as Wr,h as Po}from"./use-cms-publish-actions-CgLBJwXN.js";import{u as qr,S as Xr}from"./mustache-DCgM4RQC.js";import{u as Qr}from"./use-content-sync-DjDHeqFk.js";import{s as Jr}from"./sandbox-git-api-DcqI6XE4.js";import{a as lo}from"./input-Lv9puCyJ.js";import{b as ro}from"./sandbox-url-D3mC8qhT.js";import{d as Zr}from"./utils-B-ZZ1C4f.js";import{a as ec}from"./autosend-DbfDzqlB.js";import{u as Fa,b as za}from"./repository-binding-CeErFm4l.js";import{n as Ma}from"./ShoppingBag01-CY137tVP.js";import{t as Us}from"./ChevronUp-CDe5Gfov.js";import{i as Va}from"./Zap--C2rij07.js";import{C as tc,a as sc,b as nc}from"./collapsible-WPiOb2df.js";import{u as oc}from"./index-BtlZo3IV.js";import{a as ac}from"./sandbox-lifecycle-context-CuiD9fGV.js";import{C as jn}from"./checkbox-Dv6iFznu.js";import{L as cs}from"./label-BkzEUDUr.js";import{c as ic,b as lc,a as rc,d as cc,S as dc}from"./select-gJgQvQZg.js";import{s as uc}from"./thread-intent-BONVdhUb.js";import{s as pc}from"./date-utils-CrvIKg-s.js";import{u as fc}from"./use-move-blocks-DqXCo5PB.js";import{i as mc}from"./CheckCircle-y3P873c6.js";import{s as co}from"./Trash01-DSJ1LUhI.js";import{i as Rn}from"./Upload01-DC0joCKG.js";import{B as wn}from"./badge-BLk85LCv.js";import{E as gc}from"./empty-state-CVOGmYU9.js";import{u as hc}from"./use-ai-providers-CCcuLCZt.js";import{T as Ao}from"./textarea-BVq0fBVJ.js";import{u as xc}from"./use-file-configs-DRzFKzj4.js";import{MonacoCodeEditor as Ua}from"./monaco-editor-Dff4ZjU3.js";import"./core.esm-C3kzKmQL.js";import"./sortable.esm-YReNzob1.js";import{c as bc}from"./Tool01-CyX9Nllj.js";import{S as yc}from"./search-input-DWWqDlal.js";import{a as vc,T as $n}from"./toggle-group-Bw4R79dp.js";import{C as kc}from"./collection-table-wrapper-DbE8PRZm.js";import{a as _o}from"./agent-capabilities-4Kae1N0E.js";import{E as jc}from"./empty-state-CbRq3C3n.js";import{G as Do}from"./github-icon-Bvc_Uep-.js";import{R as wc}from"./new-project-dialog-Kvs8XyHN.js";function Ga(){return Zn("blog_ai_enabled")}const Bo=2e3,Sc=45;function Cc(t){const{resolveType:e,meta:s,reads:n,window:a}=t;return typeof e!="string"||e===""?{interval:!1,window:null}:s&&hr(e,s)?{interval:!1,window:null}:!a||a.resolveType!==e?{interval:Bo,window:{resolveType:e,reads:n}}:n-a.reads>=Sc?{interval:!1,window:a}:{interval:Bo,window:a}}const Nc=[{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"}],Tc=[{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 Sn(t,e){return`${t}-${e}`}function Cn(t,e){return`site/apps/${t}/${e}.ts`}const Ec="@decocms/",Pc=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function Ac(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const _c={"tanstack-start":"tanstack"};function Dc(t){return t?_c[t]??null:"deno"}function Ha(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 Ya(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 Bc=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function Wa(t){return Bc.test(t)}function Rc(t){const e=Ha(t);if(!e)return null;const s=Ya(e),n=[...Pc,...Object.keys(s).filter(i=>i.startsWith(Ec)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!Wa(r))return r;a??=r}}return a}function $c(t,e){const s=Ha(t);return s?Ya(s)[e]??null:null}function Oc(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:Rc(t.packageJson)}:null}class Me extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function qa(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return/^[0-9]/.test(s)?`app${s}`:s}function Lc(t){return`${qa(t)}Mod`}const Ic=/"apps"\s*:\s*\{/;function Ro(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 Kc(t,e){const s=`${e}/mod`;return{path:`src/apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${s}";
5
5
  export * from "${s}";
@@ -22,4 +22,4 @@ ${u.replace(/^\s*\]/,"]")}`:u].join("")}function Hc(t){const{entry:e,technology:
22
22
  <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"]]'}},Gu=600;function Hu(t,e){for(const{payload:s}of ht(e,"posts"))for(const n of at(s.sections)){const a=Te(n);if(!a||a.__resolveType!==t)continue;const{__resolveType:i,...r}=a;if(Object.keys(r).length!==0&&!(JSON.stringify(r).length>Gu))return r}}function Yu(t,e,s,n){const a=Du(e,n),i=fo(e,n),r=new Set(Ci(t.value,i)),c=a.filter(g=>r.has(g.resolveType)),l=c.length>0?c:a,d=new Set,u=[];for(const g of l){if(d.has(g.name)||i[g.name]!==g.resolveType)continue;d.add(g.name);const m=Hu(g.resolveType,s)??Uu[g.name];u.push({name:g.name,title:g.title,description:g.description??"",schema:Vu(zu(g.resolveType,e),m),example:m})}return u}function fo(t,e){const s={};for(const n of bi(t,e)){const a=En(n.resolveType);a in s||(s[a]=n.resolveType)}return s}function Wu(t,e,s={}){const n=[];for(const a of t){const i=e[a.type];if(!i)continue;const r=Qu(a.props,a.productIds??[],s[a.type]);n.push({__resolveType:i,...r})}return n}const qu=["product","products"];function Xu(t){const e=Te(t);return e?qu.find(s=>s in e)??null:null}function Qu(t,e,s){const n=e.filter(Boolean),a=Xu(s);if(n.length===0||!a)return t;const i=s[a];return{...t,[a]:Ud(i,n)}}const mo=80;function Pi(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,mo)}function Mg(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+/,"").slice(0,mo)}function Yo(t,e){const s=mo-e.length-1;return`${t.slice(0,s).replace(/-+$/,"")}-${e}`}function Ai(t,e,s){const n=Pi(t)||`${s}-${_s(6)}`,a=new Set(e);if(!a.has(n))return n;for(let i=2;i<100;i++){const r=Yo(n,String(i));if(!a.has(r))return r}return Yo(n,_s(4))}function _i(t,e){return Ai(t,e,"post")}function Ju(t,e){return Ai(t,e,"category")}function Zu({draft:t,resolveTypes:e,productShapes:s,categories:n,authors:a,planning:i,takenSlugs:r,now:c}){const l=new Set(t.categorySlugs),d=new Set(t.authorEmails),u={title:t.title,slug:_i(t.title,r),date:c.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=>l.has(g.slug)),seo:{title:t.seo.title,description:t.seo.description,image:t.cover.url},sections:Wu(t.sections,e,s),planning:i??{}};return dn(u,"awaiting_review",c)}function mn(t){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const Di=/^(\d{4})-(\d{2})-(\d{2})$/;function gn(t){const e=t.trim();if(!e)return null;const s=Di.exec(e);if(s){const a=Number(s[1]),i=Number(s[2])-1,r=Number(s[3]),c=new Date(a,i,r);return c.getMonth()===i&&c.getDate()===r?c:null}const n=new Date(e);return Number.isNaN(n.getTime())?null:pc(n)}function ep(t){const e=new Date(t.getFullYear(),t.getMonth(),t.getDate(),ci);return{...hi("posts"),status:"scheduled",scheduledDatetime:e.toISOString(),date:mn(t)}}function tp(t){if(typeof t!="string")return null;const e=t.trim();if(!e)return null;if(Di.test(e))return gn(e);const s=new Date(e);return Number.isNaN(s.getTime())?null:s}function sp(t,e){const s=tp(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:"")===mn(s)&&(a.date=mn(n)),a}function np(t){return gn(t.scheduledDatetime)??gn(t.date)}function Vg(t){const e=new Map,s=[];for(const a of t){const i={post:a,scheduled:gn(a.scheduledDatetime)!==null},r=np(a);if(!r){s.push(i);continue}const c=mn(r),l=e.get(c);l?l.push(i):e.set(c,[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 hn={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 op({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,onMoved:a}){const i=Ee(),r=fc({orgSlug:t,virtualMcpId:e,branch:s}),[c,l]=F.useState(new Set),d=f=>ps(n[f],"posts"),u=(f,p,y=d(f))=>p==="generating"?{kind:"not-a-target"}:c.has(Ms(f))?{kind:"in-flight"}:eu(y,p)?{kind:"incomplete"}:null,g=f=>{switch(f.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(f)}};return{apply:async(f,p,y,j)=>{const E=y??d(f);if(Ds(E)===p)return null;const x=u(f,p,E);if(x)return x.kind!=="in-flight"&&ke.error(g(x)),null;const S=Ms(f);l(v=>new Set(v).add(S));const C=iu({key:f,payload:E},p,new Date),b=Object.keys(C.writes)[0]??f;b!==f&&a?.(f,b);try{return await r.move(C,{shown:j}),b}catch(v){return b!==f&&a?.(b,f),v instanceof gl||ke.error(v instanceof Error?v.message:i("sandbox.postBoard.moveFailed")),null}finally{l(v=>{const T=new Set(v);return T.delete(S),T})}},refuse:u,reasonText:g,isMoving:f=>c.has(Ms(f))}}function Bi(){return Zn("hide_default_blog_blocks")}function ap(t){const e=ce.c(15),{value:s,onChange:n,placeholder:a,className:i,onFocus:r,onBlur:c,onKeyDown:l,spellCheck:d,readOnly:u,inputRef:g}=t,m=d===void 0?!0:d;let f;e[0]!==n?(f=j=>n(j.target.value),e[0]=n,e[1]=f):f=e[1];let p;e[2]!==i?(p=je("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]=p):p=e[3];let y;return e[4]!==g||e[5]!==c||e[6]!==r||e[7]!==l||e[8]!==a||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p||e[13]!==s?(y=o.jsx("textarea",{ref:g,value:s,onChange:f,onInput:ip,onFocus:r,onBlur:c,onKeyDown:l,placeholder:a,spellCheck:m,readOnly:u,rows:1,className:p}),e[4]=g,e[5]=c,e[6]=r,e[7]=l,e[8]=a,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=s,e[14]=y):y=e[14],y}function ip(t){const e=t.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function pt(t){return typeof t=="string"?t:""}function Ug(t){const e=ce.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=je(s,"pr-9"),e[3]=s,e[4]=a):a=e[4];let i;e[5]!==n||e[6]!==a?(i=o.jsx(ap,{...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(Yl,{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 c;return e[9]!==i?(c=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]=c):c=e[10],c}function Gg(t){const e=ce.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 Hg(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(co,{className:"size-3.25"}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx(De,{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 Yg(t){const e=ce.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 Wg(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=ce.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(qo,{active:!n,onClick:()=>i(""),children:a}),e[0]=a,e[1]=i,e[2]=n,e[3]=r):r=e[3];let c;if(e[4]!==i||e[5]!==s||e[6]!==n){let d;e[8]!==i||e[9]!==n?(d=u=>o.jsx(qo,{active:u===n,onClick:()=>i(u),children:u},u),e[8]=i,e[9]=n,e[10]=d):d=e[10],c=s.filter(Boolean).map(d),e[4]=i,e[5]=s,e[6]=n,e[7]=c}else c=e[7];let l;return e[11]!==r||e[12]!==c?(l=o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,c]}),e[11]=r,e[12]=c,e[13]=l):l=e[13],l}function qo(t){const e=ce.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=je("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 c;return e[2]!==s||e[3]!==a||e[4]!==n||e[5]!==r?(c=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]=c):c=e[6],c}function qg(t,e=[]){return typeof t=="string"?t:JSON.stringify(t??e)}const Zs=[{id:"campaign",label:"sandbox.generatePost.stepCampaign"},{id:"format",label:"sandbox.generatePost.stepFormat"},{id:"extra",label:"sandbox.generatePost.stepExtra"}],lp=[1,2,3],rp={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 cp({open:t,onOpenChange:e,decofile:s,hasAi:n,onGenerate:a}){const i=Ee(),r=xc(),[c,l]=F.useState("campaign"),[d,u]=F.useState(""),[g,m]=F.useState(""),[f,p]=F.useState(""),[y,j]=F.useState(""),[E,x]=F.useState(1),{merged:S}=ji(s),C=$u(S),b=Pu(s).filter(P=>P.status!=="finished"),v=b.find(P=>P.key===d),T=s[Au],w=ot(tt(T?.formats)),_=()=>{l("campaign"),u(""),m(""),p(""),j(""),x(1)},O=P=>{e(P),P||_()},B=Zs.findIndex(P=>P.id===c),K=c==="campaign"?!!v:c==="format"?g.trim().length>0&&f.trim().length>0:!0,k=c==="extra",z=()=>{v&&(a({campaign:v,format:{name:g.trim(),value:f.trim()},extraInstructions:y.trim()||void 0,count:E,fileConfigId:wl(r.data?.configs??[],null,typeof window<"u"?window.localStorage.getItem(Sl):null)??void 0}),O(!1))};return o.jsx(As,{open:t,onOpenChange:O,children:o.jsxs(Ps,{className:"flex max-h-[85vh] flex-col sm:max-w-2xl",children:[o.jsxs(Ys,{children:[o.jsx(Es,{children:i("sandbox.generatePost.title")}),o.jsx(Xn,{children:i("sandbox.generatePost.subtitle")})]}),C.length>0?o.jsx("p",{className:"text-sm text-muted-foreground",children:i("sandbox.generatePost.blockedBrand",{fields:C.map(P=>i(rp[P])).join(", ")})}):o.jsxs(o.Fragment,{children:[o.jsx("ol",{className:"flex shrink-0 items-center gap-1.5 text-xs",children:Zs.map((P,I)=>o.jsx("li",{className:je("rounded-md px-2 py-1",I===B?"bg-primary text-primary-foreground":I<B?"text-foreground":"text-muted-foreground"),children:i(P.label)},P.id))}),o.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto py-1",children:[c==="campaign"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.campaignHint")}),b.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(dp,{campaigns:b,chosen:d,onChoose:u})]}),c==="format"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatHint")}),o.jsx(Wo,{options:w.map(P=>P.name),value:g,onChange:P=>{m(P),p(w.find(I=>I.name===P)?.value??"")}}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{htmlFor:"generate-format-name",children:i("sandbox.generatePost.formatNameLabel")}),o.jsx(ms,{id:"generate-format-name",value:g,onChange:P=>m(P.target.value),placeholder:i("sandbox.generatePost.formatNamePlaceholder")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{htmlFor:"generate-format-value",children:i("sandbox.generatePost.formatValueLabel")}),o.jsx(Ao,{id:"generate-format-value",value:f,onChange:P=>p(P.target.value),placeholder:i("sandbox.generatePost.formatValuePlaceholder"),rows:4})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatBlocksHint")})]}),c==="extra"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{htmlFor:"generate-extra",children:i("sandbox.generatePost.extraLabel")}),o.jsx(Ao,{id:"generate-extra",value:y,onChange:P=>j(P.target.value),placeholder:i("sandbox.generatePost.extraPlaceholder"),rows:4})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{children:i("sandbox.generatePost.countLabel")}),o.jsx(Wo,{options:lp.map(String),value:String(E),onChange:P=>x(Number(P)||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(Ws,{className:"shrink-0 sm:justify-between",children:[o.jsx(De,{type:"button",variant:"outline",disabled:B===0,onClick:()=>l(Zs[B-1].id),children:i("sandbox.generatePost.back")}),k?o.jsxs(De,{type:"button",disabled:!n,onClick:z,children:[o.jsx(cn,{size:14}),i("sandbox.generatePost.generate",{count:String(E)})]}):o.jsx(De,{type:"button",disabled:!K,onClick:()=>l(Zs[B+1].id),children:i("sandbox.generatePost.next")})]})]})]})})}function dp(t){const e=ce.c(11),{campaigns:s,chosen:n,onChoose:a}=t,i=Ee();let r;if(e[0]!==s||e[1]!==n||e[2]!==a||e[3]!==i){let l;e[5]!==n||e[6]!==a||e[7]!==i?(l=d=>o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>a(d.key),className:je("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(wn,{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]=l):l=e[8],r=s.map(l),e[0]=s,e[1]=n,e[2]=a,e[3]=i,e[4]=r}else r=e[4];let c;return e[9]!==r?(c=o.jsx("ul",{className:"space-y-1.5",children:r}),e[9]=r,e[10]=c):c=e[10],c}function up(t){const e=[];for(let s=0;e.length<Fo;s+=1){const n=e.length;for(const a of t){const i=a.images?.[s];if(i&&(e.push(i),e.length>=Fo))return e}if(e.length===n)break}return e}const pp={"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 fp({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,meta:a,onStarted:i}){const r=Ee(),c=Zi(),l=Bi(),d=vn({orgSlug:t,virtualMcpId:e,branch:s});return async u=>{const g={campaignKey:u.campaign.key,format:u.format,brief:u.campaign.trigger.note},m=dn(fi({title:u.campaign.name,planning:g,now:new Date}),"generating",new Date),f=Array.from({length:u.count},()=>un(Gn())),{merged:p}=ji(n),y=ju(p),j=ht(n,"categories").map(({payload:w})=>({name:pt(w.name),slug:pt(w.slug)})).filter(w=>w.slug),E=Qd(n),x=Yu(u.format,a,n,{hideDefaults:l}),S=Object.fromEntries(x.map(w=>[w.name,w.example])),C=async(w,_=f.length)=>{for(const O of f.slice(w,_))try{await d.mutateAsync({blockKey:O,data:fs(O,dn(m,"draft",new Date))})}catch(B){console.warn("[generatePost] could not reset a card",B)}},b=async(w,_)=>{if(!_.fileConfigId||w.length===0)return new Map;try{const O=await c.call("BLOG_POST_ILLUSTRATE",{requests:w.map((B,K)=>({id:String(K),prompt:B.cover.prompt,alt:B.cover.alt})),productImages:up(_.campaign.intent.products),companyName:y.companyName??"",fileConfigId:_.fileConfigId});return new Map(O.images.map(B=>[B.id,B.url]))}catch(O){return console.warn("[generatePost] illustrating failed",O),new Map}};let v=0;try{for(const w of f)await d.mutateAsync({blockKey:w,data:fs(w,m)}),v+=1}catch(w){await C(0,v),ke.error(w instanceof Error?w.message:r("sandbox.generatePost.failed"));return}i?.(f);let T=0;try{const w=await c.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"post",focus:`${u.campaign.name}: ${u.campaign.trigger.note}`,language:y.language}).catch(k=>{console.warn("[generatePost] grounding failed",k)}),_=await c.call("BLOG_POST_DRAFT",{virtualMcpId:e,grounding:w?{report:w.report,outcome:w.outcome}:void 0,brand:{companyName:y.companyName,description:y.description,language:y.language,storeUrl:y.storeUrl,targetAudience:y.targetAudience,tone:y.tone,dos:y.dos,avoid:y.avoid,vocabulary:y.vocabulary,voiceExamples:y.voiceExamples},campaign:{name:u.campaign.name,period:u.campaign.period,trigger:u.campaign.trigger,intent:{objective:u.campaign.intent.objective,targets:u.campaign.intent.targets,products:u.campaign.intent.products,keywords:u.campaign.intent.keywords},guardrails:u.campaign.guardrails},format:u.format,blocks:x,categories:j,authors:E.map(({name:k,email:z})=>({name:k,email:z})),extraInstructions:u.extraInstructions?.trim()||void 0,count:u.count}),O=await b(_.posts,u),B=fo(a,{hideDefaults:l}),K=di(n).map(k=>k.slug);for(const[k,z]of _.posts.entries()){const P=f[k];if(!P)break;const I=Zu({draft:{...z,cover:{...z.cover,url:O.get(String(k))??""}},resolveTypes:B,productShapes:S,categories:j,authors:E,planning:g,takenSlugs:K,now:new Date});K.push(pt(I.slug)),await d.mutateAsync({blockKey:P,data:fs(P,I)}),T=k+1}await C(T),_.posts.length>0&&ke.success(r("sandbox.generatePost.done",{count:String(_.posts.length)}));for(const k of _.gaps)ke.warning(r(pp[k.code],{count:k.count??0}))}catch(w){await C(T),ke.error(w instanceof Error?w.message:r("sandbox.generatePost.failed"))}}}const mp=/<(h[1-6]|p|ul|ol|div|img|br|blockquote|section|article|figure)\b|<\/[a-z]/i;function Ri(t){return mp.test(t)}function gp(t){const e=t.trim();return e?Ri(e)?wp(e):Cp(e):{title:"",sections:[]}}function go(t){return t.replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#0?39;|&apos;/gi,"'").replace(/&amp;/gi,"&")}function Is(t){let e=t,s;do s=e,e=e.replace(/<[^>]+>/g,"");while(e!==s);return go(e).replace(/\s+/g," ").trim()}function hp(t){let e=t,s;do s=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==s);return e}function xp(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 $i(t){let e=t,s;do s=e,e=xp(hp(e));while(e!==s);return e}const bp=/^(a|b|strong|i|em|u|s|code|br|span|sub|sup)$/;function xn(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 yp(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const vp=/^<\/?([a-z][a-z0-9]*)\b([^>]*)>/i;function kp(t,e,s){const n=e.toLowerCase();if(!bp.test(n))return"";if(t.startsWith("</"))return`</${n}>`;if(n!=="a")return`<${n}>`;const a=go(s.match(/href\s*=\s*"([^"]*)"/i)?.[1]??"");return xn(a)&&a?`<a href="${yp(a)}">`:"<a>"}function Oi(t){const e=$i(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=vp.exec(e.slice(a));if(!i){s+="&lt;",n=a+1;continue}s+=kp(i[0],i[1]??"",i[2]??""),n=a+i[0].length}return s}function en(t,e){const s=t.match(new RegExp(`${e}\\s*=\\s*"([^"]*)"`,"i"));return s?.[1]?go(s[1]):""}const jp=/<(h[1-6]|p|ul|ol|blockquote|figure)\b[^>]*>([\s\S]*?)<\/\1\s*>|<hr\b[^>]*\/?>|<img\b[^>]*>/gi;function wp(t){const e=$i(t);let s="";const n=[];for(const a of e.matchAll(jp)){const i=a[1]?.toLowerCase(),r=a[2]??"",c=a[0];if(!i){if(/^<img/i.test(c)){const l=en(c,"src");l&&xn(l)&&n.push({kind:"image",url:l,alt:en(c,"alt"),caption:""})}else n.push({kind:"divider"});continue}if(/^h[1-6]$/.test(i)){const l=Is(r);if(!l)continue;if(i==="h1"&&!s){s=l;continue}n.push({kind:"heading",text:l,level:i.slice(1)})}else if(i==="p"){const l=Oi(r.trim());Is(l)&&n.push({kind:"paragraph",html:l})}else if(i==="ul"||i==="ol"){const l=[...r.matchAll(/<li\b[^>]*>([\s\S]*?)<\/li\s*>/gi)].map(d=>Is(d[1]??"")).filter(Boolean);l.length&&n.push({kind:"list",items:l,ordered:i==="ol"})}else if(i==="blockquote"){const l=Is(r);l&&n.push({kind:"quote",text:l})}else if(i==="figure"){const l=r.match(/<img\b[^>]*>/i)?.[0],d=l?en(l,"src"):"",u=Is(r.match(/<figcaption\b[^>]*>([\s\S]*?)<\/figcaption\s*>/i)?.[1]??"");d&&xn(d)&&n.push({kind:"image",url:d,alt:l?en(l,"alt"):"",caption:u})}}return{title:s,sections:n}}function Sp(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 Cp(t){const e=t.replace(/\r\n?/g,`
23
23
  `).split(`
24
24
  `);let s="";const n=[];let a=[],i=null,r=[];const c=()=>{a.length&&(n.push({kind:"paragraph",html:Oi(Sp(a.join(" ")))}),a=[])},l=()=>{i&&(n.push({kind:"list",items:i.items,ordered:i.ordered}),i=null)},d=()=>{r.length&&(n.push({kind:"quote",text:r.join(" ")}),r=[])},u=()=>{c(),l(),d()};for(const g of e){const m=g.trimEnd(),f=m.match(/^(#{1,6})\s+(.*)$/),p=m.match(/^!\[([^\]]*)\]\(([^)\s]+)\)\s*$/),y=m.match(/^\s*(?:[-*+]|\d+\.)\s+(.*)$/),j=/^\s*\d+\./.test(m),E=m.match(/^>\s?(.*)$/);if(!m.trim())u();else if(f){u();const x=f[2]?.trim()??"",S=String(f[1]?.length??1);S==="1"&&!s?s=x:x&&n.push({kind:"heading",text:x,level:S})}else if(/^(-{3,}|\*{3,}|_{3,})$/.test(m.trim()))u(),n.push({kind:"divider"});else if(p){u();const x=p[2]??"";xn(x)&&n.push({kind:"image",url:x,alt:p[1]??"",caption:""})}else y?(c(),d(),i||(i={items:[],ordered:j}),i.items.push(y[1]?.trim()??"")):E?(c(),l(),r.push(E[1]?.trim()??"")):(l(),d(),a.push(m.trim()))}return u(),{title:s,sections:n}}const Np={heading:"Heading",paragraph:"Paragraph",list:"List",quote:"Quote",divider:"Divider",image:"BlockImage"};function Tp(t,e){const s=[];for(const n of t){const a=e[Np[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(`
25
- `),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 Ep({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?_i(a,s):Pi(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const Xo="__all__",Qo={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},Pp={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},Jo="status:";function Zo(t){if(!t.startsWith(Jo))return null;const e=t.slice(Jo.length);return po.includes(e)?e:null}const ea=F.forwardRef(function(e,s){const n=ce.c(20);let a,i,r,c,l;n[0]!==e?({icon:a,active:i,value:l,className:r,...c}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=c,n[5]=l):(a=n[1],i=n[2],r=n[3],c=n[4],l=n[5]);const d=i?"text-foreground":"text-muted-foreground";let u;n[6]!==r||n[7]!==d?(u=je("gap-1 px-1.5 text-xs",d,r),n[6]=r,n[7]=d,n[8]=u):u=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 m;n[11]!==l?(m=l&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:l}),n[11]=l,n[12]=m):m=n[12];let f;n[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(Us,{size:12,className:"shrink-0 opacity-60"}),n[13]=f):f=n[13];let p;return n[14]!==c||n[15]!==s||n[16]!==u||n[17]!==g||n[18]!==m?(p=o.jsxs(De,{ref:s,type:"button",variant:"ghost",size:"sm",className:u,...c,children:[g,m,f]}),n[14]=c,n[15]=s,n[16]=u,n[17]=g,n[18]=m,n[19]=p):p=n[19],p});function ho(t){const e=ce.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 Ap(t){const e=ce.c(19),{value:s,onChange:n}=t,a=Ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=m=>n(m.target.value),e[1]=n,e[2]=r):r=e[2];let c;e[3]!==a?(c=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==a?(l=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=l):l=e[6];let d;e[7]!==r||e[8]!==c||e[9]!==l||e[10]!==s?(d=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:c,"aria-label":l,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=c,e[9]=l,e[10]=s,e[11]=d):d=e[11];let u;e[12]!==n||e[13]!==a||e[14]!==s?(u=s&&o.jsx(Li,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=u):u=e[15];let g;return e[16]!==d||e[17]!==u?(g=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,d,u]}),e[16]=d,e[17]=u,e[18]=g):g=e[18],g}function _p(t){const e=ce.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:c,sort:l,onCategoryFilterChange:d,onAuthorFilterChange:u,onStatusFilterChange:g,onSortChange:m}=t,f=Ee();let p;if(e[0]!==s||e[1]!==i){let J;e[3]!==i?(J=D=>D.slug===i,e[3]=i,e[4]=J):J=e[4],p=s.find(J),e[0]=s,e[1]=i,e[2]=p}else p=e[2];const y=p;let j;if(e[5]!==r||e[6]!==n){let J;e[8]!==r?(J=D=>D.email===r,e[8]=r,e[9]=J):J=e[9],j=n.find(J),e[5]=r,e[6]=n,e[7]=j}else j=e[7];const E=j,x=!!(i||r||c);let S;e[10]!==E?.name||e[11]!==y?.name||e[12]!==c||e[13]!==f?(S=y?.name??E?.name??f(c?hn[c]:"sandbox.postToolbar.filterLabel"),e[10]=E?.name,e[11]=y?.name,e[12]=c,e[13]=f,e[14]=S):S=e[14];const C=S,b=i?`cat:${i}`:r?`author:${r}`:c?`status:${c}`:Xo;let v;e[15]!==u||e[16]!==d||e[17]!==g?(v=()=>{d(null),u(null),g(null)},e[15]=u,e[16]=d,e[17]=g,e[18]=v):v=e[18];const T=v;let w;e[19]!==T||e[20]!==u||e[21]!==d||e[22]!==g?(w=J=>{J.startsWith("cat:")?(u(null),g(null),d(J.slice(4))):J.startsWith("author:")?(d(null),g(null),u(J.slice(7))):Zo(J)?(d(null),u(null),g(Zo(J))):T()},e[19]=T,e[20]=u,e[21]=d,e[22]=g,e[23]=w):w=e[23];const _=w;let O;e[24]!==C||e[25]!==x?(O=o.jsx(nn,{asChild:!0,children:o.jsx(ea,{icon:Wl,active:x,value:C,className:"min-w-0 shrink"})}),e[24]=C,e[25]=x,e[26]=O):O=e[26];let B;e[27]!==f?(B=f("sandbox.postToolbar.filterBy"),e[27]=f,e[28]=B):B=e[28];let K;e[29]!==B?(K=o.jsx($s,{children:B}),e[29]=B,e[30]=K):K=e[30];let k;e[31]!==f?(k=f("sandbox.postToolbar.allPosts"),e[31]=f,e[32]=k):k=e[32];let z;e[33]!==k?(z=o.jsx(Fs,{value:Xo,children:k}),e[33]=k,e[34]=z):z=e[34];let P;e[35]!==f?(P=f("sandbox.postToolbar.statusLabel"),e[35]=f,e[36]=P):P=e[36];let I;e[37]!==P?(I=o.jsx($s,{className:"text-muted-foreground/70",children:P}),e[37]=P,e[38]=I):I=e[38];let U;e[39]!==a||e[40]!==f?(U=po.map(J=>o.jsxs(Fs,{value:`status:${J}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:f(hn[J])}),o.jsx(ho,{count:a[J]??0})]},`status:${J}`)),e[39]=a,e[40]=f,e[41]=U):U=e[41];let q;e[42]!==s.length||e[43]!==f?(q=s.length>0&&o.jsx($s,{className:"text-muted-foreground/70",children:f("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=f,e[44]=q):q=e[44];let Y;e[45]!==s?(Y=s.map(Bp),e[45]=s,e[46]=Y):Y=e[46];let Q;e[47]!==n.length||e[48]!==f?(Q=n.length>0&&o.jsx($s,{className:"text-muted-foreground/70",children:f("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=f,e[49]=Q):Q=e[49];let A;e[50]!==n?(A=n.map(Dp),e[50]=n,e[51]=A):A=e[51];let G;e[52]!==b||e[53]!==_||e[54]!==z||e[55]!==I||e[56]!==U||e[57]!==q||e[58]!==Y||e[59]!==Q||e[60]!==A?(G=o.jsxs(jo,{value:b,onValueChange:_,children:[z,I,U,q,Y,Q,A]}),e[52]=b,e[53]=_,e[54]=z,e[55]=I,e[56]=U,e[57]=q,e[58]=Y,e[59]=Q,e[60]=A,e[61]=G):G=e[61];let $;e[62]!==G||e[63]!==K?($=o.jsxs(on,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[K,G]}),e[62]=G,e[63]=K,e[64]=$):$=e[64];let N;e[65]!==$||e[66]!==O?(N=o.jsxs(an,{children:[O,$]}),e[65]=$,e[66]=O,e[67]=N):N=e[67];let L;e[68]!==T||e[69]!==x||e[70]!==f?(L=x&&o.jsx(Li,{label:f("sandbox.postToolbar.clearFilter"),onClick:T}),e[68]=T,e[69]=x,e[70]=f,e[71]=L):L=e[71];const de=Pp[l];let ne;e[72]!==f||e[73]!==de?(ne=f(de),e[72]=f,e[73]=de,e[74]=ne):ne=e[74];let ie;e[75]!==ne?(ie=o.jsx(nn,{asChild:!0,children:o.jsx(ea,{icon:ql,active:!0,value:ne})}),e[75]=ne,e[76]=ie):ie=e[76];let fe;e[77]!==f?(fe=f("sandbox.postToolbar.sortBy"),e[77]=f,e[78]=fe):fe=e[78];let ue;e[79]!==fe?(ue=o.jsx($s,{children:fe}),e[79]=fe,e[80]=ue):ue=e[80];let te;e[81]!==m?(te=J=>m(J),e[81]=m,e[82]=te):te=e[82];let le;e[83]===Symbol.for("react.memo_cache_sentinel")?(le=Object.keys(Qo),e[83]=le):le=e[83];let oe;e[84]!==f?(oe=le.map(J=>o.jsx(Fs,{value:J,children:f(Qo[J])},J)),e[84]=f,e[85]=oe):oe=e[85];let be;e[86]!==l||e[87]!==te||e[88]!==oe?(be=o.jsx(jo,{value:l,onValueChange:te,children:oe}),e[86]=l,e[87]=te,e[88]=oe,e[89]=be):be=e[89];let M;e[90]!==ue||e[91]!==be?(M=o.jsxs(on,{align:"end",className:"w-44",children:[ue,be]}),e[90]=ue,e[91]=be,e[92]=M):M=e[92];let re;e[93]!==ie||e[94]!==M?(re=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(an,{children:[ie,M]})}),e[93]=ie,e[94]=M,e[95]=re):re=e[95];let me;return e[96]!==N||e[97]!==L||e[98]!==re?(me=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[N,L,re]}),e[96]=N,e[97]=L,e[98]=re,e[99]=me):me=e[99],me}function Dp(t){return o.jsxs(Fs,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(ho,{count:t.count})]},`author:${t.email}`)}function Bp(t){return o.jsxs(Fs,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(ho,{count:t.count})]},`cat:${t.slug}`)}function Li(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Qn,{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 Rp(t){const e=ce.c(18),{checked:s,disabled:n,onToggle:a}=t,i=Ee();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let c;e[2]!==s||e[3]!==i?(c=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=c):c=e[4];let l;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==c?(l=o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:$p,children:o.jsx(jn,{checked:s,disabled:n,onCheckedChange:r,"aria-label":c})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=c,e[9]=l):l=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 u;e[13]!==d?(u=o.jsx(St,{side:"bottom",children:d}),e[13]=d,e[14]=u):u=e[14];let g;return e[15]!==l||e[16]!==u?(g=o.jsxs(Ct,{children:[l,u]}),e[15]=l,e[16]=u,e[17]=g):g=e[17],g}function $p(t){return t.stopPropagation()}function Op(t){const e=ce.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,c=Ee();let l;e[0]!==n||e[1]!==a?(l=o.jsx(Rp,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=l):l=e[2];let d;e[3]!==s||e[4]!==c?(d=c("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==d?(u=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:d}),e[6]=d,e[7]=u):u=e[7];const g=s===0;let m;e[8]!==c?(m=c("sandbox.postToolbar.archiveSelectedPosts"),e[8]=c,e[9]=m):m=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(el,{size:14}),e[10]=f):f=e[10];let p;e[11]!==i||e[12]!==g||e[13]!==m?(p=o.jsx(wt,{asChild:!0,children:o.jsx(De,{type:"button",variant:"ghost",size:"icon-sm",disabled:g,onClick:i,"aria-label":m,children:f})}),e[11]=i,e[12]=g,e[13]=m,e[14]=p):p=e[14];let y;e[15]!==c?(y=c("sandbox.postToolbar.archiveSelected"),e[15]=c,e[16]=y):y=e[16];let j;e[17]!==y?(j=o.jsx(St,{side:"bottom",children:y}),e[17]=y,e[18]=j):j=e[18];let E;e[19]!==p||e[20]!==j?(E=o.jsxs(Ct,{children:[p,j]}),e[19]=p,e[20]=j,e[21]=E):E=e[21];let x;e[22]!==c?(x=c("sandbox.postToolbar.exitSelection"),e[22]=c,e[23]=x):x=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Qn,{size:14}),e[24]=S):S=e[24];let C;e[25]!==r||e[26]!==x?(C=o.jsx(wt,{asChild:!0,children:o.jsx(De,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":x,children:S})}),e[25]=r,e[26]=x,e[27]=C):C=e[27];let b;e[28]!==c?(b=c("sandbox.postToolbar.exitSelection"),e[28]=c,e[29]=b):b=e[29];let v;e[30]!==b?(v=o.jsx(St,{side:"bottom",children:b}),e[30]=b,e[31]=v):v=e[31];let T;e[32]!==C||e[33]!==v?(T=o.jsxs(Ct,{children:[C,v]}),e[32]=C,e[33]=v,e[34]=T):T=e[34];let w;e[35]!==E||e[36]!==T?(w=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[E,T]}),e[35]=E,e[36]=T,e[37]=w):w=e[37];let _;return e[38]!==l||e[39]!==w||e[40]!==u?(_=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[l,u,w]}),e[38]=l,e[39]=w,e[40]=u,e[41]=_):_=e[41],_}const Lp={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},Wn="generating",Ip=[Wn,...po.filter(t=>t!==Wn)],ta=t=>t.scheduledDatetime||t.date||"",Kp=(t,e)=>ta(e).localeCompare(ta(t)),Fp=t=>t==="scheduled"||t==="published",Ii="application/x-post-key";function zp(t){const e=ce.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:c,onViewChange:l,onOpen:d,onClose:u,move:g,meta:m,renderDetail:f}=t,p=Ee();let y;e[0]!==a||e[1]!==s||e[2]!==n?(y={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=y):y=e[3];const j=vn(y),E=hc().length>0,x=Ga(),S=Bi(),[C,b]=F.useState(null),[v,T]=F.useState(!1),[w,_]=F.useState(!1),[O,B]=F.useState(!1),[K,k]=F.useState(""),z=F.useRef(null);let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P={},e[4]=P):P=e[4];const[I,U]=F.useState(P);let q;e[5]!==I?(q=(H,pe)=>I[H]??pe,e[5]=I,e[6]=q):q=e[6];const Y=q;let Q;e[7]===Symbol.for("react.memo_cache_sentinel")?(Q=(H,pe)=>U(Le=>({...Le,[H]:pe})),e[7]=Q):Q=e[7];const A=Q;let G;e[8]!==d?(G=H=>{const pe=H[0];pe&&d(pe)},e[8]=d,e[9]=G):G=e[9];let $;e[10]!==a||e[11]!==i||e[12]!==m||e[13]!==s||e[14]!==G||e[15]!==n?($={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:m,onStarted:G},e[10]=a,e[11]=i,e[12]=m,e[13]=s,e[14]=G,e[15]=n,e[16]=$):$=e[16];const N=fp($),L=au(i);let de;e[17]!==i?(de=H=>ps(i[H],"posts"),e[17]=i,e[18]=de):de=e[18];const ne=de,ie=c&&L.some(H=>H.key===c)?c:L[0]?.key??null;let fe;e[19]!==g||e[20]!==p?(fe=async H=>{await g.apply(H.key,"archived")&&ke.success(p("sandbox.postBoard.archived"))},e[19]=g,e[20]=p,e[21]=fe):fe=e[21];const ue=fe,[te,le]=F.useState(null),[oe,be]=F.useState(null),[M,re]=F.useState(null),[me,J]=F.useState("date-desc"),[D,Z]=F.useState("");let ae;e[22]===Symbol.for("react.memo_cache_sentinel")?(ae=new Set,e[22]=ae):ae=e[22];const[ye,Se]=F.useState(ae),_e=L.reduce(Hp,{}),we=H=>{const pe=new Map;for(const Le of L)for(const ut of H(Le))pe.set(ut,(pe.get(ut)??0)+1);return pe},Be=we(Gp),W=we(Up),se=ht(i,"categories").map(H=>{const{payload:pe}=H;return{slug:pt(pe.slug),name:pt(pe.name)||pt(pe.slug),count:Be.get(pt(pe.slug))??0}}),he=ht(i,"authors").map(H=>{const{payload:pe}=H;return{email:pt(pe.email),name:pt(pe.name)||pt(pe.email),count:W.get(pt(pe.email))??0}}),xe=D.trim().toLowerCase();let Re;e[23]!==te?(Re=H=>!te||H.categorySlugs.includes(te),e[23]=te,e[24]=Re):Re=e[24];let Ke;e[25]!==oe?(Ke=H=>!oe||H.authorEmails.includes(oe),e[25]=oe,e[26]=Ke):Ke=e[26];let Ge;e[27]!==M?(Ge=H=>!M||H.status===M,e[27]=M,e[28]=Ge):Ge=e[28];let $e;e[29]!==me?($e=(H,pe)=>{if(me==="az")return H.title.localeCompare(pe.title);if(me==="za")return pe.title.localeCompare(H.title);const Le=(H.scheduledDatetime||H.date).localeCompare(pe.scheduledDatetime||pe.date);return me==="date-asc"?Le:-Le},e[29]=me,e[30]=$e):$e=e[30];const qe=L.filter(Re).filter(Ke).filter(Ge).filter(H=>!xe||H.title.toLowerCase().includes(xe)||H.slug.toLowerCase().includes(xe)).sort($e),Nt=ye.size>0;let Pe;e[31]===Symbol.for("react.memo_cache_sentinel")?(Pe=H=>Se(pe=>{const Le=new Set(pe);return Le.delete(H)||Le.add(H),Le}),e[31]=Pe):Pe=e[31];const st=Pe,it=()=>Se(H=>qe.every(pe=>H.has(pe.key))?new Set:new Set(qe.map(Vp)));let Ie;e[32]!==g||e[33]!==ye||e[34]!==p?(Ie=async()=>{let H=0;for(const pe of ye)await g.apply(pe,"archived")&&(H=H+1);Se(new Set),H>0&&ke.success(p("sandbox.postBoard.archived"))},e[32]=g,e[33]=ye,e[34]=p,e[35]=Ie):Ie=e[35];const X=Ie;let Ne;e[36]!==g?(Ne=(H,pe)=>{b(null),g.apply(pe,H)},e[36]=g,e[37]=Ne):Ne=e[37];const Ce=Ne;let Oe;e[38]!==d||e[39]!==j?(Oe=()=>{const H=un(Gn()),pe=fi({title:"",now:new Date});j.mutate({blockKey:H,data:fs(H,pe)}),d(H)},e[38]=d,e[39]=j,e[40]=Oe):Oe=e[40];const He=Oe,Ft=()=>{const H=gp(K),pe=Tp(H.sections,fo(m,{hideDefaults:S}));if(pe.length===0&&!H.title.trim()){ke.error(p("sandbox.postBoard.importEmpty"));return}const Le=un(Gn()),ut=Ep({title:H.title,blocks:pe,takenSlugs:L.map(Mp).filter(Boolean),now:new Date});j.mutate({blockKey:Le,data:fs(Le,ut)}),B(!1),k(""),ke.success(p("sandbox.postBoard.imported")),d(Le)},Jt=r==="list";let Ye;e[41]!==l?(Ye=()=>l("list"),e[41]=l,e[42]=Ye):Ye=e[42];let zt;e[43]===Symbol.for("react.memo_cache_sentinel")?(zt=o.jsx(sr,{size:14}),e[43]=zt):zt=e[43];let Fe;e[44]!==p?(Fe=p("sandbox.postBoard.viewList"),e[44]=p,e[45]=Fe):Fe=e[45];let Ue;e[46]!==Jt||e[47]!==Ye||e[48]!==Fe?(Ue=o.jsx(sa,{active:Jt,onClick:Ye,icon:zt,label:Fe}),e[46]=Jt,e[47]=Ye,e[48]=Fe,e[49]=Ue):Ue=e[49];const Bs=r==="board";let Tt;e[50]!==l?(Tt=()=>l("board"),e[50]=l,e[51]=Tt):Tt=e[51];let Zt;e[52]===Symbol.for("react.memo_cache_sentinel")?(Zt=o.jsx(Xl,{size:14}),e[52]=Zt):Zt=e[52];let Et;e[53]!==p?(Et=p("sandbox.postBoard.viewBoard"),e[53]=p,e[54]=Et):Et=e[54];let bt;e[55]!==Bs||e[56]!==Tt||e[57]!==Et?(bt=o.jsx(sa,{active:Bs,onClick:Tt,icon:Zt,label:Et}),e[55]=Bs,e[56]=Tt,e[57]=Et,e[58]=bt):bt=e[58];let es;e[59]!==Ue||e[60]!==bt?(es=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:[Ue,bt]})}),e[59]=Ue,e[60]=bt,e[61]=es):es=e[61];let ts;e[62]===Symbol.for("react.memo_cache_sentinel")?(ts=o.jsx(kn,{size:14}),e[62]=ts):ts=e[62];let Xe;e[63]!==p?(Xe=p("sandbox.postBoard.newPost"),e[63]=p,e[64]=Xe):Xe=e[64];let ss;e[65]===Symbol.for("react.memo_cache_sentinel")?(ss=o.jsx(Us,{size:14}),e[65]=ss):ss=e[65];let lt;e[66]!==Xe?(lt=o.jsx(nn,{asChild:!0,children:o.jsxs(De,{type:"button",size:"sm",children:[ts,Xe,ss]})}),e[66]=Xe,e[67]=lt):lt=e[67];let Mt;e[68]!==x||e[69]!==p?(Mt=x&&o.jsxs(Ot,{onClick:()=>_(!0),children:[o.jsx(cn,{size:14}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{children:p("sandbox.postBoard.newPostGenerate")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:p("sandbox.postBoard.newPostGenerateHint")})]})]}),e[68]=x,e[69]=p,e[70]=Mt):Mt=e[70];let yt;e[71]===Symbol.for("react.memo_cache_sentinel")?(yt=o.jsx(tr,{size:14}),e[71]=yt):yt=e[71];let Qe;e[72]!==p?(Qe=p("sandbox.postBoard.newPostWrite"),e[72]=p,e[73]=Qe):Qe=e[73];let Pt;e[74]!==Qe?(Pt=o.jsx("span",{children:Qe}),e[74]=Qe,e[75]=Pt):Pt=e[75];let Vt;e[76]!==p?(Vt=p("sandbox.postBoard.newPostWriteHint"),e[76]=p,e[77]=Vt):Vt=e[77];let At;e[78]!==Vt?(At=o.jsx("span",{className:"text-xs text-muted-foreground",children:Vt}),e[78]=Vt,e[79]=At):At=e[79];let vt;e[80]!==Pt||e[81]!==At?(vt=o.jsxs("div",{className:"flex flex-col",children:[Pt,At]}),e[80]=Pt,e[81]=At,e[82]=vt):vt=e[82];let Ut;e[83]!==vt||e[84]!==He?(Ut=o.jsxs(Ot,{onClick:He,children:[yt,vt]}),e[83]=vt,e[84]=He,e[85]=Ut):Ut=e[85];let hs,ns;e[86]===Symbol.for("react.memo_cache_sentinel")?(hs=()=>B(!0),ns=o.jsx(Rn,{size:14}),e[86]=hs,e[87]=ns):(hs=e[86],ns=e[87]);let Gt;e[88]!==p?(Gt=p("sandbox.postBoard.importContent"),e[88]=p,e[89]=Gt):Gt=e[89];let Ht;e[90]!==Gt?(Ht=o.jsx("span",{children:Gt}),e[90]=Gt,e[91]=Ht):Ht=e[91];let Ve;e[92]!==p?(Ve=p("sandbox.postBoard.importContentHint"),e[92]=p,e[93]=Ve):Ve=e[93];let _t;e[94]!==Ve?(_t=o.jsx("span",{className:"text-xs text-muted-foreground",children:Ve}),e[94]=Ve,e[95]=_t):_t=e[95];let Dt;e[96]!==Ht||e[97]!==_t?(Dt=o.jsxs(Ot,{onClick:hs,children:[ns,o.jsxs("div",{className:"flex flex-col",children:[Ht,_t]})]}),e[96]=Ht,e[97]=_t,e[98]=Dt):Dt=e[98];let rt;e[99]!==Mt||e[100]!==Ut||e[101]!==Dt?(rt=o.jsxs(on,{align:"end",className:"w-56",children:[Mt,Ut,Dt]}),e[99]=Mt,e[100]=Ut,e[101]=Dt,e[102]=rt):rt=e[102];let os;e[103]!==lt||e[104]!==rt?(os=o.jsxs(an,{children:[lt,rt]}),e[103]=lt,e[104]=rt,e[105]=os):os=e[105];let Je;e[106]!==x||e[107]!==i||e[108]!==w||e[109]!==N||e[110]!==E?(Je=x&&o.jsx(cp,{open:w,onOpenChange:_,decofile:i,hasAi:E,onGenerate:H=>{N(H)}}),e[106]=x,e[107]=i,e[108]=w,e[109]=N,e[110]=E,e[111]=Je):Je=e[111];let kt;e[112]!==p?(kt=p("sandbox.postBoard.importTitle"),e[112]=p,e[113]=kt):kt=e[113];let ct;e[114]!==kt?(ct=o.jsx(Es,{children:kt}),e[114]=kt,e[115]=ct):ct=e[115];let dt;e[116]!==p?(dt=p("sandbox.postBoard.importDescription"),e[116]=p,e[117]=dt):dt=e[117];let Ze;e[118]!==dt?(Ze=o.jsx(Xn,{children:dt}),e[118]=dt,e[119]=Ze):Ze=e[119];let xs;e[120]!==ct||e[121]!==Ze?(xs=o.jsxs(Ys,{children:[ct,Ze]}),e[120]=ct,e[121]=Ze,e[122]=xs):xs=e[122];const as=Ri(K)?"html":"markdown";let is;e[123]===Symbol.for("react.memo_cache_sentinel")?(is=H=>k(H??""),e[123]=is):is=e[123];let Yt;e[124]!==K||e[125]!==as?(Yt=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(Ua,{code:K,language:as,height:"100%",autoFocus:!0,onChange:is})}),e[124]=K,e[125]=as,e[126]=Yt):Yt=e[126];let ls;e[127]===Symbol.for("react.memo_cache_sentinel")?(ls=o.jsx("input",{ref:z,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async H=>{const pe=H.target.files?.[0];pe&&k(await pe.text()),H.target.value=""}}),e[127]=ls):ls=e[127];let bs,ys;e[128]===Symbol.for("react.memo_cache_sentinel")?(bs=()=>z.current?.click(),ys=o.jsx(Rn,{size:14}),e[128]=bs,e[129]=ys):(bs=e[128],ys=e[129]);let Bt;e[130]!==p?(Bt=p("sandbox.postBoard.importUpload"),e[130]=p,e[131]=Bt):Bt=e[131];let Rt;e[132]!==Bt?(Rt=o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:bs,children:[ys,Bt]}),e[132]=Bt,e[133]=Rt):Rt=e[133];let rs;e[134]!==Yt||e[135]!==Rt?(rs=o.jsxs("div",{className:"space-y-3",children:[Yt,ls,Rt]}),e[134]=Yt,e[135]=Rt,e[136]=rs):rs=e[136];let vs;e[137]!==K?(vs=K.trim(),e[137]=K,e[138]=vs):vs=e[138];let ks;e[139]===Symbol.for("react.memo_cache_sentinel")?(ks=o.jsx(Rn,{size:14}),e[139]=ks):ks=e[139];let js;e[140]!==p?(js=p("sandbox.postBoard.importRun"),e[140]=p,e[141]=js):js=e[141];let ws;e[142]!==v||e[143]!==u||e[144]!==f||e[145]!==c||e[146]!==r?(ws=r==="board"&&c&&v&&f&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:f(c,{expanded:!0,onToggleExpand:()=>T(!1),onClose:()=>{T(!1),u?.()}})}),e[142]=v,e[143]=u,e[144]=f,e[145]=c,e[146]=r,e[147]=ws):ws=e[147];const Rs=r==="board"&&!!c&&!v;let Wt;e[148]!==u?(Wt=H=>{H||(T(!1),u?.())},e[148]=u,e[149]=Wt):Wt=e[149];let $t;e[150]!==p?($t=p("sandbox.collectionsSidebar.posts"),e[150]=p,e[151]=$t):$t=e[151];let qt;e[152]!==$t?(qt=o.jsx(Es,{className:"sr-only",children:$t}),e[152]=$t,e[153]=qt):qt=e[153];let Xt;e[154]!==u||e[155]!==f||e[156]!==c?(Xt=c&&f?o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Mn,{size:20,className:"animate-spin text-muted-foreground"})}),children:f(c,{expanded:!1,onToggleExpand:()=>T(!0),onClose:()=>u?.()})}):null,e[154]=u,e[155]=f,e[156]=c,e[157]=Xt):Xt=e[157];let Qt;e[158]!==qt||e[159]!==Xt?(Qt=o.jsxs(Ps,{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:[qt,Xt]}),e[158]=qt,e[159]=Xt,e[160]=Qt):Qt=e[160];let Ss;return e[161]!==Rs||e[162]!==Wt||e[163]!==Qt?(Ss=o.jsx(As,{open:Rs,onOpenChange:Wt,children:Qt}),e[161]=Rs,e[162]=Wt,e[163]=Qt,e[164]=Ss):Ss=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:[es,o.jsxs("div",{className:"flex items-center gap-2",children:[os,Je,o.jsx(As,{open:O,onOpenChange:B,children:o.jsxs(Ps,{className:"max-h-[85vh] sm:max-w-2xl",children:[xs,rs,o.jsx(Ws,{children:o.jsxs(De,{type:"button",disabled:!vs,onClick:Ft,children:[ks,js]})})]})})]})]}),L.length===0?o.jsx(gc,{className:"flex-1",icon:o.jsx(cn,{size:22}),title:p("sandbox.postBoard.emptyTitle"),description:p("sandbox.postBoard.emptyDescription"),buttonProps:{children:p("sandbox.postBoard.newPost"),onClick:He}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:Ip.map(H=>{const pe=p(hn[H]),Le=L.filter(ze=>ze.status===H);Fp(H)&&Le.sort(Kp);const ut=Y(H,Le.length===0);return o.jsxs(F.Fragment,{children:[o.jsx("div",{onDragOver:ze=>{ze.preventDefault(),b(H)},onDragLeave:()=>b(ze=>ze===H?null:ze),onDrop:ze=>{ze.preventDefault(),Ce(H,ze.dataTransfer.getData(Ii))},className:je("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",ut?"w-11":"w-72",C===H&&"border-primary bg-primary/5"),children:ut?o.jsxs("button",{type:"button",onClick:()=>A(H,!1),"aria-label":p("sandbox.postBoard.expandLane",{lane:pe}),"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(ln,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:Le.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:pe})]}):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:()=>A(H,!0),"aria-label":p("sandbox.postBoard.collapseLane",{lane:pe}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(Us,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:pe})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:Le.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:Le.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.postBoard.laneEmpty")}):Le.map(ze=>o.jsx(qp,{post:ze,payload:ne(ze.key),moving:g.isMoving(ze.key),onOpen:()=>d(ze.key),onArchive:ze.status==="archived"?void 0:()=>{ue(ze)}},ze.key))})]})}),H===Wn&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},H)})}):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(Ap,{value:D,onChange:Z}),Nt?o.jsx(Op,{count:ye.size,allSelected:qe.length>0&&qe.every(H=>ye.has(H.key)),onToggleSelectAll:it,onArchive:()=>{X()},onExit:()=>Se(new Set)}):o.jsx(_p,{categories:se,authors:he,statusCounts:_e,categoryFilter:te,authorFilter:oe,statusFilter:M,sort:me,onCategoryFilterChange:le,onAuthorFilterChange:be,onStatusFilterChange:re,onSortChange:J}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(Yp,{posts:qe,selectedKey:ie,selectionActive:Nt,selectedKeys:ye,onToggleSelect:st,onOpen:d,isMoving:g.isMoving,onArchive:H=>{ue(H)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:ie&&f?o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Mn,{size:20,className:"animate-spin text-muted-foreground"})}),children:f(ie)}):o.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:p("sandbox.postBoard.selectPrompt")})})]}),ws,Ss]})}function Mp(t){return t.slug}function Vp(t){return t.key}function Up(t){return t.authorEmails}function Gp(t){return t.categorySlugs}function Hp(t,e){return t[e.status]=(t[e.status]??0)+1,t}function sa(t){const e=ce.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 c;e[0]!==r?(c=je("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]=c):c=e[1];let l;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==c?(l=o.jsxs("button",{type:"button",onClick:n,className:c,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=c,e[6]=l):l=e[6],l}function Yp(t){const e=ce.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:c,isMoving:l,onArchive:d}=t,u=Ee();if(s.length===0){let f;e[0]!==u?(f=u("sandbox.postList.noMatches"),e[0]=u,e[1]=f):f=e[1];let p;return e[2]!==f?(p=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f}),e[2]=f,e[3]=p):p=e[3],p}let g;if(e[4]!==l||e[5]!==d||e[6]!==c||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let f;e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(f=p=>o.jsx(Wp,{post:p,selected:p.key===n,selectionActive:a,checked:i.has(p.key),onToggleSelect:()=>r(p.key),moving:l(p.key),onOpen:()=>c(p.key),onArchive:p.status==="archived"?void 0:()=>d(p)},p.key),e[13]=l,e[14]=d,e[15]=c,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=f):f=e[20],g=s.map(f),e[4]=l,e[5]=d,e[6]=c,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=g}else g=e[12];let m;return e[21]!==g?(m=o.jsx("ul",{className:"divide-y",children:g}),e[21]=g,e[22]=m):m=e[22],m}function Wp(t){const e=ce.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:c,onOpen:l,onArchive:d}=t,u=Ee(),g=s.status==="awaiting_review"&&s.missing.length>0,m=s.status==="scheduled"||s.status==="published",f=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let p;e[0]!==f?(p=je("absolute left-3 top-3 z-10 transition-opacity",f),e[0]=f,e[1]=p):p=e[1];let y;e[2]!==r?(y=()=>r(),e[2]=r,e[3]=y):y=e[3];let j;e[4]!==s.title||e[5]!==u?(j=s.title||u("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=u,e[6]=j):j=e[6];let E;e[7]!==i||e[8]!==y||e[9]!==j?(E=o.jsx(jn,{checked:i,onCheckedChange:y,"aria-label":j}),e[7]=i,e[8]=y,e[9]=j,e[10]=E):E=e[10];let x;e[11]!==p||e[12]!==E?(x=o.jsx("span",{className:p,children:E}),e[11]=p,e[12]=E,e[13]=x):x=e[13];let S;e[14]!==c||e[15]!==d||e[16]!==a?(S=d&&!a&&o.jsx(Ki,{onArchive:d,disabled:c,className:"top-2.5"}),e[14]=c,e[15]=d,e[16]=a,e[17]=S):S=e[17];let C;e[18]!==l||e[19]!==r||e[20]!==a?(C=()=>a?r():l(),e[18]=l,e[19]=r,e[20]=a,e[21]=C):C=e[21];const b=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let v;e[22]!==b?(v=je("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",b),e[22]=b,e[23]=v):v=e[23];let T;e[24]!==s.title||e[25]!==u?(T=s.title||u("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=u,e[26]=T):T=e[26];let w;e[27]!==T?(w=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:T}),e[27]=T,e[28]=w):w=e[28];const _=Lp[s.status],O=hn[s.status];let B;e[29]!==u||e[30]!==O?(B=u(O),e[29]=u,e[30]=O,e[31]=B):B=e[31];let K;e[32]!==_||e[33]!==B?(K=o.jsx(wn,{variant:_,className:"shrink-0",children:B}),e[32]=_,e[33]=B,e[34]=K):K=e[34];let k;e[35]!==g||e[36]!==s.missing?(k=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Vs,{size:12}),s.missing.length]}),e[35]=g,e[36]=s.missing,e[37]=k):k=e[37];let z;e[38]!==s.duplicateTitle||e[39]!==u?(z=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:u("sandbox.postBoard.duplicateTitle"),children:[o.jsx(so,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:u("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=u,e[40]=z):z=e[40];let P;e[41]!==m||e[42]!==s.date||e[43]!==s.scheduledDatetime?(P=m&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx(to,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=m,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=P):P=e[44];let I;e[45]!==K||e[46]!==k||e[47]!==z||e[48]!==P?(I=o.jsxs("div",{className:"flex items-center gap-2",children:[K,k,z,P]}),e[45]=K,e[46]=k,e[47]=z,e[48]=P,e[49]=I):I=e[49];let U;e[50]!==n||e[51]!==v||e[52]!==w||e[53]!==I||e[54]!==C?(U=o.jsxs("button",{type:"button",onClick:C,"aria-current":n,className:v,children:[w,I]}),e[50]=n,e[51]=v,e[52]=w,e[53]=I,e[54]=C,e[55]=U):U=e[55];let q;return e[56]!==U||e[57]!==x||e[58]!==S?(q=o.jsxs("li",{className:"group/row relative",children:[x,S,U]}),e[56]=U,e[57]=x,e[58]=S,e[59]=q):q=e[59],q}function qp(t){const e=ce.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,c=Ee(),l=s.status!=="generating"&&!a;let d;e[0]!==n?(d=nu(n),e[0]=n,e[1]=d):d=e[1];const u=d,g=!l&&"opacity-80";let m;e[2]!==g?(m=je("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",g),e[2]=g,e[3]=m):m=e[3];let f;e[4]!==a||e[5]!==r?(f=r&&o.jsx(Ki,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=f):f=e[6];let p;e[7]!==s.key?(p=B=>B.dataTransfer.setData(Ii,s.key),e[7]=s.key,e[8]=p):p=e[8];const y=l?"cursor-grab active:cursor-grabbing":"cursor-pointer";let j;e[9]!==y?(j=je("block w-full p-3 text-left",y),e[9]=y,e[10]=j):j=e[10];let E;e[11]!==s.title||e[12]!==c?(E=s.title||c("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=c,e[13]=E):E=e[13];let x;e[14]!==E?(x=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:E}),e[14]=E,e[15]=x):x=e[15];let S;e[16]!==u||e[17]!==s.status?(S=s.status==="draft"&&u.format?.name&&o.jsx(wn,{variant:"outline",className:"max-w-full truncate",children:u.format.name}),e[16]=u,e[17]=s.status,e[18]=S):S=e[18];let C;e[19]!==s.status||e[20]!==c?(C=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(Mn,{size:12,className:"animate-spin"}),c("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=c,e[21]=C):C=e[21];let b;e[22]!==s.missing||e[23]!==s.status||e[24]!==c?(b=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(Vs,{size:12}),c("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(mc,{size:12}),c("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=c,e[25]=b):b=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(to,{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 T;e[30]!==s.duplicateTitle||e[31]!==c?(T=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(so,{size:12,"aria-hidden":!0}),c("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=c,e[32]=T):T=e[32];let w;e[33]!==S||e[34]!==C||e[35]!==b||e[36]!==v||e[37]!==T?(w=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[S,C,b,v,T]}),e[33]=S,e[34]=C,e[35]=b,e[36]=v,e[37]=T,e[38]=w):w=e[38];let _;e[39]!==l||e[40]!==i||e[41]!==w||e[42]!==p||e[43]!==j||e[44]!==x?(_=o.jsxs("button",{type:"button",draggable:l,onDragStart:p,onClick:i,className:j,children:[x,w]}),e[39]=l,e[40]=i,e[41]=w,e[42]=p,e[43]=j,e[44]=x,e[45]=_):_=e[45];let O;return e[46]!==_||e[47]!==m||e[48]!==f?(O=o.jsxs("div",{className:m,children:[f,_]}),e[46]=_,e[47]=m,e[48]=f,e[49]=O):O=e[49],O}function Ki(t){const e=ce.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=Ee();let c;e[0]!==s||e[1]!==r?(c=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=c):c=e[2];const l=c;let d;e[3]!==n?(d=f=>{f.stopPropagation(),n()},e[3]=n,e[4]=d):d=e[4];let u;e[5]!==i?(u=je("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]=u):u=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(co,{className:"size-3.25"}),e[7]=g):g=e[7];let m;return e[8]!==a||e[9]!==d||e[10]!==u||e[11]!==l?(m=o.jsx(De,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":l,title:l,onClick:d,className:u,children:g}),e[8]=a,e[9]=d,e[10]=u,e[11]=l,e[12]=m):m=e[12],m}function jt(t){const e=ce.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:c,variantCount:l,trailing:d,selectable:u,selectionActive:g,selected:m,invalid:f,invalidReason:p,warning:y,warningReason:j,onToggleSelect:E,onClick:x,menu:S}=t,C=Ee(),b=c==="global";let v;e[0]!==s||e[1]!==r||e[2]!==b||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:je("flex size-8 shrink-0 items-center justify-center rounded-lg",b?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:je("shrink-0",!b&&(r?"text-accent-foreground":"text-muted-foreground")),style:b?{color:Jn}:void 0})}),e[0]=s,e[1]=r,e[2]=b,e[3]=n,e[4]=v):v=e[4];const T=v,w=r?b?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":b?"hover:bg-global-section/10":"hover:bg-accent";let _;e[5]!==w?(_=je("group relative flex min-w-0 items-center rounded-md transition-colors",w),e[5]=w,e[6]=_):_=e[6];let O;e[7]!==E||e[8]!==u||e[9]!==m||e[10]!==g||e[11]!==C||e[12]!==a?(O=u&&o.jsx("span",{className:je("flex shrink-0 items-center pl-2.5 transition-opacity",m||g?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:Xp,children:o.jsx(jn,{checked:m,onCheckedChange:()=>E?.(),"aria-label":C("sandbox.itemRow.selectItem",{title:a})})}),e[7]=E,e[8]=u,e[9]=m,e[10]=g,e[11]=C,e[12]=a,e[13]=O):O=e[13];const B=f&&!r&&"text-destructive";let K;e[14]!==B?(K=je("block truncate text-sm font-medium",B),e[14]=B,e[15]=K):K=e[15];let k;e[16]!==K||e[17]!==a?(k=o.jsx("span",{className:K,children:a}),e[16]=K,e[17]=a,e[18]=k):k=e[18];const z=r?"text-accent-foreground/70":"text-muted-foreground";let P;e[19]!==z?(P=je("block truncate text-xs",z),e[19]=z,e[20]=P):P=e[20];let I;e[21]!==i||e[22]!==P?(I=o.jsx("span",{className:P,children:i}),e[21]=i,e[22]=P,e[23]=I):I=e[23];let U;e[24]!==I||e[25]!==k?(U=o.jsxs("span",{className:"min-w-0 flex-1",children:[k,I]}),e[24]=I,e[25]=k,e[26]=U):U=e[26];let q;e[27]!==r||e[28]!==C||e[29]!==l?(q=l!==void 0&&l>1&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsxs("span",{className:je("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Ta,{size:14}),l]})}),o.jsx(St,{side:"bottom",children:C("sandbox.itemRow.variantCount",{count:l})})]}),e[27]=r,e[28]=C,e[29]=l,e[30]=q):q=e[30];let Y;e[31]!==y||e[32]!==j?(Y=y&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(Vs,{size:14})})}),j&&o.jsx(St,{side:"bottom",children:j})]}),e[31]=y,e[32]=j,e[33]=Y):Y=e[33];let Q;e[34]!==r||e[35]!==f||e[36]!==p?(Q=f&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:je("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(Vs,{size:14})})}),p&&o.jsx(St,{side:"bottom",children:p})]}),e[34]=r,e[35]=f,e[36]=p,e[37]=Q):Q=e[37];let A;e[38]!==x||e[39]!==T||e[40]!==U||e[41]!==q||e[42]!==Y||e[43]!==Q||e[44]!==d?(A=o.jsxs("button",{type:"button",onClick:x,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[T,U,q,Y,Q,d]}),e[38]=x,e[39]=T,e[40]=U,e[41]=q,e[42]=Y,e[43]=Q,e[44]=d,e[45]=A):A=e[45];let G;e[46]!==r||e[47]!==S?(G=S&&o.jsx("div",{className:je("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:S}),e[46]=r,e[47]=S,e[48]=G):G=e[48];let $;return e[49]!==A||e[50]!==G||e[51]!==_||e[52]!==O?($=o.jsxs("div",{className:_,children:[O,A,G]}),e[49]=A,e[50]=G,e[51]=_,e[52]=O,e[53]=$):$=e[53],$}function Xp(t){return t.stopPropagation()}const Qp={loaders:Na,actions:Va},Jp={analytics:Zl,blog:Ma,commerce:Jl,site:Ql,website:rn};function Zp(t,e){return e===0?Jp[t.toLowerCase()]??So:So}function Ks(t,e){return e===0?Pl(t):t}function ef(t){const e=ce.c(120),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,kind:l,initialSavedKey:d,onBack:u}=t,g=Ee();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[f,p]=F.useState(m);let y;e[1]!==d?(y=()=>d?{mode:"saved",key:d}:null,e[1]=d,e[2]=y):y=e[2];const[j,E]=F.useState(y),[x,S]=F.useState(""),[C,b]=F.useState(cf),[v,T]=F.useState(l);v!==l&&(T(l),p([]),E(null),S(""),b(new Set));let w;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=ue=>{b(te=>{const le=new Set(te);return le.has(ue)?le.delete(ue):le.add(ue),le})},e[3]=w):w=e[3];const _=w;let O;e[4]!==a||e[5]!==s||e[6]!==n?(O={orgSlug:s,virtualMcpId:n,branch:a},e[4]=a,e[5]=s,e[6]=n,e[7]=O):O=e[7];const B=vn(O);let K;e[8]!==B?(K=ya((ue,te)=>B.mutate({blockKey:ue,data:te})),e[8]=B,e[9]=K):K=e[9];const k=K;let z;e[10]!==l?(z=Al(l),e[10]=l,e[11]=z):z=e[11];const P=z,I=Qp[l],U=l==="loaders"?"sandbox.collectionsSidebar.loaders":"sandbox.collectionsSidebar.actions";let q;e[12]!==g||e[13]!==U?(q=g(U),e[12]=g,e[13]=U,e[14]=q):q=e[14];const Y=q;let Q,A,G,$,N,L,de;if(e[15]!==I||e[16]!==a||e[17]!==Y||e[18]!==c||e[19]!==l||e[20]!==r||e[21]!==u||e[22]!==C||e[23]!==s||e[24]!==f||e[25]!==i||e[26]!==B||e[27]!==k||e[28]!==x||e[29]!==j||e[30]!==P||e[31]!==g||e[32]!==n){L=Symbol.for("react.early_return_sentinel");e:{const ue=[...Cl(r,c,l).map(rf),...Nl(r,l).map(lf)],te=x.trim().toLowerCase(),le=te.length>0,oe=le?ue.filter(X=>X.title.toLowerCase().includes(te)||X.resolveType.toLowerCase().includes(te)):[],be=new Map,M=[],re=new Map;if(!le){for(const X of ue){const Ne=X.folderPath;if(!(Ne.length<f.length)&&f.every((Ce,Oe)=>Ne[Oe]===Ce))if(Ne.length===f.length)if(X.savedKey!==void 0){const Ce=re.get(X.resolveType);Ce?Ce.push(X):re.set(X.resolveType,[X])}else M.push(X);else{const Ce=Ne[f.length],Oe=be.get(Ce)??{count:0,savedCount:0};X.savedKey!==void 0?Oe.savedCount=Oe.savedCount+1:Oe.count=Oe.count+1,be.set(Ce,Oe)}}M.sort(af);for(const X of re.values())X.sort(of)}const me=[...re.entries()].filter(X=>{const[Ne]=X;return!M.some(Ce=>Ce.resolveType===Ne)}).flatMap(nf).sort(sf);let J;e[40]!==f.length?(J=(X,Ne)=>Ks(X.name,f.length).localeCompare(Ks(Ne.name,f.length)),e[40]=f.length,e[41]=J):J=e[41];const D=[...be.entries()].map(tf).sort(J);let Z;e[42]===Symbol.for("react.memo_cache_sentinel")?(Z=X=>{E(X.savedKey!==void 0?{mode:"saved",key:X.savedKey}:{mode:"available",resolveType:X.resolveType,title:X.title})},e[42]=Z):Z=e[42];const ae=Z;let ye;e[43]!==B||e[44]!==P||e[45]!==g?(ye=async(X,Ne)=>{const Ce=await B.mutateAsync({blockKey:X,data:Ne,create:!0});et(Ce)||ke.success(g("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:P,blockId:X})),E({mode:"saved",key:X})},e[43]=B,e[44]=P,e[45]=g,e[46]=ye):ye=e[46];const Se=ye;let _e;e[47]!==c||e[48]!==j?(_e=df(j,c),e[47]=c,e[48]=j,e[49]=_e):_e=e[49];const we=_e,Be=f[f.length-1];let W;e[50]!==Y||e[51]!==Be||e[52]!==f.length||e[53]!==le?(W=!le&&Be!==void 0?Ks(Be,f.length-1):Y,e[50]=Y,e[51]=Be,e[52]=f.length,e[53]=le,e[54]=W):W=e[54];const se=W;if(we){const X=`${we.mode}:${we.mode==="saved"?we.blockKey:we.resolveType}`,Ne=we.mode==="saved"&&we.blockKey||"";let Ce;e[55]!==u?(Ce=u??(()=>E(null)),e[55]=u,e[56]=Ce):Ce=e[56];const Oe=u?void 0:se;let He;e[57]!==a||e[58]!==c||e[59]!==X||e[60]!==Se||e[61]!==l||e[62]!==r||e[63]!==s||e[64]!==i||e[65]!==B.isPending||e[66]!==k||e[67]!==Ce||e[68]!==Oe||e[69]!==we.editorTarget||e[70]!==we.initialValue||e[71]!==n?(He=o.jsx(Tl,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,kind:l,target:we.editorTarget,initialValue:we.initialValue,isCreating:B.isPending,onCreate:Se,onSaveReferencedBlock:k,onBack:Ce,backLabel:Oe},X),e[57]=a,e[58]=c,e[59]=X,e[60]=Se,e[61]=l,e[62]=r,e[63]=s,e[64]=i,e[65]=B.isPending,e[66]=k,e[67]=Ce,e[68]=Oe,e[69]=we.editorTarget,e[70]=we.initialValue,e[71]=n,e[72]=He):He=e[72];let Ft;e[73]!==a||e[74]!==X||e[75]!==s||e[76]!==Ne||e[77]!==He||e[78]!==n?(Ft=o.jsx(va,{orgSlug:s,virtualMcpId:n,branch:a,blockKey:Ne,present:void 0,children:He},X),e[73]=a,e[74]=X,e[75]=s,e[76]=Ne,e[77]=He,e[78]=n,e[79]=Ft):Ft=e[79],L=Ft;break e}$="flex h-full w-full min-w-0 flex-col";let he;e[80]!==g?(he=g("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[80]=g,e[81]=he):he=e[81];let xe;e[82]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>p([]),e[82]=xe):xe=e[82];const Re=f.length===0?"font-medium text-foreground":"text-muted-foreground";let Ke;e[83]!==Re?(Ke=je("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",Re),e[83]=Re,e[84]=Ke):Ke=e[84];let Ge;e[85]!==Y||e[86]!==Ke?(Ge=o.jsx("button",{type:"button",onClick:xe,className:Ke,children:Y}),e[85]=Y,e[86]=Ke,e[87]=Ge):Ge=e[87];let $e;e[88]!==f?($e=f.map((X,Ne)=>{const Ce=Ne===f.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(ln,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>p(f.slice(0,Ne+1)),className:je("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",Ce?"font-medium text-foreground":"text-muted-foreground"),children:Ks(X,Ne)})]},`${X}-${Ne}`)}),e[88]=f,e[89]=$e):$e=e[89];let qe;e[90]!==he||e[91]!==Ge||e[92]!==$e?(qe=o.jsxs("nav",{"aria-label":he,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[Ge,$e]}),e[90]=he,e[91]=Ge,e[92]=$e,e[93]=qe):qe=e[93];let Nt;e[94]===Symbol.for("react.memo_cache_sentinel")?(Nt=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[94]=Nt):Nt=e[94];let Pe;e[95]===Symbol.for("react.memo_cache_sentinel")?(Pe=X=>S(X.target.value),e[95]=Pe):Pe=e[95];let st;e[96]!==l||e[97]!==g?(st=g("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:l}),e[96]=l,e[97]=g,e[98]=st):st=e[98];let it;e[99]!==l||e[100]!==g?(it=g("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:l}),e[99]=l,e[100]=g,e[101]=it):it=e[101];let Ie;e[102]!==x||e[103]!==st||e[104]!==it?(Ie=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Nt,o.jsx("input",{type:"text",value:x,onChange:Pe,placeholder:st,"aria-label":it,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[102]=x,e[103]=st,e[104]=it,e[105]=Ie):Ie=e[105],e[106]!==qe||e[107]!==Ie?(N=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[qe,Ie]}),e[106]=qe,e[107]=Ie,e[108]=N):N=e[108],Q=qs,G="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",de="mx-auto w-full max-w-4xl px-6 py-5",A=le?oe.length===0?o.jsx(ft,{title:g("sandbox.runnableBlocksBrowser.noSearchResults",{kind:l,query:x.trim()}),description:g("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:oe.map(X=>o.jsx(jt,{icon:I,accent:X.savedKey!==void 0?"global":void 0,title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)},X.savedKey??X.resolveType))}):D.length===0&&M.length===0&&me.length===0?o.jsx(ft,{title:g("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:l}),description:f.length===0?g("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):g("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[D.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:D.map(X=>{const Ne=Zp(X.name,f.length);return o.jsxs("button",{type:"button",onClick:()=>p([...f,X.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(Ne,{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:Ks(X.name,f.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[X.count," ",X.count===1?P:l,X.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",g("sandbox.runnableBlocksBrowser.savedCountLabel",{count:X.savedCount})]})]})]})]},X.name)})}),(M.length>0||me.length>0)&&o.jsxs("div",{className:je("flex flex-col gap-1",D.length>0&&"mt-4"),children:[M.map(X=>{const Ne=re.get(X.resolveType)??[],Ce=C.has(X.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(jt,{icon:I,title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)}),Ne.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>_(X.resolveType),"aria-expanded":Ce,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:Jn},children:[Ce?o.jsx(Us,{size:12,className:"shrink-0"}):o.jsx(ln,{size:12,className:"shrink-0"}),g(Ce?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",Ne.length,")"]}),Ce&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:Ne.map(Oe=>o.jsx(jt,{icon:I,accent:"global",title:Oe.title,subtitle:Oe.resolveType,active:!1,onClick:()=>ae(Oe)},Oe.savedKey))})]})]},X.resolveType)}),me.map(X=>o.jsx(jt,{icon:I,accent:"global",title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)},X.savedKey))]})]})}e[15]=I,e[16]=a,e[17]=Y,e[18]=c,e[19]=l,e[20]=r,e[21]=u,e[22]=C,e[23]=s,e[24]=f,e[25]=i,e[26]=B,e[27]=k,e[28]=x,e[29]=j,e[30]=P,e[31]=g,e[32]=n,e[33]=Q,e[34]=A,e[35]=G,e[36]=$,e[37]=N,e[38]=L,e[39]=de}else Q=e[33],A=e[34],G=e[35],$=e[36],N=e[37],L=e[38],de=e[39];if(L!==Symbol.for("react.early_return_sentinel"))return L;let ne;e[109]!==A||e[110]!==de?(ne=o.jsx("div",{className:de,children:A}),e[109]=A,e[110]=de,e[111]=ne):ne=e[111];let ie;e[112]!==Q||e[113]!==G||e[114]!==ne?(ie=o.jsx(Q,{className:G,children:ne}),e[112]=Q,e[113]=G,e[114]=ne,e[115]=ie):ie=e[115];let fe;return e[116]!==$||e[117]!==N||e[118]!==ie?(fe=o.jsxs("div",{className:$,children:[N,ie]}),e[116]=$,e[117]=N,e[118]=ie,e[119]=fe):fe=e[119],fe}function tf(t){const[e,s]=t;return{name:e,...s}}function sf(t,e){return t.title.localeCompare(e.title)}function nf(t){const[,e]=t;return e}function of(t,e){return t.title.localeCompare(e.title)}function af(t,e){return t.title.localeCompare(e.title)}function lf(t){return{resolveType:t.resolveType,title:t.title,folderPath:ba(t.resolveType)}}function rf(t){return{resolveType:t.resolveType,title:t.title,folderPath:ba(t.resolveType),savedKey:t.key}}function cf(){return new Set}function df(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}=El(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function uf(t){const e=ce.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,resolveType:l,title:d,defaultBlockId:u,isCreating:g,onCreate:m,onSaveReferencedBlock:f}=t,p=Ee(),y=yn(),j=y?.virtualMcpId,x=za(j===n?n:null)?.metadata?.siteSlug??null;let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={},e[0]=S):S=e[0];const[C,b]=F.useState(S);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[1]=v):v=e[1];const[T,w]=F.useState(v),[_,O]=F.useState(0),[B,K]=F.useState(!1);let k;e[2]!==r||e[3]!==l?(k=$a(l,r),e[2]=r,e[3]=l,e[4]=k):k=e[4];const z=k;let P,I,U,q,Y,Q,A,G;if(e[5]!==x||e[6]!==a||e[7]!==c||e[8]!==T||e[9]!==C||e[10]!==g||e[11]!==m||e[12]!==s||e[13]!==i||e[14]!==l||e[15]!==p||e[16]!==y?.taskId||e[17]!==d||e[18]!==n){const fe=l.split("/").pop()?.replace(/\.tsx?$/,"")??l,ue=y?.taskId??null,te=i??void 0;let le;e[27]!==x||e[28]!==a||e[29]!==s||e[30]!==te||e[31]!==ue||e[32]!==n?(le={orgSlug:s,virtualMcpId:n,branch:a,threadId:ue,previewUrl:te,siteSlug:x},e[27]=x,e[28]=a,e[29]=s,e[30]=te,e[31]=ue,e[32]=n,e[33]=le):le=e[33],I=le;let oe,be,M,re;if(e[34]!==c||e[35]!==T||e[36]!==C||e[37]!==m||e[38]!==p||e[39]!==d){const we=[d,...T],Be=se=>{w(T.slice(0,se)),O(pf)};let W;e[48]!==c||e[49]!==C||e[50]!==m?(W=async se=>{const he=Dl(se,c);if(he){ke.error(he);return}await m(se,C),K(!1)},e[48]=c,e[49]=C,e[50]=m,e[51]=W):W=e[51],P=W,G="flex h-full w-full min-w-0",A="flex min-w-0 flex-1 flex-col",Y="shrink-0 border-b px-3 py-2.5",re="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==p?(oe=p("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=p,e[53]=oe):oe=e[53],be="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",M=we.map((se,he)=>{const xe=he===we.length-1,Re=_l(se);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[he>0&&o.jsx(ln,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>Be(he),title:Re,className:je("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",xe?"font-medium text-foreground":"text-muted-foreground"),children:Re})]},`${Re}-${he}`)}),e[34]=c,e[35]=T,e[36]=C,e[37]=m,e[38]=p,e[39]=d,e[40]=P,e[41]=oe,e[42]=be,e[43]=M,e[44]=re,e[45]=Y,e[46]=A,e[47]=G}else P=e[40],oe=e[41],be=e[42],M=e[43],re=e[44],Y=e[45],A=e[46],G=e[47];let me;e[54]!==oe||e[55]!==be||e[56]!==M?(me=o.jsx("nav",{"aria-label":oe,className:be,children:M}),e[54]=oe,e[55]=be,e[56]=M,e[57]=me):me=e[57];let J;e[58]===Symbol.for("react.memo_cache_sentinel")?(J=()=>K(!0),e[58]=J):J=e[58];let D;e[59]!==p?(D=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=p,e[60]=D):D=e[60];let Z;e[61]===Symbol.for("react.memo_cache_sentinel")?(Z=o.jsx(er,{size:14}),e[61]=Z):Z=e[61];let ae;e[62]!==g||e[63]!==D?(ae=o.jsx(wt,{asChild:!0,children:o.jsx(De,{size:"icon",className:"shrink-0",disabled:g,onClick:J,"aria-label":D,children:Z})}),e[62]=g,e[63]=D,e[64]=ae):ae=e[64];let ye;e[65]!==p?(ye=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=p,e[66]=ye):ye=e[66];let Se;e[67]!==ye?(Se=o.jsx(St,{side:"bottom",children:ye}),e[67]=ye,e[68]=Se):Se=e[68];let _e;e[69]!==ae||e[70]!==Se?(_e=o.jsxs(Ct,{children:[ae,Se]}),e[69]=ae,e[70]=Se,e[71]=_e):_e=e[71],e[72]!==re||e[73]!==me||e[74]!==_e?(Q=o.jsxs("div",{className:re,children:[me,_e]}),e[72]=re,e[73]=me,e[74]=_e,e[75]=Q):Q=e[75],U="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",q=p("sandbox.availableSectionEditor.localEditsHint",{typeLabel:fe}),e[5]=x,e[6]=a,e[7]=c,e[8]=T,e[9]=C,e[10]=g,e[11]=m,e[12]=s,e[13]=i,e[14]=l,e[15]=p,e[16]=y?.taskId,e[17]=d,e[18]=n,e[19]=P,e[20]=I,e[21]=U,e[22]=q,e[23]=Y,e[24]=Q,e[25]=A,e[26]=G}else P=e[19],I=e[20],U=e[21],q=e[22],Y=e[23],Q=e[24],A=e[25],G=e[26];let $;e[76]!==U||e[77]!==q?($=o.jsx("p",{className:U,children:q}),e[76]=U,e[77]=q,e[78]=$):$=e[78];let N;e[79]!==$||e[80]!==Y||e[81]!==Q?(N=o.jsxs("div",{className:Y,children:[Q,$]}),e[79]=$,e[80]=Y,e[81]=Q,e[82]=N):N=e[82];let L;e[83]!==c||e[84]!==T||e[85]!==_||e[86]!==C||e[87]!==r||e[88]!==f||e[89]!==I||e[90]!==z||e[91]!==p?(L=o.jsx(qs,{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(ka,{schema:z,value:C,onChange:fe=>b(fe),basePath:"",breadcrumbPath:T,onBreadcrumbChange:w,meta:r,decofile:c,onSaveReferencedBlock:f,sandbox:I},_):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=c,e[84]=T,e[85]=_,e[86]=C,e[87]=r,e[88]=f,e[89]=I,e[90]=z,e[91]=p,e[92]=L):L=e[92];let de;e[93]!==N||e[94]!==L||e[95]!==A?(de=o.jsxs("div",{className:A,children:[N,L]}),e[93]=N,e[94]=L,e[95]=A,e[96]=de):de=e[96];let ne;e[97]!==u||e[98]!==P||e[99]!==g||e[100]!==B?(ne=o.jsx(Bl,{open:B,onOpenChange:K,defaultBlockId:u,isPending:g,onSubmit:P}),e[97]=u,e[98]=P,e[99]=g,e[100]=B,e[101]=ne):ne=e[101];let ie;return e[102]!==de||e[103]!==ne||e[104]!==G?(ie=o.jsxs("div",{className:G,children:[de,ne]}),e[102]=de,e[103]=ne,e[104]=G,e[105]=ie):ie=e[105],ie}function pf(t){return t+1}function ff(t,e,s){const n={__resolveType:t},a=Ol([n],e)[0];return a?sl(n,a,e,s):null}function mf({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:c}){const l=Ee(),d=yn(),u=d?.virtualMcpId,m=za(u===e?e:null)?.metadata?.siteSlug??null,[f]=F.useState(()=>ff(r,i,tl(a))),[p,y]=F.useState(f?.data??{}),[j,E]=F.useState([]),[x,S]=F.useState(0),[C,b]=F.useState(!1),[v,T]=F.useState(null),w=v!==null,{save:_,flush:O}=Rl({orgSlug:t,virtualMcpId:e,branch:s},{holdsCopy:!0}),B=f?.resolveType?$a(f.resolveType,a):null,K=io(e,s),k=K.kind==="protocol"&&K.source==="github",z=i[r],P=z?Nr(r,z):r,I=d?.taskId??null,U={orgSlug:t,virtualMcpId:e,branch:s,threadId:I,previewUrl:n??void 0,siteSlug:m},q=$=>{y($),_(r,$)},Y=()=>{w?(T(null),b(!1),S($=>$+1)):T(JSON.stringify(p,null,2))},Q=$=>{const N=$??"";try{const L=JSON.parse(N);if(L&&typeof L=="object"&&!Array.isArray(L)){b(!1),q(L);return}b(!0)}catch{b(!0)}},A=[P,...j],G=$=>{E(j.slice(0,$)),S(N=>N+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($l,{crumbs:A,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:Jn},"aria-hidden":!0}),k?o.jsx("span",{className:"min-w-0 truncate text-sm font-medium","data-testid":"saved-section-title",children:P}):null,o.jsx("div",{className:"flex-1"}),o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx(De,{variant:w?"default":"ghost",size:"icon",className:"shrink-0",onClick:Y,"aria-label":l(w?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":w,children:w?o.jsx(Qn,{size:14}):o.jsx(Ea,{size:14})})}),o.jsx(St,{side:"bottom",children:l(w?"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:l("sandbox.savedSectionEditor.globalSectionDescription")})]}),o.jsxs("div",{className:"relative min-h-0 flex-1",children:[o.jsx(qs,{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(ka,{schema:B,value:p,onChange:$=>q($),basePath:"",breadcrumbPath:j,onBreadcrumbChange:E,meta:a,decofile:i,onSaveReferencedBlock:c,sandbox:U},x):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:l("sandbox.savedSectionEditor.noEditableFields")})})})}),v!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[C&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:l("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(Ua,{language:"json",height:"100%",code:v,onChange:Q,onSave:$=>{Q($),O()}})})]})]})]})})}function gf(t){const e=ce.c(46),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,isCreating:d,onCreateAvailable:u,onSaveReferencedBlock:g}=t,m=Ee();if(!s){let x;e[0]!==m?(x=m("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=m,e[1]=x):x=e[1];let S;e[2]!==m?(S=m("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=m,e[3]=S):S=e[3];let C;return e[4]!==x||e[5]!==S?(C=o.jsx(ft,{title:x,description:S}),e[4]=x,e[5]=S,e[6]=C):C=e[6],C}if(s.collection==="available-section"){const x=`available:${s.resolveType}`,S=s.resolveType,C=s.title;let b;e[7]!==s.title?(b=Ll(s.title),e[7]=s.title,e[8]=b):b=e[8];let v;e[9]!==u||e[10]!==s.resolveType?(v=(w,_)=>u(s.resolveType,w,_),e[9]=u,e[10]=s.resolveType,e[11]=v):v=e[11];let T;return e[12]!==i||e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==g||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==x||e[22]!==b||e[23]!==v||e[24]!==a?(T=o.jsx(uf,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,resolveType:S,title:C,defaultBlockId:b,isCreating:d,onCreate:v,onSaveReferencedBlock:g},x),e[12]=i,e[13]=l,e[14]=d,e[15]=c,e[16]=g,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=x,e[22]=b,e[23]=v,e[24]=a,e[25]=T):T=e[25],T}const f=`saved:${s.key}`,p=s.key;let y;e[26]!==l||e[27]!==s.key?(y=Object.hasOwn(l,s.key),e[26]=l,e[27]=s.key,e[28]=y):y=e[28];let j;e[29]!==i||e[30]!==l||e[31]!==c||e[32]!==g||e[33]!==n||e[34]!==r||e[35]!==s.key||e[36]!==a?(j=o.jsx(mf,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,blockKey:s.key,onSaveReferencedBlock:g}),e[29]=i,e[30]=l,e[31]=c,e[32]=g,e[33]=n,e[34]=r,e[35]=s.key,e[36]=a,e[37]=j):j=e[37];let E;return e[38]!==i||e[39]!==n||e[40]!==s.key||e[41]!==f||e[42]!==y||e[43]!==j||e[44]!==a?(E=o.jsx(va,{orgSlug:n,virtualMcpId:a,branch:i,blockKey:p,present:y,children:j},f),e[38]=i,e[39]=n,e[40]=s.key,e[41]=f,e[42]=y,e[43]=j,e[44]=a,e[45]=E):E=e[45],E}function us(t){const e=ce.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:c}=t,l=Ee();let d;e[0]!==l?(d=l("sandbox.itemActions.moreActions"),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(nl,{size:14}),e[2]=u):u=e[2];let g;e[3]!==d?(g=o.jsx(nn,{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:hf,children:u})}),e[3]=d,e[4]=g):g=e[4];let m;e[5]!==n||e[6]!==l?(m=n&&o.jsxs(Ot,{onClick:n,children:[o.jsx(bc,{size:14}),l("sandbox.itemActions.rename")]}),e[5]=n,e[6]=l,e[7]=m):m=e[7];let f;e[8]!==s||e[9]!==l?(f=s&&o.jsxs(Ot,{onClick:s,children:[o.jsx(so,{size:14}),l("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=l,e[10]=f):f=e[10];let p;e[11]!==a||e[12]!==l?(p=a&&o.jsxs(o.Fragment,{children:[o.jsx(_n,{}),o.jsxs(Ot,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Ta,{size:14}),l("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=l,e[13]=p):p=e[13];let y;e[14]!==i||e[15]!==r||e[16]!==l?(y=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(_n,{}),i&&o.jsxs(Ot,{onClick:i,children:[o.jsx(Ca,{size:14}),l("sandbox.itemActions.editSeo")]}),r&&o.jsxs(Ot,{onClick:r,children:[o.jsx(Ea,{size:14}),l("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=l,e[17]=y):y=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(_n,{}),e[18]=j):j=e[18];let E;e[19]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(co,{size:14}),e[19]=E):E=e[19];let x;e[20]!==l?(x=l("sandbox.itemActions.delete"),e[20]=l,e[21]=x):x=e[21];let S;e[22]!==c||e[23]!==x?(S=o.jsxs(Ot,{onClick:c,className:"text-destructive focus:text-destructive",children:[E,x]}),e[22]=c,e[23]=x,e[24]=S):S=e[24];let C;e[25]!==S||e[26]!==m||e[27]!==f||e[28]!==p||e[29]!==y?(C=o.jsxs(on,{align:"end",className:"w-44",children:[m,f,p,y,j,S]}),e[25]=S,e[26]=m,e[27]=f,e[28]=p,e[29]=y,e[30]=C):C=e[30];let b;return e[31]!==C||e[32]!==g?(b=o.jsxs(an,{children:[g,C]}),e[31]=C,e[32]=g,e[33]=b):b=e[33],b}function hf(t){return t.stopPropagation()}function na(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 Fi=4;function Pn(t){const e=new Map;for(const s of t)s.slug&&!e.has(s.slug)&&e.set(s.slug,s);return e}function An(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 zi(t,e){const s=Pn(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>=Fi));)i=An(i,s);return n.reverse()}function Mi(t,e){const s=new Map;for(const n of t){const a=An(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 Xg(t,e){const s=Pn(e),n=Mi(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const c=[];for(const l of r)for(const d of n.get(l)??[])d.slug&&!a.has(d.slug)&&(a.add(d.slug),c.push(d));r=c}return a.delete(t),a}function Qg(t,e){if(!t)return[];const s=Pn(e),n=zi(t,e),a=n[0];return!a||An(a,s)?[t]:n.map(i=>i.slug??"")}function xf(t){const e=Pn(t),s=Mi(t,e),n=new Set,a=[],i=(c,l)=>{if(!n.has(c)&&(n.add(c),a.push({entry:c,depth:l}),!(l+1>=Fi)))for(const d of s.get(c)??[])i(d,l+1)},r=t.filter(c=>!An(c,e)).sort((c,l)=>c.label.localeCompare(l.label));for(const c of r)i(c,0);for(const c of t)i(c,0);return a}function bf(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function yf(t){const e=new Map;for(const s of t){const n=bf(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 oa(t){const e=ce.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=je("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 c;return e[4]!==n||e[5]!==i||e[6]!==r?(c=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=c):c=e[7],c}const Fn=8,vf={page:"Pages",redirect:"Redirects","cms-settings":"Settings"},kf=new Set(["pages","redirects","sections","loaders","matchers","content"]),Vi=new Set(["lazy","multivariate","website/flags/multivariate.ts","website/flags/multivariate/section.ts"]),jf=8;function wf(t){return t?.manifest?.blocks??{}}function Sf(t){const e=t?.aliases;return e&&typeof e=="object"?e:{}}function bn(t,e){const s=Sf(t)[e];return typeof s=="string"&&s?s:e}function xo(t,e){for(const[s,n]of Object.entries(wf(t)))if(n&&Object.hasOwn(n,e))return{group:s,entry:n[e]??{}};return null}function aa(t,e){const s=xo(t,bn(t,e));return s?kf.has(s.group)?s.group:"other":null}function ia(t,e,s){let n=s;for(let a=0;a<jf;a++){const i=n.__resolveType;if(typeof i!="string"||!i)return null;const r=bn(t,i);if(xo(t,r)){if(!Vi.has(r)||!t)return r;const l=Pr(t,n);return l&&l!==i?bn(t,l):r}const c=e[i];if(!c||typeof c!="object"||Array.isArray(c))return r;n=c}return null}function qn(t){const s=(t.split("/").filter(Boolean).pop()??t).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_\s]+/g," ").trim();return s?s.replace(/\b\w/g,n=>n.toUpperCase()):t}function Cf(t,e){const s=xo(t,e)?.entry.$ref;if(typeof s!="string")return null;const n=s.split("/").pop()??"",i=t?.schema?.definitions?.[n]?.title;return typeof i=="string"&&i.trim()?i.trim():null}function la(t,e){const s=bn(t,e),n=vf[s];if(n)return n;const a=Cf(t,s);return a&&a!==s&&!a.includes("/")?a:qn(s)}function ra(t){return t?t.kind==="delete"?"deleted":t.baseVersion===null?"new":"changed":"published"}function Nf(t){const e=new Map;for(const[s,n]of Object.entries(t??{}))e.set(ma(s),{name:s,change:n});return e}function Ns(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Tf(t){const{blocks:e,meta:s}=t,n=Nf(t.changes),a=new Map,i=(b,v)=>{const T=a.get(b);T?T.push(v):a.set(b,[v])},r=new Set,c=new Map;for(const[b,v]of Object.entries(e)){if(!Ns(v))continue;const T=ia(s,e,v);if(!T)continue;const w=ma(b);r.add(w);const _=ra(n.get(w)?.change);if(v.__resolveType===Oa){for(const[B,K]of Tr(b,v))i(T,{key:B,block:K,status:_});continue}const O={key:b,block:v,status:_};c.set(w,{type:T,entry:O}),i(T,O)}for(const[b,{name:v,change:T}]of n){if(T.kind!=="delete"||r.has(b))continue;const w=t.deleted?.[v];if(!Ns(w))continue;const _=ia(s,e,w);if(!_)continue;const O={key:v,block:w,status:"deleted"};c.set(b,{type:_,entry:O}),i(_,O)}const l=[];for(const[b,v]of a){if(Er(b)||Vi.has(b))continue;const T=aa(s,b)??"other";v.sort(Ef(T)),l.push({id:b,group:T,title:la(s,b),entries:v,changed:v.filter(w=>w.status!=="published").length})}l.sort((b,v)=>b.title.localeCompare(v.title));const d=l.find(b=>b.id===Ka)??null,u=d?l.filter(b=>b!==d):l,g=b=>u.filter(v=>v.group===b),m=g("pages")[0]??null,f=g("redirects")[0]??null,p=[m,f].filter(b=>!!b),y=u.filter(b=>!p.includes(b)&&b.entries.length===1),j=[...p,...u.filter(b=>!p.includes(b)&&b.entries.length>1).sort((b,v)=>v.entries.length-b.entries.length||b.title.localeCompare(v.title))],E=new Map(l.map(b=>[b.id,b])),x=new Map,S=b=>{const v=E.get(b)??x.get(b);if(v)return v;const T={id:b,group:b?aa(s,b)??"other":"other",title:b?la(s,b):"",entries:[],changed:0};return x.set(b,T),T},C=[];for(const[b,{name:v,change:T}]of n){const w=c.get(b);if(w){C.push({type:S(w.type),entry:w.entry});continue}const _=e[v];C.push({type:S(""),entry:{key:v,block:Ns(_)?_:{},status:ra(T),...Ns(_)?{}:{orphan:!0}}})}return C.sort((b,v)=>+!b.type.title-+!v.type.title||b.type.title.localeCompare(v.type.title)||gt(b.entry).localeCompare(gt(v.entry))),{pages:m,redirects:f,collections:j,singletons:y,all:u,settings:d,changed:C,statusKnown:!!t.changes}}function Ef(t){const e=s=>s.status==="new"?0:s.status==="deleted"?3:t==="pages"&&Kt(Ts(s))==="/"?1:2;return(s,n)=>e(s)-e(n)||gt(s).localeCompare(gt(n))}function Pf(t,e,s){if(e||t.length<=Fn)return{shown:t,hidden:0};const n=t.slice(0,Fn),a=s?t.slice(Fn).find(i=>i.id===s):void 0;return a&&n.push(a),{shown:n,hidden:t.length-n.length}}function Af(t){try{return decodeURIComponent(t)}catch{return t}}function gt(t){const e=t.block.redirect,s=[t.block.name,t.block.from,Ns(e)?e.from:void 0];for(const n of s)if(typeof n=="string"&&n.trim())return n.trim();return Af(t.key)}function Ts(t){return typeof t.block.path=="string"?t.block.path:""}function _f(t){return La({[t.key]:t.block},t.key,0).length}function Df(t,e){const s=Kt(t).split("/").filter(Boolean),n=Kt(e.split(/[?#]/)[0]??"").split("/").filter(Boolean);for(let a=0;a<s.length;a++){const i=s[a]??"";if(i==="*"||i.startsWith("*"))return!0;if(a>=n.length)return!1;if(!i.startsWith(":")&&i!==n[a])return!1}return s.length===n.length}function Bf(t,e){if(!e.startsWith("/"))return null;const s=t.filter(i=>i.status!=="deleted"),n=s.find(i=>Kt(Ts(i))===Kt(e));if(n)return n;const a=s.filter(i=>Df(Ts(i),e));return a.find(i=>!Ts(i).includes("*"))??a[0]??null}function gs(t){const e=Ar(t.block);return{from:e.from,to:e.to,kind:e.type}}const Rf=["title","headline","heading","label","subtitle","text","description","href","url"];function Ui(t){const e=s=>t.entries.some(n=>{const a=n.block[s];return typeof a=="string"&&a.trim()!==""});return Rf.filter(s=>s!=="name"&&e(s)).slice(0,2)}function Gi(t,e){const s=t.block[e];return typeof s=="string"?s.replace(/\s+/g," ").trim():""}function Hi(t,e,s=[]){const n=e.trim().toLowerCase();return n?[gt(t),t.key,Ts(t),...Ns(t.block.redirect)||typeof t.block.to=="string"?[gs(t).from,gs(t).to]:[],...s.map(i=>Gi(t,i))].some(i=>i.toLowerCase().includes(n)):!0}function Yi(t){return(gs(t).from.split(/[?#]/)[0]??"").split("/").filter(Boolean)}function $f(t){const e=new Map;for(const r of t){const c=Yi(r);if(c.length<2)continue;const l=c[0]??"";e.set(l,(e.get(l)??0)+1)}const s=[...e].filter(([,r])=>r>1).map(([r,c])=>({segment:r,count:c})).sort((r,c)=>c.count-r.count||r.segment.localeCompare(c.segment)),n=s.reduce((r,c)=>r+c.count,0),a=t.length-n;return s.length+(a>0?1:0)<2?[]:a>0?[...s,{segment:"",count:a}]:s}function Of(t,e,s){const n=Yi(t),a=n.length>=2?n[0]??"":"";return e?a===e:!s.some(i=>i.segment&&i.segment===a)}const Lf=9,If=12;function Kf(t){const e=new Map;for(const c of t){if(c.status!=="published")continue;const l=gs(c).to;e.set(l,(e.get(l)??0)+1)}let s="",n=0;for(const[c,l]of e)l>n&&(s=c,n=l);if(n<=If)return{shown:t,folded:0};const a=[];let i=0,r=0;for(const c of t){const l=c.status==="published"&&gs(c).to===s;if(l&&i>=Lf){r++;continue}l&&i++,a.push(c)}return{shown:a,folded:r}}const Ff={pages:"oklch(0.62 0.17 289)",redirects:"oklch(0.64 0.13 245)",singleton:"oklch(0.66 0.09 75)",content:"oklch(0.6 0.1 270)",seo:"oklch(0.65 0 0)"};function bo(){const t=ce.c(2),e=Ee();let s;return t[0]!==e?(s=n=>n.id==="page"?e("siteEditor.contentTypes.pages"):n.id==="redirect"?e("siteEditor.contentTypes.redirects"):n.id==="cms-settings"?e("siteEditor.contentTypes.settings"):n.title,t[0]=e,t[1]=s):s=t[1],s}function zf(t){const e=ce.c(64),{tree:s,view:n,openTypeId:a,onSelect:i,onOpenEntry:r,settings:c}=t,l=Ee(),d=bo(),[u,g]=F.useState(""),[m,f]=F.useState(!1);let p,y,j,E,x,S,C;if(e[0]!==d||e[1]!==r||e[2]!==i||e[3]!==a||e[4]!==u||e[5]!==m||e[6]!==l||e[7]!==s.changed.length||e[8]!==s.collections||e[9]!==s.pages?.id||e[10]!==s.redirects?.id||e[11]!==s.singletons||e[12]!==n){const w=u.trim().toLowerCase(),_=N=>!w||d(N).toLowerCase().includes(w)||N.entries.some(L=>Hi(L,w,Ui(N))),O=a||(n.kind==="type"?n.id:null);let B;e[20]!==O?(B=N=>O===N.id,e[20]=O,e[21]=B):B=e[21];const K=B;let k;e[22]!==K||e[23]!==d||e[24]!==r||e[25]!==i?(k=(N,L,de)=>{const ne=de===void 0?!1:de;return o.jsx(da,{label:d(N),dot:L,count:ne?void 0:N.entries.length,changed:N.changed>0,active:K(N),onClick:()=>{const ie=N.entries[0];ne&&ie&&ie.status!=="deleted"?r(N,ie):i({kind:"type",id:N.id})}},N.id)},e[22]=K,e[23]=d,e[24]=r,e[25]=i,e[26]=k):k=e[26];const z=k,P=s.collections.filter(_),I=w?{shown:P,hidden:0}:Pf(P,m,O),U=s.singletons.filter(_),q=!w||l("siteEditor.contentTypes.seo").toLowerCase().includes(w);let Y;e[27]!==s.pages?.id||e[28]!==s.redirects?.id?(Y=N=>N.id===s.pages?.id?"pages":N.id===s.redirects?.id?"redirects":"content",e[27]=s.pages?.id,e[28]=s.redirects?.id,e[29]=Y):Y=e[29];const Q=Y;e[30]!==l?(x=l("sandbox.collectionsSidebar.content"),e[30]=l,e[31]=x):x=e[31],S="w-[232px] shrink-0 border-r flex flex-col min-h-0";let A;e[32]===Symbol.for("react.memo_cache_sentinel")?(A=N=>g(N.target.value),e[32]=A):A=e[32];let G;e[33]!==l?(G=l("siteEditor.contentTypes.searchContent"),e[33]=l,e[34]=G):G=e[34];let $;e[35]!==l?($=l("siteEditor.contentTypes.searchContent"),e[35]=l,e[36]=$):$=e[36],e[37]!==u||e[38]!==G||e[39]!==$?(C=o.jsx("div",{className:"px-2.5 pt-3 pb-1 shrink-0",children:o.jsx("input",{type:"search",value:u,onChange:A,placeholder:G,"aria-label":$,className:"w-full rounded-lg bg-muted/60 px-3 py-1.5 text-[13px] outline-none placeholder:text-muted-foreground"})}),e[37]=u,e[38]=G,e[39]=$,e[40]=C):C=e[40],p="flex-1 min-h-0 overflow-y-auto px-2.5 pb-4 flex flex-col gap-px",e[41]!==i||e[42]!==a||e[43]!==l||e[44]!==s.changed.length||e[45]!==n?(y=s.changed.length>0&&o.jsxs("button",{type:"button",onClick:()=>i({kind:"changes"}),className:je("mt-1.5 mb-0.5 flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm font-medium cursor-pointer","bg-warning/10 text-warning hover:bg-warning/15",n.kind==="changes"&&!a&&"ring-1 ring-warning/40"),children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full bg-warning"}),o.jsx("span",{className:"flex-1 truncate",children:l("siteEditor.contentTypes.changesInDraft")}),o.jsx("span",{className:"text-xs tabular-nums",children:s.changed.length})]}),e[41]=i,e[42]=a,e[43]=l,e[44]=s.changed.length,e[45]=n,e[46]=y):y=e[46],j=I.shown.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(ca,{label:l("siteEditor.contentTypes.group.collections")}),I.shown.map(N=>z(N,Q(N))),!w&&(I.hidden>0||m)&&o.jsx("button",{type:"button",onClick:()=>f(Mf),className:"px-2.5 py-1 text-left text-xs text-muted-foreground hover:text-foreground cursor-pointer",children:m?l("siteEditor.contentTypes.showFewer"):l("siteEditor.contentTypes.showAll",{count:s.collections.length})})]}),E=(q||U.length>0)&&o.jsxs(o.Fragment,{children:[o.jsx(ca,{label:l("siteEditor.contentTypes.group.singletons")}),q&&o.jsx(da,{label:l("siteEditor.contentTypes.seo"),dot:"seo",active:n.kind==="seo"&&!a,onClick:()=>i({kind:"seo"})}),U.map(N=>z(N,"singleton",!0))]}),e[0]=d,e[1]=r,e[2]=i,e[3]=a,e[4]=u,e[5]=m,e[6]=l,e[7]=s.changed.length,e[8]=s.collections,e[9]=s.pages?.id,e[10]=s.redirects?.id,e[11]=s.singletons,e[12]=n,e[13]=p,e[14]=y,e[15]=j,e[16]=E,e[17]=x,e[18]=S,e[19]=C}else p=e[13],y=e[14],j=e[15],E=e[16],x=e[17],S=e[18],C=e[19];let b;e[47]!==p||e[48]!==y||e[49]!==j||e[50]!==E?(b=o.jsxs("div",{className:p,children:[y,j,E]}),e[47]=p,e[48]=y,e[49]=j,e[50]=E,e[51]=b):b=e[51];let v;e[52]!==i||e[53]!==a||e[54]!==c||e[55]!==l||e[56]!==n?(v=c&&o.jsx("div",{className:"shrink-0 border-t px-2.5 py-2","data-testid":"content-sidebar-settings",children:o.jsx(Wi,{label:l("siteEditor.contentTypes.settings"),marker:o.jsx(zn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),changed:c.changed,active:n.kind==="settings"&&!a,onClick:()=>i({kind:"settings"})})}),e[52]=i,e[53]=a,e[54]=c,e[55]=l,e[56]=n,e[57]=v):v=e[57];let T;return e[58]!==x||e[59]!==S||e[60]!==C||e[61]!==b||e[62]!==v?(T=o.jsxs("nav",{"aria-label":x,className:S,children:[C,b,v]}),e[58]=x,e[59]=S,e[60]=C,e[61]=b,e[62]=v,e[63]=T):T=e[63],T}function Mf(t){return!t}function ca(t){const e=ce.c(2),{label:s}=t;let n;return e[0]!==s?(n=o.jsx("div",{className:"px-2.5 pt-4 pb-1 text-xs text-muted-foreground/70",children:s}),e[0]=s,e[1]=n):n=e[1],n}function da(t){const e=ce.c(8);let s,n;e[0]!==t?({dot:s,...n}=t,e[0]=t,e[1]=s,e[2]=n):(s=e[1],n=e[2]);const a=Ff[s];let i;e[3]!==a?(i=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:a}}),e[3]=a,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=o.jsx(Wi,{...n,marker:i}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Wi(t){const e=ce.c(17),{label:s,marker:n,count:a,changed:i,active:r,onClick:c}=t,l=Ee(),d=r?"page":void 0,u=r?"bg-accent text-accent-foreground font-medium":"text-foreground/80 hover:bg-accent hover:text-foreground";let g;e[0]!==u?(g=je("flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors cursor-pointer",u),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==s?(m=o.jsx("span",{className:"flex-1 truncate",children:s}),e[2]=s,e[3]=m):m=e[3];let f;e[4]!==i||e[5]!==l?(f=i&&o.jsx("span",{title:l("siteEditor.contentTypes.status.changed"),className:"size-1.5 shrink-0 rounded-full bg-warning"}),e[4]=i,e[5]=l,e[6]=f):f=e[6];let p;e[7]!==a?(p=a!==void 0&&o.jsx("span",{className:"shrink-0 text-xs font-normal tabular-nums text-muted-foreground/70",children:a}),e[7]=a,e[8]=p):p=e[8];let y;return e[9]!==n||e[10]!==c||e[11]!==d||e[12]!==g||e[13]!==m||e[14]!==f||e[15]!==p?(y=o.jsxs("button",{type:"button",onClick:c,"aria-current":d,className:g,children:[n,m,f,p]}),e[9]=n,e[10]=c,e[11]=d,e[12]=g,e[13]=m,e[14]=f,e[15]=p,e[16]=y):y=e[16],y}const Vf={published:"success",changed:"warning",new:"info",deleted:"destructive"},Uf={published:"siteEditor.contentTypes.status.published",changed:"siteEditor.contentTypes.status.changed",new:"siteEditor.contentTypes.status.new",deleted:"siteEditor.contentTypes.status.deleted"};function Gf(t){const e=ce.c(82),{tree:s,type:n,onOpen:a,onRestore:i,restoring:r,createLabel:c,onCreate:l,rowMenu:d}=t,u=Ee(),g=bo(),[m,f]=F.useState(""),[p,y]=F.useState("all"),[j,E]=F.useState(!1),x=s.statusKnown;let S,C,b,v,T;if(e[0]!==c||e[1]!==p||e[2]!==x||e[3]!==g||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==m||e[8]!==r||e[9]!==d||e[10]!==u||e[11]!==s.changed||e[12]!==s.pages?.entries||e[13]!==s.singletons||e[14]!==n||e[15]!==j){const O=n?n.entries.map(W=>({type:n,entry:W})):s.changed,B=n?Ui(n):[],K=O.filter(Jf).length,k=n?.group==="redirects"?$f(n.entries):[],z=p==="changed"&&x,P=p.startsWith("path:")?p.slice(5):null,I=O.filter(W=>(!z||W.entry.status!=="published")&&(P===null||Of(W.entry,P,k))&&Hi(W.entry,m,n?B:[])),U=n?.group==="redirects"&&p==="all"&&!m.trim()&&!j?Kf(I.map(Qf)):null,q=U&&U.folded>0?new Set(U.shown):null,Y=q?I.filter(W=>q.has(W.entry)):I;let Q;e[21]!==s.singletons?(Q=new Set(s.singletons.map(Xf)),e[21]=s.singletons,e[22]=Q):Q=e[22];const A=Q;let G;e[23]!==g||e[24]!==A||e[25]!==u?(G=W=>{const{type:se,entry:he}=W;return se.id===Ka?u("siteEditor.contentTypes.settings"):A.has(se.id)&&typeof he.block.name!="string"?g(se):gt(he)},e[23]=g,e[24]=A,e[25]=u,e[26]=G):G=e[26];const $=G,N=n?n.group==="pages"?"pages":n.group==="redirects"?"redirects":"other":"changes";let L;e[27]!==s.pages?.entries?(L=s.pages?.entries??[],e[27]=s.pages?.entries,e[28]=L):L=e[28];const de=L;let ne;if(e[29]!==N||e[30]!==g||e[31]!==u||e[32]!==n){const W=n?g(n):u("siteEditor.contentTypes.changesInDraft");ne=N==="redirects"?u("siteEditor.contentTypes.searchRedirects"):u("siteEditor.contentTypes.search",{type:W.toLowerCase()}),e[29]=N,e[30]=g,e[31]=u,e[32]=n,e[33]=ne}else ne=e[33];const ie=ne,fe=qf;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue=W=>!fe(W)&&!W.entry.orphan,e[34]=ue):ue=e[34];const te=ue;let le;e[35]===Symbol.for("react.memo_cache_sentinel")?(le=(W,se,he)=>{const xe=he===void 0?!1:he;return o.jsx("span",{className:je((xe||fe(W))&&"text-muted-foreground",fe(W)&&"line-through"),children:se})},e[35]=le):le=e[35];const oe=le,be=Wf,M=[];if(N==="redirects"){let W;e[36]===Symbol.for("react.memo_cache_sentinel")?(W=xe=>oe(xe,be(xe)?.from),e[36]=W):W=e[36];let se;e[37]!==de?(se=xe=>{const Re=be(xe)?.to??"",Ke=Bf(de,Re);return o.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[Ke&&oe(xe,gt(Ke)),oe(xe,Re,!0)]})},e[37]=de,e[38]=se):se=e[38];let he;e[39]!==u?(he=xe=>be(xe)?.kind==="permanent"?u("siteEditor.contentTypes.kind.permanent"):u("siteEditor.contentTypes.kind.temporary"),e[39]=u,e[40]=he):he=e[40],M.push({id:"from",header:u("siteEditor.contentTypes.column.from"),render:W},{id:"to",header:u("siteEditor.contentTypes.column.to"),render:se},{id:"kind",header:u("siteEditor.contentTypes.column.kind"),render:he})}else{let W;if(e[41]!==$?(W=se=>oe(se,$(se)),e[41]=$,e[42]=W):W=e[42],M.push({id:"name",header:u("siteEditor.contentTypes.column.name"),render:W}),N==="pages"){let se;e[43]===Symbol.for("react.memo_cache_sentinel")?(se=he=>oe(he,Ts(he.entry),!0),e[43]=se):se=e[43],M.push({id:"path",header:u("siteEditor.contentTypes.column.path"),render:se},{id:"sections",header:u("siteEditor.contentTypes.column.sections"),render:Yf})}if(N==="changes"){let se;e[44]!==g?(se=he=>he.type.title?g(he.type):"",e[44]=g,e[45]=se):se=e[45],M.push({id:"type",header:u("siteEditor.contentTypes.column.type"),render:se})}if(N==="other")for(const se of B)M.push({id:`field:${se}`,header:qn(se),render:he=>oe(he,Gi(he.entry,se))})}let re;if(e[46]!==x||e[47]!==i||e[48]!==r||e[49]!==u?(re=W=>x?o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(wn,{variant:Vf[W.entry.status],children:u(Uf[W.entry.status])}),fe(W)&&o.jsx(ua,{children:o.jsxs(De,{size:"xs",variant:"outline",disabled:r!==null,onClick:()=>i(W.entry),children:[r===W.entry.key&&o.jsx(mt,{className:"size-3"}),u("siteEditor.contentTypes.restore")]})})]}):o.jsx("span",{className:"text-muted-foreground",children:u("siteEditor.contentTypes.status.checking")}),e[46]=x,e[47]=i,e[48]=r,e[49]=u,e[50]=re):re=e[50],M.push({id:"status",header:u("siteEditor.contentTypes.column.status"),render:re}),d){let W;e[51]!==d?(W=se=>fe(se)?null:o.jsx(ua,{children:d(se.type,se.entry)}),e[51]=d,e[52]=W):W=e[52],M.push({id:"actions",header:"",render:W,cellClassName:"w-12 shrink-0"})}const me=Hf;let J;e[53]!==p||e[54]!==m||e[55]!==u||e[56]!==n?(J=m.trim()?u("siteEditor.contentTypes.noMatch"):u(n?p==="changed"?"siteEditor.contentTypes.noChangedHere":"siteEditor.contentTypes.empty":"siteEditor.contentTypes.noChanges"),e[53]=p,e[54]=m,e[55]=u,e[56]=n,e[57]=J):J=e[57];const D=J;v="flex h-full min-w-0 flex-col overflow-y-auto";let Z;e[58]===Symbol.for("react.memo_cache_sentinel")?(Z=je("flex shrink-0 flex-wrap items-center gap-2",Vl),e[58]=Z):Z=e[58];let ae;e[59]===Symbol.for("react.memo_cache_sentinel")?(ae=W=>{W.key==="Escape"&&(f(""),W.currentTarget.blur())},e[59]=ae):ae=e[59];let ye;e[60]!==m||e[61]!==ie?(ye=o.jsx("div",{ref:me,className:"w-full max-w-[280px]",children:o.jsx(yc,{value:m,onChange:f,placeholder:ie,onKeyDown:ae})}),e[60]=m,e[61]=ie,e[62]=ye):ye=e[62];const Se=n&&o.jsxs(vc,{type:"single",variant:"segmented",size:"sm",value:p,onValueChange:W=>W&&y(W),"aria-label":u("siteEditor.contentTypes.filter"),children:[o.jsx($n,{value:"all",children:u("siteEditor.contentTypes.filter.all",{count:O.length})}),x&&o.jsx($n,{value:"changed",children:u("siteEditor.contentTypes.filter.changed",{count:K})}),k.map(W=>o.jsx($n,{value:`path:${W.segment}`,children:W.segment?`${qn(W.segment)} ${W.count}`:u("siteEditor.contentTypes.filter.otherPaths",{count:W.count})},W.segment||"-"))]});let _e;e[63]!==c||e[64]!==l?(_e=l&&c&&o.jsxs(De,{size:"sm",className:"ml-auto",onClick:l,children:[o.jsx(kn,{size:16}),c]}),e[63]=c,e[64]=l,e[65]=_e):_e=e[65],e[66]!==ye||e[67]!==Se||e[68]!==_e?(T=o.jsxs("div",{className:Z,children:[ye,Se,_e]}),e[66]=ye,e[67]=Se,e[68]=_e,e[69]=T):T=e[69],S="flex flex-1 flex-col px-4 pb-4";let we;e[70]!==a?(we=W=>a(W.type,W.entry),e[70]=a,e[71]=we):we=e[71];let Be;e[72]!==D?(Be=o.jsx(ft,{title:D}),e[72]=D,e[73]=Be):Be=e[73],C=o.jsx(kc,{columns:M,data:Y,onRowClick:we,isRowClickable:te,emptyState:Be}),b=U&&U.folded>0&&o.jsx("div",{className:"py-2",children:o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>E(!0),children:u("siteEditor.contentTypes.folded",{count:U.folded})})}),e[0]=c,e[1]=p,e[2]=x,e[3]=g,e[4]=l,e[5]=a,e[6]=i,e[7]=m,e[8]=r,e[9]=d,e[10]=u,e[11]=s.changed,e[12]=s.pages?.entries,e[13]=s.singletons,e[14]=n,e[15]=j,e[16]=S,e[17]=C,e[18]=b,e[19]=v,e[20]=T}else S=e[16],C=e[17],b=e[18],v=e[19],T=e[20];let w;e[74]!==S||e[75]!==C||e[76]!==b?(w=o.jsxs("div",{className:S,children:[C,b]}),e[74]=S,e[75]=C,e[76]=b,e[77]=w):w=e[77];let _;return e[78]!==v||e[79]!==T||e[80]!==w?(_=o.jsxs("div",{className:v,children:[T,w]}),e[78]=v,e[79]=T,e[80]=w,e[81]=_):_=e[81],_}function Hf(t){const e=t?.querySelector("input");if(!e)return;const s=n=>{if(n.key!=="/"||n.metaKey||n.ctrlKey)return;const a=n.target;a&&(a.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(a.tagName))||(n.preventDefault(),e.focus())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)}function Yf(t){return _f(t.entry)}function Wf(t){return t.type.group==="redirects"?gs(t.entry):null}function qf(t){return t.entry.status==="deleted"}function Xf(t){return t.id}function Qf(t){return t.entry}function Jf(t){return t.entry.status!=="published"}function ua(t){const e=ce.c(2),{children:s}=t;let n;return e[0]!==s?(n=o.jsx("span",{className:"inline-flex",onClick:em,onKeyDown:Zf,children:s}),e[0]=s,e[1]=n):n=e[1],n}function Zf(t){return t.stopPropagation()}function em(t){return t.stopPropagation()}const pa=F.lazy(()=>xt(()=>import("./app-editor-DQrUb2qq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.AppEditor}))),fa=F.lazy(()=>xt(()=>import("./cms-settings-editor-CL1HXF3j.js"),__vite__mapDeps([165,1,2,28,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,131,19,20,21,22,23,24,25,26,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,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,132,133,106,134,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,135,155,0,103,104,105,107,130,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.CmsSettingsEditor}))),tm=F.lazy(()=>xt(()=>import("./post-editor-BAf1z147.js"),__vite__mapDeps([166,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,28,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,23,167,97,66,113,114,69,61,62,143,89,105,106,107,108,109,26,20,21,22,24,25,53,54,55,110,111,112,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,59,60,63,64,65,67,68,70,71,72,74,77,78,79,80,82,83,84,85,86,87,91,92,93,94,95,96,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,103,144,145,146,147,148,149,150,151,152,153,154,168,169,170,171,158,172,173,155,156,157,159,160,161,162,163,164])).then(t=>({default:t.PostEditor}))),sm=F.lazy(()=>xt(()=>import("./record-editor-DVouiUmR.js"),__vite__mapDeps([174,1,2,23,59,60,55,36,89,105,106,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,107,108,109,26,20,21,22,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,171,173,155,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.RecordEditor}))),nm=F.lazy(()=>xt(()=>import("./context-2NK4t-Lg.js"),__vite__mapDeps([175,1,2,137,31,46,113,114,47,23,138,139,60,140,141,142,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,48,49,50,51,52,130,131,19,20,21,22,24,25,26,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,55,56,57,58,59,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,132,133,106,134,108,109,110,111,112,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,135,136,143,105,107,103,144,145,146,147,148,149,150,151,152,153,154,173,176,170,158,169,155,156,157,159,160,161,162,163,164])).then(t=>({default:t.BlogContext}))),om=F.lazy(()=>xt(()=>import("./category-editor-DDFXYf_d.js"),__vite__mapDeps([177,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,28,32,27,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,23,59,60,55,171,105,106,107,108,109,26,20,21,22,24,25,53,54,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,168,169,170,161,172,173,155,156,157,158,159,160,162,163,164])).then(t=>({default:t.CategoryEditor}))),am=F.lazy(()=>xt(()=>import("./sections-editor-Uk83RbMN.js"),__vite__mapDeps([178,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,105,106,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,107,108,109,26,20,21,22,23,24,25,53,54,55,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,158,104,179,180,161,181])).then(t=>({default:t.SectionsEditor}))),im=F.lazy(()=>xt(()=>import("./seo-editor-dMXY0ofk.js").then(t=>t.s),__vite__mapDeps([179,1,2,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,103,60,105,106,107,108,109,26,20,21,22,23,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,55,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,59,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154])).then(t=>({default:t.SeoEditor}))),lm=F.lazy(()=>xt(()=>import("./variant-calendar-CPtUMCAS.js"),__vite__mapDeps([182,1,2,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,23,103,60,143,54,55,64,62,160])).then(t=>({default:t.VariantCalendar}))),rm=F.lazy(()=>xt(()=>import("./post-calendar-BIBU13NF.js"),__vite__mapDeps([183,1,2,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,103,60,160,18,14,13,3,4,5,6,7,8,9,10,11,12,15,16,17,137,113,114,23,138,139,140,141,142,130,131,19,20,21,22,24,25,26,53,54,55,56,57,58,59,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,132,133,106,134,108,109,110,111,112,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,135,136,105,107,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,162,163,164])).then(t=>({default:t.PostCalendar}))),cm=F.lazy(()=>xt(()=>import("./redirect-editor-cm3-huyu.js"),__vite__mapDeps([184,1,2,66,42,23,59,60,55,36,105,106,27,28,29,30,31,32,33,34,35,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,107,108,109,26,20,21,22,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,61,62,63,64,65,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,173])).then(t=>({default:t.RedirectEditor})));function dm(t){return ii(t)!==null||t===Oa||t==="redirect"||Fr.has(t)}function um(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"pages":t}function pm(t,e){return t&&(ds(t)||e&&t==="sections")?t:null}function fm(t){const e=ce.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=eo(),{org:i}=ol(),r=oc(),c=ac(),{runtime:l,previewServerUrl:d}=lo(a),u=l==="cms",g=io(a,n);let m,f;e[0]!==g||e[1]!==u||e[2]!==c.previewState||e[3]!==r.lifecycle.phase?(m=Ba(g),f=xd({fastPreviewActive:u||m,previewState:c.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=g,e[1]=u,e[2]=c.previewState,e[3]=r.lifecycle.phase,e[4]=m,e[5]=f):(m=e[4],f=e[5]);const p=f;if(p.kind==="sandbox-card"){const x=`/${i.slug}/settings/connections`;let S;return e[6]!==p.state||e[7]!==c.start||e[8]!==x||e[9]!==r.lifecycle||e[10]!==r.phase?(S=o.jsx(gd,{state:p.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:c.start,connectionsHref:x}),e[6]=p.state,e[7]=c.start,e[8]=x,e[9]=r.lifecycle,e[10]=r.phase,e[11]=S):S=e[11],S}if(!a||!n){let x;return e[12]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(ft,{title:"Waiting for sandbox context…"}),e[12]=x):x=e[12],x}if(_r(g)){let x;return e[13]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Rr,{}),e[13]=x):x=e[13],x}if(g.kind==="pending"){let x;return e[14]!==g?(x=o.jsx($r,{backend:g}),e[14]=g,e[15]=x):x=e[15],x}const y=m?null:c.previewUrl;let j;e[16]!==g||e[17]!==u||e[18]!==c.previewUrl||e[19]!==d?(j=g.kind==="protocol"&&g.source==="local"?rr(g):u?d:c.previewUrl,e[16]=g,e[17]=u,e[18]=c.previewUrl,e[19]=d,e[20]=j):j=e[20];let E;return e[21]!==n||e[22]!==s||e[23]!==p.devServerReady||e[24]!==p.sandboxWarming||e[25]!==i.slug||e[26]!==y||e[27]!==j||e[28]!==a?(E=o.jsx(mm,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:y,sitePreviewUrl:j,deepLinkPage:s,devServerReady:p.devServerReady,sandboxWarming:p.sandboxWarming}),e[21]=n,e[22]=s,e[23]=p.devServerReady,e[24]=p.sandboxWarming,e[25]=i.slug,e[26]=y,e[27]=j,e[28]=a,e[29]=E):E=e[29],E}function mm({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:c}){const l=Ee(),d=yn()?.taskId??null,u={orgSlug:t,virtualMcpId:e,branch:s,threadId:d,previewUrl:n},g=io(e,s),m=!Ba(g),f=g.kind==="protocol"&&g.source==="github";al(f);const p=Il({orgSlug:t,virtualMcpId:e,branch:s}),y=f,j=f&&g.kind==="protocol"?g:null,E=j?cr({orgSlug:t,virtualMcpId:e,branch:s},j):null,x=dr(j,E),S=ur(j,E,x.data),C=Wr({orgSlug:t,virtualMcpId:e,branch:s,refresh:()=>x.refetch()}),b=bo(),[v,T]=F.useState(null),[w,_]=F.useState(null),[O,B]=F.useState(null),K=Kl()===void 0,{data:k,isLoading:z}=pr(u,{fetchEnabled:r}),P={orgSlug:t,virtualMcpId:e,branch:s},I=fr(f?P:null,dm);No(f?P:null,I);const U=ga({strict:!1}),[q,Y]=F.useState(()=>pm(U.contentCollection,!m)??"pages"),Q=Ga(),A=um(q,Q,!m),{openPanel:G}=ec(),$={open:h=>{G(h==="campaigns"?"calendar":"experiments")}},[N,L]=F.useState(()=>U.contentItem&&(ds(A)||A==="sections")?{collection:A,key:U.contentItem}:null),de=N&&"key"in N?N.key:null,ne=de??w?.key??null,ie=ne===null?[]:[Qs(ne,k??{})?.block??ne],fe=No(f?P:null,ie,{withRefs:!0}),[ue,te]=F.useState(null),le=F.useRef(null),[oe,be]=F.useState(!1),{data:M,isLoading:re}=Dr(u,{fetchEnabled:r,refetchInterval:h=>{const R=h.state.data;let ee;if(A==="apps"&&N&&N.collection==="apps"){const ve=k?.[N.key];ee=typeof ve?.__resolveType=="string"?ve.__resolveType:void 0}else if(A==="site"&&k){const ve=R?Eo(k,R):null,nt=k.site;ee=ve?.resolveType??(typeof nt?.__resolveType=="string"?nt.__resolveType:void 0)}const ge=Cc({resolveType:ee,meta:R,reads:h.state.dataUpdateCount+h.state.errorUpdateCount,window:le.current});le.current=ge.window;const Ae=ge.interval!==!1;return be(ve=>ve===Ae?ve:Ae),ge.interval}}),me=!!(i?.pageId||i?.path||i?.pathTemplate),[J,D]=F.useState(!1);if(me&&!J&&N===null&&k&&!re){D(!0);const h=Br(To(k,M),i??{});h&&(Y("pages"),L({collection:"pages",key:h.key,path:h.path}))}const[Z,ae]=F.useState(""),[ye,Se]=F.useState("list"),_e=h=>{L(h),te(null)},[we,Be]=F.useState(A);we!==A&&(Be(A),ae(""));const{createTask:W}=eo(),se=lo(e),he=cd(e,M??void 0),xe=_a(e).url,Re=Zn("site_apps_install_enabled"),Ke=Re&&he!==null&&!xe,Ge=M&&k?ed(he?Ja(he):[],M,k):[],$e=rd({orgSlug:t,virtualMcpId:e,branch:s}),qe=Re?Ke?se.resolved?se.runtime==="cms"?{reason:l("sandbox.appEditor.installNeedsCodingSession"),action:{label:l("chat.fastPreview.startCodingSession"),onClick:()=>W({runtime:"sandbox"})}}:null:{reason:l("sandbox.appInstallPanel.sessionLoading")}:{reason:l("sandbox.appInstallPanel.unavailable")}:{reason:l("sandbox.appInstallPanel.flagOff")},Nt=h=>{if(se.resolved&&!$e.isPending){if(se.runtime==="cms"){ke.error(l("sandbox.appEditor.installNeedsCodingSession"),{action:{label:l("chat.fastPreview.startCodingSession"),onClick:()=>W({runtime:"sandbox"})}});return}$e.mutate({blockKey:h.id},{onSuccess:R=>_e({collection:"apps",key:R.key}),onError:R=>ke.error(R.message)})}},Pe=vn(u),st=qr(u),it=op({orgSlug:t,virtualMcpId:e,branch:s,decofile:k??{},onMoved:(h,R)=>L(ee=>ee?.collection==="posts"&&ee.key===h?{collection:"posts",key:R}:ee)}),[Ie,X]=F.useState(null),[Ne,Ce]=F.useState(),[Oe,He]=F.useState(!1),[Ft,Jt]=F.useState(),[Ye,zt]=F.useState(null),[Fe,Ue]=F.useState(null),Bs=Fe?.kind==="blog"?zs[Fe.blogKind]:Fe?.kind??"item",Tt=Fe?.kind==="section"?l(na("section",f,{neverPublished:p(Fe.key)}),{label:Fe.label}):Fe?l(na("block",f,{neverPublished:p(Fe.key)}),{label:Fe.label}):null,Zt=l("sandbox.contentBrowser.deleteDialog.title",{noun:Bs}),Et=_d(Tt===null?null:{title:Zt,description:Tt},f),[bt,es]=F.useState(null),ts=!k||!M;if(z||re||K||ts&&c)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})});if(ts)return o.jsx(ft,{title:"Could not load site data."});if(mr(M))return o.jsx(Fl,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k});const Xe=To(k,M).sort((h,R)=>h.name.localeCompare(R.name)),ss=Or(k).sort((h,R)=>h.from.localeCompare(R.from)),lt=Lr(k,M),Mt=A==="sections"?Ir(M):[],yt=Eo(k,M),Qe=li(k),Pt=uo.some(h=>Qe[h].length>0),Vt=ds(A)?Qe[A]:[],At=wo(M,"loaders"),vt=wo(M,"actions"),Ut=m?["settings"]:["calendar","apps",...yt?[]:["site"],...vt===0?["actions"]:[],...Po(M)?[]:["settings"]];if(!Kr(k,M)&&!Pt&&At===0&&vt===0)return o.jsx(ft,{icon:Vs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const hs={pages:Xe.length,sections:lt.length,apps:m?Ge.length:0,loaders:At,actions:vt,redirects:ss.length,posts:Qe.posts.length,authors:Qe.authors.length,categories:Qe.categories.length},ns=new Set(Xe.map(h=>Kt(h.path))),Gt=new Set(Xe.map(h=>h.name)),Ht=new Set(lt.map(h=>h.name)),Ve=y?Tf({blocks:k,meta:M,changes:x.data?.changes,deleted:S.data}):null,_t=Ve?.pages??Ve?.all[0]??null,Dt=_t?{kind:"type",id:_t.id}:{kind:"seo"},rt=h=>h?.kind==="type"?Ve?.all.find(R=>R.id===h.id)??null:null,os=Po(M),Je=v&&(v.kind==="type"?rt(v):v.kind!=="settings"||os)?v:Dt,kt=rt(Je);if(y&&N){const h=N.collection==="available-section"?"sections":N.collection==="available-app"?"apps":N.collection;q!==h&&Y(h)}const ct=y&&(N!==null||w!==null&&(A==="loaders"||A==="settings")),dt=w?w.from:Je,Ze=dt&&dt.kind==="type"&&!rt(dt)?Dt:dt,xs=h=>{if(w?.key!==h)return;const R=Ve?.all.find(ge=>ge.id===w.typeId),ee=R?.entries.find(ge=>ge.key===h);if(!(!R||!ee||R.entries.length<2))return`${b(R)} · ${gt(ee)}`},as=()=>{_(null),L(null),te(null)},is=(h,R,ee)=>{te(null),_({typeId:h.id,key:R.key,from:ee}),h.group==="pages"?L({collection:"pages",key:R.key,path:typeof R.block.path=="string"?R.block.path:"/"}):h.group==="redirects"?L({collection:"redirects",key:R.key}):h.group==="sections"?L({collection:"sections",key:R.key}):h.group==="loaders"?(L(null),Y("loaders")):h.id==="cms-settings"?(_(null),L(null),T({kind:"settings"})):L({collection:"apps",key:R.key})},Yt=async h=>{const R=x.data?.changes[h.key];if(!(!j||!R)){B(h.key);try{await C(j,[{name:h.key,version:R.version}],l("siteEditor.contentTypes.restored",{name:gt(h)}))}finally{B(null)}}},ls=h=>{if(!h)return null;if(h.group==="pages")return{label:l("siteEditor.contentTypes.new.page"),onCreate:Bt};if(h.group==="redirects")return{label:l("siteEditor.contentTypes.new.redirect"),onCreate:$t};if(h.group==="sections"){const R=b(h);return{label:l("siteEditor.contentTypes.new.other",{type:R.toLowerCase()}),onCreate:()=>L({collection:"available-section",resolveType:h.id,title:R})}}return null},bs=(h,R)=>{if(h.group==="pages"){const ee={key:R.key,name:gt(R),path:typeof R.block.path=="string"?R.block.path:""};return o.jsx(us,{onDuplicate:()=>Rt(ee),onRename:()=>rs(ee),onDelete:()=>Ue({kind:"page",key:ee.key,label:ee.name})})}return h.group==="redirects"?o.jsx(us,{onDelete:()=>Ue({kind:"redirect",key:R.key,label:gs(R).from||R.key})}):h.group==="sections"?o.jsx(us,{onDelete:()=>Ue({kind:"section",key:R.key,label:gt(R)})}):null},ys=async h=>{const R=k[h.key];if(!R)return;const ee=Ia(k,h.key),ge=La(k,h.key,Math.max(0,ee-1)),Ae=zr(R.sections,ge,M,!m);if(Ae)try{const ve=await Pe.mutateAsync({blockKey:h.key,data:{...R,sections:Ae.sections}});et(ve)||ke.success(`Variant added to "${h.name}"`),L({collection:"pages",key:h.key,path:h.path})}catch(ve){ke.error(ve instanceof Error?ve.message:"Could not add variant")}},Bt=()=>{Ce(void 0),X({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},Rt=h=>{Ce(void 0),X({mode:"duplicate",sourceKey:h.key,initialName:Io(Gt,h.name),initialPath:bd(ns,h.path)})},rs=h=>{Ce(void 0),X({mode:"rename",sourceKey:h.key,initialName:h.name,initialPath:h.path})},vs=async h=>{if(!Ie)return;const{mode:R,sourceKey:ee}=Ie;try{if(R==="create"){let ge;if(h.templateKey){const nt=k[h.templateKey];if(!nt)throw new Error("Selected template no longer exists.");ge={...nt,name:h.name,path:h.path}}else ge=kd(h.name,h.path,m?void 0:M);const Ae=wd(k,h.name),ve=await Pe.mutateAsync({blockKey:Ae,data:ge});et(ve)||ke.success(`Created "${h.name}"`),L({collection:"pages",key:Ae,path:h.path})}else if(R==="duplicate"&&ee){const ge=k[ee];if(!ge)throw new Error("Source page not found");const{key:Ae,data:ve}=vd({source:ge,pages:Xe,newName:h.name,newPath:h.path}),nt=await Pe.mutateAsync({blockKey:Ae,data:ve});et(nt)||ke.success(`Duplicated as "${h.name}"`),L({collection:"pages",key:Ae,path:h.path})}else if(R==="rename"&&ee){const ge=k[ee];if(!ge)throw new Error("Page not found");const Ae={...ge,name:h.name,path:h.path},ve=await Pe.mutateAsync({blockKey:ee,data:Ae});et(ve)||ke.success("Page updated"),N?.collection==="pages"&&N.key===ee&&L({collection:"pages",key:ee,path:h.path})}X(null)}catch(ge){Ce(ge instanceof Error?ge.message:"Save failed")}},ks=({path:h})=>{if(!Ie)return null;const R=Kt(h);return(Ie.mode==="rename"?Kt(Ie.initialPath):null)!==R&&ns.has(R)?`A page with path "${h}" already exists.`:null},js=async(h,R,ee)=>{const ge=await Pe.mutateAsync({blockKey:R,data:{...ee,name:R,__resolveType:h},create:!0});et(ge)||ke.success(l("sandbox.contentBrowser.createdSection",{name:R})),L({collection:"sections",key:R})},ws=ya((h,R)=>Pe.mutate({blockKey:h,data:R})),Rs=async h=>{const R=k[h.key];if(!R){ke.error(l("sandbox.contentBrowser.sectionNotFound"));return}const ee=yd(k,h.key),ge=Io(Ht,h.name),Ae={...R,name:ge};try{const ve=await Pe.mutateAsync({blockKey:ee,data:Ae,create:!0});et(ve)||ke.success(l("sandbox.contentBrowser.duplicatedSection",{name:h.name})),L({collection:"sections",key:ee})}catch(ve){ke.error(ve instanceof Error?ve.message:l("sandbox.contentBrowser.duplicateFailed"))}},Wt=async h=>{if(!Ye)return;const R=k[Ye];if(!R){ke.error(l("sandbox.contentBrowser.sectionNotFound"));return}try{const ee=await Pe.mutateAsync({blockKey:Ye,data:{...R,name:h}});et(ee)||ke.success(l("sandbox.contentBrowser.sectionRenamed")),zt(null)}catch(ee){ke.error(ee instanceof Error?ee.message:l("sandbox.contentBrowser.renameFailed"))}},$t=()=>{Jt(void 0),He(!0)},qt=async h=>{const R=f?Mr(k):null,ee=R===null?null:Vr(k,R).length,ge=R===null?Ur(k,h.from):R,Ae=R===null?Gr(h):Hr(k[R],h);try{const ve=await Pe.mutateAsync({blockKey:ge,data:Ae});et(ve)||ke.success("Created redirect"),He(!1),L({collection:"redirects",key:ee===null?ge:`${ge}#${ee}`})}catch(ve){Jt(ve instanceof Error?ve.message:"Could not create redirect")}},Xt=async h=>{const R=Kn(k,h),ee=Cs(R,h,hi(h));try{const ge=await Pe.mutateAsync({blockKey:R,data:ee});et(ge)||ke.success(`Created ${zs[h]}`),L({collection:h,key:R})}catch(ge){ke.error(ge instanceof Error?ge.message:"Could not create")}},Qt=async h=>{const R=Kn(k,"posts"),ee=Cs(R,"posts",ep(h));try{const ge=await Pe.mutateAsync({blockKey:R,data:ee});et(ge)||ke.success(l("sandbox.postCalendar.createdScheduledPost")),Y("posts"),Be("posts"),L({collection:"posts",key:R}),te(null)}catch(ge){ke.error(ge instanceof Error?ge.message:l("sandbox.postCalendar.couldNotCreate"))}},Ss=async(h,R)=>{const ee=k[h],ge=ee?sp(ps(ee,"posts"),R):null;if(!ge){ke.error(l("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await Pe.mutateAsync({blockKey:h,data:Cs(h,"posts",ge)})}catch(Ae){ke.error(Ae instanceof Error?Ae.message:l("sandbox.postCalendar.couldNotReschedule"))}},H=async h=>{const R=k[h.key];if(!R){ke.error("Record not found.");return}const ee=Kn(k,h.kind),ge=h.kind==="posts"?"title":"name",Ae={...structuredClone(ps(R,h.kind)),[ge]:`${h.label} (copy)`};if(h.kind==="categories"){const ve=Qe.categories.map(nt=>nt.slug??"").filter(Boolean);Ae.slug=Ju(String(Ae.slug??""),ve)}try{const ve=await Pe.mutateAsync({blockKey:ee,data:Cs(ee,h.kind,Ae)});et(ve)||ke.success(`Duplicated "${h.label}"`),L({collection:h.kind,key:ee})}catch(ve){ke.error(ve instanceof Error?ve.message:"Duplicate failed")}},pe=()=>{Y("posts"),Be("posts"),L(null),te(null),ae("")},Le=async()=>{if(!Fe)return;let h;try{const{kind:R,key:ee,label:ge}=Fe;if(R==="blog"){if(Fe.blogKind==="categories"){const Ae=ps(k[ee],"categories").slug,ve=typeof Ae=="string"?Ae:"";if(ve)for(const{key:nt,payload:yo}of gi(k)){const vo=ru(yo,ve);vo!==yo&&await Pe.mutateAsync({blockKey:nt,data:ou(nt,cu(vo))})}}h=await st.mutateAsync({blockKey:ee})}else if(Qs(ee,k)){const Ae=Qs(ee,k);h=await Pe.mutateAsync({blockKey:Ae.block,data:Yr(k[Ae.block],Ae.index)})}else h=await st.mutateAsync({blockKey:ee});if(Ue(null),et(h))return;ke.success(`Deleted "${ge}"`),N&&"key"in N&&N.key===ee&&L(null),Ue(null)}catch(R){ke.error(R instanceof Error?R.message:"Delete failed")}},ut=de===null?null:Qs(de,k),ze=fe.failed?o.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center",children:[o.jsx(ft,{title:l("sectionsEditor.hosted.blockLoadFailed"),description:l("sectionsEditor.hosted.blockLoadFailedHint")}),o.jsx(De,{variant:"outline",size:"sm",onClick:fe.retry,children:l("sectionsEditor.namedRules.tryAgain")})]}):fe.ready?o.jsx(o.Fragment,{children:A==="loaders"||A==="actions"?o.jsx(ef,{initialSavedKey:y?w?.key:void 0,onBack:y?as:void 0,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:M,decofile:k,kind:A},y?`types:${w?.key??""}`:void 0):o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),children:A==="calendar"?o.jsx(lm,{decofile:k}):A==="post-schedule"?o.jsx(rm,{decofile:k,isCreating:Pe.isPending,onCreate:h=>{Qt(h)},onReschedule:(h,R)=>{Ss(h,R)},onSelect:h=>{Y("posts"),Be("posts"),L({collection:"posts",key:h}),te(null)}}):A==="site"?yt?o.jsx(pa,{schemaWaiting:oe,orgSlug:t,virtualMcpId:e,branch:s,blockKey:yt.key,block:k[yt.key],decofile:k,meta:M,title:"Site",excludeFields:["seo"],previewBaseUrl:n},`site:${yt.key}`):o.jsx(ft,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):A==="settings"?o.jsx(fa,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,persistDefaults:y?!1:void 0}):A==="context"?o.jsx(nm,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M}):A==="seo"?o.jsx(im,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,target:{kind:"site"},previewBaseUrl:a}):A==="sections"?o.jsx(gf,{selection:N?.collection==="sections"||N?.collection==="available-section"?N:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:M,decofile:k,isCreating:Pe.isPending,onCreateAvailable:js,onSaveReferencedBlock:ws}):A==="posts"?o.jsx(zp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,view:ye,selectedKey:N?.collection==="posts"?N.key:null,onViewChange:h=>{Se(h),L(null)},onClose:()=>L(null),onOpen:h=>{L({collection:"posts",key:h}),te(null)},move:it,meta:M,renderDetail:(h,R)=>o.jsx(tm,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:h,block:k[h],decofile:k,meta:M,previewBaseUrl:a,move:it,onClose:R?.onClose,expanded:R?.expanded,onToggleExpand:R?.onToggleExpand},`post:${Ms(h)}`)}):N?.collection==="available-app"?(()=>{const h=Ge.find(R=>R.id===N.id);return h?o.jsx(sd,{entry:h,technology:he,blocked:$e.isPending&&$e.variables?.blockKey!==h.id?{reason:l("sandbox.appInstallPanel.oneAtATime")}:qe,isInstalling:$e.isPending&&$e.variables?.blockKey===h.id,installError:$e.isError&&$e.variables?.blockKey===h.id?$e.error.message:null,onInstall:()=>Nt(h)},`available-app:${h.id}`):o.jsx(ft,{title:"App not found in this catalogue."})})():N&&N.collection!=="available-section"?N.collection==="apps"?o.jsx(pa,{schemaWaiting:oe,orgSlug:t,virtualMcpId:e,branch:s,blockKey:N.key,block:k[N.key],decofile:k,meta:M,previewBaseUrl:n,...y?{persistDefaults:!1,title:xs(N.key)}:{}},`app:${N.key}`):N.collection==="categories"?o.jsx(om,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:N.key,block:k[N.key],decofile:k,meta:M,onManagePosts:()=>pe(),onOpenPost:h=>{Y("posts"),Be("posts"),L({collection:"posts",key:h}),te(null)},previewBaseUrl:a},`category:${N.key}`):N.collection==="authors"?o.jsx(sm,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:N.key,block:k[N.key],meta:M,decofile:k},`authors:${N.key}`):N.collection==="redirects"?o.jsx(cm,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:ut?.block??N.key,rule:ut?.index??null,block:k[ut?.block??N.key]},`redirect:${N.key}`):o.jsx(hl,{value:$,children:o.jsx(am,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:N.collection==="pages"?N.path:"/",activePageBlockKey:N.collection==="pages"?N.key:null,activeGlobalBlockKey:N.collection==="sections"?N.key:null,initialEditSeo:N.collection==="pages"&&ue===N.key,onExitSeo:()=>te(null),onSelectRoot:()=>{L(null),te(null)}},N.collection==="pages"?`page:${N.key}`:`section:${N.key}`)}):o.jsx(ft,{title:`Select ${ds(A)?`a ${zs[A]}`:A==="pages"?"a page":A==="apps"?"an app":A==="redirects"?"a redirect":"a section"} to edit`,description:A==="apps"?"Browse all apps: select an installed one to edit its settings, or any other to install it.":'Pick an item from the list, or click "+" to create one.'})})}):o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),Xs=st.isPending||Pe.isPending;return o.jsx(zl,{value:!m,children:o.jsxs("div",{className:"flex h-full w-full",children:[Ve?o.jsx(zf,{tree:Ve,view:Je,openTypeId:ct?w?.typeId??null:null,onSelect:h=>{T(h),as(),h.kind==="seo"&&Y("seo")},onOpenEntry:(h,R)=>is(h,R,null),settings:os?{changed:(Ve.settings?.changed??0)>0}:null}):o.jsx(fd,{active:A,counts:hs,hidden:Ut,showBlog:Pt,showContext:Q,onSelect:h=>{Y(h),L(null),te(null)}}),!Ve&&A!=="seo"&&A!=="site"&&A!=="settings"&&A!=="context"&&A!=="calendar"&&A!=="post-schedule"&&A!=="posts"&&A!=="loaders"&&A!=="actions"&&o.jsx(gm,{activeCollection:A,pages:Xe,redirects:ss,sections:lt,availableSections:Mt,appCatalog:Ge,canInstallApps:Ke,installingAppId:$e.isPending?$e.variables?.blockKey??null:null,blogEntries:Vt,decofile:k,searchQuery:Z,onSearchChange:ae,selection:N,onSelect:_e,onCreate:()=>{A==="pages"?Bt():A==="redirects"?$t():ds(A)&&Xt(A)},onDuplicatePage:Rt,onRenamePage:rs,onAddPageVariant:ys,onDeletePage:h=>Ue({kind:"page",key:h.key,label:h.name}),onEditPageSeo:h=>{const R={collection:"pages",key:h.key,path:h.path};L(R),te(h.key)},onViewPageJson:h=>es(h.key),onDuplicateSection:Rs,onRenameSection:h=>zt(h.key),onDeleteSection:h=>Ue({kind:"section",key:h.key,label:h.name}),onDeleteRedirect:h=>Ue({kind:"redirect",key:h.key,label:h.from||h.key}),onDuplicateBlog:H,onDeleteBlog:h=>Ue({kind:"blog",blogKind:h.kind,key:h.key,label:h.label})}),Ve&&Je.kind==="settings"&&!ct?o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),children:o.jsx(fa,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,standalone:!0,persistDefaults:!1})})}):Ve&&Je.kind!=="seo"&&!ct?o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Gf,{tree:Ve,type:kt,onOpen:(h,R)=>is(h,R,Je),onRestore:h=>{Yt(h)},restoring:O,createLabel:ls(kt)?.label,onCreate:ls(kt)?.onCreate,rowMenu:bs},Je.kind==="type"?Je.id:"changes")}):ct&&Ze?o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[o.jsx(Ul,{back:{label:l("siteEditor.contentTypes.back",{type:Ze.kind==="seo"?l("siteEditor.contentTypes.seo"):Ze.kind==="settings"?l("siteEditor.contentTypes.settings"):Ze.kind==="changes"?l("siteEditor.contentTypes.changesInDraft"):b(rt(Ze)??{id:"",title:""})}),onClick:()=>{T(Ze),as()}}}),o.jsx("div",{className:"flex-1 min-h-0",children:ze})]}):o.jsx("div",{className:"flex-1 min-w-0",children:ze}),Ie&&o.jsx(Td,{open:!!Ie,mode:Ie.mode,initialName:Ie.initialName,initialPath:Ie.initialPath,isPending:Pe.isPending,error:Ne,templates:Xe,validate:ks,onSubmit:vs,onOpenChange:h=>{h||(X(null),Ce(void 0))}}),o.jsx(Pd,{open:Oe,isPending:Pe.isPending,error:Ft,onSubmit:qt,onOpenChange:h=>{h||(He(!1),Jt(void 0))}}),Ye&&o.jsx(Ad,{open:!!Ye,blockKey:Ye,initialName:lt.find(h=>h.key===Ye)?.name??Ye,isPending:Pe.isPending,onSubmit:Wt,onOpenChange:h=>{h||zt(null)}}),bt&&o.jsx(Xr,{open:!!bt,onOpenChange:h=>{h||es(null)},pageKey:bt,decofile:k,params:u}),o.jsx(il,{open:!!Fe,onOpenChange:h=>{!h&&!Xs&&Ue(null)},children:o.jsxs(ll,{children:[o.jsxs(rl,{children:[o.jsx(cl,{children:Et?.title??Zt}),o.jsx(dl,{children:Et?.description??null})]}),o.jsxs(ul,{children:[o.jsx(pl,{disabled:Xs,children:l("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(fl,{onClick:h=>{h.preventDefault(),Le()},disabled:Xs,className:je(ml({variant:"destructive"})),children:Xs?o.jsxs(o.Fragment,{children:[o.jsx(mt,{className:"size-3.5"}),l("sandbox.contentBrowser.deleteDialog.deleting")]}):l("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function gm(t){const e=ce.c(59),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:c,canInstallApps:l,installingAppId:d,blogEntries:u,decofile:g,searchQuery:m,onSearchChange:f,selection:p,onSelect:y,onCreate:j,onDuplicatePage:E,onRenamePage:x,onAddPageVariant:S,onDeletePage:C,onEditPageSeo:b,onViewPageJson:v,onDuplicateSection:T,onRenameSection:w,onDeleteSection:_,onDeleteRedirect:O,onDuplicateBlog:B,onDeleteBlog:K}=t,k=Ee();let z,P,I,U,q,Y;if(e[0]!==s||e[1]!==c||e[2]!==r||e[3]!==u||e[4]!==l||e[5]!==g||e[6]!==d||e[7]!==S||e[8]!==j||e[9]!==K||e[10]!==C||e[11]!==O||e[12]!==_||e[13]!==B||e[14]!==E||e[15]!==T||e[16]!==b||e[17]!==x||e[18]!==w||e[19]!==f||e[20]!==y||e[21]!==v||e[22]!==n||e[23]!==a||e[24]!==m||e[25]!==i||e[26]!==p||e[27]!==k){const $=m.toLowerCase(),N=n.filter(D=>!$||D.name.toLowerCase().includes($)||D.path.toLowerCase().includes($)),L=a.filter(D=>!$||D.from.toLowerCase().includes($)||D.to.toLowerCase().includes($)),de=i.filter(D=>!$||D.name.toLowerCase().includes($)||D.key.toLowerCase().includes($)||D.resolveType.toLowerCase().includes($)),ne=r.filter(D=>!$||D.title.toLowerCase().includes($)||D.resolveType.toLowerCase().includes($)||(D.description?.toLowerCase().includes($)??!1)),ie=yf(de),fe=c.filter(D=>!$||D.title.toLowerCase().includes($)||D.app.toLowerCase().includes($)||D.vendor.toLowerCase().includes($)||D.category.toLowerCase().includes($)),ue=u.filter(D=>!$||D.label.toLowerCase().includes($)||D.subtitle.toLowerCase().includes($)),te=s==="categories"&&!$?xf(ue):ue.map(xm),le=`Search ${s}…`,oe=ds(s)?`Create new ${zs[s]}`:s==="redirects"?"Create new redirect":"Create new page",be=s!=="apps"&&s!=="sections";q="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[34]=M):M=e[34];let re;e[35]!==f?(re=D=>f(D.target.value),e[35]=f,e[36]=re):re=e[36];let me;e[37]!==le||e[38]!==m||e[39]!==re?(me=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[M,o.jsx("input",{type:"text",value:m,onChange:re,placeholder:le,"aria-label":le,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[37]=le,e[38]=m,e[39]=re,e[40]=me):me=e[40];let J;e[41]!==oe||e[42]!==j||e[43]!==be?(J=be&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx(De,{variant:"ghost",size:"icon",onClick:j,"aria-label":oe,children:o.jsx(kn,{size:14})})}),o.jsx(St,{side:"bottom",children:oe})]}),e[41]=oe,e[42]=j,e[43]=be,e[44]=J):J=e[44],e[45]!==me||e[46]!==J?(Y=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[me,J]}),e[45]=me,e[46]=J,e[47]=Y):Y=e[47],z=qs,U="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",P="flex flex-col gap-1 p-1.5",I=s==="pages"?N.length===0?o.jsx(Os,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):N.map(D=>{const Z=p?.collection==="pages"&&p.key===D.key,ae=Ia(g,D.key);return o.jsx(jt,{icon:Pa,title:D.name,subtitle:D.path,active:Z,variantCount:ae,onClick:()=>y({collection:"pages",key:D.key,path:D.path}),menu:o.jsx(us,{onDuplicate:()=>E(D),onRename:()=>x(D),onAddVariant:()=>S(D),onEditSeo:()=>b(D),onViewJson:()=>v(D),onDelete:()=>C(D)})},D.key)}):s==="sections"?de.length===0&&ne.length===0?o.jsx(Os,{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:[ie.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(oa,{icon:rn,label:"Saved sections"}),ie.map(D=>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:D.label}),D.sections.map(Z=>{const ae=p?.collection==="sections"&&p.key===Z.key;return o.jsx(jt,{icon:rn,accent:"global",title:Z.name,subtitle:D.label,active:ae,onClick:()=>y({collection:"sections",key:Z.key}),menu:o.jsx(us,{onDuplicate:()=>T(Z),onRename:()=>w(Z),onDelete:()=>_(Z)})},Z.key)})]},D.label))]}),ne.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(oa,{icon:Co,label:"Available sections",className:je(ie.length>0&&"mt-3")}),ne.map(D=>{const Z=p?.collection==="available-section"&&p.resolveType===D.resolveType,ae=D.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(jt,{icon:Co,title:D.title,subtitle:ae??D.resolveType,active:Z,onClick:()=>y({collection:"available-section",resolveType:D.resolveType,title:D.title})},D.resolveType)})]})]}):s==="apps"?fe.length===0?o.jsx(Os,{hasItems:c.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):fe.map(D=>{const Z=p?.collection==="apps"&&D.blockKey!==null&&p.key===D.blockKey||p?.collection==="available-app"&&p.id===D.id,ae=d===D.id;return o.jsx(jt,{icon:oo,logoUrl:D.logo,title:D.title,subtitle:D.category,active:Z,trailing:D.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"}):ae?o.jsx(mt,{className:"size-3.5 shrink-0 text-muted-foreground"}):D.installable&&l?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:()=>y(D.installed&&D.blockKey?{collection:"apps",key:D.blockKey}:{collection:"available-app",id:D.id})},D.id)}):s==="redirects"?L.length===0?o.jsx(Os,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):L.map(D=>o.jsx(jt,{icon:ja,title:D.from||"(no source)",subtitle:`→ ${D.to||"(no target)"}`,active:p?.collection==="redirects"&&p.key===D.key,trailing:o.jsx(Dd,{redirect:D}),onClick:()=>y({collection:"redirects",key:D.key}),menu:o.jsx(us,{onDelete:()=>O(D)})},D.key)):ue.length===0?o.jsx(Os,{hasItems:u.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${ds(s)?zs[s]:"item"}.`}):te.map(D=>{const{entry:Z,depth:ae}=D,ye=p?.collection===Z.kind&&p.key===Z.key;return o.jsx("div",{style:{paddingLeft:ae*16},children:o.jsx(jt,{icon:Z.kind==="posts"?wa:Z.kind==="authors"?Aa:Sa,title:Z.label,invalid:Z.missing.length>0,invalidReason:Z.missing.length>0?k("sandbox.itemRow.missingFields",{fields:Zd(Z.missing,k)}):void 0,warning:Z.duplicateName,warningReason:k("sandbox.itemRow.duplicateName"),subtitle:ae>0?zi(Z.slug??"",ue).map(hm).join(" / "):Z.subtitle,active:ye,onClick:()=>y({collection:Z.kind,key:Z.key}),menu:o.jsx(us,{onDuplicate:()=>B(Z),onDelete:()=>K(Z)})})},Z.key)}),e[0]=s,e[1]=c,e[2]=r,e[3]=u,e[4]=l,e[5]=g,e[6]=d,e[7]=S,e[8]=j,e[9]=K,e[10]=C,e[11]=O,e[12]=_,e[13]=B,e[14]=E,e[15]=T,e[16]=b,e[17]=x,e[18]=w,e[19]=f,e[20]=y,e[21]=v,e[22]=n,e[23]=a,e[24]=m,e[25]=i,e[26]=p,e[27]=k,e[28]=z,e[29]=P,e[30]=I,e[31]=U,e[32]=q,e[33]=Y}else z=e[28],P=e[29],I=e[30],U=e[31],q=e[32],Y=e[33];let Q;e[48]!==P||e[49]!==I?(Q=o.jsx("div",{className:P,children:I}),e[48]=P,e[49]=I,e[50]=Q):Q=e[50];let A;e[51]!==z||e[52]!==U||e[53]!==Q?(A=o.jsx(z,{className:U,children:Q}),e[51]=z,e[52]=U,e[53]=Q,e[54]=A):A=e[54];let G;return e[55]!==q||e[56]!==Y||e[57]!==A?(G=o.jsxs("div",{className:q,children:[Y,A]}),e[55]=q,e[56]=Y,e[57]=A,e[58]=G):G=e[58],G}function hm(t){return t.slug}function xm(t){return{entry:t,depth:0}}function Jg(t){const e=ce.c(25),{virtualMcpId:s}=t,n=Ee(),[a,i]=F.useState(!1),r=Fa(s),{connection:c}=gr(s),{activeTask:l}=eo();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=ga(d);if(!(_o(r?.metadata)||_o(l?.metadata))&&!c){let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(Do,{className:"size-7 text-foreground"})}),e[1]=f):f=e[1];let p;e[2]!==n?(p=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=p):p=e[3];let y;e[4]!==n?(y=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=y):y=e[5];let j,E;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>i(!0),E=o.jsx(Do,{className:"size-4"}),e[6]=j,e[7]=E):(j=e[6],E=e[7]);let x;e[8]!==n?(x=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=x):x=e[9];let S;e[10]!==x?(S=o.jsxs(De,{onClick:j,children:[E,x]}),e[10]=x,e[11]=S):S=e[11];let C;e[12]!==p||e[13]!==y||e[14]!==S?(C=o.jsx(jc,{className:"h-full",image:f,title:p,description:y,actions:S}),e[12]=p,e[13]=y,e[14]=S,e[15]=C):C=e[15];let b;e[16]!==a?(b=o.jsx(wc,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=b):b=e[17];let v;return e[18]!==b||e[19]!==C?(v=o.jsxs(o.Fragment,{children:[C,b]}),e[18]=b,e[19]=C,e[20]=v):v=e[20],v}let m;return e[21]!==u.contentPageId||e[22]!==u.contentPath||e[23]!==u.contentPathTemplate?(m=o.jsx(Ml,{children:o.jsx(fm,{deepLinkPage:{pageId:u.contentPageId,path:u.contentPath,pathTemplate:u.contentPathTemplate}})}),e[21]=u.contentPageId,e[22]=u.contentPath,e[23]=u.contentPathTemplate,e[24]=m):m=e[24],m}export{Wo as $,Gg as A,Ud as B,Jg as C,fu as D,Ug as E,Yg as F,gu as G,Cg as H,ap as I,qg as J,Bi as K,bi as L,ai as M,Cs as N,$g as O,po as P,Pu as Q,Hg as R,ju as S,Og as T,Bg as U,Nu as V,Nn as W,Eu as X,Bd as Y,Rd as Z,$d as _,ou as a,Od as a0,tt as a1,Ld as a2,_g as a3,Ag as a4,Dg as a5,Rg as a6,yu as a7,vu as a8,Au as a9,Vg as aA,mn as aB,Ng as aa,Du as ab,fo as ac,Pg as ad,vi as ae,ki as af,ot as ag,Ig as ah,Tg as ai,pn as aj,Eg as ak,Lg as al,Gs as am,Hn as an,fn as ao,Kg as ap,Fg as aq,au as ar,Xg as as,xf as at,Fi as au,lu as av,Ju as aw,gi as ax,wg as ay,Sg as az,En as b,pt as c,jg as d,Zd as e,na as f,ps as g,zg as h,ht as i,Pi as j,_i as k,di as l,Tn as m,yd as n,Mg as o,Ds as p,hn as q,kg as r,cu as s,li as t,Ga as u,Qg as v,xu as w,ji as x,Wg as y,vg as z};
25
+ `),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 Ep({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?_i(a,s):Pi(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const Xo="__all__",Qo={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},Pp={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},Jo="status:";function Zo(t){if(!t.startsWith(Jo))return null;const e=t.slice(Jo.length);return po.includes(e)?e:null}const ea=F.forwardRef(function(e,s){const n=ce.c(20);let a,i,r,c,l;n[0]!==e?({icon:a,active:i,value:l,className:r,...c}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=c,n[5]=l):(a=n[1],i=n[2],r=n[3],c=n[4],l=n[5]);const d=i?"text-foreground":"text-muted-foreground";let u;n[6]!==r||n[7]!==d?(u=je("gap-1 px-1.5 text-xs",d,r),n[6]=r,n[7]=d,n[8]=u):u=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 m;n[11]!==l?(m=l&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:l}),n[11]=l,n[12]=m):m=n[12];let f;n[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(Us,{size:12,className:"shrink-0 opacity-60"}),n[13]=f):f=n[13];let p;return n[14]!==c||n[15]!==s||n[16]!==u||n[17]!==g||n[18]!==m?(p=o.jsxs(De,{ref:s,type:"button",variant:"ghost",size:"sm",className:u,...c,children:[g,m,f]}),n[14]=c,n[15]=s,n[16]=u,n[17]=g,n[18]=m,n[19]=p):p=n[19],p});function ho(t){const e=ce.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 Ap(t){const e=ce.c(19),{value:s,onChange:n}=t,a=Ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=m=>n(m.target.value),e[1]=n,e[2]=r):r=e[2];let c;e[3]!==a?(c=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==a?(l=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=l):l=e[6];let d;e[7]!==r||e[8]!==c||e[9]!==l||e[10]!==s?(d=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:c,"aria-label":l,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=c,e[9]=l,e[10]=s,e[11]=d):d=e[11];let u;e[12]!==n||e[13]!==a||e[14]!==s?(u=s&&o.jsx(Li,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=u):u=e[15];let g;return e[16]!==d||e[17]!==u?(g=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,d,u]}),e[16]=d,e[17]=u,e[18]=g):g=e[18],g}function _p(t){const e=ce.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:c,sort:l,onCategoryFilterChange:d,onAuthorFilterChange:u,onStatusFilterChange:g,onSortChange:m}=t,f=Ee();let p;if(e[0]!==s||e[1]!==i){let J;e[3]!==i?(J=D=>D.slug===i,e[3]=i,e[4]=J):J=e[4],p=s.find(J),e[0]=s,e[1]=i,e[2]=p}else p=e[2];const y=p;let j;if(e[5]!==r||e[6]!==n){let J;e[8]!==r?(J=D=>D.email===r,e[8]=r,e[9]=J):J=e[9],j=n.find(J),e[5]=r,e[6]=n,e[7]=j}else j=e[7];const E=j,x=!!(i||r||c);let S;e[10]!==E?.name||e[11]!==y?.name||e[12]!==c||e[13]!==f?(S=y?.name??E?.name??f(c?hn[c]:"sandbox.postToolbar.filterLabel"),e[10]=E?.name,e[11]=y?.name,e[12]=c,e[13]=f,e[14]=S):S=e[14];const C=S,b=i?`cat:${i}`:r?`author:${r}`:c?`status:${c}`:Xo;let v;e[15]!==u||e[16]!==d||e[17]!==g?(v=()=>{d(null),u(null),g(null)},e[15]=u,e[16]=d,e[17]=g,e[18]=v):v=e[18];const T=v;let w;e[19]!==T||e[20]!==u||e[21]!==d||e[22]!==g?(w=J=>{J.startsWith("cat:")?(u(null),g(null),d(J.slice(4))):J.startsWith("author:")?(d(null),g(null),u(J.slice(7))):Zo(J)?(d(null),u(null),g(Zo(J))):T()},e[19]=T,e[20]=u,e[21]=d,e[22]=g,e[23]=w):w=e[23];const _=w;let O;e[24]!==C||e[25]!==x?(O=o.jsx(nn,{asChild:!0,children:o.jsx(ea,{icon:Wl,active:x,value:C,className:"min-w-0 shrink"})}),e[24]=C,e[25]=x,e[26]=O):O=e[26];let B;e[27]!==f?(B=f("sandbox.postToolbar.filterBy"),e[27]=f,e[28]=B):B=e[28];let K;e[29]!==B?(K=o.jsx($s,{children:B}),e[29]=B,e[30]=K):K=e[30];let k;e[31]!==f?(k=f("sandbox.postToolbar.allPosts"),e[31]=f,e[32]=k):k=e[32];let z;e[33]!==k?(z=o.jsx(Fs,{value:Xo,children:k}),e[33]=k,e[34]=z):z=e[34];let P;e[35]!==f?(P=f("sandbox.postToolbar.statusLabel"),e[35]=f,e[36]=P):P=e[36];let I;e[37]!==P?(I=o.jsx($s,{className:"text-muted-foreground/70",children:P}),e[37]=P,e[38]=I):I=e[38];let U;e[39]!==a||e[40]!==f?(U=po.map(J=>o.jsxs(Fs,{value:`status:${J}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:f(hn[J])}),o.jsx(ho,{count:a[J]??0})]},`status:${J}`)),e[39]=a,e[40]=f,e[41]=U):U=e[41];let q;e[42]!==s.length||e[43]!==f?(q=s.length>0&&o.jsx($s,{className:"text-muted-foreground/70",children:f("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=f,e[44]=q):q=e[44];let Y;e[45]!==s?(Y=s.map(Bp),e[45]=s,e[46]=Y):Y=e[46];let Q;e[47]!==n.length||e[48]!==f?(Q=n.length>0&&o.jsx($s,{className:"text-muted-foreground/70",children:f("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=f,e[49]=Q):Q=e[49];let A;e[50]!==n?(A=n.map(Dp),e[50]=n,e[51]=A):A=e[51];let G;e[52]!==b||e[53]!==_||e[54]!==z||e[55]!==I||e[56]!==U||e[57]!==q||e[58]!==Y||e[59]!==Q||e[60]!==A?(G=o.jsxs(jo,{value:b,onValueChange:_,children:[z,I,U,q,Y,Q,A]}),e[52]=b,e[53]=_,e[54]=z,e[55]=I,e[56]=U,e[57]=q,e[58]=Y,e[59]=Q,e[60]=A,e[61]=G):G=e[61];let $;e[62]!==G||e[63]!==K?($=o.jsxs(on,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[K,G]}),e[62]=G,e[63]=K,e[64]=$):$=e[64];let N;e[65]!==$||e[66]!==O?(N=o.jsxs(an,{children:[O,$]}),e[65]=$,e[66]=O,e[67]=N):N=e[67];let L;e[68]!==T||e[69]!==x||e[70]!==f?(L=x&&o.jsx(Li,{label:f("sandbox.postToolbar.clearFilter"),onClick:T}),e[68]=T,e[69]=x,e[70]=f,e[71]=L):L=e[71];const de=Pp[l];let ne;e[72]!==f||e[73]!==de?(ne=f(de),e[72]=f,e[73]=de,e[74]=ne):ne=e[74];let ie;e[75]!==ne?(ie=o.jsx(nn,{asChild:!0,children:o.jsx(ea,{icon:ql,active:!0,value:ne})}),e[75]=ne,e[76]=ie):ie=e[76];let fe;e[77]!==f?(fe=f("sandbox.postToolbar.sortBy"),e[77]=f,e[78]=fe):fe=e[78];let ue;e[79]!==fe?(ue=o.jsx($s,{children:fe}),e[79]=fe,e[80]=ue):ue=e[80];let te;e[81]!==m?(te=J=>m(J),e[81]=m,e[82]=te):te=e[82];let le;e[83]===Symbol.for("react.memo_cache_sentinel")?(le=Object.keys(Qo),e[83]=le):le=e[83];let oe;e[84]!==f?(oe=le.map(J=>o.jsx(Fs,{value:J,children:f(Qo[J])},J)),e[84]=f,e[85]=oe):oe=e[85];let be;e[86]!==l||e[87]!==te||e[88]!==oe?(be=o.jsx(jo,{value:l,onValueChange:te,children:oe}),e[86]=l,e[87]=te,e[88]=oe,e[89]=be):be=e[89];let M;e[90]!==ue||e[91]!==be?(M=o.jsxs(on,{align:"end",className:"w-44",children:[ue,be]}),e[90]=ue,e[91]=be,e[92]=M):M=e[92];let re;e[93]!==ie||e[94]!==M?(re=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(an,{children:[ie,M]})}),e[93]=ie,e[94]=M,e[95]=re):re=e[95];let me;return e[96]!==N||e[97]!==L||e[98]!==re?(me=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[N,L,re]}),e[96]=N,e[97]=L,e[98]=re,e[99]=me):me=e[99],me}function Dp(t){return o.jsxs(Fs,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(ho,{count:t.count})]},`author:${t.email}`)}function Bp(t){return o.jsxs(Fs,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(ho,{count:t.count})]},`cat:${t.slug}`)}function Li(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Qn,{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 Rp(t){const e=ce.c(18),{checked:s,disabled:n,onToggle:a}=t,i=Ee();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let c;e[2]!==s||e[3]!==i?(c=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=c):c=e[4];let l;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==c?(l=o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:$p,children:o.jsx(jn,{checked:s,disabled:n,onCheckedChange:r,"aria-label":c})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=c,e[9]=l):l=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 u;e[13]!==d?(u=o.jsx(St,{side:"bottom",children:d}),e[13]=d,e[14]=u):u=e[14];let g;return e[15]!==l||e[16]!==u?(g=o.jsxs(Ct,{children:[l,u]}),e[15]=l,e[16]=u,e[17]=g):g=e[17],g}function $p(t){return t.stopPropagation()}function Op(t){const e=ce.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,c=Ee();let l;e[0]!==n||e[1]!==a?(l=o.jsx(Rp,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=l):l=e[2];let d;e[3]!==s||e[4]!==c?(d=c("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==d?(u=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:d}),e[6]=d,e[7]=u):u=e[7];const g=s===0;let m;e[8]!==c?(m=c("sandbox.postToolbar.archiveSelectedPosts"),e[8]=c,e[9]=m):m=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(el,{size:14}),e[10]=f):f=e[10];let p;e[11]!==i||e[12]!==g||e[13]!==m?(p=o.jsx(wt,{asChild:!0,children:o.jsx(De,{type:"button",variant:"ghost",size:"icon-sm",disabled:g,onClick:i,"aria-label":m,children:f})}),e[11]=i,e[12]=g,e[13]=m,e[14]=p):p=e[14];let y;e[15]!==c?(y=c("sandbox.postToolbar.archiveSelected"),e[15]=c,e[16]=y):y=e[16];let j;e[17]!==y?(j=o.jsx(St,{side:"bottom",children:y}),e[17]=y,e[18]=j):j=e[18];let E;e[19]!==p||e[20]!==j?(E=o.jsxs(Ct,{children:[p,j]}),e[19]=p,e[20]=j,e[21]=E):E=e[21];let x;e[22]!==c?(x=c("sandbox.postToolbar.exitSelection"),e[22]=c,e[23]=x):x=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Qn,{size:14}),e[24]=S):S=e[24];let C;e[25]!==r||e[26]!==x?(C=o.jsx(wt,{asChild:!0,children:o.jsx(De,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":x,children:S})}),e[25]=r,e[26]=x,e[27]=C):C=e[27];let b;e[28]!==c?(b=c("sandbox.postToolbar.exitSelection"),e[28]=c,e[29]=b):b=e[29];let v;e[30]!==b?(v=o.jsx(St,{side:"bottom",children:b}),e[30]=b,e[31]=v):v=e[31];let T;e[32]!==C||e[33]!==v?(T=o.jsxs(Ct,{children:[C,v]}),e[32]=C,e[33]=v,e[34]=T):T=e[34];let w;e[35]!==E||e[36]!==T?(w=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[E,T]}),e[35]=E,e[36]=T,e[37]=w):w=e[37];let _;return e[38]!==l||e[39]!==w||e[40]!==u?(_=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[l,u,w]}),e[38]=l,e[39]=w,e[40]=u,e[41]=_):_=e[41],_}const Lp={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},Wn="generating",Ip=[Wn,...po.filter(t=>t!==Wn)],ta=t=>t.scheduledDatetime||t.date||"",Kp=(t,e)=>ta(e).localeCompare(ta(t)),Fp=t=>t==="scheduled"||t==="published",Ii="application/x-post-key";function zp(t){const e=ce.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:c,onViewChange:l,onOpen:d,onClose:u,move:g,meta:m,renderDetail:f}=t,p=Ee();let y;e[0]!==a||e[1]!==s||e[2]!==n?(y={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=y):y=e[3];const j=vn(y),E=hc().length>0,x=Ga(),S=Bi(),[C,b]=F.useState(null),[v,T]=F.useState(!1),[w,_]=F.useState(!1),[O,B]=F.useState(!1),[K,k]=F.useState(""),z=F.useRef(null);let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P={},e[4]=P):P=e[4];const[I,U]=F.useState(P);let q;e[5]!==I?(q=(H,pe)=>I[H]??pe,e[5]=I,e[6]=q):q=e[6];const Y=q;let Q;e[7]===Symbol.for("react.memo_cache_sentinel")?(Q=(H,pe)=>U(Le=>({...Le,[H]:pe})),e[7]=Q):Q=e[7];const A=Q;let G;e[8]!==d?(G=H=>{const pe=H[0];pe&&d(pe)},e[8]=d,e[9]=G):G=e[9];let $;e[10]!==a||e[11]!==i||e[12]!==m||e[13]!==s||e[14]!==G||e[15]!==n?($={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:m,onStarted:G},e[10]=a,e[11]=i,e[12]=m,e[13]=s,e[14]=G,e[15]=n,e[16]=$):$=e[16];const N=fp($),L=au(i);let de;e[17]!==i?(de=H=>ps(i[H],"posts"),e[17]=i,e[18]=de):de=e[18];const ne=de,ie=c&&L.some(H=>H.key===c)?c:L[0]?.key??null;let fe;e[19]!==g||e[20]!==p?(fe=async H=>{await g.apply(H.key,"archived")&&ke.success(p("sandbox.postBoard.archived"))},e[19]=g,e[20]=p,e[21]=fe):fe=e[21];const ue=fe,[te,le]=F.useState(null),[oe,be]=F.useState(null),[M,re]=F.useState(null),[me,J]=F.useState("date-desc"),[D,Z]=F.useState("");let ae;e[22]===Symbol.for("react.memo_cache_sentinel")?(ae=new Set,e[22]=ae):ae=e[22];const[ye,Se]=F.useState(ae),_e=L.reduce(Hp,{}),we=H=>{const pe=new Map;for(const Le of L)for(const ut of H(Le))pe.set(ut,(pe.get(ut)??0)+1);return pe},Be=we(Gp),W=we(Up),se=ht(i,"categories").map(H=>{const{payload:pe}=H;return{slug:pt(pe.slug),name:pt(pe.name)||pt(pe.slug),count:Be.get(pt(pe.slug))??0}}),he=ht(i,"authors").map(H=>{const{payload:pe}=H;return{email:pt(pe.email),name:pt(pe.name)||pt(pe.email),count:W.get(pt(pe.email))??0}}),xe=D.trim().toLowerCase();let Re;e[23]!==te?(Re=H=>!te||H.categorySlugs.includes(te),e[23]=te,e[24]=Re):Re=e[24];let Ke;e[25]!==oe?(Ke=H=>!oe||H.authorEmails.includes(oe),e[25]=oe,e[26]=Ke):Ke=e[26];let Ge;e[27]!==M?(Ge=H=>!M||H.status===M,e[27]=M,e[28]=Ge):Ge=e[28];let $e;e[29]!==me?($e=(H,pe)=>{if(me==="az")return H.title.localeCompare(pe.title);if(me==="za")return pe.title.localeCompare(H.title);const Le=(H.scheduledDatetime||H.date).localeCompare(pe.scheduledDatetime||pe.date);return me==="date-asc"?Le:-Le},e[29]=me,e[30]=$e):$e=e[30];const qe=L.filter(Re).filter(Ke).filter(Ge).filter(H=>!xe||H.title.toLowerCase().includes(xe)||H.slug.toLowerCase().includes(xe)).sort($e),Nt=ye.size>0;let Pe;e[31]===Symbol.for("react.memo_cache_sentinel")?(Pe=H=>Se(pe=>{const Le=new Set(pe);return Le.delete(H)||Le.add(H),Le}),e[31]=Pe):Pe=e[31];const st=Pe,it=()=>Se(H=>qe.every(pe=>H.has(pe.key))?new Set:new Set(qe.map(Vp)));let Ie;e[32]!==g||e[33]!==ye||e[34]!==p?(Ie=async()=>{let H=0;for(const pe of ye)await g.apply(pe,"archived")&&(H=H+1);Se(new Set),H>0&&ke.success(p("sandbox.postBoard.archived"))},e[32]=g,e[33]=ye,e[34]=p,e[35]=Ie):Ie=e[35];const X=Ie;let Ne;e[36]!==g?(Ne=(H,pe)=>{b(null),g.apply(pe,H)},e[36]=g,e[37]=Ne):Ne=e[37];const Ce=Ne;let Oe;e[38]!==d||e[39]!==j?(Oe=()=>{const H=un(Gn()),pe=fi({title:"",now:new Date});j.mutate({blockKey:H,data:fs(H,pe)}),d(H)},e[38]=d,e[39]=j,e[40]=Oe):Oe=e[40];const He=Oe,Ft=()=>{const H=gp(K),pe=Tp(H.sections,fo(m,{hideDefaults:S}));if(pe.length===0&&!H.title.trim()){ke.error(p("sandbox.postBoard.importEmpty"));return}const Le=un(Gn()),ut=Ep({title:H.title,blocks:pe,takenSlugs:L.map(Mp).filter(Boolean),now:new Date});j.mutate({blockKey:Le,data:fs(Le,ut)}),B(!1),k(""),ke.success(p("sandbox.postBoard.imported")),d(Le)},Jt=r==="list";let Ye;e[41]!==l?(Ye=()=>l("list"),e[41]=l,e[42]=Ye):Ye=e[42];let zt;e[43]===Symbol.for("react.memo_cache_sentinel")?(zt=o.jsx(sr,{size:14}),e[43]=zt):zt=e[43];let Fe;e[44]!==p?(Fe=p("sandbox.postBoard.viewList"),e[44]=p,e[45]=Fe):Fe=e[45];let Ue;e[46]!==Jt||e[47]!==Ye||e[48]!==Fe?(Ue=o.jsx(sa,{active:Jt,onClick:Ye,icon:zt,label:Fe}),e[46]=Jt,e[47]=Ye,e[48]=Fe,e[49]=Ue):Ue=e[49];const Bs=r==="board";let Tt;e[50]!==l?(Tt=()=>l("board"),e[50]=l,e[51]=Tt):Tt=e[51];let Zt;e[52]===Symbol.for("react.memo_cache_sentinel")?(Zt=o.jsx(Xl,{size:14}),e[52]=Zt):Zt=e[52];let Et;e[53]!==p?(Et=p("sandbox.postBoard.viewBoard"),e[53]=p,e[54]=Et):Et=e[54];let bt;e[55]!==Bs||e[56]!==Tt||e[57]!==Et?(bt=o.jsx(sa,{active:Bs,onClick:Tt,icon:Zt,label:Et}),e[55]=Bs,e[56]=Tt,e[57]=Et,e[58]=bt):bt=e[58];let es;e[59]!==Ue||e[60]!==bt?(es=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:[Ue,bt]})}),e[59]=Ue,e[60]=bt,e[61]=es):es=e[61];let ts;e[62]===Symbol.for("react.memo_cache_sentinel")?(ts=o.jsx(kn,{size:14}),e[62]=ts):ts=e[62];let Xe;e[63]!==p?(Xe=p("sandbox.postBoard.newPost"),e[63]=p,e[64]=Xe):Xe=e[64];let ss;e[65]===Symbol.for("react.memo_cache_sentinel")?(ss=o.jsx(Us,{size:14}),e[65]=ss):ss=e[65];let lt;e[66]!==Xe?(lt=o.jsx(nn,{asChild:!0,children:o.jsxs(De,{type:"button",size:"sm",children:[ts,Xe,ss]})}),e[66]=Xe,e[67]=lt):lt=e[67];let Mt;e[68]!==x||e[69]!==p?(Mt=x&&o.jsxs(Ot,{onClick:()=>_(!0),children:[o.jsx(cn,{size:14}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{children:p("sandbox.postBoard.newPostGenerate")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:p("sandbox.postBoard.newPostGenerateHint")})]})]}),e[68]=x,e[69]=p,e[70]=Mt):Mt=e[70];let yt;e[71]===Symbol.for("react.memo_cache_sentinel")?(yt=o.jsx(tr,{size:14}),e[71]=yt):yt=e[71];let Qe;e[72]!==p?(Qe=p("sandbox.postBoard.newPostWrite"),e[72]=p,e[73]=Qe):Qe=e[73];let Pt;e[74]!==Qe?(Pt=o.jsx("span",{children:Qe}),e[74]=Qe,e[75]=Pt):Pt=e[75];let Vt;e[76]!==p?(Vt=p("sandbox.postBoard.newPostWriteHint"),e[76]=p,e[77]=Vt):Vt=e[77];let At;e[78]!==Vt?(At=o.jsx("span",{className:"text-xs text-muted-foreground",children:Vt}),e[78]=Vt,e[79]=At):At=e[79];let vt;e[80]!==Pt||e[81]!==At?(vt=o.jsxs("div",{className:"flex flex-col",children:[Pt,At]}),e[80]=Pt,e[81]=At,e[82]=vt):vt=e[82];let Ut;e[83]!==vt||e[84]!==He?(Ut=o.jsxs(Ot,{onClick:He,children:[yt,vt]}),e[83]=vt,e[84]=He,e[85]=Ut):Ut=e[85];let hs,ns;e[86]===Symbol.for("react.memo_cache_sentinel")?(hs=()=>B(!0),ns=o.jsx(Rn,{size:14}),e[86]=hs,e[87]=ns):(hs=e[86],ns=e[87]);let Gt;e[88]!==p?(Gt=p("sandbox.postBoard.importContent"),e[88]=p,e[89]=Gt):Gt=e[89];let Ht;e[90]!==Gt?(Ht=o.jsx("span",{children:Gt}),e[90]=Gt,e[91]=Ht):Ht=e[91];let Ve;e[92]!==p?(Ve=p("sandbox.postBoard.importContentHint"),e[92]=p,e[93]=Ve):Ve=e[93];let _t;e[94]!==Ve?(_t=o.jsx("span",{className:"text-xs text-muted-foreground",children:Ve}),e[94]=Ve,e[95]=_t):_t=e[95];let Dt;e[96]!==Ht||e[97]!==_t?(Dt=o.jsxs(Ot,{onClick:hs,children:[ns,o.jsxs("div",{className:"flex flex-col",children:[Ht,_t]})]}),e[96]=Ht,e[97]=_t,e[98]=Dt):Dt=e[98];let rt;e[99]!==Mt||e[100]!==Ut||e[101]!==Dt?(rt=o.jsxs(on,{align:"end",className:"w-56",children:[Mt,Ut,Dt]}),e[99]=Mt,e[100]=Ut,e[101]=Dt,e[102]=rt):rt=e[102];let os;e[103]!==lt||e[104]!==rt?(os=o.jsxs(an,{children:[lt,rt]}),e[103]=lt,e[104]=rt,e[105]=os):os=e[105];let Je;e[106]!==x||e[107]!==i||e[108]!==w||e[109]!==N||e[110]!==E?(Je=x&&o.jsx(cp,{open:w,onOpenChange:_,decofile:i,hasAi:E,onGenerate:H=>{N(H)}}),e[106]=x,e[107]=i,e[108]=w,e[109]=N,e[110]=E,e[111]=Je):Je=e[111];let kt;e[112]!==p?(kt=p("sandbox.postBoard.importTitle"),e[112]=p,e[113]=kt):kt=e[113];let ct;e[114]!==kt?(ct=o.jsx(Es,{children:kt}),e[114]=kt,e[115]=ct):ct=e[115];let dt;e[116]!==p?(dt=p("sandbox.postBoard.importDescription"),e[116]=p,e[117]=dt):dt=e[117];let Ze;e[118]!==dt?(Ze=o.jsx(Xn,{children:dt}),e[118]=dt,e[119]=Ze):Ze=e[119];let xs;e[120]!==ct||e[121]!==Ze?(xs=o.jsxs(Ys,{children:[ct,Ze]}),e[120]=ct,e[121]=Ze,e[122]=xs):xs=e[122];const as=Ri(K)?"html":"markdown";let is;e[123]===Symbol.for("react.memo_cache_sentinel")?(is=H=>k(H??""),e[123]=is):is=e[123];let Yt;e[124]!==K||e[125]!==as?(Yt=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(Ua,{code:K,language:as,height:"100%",autoFocus:!0,onChange:is})}),e[124]=K,e[125]=as,e[126]=Yt):Yt=e[126];let ls;e[127]===Symbol.for("react.memo_cache_sentinel")?(ls=o.jsx("input",{ref:z,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async H=>{const pe=H.target.files?.[0];pe&&k(await pe.text()),H.target.value=""}}),e[127]=ls):ls=e[127];let bs,ys;e[128]===Symbol.for("react.memo_cache_sentinel")?(bs=()=>z.current?.click(),ys=o.jsx(Rn,{size:14}),e[128]=bs,e[129]=ys):(bs=e[128],ys=e[129]);let Bt;e[130]!==p?(Bt=p("sandbox.postBoard.importUpload"),e[130]=p,e[131]=Bt):Bt=e[131];let Rt;e[132]!==Bt?(Rt=o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:bs,children:[ys,Bt]}),e[132]=Bt,e[133]=Rt):Rt=e[133];let rs;e[134]!==Yt||e[135]!==Rt?(rs=o.jsxs("div",{className:"space-y-3",children:[Yt,ls,Rt]}),e[134]=Yt,e[135]=Rt,e[136]=rs):rs=e[136];let vs;e[137]!==K?(vs=K.trim(),e[137]=K,e[138]=vs):vs=e[138];let ks;e[139]===Symbol.for("react.memo_cache_sentinel")?(ks=o.jsx(Rn,{size:14}),e[139]=ks):ks=e[139];let js;e[140]!==p?(js=p("sandbox.postBoard.importRun"),e[140]=p,e[141]=js):js=e[141];let ws;e[142]!==v||e[143]!==u||e[144]!==f||e[145]!==c||e[146]!==r?(ws=r==="board"&&c&&v&&f&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:f(c,{expanded:!0,onToggleExpand:()=>T(!1),onClose:()=>{T(!1),u?.()}})}),e[142]=v,e[143]=u,e[144]=f,e[145]=c,e[146]=r,e[147]=ws):ws=e[147];const Rs=r==="board"&&!!c&&!v;let Wt;e[148]!==u?(Wt=H=>{H||(T(!1),u?.())},e[148]=u,e[149]=Wt):Wt=e[149];let $t;e[150]!==p?($t=p("sandbox.collectionsSidebar.posts"),e[150]=p,e[151]=$t):$t=e[151];let qt;e[152]!==$t?(qt=o.jsx(Es,{className:"sr-only",children:$t}),e[152]=$t,e[153]=qt):qt=e[153];let Xt;e[154]!==u||e[155]!==f||e[156]!==c?(Xt=c&&f?o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Mn,{size:20,className:"animate-spin text-muted-foreground"})}),children:f(c,{expanded:!1,onToggleExpand:()=>T(!0),onClose:()=>u?.()})}):null,e[154]=u,e[155]=f,e[156]=c,e[157]=Xt):Xt=e[157];let Qt;e[158]!==qt||e[159]!==Xt?(Qt=o.jsxs(Ps,{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:[qt,Xt]}),e[158]=qt,e[159]=Xt,e[160]=Qt):Qt=e[160];let Ss;return e[161]!==Rs||e[162]!==Wt||e[163]!==Qt?(Ss=o.jsx(As,{open:Rs,onOpenChange:Wt,children:Qt}),e[161]=Rs,e[162]=Wt,e[163]=Qt,e[164]=Ss):Ss=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:[es,o.jsxs("div",{className:"flex items-center gap-2",children:[os,Je,o.jsx(As,{open:O,onOpenChange:B,children:o.jsxs(Ps,{className:"max-h-[85vh] sm:max-w-2xl",children:[xs,rs,o.jsx(Ws,{children:o.jsxs(De,{type:"button",disabled:!vs,onClick:Ft,children:[ks,js]})})]})})]})]}),L.length===0?o.jsx(gc,{className:"flex-1",icon:o.jsx(cn,{size:22}),title:p("sandbox.postBoard.emptyTitle"),description:p("sandbox.postBoard.emptyDescription"),buttonProps:{children:p("sandbox.postBoard.newPost"),onClick:He}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:Ip.map(H=>{const pe=p(hn[H]),Le=L.filter(ze=>ze.status===H);Fp(H)&&Le.sort(Kp);const ut=Y(H,Le.length===0);return o.jsxs(F.Fragment,{children:[o.jsx("div",{onDragOver:ze=>{ze.preventDefault(),b(H)},onDragLeave:()=>b(ze=>ze===H?null:ze),onDrop:ze=>{ze.preventDefault(),Ce(H,ze.dataTransfer.getData(Ii))},className:je("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",ut?"w-11":"w-72",C===H&&"border-primary bg-primary/5"),children:ut?o.jsxs("button",{type:"button",onClick:()=>A(H,!1),"aria-label":p("sandbox.postBoard.expandLane",{lane:pe}),"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(ln,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:Le.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:pe})]}):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:()=>A(H,!0),"aria-label":p("sandbox.postBoard.collapseLane",{lane:pe}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(Us,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:pe})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:Le.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:Le.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.postBoard.laneEmpty")}):Le.map(ze=>o.jsx(qp,{post:ze,payload:ne(ze.key),moving:g.isMoving(ze.key),onOpen:()=>d(ze.key),onArchive:ze.status==="archived"?void 0:()=>{ue(ze)}},ze.key))})]})}),H===Wn&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},H)})}):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(Ap,{value:D,onChange:Z}),Nt?o.jsx(Op,{count:ye.size,allSelected:qe.length>0&&qe.every(H=>ye.has(H.key)),onToggleSelectAll:it,onArchive:()=>{X()},onExit:()=>Se(new Set)}):o.jsx(_p,{categories:se,authors:he,statusCounts:_e,categoryFilter:te,authorFilter:oe,statusFilter:M,sort:me,onCategoryFilterChange:le,onAuthorFilterChange:be,onStatusFilterChange:re,onSortChange:J}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(Yp,{posts:qe,selectedKey:ie,selectionActive:Nt,selectedKeys:ye,onToggleSelect:st,onOpen:d,isMoving:g.isMoving,onArchive:H=>{ue(H)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:ie&&f?o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Mn,{size:20,className:"animate-spin text-muted-foreground"})}),children:f(ie)}):o.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:p("sandbox.postBoard.selectPrompt")})})]}),ws,Ss]})}function Mp(t){return t.slug}function Vp(t){return t.key}function Up(t){return t.authorEmails}function Gp(t){return t.categorySlugs}function Hp(t,e){return t[e.status]=(t[e.status]??0)+1,t}function sa(t){const e=ce.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 c;e[0]!==r?(c=je("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]=c):c=e[1];let l;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==c?(l=o.jsxs("button",{type:"button",onClick:n,className:c,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=c,e[6]=l):l=e[6],l}function Yp(t){const e=ce.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:c,isMoving:l,onArchive:d}=t,u=Ee();if(s.length===0){let f;e[0]!==u?(f=u("sandbox.postList.noMatches"),e[0]=u,e[1]=f):f=e[1];let p;return e[2]!==f?(p=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f}),e[2]=f,e[3]=p):p=e[3],p}let g;if(e[4]!==l||e[5]!==d||e[6]!==c||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let f;e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(f=p=>o.jsx(Wp,{post:p,selected:p.key===n,selectionActive:a,checked:i.has(p.key),onToggleSelect:()=>r(p.key),moving:l(p.key),onOpen:()=>c(p.key),onArchive:p.status==="archived"?void 0:()=>d(p)},p.key),e[13]=l,e[14]=d,e[15]=c,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=f):f=e[20],g=s.map(f),e[4]=l,e[5]=d,e[6]=c,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=g}else g=e[12];let m;return e[21]!==g?(m=o.jsx("ul",{className:"divide-y",children:g}),e[21]=g,e[22]=m):m=e[22],m}function Wp(t){const e=ce.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:c,onOpen:l,onArchive:d}=t,u=Ee(),g=s.status==="awaiting_review"&&s.missing.length>0,m=s.status==="scheduled"||s.status==="published",f=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let p;e[0]!==f?(p=je("absolute left-3 top-3 z-10 transition-opacity",f),e[0]=f,e[1]=p):p=e[1];let y;e[2]!==r?(y=()=>r(),e[2]=r,e[3]=y):y=e[3];let j;e[4]!==s.title||e[5]!==u?(j=s.title||u("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=u,e[6]=j):j=e[6];let E;e[7]!==i||e[8]!==y||e[9]!==j?(E=o.jsx(jn,{checked:i,onCheckedChange:y,"aria-label":j}),e[7]=i,e[8]=y,e[9]=j,e[10]=E):E=e[10];let x;e[11]!==p||e[12]!==E?(x=o.jsx("span",{className:p,children:E}),e[11]=p,e[12]=E,e[13]=x):x=e[13];let S;e[14]!==c||e[15]!==d||e[16]!==a?(S=d&&!a&&o.jsx(Ki,{onArchive:d,disabled:c,className:"top-2.5"}),e[14]=c,e[15]=d,e[16]=a,e[17]=S):S=e[17];let C;e[18]!==l||e[19]!==r||e[20]!==a?(C=()=>a?r():l(),e[18]=l,e[19]=r,e[20]=a,e[21]=C):C=e[21];const b=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let v;e[22]!==b?(v=je("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",b),e[22]=b,e[23]=v):v=e[23];let T;e[24]!==s.title||e[25]!==u?(T=s.title||u("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=u,e[26]=T):T=e[26];let w;e[27]!==T?(w=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:T}),e[27]=T,e[28]=w):w=e[28];const _=Lp[s.status],O=hn[s.status];let B;e[29]!==u||e[30]!==O?(B=u(O),e[29]=u,e[30]=O,e[31]=B):B=e[31];let K;e[32]!==_||e[33]!==B?(K=o.jsx(wn,{variant:_,className:"shrink-0",children:B}),e[32]=_,e[33]=B,e[34]=K):K=e[34];let k;e[35]!==g||e[36]!==s.missing?(k=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Vs,{size:12}),s.missing.length]}),e[35]=g,e[36]=s.missing,e[37]=k):k=e[37];let z;e[38]!==s.duplicateTitle||e[39]!==u?(z=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:u("sandbox.postBoard.duplicateTitle"),children:[o.jsx(so,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:u("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=u,e[40]=z):z=e[40];let P;e[41]!==m||e[42]!==s.date||e[43]!==s.scheduledDatetime?(P=m&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx(to,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=m,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=P):P=e[44];let I;e[45]!==K||e[46]!==k||e[47]!==z||e[48]!==P?(I=o.jsxs("div",{className:"flex items-center gap-2",children:[K,k,z,P]}),e[45]=K,e[46]=k,e[47]=z,e[48]=P,e[49]=I):I=e[49];let U;e[50]!==n||e[51]!==v||e[52]!==w||e[53]!==I||e[54]!==C?(U=o.jsxs("button",{type:"button",onClick:C,"aria-current":n,className:v,children:[w,I]}),e[50]=n,e[51]=v,e[52]=w,e[53]=I,e[54]=C,e[55]=U):U=e[55];let q;return e[56]!==U||e[57]!==x||e[58]!==S?(q=o.jsxs("li",{className:"group/row relative",children:[x,S,U]}),e[56]=U,e[57]=x,e[58]=S,e[59]=q):q=e[59],q}function qp(t){const e=ce.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,c=Ee(),l=s.status!=="generating"&&!a;let d;e[0]!==n?(d=nu(n),e[0]=n,e[1]=d):d=e[1];const u=d,g=!l&&"opacity-80";let m;e[2]!==g?(m=je("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",g),e[2]=g,e[3]=m):m=e[3];let f;e[4]!==a||e[5]!==r?(f=r&&o.jsx(Ki,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=f):f=e[6];let p;e[7]!==s.key?(p=B=>B.dataTransfer.setData(Ii,s.key),e[7]=s.key,e[8]=p):p=e[8];const y=l?"cursor-grab active:cursor-grabbing":"cursor-pointer";let j;e[9]!==y?(j=je("block w-full p-3 text-left",y),e[9]=y,e[10]=j):j=e[10];let E;e[11]!==s.title||e[12]!==c?(E=s.title||c("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=c,e[13]=E):E=e[13];let x;e[14]!==E?(x=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:E}),e[14]=E,e[15]=x):x=e[15];let S;e[16]!==u||e[17]!==s.status?(S=s.status==="draft"&&u.format?.name&&o.jsx(wn,{variant:"outline",className:"max-w-full truncate",children:u.format.name}),e[16]=u,e[17]=s.status,e[18]=S):S=e[18];let C;e[19]!==s.status||e[20]!==c?(C=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(Mn,{size:12,className:"animate-spin"}),c("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=c,e[21]=C):C=e[21];let b;e[22]!==s.missing||e[23]!==s.status||e[24]!==c?(b=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(Vs,{size:12}),c("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(mc,{size:12}),c("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=c,e[25]=b):b=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(to,{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 T;e[30]!==s.duplicateTitle||e[31]!==c?(T=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(so,{size:12,"aria-hidden":!0}),c("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=c,e[32]=T):T=e[32];let w;e[33]!==S||e[34]!==C||e[35]!==b||e[36]!==v||e[37]!==T?(w=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[S,C,b,v,T]}),e[33]=S,e[34]=C,e[35]=b,e[36]=v,e[37]=T,e[38]=w):w=e[38];let _;e[39]!==l||e[40]!==i||e[41]!==w||e[42]!==p||e[43]!==j||e[44]!==x?(_=o.jsxs("button",{type:"button",draggable:l,onDragStart:p,onClick:i,className:j,children:[x,w]}),e[39]=l,e[40]=i,e[41]=w,e[42]=p,e[43]=j,e[44]=x,e[45]=_):_=e[45];let O;return e[46]!==_||e[47]!==m||e[48]!==f?(O=o.jsxs("div",{className:m,children:[f,_]}),e[46]=_,e[47]=m,e[48]=f,e[49]=O):O=e[49],O}function Ki(t){const e=ce.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=Ee();let c;e[0]!==s||e[1]!==r?(c=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=c):c=e[2];const l=c;let d;e[3]!==n?(d=f=>{f.stopPropagation(),n()},e[3]=n,e[4]=d):d=e[4];let u;e[5]!==i?(u=je("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]=u):u=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(co,{className:"size-3.25"}),e[7]=g):g=e[7];let m;return e[8]!==a||e[9]!==d||e[10]!==u||e[11]!==l?(m=o.jsx(De,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":l,title:l,onClick:d,className:u,children:g}),e[8]=a,e[9]=d,e[10]=u,e[11]=l,e[12]=m):m=e[12],m}function jt(t){const e=ce.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:c,variantCount:l,trailing:d,selectable:u,selectionActive:g,selected:m,invalid:f,invalidReason:p,warning:y,warningReason:j,onToggleSelect:E,onClick:x,menu:S}=t,C=Ee(),b=c==="global";let v;e[0]!==s||e[1]!==r||e[2]!==b||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:je("flex size-8 shrink-0 items-center justify-center rounded-lg",b?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:je("shrink-0",!b&&(r?"text-accent-foreground":"text-muted-foreground")),style:b?{color:Jn}:void 0})}),e[0]=s,e[1]=r,e[2]=b,e[3]=n,e[4]=v):v=e[4];const T=v,w=r?b?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":b?"hover:bg-global-section/10":"hover:bg-accent";let _;e[5]!==w?(_=je("group relative flex min-w-0 items-center rounded-md transition-colors",w),e[5]=w,e[6]=_):_=e[6];let O;e[7]!==E||e[8]!==u||e[9]!==m||e[10]!==g||e[11]!==C||e[12]!==a?(O=u&&o.jsx("span",{className:je("flex shrink-0 items-center pl-2.5 transition-opacity",m||g?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:Xp,children:o.jsx(jn,{checked:m,onCheckedChange:()=>E?.(),"aria-label":C("sandbox.itemRow.selectItem",{title:a})})}),e[7]=E,e[8]=u,e[9]=m,e[10]=g,e[11]=C,e[12]=a,e[13]=O):O=e[13];const B=f&&!r&&"text-destructive";let K;e[14]!==B?(K=je("block truncate text-sm font-medium",B),e[14]=B,e[15]=K):K=e[15];let k;e[16]!==K||e[17]!==a?(k=o.jsx("span",{className:K,children:a}),e[16]=K,e[17]=a,e[18]=k):k=e[18];const z=r?"text-accent-foreground/70":"text-muted-foreground";let P;e[19]!==z?(P=je("block truncate text-xs",z),e[19]=z,e[20]=P):P=e[20];let I;e[21]!==i||e[22]!==P?(I=o.jsx("span",{className:P,children:i}),e[21]=i,e[22]=P,e[23]=I):I=e[23];let U;e[24]!==I||e[25]!==k?(U=o.jsxs("span",{className:"min-w-0 flex-1",children:[k,I]}),e[24]=I,e[25]=k,e[26]=U):U=e[26];let q;e[27]!==r||e[28]!==C||e[29]!==l?(q=l!==void 0&&l>1&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsxs("span",{className:je("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Ta,{size:14}),l]})}),o.jsx(St,{side:"bottom",children:C("sandbox.itemRow.variantCount",{count:l})})]}),e[27]=r,e[28]=C,e[29]=l,e[30]=q):q=e[30];let Y;e[31]!==y||e[32]!==j?(Y=y&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(Vs,{size:14})})}),j&&o.jsx(St,{side:"bottom",children:j})]}),e[31]=y,e[32]=j,e[33]=Y):Y=e[33];let Q;e[34]!==r||e[35]!==f||e[36]!==p?(Q=f&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:je("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(Vs,{size:14})})}),p&&o.jsx(St,{side:"bottom",children:p})]}),e[34]=r,e[35]=f,e[36]=p,e[37]=Q):Q=e[37];let A;e[38]!==x||e[39]!==T||e[40]!==U||e[41]!==q||e[42]!==Y||e[43]!==Q||e[44]!==d?(A=o.jsxs("button",{type:"button",onClick:x,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[T,U,q,Y,Q,d]}),e[38]=x,e[39]=T,e[40]=U,e[41]=q,e[42]=Y,e[43]=Q,e[44]=d,e[45]=A):A=e[45];let G;e[46]!==r||e[47]!==S?(G=S&&o.jsx("div",{className:je("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:S}),e[46]=r,e[47]=S,e[48]=G):G=e[48];let $;return e[49]!==A||e[50]!==G||e[51]!==_||e[52]!==O?($=o.jsxs("div",{className:_,children:[O,A,G]}),e[49]=A,e[50]=G,e[51]=_,e[52]=O,e[53]=$):$=e[53],$}function Xp(t){return t.stopPropagation()}const Qp={loaders:Na,actions:Va},Jp={analytics:Zl,blog:Ma,commerce:Jl,site:Ql,website:rn};function Zp(t,e){return e===0?Jp[t.toLowerCase()]??So:So}function Ks(t,e){return e===0?Pl(t):t}function ef(t){const e=ce.c(120),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,kind:l,initialSavedKey:d,onBack:u}=t,g=Ee();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[f,p]=F.useState(m);let y;e[1]!==d?(y=()=>d?{mode:"saved",key:d}:null,e[1]=d,e[2]=y):y=e[2];const[j,E]=F.useState(y),[x,S]=F.useState(""),[C,b]=F.useState(cf),[v,T]=F.useState(l);v!==l&&(T(l),p([]),E(null),S(""),b(new Set));let w;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=ue=>{b(te=>{const le=new Set(te);return le.has(ue)?le.delete(ue):le.add(ue),le})},e[3]=w):w=e[3];const _=w;let O;e[4]!==a||e[5]!==s||e[6]!==n?(O={orgSlug:s,virtualMcpId:n,branch:a},e[4]=a,e[5]=s,e[6]=n,e[7]=O):O=e[7];const B=vn(O);let K;e[8]!==B?(K=ya((ue,te)=>B.mutate({blockKey:ue,data:te})),e[8]=B,e[9]=K):K=e[9];const k=K;let z;e[10]!==l?(z=Al(l),e[10]=l,e[11]=z):z=e[11];const P=z,I=Qp[l],U=l==="loaders"?"sandbox.collectionsSidebar.loaders":"sandbox.collectionsSidebar.actions";let q;e[12]!==g||e[13]!==U?(q=g(U),e[12]=g,e[13]=U,e[14]=q):q=e[14];const Y=q;let Q,A,G,$,N,L,de;if(e[15]!==I||e[16]!==a||e[17]!==Y||e[18]!==c||e[19]!==l||e[20]!==r||e[21]!==u||e[22]!==C||e[23]!==s||e[24]!==f||e[25]!==i||e[26]!==B||e[27]!==k||e[28]!==x||e[29]!==j||e[30]!==P||e[31]!==g||e[32]!==n){L=Symbol.for("react.early_return_sentinel");e:{const ue=[...Cl(r,c,l).map(rf),...Nl(r,l).map(lf)],te=x.trim().toLowerCase(),le=te.length>0,oe=le?ue.filter(X=>X.title.toLowerCase().includes(te)||X.resolveType.toLowerCase().includes(te)):[],be=new Map,M=[],re=new Map;if(!le){for(const X of ue){const Ne=X.folderPath;if(!(Ne.length<f.length)&&f.every((Ce,Oe)=>Ne[Oe]===Ce))if(Ne.length===f.length)if(X.savedKey!==void 0){const Ce=re.get(X.resolveType);Ce?Ce.push(X):re.set(X.resolveType,[X])}else M.push(X);else{const Ce=Ne[f.length],Oe=be.get(Ce)??{count:0,savedCount:0};X.savedKey!==void 0?Oe.savedCount=Oe.savedCount+1:Oe.count=Oe.count+1,be.set(Ce,Oe)}}M.sort(af);for(const X of re.values())X.sort(of)}const me=[...re.entries()].filter(X=>{const[Ne]=X;return!M.some(Ce=>Ce.resolveType===Ne)}).flatMap(nf).sort(sf);let J;e[40]!==f.length?(J=(X,Ne)=>Ks(X.name,f.length).localeCompare(Ks(Ne.name,f.length)),e[40]=f.length,e[41]=J):J=e[41];const D=[...be.entries()].map(tf).sort(J);let Z;e[42]===Symbol.for("react.memo_cache_sentinel")?(Z=X=>{E(X.savedKey!==void 0?{mode:"saved",key:X.savedKey}:{mode:"available",resolveType:X.resolveType,title:X.title})},e[42]=Z):Z=e[42];const ae=Z;let ye;e[43]!==B||e[44]!==P||e[45]!==g?(ye=async(X,Ne)=>{const Ce=await B.mutateAsync({blockKey:X,data:Ne,create:!0});et(Ce)||ke.success(g("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:P,blockId:X})),E({mode:"saved",key:X})},e[43]=B,e[44]=P,e[45]=g,e[46]=ye):ye=e[46];const Se=ye;let _e;e[47]!==c||e[48]!==j?(_e=df(j,c),e[47]=c,e[48]=j,e[49]=_e):_e=e[49];const we=_e,Be=f[f.length-1];let W;e[50]!==Y||e[51]!==Be||e[52]!==f.length||e[53]!==le?(W=!le&&Be!==void 0?Ks(Be,f.length-1):Y,e[50]=Y,e[51]=Be,e[52]=f.length,e[53]=le,e[54]=W):W=e[54];const se=W;if(we){const X=`${we.mode}:${we.mode==="saved"?we.blockKey:we.resolveType}`,Ne=we.mode==="saved"&&we.blockKey||"";let Ce;e[55]!==u?(Ce=u??(()=>E(null)),e[55]=u,e[56]=Ce):Ce=e[56];const Oe=u?void 0:se;let He;e[57]!==a||e[58]!==c||e[59]!==X||e[60]!==Se||e[61]!==l||e[62]!==r||e[63]!==s||e[64]!==i||e[65]!==B.isPending||e[66]!==k||e[67]!==Ce||e[68]!==Oe||e[69]!==we.editorTarget||e[70]!==we.initialValue||e[71]!==n?(He=o.jsx(Tl,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,kind:l,target:we.editorTarget,initialValue:we.initialValue,isCreating:B.isPending,onCreate:Se,onSaveReferencedBlock:k,onBack:Ce,backLabel:Oe},X),e[57]=a,e[58]=c,e[59]=X,e[60]=Se,e[61]=l,e[62]=r,e[63]=s,e[64]=i,e[65]=B.isPending,e[66]=k,e[67]=Ce,e[68]=Oe,e[69]=we.editorTarget,e[70]=we.initialValue,e[71]=n,e[72]=He):He=e[72];let Ft;e[73]!==a||e[74]!==X||e[75]!==s||e[76]!==Ne||e[77]!==He||e[78]!==n?(Ft=o.jsx(va,{orgSlug:s,virtualMcpId:n,branch:a,blockKey:Ne,present:void 0,children:He},X),e[73]=a,e[74]=X,e[75]=s,e[76]=Ne,e[77]=He,e[78]=n,e[79]=Ft):Ft=e[79],L=Ft;break e}$="flex h-full w-full min-w-0 flex-col";let he;e[80]!==g?(he=g("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[80]=g,e[81]=he):he=e[81];let xe;e[82]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>p([]),e[82]=xe):xe=e[82];const Re=f.length===0?"font-medium text-foreground":"text-muted-foreground";let Ke;e[83]!==Re?(Ke=je("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",Re),e[83]=Re,e[84]=Ke):Ke=e[84];let Ge;e[85]!==Y||e[86]!==Ke?(Ge=o.jsx("button",{type:"button",onClick:xe,className:Ke,children:Y}),e[85]=Y,e[86]=Ke,e[87]=Ge):Ge=e[87];let $e;e[88]!==f?($e=f.map((X,Ne)=>{const Ce=Ne===f.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(ln,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>p(f.slice(0,Ne+1)),className:je("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",Ce?"font-medium text-foreground":"text-muted-foreground"),children:Ks(X,Ne)})]},`${X}-${Ne}`)}),e[88]=f,e[89]=$e):$e=e[89];let qe;e[90]!==he||e[91]!==Ge||e[92]!==$e?(qe=o.jsxs("nav",{"aria-label":he,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[Ge,$e]}),e[90]=he,e[91]=Ge,e[92]=$e,e[93]=qe):qe=e[93];let Nt;e[94]===Symbol.for("react.memo_cache_sentinel")?(Nt=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[94]=Nt):Nt=e[94];let Pe;e[95]===Symbol.for("react.memo_cache_sentinel")?(Pe=X=>S(X.target.value),e[95]=Pe):Pe=e[95];let st;e[96]!==l||e[97]!==g?(st=g("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:l}),e[96]=l,e[97]=g,e[98]=st):st=e[98];let it;e[99]!==l||e[100]!==g?(it=g("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:l}),e[99]=l,e[100]=g,e[101]=it):it=e[101];let Ie;e[102]!==x||e[103]!==st||e[104]!==it?(Ie=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Nt,o.jsx("input",{type:"text",value:x,onChange:Pe,placeholder:st,"aria-label":it,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[102]=x,e[103]=st,e[104]=it,e[105]=Ie):Ie=e[105],e[106]!==qe||e[107]!==Ie?(N=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[qe,Ie]}),e[106]=qe,e[107]=Ie,e[108]=N):N=e[108],Q=qs,G="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",de="mx-auto w-full max-w-4xl px-6 py-5",A=le?oe.length===0?o.jsx(ft,{title:g("sandbox.runnableBlocksBrowser.noSearchResults",{kind:l,query:x.trim()}),description:g("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:oe.map(X=>o.jsx(jt,{icon:I,accent:X.savedKey!==void 0?"global":void 0,title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)},X.savedKey??X.resolveType))}):D.length===0&&M.length===0&&me.length===0?o.jsx(ft,{title:g("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:l}),description:f.length===0?g("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):g("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[D.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:D.map(X=>{const Ne=Zp(X.name,f.length);return o.jsxs("button",{type:"button",onClick:()=>p([...f,X.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(Ne,{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:Ks(X.name,f.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[X.count," ",X.count===1?P:l,X.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",g("sandbox.runnableBlocksBrowser.savedCountLabel",{count:X.savedCount})]})]})]})]},X.name)})}),(M.length>0||me.length>0)&&o.jsxs("div",{className:je("flex flex-col gap-1",D.length>0&&"mt-4"),children:[M.map(X=>{const Ne=re.get(X.resolveType)??[],Ce=C.has(X.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(jt,{icon:I,title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)}),Ne.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>_(X.resolveType),"aria-expanded":Ce,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:Jn},children:[Ce?o.jsx(Us,{size:12,className:"shrink-0"}):o.jsx(ln,{size:12,className:"shrink-0"}),g(Ce?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",Ne.length,")"]}),Ce&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:Ne.map(Oe=>o.jsx(jt,{icon:I,accent:"global",title:Oe.title,subtitle:Oe.resolveType,active:!1,onClick:()=>ae(Oe)},Oe.savedKey))})]})]},X.resolveType)}),me.map(X=>o.jsx(jt,{icon:I,accent:"global",title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)},X.savedKey))]})]})}e[15]=I,e[16]=a,e[17]=Y,e[18]=c,e[19]=l,e[20]=r,e[21]=u,e[22]=C,e[23]=s,e[24]=f,e[25]=i,e[26]=B,e[27]=k,e[28]=x,e[29]=j,e[30]=P,e[31]=g,e[32]=n,e[33]=Q,e[34]=A,e[35]=G,e[36]=$,e[37]=N,e[38]=L,e[39]=de}else Q=e[33],A=e[34],G=e[35],$=e[36],N=e[37],L=e[38],de=e[39];if(L!==Symbol.for("react.early_return_sentinel"))return L;let ne;e[109]!==A||e[110]!==de?(ne=o.jsx("div",{className:de,children:A}),e[109]=A,e[110]=de,e[111]=ne):ne=e[111];let ie;e[112]!==Q||e[113]!==G||e[114]!==ne?(ie=o.jsx(Q,{className:G,children:ne}),e[112]=Q,e[113]=G,e[114]=ne,e[115]=ie):ie=e[115];let fe;return e[116]!==$||e[117]!==N||e[118]!==ie?(fe=o.jsxs("div",{className:$,children:[N,ie]}),e[116]=$,e[117]=N,e[118]=ie,e[119]=fe):fe=e[119],fe}function tf(t){const[e,s]=t;return{name:e,...s}}function sf(t,e){return t.title.localeCompare(e.title)}function nf(t){const[,e]=t;return e}function of(t,e){return t.title.localeCompare(e.title)}function af(t,e){return t.title.localeCompare(e.title)}function lf(t){return{resolveType:t.resolveType,title:t.title,folderPath:ba(t.resolveType)}}function rf(t){return{resolveType:t.resolveType,title:t.title,folderPath:ba(t.resolveType),savedKey:t.key}}function cf(){return new Set}function df(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}=El(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function uf(t){const e=ce.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,resolveType:l,title:d,defaultBlockId:u,isCreating:g,onCreate:m,onSaveReferencedBlock:f}=t,p=Ee(),y=yn(),j=y?.virtualMcpId,x=za(j===n?n:null)?.metadata?.siteSlug??null;let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={},e[0]=S):S=e[0];const[C,b]=F.useState(S);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[1]=v):v=e[1];const[T,w]=F.useState(v),[_,O]=F.useState(0),[B,K]=F.useState(!1);let k;e[2]!==r||e[3]!==l?(k=$a(l,r),e[2]=r,e[3]=l,e[4]=k):k=e[4];const z=k;let P,I,U,q,Y,Q,A,G;if(e[5]!==x||e[6]!==a||e[7]!==c||e[8]!==T||e[9]!==C||e[10]!==g||e[11]!==m||e[12]!==s||e[13]!==i||e[14]!==l||e[15]!==p||e[16]!==y?.taskId||e[17]!==d||e[18]!==n){const fe=l.split("/").pop()?.replace(/\.tsx?$/,"")??l,ue=y?.taskId??null,te=i??void 0;let le;e[27]!==x||e[28]!==a||e[29]!==s||e[30]!==te||e[31]!==ue||e[32]!==n?(le={orgSlug:s,virtualMcpId:n,branch:a,threadId:ue,previewUrl:te,siteSlug:x},e[27]=x,e[28]=a,e[29]=s,e[30]=te,e[31]=ue,e[32]=n,e[33]=le):le=e[33],I=le;let oe,be,M,re;if(e[34]!==c||e[35]!==T||e[36]!==C||e[37]!==m||e[38]!==p||e[39]!==d){const we=[d,...T],Be=se=>{w(T.slice(0,se)),O(pf)};let W;e[48]!==c||e[49]!==C||e[50]!==m?(W=async se=>{const he=Dl(se,c);if(he){ke.error(he);return}await m(se,C),K(!1)},e[48]=c,e[49]=C,e[50]=m,e[51]=W):W=e[51],P=W,G="flex h-full w-full min-w-0",A="flex min-w-0 flex-1 flex-col",Y="shrink-0 border-b px-3 py-2.5",re="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==p?(oe=p("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=p,e[53]=oe):oe=e[53],be="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",M=we.map((se,he)=>{const xe=he===we.length-1,Re=_l(se);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[he>0&&o.jsx(ln,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>Be(he),title:Re,className:je("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",xe?"font-medium text-foreground":"text-muted-foreground"),children:Re})]},`${Re}-${he}`)}),e[34]=c,e[35]=T,e[36]=C,e[37]=m,e[38]=p,e[39]=d,e[40]=P,e[41]=oe,e[42]=be,e[43]=M,e[44]=re,e[45]=Y,e[46]=A,e[47]=G}else P=e[40],oe=e[41],be=e[42],M=e[43],re=e[44],Y=e[45],A=e[46],G=e[47];let me;e[54]!==oe||e[55]!==be||e[56]!==M?(me=o.jsx("nav",{"aria-label":oe,className:be,children:M}),e[54]=oe,e[55]=be,e[56]=M,e[57]=me):me=e[57];let J;e[58]===Symbol.for("react.memo_cache_sentinel")?(J=()=>K(!0),e[58]=J):J=e[58];let D;e[59]!==p?(D=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=p,e[60]=D):D=e[60];let Z;e[61]===Symbol.for("react.memo_cache_sentinel")?(Z=o.jsx(er,{size:14}),e[61]=Z):Z=e[61];let ae;e[62]!==g||e[63]!==D?(ae=o.jsx(wt,{asChild:!0,children:o.jsx(De,{size:"icon",className:"shrink-0",disabled:g,onClick:J,"aria-label":D,children:Z})}),e[62]=g,e[63]=D,e[64]=ae):ae=e[64];let ye;e[65]!==p?(ye=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=p,e[66]=ye):ye=e[66];let Se;e[67]!==ye?(Se=o.jsx(St,{side:"bottom",children:ye}),e[67]=ye,e[68]=Se):Se=e[68];let _e;e[69]!==ae||e[70]!==Se?(_e=o.jsxs(Ct,{children:[ae,Se]}),e[69]=ae,e[70]=Se,e[71]=_e):_e=e[71],e[72]!==re||e[73]!==me||e[74]!==_e?(Q=o.jsxs("div",{className:re,children:[me,_e]}),e[72]=re,e[73]=me,e[74]=_e,e[75]=Q):Q=e[75],U="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",q=p("sandbox.availableSectionEditor.localEditsHint",{typeLabel:fe}),e[5]=x,e[6]=a,e[7]=c,e[8]=T,e[9]=C,e[10]=g,e[11]=m,e[12]=s,e[13]=i,e[14]=l,e[15]=p,e[16]=y?.taskId,e[17]=d,e[18]=n,e[19]=P,e[20]=I,e[21]=U,e[22]=q,e[23]=Y,e[24]=Q,e[25]=A,e[26]=G}else P=e[19],I=e[20],U=e[21],q=e[22],Y=e[23],Q=e[24],A=e[25],G=e[26];let $;e[76]!==U||e[77]!==q?($=o.jsx("p",{className:U,children:q}),e[76]=U,e[77]=q,e[78]=$):$=e[78];let N;e[79]!==$||e[80]!==Y||e[81]!==Q?(N=o.jsxs("div",{className:Y,children:[Q,$]}),e[79]=$,e[80]=Y,e[81]=Q,e[82]=N):N=e[82];let L;e[83]!==c||e[84]!==T||e[85]!==_||e[86]!==C||e[87]!==r||e[88]!==f||e[89]!==I||e[90]!==z||e[91]!==p?(L=o.jsx(qs,{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(ka,{schema:z,value:C,onChange:fe=>b(fe),basePath:"",breadcrumbPath:T,onBreadcrumbChange:w,meta:r,decofile:c,onSaveReferencedBlock:f,sandbox:I},_):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=c,e[84]=T,e[85]=_,e[86]=C,e[87]=r,e[88]=f,e[89]=I,e[90]=z,e[91]=p,e[92]=L):L=e[92];let de;e[93]!==N||e[94]!==L||e[95]!==A?(de=o.jsxs("div",{className:A,children:[N,L]}),e[93]=N,e[94]=L,e[95]=A,e[96]=de):de=e[96];let ne;e[97]!==u||e[98]!==P||e[99]!==g||e[100]!==B?(ne=o.jsx(Bl,{open:B,onOpenChange:K,defaultBlockId:u,isPending:g,onSubmit:P}),e[97]=u,e[98]=P,e[99]=g,e[100]=B,e[101]=ne):ne=e[101];let ie;return e[102]!==de||e[103]!==ne||e[104]!==G?(ie=o.jsxs("div",{className:G,children:[de,ne]}),e[102]=de,e[103]=ne,e[104]=G,e[105]=ie):ie=e[105],ie}function pf(t){return t+1}function ff(t,e,s){const n={__resolveType:t},a=Ol([n],e)[0];return a?sl(n,a,e,s):null}function mf({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:c}){const l=Ee(),d=yn(),u=d?.virtualMcpId,m=za(u===e?e:null)?.metadata?.siteSlug??null,[f]=F.useState(()=>ff(r,i,tl(a))),[p,y]=F.useState(f?.data??{}),[j,E]=F.useState([]),[x,S]=F.useState(0),[C,b]=F.useState(!1),[v,T]=F.useState(null),w=v!==null,{save:_,flush:O}=Rl({orgSlug:t,virtualMcpId:e,branch:s},{holdsCopy:!0}),B=f?.resolveType?$a(f.resolveType,a):null,K=io(e,s),k=K.kind==="protocol"&&K.source==="github",z=i[r],P=z?Nr(r,z):r,I=d?.taskId??null,U={orgSlug:t,virtualMcpId:e,branch:s,threadId:I,previewUrl:n??void 0,siteSlug:m},q=$=>{y($),_(r,$)},Y=()=>{w?(T(null),b(!1),S($=>$+1)):T(JSON.stringify(p,null,2))},Q=$=>{const N=$??"";try{const L=JSON.parse(N);if(L&&typeof L=="object"&&!Array.isArray(L)){b(!1),q(L);return}b(!0)}catch{b(!0)}},A=[P,...j],G=$=>{E(j.slice(0,$)),S(N=>N+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($l,{crumbs:A,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:Jn},"aria-hidden":!0}),k?o.jsx("span",{className:"min-w-0 truncate text-sm font-medium","data-testid":"saved-section-title",children:P}):null,o.jsx("div",{className:"flex-1"}),o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx(De,{variant:w?"default":"ghost",size:"icon",className:"shrink-0",onClick:Y,"aria-label":l(w?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":w,children:w?o.jsx(Qn,{size:14}):o.jsx(Ea,{size:14})})}),o.jsx(St,{side:"bottom",children:l(w?"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:l("sandbox.savedSectionEditor.globalSectionDescription")})]}),o.jsxs("div",{className:"relative min-h-0 flex-1",children:[o.jsx(qs,{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(ka,{schema:B,value:p,onChange:$=>q($),basePath:"",breadcrumbPath:j,onBreadcrumbChange:E,meta:a,decofile:i,onSaveReferencedBlock:c,sandbox:U},x):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:l("sandbox.savedSectionEditor.noEditableFields")})})})}),v!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[C&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:l("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(Ua,{language:"json",height:"100%",code:v,onChange:Q,onSave:$=>{Q($),O()}})})]})]})]})})}function gf(t){const e=ce.c(46),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,isCreating:d,onCreateAvailable:u,onSaveReferencedBlock:g}=t,m=Ee();if(!s){let x;e[0]!==m?(x=m("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=m,e[1]=x):x=e[1];let S;e[2]!==m?(S=m("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=m,e[3]=S):S=e[3];let C;return e[4]!==x||e[5]!==S?(C=o.jsx(ft,{title:x,description:S}),e[4]=x,e[5]=S,e[6]=C):C=e[6],C}if(s.collection==="available-section"){const x=`available:${s.resolveType}`,S=s.resolveType,C=s.title;let b;e[7]!==s.title?(b=Ll(s.title),e[7]=s.title,e[8]=b):b=e[8];let v;e[9]!==u||e[10]!==s.resolveType?(v=(w,_)=>u(s.resolveType,w,_),e[9]=u,e[10]=s.resolveType,e[11]=v):v=e[11];let T;return e[12]!==i||e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==g||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==x||e[22]!==b||e[23]!==v||e[24]!==a?(T=o.jsx(uf,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,resolveType:S,title:C,defaultBlockId:b,isCreating:d,onCreate:v,onSaveReferencedBlock:g},x),e[12]=i,e[13]=l,e[14]=d,e[15]=c,e[16]=g,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=x,e[22]=b,e[23]=v,e[24]=a,e[25]=T):T=e[25],T}const f=`saved:${s.key}`,p=s.key;let y;e[26]!==l||e[27]!==s.key?(y=Object.hasOwn(l,s.key),e[26]=l,e[27]=s.key,e[28]=y):y=e[28];let j;e[29]!==i||e[30]!==l||e[31]!==c||e[32]!==g||e[33]!==n||e[34]!==r||e[35]!==s.key||e[36]!==a?(j=o.jsx(mf,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,blockKey:s.key,onSaveReferencedBlock:g}),e[29]=i,e[30]=l,e[31]=c,e[32]=g,e[33]=n,e[34]=r,e[35]=s.key,e[36]=a,e[37]=j):j=e[37];let E;return e[38]!==i||e[39]!==n||e[40]!==s.key||e[41]!==f||e[42]!==y||e[43]!==j||e[44]!==a?(E=o.jsx(va,{orgSlug:n,virtualMcpId:a,branch:i,blockKey:p,present:y,children:j},f),e[38]=i,e[39]=n,e[40]=s.key,e[41]=f,e[42]=y,e[43]=j,e[44]=a,e[45]=E):E=e[45],E}function us(t){const e=ce.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:c}=t,l=Ee();let d;e[0]!==l?(d=l("sandbox.itemActions.moreActions"),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(nl,{size:14}),e[2]=u):u=e[2];let g;e[3]!==d?(g=o.jsx(nn,{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:hf,children:u})}),e[3]=d,e[4]=g):g=e[4];let m;e[5]!==n||e[6]!==l?(m=n&&o.jsxs(Ot,{onClick:n,children:[o.jsx(bc,{size:14}),l("sandbox.itemActions.rename")]}),e[5]=n,e[6]=l,e[7]=m):m=e[7];let f;e[8]!==s||e[9]!==l?(f=s&&o.jsxs(Ot,{onClick:s,children:[o.jsx(so,{size:14}),l("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=l,e[10]=f):f=e[10];let p;e[11]!==a||e[12]!==l?(p=a&&o.jsxs(o.Fragment,{children:[o.jsx(_n,{}),o.jsxs(Ot,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Ta,{size:14}),l("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=l,e[13]=p):p=e[13];let y;e[14]!==i||e[15]!==r||e[16]!==l?(y=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(_n,{}),i&&o.jsxs(Ot,{onClick:i,children:[o.jsx(Ca,{size:14}),l("sandbox.itemActions.editSeo")]}),r&&o.jsxs(Ot,{onClick:r,children:[o.jsx(Ea,{size:14}),l("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=l,e[17]=y):y=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(_n,{}),e[18]=j):j=e[18];let E;e[19]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(co,{size:14}),e[19]=E):E=e[19];let x;e[20]!==l?(x=l("sandbox.itemActions.delete"),e[20]=l,e[21]=x):x=e[21];let S;e[22]!==c||e[23]!==x?(S=o.jsxs(Ot,{onClick:c,className:"text-destructive focus:text-destructive",children:[E,x]}),e[22]=c,e[23]=x,e[24]=S):S=e[24];let C;e[25]!==S||e[26]!==m||e[27]!==f||e[28]!==p||e[29]!==y?(C=o.jsxs(on,{align:"end",className:"w-44",children:[m,f,p,y,j,S]}),e[25]=S,e[26]=m,e[27]=f,e[28]=p,e[29]=y,e[30]=C):C=e[30];let b;return e[31]!==C||e[32]!==g?(b=o.jsxs(an,{children:[g,C]}),e[31]=C,e[32]=g,e[33]=b):b=e[33],b}function hf(t){return t.stopPropagation()}function na(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 Fi=4;function Pn(t){const e=new Map;for(const s of t)s.slug&&!e.has(s.slug)&&e.set(s.slug,s);return e}function An(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 zi(t,e){const s=Pn(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>=Fi));)i=An(i,s);return n.reverse()}function Mi(t,e){const s=new Map;for(const n of t){const a=An(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 Xg(t,e){const s=Pn(e),n=Mi(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const c=[];for(const l of r)for(const d of n.get(l)??[])d.slug&&!a.has(d.slug)&&(a.add(d.slug),c.push(d));r=c}return a.delete(t),a}function Qg(t,e){if(!t)return[];const s=Pn(e),n=zi(t,e),a=n[0];return!a||An(a,s)?[t]:n.map(i=>i.slug??"")}function xf(t){const e=Pn(t),s=Mi(t,e),n=new Set,a=[],i=(c,l)=>{if(!n.has(c)&&(n.add(c),a.push({entry:c,depth:l}),!(l+1>=Fi)))for(const d of s.get(c)??[])i(d,l+1)},r=t.filter(c=>!An(c,e)).sort((c,l)=>c.label.localeCompare(l.label));for(const c of r)i(c,0);for(const c of t)i(c,0);return a}function bf(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function yf(t){const e=new Map;for(const s of t){const n=bf(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 oa(t){const e=ce.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=je("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 c;return e[4]!==n||e[5]!==i||e[6]!==r?(c=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=c):c=e[7],c}const Fn=8,vf={page:"Pages",redirect:"Redirects","cms-settings":"Settings"},kf=new Set(["pages","redirects","sections","loaders","matchers","content"]),Vi=new Set(["lazy","multivariate","website/flags/multivariate.ts","website/flags/multivariate/section.ts"]),jf=8;function wf(t){return t?.manifest?.blocks??{}}function Sf(t){const e=t?.aliases;return e&&typeof e=="object"?e:{}}function bn(t,e){const s=Sf(t)[e];return typeof s=="string"&&s?s:e}function xo(t,e){for(const[s,n]of Object.entries(wf(t)))if(n&&Object.hasOwn(n,e))return{group:s,entry:n[e]??{}};return null}function aa(t,e){const s=xo(t,bn(t,e));return s?kf.has(s.group)?s.group:"other":null}function ia(t,e,s){let n=s;for(let a=0;a<jf;a++){const i=n.__resolveType;if(typeof i!="string"||!i)return null;const r=bn(t,i);if(xo(t,r)){if(!Vi.has(r)||!t)return r;const l=Pr(t,n);return l&&l!==i?bn(t,l):r}const c=e[i];if(!c||typeof c!="object"||Array.isArray(c))return r;n=c}return null}function qn(t){const s=(t.split("/").filter(Boolean).pop()??t).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_\s]+/g," ").trim();return s?s.replace(/\b\w/g,n=>n.toUpperCase()):t}function Cf(t,e){const s=xo(t,e)?.entry.$ref;if(typeof s!="string")return null;const n=s.split("/").pop()??"",i=t?.schema?.definitions?.[n]?.title;return typeof i=="string"&&i.trim()?i.trim():null}function la(t,e){const s=bn(t,e),n=vf[s];if(n)return n;const a=Cf(t,s);return a&&a!==s&&!a.includes("/")?a:qn(s)}function ra(t){return t?t.kind==="delete"?"deleted":t.baseVersion===null?"new":"changed":"published"}function Nf(t){const e=new Map;for(const[s,n]of Object.entries(t??{}))e.set(ma(s),{name:s,change:n});return e}function Ns(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Tf(t){const{blocks:e,meta:s}=t,n=Nf(t.changes),a=new Map,i=(b,v)=>{const T=a.get(b);T?T.push(v):a.set(b,[v])},r=new Set,c=new Map;for(const[b,v]of Object.entries(e)){if(!Ns(v))continue;const T=ia(s,e,v);if(!T)continue;const w=ma(b);r.add(w);const _=ra(n.get(w)?.change);if(v.__resolveType===Oa){for(const[B,K]of Tr(b,v))i(T,{key:B,block:K,status:_});continue}const O={key:b,block:v,status:_};c.set(w,{type:T,entry:O}),i(T,O)}for(const[b,{name:v,change:T}]of n){if(T.kind!=="delete"||r.has(b))continue;const w=t.deleted?.[v];if(!Ns(w))continue;const _=ia(s,e,w);if(!_)continue;const O={key:v,block:w,status:"deleted"};c.set(b,{type:_,entry:O}),i(_,O)}const l=[];for(const[b,v]of a){if(Er(b)||Vi.has(b))continue;const T=aa(s,b)??"other";v.sort(Ef(T)),l.push({id:b,group:T,title:la(s,b),entries:v,changed:v.filter(w=>w.status!=="published").length})}l.sort((b,v)=>b.title.localeCompare(v.title));const d=l.find(b=>b.id===Ka)??null,u=d?l.filter(b=>b!==d):l,g=b=>u.filter(v=>v.group===b),m=g("pages")[0]??null,f=g("redirects")[0]??null,p=[m,f].filter(b=>!!b),y=u.filter(b=>!p.includes(b)&&b.entries.length===1),j=[...p,...u.filter(b=>!p.includes(b)&&b.entries.length>1).sort((b,v)=>v.entries.length-b.entries.length||b.title.localeCompare(v.title))],E=new Map(l.map(b=>[b.id,b])),x=new Map,S=b=>{const v=E.get(b)??x.get(b);if(v)return v;const T={id:b,group:b?aa(s,b)??"other":"other",title:b?la(s,b):"",entries:[],changed:0};return x.set(b,T),T},C=[];for(const[b,{name:v,change:T}]of n){const w=c.get(b);if(w){C.push({type:S(w.type),entry:w.entry});continue}const _=e[v];C.push({type:S(""),entry:{key:v,block:Ns(_)?_:{},status:ra(T),...Ns(_)?{}:{orphan:!0}}})}return C.sort((b,v)=>+!b.type.title-+!v.type.title||b.type.title.localeCompare(v.type.title)||gt(b.entry).localeCompare(gt(v.entry))),{pages:m,redirects:f,collections:j,singletons:y,all:u,settings:d,changed:C,statusKnown:!!t.changes}}function Ef(t){const e=s=>s.status==="new"?0:s.status==="deleted"?3:t==="pages"&&Kt(Ts(s))==="/"?1:2;return(s,n)=>e(s)-e(n)||gt(s).localeCompare(gt(n))}function Pf(t,e,s){if(e||t.length<=Fn)return{shown:t,hidden:0};const n=t.slice(0,Fn),a=s?t.slice(Fn).find(i=>i.id===s):void 0;return a&&n.push(a),{shown:n,hidden:t.length-n.length}}function Af(t){try{return decodeURIComponent(t)}catch{return t}}function gt(t){const e=t.block.redirect,s=[t.block.name,t.block.from,Ns(e)?e.from:void 0];for(const n of s)if(typeof n=="string"&&n.trim())return n.trim();return Af(t.key)}function Ts(t){return typeof t.block.path=="string"?t.block.path:""}function _f(t){return La({[t.key]:t.block},t.key,0).length}function Df(t,e){const s=Kt(t).split("/").filter(Boolean),n=Kt(e.split(/[?#]/)[0]??"").split("/").filter(Boolean);for(let a=0;a<s.length;a++){const i=s[a]??"";if(i==="*"||i.startsWith("*"))return!0;if(a>=n.length)return!1;if(!i.startsWith(":")&&i!==n[a])return!1}return s.length===n.length}function Bf(t,e){if(!e.startsWith("/"))return null;const s=t.filter(i=>i.status!=="deleted"),n=s.find(i=>Kt(Ts(i))===Kt(e));if(n)return n;const a=s.filter(i=>Df(Ts(i),e));return a.find(i=>!Ts(i).includes("*"))??a[0]??null}function gs(t){const e=Ar(t.block);return{from:e.from,to:e.to,kind:e.type}}const Rf=["title","headline","heading","label","subtitle","text","description","href","url"];function Ui(t){const e=s=>t.entries.some(n=>{const a=n.block[s];return typeof a=="string"&&a.trim()!==""});return Rf.filter(s=>s!=="name"&&e(s)).slice(0,2)}function Gi(t,e){const s=t.block[e];return typeof s=="string"?s.replace(/\s+/g," ").trim():""}function Hi(t,e,s=[]){const n=e.trim().toLowerCase();return n?[gt(t),t.key,Ts(t),...Ns(t.block.redirect)||typeof t.block.to=="string"?[gs(t).from,gs(t).to]:[],...s.map(i=>Gi(t,i))].some(i=>i.toLowerCase().includes(n)):!0}function Yi(t){return(gs(t).from.split(/[?#]/)[0]??"").split("/").filter(Boolean)}function $f(t){const e=new Map;for(const r of t){const c=Yi(r);if(c.length<2)continue;const l=c[0]??"";e.set(l,(e.get(l)??0)+1)}const s=[...e].filter(([,r])=>r>1).map(([r,c])=>({segment:r,count:c})).sort((r,c)=>c.count-r.count||r.segment.localeCompare(c.segment)),n=s.reduce((r,c)=>r+c.count,0),a=t.length-n;return s.length+(a>0?1:0)<2?[]:a>0?[...s,{segment:"",count:a}]:s}function Of(t,e,s){const n=Yi(t),a=n.length>=2?n[0]??"":"";return e?a===e:!s.some(i=>i.segment&&i.segment===a)}const Lf=9,If=12;function Kf(t){const e=new Map;for(const c of t){if(c.status!=="published")continue;const l=gs(c).to;e.set(l,(e.get(l)??0)+1)}let s="",n=0;for(const[c,l]of e)l>n&&(s=c,n=l);if(n<=If)return{shown:t,folded:0};const a=[];let i=0,r=0;for(const c of t){const l=c.status==="published"&&gs(c).to===s;if(l&&i>=Lf){r++;continue}l&&i++,a.push(c)}return{shown:a,folded:r}}const Ff={pages:"oklch(0.62 0.17 289)",redirects:"oklch(0.64 0.13 245)",singleton:"oklch(0.66 0.09 75)",content:"oklch(0.6 0.1 270)",seo:"oklch(0.65 0 0)"};function bo(){const t=ce.c(2),e=Ee();let s;return t[0]!==e?(s=n=>n.id==="page"?e("siteEditor.contentTypes.pages"):n.id==="redirect"?e("siteEditor.contentTypes.redirects"):n.id==="cms-settings"?e("siteEditor.contentTypes.settings"):n.title,t[0]=e,t[1]=s):s=t[1],s}function zf(t){const e=ce.c(64),{tree:s,view:n,openTypeId:a,onSelect:i,onOpenEntry:r,settings:c}=t,l=Ee(),d=bo(),[u,g]=F.useState(""),[m,f]=F.useState(!1);let p,y,j,E,x,S,C;if(e[0]!==d||e[1]!==r||e[2]!==i||e[3]!==a||e[4]!==u||e[5]!==m||e[6]!==l||e[7]!==s.changed.length||e[8]!==s.collections||e[9]!==s.pages?.id||e[10]!==s.redirects?.id||e[11]!==s.singletons||e[12]!==n){const w=u.trim().toLowerCase(),_=N=>!w||d(N).toLowerCase().includes(w)||N.entries.some(L=>Hi(L,w,Ui(N))),O=a||(n.kind==="type"?n.id:null);let B;e[20]!==O?(B=N=>O===N.id,e[20]=O,e[21]=B):B=e[21];const K=B;let k;e[22]!==K||e[23]!==d||e[24]!==r||e[25]!==i?(k=(N,L,de)=>{const ne=de===void 0?!1:de;return o.jsx(da,{label:d(N),dot:L,count:ne?void 0:N.entries.length,changed:N.changed>0,active:K(N),onClick:()=>{const ie=N.entries[0];ne&&ie&&ie.status!=="deleted"?r(N,ie):i({kind:"type",id:N.id})}},N.id)},e[22]=K,e[23]=d,e[24]=r,e[25]=i,e[26]=k):k=e[26];const z=k,P=s.collections.filter(_),I=w?{shown:P,hidden:0}:Pf(P,m,O),U=s.singletons.filter(_),q=!w||l("siteEditor.contentTypes.seo").toLowerCase().includes(w);let Y;e[27]!==s.pages?.id||e[28]!==s.redirects?.id?(Y=N=>N.id===s.pages?.id?"pages":N.id===s.redirects?.id?"redirects":"content",e[27]=s.pages?.id,e[28]=s.redirects?.id,e[29]=Y):Y=e[29];const Q=Y;e[30]!==l?(x=l("sandbox.collectionsSidebar.content"),e[30]=l,e[31]=x):x=e[31],S="w-[232px] shrink-0 border-r flex flex-col min-h-0";let A;e[32]===Symbol.for("react.memo_cache_sentinel")?(A=N=>g(N.target.value),e[32]=A):A=e[32];let G;e[33]!==l?(G=l("siteEditor.contentTypes.searchContent"),e[33]=l,e[34]=G):G=e[34];let $;e[35]!==l?($=l("siteEditor.contentTypes.searchContent"),e[35]=l,e[36]=$):$=e[36],e[37]!==u||e[38]!==G||e[39]!==$?(C=o.jsx("div",{className:"px-2.5 pt-3 pb-1 shrink-0",children:o.jsx("input",{type:"search",value:u,onChange:A,placeholder:G,"aria-label":$,className:"w-full rounded-lg bg-muted/60 px-3 py-1.5 text-[13px] outline-none placeholder:text-muted-foreground"})}),e[37]=u,e[38]=G,e[39]=$,e[40]=C):C=e[40],p="flex-1 min-h-0 overflow-y-auto px-2.5 pb-4 flex flex-col gap-px",e[41]!==i||e[42]!==a||e[43]!==l||e[44]!==s.changed.length||e[45]!==n?(y=s.changed.length>0&&o.jsxs("button",{type:"button",onClick:()=>i({kind:"changes"}),className:je("mt-1.5 mb-0.5 flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm font-medium cursor-pointer","bg-warning/10 text-warning hover:bg-warning/15",n.kind==="changes"&&!a&&"ring-1 ring-warning/40"),children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full bg-warning"}),o.jsx("span",{className:"flex-1 truncate",children:l("siteEditor.contentTypes.changesInDraft")}),o.jsx("span",{className:"text-xs tabular-nums",children:s.changed.length})]}),e[41]=i,e[42]=a,e[43]=l,e[44]=s.changed.length,e[45]=n,e[46]=y):y=e[46],j=I.shown.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(ca,{label:l("siteEditor.contentTypes.group.collections")}),I.shown.map(N=>z(N,Q(N))),!w&&(I.hidden>0||m)&&o.jsx("button",{type:"button",onClick:()=>f(Mf),className:"px-2.5 py-1 text-left text-xs text-muted-foreground hover:text-foreground cursor-pointer",children:m?l("siteEditor.contentTypes.showFewer"):l("siteEditor.contentTypes.showAll",{count:s.collections.length})})]}),E=(q||U.length>0)&&o.jsxs(o.Fragment,{children:[o.jsx(ca,{label:l("siteEditor.contentTypes.group.singletons")}),q&&o.jsx(da,{label:l("siteEditor.contentTypes.seo"),dot:"seo",active:n.kind==="seo"&&!a,onClick:()=>i({kind:"seo"})}),U.map(N=>z(N,"singleton",!0))]}),e[0]=d,e[1]=r,e[2]=i,e[3]=a,e[4]=u,e[5]=m,e[6]=l,e[7]=s.changed.length,e[8]=s.collections,e[9]=s.pages?.id,e[10]=s.redirects?.id,e[11]=s.singletons,e[12]=n,e[13]=p,e[14]=y,e[15]=j,e[16]=E,e[17]=x,e[18]=S,e[19]=C}else p=e[13],y=e[14],j=e[15],E=e[16],x=e[17],S=e[18],C=e[19];let b;e[47]!==p||e[48]!==y||e[49]!==j||e[50]!==E?(b=o.jsxs("div",{className:p,children:[y,j,E]}),e[47]=p,e[48]=y,e[49]=j,e[50]=E,e[51]=b):b=e[51];let v;e[52]!==i||e[53]!==a||e[54]!==c||e[55]!==l||e[56]!==n?(v=c&&o.jsx("div",{className:"shrink-0 border-t px-2.5 py-2","data-testid":"content-sidebar-settings",children:o.jsx(Wi,{label:l("siteEditor.contentTypes.settings"),marker:o.jsx(zn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),changed:c.changed,active:n.kind==="settings"&&!a,onClick:()=>i({kind:"settings"})})}),e[52]=i,e[53]=a,e[54]=c,e[55]=l,e[56]=n,e[57]=v):v=e[57];let T;return e[58]!==x||e[59]!==S||e[60]!==C||e[61]!==b||e[62]!==v?(T=o.jsxs("nav",{"aria-label":x,className:S,children:[C,b,v]}),e[58]=x,e[59]=S,e[60]=C,e[61]=b,e[62]=v,e[63]=T):T=e[63],T}function Mf(t){return!t}function ca(t){const e=ce.c(2),{label:s}=t;let n;return e[0]!==s?(n=o.jsx("div",{className:"px-2.5 pt-4 pb-1 text-xs text-muted-foreground/70",children:s}),e[0]=s,e[1]=n):n=e[1],n}function da(t){const e=ce.c(8);let s,n;e[0]!==t?({dot:s,...n}=t,e[0]=t,e[1]=s,e[2]=n):(s=e[1],n=e[2]);const a=Ff[s];let i;e[3]!==a?(i=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:a}}),e[3]=a,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=o.jsx(Wi,{...n,marker:i}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Wi(t){const e=ce.c(17),{label:s,marker:n,count:a,changed:i,active:r,onClick:c}=t,l=Ee(),d=r?"page":void 0,u=r?"bg-accent text-accent-foreground font-medium":"text-foreground/80 hover:bg-accent hover:text-foreground";let g;e[0]!==u?(g=je("flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors cursor-pointer",u),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==s?(m=o.jsx("span",{className:"flex-1 truncate",children:s}),e[2]=s,e[3]=m):m=e[3];let f;e[4]!==i||e[5]!==l?(f=i&&o.jsx("span",{title:l("siteEditor.contentTypes.status.changed"),className:"size-1.5 shrink-0 rounded-full bg-warning"}),e[4]=i,e[5]=l,e[6]=f):f=e[6];let p;e[7]!==a?(p=a!==void 0&&o.jsx("span",{className:"shrink-0 text-xs font-normal tabular-nums text-muted-foreground/70",children:a}),e[7]=a,e[8]=p):p=e[8];let y;return e[9]!==n||e[10]!==c||e[11]!==d||e[12]!==g||e[13]!==m||e[14]!==f||e[15]!==p?(y=o.jsxs("button",{type:"button",onClick:c,"aria-current":d,className:g,children:[n,m,f,p]}),e[9]=n,e[10]=c,e[11]=d,e[12]=g,e[13]=m,e[14]=f,e[15]=p,e[16]=y):y=e[16],y}const Vf={published:"success",changed:"warning",new:"info",deleted:"destructive"},Uf={published:"siteEditor.contentTypes.status.published",changed:"siteEditor.contentTypes.status.changed",new:"siteEditor.contentTypes.status.new",deleted:"siteEditor.contentTypes.status.deleted"};function Gf(t){const e=ce.c(82),{tree:s,type:n,onOpen:a,onRestore:i,restoring:r,createLabel:c,onCreate:l,rowMenu:d}=t,u=Ee(),g=bo(),[m,f]=F.useState(""),[p,y]=F.useState("all"),[j,E]=F.useState(!1),x=s.statusKnown;let S,C,b,v,T;if(e[0]!==c||e[1]!==p||e[2]!==x||e[3]!==g||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==m||e[8]!==r||e[9]!==d||e[10]!==u||e[11]!==s.changed||e[12]!==s.pages?.entries||e[13]!==s.singletons||e[14]!==n||e[15]!==j){const O=n?n.entries.map(W=>({type:n,entry:W})):s.changed,B=n?Ui(n):[],K=O.filter(Jf).length,k=n?.group==="redirects"?$f(n.entries):[],z=p==="changed"&&x,P=p.startsWith("path:")?p.slice(5):null,I=O.filter(W=>(!z||W.entry.status!=="published")&&(P===null||Of(W.entry,P,k))&&Hi(W.entry,m,n?B:[])),U=n?.group==="redirects"&&p==="all"&&!m.trim()&&!j?Kf(I.map(Qf)):null,q=U&&U.folded>0?new Set(U.shown):null,Y=q?I.filter(W=>q.has(W.entry)):I;let Q;e[21]!==s.singletons?(Q=new Set(s.singletons.map(Xf)),e[21]=s.singletons,e[22]=Q):Q=e[22];const A=Q;let G;e[23]!==g||e[24]!==A||e[25]!==u?(G=W=>{const{type:se,entry:he}=W;return se.id===Ka?u("siteEditor.contentTypes.settings"):A.has(se.id)&&typeof he.block.name!="string"?g(se):gt(he)},e[23]=g,e[24]=A,e[25]=u,e[26]=G):G=e[26];const $=G,N=n?n.group==="pages"?"pages":n.group==="redirects"?"redirects":"other":"changes";let L;e[27]!==s.pages?.entries?(L=s.pages?.entries??[],e[27]=s.pages?.entries,e[28]=L):L=e[28];const de=L;let ne;if(e[29]!==N||e[30]!==g||e[31]!==u||e[32]!==n){const W=n?g(n):u("siteEditor.contentTypes.changesInDraft");ne=N==="redirects"?u("siteEditor.contentTypes.searchRedirects"):u("siteEditor.contentTypes.search",{type:W.toLowerCase()}),e[29]=N,e[30]=g,e[31]=u,e[32]=n,e[33]=ne}else ne=e[33];const ie=ne,fe=qf;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue=W=>!fe(W)&&!W.entry.orphan,e[34]=ue):ue=e[34];const te=ue;let le;e[35]===Symbol.for("react.memo_cache_sentinel")?(le=(W,se,he)=>{const xe=he===void 0?!1:he;return o.jsx("span",{className:je((xe||fe(W))&&"text-muted-foreground",fe(W)&&"line-through"),children:se})},e[35]=le):le=e[35];const oe=le,be=Wf,M=[];if(N==="redirects"){let W;e[36]===Symbol.for("react.memo_cache_sentinel")?(W=xe=>oe(xe,be(xe)?.from),e[36]=W):W=e[36];let se;e[37]!==de?(se=xe=>{const Re=be(xe)?.to??"",Ke=Bf(de,Re);return o.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[Ke&&oe(xe,gt(Ke)),oe(xe,Re,!0)]})},e[37]=de,e[38]=se):se=e[38];let he;e[39]!==u?(he=xe=>be(xe)?.kind==="permanent"?u("siteEditor.contentTypes.kind.permanent"):u("siteEditor.contentTypes.kind.temporary"),e[39]=u,e[40]=he):he=e[40],M.push({id:"from",header:u("siteEditor.contentTypes.column.from"),render:W},{id:"to",header:u("siteEditor.contentTypes.column.to"),render:se},{id:"kind",header:u("siteEditor.contentTypes.column.kind"),render:he})}else{let W;if(e[41]!==$?(W=se=>oe(se,$(se)),e[41]=$,e[42]=W):W=e[42],M.push({id:"name",header:u("siteEditor.contentTypes.column.name"),render:W}),N==="pages"){let se;e[43]===Symbol.for("react.memo_cache_sentinel")?(se=he=>oe(he,Ts(he.entry),!0),e[43]=se):se=e[43],M.push({id:"path",header:u("siteEditor.contentTypes.column.path"),render:se},{id:"sections",header:u("siteEditor.contentTypes.column.sections"),render:Yf})}if(N==="changes"){let se;e[44]!==g?(se=he=>he.type.title?g(he.type):"",e[44]=g,e[45]=se):se=e[45],M.push({id:"type",header:u("siteEditor.contentTypes.column.type"),render:se})}if(N==="other")for(const se of B)M.push({id:`field:${se}`,header:qn(se),render:he=>oe(he,Gi(he.entry,se))})}let re;if(e[46]!==x||e[47]!==i||e[48]!==r||e[49]!==u?(re=W=>x?o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(wn,{variant:Vf[W.entry.status],children:u(Uf[W.entry.status])}),fe(W)&&o.jsx(ua,{children:o.jsxs(De,{size:"xs",variant:"outline",disabled:r!==null,onClick:()=>i(W.entry),children:[r===W.entry.key&&o.jsx(mt,{className:"size-3"}),u("siteEditor.contentTypes.restore")]})})]}):o.jsx("span",{className:"text-muted-foreground",children:u("siteEditor.contentTypes.status.checking")}),e[46]=x,e[47]=i,e[48]=r,e[49]=u,e[50]=re):re=e[50],M.push({id:"status",header:u("siteEditor.contentTypes.column.status"),render:re}),d){let W;e[51]!==d?(W=se=>fe(se)?null:o.jsx(ua,{children:d(se.type,se.entry)}),e[51]=d,e[52]=W):W=e[52],M.push({id:"actions",header:"",render:W,cellClassName:"w-12 shrink-0"})}const me=Hf;let J;e[53]!==p||e[54]!==m||e[55]!==u||e[56]!==n?(J=m.trim()?u("siteEditor.contentTypes.noMatch"):u(n?p==="changed"?"siteEditor.contentTypes.noChangedHere":"siteEditor.contentTypes.empty":"siteEditor.contentTypes.noChanges"),e[53]=p,e[54]=m,e[55]=u,e[56]=n,e[57]=J):J=e[57];const D=J;v="flex h-full min-w-0 flex-col overflow-y-auto";let Z;e[58]===Symbol.for("react.memo_cache_sentinel")?(Z=je("flex shrink-0 flex-wrap items-center gap-2",Vl),e[58]=Z):Z=e[58];let ae;e[59]===Symbol.for("react.memo_cache_sentinel")?(ae=W=>{W.key==="Escape"&&(f(""),W.currentTarget.blur())},e[59]=ae):ae=e[59];let ye;e[60]!==m||e[61]!==ie?(ye=o.jsx("div",{ref:me,className:"w-full max-w-[280px]",children:o.jsx(yc,{value:m,onChange:f,placeholder:ie,onKeyDown:ae})}),e[60]=m,e[61]=ie,e[62]=ye):ye=e[62];const Se=n&&o.jsxs(vc,{type:"single",variant:"segmented",size:"sm",value:p,onValueChange:W=>W&&y(W),"aria-label":u("siteEditor.contentTypes.filter"),children:[o.jsx($n,{value:"all",children:u("siteEditor.contentTypes.filter.all",{count:O.length})}),x&&o.jsx($n,{value:"changed",children:u("siteEditor.contentTypes.filter.changed",{count:K})}),k.map(W=>o.jsx($n,{value:`path:${W.segment}`,children:W.segment?`${qn(W.segment)} ${W.count}`:u("siteEditor.contentTypes.filter.otherPaths",{count:W.count})},W.segment||"-"))]});let _e;e[63]!==c||e[64]!==l?(_e=l&&c&&o.jsxs(De,{size:"sm",className:"ml-auto",onClick:l,children:[o.jsx(kn,{size:16}),c]}),e[63]=c,e[64]=l,e[65]=_e):_e=e[65],e[66]!==ye||e[67]!==Se||e[68]!==_e?(T=o.jsxs("div",{className:Z,children:[ye,Se,_e]}),e[66]=ye,e[67]=Se,e[68]=_e,e[69]=T):T=e[69],S="flex flex-1 flex-col px-4 pb-4";let we;e[70]!==a?(we=W=>a(W.type,W.entry),e[70]=a,e[71]=we):we=e[71];let Be;e[72]!==D?(Be=o.jsx(ft,{title:D}),e[72]=D,e[73]=Be):Be=e[73],C=o.jsx(kc,{columns:M,data:Y,onRowClick:we,isRowClickable:te,emptyState:Be}),b=U&&U.folded>0&&o.jsx("div",{className:"py-2",children:o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>E(!0),children:u("siteEditor.contentTypes.folded",{count:U.folded})})}),e[0]=c,e[1]=p,e[2]=x,e[3]=g,e[4]=l,e[5]=a,e[6]=i,e[7]=m,e[8]=r,e[9]=d,e[10]=u,e[11]=s.changed,e[12]=s.pages?.entries,e[13]=s.singletons,e[14]=n,e[15]=j,e[16]=S,e[17]=C,e[18]=b,e[19]=v,e[20]=T}else S=e[16],C=e[17],b=e[18],v=e[19],T=e[20];let w;e[74]!==S||e[75]!==C||e[76]!==b?(w=o.jsxs("div",{className:S,children:[C,b]}),e[74]=S,e[75]=C,e[76]=b,e[77]=w):w=e[77];let _;return e[78]!==v||e[79]!==T||e[80]!==w?(_=o.jsxs("div",{className:v,children:[T,w]}),e[78]=v,e[79]=T,e[80]=w,e[81]=_):_=e[81],_}function Hf(t){const e=t?.querySelector("input");if(!e)return;const s=n=>{if(n.key!=="/"||n.metaKey||n.ctrlKey)return;const a=n.target;a&&(a.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(a.tagName))||(n.preventDefault(),e.focus())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)}function Yf(t){return _f(t.entry)}function Wf(t){return t.type.group==="redirects"?gs(t.entry):null}function qf(t){return t.entry.status==="deleted"}function Xf(t){return t.id}function Qf(t){return t.entry}function Jf(t){return t.entry.status!=="published"}function ua(t){const e=ce.c(2),{children:s}=t;let n;return e[0]!==s?(n=o.jsx("span",{className:"inline-flex",onClick:em,onKeyDown:Zf,children:s}),e[0]=s,e[1]=n):n=e[1],n}function Zf(t){return t.stopPropagation()}function em(t){return t.stopPropagation()}const pa=F.lazy(()=>xt(()=>import("./app-editor--cZ0paPb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.AppEditor}))),fa=F.lazy(()=>xt(()=>import("./cms-settings-editor-BKSzHFaJ.js"),__vite__mapDeps([165,1,2,28,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,131,19,20,21,22,23,24,25,26,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,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,132,133,106,134,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,135,155,0,103,104,105,107,130,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.CmsSettingsEditor}))),tm=F.lazy(()=>xt(()=>import("./post-editor-BHEvn_Zz.js"),__vite__mapDeps([166,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,28,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,23,167,97,66,113,114,69,61,62,143,89,105,106,107,108,109,26,20,21,22,24,25,53,54,55,110,111,112,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,59,60,63,64,65,67,68,70,71,72,74,77,78,79,80,82,83,84,85,86,87,91,92,93,94,95,96,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,103,144,145,146,147,148,149,150,151,152,153,154,168,169,170,171,158,172,173,155,156,157,159,160,161,162,163,164])).then(t=>({default:t.PostEditor}))),sm=F.lazy(()=>xt(()=>import("./record-editor-BZSwvkut.js"),__vite__mapDeps([174,1,2,23,59,60,55,36,89,105,106,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,107,108,109,26,20,21,22,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,171,173,155,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.RecordEditor}))),nm=F.lazy(()=>xt(()=>import("./context-D9Jnu7vN.js"),__vite__mapDeps([175,1,2,137,31,46,113,114,47,23,138,139,60,140,141,142,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,48,49,50,51,52,130,131,19,20,21,22,24,25,26,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,55,56,57,58,59,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,132,133,106,134,108,109,110,111,112,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,135,136,143,105,107,103,144,145,146,147,148,149,150,151,152,153,154,173,176,170,158,169,155,156,157,159,160,161,162,163,164])).then(t=>({default:t.BlogContext}))),om=F.lazy(()=>xt(()=>import("./category-editor-BFW4v6Zt.js"),__vite__mapDeps([177,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,28,32,27,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,23,59,60,55,171,105,106,107,108,109,26,20,21,22,24,25,53,54,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,168,169,170,161,172,173,155,156,157,158,159,160,162,163,164])).then(t=>({default:t.CategoryEditor}))),am=F.lazy(()=>xt(()=>import("./sections-editor-CEHFL2VN.js"),__vite__mapDeps([178,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,105,106,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,107,108,109,26,20,21,22,23,24,25,53,54,55,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,158,104,179,180,161,181])).then(t=>({default:t.SectionsEditor}))),im=F.lazy(()=>xt(()=>import("./seo-editor-CaLY6KkG.js").then(t=>t.s),__vite__mapDeps([179,1,2,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,103,60,105,106,107,108,109,26,20,21,22,23,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,55,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,59,61,62,63,64,65,66,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154])).then(t=>({default:t.SeoEditor}))),lm=F.lazy(()=>xt(()=>import("./variant-calendar-CPbvwCiJ.js"),__vite__mapDeps([182,1,2,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,23,103,60,143,54,55,64,62,160])).then(t=>({default:t.VariantCalendar}))),rm=F.lazy(()=>xt(()=>import("./post-calendar-C4WCdLXl.js"),__vite__mapDeps([183,1,2,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,103,60,160,18,14,13,3,4,5,6,7,8,9,10,11,12,15,16,17,137,113,114,23,138,139,140,141,142,130,131,19,20,21,22,24,25,26,53,54,55,56,57,58,59,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,132,133,106,134,108,109,110,111,112,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,135,136,105,107,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,162,163,164])).then(t=>({default:t.PostCalendar}))),cm=F.lazy(()=>xt(()=>import("./redirect-editor-BxlqORGw.js"),__vite__mapDeps([184,1,2,66,42,23,59,60,55,36,105,106,27,28,29,30,31,32,33,34,35,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,107,108,109,26,20,21,22,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,53,54,110,111,112,113,114,88,115,116,117,118,119,75,76,81,120,121,122,123,124,125,126,127,128,90,73,129,57,130,131,19,56,58,61,62,63,64,65,67,68,69,70,71,72,74,77,78,79,80,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99,100,101,102,132,133,134,135,136,137,138,139,140,141,142,143,103,144,145,146,147,148,149,150,151,152,153,154,173])).then(t=>({default:t.RedirectEditor})));function dm(t){return ii(t)!==null||t===Oa||t==="redirect"||Fr.has(t)}function um(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"pages":t}function pm(t,e){return t&&(ds(t)||e&&t==="sections")?t:null}function fm(t){const e=ce.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=eo(),{org:i}=ol(),r=oc(),c=ac(),{runtime:l,previewServerUrl:d}=lo(a),u=l==="cms",g=io(a,n);let m,f;e[0]!==g||e[1]!==u||e[2]!==c.previewState||e[3]!==r.lifecycle.phase?(m=Ba(g),f=xd({fastPreviewActive:u||m,previewState:c.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=g,e[1]=u,e[2]=c.previewState,e[3]=r.lifecycle.phase,e[4]=m,e[5]=f):(m=e[4],f=e[5]);const p=f;if(p.kind==="sandbox-card"){const x=`/${i.slug}/settings/connections`;let S;return e[6]!==p.state||e[7]!==c.start||e[8]!==x||e[9]!==r.lifecycle||e[10]!==r.phase?(S=o.jsx(gd,{state:p.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:c.start,connectionsHref:x}),e[6]=p.state,e[7]=c.start,e[8]=x,e[9]=r.lifecycle,e[10]=r.phase,e[11]=S):S=e[11],S}if(!a||!n){let x;return e[12]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(ft,{title:"Waiting for sandbox context…"}),e[12]=x):x=e[12],x}if(_r(g)){let x;return e[13]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Rr,{}),e[13]=x):x=e[13],x}if(g.kind==="pending"){let x;return e[14]!==g?(x=o.jsx($r,{backend:g}),e[14]=g,e[15]=x):x=e[15],x}const y=m?null:c.previewUrl;let j;e[16]!==g||e[17]!==u||e[18]!==c.previewUrl||e[19]!==d?(j=g.kind==="protocol"&&g.source==="local"?rr(g):u?d:c.previewUrl,e[16]=g,e[17]=u,e[18]=c.previewUrl,e[19]=d,e[20]=j):j=e[20];let E;return e[21]!==n||e[22]!==s||e[23]!==p.devServerReady||e[24]!==p.sandboxWarming||e[25]!==i.slug||e[26]!==y||e[27]!==j||e[28]!==a?(E=o.jsx(mm,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:y,sitePreviewUrl:j,deepLinkPage:s,devServerReady:p.devServerReady,sandboxWarming:p.sandboxWarming}),e[21]=n,e[22]=s,e[23]=p.devServerReady,e[24]=p.sandboxWarming,e[25]=i.slug,e[26]=y,e[27]=j,e[28]=a,e[29]=E):E=e[29],E}function mm({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:c}){const l=Ee(),d=yn()?.taskId??null,u={orgSlug:t,virtualMcpId:e,branch:s,threadId:d,previewUrl:n},g=io(e,s),m=!Ba(g),f=g.kind==="protocol"&&g.source==="github";al(f);const p=Il({orgSlug:t,virtualMcpId:e,branch:s}),y=f,j=f&&g.kind==="protocol"?g:null,E=j?cr({orgSlug:t,virtualMcpId:e,branch:s},j):null,x=dr(j,E),S=ur(j,E,x.data),C=Wr({orgSlug:t,virtualMcpId:e,branch:s,refresh:()=>x.refetch()}),b=bo(),[v,T]=F.useState(null),[w,_]=F.useState(null),[O,B]=F.useState(null),K=Kl()===void 0,{data:k,isLoading:z}=pr(u,{fetchEnabled:r}),P={orgSlug:t,virtualMcpId:e,branch:s},I=fr(f?P:null,dm);No(f?P:null,I);const U=ga({strict:!1}),[q,Y]=F.useState(()=>pm(U.contentCollection,!m)??"pages"),Q=Ga(),A=um(q,Q,!m),{openPanel:G}=ec(),$={open:h=>{G(h==="campaigns"?"calendar":"experiments")}},[N,L]=F.useState(()=>U.contentItem&&(ds(A)||A==="sections")?{collection:A,key:U.contentItem}:null),de=N&&"key"in N?N.key:null,ne=de??w?.key??null,ie=ne===null?[]:[Qs(ne,k??{})?.block??ne],fe=No(f?P:null,ie,{withRefs:!0}),[ue,te]=F.useState(null),le=F.useRef(null),[oe,be]=F.useState(!1),{data:M,isLoading:re}=Dr(u,{fetchEnabled:r,refetchInterval:h=>{const R=h.state.data;let ee;if(A==="apps"&&N&&N.collection==="apps"){const ve=k?.[N.key];ee=typeof ve?.__resolveType=="string"?ve.__resolveType:void 0}else if(A==="site"&&k){const ve=R?Eo(k,R):null,nt=k.site;ee=ve?.resolveType??(typeof nt?.__resolveType=="string"?nt.__resolveType:void 0)}const ge=Cc({resolveType:ee,meta:R,reads:h.state.dataUpdateCount+h.state.errorUpdateCount,window:le.current});le.current=ge.window;const Ae=ge.interval!==!1;return be(ve=>ve===Ae?ve:Ae),ge.interval}}),me=!!(i?.pageId||i?.path||i?.pathTemplate),[J,D]=F.useState(!1);if(me&&!J&&N===null&&k&&!re){D(!0);const h=Br(To(k,M),i??{});h&&(Y("pages"),L({collection:"pages",key:h.key,path:h.path}))}const[Z,ae]=F.useState(""),[ye,Se]=F.useState("list"),_e=h=>{L(h),te(null)},[we,Be]=F.useState(A);we!==A&&(Be(A),ae(""));const{createTask:W}=eo(),se=lo(e),he=cd(e,M??void 0),xe=_a(e).url,Re=Zn("site_apps_install_enabled"),Ke=Re&&he!==null&&!xe,Ge=M&&k?ed(he?Ja(he):[],M,k):[],$e=rd({orgSlug:t,virtualMcpId:e,branch:s}),qe=Re?Ke?se.resolved?se.runtime==="cms"?{reason:l("sandbox.appEditor.installNeedsCodingSession"),action:{label:l("chat.fastPreview.startCodingSession"),onClick:()=>W({runtime:"sandbox"})}}:null:{reason:l("sandbox.appInstallPanel.sessionLoading")}:{reason:l("sandbox.appInstallPanel.unavailable")}:{reason:l("sandbox.appInstallPanel.flagOff")},Nt=h=>{if(se.resolved&&!$e.isPending){if(se.runtime==="cms"){ke.error(l("sandbox.appEditor.installNeedsCodingSession"),{action:{label:l("chat.fastPreview.startCodingSession"),onClick:()=>W({runtime:"sandbox"})}});return}$e.mutate({blockKey:h.id},{onSuccess:R=>_e({collection:"apps",key:R.key}),onError:R=>ke.error(R.message)})}},Pe=vn(u),st=qr(u),it=op({orgSlug:t,virtualMcpId:e,branch:s,decofile:k??{},onMoved:(h,R)=>L(ee=>ee?.collection==="posts"&&ee.key===h?{collection:"posts",key:R}:ee)}),[Ie,X]=F.useState(null),[Ne,Ce]=F.useState(),[Oe,He]=F.useState(!1),[Ft,Jt]=F.useState(),[Ye,zt]=F.useState(null),[Fe,Ue]=F.useState(null),Bs=Fe?.kind==="blog"?zs[Fe.blogKind]:Fe?.kind??"item",Tt=Fe?.kind==="section"?l(na("section",f,{neverPublished:p(Fe.key)}),{label:Fe.label}):Fe?l(na("block",f,{neverPublished:p(Fe.key)}),{label:Fe.label}):null,Zt=l("sandbox.contentBrowser.deleteDialog.title",{noun:Bs}),Et=_d(Tt===null?null:{title:Zt,description:Tt},f),[bt,es]=F.useState(null),ts=!k||!M;if(z||re||K||ts&&c)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})});if(ts)return o.jsx(ft,{title:"Could not load site data."});if(mr(M))return o.jsx(Fl,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k});const Xe=To(k,M).sort((h,R)=>h.name.localeCompare(R.name)),ss=Or(k).sort((h,R)=>h.from.localeCompare(R.from)),lt=Lr(k,M),Mt=A==="sections"?Ir(M):[],yt=Eo(k,M),Qe=li(k),Pt=uo.some(h=>Qe[h].length>0),Vt=ds(A)?Qe[A]:[],At=wo(M,"loaders"),vt=wo(M,"actions"),Ut=m?["settings"]:["calendar","apps",...yt?[]:["site"],...vt===0?["actions"]:[],...Po(M)?[]:["settings"]];if(!Kr(k,M)&&!Pt&&At===0&&vt===0)return o.jsx(ft,{icon:Vs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const hs={pages:Xe.length,sections:lt.length,apps:m?Ge.length:0,loaders:At,actions:vt,redirects:ss.length,posts:Qe.posts.length,authors:Qe.authors.length,categories:Qe.categories.length},ns=new Set(Xe.map(h=>Kt(h.path))),Gt=new Set(Xe.map(h=>h.name)),Ht=new Set(lt.map(h=>h.name)),Ve=y?Tf({blocks:k,meta:M,changes:x.data?.changes,deleted:S.data}):null,_t=Ve?.pages??Ve?.all[0]??null,Dt=_t?{kind:"type",id:_t.id}:{kind:"seo"},rt=h=>h?.kind==="type"?Ve?.all.find(R=>R.id===h.id)??null:null,os=Po(M),Je=v&&(v.kind==="type"?rt(v):v.kind!=="settings"||os)?v:Dt,kt=rt(Je);if(y&&N){const h=N.collection==="available-section"?"sections":N.collection==="available-app"?"apps":N.collection;q!==h&&Y(h)}const ct=y&&(N!==null||w!==null&&(A==="loaders"||A==="settings")),dt=w?w.from:Je,Ze=dt&&dt.kind==="type"&&!rt(dt)?Dt:dt,xs=h=>{if(w?.key!==h)return;const R=Ve?.all.find(ge=>ge.id===w.typeId),ee=R?.entries.find(ge=>ge.key===h);if(!(!R||!ee||R.entries.length<2))return`${b(R)} · ${gt(ee)}`},as=()=>{_(null),L(null),te(null)},is=(h,R,ee)=>{te(null),_({typeId:h.id,key:R.key,from:ee}),h.group==="pages"?L({collection:"pages",key:R.key,path:typeof R.block.path=="string"?R.block.path:"/"}):h.group==="redirects"?L({collection:"redirects",key:R.key}):h.group==="sections"?L({collection:"sections",key:R.key}):h.group==="loaders"?(L(null),Y("loaders")):h.id==="cms-settings"?(_(null),L(null),T({kind:"settings"})):L({collection:"apps",key:R.key})},Yt=async h=>{const R=x.data?.changes[h.key];if(!(!j||!R)){B(h.key);try{await C(j,[{name:h.key,version:R.version}],l("siteEditor.contentTypes.restored",{name:gt(h)}))}finally{B(null)}}},ls=h=>{if(!h)return null;if(h.group==="pages")return{label:l("siteEditor.contentTypes.new.page"),onCreate:Bt};if(h.group==="redirects")return{label:l("siteEditor.contentTypes.new.redirect"),onCreate:$t};if(h.group==="sections"){const R=b(h);return{label:l("siteEditor.contentTypes.new.other",{type:R.toLowerCase()}),onCreate:()=>L({collection:"available-section",resolveType:h.id,title:R})}}return null},bs=(h,R)=>{if(h.group==="pages"){const ee={key:R.key,name:gt(R),path:typeof R.block.path=="string"?R.block.path:""};return o.jsx(us,{onDuplicate:()=>Rt(ee),onRename:()=>rs(ee),onDelete:()=>Ue({kind:"page",key:ee.key,label:ee.name})})}return h.group==="redirects"?o.jsx(us,{onDelete:()=>Ue({kind:"redirect",key:R.key,label:gs(R).from||R.key})}):h.group==="sections"?o.jsx(us,{onDelete:()=>Ue({kind:"section",key:R.key,label:gt(R)})}):null},ys=async h=>{const R=k[h.key];if(!R)return;const ee=Ia(k,h.key),ge=La(k,h.key,Math.max(0,ee-1)),Ae=zr(R.sections,ge,M,!m);if(Ae)try{const ve=await Pe.mutateAsync({blockKey:h.key,data:{...R,sections:Ae.sections}});et(ve)||ke.success(`Variant added to "${h.name}"`),L({collection:"pages",key:h.key,path:h.path})}catch(ve){ke.error(ve instanceof Error?ve.message:"Could not add variant")}},Bt=()=>{Ce(void 0),X({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},Rt=h=>{Ce(void 0),X({mode:"duplicate",sourceKey:h.key,initialName:Io(Gt,h.name),initialPath:bd(ns,h.path)})},rs=h=>{Ce(void 0),X({mode:"rename",sourceKey:h.key,initialName:h.name,initialPath:h.path})},vs=async h=>{if(!Ie)return;const{mode:R,sourceKey:ee}=Ie;try{if(R==="create"){let ge;if(h.templateKey){const nt=k[h.templateKey];if(!nt)throw new Error("Selected template no longer exists.");ge={...nt,name:h.name,path:h.path}}else ge=kd(h.name,h.path,m?void 0:M);const Ae=wd(k,h.name),ve=await Pe.mutateAsync({blockKey:Ae,data:ge});et(ve)||ke.success(`Created "${h.name}"`),L({collection:"pages",key:Ae,path:h.path})}else if(R==="duplicate"&&ee){const ge=k[ee];if(!ge)throw new Error("Source page not found");const{key:Ae,data:ve}=vd({source:ge,pages:Xe,newName:h.name,newPath:h.path}),nt=await Pe.mutateAsync({blockKey:Ae,data:ve});et(nt)||ke.success(`Duplicated as "${h.name}"`),L({collection:"pages",key:Ae,path:h.path})}else if(R==="rename"&&ee){const ge=k[ee];if(!ge)throw new Error("Page not found");const Ae={...ge,name:h.name,path:h.path},ve=await Pe.mutateAsync({blockKey:ee,data:Ae});et(ve)||ke.success("Page updated"),N?.collection==="pages"&&N.key===ee&&L({collection:"pages",key:ee,path:h.path})}X(null)}catch(ge){Ce(ge instanceof Error?ge.message:"Save failed")}},ks=({path:h})=>{if(!Ie)return null;const R=Kt(h);return(Ie.mode==="rename"?Kt(Ie.initialPath):null)!==R&&ns.has(R)?`A page with path "${h}" already exists.`:null},js=async(h,R,ee)=>{const ge=await Pe.mutateAsync({blockKey:R,data:{...ee,name:R,__resolveType:h},create:!0});et(ge)||ke.success(l("sandbox.contentBrowser.createdSection",{name:R})),L({collection:"sections",key:R})},ws=ya((h,R)=>Pe.mutate({blockKey:h,data:R})),Rs=async h=>{const R=k[h.key];if(!R){ke.error(l("sandbox.contentBrowser.sectionNotFound"));return}const ee=yd(k,h.key),ge=Io(Ht,h.name),Ae={...R,name:ge};try{const ve=await Pe.mutateAsync({blockKey:ee,data:Ae,create:!0});et(ve)||ke.success(l("sandbox.contentBrowser.duplicatedSection",{name:h.name})),L({collection:"sections",key:ee})}catch(ve){ke.error(ve instanceof Error?ve.message:l("sandbox.contentBrowser.duplicateFailed"))}},Wt=async h=>{if(!Ye)return;const R=k[Ye];if(!R){ke.error(l("sandbox.contentBrowser.sectionNotFound"));return}try{const ee=await Pe.mutateAsync({blockKey:Ye,data:{...R,name:h}});et(ee)||ke.success(l("sandbox.contentBrowser.sectionRenamed")),zt(null)}catch(ee){ke.error(ee instanceof Error?ee.message:l("sandbox.contentBrowser.renameFailed"))}},$t=()=>{Jt(void 0),He(!0)},qt=async h=>{const R=f?Mr(k):null,ee=R===null?null:Vr(k,R).length,ge=R===null?Ur(k,h.from):R,Ae=R===null?Gr(h):Hr(k[R],h);try{const ve=await Pe.mutateAsync({blockKey:ge,data:Ae});et(ve)||ke.success("Created redirect"),He(!1),L({collection:"redirects",key:ee===null?ge:`${ge}#${ee}`})}catch(ve){Jt(ve instanceof Error?ve.message:"Could not create redirect")}},Xt=async h=>{const R=Kn(k,h),ee=Cs(R,h,hi(h));try{const ge=await Pe.mutateAsync({blockKey:R,data:ee});et(ge)||ke.success(`Created ${zs[h]}`),L({collection:h,key:R})}catch(ge){ke.error(ge instanceof Error?ge.message:"Could not create")}},Qt=async h=>{const R=Kn(k,"posts"),ee=Cs(R,"posts",ep(h));try{const ge=await Pe.mutateAsync({blockKey:R,data:ee});et(ge)||ke.success(l("sandbox.postCalendar.createdScheduledPost")),Y("posts"),Be("posts"),L({collection:"posts",key:R}),te(null)}catch(ge){ke.error(ge instanceof Error?ge.message:l("sandbox.postCalendar.couldNotCreate"))}},Ss=async(h,R)=>{const ee=k[h],ge=ee?sp(ps(ee,"posts"),R):null;if(!ge){ke.error(l("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await Pe.mutateAsync({blockKey:h,data:Cs(h,"posts",ge)})}catch(Ae){ke.error(Ae instanceof Error?Ae.message:l("sandbox.postCalendar.couldNotReschedule"))}},H=async h=>{const R=k[h.key];if(!R){ke.error("Record not found.");return}const ee=Kn(k,h.kind),ge=h.kind==="posts"?"title":"name",Ae={...structuredClone(ps(R,h.kind)),[ge]:`${h.label} (copy)`};if(h.kind==="categories"){const ve=Qe.categories.map(nt=>nt.slug??"").filter(Boolean);Ae.slug=Ju(String(Ae.slug??""),ve)}try{const ve=await Pe.mutateAsync({blockKey:ee,data:Cs(ee,h.kind,Ae)});et(ve)||ke.success(`Duplicated "${h.label}"`),L({collection:h.kind,key:ee})}catch(ve){ke.error(ve instanceof Error?ve.message:"Duplicate failed")}},pe=()=>{Y("posts"),Be("posts"),L(null),te(null),ae("")},Le=async()=>{if(!Fe)return;let h;try{const{kind:R,key:ee,label:ge}=Fe;if(R==="blog"){if(Fe.blogKind==="categories"){const Ae=ps(k[ee],"categories").slug,ve=typeof Ae=="string"?Ae:"";if(ve)for(const{key:nt,payload:yo}of gi(k)){const vo=ru(yo,ve);vo!==yo&&await Pe.mutateAsync({blockKey:nt,data:ou(nt,cu(vo))})}}h=await st.mutateAsync({blockKey:ee})}else if(Qs(ee,k)){const Ae=Qs(ee,k);h=await Pe.mutateAsync({blockKey:Ae.block,data:Yr(k[Ae.block],Ae.index)})}else h=await st.mutateAsync({blockKey:ee});if(Ue(null),et(h))return;ke.success(`Deleted "${ge}"`),N&&"key"in N&&N.key===ee&&L(null),Ue(null)}catch(R){ke.error(R instanceof Error?R.message:"Delete failed")}},ut=de===null?null:Qs(de,k),ze=fe.failed?o.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center",children:[o.jsx(ft,{title:l("sectionsEditor.hosted.blockLoadFailed"),description:l("sectionsEditor.hosted.blockLoadFailedHint")}),o.jsx(De,{variant:"outline",size:"sm",onClick:fe.retry,children:l("sectionsEditor.namedRules.tryAgain")})]}):fe.ready?o.jsx(o.Fragment,{children:A==="loaders"||A==="actions"?o.jsx(ef,{initialSavedKey:y?w?.key:void 0,onBack:y?as:void 0,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:M,decofile:k,kind:A},y?`types:${w?.key??""}`:void 0):o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),children:A==="calendar"?o.jsx(lm,{decofile:k}):A==="post-schedule"?o.jsx(rm,{decofile:k,isCreating:Pe.isPending,onCreate:h=>{Qt(h)},onReschedule:(h,R)=>{Ss(h,R)},onSelect:h=>{Y("posts"),Be("posts"),L({collection:"posts",key:h}),te(null)}}):A==="site"?yt?o.jsx(pa,{schemaWaiting:oe,orgSlug:t,virtualMcpId:e,branch:s,blockKey:yt.key,block:k[yt.key],decofile:k,meta:M,title:"Site",excludeFields:["seo"],previewBaseUrl:n},`site:${yt.key}`):o.jsx(ft,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):A==="settings"?o.jsx(fa,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,persistDefaults:y?!1:void 0}):A==="context"?o.jsx(nm,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M}):A==="seo"?o.jsx(im,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,target:{kind:"site"},previewBaseUrl:a}):A==="sections"?o.jsx(gf,{selection:N?.collection==="sections"||N?.collection==="available-section"?N:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:M,decofile:k,isCreating:Pe.isPending,onCreateAvailable:js,onSaveReferencedBlock:ws}):A==="posts"?o.jsx(zp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,view:ye,selectedKey:N?.collection==="posts"?N.key:null,onViewChange:h=>{Se(h),L(null)},onClose:()=>L(null),onOpen:h=>{L({collection:"posts",key:h}),te(null)},move:it,meta:M,renderDetail:(h,R)=>o.jsx(tm,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:h,block:k[h],decofile:k,meta:M,previewBaseUrl:a,move:it,onClose:R?.onClose,expanded:R?.expanded,onToggleExpand:R?.onToggleExpand},`post:${Ms(h)}`)}):N?.collection==="available-app"?(()=>{const h=Ge.find(R=>R.id===N.id);return h?o.jsx(sd,{entry:h,technology:he,blocked:$e.isPending&&$e.variables?.blockKey!==h.id?{reason:l("sandbox.appInstallPanel.oneAtATime")}:qe,isInstalling:$e.isPending&&$e.variables?.blockKey===h.id,installError:$e.isError&&$e.variables?.blockKey===h.id?$e.error.message:null,onInstall:()=>Nt(h)},`available-app:${h.id}`):o.jsx(ft,{title:"App not found in this catalogue."})})():N&&N.collection!=="available-section"?N.collection==="apps"?o.jsx(pa,{schemaWaiting:oe,orgSlug:t,virtualMcpId:e,branch:s,blockKey:N.key,block:k[N.key],decofile:k,meta:M,previewBaseUrl:n,...y?{persistDefaults:!1,title:xs(N.key)}:{}},`app:${N.key}`):N.collection==="categories"?o.jsx(om,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:N.key,block:k[N.key],decofile:k,meta:M,onManagePosts:()=>pe(),onOpenPost:h=>{Y("posts"),Be("posts"),L({collection:"posts",key:h}),te(null)},previewBaseUrl:a},`category:${N.key}`):N.collection==="authors"?o.jsx(sm,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:N.key,block:k[N.key],meta:M,decofile:k},`authors:${N.key}`):N.collection==="redirects"?o.jsx(cm,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:ut?.block??N.key,rule:ut?.index??null,block:k[ut?.block??N.key]},`redirect:${N.key}`):o.jsx(hl,{value:$,children:o.jsx(am,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:N.collection==="pages"?N.path:"/",activePageBlockKey:N.collection==="pages"?N.key:null,activeGlobalBlockKey:N.collection==="sections"?N.key:null,initialEditSeo:N.collection==="pages"&&ue===N.key,onExitSeo:()=>te(null),onSelectRoot:()=>{L(null),te(null)}},N.collection==="pages"?`page:${N.key}`:`section:${N.key}`)}):o.jsx(ft,{title:`Select ${ds(A)?`a ${zs[A]}`:A==="pages"?"a page":A==="apps"?"an app":A==="redirects"?"a redirect":"a section"} to edit`,description:A==="apps"?"Browse all apps: select an installed one to edit its settings, or any other to install it.":'Pick an item from the list, or click "+" to create one.'})})}):o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),Xs=st.isPending||Pe.isPending;return o.jsx(zl,{value:!m,children:o.jsxs("div",{className:"flex h-full w-full",children:[Ve?o.jsx(zf,{tree:Ve,view:Je,openTypeId:ct?w?.typeId??null:null,onSelect:h=>{T(h),as(),h.kind==="seo"&&Y("seo")},onOpenEntry:(h,R)=>is(h,R,null),settings:os?{changed:(Ve.settings?.changed??0)>0}:null}):o.jsx(fd,{active:A,counts:hs,hidden:Ut,showBlog:Pt,showContext:Q,onSelect:h=>{Y(h),L(null),te(null)}}),!Ve&&A!=="seo"&&A!=="site"&&A!=="settings"&&A!=="context"&&A!=="calendar"&&A!=="post-schedule"&&A!=="posts"&&A!=="loaders"&&A!=="actions"&&o.jsx(gm,{activeCollection:A,pages:Xe,redirects:ss,sections:lt,availableSections:Mt,appCatalog:Ge,canInstallApps:Ke,installingAppId:$e.isPending?$e.variables?.blockKey??null:null,blogEntries:Vt,decofile:k,searchQuery:Z,onSearchChange:ae,selection:N,onSelect:_e,onCreate:()=>{A==="pages"?Bt():A==="redirects"?$t():ds(A)&&Xt(A)},onDuplicatePage:Rt,onRenamePage:rs,onAddPageVariant:ys,onDeletePage:h=>Ue({kind:"page",key:h.key,label:h.name}),onEditPageSeo:h=>{const R={collection:"pages",key:h.key,path:h.path};L(R),te(h.key)},onViewPageJson:h=>es(h.key),onDuplicateSection:Rs,onRenameSection:h=>zt(h.key),onDeleteSection:h=>Ue({kind:"section",key:h.key,label:h.name}),onDeleteRedirect:h=>Ue({kind:"redirect",key:h.key,label:h.from||h.key}),onDuplicateBlog:H,onDeleteBlog:h=>Ue({kind:"blog",blogKind:h.kind,key:h.key,label:h.label})}),Ve&&Je.kind==="settings"&&!ct?o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),children:o.jsx(fa,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,standalone:!0,persistDefaults:!1})})}):Ve&&Je.kind!=="seo"&&!ct?o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Gf,{tree:Ve,type:kt,onOpen:(h,R)=>is(h,R,Je),onRestore:h=>{Yt(h)},restoring:O,createLabel:ls(kt)?.label,onCreate:ls(kt)?.onCreate,rowMenu:bs},Je.kind==="type"?Je.id:"changes")}):ct&&Ze?o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[o.jsx(Ul,{back:{label:l("siteEditor.contentTypes.back",{type:Ze.kind==="seo"?l("siteEditor.contentTypes.seo"):Ze.kind==="settings"?l("siteEditor.contentTypes.settings"):Ze.kind==="changes"?l("siteEditor.contentTypes.changesInDraft"):b(rt(Ze)??{id:"",title:""})}),onClick:()=>{T(Ze),as()}}}),o.jsx("div",{className:"flex-1 min-h-0",children:ze})]}):o.jsx("div",{className:"flex-1 min-w-0",children:ze}),Ie&&o.jsx(Td,{open:!!Ie,mode:Ie.mode,initialName:Ie.initialName,initialPath:Ie.initialPath,isPending:Pe.isPending,error:Ne,templates:Xe,validate:ks,onSubmit:vs,onOpenChange:h=>{h||(X(null),Ce(void 0))}}),o.jsx(Pd,{open:Oe,isPending:Pe.isPending,error:Ft,onSubmit:qt,onOpenChange:h=>{h||(He(!1),Jt(void 0))}}),Ye&&o.jsx(Ad,{open:!!Ye,blockKey:Ye,initialName:lt.find(h=>h.key===Ye)?.name??Ye,isPending:Pe.isPending,onSubmit:Wt,onOpenChange:h=>{h||zt(null)}}),bt&&o.jsx(Xr,{open:!!bt,onOpenChange:h=>{h||es(null)},pageKey:bt,decofile:k,params:u}),o.jsx(il,{open:!!Fe,onOpenChange:h=>{!h&&!Xs&&Ue(null)},children:o.jsxs(ll,{children:[o.jsxs(rl,{children:[o.jsx(cl,{children:Et?.title??Zt}),o.jsx(dl,{children:Et?.description??null})]}),o.jsxs(ul,{children:[o.jsx(pl,{disabled:Xs,children:l("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(fl,{onClick:h=>{h.preventDefault(),Le()},disabled:Xs,className:je(ml({variant:"destructive"})),children:Xs?o.jsxs(o.Fragment,{children:[o.jsx(mt,{className:"size-3.5"}),l("sandbox.contentBrowser.deleteDialog.deleting")]}):l("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function gm(t){const e=ce.c(59),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:c,canInstallApps:l,installingAppId:d,blogEntries:u,decofile:g,searchQuery:m,onSearchChange:f,selection:p,onSelect:y,onCreate:j,onDuplicatePage:E,onRenamePage:x,onAddPageVariant:S,onDeletePage:C,onEditPageSeo:b,onViewPageJson:v,onDuplicateSection:T,onRenameSection:w,onDeleteSection:_,onDeleteRedirect:O,onDuplicateBlog:B,onDeleteBlog:K}=t,k=Ee();let z,P,I,U,q,Y;if(e[0]!==s||e[1]!==c||e[2]!==r||e[3]!==u||e[4]!==l||e[5]!==g||e[6]!==d||e[7]!==S||e[8]!==j||e[9]!==K||e[10]!==C||e[11]!==O||e[12]!==_||e[13]!==B||e[14]!==E||e[15]!==T||e[16]!==b||e[17]!==x||e[18]!==w||e[19]!==f||e[20]!==y||e[21]!==v||e[22]!==n||e[23]!==a||e[24]!==m||e[25]!==i||e[26]!==p||e[27]!==k){const $=m.toLowerCase(),N=n.filter(D=>!$||D.name.toLowerCase().includes($)||D.path.toLowerCase().includes($)),L=a.filter(D=>!$||D.from.toLowerCase().includes($)||D.to.toLowerCase().includes($)),de=i.filter(D=>!$||D.name.toLowerCase().includes($)||D.key.toLowerCase().includes($)||D.resolveType.toLowerCase().includes($)),ne=r.filter(D=>!$||D.title.toLowerCase().includes($)||D.resolveType.toLowerCase().includes($)||(D.description?.toLowerCase().includes($)??!1)),ie=yf(de),fe=c.filter(D=>!$||D.title.toLowerCase().includes($)||D.app.toLowerCase().includes($)||D.vendor.toLowerCase().includes($)||D.category.toLowerCase().includes($)),ue=u.filter(D=>!$||D.label.toLowerCase().includes($)||D.subtitle.toLowerCase().includes($)),te=s==="categories"&&!$?xf(ue):ue.map(xm),le=`Search ${s}…`,oe=ds(s)?`Create new ${zs[s]}`:s==="redirects"?"Create new redirect":"Create new page",be=s!=="apps"&&s!=="sections";q="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[34]=M):M=e[34];let re;e[35]!==f?(re=D=>f(D.target.value),e[35]=f,e[36]=re):re=e[36];let me;e[37]!==le||e[38]!==m||e[39]!==re?(me=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[M,o.jsx("input",{type:"text",value:m,onChange:re,placeholder:le,"aria-label":le,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[37]=le,e[38]=m,e[39]=re,e[40]=me):me=e[40];let J;e[41]!==oe||e[42]!==j||e[43]!==be?(J=be&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx(De,{variant:"ghost",size:"icon",onClick:j,"aria-label":oe,children:o.jsx(kn,{size:14})})}),o.jsx(St,{side:"bottom",children:oe})]}),e[41]=oe,e[42]=j,e[43]=be,e[44]=J):J=e[44],e[45]!==me||e[46]!==J?(Y=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[me,J]}),e[45]=me,e[46]=J,e[47]=Y):Y=e[47],z=qs,U="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",P="flex flex-col gap-1 p-1.5",I=s==="pages"?N.length===0?o.jsx(Os,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):N.map(D=>{const Z=p?.collection==="pages"&&p.key===D.key,ae=Ia(g,D.key);return o.jsx(jt,{icon:Pa,title:D.name,subtitle:D.path,active:Z,variantCount:ae,onClick:()=>y({collection:"pages",key:D.key,path:D.path}),menu:o.jsx(us,{onDuplicate:()=>E(D),onRename:()=>x(D),onAddVariant:()=>S(D),onEditSeo:()=>b(D),onViewJson:()=>v(D),onDelete:()=>C(D)})},D.key)}):s==="sections"?de.length===0&&ne.length===0?o.jsx(Os,{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:[ie.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(oa,{icon:rn,label:"Saved sections"}),ie.map(D=>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:D.label}),D.sections.map(Z=>{const ae=p?.collection==="sections"&&p.key===Z.key;return o.jsx(jt,{icon:rn,accent:"global",title:Z.name,subtitle:D.label,active:ae,onClick:()=>y({collection:"sections",key:Z.key}),menu:o.jsx(us,{onDuplicate:()=>T(Z),onRename:()=>w(Z),onDelete:()=>_(Z)})},Z.key)})]},D.label))]}),ne.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(oa,{icon:Co,label:"Available sections",className:je(ie.length>0&&"mt-3")}),ne.map(D=>{const Z=p?.collection==="available-section"&&p.resolveType===D.resolveType,ae=D.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(jt,{icon:Co,title:D.title,subtitle:ae??D.resolveType,active:Z,onClick:()=>y({collection:"available-section",resolveType:D.resolveType,title:D.title})},D.resolveType)})]})]}):s==="apps"?fe.length===0?o.jsx(Os,{hasItems:c.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):fe.map(D=>{const Z=p?.collection==="apps"&&D.blockKey!==null&&p.key===D.blockKey||p?.collection==="available-app"&&p.id===D.id,ae=d===D.id;return o.jsx(jt,{icon:oo,logoUrl:D.logo,title:D.title,subtitle:D.category,active:Z,trailing:D.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"}):ae?o.jsx(mt,{className:"size-3.5 shrink-0 text-muted-foreground"}):D.installable&&l?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:()=>y(D.installed&&D.blockKey?{collection:"apps",key:D.blockKey}:{collection:"available-app",id:D.id})},D.id)}):s==="redirects"?L.length===0?o.jsx(Os,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):L.map(D=>o.jsx(jt,{icon:ja,title:D.from||"(no source)",subtitle:`→ ${D.to||"(no target)"}`,active:p?.collection==="redirects"&&p.key===D.key,trailing:o.jsx(Dd,{redirect:D}),onClick:()=>y({collection:"redirects",key:D.key}),menu:o.jsx(us,{onDelete:()=>O(D)})},D.key)):ue.length===0?o.jsx(Os,{hasItems:u.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${ds(s)?zs[s]:"item"}.`}):te.map(D=>{const{entry:Z,depth:ae}=D,ye=p?.collection===Z.kind&&p.key===Z.key;return o.jsx("div",{style:{paddingLeft:ae*16},children:o.jsx(jt,{icon:Z.kind==="posts"?wa:Z.kind==="authors"?Aa:Sa,title:Z.label,invalid:Z.missing.length>0,invalidReason:Z.missing.length>0?k("sandbox.itemRow.missingFields",{fields:Zd(Z.missing,k)}):void 0,warning:Z.duplicateName,warningReason:k("sandbox.itemRow.duplicateName"),subtitle:ae>0?zi(Z.slug??"",ue).map(hm).join(" / "):Z.subtitle,active:ye,onClick:()=>y({collection:Z.kind,key:Z.key}),menu:o.jsx(us,{onDuplicate:()=>B(Z),onDelete:()=>K(Z)})})},Z.key)}),e[0]=s,e[1]=c,e[2]=r,e[3]=u,e[4]=l,e[5]=g,e[6]=d,e[7]=S,e[8]=j,e[9]=K,e[10]=C,e[11]=O,e[12]=_,e[13]=B,e[14]=E,e[15]=T,e[16]=b,e[17]=x,e[18]=w,e[19]=f,e[20]=y,e[21]=v,e[22]=n,e[23]=a,e[24]=m,e[25]=i,e[26]=p,e[27]=k,e[28]=z,e[29]=P,e[30]=I,e[31]=U,e[32]=q,e[33]=Y}else z=e[28],P=e[29],I=e[30],U=e[31],q=e[32],Y=e[33];let Q;e[48]!==P||e[49]!==I?(Q=o.jsx("div",{className:P,children:I}),e[48]=P,e[49]=I,e[50]=Q):Q=e[50];let A;e[51]!==z||e[52]!==U||e[53]!==Q?(A=o.jsx(z,{className:U,children:Q}),e[51]=z,e[52]=U,e[53]=Q,e[54]=A):A=e[54];let G;return e[55]!==q||e[56]!==Y||e[57]!==A?(G=o.jsxs("div",{className:q,children:[Y,A]}),e[55]=q,e[56]=Y,e[57]=A,e[58]=G):G=e[58],G}function hm(t){return t.slug}function xm(t){return{entry:t,depth:0}}function Jg(t){const e=ce.c(25),{virtualMcpId:s}=t,n=Ee(),[a,i]=F.useState(!1),r=Fa(s),{connection:c}=gr(s),{activeTask:l}=eo();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=ga(d);if(!(_o(r?.metadata)||_o(l?.metadata))&&!c){let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(Do,{className:"size-7 text-foreground"})}),e[1]=f):f=e[1];let p;e[2]!==n?(p=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=p):p=e[3];let y;e[4]!==n?(y=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=y):y=e[5];let j,E;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>i(!0),E=o.jsx(Do,{className:"size-4"}),e[6]=j,e[7]=E):(j=e[6],E=e[7]);let x;e[8]!==n?(x=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=x):x=e[9];let S;e[10]!==x?(S=o.jsxs(De,{onClick:j,children:[E,x]}),e[10]=x,e[11]=S):S=e[11];let C;e[12]!==p||e[13]!==y||e[14]!==S?(C=o.jsx(jc,{className:"h-full",image:f,title:p,description:y,actions:S}),e[12]=p,e[13]=y,e[14]=S,e[15]=C):C=e[15];let b;e[16]!==a?(b=o.jsx(wc,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=b):b=e[17];let v;return e[18]!==b||e[19]!==C?(v=o.jsxs(o.Fragment,{children:[C,b]}),e[18]=b,e[19]=C,e[20]=v):v=e[20],v}let m;return e[21]!==u.contentPageId||e[22]!==u.contentPath||e[23]!==u.contentPathTemplate?(m=o.jsx(Ml,{children:o.jsx(fm,{deepLinkPage:{pageId:u.contentPageId,path:u.contentPath,pathTemplate:u.contentPathTemplate}})}),e[21]=u.contentPageId,e[22]=u.contentPath,e[23]=u.contentPathTemplate,e[24]=m):m=e[24],m}export{Wo as $,Gg as A,Ud as B,Jg as C,fu as D,Ug as E,Yg as F,gu as G,Cg as H,ap as I,qg as J,Bi as K,bi as L,ai as M,Cs as N,$g as O,po as P,Pu as Q,Hg as R,ju as S,Og as T,Bg as U,Nu as V,Nn as W,Eu as X,Bd as Y,Rd as Z,$d as _,ou as a,Od as a0,tt as a1,Ld as a2,_g as a3,Ag as a4,Dg as a5,Rg as a6,yu as a7,vu as a8,Au as a9,Vg as aA,mn as aB,Ng as aa,Du as ab,fo as ac,Pg as ad,vi as ae,ki as af,ot as ag,Ig as ah,Tg as ai,pn as aj,Eg as ak,Lg as al,Gs as am,Hn as an,fn as ao,Kg as ap,Fg as aq,au as ar,Xg as as,xf as at,Fi as au,lu as av,Ju as aw,gi as ax,wg as ay,Sg as az,En as b,pt as c,jg as d,Zd as e,na as f,ps as g,zg as h,ht as i,Pi as j,_i as k,di as l,Tn as m,yd as n,Mg as o,Ds as p,hn as q,kg as r,cu as s,li as t,Ga as u,Qg as v,xu as w,ji as x,Wg as y,vg as z};