decocms 4.508.2 → 4.508.4

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 (383) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-D-RxJbDE.js → ActiveShapeUtils-Do0okprW.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-BMMhb7se.js → AlertCircle-YMl3_Yl_.js} +1 -1
  3. package/dist/client/assets/{AreaChart-CsxD2oni.js → AreaChart-BAypsqeY.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DZfjBi-1.js → ArrowLeft-BBs5Bo74.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CEvmL_t8.js → ArrowUp-DOUrgoGa.js} +1 -1
  6. package/dist/client/assets/{BarChart-D15LmJ84.js → BarChart-DPMDQIvn.js} +1 -1
  7. package/dist/client/assets/{Building02-DPyqSZzb.js → Building02-BJ4kuMDR.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CfYtrY4e.js → CategoricalChart-_74WUYe6.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-HwWiMbx-.js → CheckCircle-BJoV2buB.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-DAeUzPm4.js → ChevronSelectorVertical-Cz68Xl4c.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-CWS-cWjT.js → ChevronUp-Bk1lLXIE.js} +1 -1
  12. package/dist/client/assets/{Copy01-D_JDMij1.js → Copy01-DgkTTtAt.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-A84DgQyt.js → CreditCard01-DM-SR88q.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-DHY1JtEf.js → DotsVertical-wwLxtTff.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-CtNs-ihy.js → ErrorBarContext-CMm4ojUf.js} +1 -1
  16. package/dist/client/assets/{Globe04-DdxRTg9B.js → Globe04-BNStynYJ.js} +1 -1
  17. package/dist/client/assets/{Image01-CDAP7qzE.js → Image01-CfFOGALp.js} +1 -1
  18. package/dist/client/assets/{Key01-Uf5NEuCB.js → Key01-C75ijeKM.js} +1 -1
  19. package/dist/client/assets/{Link01-CHcFn0b2.js → Link01-DZOkcwx5.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-CXfqY9XE.js → LinkBroken01-Bt4dCcO2.js} +1 -1
  21. package/dist/client/assets/{Monitor01-BNcbQ2qa.js → Monitor01-BYsgDMs3.js} +1 -1
  22. package/dist/client/assets/{Play-CHyaMX8g.js → Play-i9lPYWvE.js} +1 -1
  23. package/dist/client/assets/{Plus-Bah-JwsW.js → Plus-DvMEY06p.js} +1 -1
  24. package/dist/client/assets/{SearchMd-MjBL5rzF.js → SearchMd-Be0mEQAk.js} +1 -1
  25. package/dist/client/assets/{Sector-B89GhzzG.js → Sector-BbnK4dTm.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-DagopGag.js → ShoppingBag01-1dmzAnTp.js} +1 -1
  27. package/dist/client/assets/{Sun-BTI_jIbq.js → Sun-zvXPMBE6.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-DE-tfdq-.js → SwitchHorizontal01-Ye9lOvkq.js} +1 -1
  29. package/dist/client/assets/{Tool01-CwSqD6lp.js → Tool01-CFZYsvfT.js} +1 -1
  30. package/dist/client/assets/{Trash01-D2hL36nK.js → Trash01-BeM7jMku.js} +1 -1
  31. package/dist/client/assets/{Upload01-jWqQbPqo.js → Upload01-w2_F9E6p.js} +1 -1
  32. package/dist/client/assets/{User01-LL9r5P84.js → User01-CVKWYZvh.js} +1 -1
  33. package/dist/client/assets/{UserSquare-CBISIUJN.js → UserSquare-CZee7kCi.js} +1 -1
  34. package/dist/client/assets/{Users01-Czq9-wm_.js → Users01-Dfk3XUhg.js} +1 -1
  35. package/dist/client/assets/{XAxis-yzY-cqUp.js → XAxis-CTCx1wSy.js} +1 -1
  36. package/dist/client/assets/{XClose-CXmC5YJZ.js → XClose-z6Vm880I.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-BuT7I9z4.js → ZoomOut-BTCRJ-Cy.js} +1 -1
  38. package/dist/client/assets/{access-gate-DfVDyUT3.js → access-gate-CDsloPmK.js} +1 -1
  39. package/dist/client/assets/add-connection-dialog-Bi3ufT8K.js +1 -0
  40. package/dist/client/assets/{agent-analytics-CYGUvllh.js → agent-analytics-C8kutsVm.js} +1 -1
  41. package/dist/client/assets/agent-app-Yvlv8OUJ.js +1 -0
  42. package/dist/client/assets/{agent-assets-DGMOQz9l.js → agent-assets-BowK9M1b.js} +1 -1
  43. package/dist/client/assets/{agent-automation-C74O0YTg.js → agent-automation-BLCp5ZAP.js} +1 -1
  44. package/dist/client/assets/{agent-automations-BaXQ2ROH.js → agent-automations-CPYA5vKD.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-B4FEBTPS.js → agent-connect-sources-C-FzFl_j.js} +1 -1
  46. package/dist/client/assets/agent-deck-tbxjaGnh.js +1 -0
  47. package/dist/client/assets/{agent-e2e-BgmGCxH_.js → agent-e2e-CSrN71BV.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-CakBET_s.js → agent-experiments-X4o8vauF.js} +1 -1
  49. package/dist/client/assets/{agent-file-BIVPqG6z.js → agent-file-DeIpO5wJ.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-BVXWNpzi.js → agent-hosting-CML9q7ez.js} +1 -1
  51. package/dist/client/assets/{agent-icon-DoIYDFcR.js → agent-icon-C8bMTp7B.js} +1 -1
  52. package/dist/client/assets/agent-library-CWWfskFw.js +1 -0
  53. package/dist/client/assets/agent-library-file-Dml0jpbU.js +1 -0
  54. package/dist/client/assets/{agent-monitor-DeSXb556.js → agent-monitor-C4PPbeEw.js} +1 -1
  55. package/dist/client/assets/{agent-overview-apGukpqv.js → agent-overview-DRuOGWFU.js} +1 -1
  56. package/dist/client/assets/{agent-releases-eDyb2peY.js → agent-releases-DJQ-VqZx.js} +1 -1
  57. package/dist/client/assets/agent-settings-B_MufaGe.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-CL9YHsDN.js → agent-site-editor-Bx-vy8B_.js} +1 -1
  59. package/dist/client/assets/agent-site-editor-code-B8R7Wtla.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-CsGWtQ4n.js +1 -0
  61. package/dist/client/assets/agent-site-editor-preview-DCP8klgE.js +1 -0
  62. package/dist/client/assets/agent-view-D9ipKyxN.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-B5G_qpga.js → agent-view-guard-CPOJjbOJ.js} +1 -1
  64. package/dist/client/assets/{agents-list-DU-8Qx92.js → agents-list-CAW5QGFm.js} +1 -1
  65. package/dist/client/assets/{ai-providers-qh6x3Y49.js → ai-providers-DPw03Tv5.js} +1 -1
  66. package/dist/client/assets/{alert-DqfINKxW.js → alert-D-uNQTTi.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-COAq874v.js → alert-dialog-CMQkwBy5.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-CG7WGc54.js → analytics-sections-voXvsjR_.js} +1 -1
  69. package/dist/client/assets/{api-keys-0omNx1ba.js → api-keys-B1SFUATv.js} +1 -1
  70. package/dist/client/assets/api-keys-DLyV_RAq.js +1 -0
  71. package/dist/client/assets/{app-editor-kWMBWy6y.js → app-editor-BPJd1n0b.js} +1 -1
  72. package/dist/client/assets/{asset-utils-BDB3NRek.js → asset-utils-ClMJxMY2.js} +1 -1
  73. package/dist/client/assets/{auth-CTRZgQb-.js → auth-GLn956Rh.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-BIOWkh-6.js → auth-catchall-CWudR4uN.js} +1 -1
  75. package/dist/client/assets/{auth-entry-B8oZOZ2h.js → auth-entry-BSWZ72GZ.js} +1 -1
  76. package/dist/client/assets/{auth-split-layout-BTweO4cZ.js → auth-split-layout-7XWmImJ9.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-BZfH0Yw8.js → authenticate-and-persist-oauth-LJquf42E.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-v1pXn-iB.js → automation-list-row-BN2LAoBC.js} +1 -1
  79. package/dist/client/assets/{automation-runs-Ne5_cxeu.js → automation-runs-BMG8IJWS.js} +1 -1
  80. package/dist/client/assets/{automations-D3_Zrg_q.js → automations-DhWtsuAf.js} +1 -1
  81. package/dist/client/assets/{autosend-Bwz57Oob.js → autosend-BbodPyfC.js} +1 -1
  82. package/dist/client/assets/{avatar-BqzGQX6u.js → avatar-DJQKqNuu.js} +1 -1
  83. package/dist/client/assets/{badge-Dof8RzS5.js → badge-MR8klHHZ.js} +1 -1
  84. package/dist/client/assets/{block-document-DBXQj-83.js → block-document-DSm4TTCl.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-BoXpvUms.js → blocks-preview-workspace-context-4ypFgj0S.js} +1 -1
  86. package/dist/client/assets/{blocks-tab-states-DQZxzX4Q.js → blocks-tab-states-CJcWY_b1.js} +3 -3
  87. package/dist/client/assets/{blog-schema-C8ACKoto.js → blog-schema-H18pdLmj.js} +1 -1
  88. package/dist/client/assets/{board-analytics-BrmOktIG.js → board-analytics-C6ngt6tt.js} +1 -1
  89. package/dist/client/assets/{buckets-9eeIlDfn.js → buckets-D4euYcSc.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-CDIkI8lU.js → build-improve-prompt-doc-CoO7orI7.js} +1 -1
  91. package/dist/client/assets/{calendar-DZ02RkKj.js → calendar-wiEtXR35.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-CC8cnYZP.js → capability-load-error-C2raqeCV.js} +1 -1
  93. package/dist/client/assets/{category-editor-CQpZc_5H.js → category-editor-BGYtTcSc.js} +1 -1
  94. package/dist/client/assets/{chart-BW6KlfF6.js → chart-DjZfpYnm.js} +1 -1
  95. package/dist/client/assets/{chat-context-Cj8lRtpX.js → chat-context-CdCmbIQJ.js} +1 -1
  96. package/dist/client/assets/{chat-draft-DQ7Zh-ge.js → chat-draft-CgdpCv_I.js} +1 -1
  97. package/dist/client/assets/{checkbox-0AX4LQ84.js → checkbox-uUb1TZ3_.js} +1 -1
  98. package/dist/client/assets/{choose-editor-B6viplRi.js → choose-editor-DcyGNhUz.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-Do1GOT_W.js → cli-auth-success-DHg5nYMO.js} +1 -1
  100. package/dist/client/assets/{client-icons-DsqqSWxA.js → client-icons-mOn7n7dj.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-YT1omGZo.js +1 -0
  102. package/dist/client/assets/{collapsible-r6Q1npI9.js → collapsible-Dh7-8yfe.js} +1 -1
  103. package/dist/client/assets/{collection-detail-C5Bqs2Jd.js → collection-detail-aQLEEVEw.js} +1 -1
  104. package/dist/client/assets/{collection-display-button-RxmMTS25.js → collection-display-button-DSw6jPws.js} +1 -1
  105. package/dist/client/assets/{collection-search-8MVX3xhB.js → collection-search-rdO0NJJu.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-B37YzBKC.js → collection-table-wrapper-CoijbpM_.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-iwDSS1Gk.js → collection-tabs-SP_Oxddc.js} +1 -1
  108. package/dist/client/assets/{column-rules-D2p9IS_1.js → column-rules-DAsEXr7d.js} +1 -1
  109. package/dist/client/assets/{combobox-C0MaRkga.js → combobox-pfaZy3ZG.js} +1 -1
  110. package/dist/client/assets/{command-xjp7U_6o.js → command-hZ1y73c0.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-BV-XONoy.js → companion-mcps-section-skIfGpZq.js} +1 -1
  112. package/dist/client/assets/{config-B9YouxLM.js → config-DVhSLh0T.js} +1 -1
  113. package/dist/client/assets/{connect-IDSq72VB.js → connect-C_ZIW7Mx.js} +3 -3
  114. package/dist/client/assets/{connect-layout-D7et0UmH.js → connect-layout-BbudJyMn.js} +1 -1
  115. package/dist/client/assets/{connection-DH8frA39.js → connection-BIr2JVH9.js} +1 -1
  116. package/dist/client/assets/{connection-card-DZ81Xmwr.js → connection-card-BEaJgVph.js} +1 -1
  117. package/dist/client/assets/{connection-detail-CE3d5acT.js → connection-detail-C6anDs4z.js} +1 -1
  118. package/dist/client/assets/{connection-form-helpers-C1GQW3b1.js → connection-form-helpers-D_lEyL1e.js} +1 -1
  119. package/dist/client/assets/connections-98hNurLq.js +1 -0
  120. package/dist/client/assets/{content-tab-BmXoJKLU.js → content-tab-C9fs50zD.js} +3 -3
  121. package/dist/client/assets/{context-DLrJfRf_.js → context-D3Kf7DgO.js} +1 -1
  122. package/dist/client/assets/{context-menu-CP6wQNnB.js → context-menu-Bxz-3ajT.js} +1 -1
  123. package/dist/client/assets/{core.esm-CfFclpx-.js → core.esm-nksLbJN5.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-C9a52N3A.js → create-organization-dialog-B4HWGJxa.js} +1 -1
  125. package/dist/client/assets/{daily-pulse-CKJVb0lm.js → daily-pulse-ByOIhSnv.js} +1 -1
  126. package/dist/client/assets/{discover-Bne5jAe8.js → discover-CSnfzBww.js} +1 -1
  127. package/dist/client/assets/{domain-settings-DbaFaa35.js → domain-settings-CQ4QNOxF.js} +1 -1
  128. package/dist/client/assets/{drawer-Hg3yrLGb.js → drawer-xGVi5OhM.js} +1 -1
  129. package/dist/client/assets/{editor-BoKyJDJr.js → editor-Dy_ud1L1.js} +1 -1
  130. package/dist/client/assets/{editor-classes-DIcJFalo.js → editor-classes-YH9JoFd9.js} +1 -1
  131. package/dist/client/assets/{empty-state-B7ov-HNf.js → empty-state-CJGWBYqN.js} +1 -1
  132. package/dist/client/assets/{empty-state-DJq-iAX2.js → empty-state-Cz6B4cfX.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-DR5UxnLo.js → extract-connection-data-DRmTCuHC.js} +1 -1
  134. package/dist/client/assets/{feature-gate-DdTy43l_.js → feature-gate-BKszmTDe.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-BKP7yW58.js → feature-paywall-DA6siKP6.js} +1 -1
  136. package/dist/client/assets/{file-explorer-DWVj23_e.js → file-explorer-Bj8-dcLm.js} +1 -1
  137. package/dist/client/assets/{file-preview-CBbkYnlR.js → file-preview-4ZiNKW5K.js} +1 -1
  138. package/dist/client/assets/{file-share-button-C4e6XllD.js → file-share-button-CNJUR07u.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-CZja8M5H.js → file-type-icon-DF2XQzPr.js} +1 -1
  140. package/dist/client/assets/flat-project-DZy_ZTjv.js +1 -0
  141. package/dist/client/assets/{folder-icon-BQKNbUFv.js → folder-icon-Cs16oRao.js} +2 -2
  142. package/dist/client/assets/{form-CFTSOQEI.js → form-DySs55Ou.js} +1 -1
  143. package/dist/client/assets/{general-r8uobfp4.js → general-BPkbeaPK.js} +1 -1
  144. package/dist/client/assets/{home-DTX0hiMY.js → home-FCUQpht2.js} +1 -1
  145. package/dist/client/assets/{hosted-publish-feedback-BWgx9bo5.js → hosted-publish-feedback-lNjGqQ6g.js} +1 -1
  146. package/dist/client/assets/{icon-button-Dvd-Hbqj.js → icon-button-CPOdDL6Y.js} +1 -1
  147. package/dist/client/assets/{index-BWHjUaHr.js → index-AHT7ZtVy.js} +2 -2
  148. package/dist/client/assets/{index-CIOaXLDL.js → index-BYa1mVLW.js} +1 -1
  149. package/dist/client/assets/{index-C-jiNxoJ.js → index-BgAqSIQ9.js} +1 -1
  150. package/dist/client/assets/{index-heX1hw3f.js → index-C7p7t5ew.js} +1 -1
  151. package/dist/client/assets/{index-B1Ufb1aQ.js → index-CVl0esKw.js} +1 -1
  152. package/dist/client/assets/{index-CeLJJwaJ.js → index-Cdepno9I.js} +1 -1
  153. package/dist/client/assets/{index-DHzhGJvQ.js → index-CfhVM2cM.js} +1 -1
  154. package/dist/client/assets/{index-DF-kKYGl.js → index-CrrXY2eE.js} +1 -1
  155. package/dist/client/assets/{index-clim2OrQ.js → index-CvlSodIk.js} +1 -1
  156. package/dist/client/assets/{index-_bng8D_D.js → index-D2sS7FG6.js} +1 -1
  157. package/dist/client/assets/{index-Ct_TwK9x.js → index-D99C5_6j.js} +3 -3
  158. package/dist/client/assets/{index-CU9hMVPP.js → index-DOojx7sa.js} +1 -1
  159. package/dist/client/assets/{index-CZSkv8g1.js → index-Dif2W-7O.js} +12 -12
  160. package/dist/client/assets/{index-2nIJkm8M.js → index-Dr0UWvh9.js} +1 -1
  161. package/dist/client/assets/{index-MHwKIq8y.js → index-nIHWX8bm.js} +1 -1
  162. package/dist/client/assets/{index-redirect-BOZEfaWn.js → index-redirect-Btn9PjKY.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-CjCcc5ls.js → infiniteQueryObserver-BXjuz8K2.js} +1 -1
  164. package/dist/client/assets/{infra-billing-Bq30H5aY.js → infra-billing-DI9z4Jjr.js} +1 -1
  165. package/dist/client/assets/{input-0Brs7Osm.js → input-B4pEydDM.js} +1 -1
  166. package/dist/client/assets/{input-r8Bz5MmS.js → input-g6NzGPlJ.js} +3 -3
  167. package/dist/client/assets/{integration-icon-DqgE-XgN.js → integration-icon-Bo8-L4M5.js} +1 -1
  168. package/dist/client/assets/{jira-icon-E17GqNXW.js → jira-icon-IaGvs734.js} +1 -1
  169. package/dist/client/assets/{label-CUvw0CIN.js → label-IXkYcTWD.js} +1 -1
  170. package/dist/client/assets/{layout-CVokJPm0.js → layout-DbYoxrZG.js} +1 -1
  171. package/dist/client/assets/legacy-agents-deep-PUWu6zPr.js +1 -0
  172. package/dist/client/assets/{legacy-main-redirect-DT3xhHw0.js → legacy-main-redirect-jdoGl3ix.js} +1 -1
  173. package/dist/client/assets/library-Ls30yuyv.js +1 -0
  174. package/dist/client/assets/{library-tab-Dy84gmwK.js → library-tab-3b-qKCic.js} +4 -4
  175. package/dist/client/assets/{login-QcR7UU20.js → login-BEN7pxhX.js} +1 -1
  176. package/dist/client/assets/{markdown-xTfJU4ZI.js → markdown-C68Q-mkS.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-D1btqiMZ.js → mcp-app-renderer-CIZFLg7D.js} +2 -2
  178. package/dist/client/assets/{mcp-oauth-BtPQWb1B.js → mcp-oauth-BeIRiHEb.js} +1 -1
  179. package/dist/client/assets/{mcp-oauth-DH-nuezz.js → mcp-oauth-CHRyQMfO.js} +1 -1
  180. package/dist/client/assets/{members-D6LQQPan.js → members-BT6npI53.js} +1 -1
  181. package/dist/client/assets/{memory-CH6cCi6s.js → memory-CQEdfFs7.js} +2 -2
  182. package/dist/client/assets/{mini-report-page-C0yvXh6k.js → mini-report-page-B7fTcWIV.js} +1 -1
  183. package/dist/client/assets/{mock-board-DDkTdvOs.js → mock-board-CzWTHtQg.js} +1 -1
  184. package/dist/client/assets/{monaco-editor-BDxt_U55.js → monaco-editor-BxMZnQ0j.js} +1 -1
  185. package/dist/client/assets/{monitoring-stats-row-B2XpENOy.js → monitoring-stats-row-CJc2UHv-.js} +1 -1
  186. package/dist/client/assets/{multi-select-CwSx1drt.js → multi-select-DCCixFbL.js} +1 -1
  187. package/dist/client/assets/{mustache-BpTVz02q.js → mustache-Pf5TCvpc.js} +1 -1
  188. package/dist/client/assets/{new-project-dialog-Bgi1m0oL.js → new-project-dialog-CCJZJ4cx.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-hU02nAwA.js → oauth-callback-Bnj9kOA5.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-ai-provider-QLMHkdnx.js → oauth-callback-ai-provider-T5CoEa5j.js} +1 -1
  191. package/dist/client/assets/{onboarding-Cty-KWfD.js → onboarding-DC_m0LeJ.js} +1 -1
  192. package/dist/client/assets/{openai-conversation-BcZCHkpI.js → openai-conversation-5qadcFR5.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views-DMA8c-5q.js → optimistic-project-sidebar-views-D1Kl6fn2.js} +1 -1
  194. package/dist/client/assets/{order-monitor-day-9SSoEdDJ.js → order-monitor-day-BpoQIHyT.js} +1 -1
  195. package/dist/client/assets/{organization-choice-Bt6gsmAC.js → organization-choice-Fj9L95X5.js} +1 -1
  196. package/dist/client/assets/{orgs-D38v2z3I.js → orgs-DvP2Fbzy.js} +1 -1
  197. package/dist/client/assets/{page-seo-form-MoeL5f8l.js → page-seo-form-DeFPo_MM.js} +1 -1
  198. package/dist/client/assets/{pair-BYiKssvp.js → pair-DkbJ98yd.js} +2 -2
  199. package/dist/client/assets/{plan-ladder-Cw5p1Mwy.js → plan-ladder-DLtWhNV9.js} +1 -1
  200. package/dist/client/assets/{popover-C8iDLk0p.js → popover-B9mcX7AX.js} +1 -1
  201. package/dist/client/assets/{post-calendar-BVyf6uru.js → post-calendar-Bm3ALphk.js} +1 -1
  202. package/dist/client/assets/{post-editor-DT_NPG5i.js → post-editor-fCE2ygKA.js} +1 -1
  203. package/dist/client/assets/{preview-content-Co5rrOFh.js → preview-content-vzzgIsPe.js} +1 -1
  204. package/dist/client/assets/{preview-dialog-DtIAT7l6.js → preview-dialog-BJxXHGoH.js} +1 -1
  205. package/dist/client/assets/{preview-panel-CpnRAkMY.js → preview-panel-xOgVoxMm.js} +1 -1
  206. package/dist/client/assets/{preview-tab-DgTMXOpj.js → preview-tab-Dm652xT9.js} +3 -3
  207. package/dist/client/assets/{product-picker-dialog-D-IqR-Ql.js → product-picker-dialog-DWIYALRQ.js} +1 -1
  208. package/dist/client/assets/{profile-i8VB2iCd.js → profile-Q5cwMYQL.js} +1 -1
  209. package/dist/client/assets/{project-app-view-CXXBVOpD.js → project-app-view-DO3zbbCD.js} +1 -1
  210. package/dist/client/assets/{project-feed-Cw_fK-6F.js → project-feed-BFpcLtco.js} +1 -1
  211. package/dist/client/assets/{project-icon-DhS5yRKd.js → project-icon-C8H_L08H.js} +1 -1
  212. package/dist/client/assets/project-reports-Bxhr0QQ1.js +1 -0
  213. package/dist/client/assets/project-tasks-AKOhQsig.js +1 -0
  214. package/dist/client/assets/{projects-cmJOOOLF.js → projects-DEclbFjG.js} +1 -1
  215. package/dist/client/assets/{projects-empty-state-B6JPj7Oe.js → projects-empty-state-C2KBtsIf.js} +1 -1
  216. package/dist/client/assets/{prompts-CYQB7-wz.js → prompts-CLRkJ0qi.js} +1 -1
  217. package/dist/client/assets/record-editor-pLb7XSKM.js +1 -0
  218. package/dist/client/assets/{redirect-editor-CMd6JXXo.js → redirect-editor-wGlPT7gU.js} +1 -1
  219. package/dist/client/assets/reports-Bru1Ehpt.js +1 -0
  220. package/dist/client/assets/{reports-CFbL6JTN.js → reports-D2YkXNJX.js} +1 -1
  221. package/dist/client/assets/{reports-onboarding-DqH4QjHV.js → reports-onboarding-C1wmaKGU.js} +1 -1
  222. package/dist/client/assets/{reports-tab-DQLFweaI.js → reports-tab-BbXsic4B.js} +2 -2
  223. package/dist/client/assets/{repositories-COnnRl7S.js → repositories-BZQ0hEYV.js} +1 -1
  224. package/dist/client/assets/{repository-binding-ybDjDNUp.js → repository-binding-CyvRd5qV.js} +1 -1
  225. package/dist/client/assets/{repository-import-picker-WXSDvvSp.js → repository-import-picker-BEUokmWQ.js} +1 -1
  226. package/dist/client/assets/{repository-picker-DjcUFiOj.js → repository-picker-BQRDNsQ9.js} +1 -1
  227. package/dist/client/assets/{require-capability-2HJ_i5E4.js → require-capability-CIDqVr39.js} +1 -1
  228. package/dist/client/assets/{required-auth-layout-CLl69sSm.js → required-auth-layout-D3GDxyGN.js} +1 -1
  229. package/dist/client/assets/{reset-password-DQvc2mt6.js → reset-password-7xw29Cb_.js} +1 -1
  230. package/dist/client/assets/{resizable-CMJt0YLW.js → resizable-iG5rnoHG.js} +1 -1
  231. package/dist/client/assets/{resolve-tab-icon-DKu8QIC5.js → resolve-tab-icon-Bob-1AmU.js} +1 -1
  232. package/dist/client/assets/{review-settings-CLW21L9r.js → review-settings-e0ew1oZC.js} +1 -1
  233. package/dist/client/assets/roles-4Xua_nm2.js +1 -0
  234. package/dist/client/assets/{route-B1IQpxUO.js → route--pxoEQpm.js} +1 -1
  235. package/dist/client/assets/{route-Duqn_32R.js → route-CPEwiWyV.js} +1 -1
  236. package/dist/client/assets/route-DdueqVnh.js +1 -0
  237. package/dist/client/assets/{sandbox-lifecycle-context-4GrxxXe6.js → sandbox-lifecycle-context-C-CFz47M.js} +1 -1
  238. package/dist/client/assets/{schema-BgL0-2qc.js → schema-BXx2mRBE.js} +1 -1
  239. package/dist/client/assets/{schema-wvPEQjTn.js → schema-C5ll25-F.js} +1 -1
  240. package/dist/client/assets/{scroll-area-BHXRD6k2.js → scroll-area-BqNRxpEO.js} +1 -1
  241. package/dist/client/assets/{search-input-DYBHkKHy.js → search-input-CY8uhr2h.js} +1 -1
  242. package/dist/client/assets/{search-toggle-CjCxUJNp.js → search-toggle-jFMMxpdR.js} +1 -1
  243. package/dist/client/assets/{secret-ciphertext-XeQexsho.js → secret-ciphertext-CjSmOPah.js} +1 -1
  244. package/dist/client/assets/{secret-picker-DK8wggZd.js → secret-picker-D1HomEKX.js} +1 -1
  245. package/dist/client/assets/{secrets-CeI-YzZo.js → secrets-DH7X5VYO.js} +1 -1
  246. package/dist/client/assets/{sections-editor-DR1RkMyu.js → sections-editor-CDHC7M7y.js} +1 -1
  247. package/dist/client/assets/{select-sQhsGSu-.js → select-7CSUe0XG.js} +1 -1
  248. package/dist/client/assets/{select-model-D1nthUef.js → select-model-BjwNqROv.js} +1 -1
  249. package/dist/client/assets/{seo-editor-D78PzvWr.js → seo-editor-Dr7lDtmZ.js} +1 -1
  250. package/dist/client/assets/{separator-gOX5vIPs.js → separator-CKAdSnXR.js} +1 -1
  251. package/dist/client/assets/{settings-tab-CEEZGFNi.js → settings-tab-CKx9puNI.js} +1 -1
  252. package/dist/client/assets/{sheet-DINfogR5.js → sheet-CACWDefJ.js} +1 -1
  253. package/dist/client/assets/{shell-layout-DMbUI291.js → shell-layout-C50mG8ul.js} +1 -1
  254. package/dist/client/assets/site-editor-BvzT0A2v.js +1 -0
  255. package/dist/client/assets/{site-editor-toast-CgPR9tqp.js → site-editor-toast-DXKvHmNX.js} +1 -1
  256. package/dist/client/assets/{skills-CR_0rOWx.js → skills-COx4wTRA.js} +1 -1
  257. package/dist/client/assets/{slider-nFJSqbT2.js → slider-DM8rGRqE.js} +1 -1
  258. package/dist/client/assets/{sortable.esm-cWIzqT3V.js → sortable.esm-CkjhjaHY.js} +1 -1
  259. package/dist/client/assets/{sso-Blhpaekp.js → sso-DyShVSqB.js} +1 -1
  260. package/dist/client/assets/{suggestion-aMdELt97.js → suggestion-CBTCrHOQ.js} +1 -1
  261. package/dist/client/assets/{switch-CJCFpusd.js → switch-T6YV-pm3.js} +1 -1
  262. package/dist/client/assets/{symbol-CO_5EjKK.js → symbol-DP13exiV.js} +1 -1
  263. package/dist/client/assets/{synced-repos-Bvd3PATv.js → synced-repos-Dndth70e.js} +1 -1
  264. package/dist/client/assets/{tab-icon-glyph-JHqdP7f7.js → tab-icon-glyph-Dz1DIAPn.js} +1 -1
  265. package/dist/client/assets/{table-DRdIKvpY.js → table-BfrR9UMs.js} +1 -1
  266. package/dist/client/assets/{tabs-Cf_-YArR.js → tabs-CbKrt0S2.js} +1 -1
  267. package/dist/client/assets/{task-board-0Ue5jgdg.js → task-board-BZa1GKE0.js} +1 -1
  268. package/dist/client/assets/{task-route-t8tX6rUG.js → task-route-CNJ0iw1F.js} +1 -1
  269. package/dist/client/assets/{task-status-CYO9VI_T.js → task-status-DW2leJbE.js} +1 -1
  270. package/dist/client/assets/taskboard-analytics-DQ3Lut_K.js +1 -0
  271. package/dist/client/assets/tasks-D8oAlKF0.js +1 -0
  272. package/dist/client/assets/{tasks-Cj4MxONS.js → tasks-DQ0pjGrC.js} +3 -3
  273. package/dist/client/assets/{textarea-CLN5ZJXm.js → textarea-CNnEFoSx.js} +1 -1
  274. package/dist/client/assets/{thread-analytics-BIiGhqGQ.js → thread-analytics-ZCHH_Nri.js} +1 -1
  275. package/dist/client/assets/{thread-intent-C3HjT5Xj.js → thread-intent-BOI8Y8o4.js} +1 -1
  276. package/dist/client/assets/{thread-route-mDsyFTdQ.js → thread-route-B-Pby_vt.js} +1 -1
  277. package/dist/client/assets/{thread-route-BG33ZqmJ.js → thread-route-BOyEsXCk.js} +1 -1
  278. package/dist/client/assets/{thread-sheet-body-BTn10Ub4.js → thread-sheet-body-C-0CATd6.js} +1 -1
  279. package/dist/client/assets/{time-range-picker-nJafq06l.js → time-range-picker-BfPU3zY5.js} +1 -1
  280. package/dist/client/assets/{toggle-group-BprmAdhh.js → toggle-group-BtWsCFES.js} +1 -1
  281. package/dist/client/assets/{tool-namespace-D0YHDA4R.js → tool-namespace-C03gU7a4.js} +1 -1
  282. package/dist/client/assets/{toolbar-icon-button-xCSHXfRQ.js → toolbar-icon-button-DM2-Z3cF.js} +1 -1
  283. package/dist/client/assets/{tooltip-32VKFB9k.js → tooltip-Be6wo5tR.js} +1 -1
  284. package/dist/client/assets/{tooltipContext-9JIIxiU3.js → tooltipContext-CHoA7t3J.js} +1 -1
  285. package/dist/client/assets/{track-DhYq1p0V.js → track-DhucoeXL.js} +1 -1
  286. package/dist/client/assets/{types-lEVFbgsq.js → types-DeNiBNDA.js} +1 -1
  287. package/dist/client/assets/{url-slug-VbfAsI5Y.js → url-slug-CP2sENZ9.js} +1 -1
  288. package/dist/client/assets/{usage-stats-CIXS82Np.js → usage-stats-NOThofFr.js} +1 -1
  289. package/dist/client/assets/{use-ai-providers-Ctjp1uIK.js → use-ai-providers-ByuweJjo.js} +1 -1
  290. package/dist/client/assets/{use-app-takeover-CO5zYn5R.js → use-app-takeover-C671MdMA.js} +1 -1
  291. package/dist/client/assets/{use-automations-DIeU6gsQ.js → use-automations-Bsx_AfnL.js} +1 -1
  292. package/dist/client/assets/{use-autosave-rRAWHjPd.js → use-autosave-CV5uqDU6.js} +1 -1
  293. package/dist/client/assets/{use-chat-navigation-DhD5bi3J.js → use-chat-navigation-CDIbYaJL.js} +1 -1
  294. package/dist/client/assets/{use-clock-tick-BMsmXORk.js → use-clock-tick-C0eQyVp-.js} +1 -1
  295. package/dist/client/assets/{use-connect-companion-Da6INzgN.js → use-connect-companion-DGDOlejH.js} +1 -1
  296. package/dist/client/assets/{use-connection-BLth9eEn.js → use-connection-CsbXqvOQ.js} +1 -1
  297. package/dist/client/assets/{use-content-sync-Bd4G4mdY.js → use-content-sync-CFGjTSUB.js} +1 -1
  298. package/dist/client/assets/{use-copy-CCa7OeKm.js → use-copy-CZnKziVl.js} +1 -1
  299. package/dist/client/assets/{use-create-virtual-mcp-C2pLAEuB.js → use-create-virtual-mcp-c3QhW-xf.js} +1 -1
  300. package/dist/client/assets/{use-date-fns-locale-CcL5071z.js → use-date-fns-locale-ogBq5ptX.js} +1 -1
  301. package/dist/client/assets/{use-debounced-autosave-C6B9pWYA.js → use-debounced-autosave-7_vgJjPo.js} +1 -1
  302. package/dist/client/assets/{use-debounced-value-fkneMIaZ.js → use-debounced-value-DpoC-cU_.js} +1 -1
  303. package/dist/client/assets/{use-deco-credits-DS7Tf9a6.js → use-deco-credits-BrUv9SlN.js} +1 -1
  304. package/dist/client/assets/{use-decopilot-events-BxJpoiX1.js → use-decopilot-events-BjrSXQDA.js} +1 -1
  305. package/dist/client/assets/use-delete-connection-WAxC90wa.js +1 -0
  306. package/dist/client/assets/{use-deployment-admin-DskXlguZ.js → use-deployment-admin-DL0E6NAi.js} +1 -1
  307. package/dist/client/assets/{use-ensure-project-folder-DwQYVXKu.js → use-ensure-project-folder-C01FlVtX.js} +1 -1
  308. package/dist/client/assets/{use-fast-preview-draft-url-C_nsWClq.js → use-fast-preview-draft-url-DhwrLKPA.js} +1 -1
  309. package/dist/client/assets/{use-file-configs-1z12RUIF.js → use-file-configs-CMwZdIta.js} +1 -1
  310. package/dist/client/assets/{use-infinite-scroll-DGbkPvNj.js → use-infinite-scroll-DigXwy5i.js} +1 -1
  311. package/dist/client/assets/{use-join-requests-B3wnRtGK.js → use-join-requests-oF7q4Otk.js} +1 -1
  312. package/dist/client/assets/{use-main-panel-tabs-CCeBS1-S.js → use-main-panel-tabs-CXkHwrfh.js} +1 -1
  313. package/dist/client/assets/{use-mcp-auth-status-VVcRHW9u.js → use-mcp-auth-status-DQX4P5B8.js} +1 -1
  314. package/dist/client/assets/{use-mcp-client-BfRGoTzW.js → use-mcp-client-DvMvMjon.js} +1 -1
  315. package/dist/client/assets/{use-mcp-prompts-qR7FWnTS.js → use-mcp-prompts-DC5dS3tb.js} +1 -1
  316. package/dist/client/assets/{use-mcp-tools-BhjoWME9.js → use-mcp-tools-DrnbDdXf.js} +1 -1
  317. package/dist/client/assets/{use-members-BwfqRX_b.js → use-members-DZr_5YC1.js} +1 -1
  318. package/dist/client/assets/{use-mobile-120ghvW_.js → use-mobile-DhCXGkCo.js} +1 -1
  319. package/dist/client/assets/{use-navigate-to-agent-DbzqtBA0.js → use-navigate-to-agent-NXH_i538.js} +1 -1
  320. package/dist/client/assets/{use-open-billing-url-KtPa2dIG.js → use-open-billing-url-CnPVNS1E.js} +1 -1
  321. package/dist/client/assets/{use-org-auth-client-BdP8iNKS.js → use-org-auth-client-CWCid2nZ.js} +1 -1
  322. package/dist/client/assets/{use-org-fs-QTqb7Okr.js → use-org-fs-TCuMiJqS.js} +1 -1
  323. package/dist/client/assets/{use-org-repo-syncs-CoAaay4n.js → use-org-repo-syncs-D0DfzcB6.js} +1 -1
  324. package/dist/client/assets/{use-org-sso-MuG1ETRW.js → use-org-sso-BOsHFRck.js} +1 -1
  325. package/dist/client/assets/{use-organization-roles-g8-oRN2F.js → use-organization-roles-D7JnP4VD.js} +1 -1
  326. package/dist/client/assets/{use-organization-settings-o1V7Wa6F.js → use-organization-settings-BZyvFOZ-.js} +1 -1
  327. package/dist/client/assets/{use-panel-navigate-CemWnkPa.js → use-panel-navigate-nrEaz6Gi.js} +1 -1
  328. package/dist/client/assets/{use-project-native-view-presence-ChmXhpS6.js → use-project-native-view-presence-B9w77aQ3.js} +1 -1
  329. package/dist/client/assets/{use-project-scope-Bj5Fw44i.js → use-project-scope-D5dOeNxC.js} +1 -1
  330. package/dist/client/assets/{use-recent-apps-D7Xcsq5x.js → use-recent-apps-DzWexLGb.js} +1 -1
  331. package/dist/client/assets/{use-releases-naCWe5wL.js → use-releases--bi23eNi.js} +1 -1
  332. package/dist/client/assets/{use-reports-diagnostic-C-Idaf84.js → use-reports-diagnostic-CADoWmTI.js} +1 -1
  333. package/dist/client/assets/{use-secrets-CLiQ5wZs.js → use-secrets-DXKCpAi9.js} +1 -1
  334. package/dist/client/assets/{use-section-preview-base-WZGrMT2D.js → use-section-preview-base-DE6KaDID.js} +1 -1
  335. package/dist/client/assets/{use-tags-Ct6kcfjS.js → use-tags-CYpMUmsS.js} +1 -1
  336. package/dist/client/assets/{use-task-board-analytics-Bq1Gu0IQ.js → use-task-board-analytics-DrX7uzBH.js} +1 -1
  337. package/dist/client/assets/{use-task-board-events-D0ta6ytV.js → use-task-board-events-DT0qRsJt.js} +1 -1
  338. package/dist/client/assets/{use-task-board-item-prs-D5-t7Lko.js → use-task-board-item-prs-BfbJMKTp.js} +1 -1
  339. package/dist/client/assets/{use-task-board-items-WB5lKJR5.js → use-task-board-items-BBvwxZpr.js} +1 -1
  340. package/dist/client/assets/{use-task-metadata-CK18OHN4.js → use-task-metadata-CqjnZQ0k.js} +1 -1
  341. package/dist/client/assets/{use-thread-analytics-Dgs0VYXH.js → use-thread-analytics-DQv-PLVg.js} +1 -1
  342. package/dist/client/assets/{use-thread-outputs-CEOqf0ak.js → use-thread-outputs-Cb3lONDK.js} +1 -1
  343. package/dist/client/assets/useInfiniteQuery-CuM_l11Q.js +1 -0
  344. package/dist/client/assets/{useQueries-BLoNia4-.js → useQueries-CeLbVBwW.js} +1 -1
  345. package/dist/client/assets/useSuspenseInfiniteQuery-CKyaMnVG.js +1 -0
  346. package/dist/client/assets/{users-B3KJVmrY.js → users-NeWR5kxD.js} +1 -1
  347. package/dist/client/assets/{utils-C8NvNrqd.js → utils-YiUcPnSq.js} +1 -1
  348. package/dist/client/assets/{variant-calendar-C1w6tr_q.js → variant-calendar-Bf8IQ3iq.js} +1 -1
  349. package/dist/client/assets/{variant-draft-pointer-67eSVD17.js → variant-draft-pointer-BsmSByx3.js} +1 -1
  350. package/dist/client/assets/{view-mode-toggle-BVpGihk4.js → view-mode-toggle-Cf7jrZTp.js} +1 -1
  351. package/dist/client/assets/{virtual-mcp-CKi-nCGu.js → virtual-mcp-BpV14YnV.js} +1 -1
  352. package/dist/client/assets/{watch-sse-pool-wst_QhmZ.js → watch-sse-pool-n2RQj1o9.js} +1 -1
  353. package/dist/client/index.html +1 -1
  354. package/dist/server/server.js +643 -643
  355. package/package.json +1 -1
  356. package/dist/client/assets/add-connection-dialog-DKWM5Vkc.js +0 -1
  357. package/dist/client/assets/agent-app-DQkp9d17.js +0 -1
  358. package/dist/client/assets/agent-deck-CiObYYmA.js +0 -1
  359. package/dist/client/assets/agent-library-CIU4SqVG.js +0 -1
  360. package/dist/client/assets/agent-library-file-fqxtwlw1.js +0 -1
  361. package/dist/client/assets/agent-settings-CW4l8h4H.js +0 -1
  362. package/dist/client/assets/agent-site-editor-code-Cv72N_7C.js +0 -2
  363. package/dist/client/assets/agent-site-editor-content-DI480fxw.js +0 -1
  364. package/dist/client/assets/agent-site-editor-preview-DAZGefjP.js +0 -1
  365. package/dist/client/assets/agent-view-D8R6vxuG.js +0 -1
  366. package/dist/client/assets/api-keys-Dot5p8D4.js +0 -1
  367. package/dist/client/assets/cms-settings-editor-DAEqF0HH.js +0 -1
  368. package/dist/client/assets/connections-DGzkZc6x.js +0 -1
  369. package/dist/client/assets/flat-project-PByvJgOG.js +0 -1
  370. package/dist/client/assets/legacy-agents-deep-BIK1B8S3.js +0 -1
  371. package/dist/client/assets/library-DFwlI4e7.js +0 -1
  372. package/dist/client/assets/project-reports-Cu2yvuL1.js +0 -1
  373. package/dist/client/assets/project-tasks-BJUOE1MN.js +0 -1
  374. package/dist/client/assets/record-editor-j1XPMVdF.js +0 -1
  375. package/dist/client/assets/reports-B1A1B8JK.js +0 -1
  376. package/dist/client/assets/roles-DqlJjHyh.js +0 -1
  377. package/dist/client/assets/route-BLPgNvPg.js +0 -1
  378. package/dist/client/assets/site-editor-Dt9vd9bw.js +0 -1
  379. package/dist/client/assets/taskboard-analytics-DuvHsTib.js +0 -1
  380. package/dist/client/assets/tasks-BwS-dzw2.js +0 -1
  381. package/dist/client/assets/use-delete-connection-oxCihnZu.js +0 -1
  382. package/dist/client/assets/useInfiniteQuery-BszgtSKD.js +0 -1
  383. package/dist/client/assets/useSuspenseInfiniteQuery-BhSLtgqL.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as $,b as j,r as E,j as x,l as q,ah as Tt,t as ue,aX as Xe,a2 as vt,m as At,K as Mt,b4 as St,h as Je}from"./index-CZSkv8g1.js";import{a as Ct,n as Ye,E as ie,o as Rt,x as Et,y as P,z as $t,A as _t,B as et,C as N,G as Ee,H as Lt,I as It,J as $e,K as zt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as be,U as Pt,V as Ht,W as jt,X as Nt,Y as Ot,s as Bt,Z as Dt,u as Ft,b as qt}from"./usage-stats-CIXS82Np.js";import{T as _,n as Wt,i as Ut,E as Zt}from"./editor-classes-DIcJFalo.js";import{a as Gt,e as nt,s as Vt,S as Kt}from"./suggestion-aMdELt97.js";import{B as Qt,c as Xt,t as Jt,C as rt,f as Yt,g as _e,s as en,m as Le,a as Ie,b as tn,d as ze,e as nn,h as rn,i as sn,j as an,k as on,l as ln,n as cn}from"./index-CU9hMVPP.js";import{ag as un,ah as hn,aj as dn,Z as pn,bd as fn,aV as gn}from"./agent-icon-DoIYDFcR.js";import{i as mn}from"./SwitchHorizontal01-DE-tfdq-.js";import{i as kn}from"./Link01-CHcFn0b2.js";import{s as bn}from"./Trash01-D2hL36nK.js";import{i as xn,b as wn}from"./use-org-fs-QTqb7Okr.js";import{E as Pe,i as st,c as yn,d as Tn,A as vn,e as An,m as Mn,f as Sn,g as Cn}from"./markdown-xTfJU4ZI.js";import{A as Rn}from"./avatar-BqzGQX6u.js";import{d as En,e as $n,c as _n,C as Ln,b as In}from"./command-xjp7U_6o.js";import{g as zn}from"./get-initials-D-f_fDFw.js";import{u as Pn}from"./use-org-auth-client-BdP8iNKS.js";import{I as Hn}from"./icon-button-Dvd-Hbqj.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Wt(a);if(M===""){g();return}if(!Ut(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=x.jsx(kn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=x.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(Tt,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(bn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let v;return e[27]!==T||e[28]!==b?(v=x.jsxs("div",{className:"relative",children:[T,b]}),e[27]=T,e[28]=b,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-[11px] font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},it=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=Ct(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(Qt,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg border border-border bg-popover p-1 shadow-md","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(un,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(hn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(dn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(pn,{size:14})}),x.jsx(le,{}),it.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(He,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(He,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(fn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:it.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=xn(Pe),r=wn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?yn:Tn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Zn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Rt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Gn(t,e){return ee.getState(t)?.get(e)}function Vn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,b,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,b)=>{T===l&&(m=b+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Et.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Vn(h,Gn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function xe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=xe();function at(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Jn=/^(?:[ \t]*(?:\n|$))+/,Yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ot=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lt=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nr=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct=A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ct).getRegex(),Ae={blockquote:or,code:Yn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:lt,list:ir,newline:Jn,paragraph:ct,table:O,text:rr},je=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),lr={...Ae,lheading:nr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},cr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
1
+ import{c as $,b as j,r as E,j as x,l as q,ah as Tt,t as ue,aX as Xe,a2 as vt,m as At,K as Mt,b4 as St,h as Je}from"./index-Dif2W-7O.js";import{a as Ct,n as Ye,E as ie,o as Rt,x as Et,y as P,z as $t,A as _t,B as et,C as N,G as Ee,H as Lt,I as It,J as $e,K as zt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as be,U as Pt,V as Ht,W as jt,X as Nt,Y as Ot,s as Bt,Z as Dt,u as Ft,b as qt}from"./usage-stats-NOThofFr.js";import{T as _,n as Wt,i as Ut,E as Zt}from"./editor-classes-YH9JoFd9.js";import{a as Gt,e as nt,s as Vt,S as Kt}from"./suggestion-CBTCrHOQ.js";import{B as Qt,c as Xt,t as Jt,C as rt,f as Yt,g as _e,s as en,m as Le,a as Ie,b as tn,d as ze,e as nn,h as rn,i as sn,j as an,k as on,l as ln,n as cn}from"./index-DOojx7sa.js";import{ag as un,ah as hn,aj as dn,Z as pn,bd as fn,aV as gn}from"./agent-icon-C8bMTp7B.js";import{i as mn}from"./SwitchHorizontal01-Ye9lOvkq.js";import{i as kn}from"./Link01-DZOkcwx5.js";import{s as bn}from"./Trash01-BeM7jMku.js";import{i as xn,b as wn}from"./use-org-fs-TCuMiJqS.js";import{E as Pe,i as st,c as yn,d as Tn,A as vn,e as An,m as Mn,f as Sn,g as Cn}from"./markdown-C68Q-mkS.js";import{A as Rn}from"./avatar-DJQKqNuu.js";import{d as En,e as $n,c as _n,C as Ln,b as In}from"./command-hZ1y73c0.js";import{g as zn}from"./get-initials-D-f_fDFw.js";import{u as Pn}from"./use-org-auth-client-CWCid2nZ.js";import{I as Hn}from"./icon-button-CPOdDL6Y.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Wt(a);if(M===""){g();return}if(!Ut(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=x.jsx(kn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=x.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(Tt,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(bn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let v;return e[27]!==T||e[28]!==b?(v=x.jsxs("div",{className:"relative",children:[T,b]}),e[27]=T,e[28]=b,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-[11px] font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},it=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=Ct(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(Qt,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg border border-border bg-popover p-1 shadow-md","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(un,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(hn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(dn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(pn,{size:14})}),x.jsx(le,{}),it.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(He,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(He,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(fn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:it.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=xn(Pe),r=wn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?yn:Tn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Zn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Rt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Gn(t,e){return ee.getState(t)?.get(e)}function Vn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,b,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,b)=>{T===l&&(m=b+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Et.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Vn(h,Gn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function xe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=xe();function at(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Jn=/^(?:[ \t]*(?:\n|$))+/,Yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ot=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lt=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nr=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct=A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ct).getRegex(),Ae={blockquote:or,code:Yn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:lt,list:ir,newline:Jn,paragraph:ct,table:O,text:rr},je=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),lr={...Ae,lheading:nr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},cr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",lt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ur=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ut=/^( {2,}|\\)\n(?!\s*$)/,dr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,pr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),ht=/(?!~)[\p{P}\p{S}]/u,fr=/(?!~)[\s\p{P}\p{S}]/u,gr=/(?:[^\s\p{P}\p{S}]|~)/u,mr=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kr=A(dt,"u").replace(/punct/g,W).getRegex(),br=A(dt,"u").replace(/punct/g,ht).getRegex(),pt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=A(pt,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),wr=A(pt,"gu").replace(/notPunctSpace/g,gr).replace(/punctSpace/g,fr).replace(/punct/g,ht).getRegex(),yr=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Tr=A(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),vr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ar=A(vr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Mr=A(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Sr=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cr=A(ve).replace("(?:-->|$)","-->").getRegex(),Rr=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Cr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Er=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ft=A(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),gt=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),$r=A("reflink|nolink(?!\\()","g").replace("reflink",ft).replace("nolink",gt).getRegex(),Ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Mr,autolink:Sr,blockSkip:mr,br:ut,code:hr,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:kr,emStrongRDelimAst:xr,emStrongRDelimUnd:yr,escape:ur,link:Er,nolink:gt,punctuation:pr,reflink:ft,reflinkSearch:$r,tag:Rr,text:dr,url:O},_r={...Se,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:wr,emStrongLDelim:br,delLDelim:Tr,delRDelim:Ar,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ne).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ne).getRegex()},Lr={...de,br:A(ut).replace("{2,}","*").getRegex(),text:A(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:lr,pedantic:cr},U={normal:Se,gfm:de,breaks:Lr,pedantic:_r},Ir={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Oe=t=>Ir[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Oe)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Oe);return t}function Be(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function De(t,e){let n=t.replace(R.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(R.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(R.slashPipe,"|");return r}function Z(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r&&t.charAt(r-s-1)===e;)s++;return t.slice(0,r-s)}function zr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Pr(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function Fe(t,e,n,r,s){let i=e.href,a=e.title||null,l=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function Hr(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
3
3
  `).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
4
4
  `)}var ne=class{options;rules;lexer;constructor(t){this.options=t||F}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Z(n,`
@@ -1,2 +1,2 @@
1
- import{a2 as X,o as Be,r as k,j as n,K as W,b8 as ie,c as F,aL as Oe,l as H,H as Ae,b as Z,t as ce,h as ue,s as be,v as ye,q as ve,D as Se,d as je,y as de,aM as Ie,B as Ee}from"./index-CZSkv8g1.js";import{u as we,d as $e,b as Ne,f as Fe,T as He,A as ze,i as Ke,c as qe,j as Ge,k as Ue,p as Qe,L as Ve}from"./chat-context-Cj8lRtpX.js";import{b as Ye}from"./sandbox-url-D3mC8qhT.js";import{a as Je}from"./repository-binding-ybDjDNUp.js";import{e as We}from"./backoff-CrEUbyZT.js";import{n as Xe}from"./ArrowUp-CEvmL_t8.js";import{s as Ze,g as Ce,d as et}from"./tool-namespace-D0YHDA4R.js";import{b as se,T as tt,a as st,c as nt}from"./tooltip-32VKFB9k.js";import{d as rt,b as at,a as ot,D as lt}from"./drawer-Hg3yrLGb.js";import{C as it}from"./collection-search-8MVX3xhB.js";import{u as ct}from"./use-mobile-120ghvW_.js";import{u as ut}from"./use-mcp-client-BfRGoTzW.js";import{u as dt,g as ft}from"./use-mcp-prompts-qR7FWnTS.js";import{c as mt,P as pt}from"./usage-stats-CIXS82Np.js";import{T as ht,d as gt,c as xt,e as bt,H as yt}from"./input-r8Bz5MmS.js";import{u as vt,a as St,S as jt,M as fe}from"./pair-BYiKssvp.js";import{a as Et}from"./use-panel-navigate-CemWnkPa.js";import{u as wt}from"./thread-intent-C3HjT5Xj.js";import{N as Nt}from"./index-clim2OrQ.js";import{i as Ct}from"./LinkBroken01-CXfqY9XE.js";import{e as Te}from"./agent-icon-DoIYDFcR.js";import{e as Tt}from"./use-decopilot-events-BxJpoiX1.js";import{u as kt}from"./use-deco-credits-DS7Tf9a6.js";import{F as Pt}from"./feature-paywall-BKP7yW58.js";import{i as Dt}from"./AlertCircle-BMMhb7se.js";function me(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Rt={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ke=k.createContext(Rt),pe=16384;class _t{data="";append(e){this.data+=e,this.data.length>pe&&(this.data=this.data.slice(this.data.length-pe))}get(){return this.data}clear(){this.data=""}}const Lt=1e3,Mt=3e4,Bt=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],ge="log";function Ot(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function At(t){return t===404}async function It(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Bt)});return await e.body?.cancel().catch(()=>{}),At(e.status)}catch{return!1}}function Ds({virtualMcpId:t,branch:e,previewUrl:r=null,enabled:o=!0,children:s}){const{org:a}=X(),l=Be(),i=we()?.taskId??null,[c,u]=k.useState(null),[d,f]=k.useState({phase:"idle"}),[m,S]=k.useState({state:"running"}),[j,E]=k.useState({kind:"unknown"}),[x,b]=k.useState(!1),[C,y]=k.useState([]),[P,g]=k.useState([]),[,D]=k.useState(0),T=k.useRef(new Map),B=k.useRef(new Set),M=k.useRef(new Set),L=k.useRef(null),_=Ot(r),p=Je(t)?.metadata?.runtime?.selected==="deno",w=v=>{let N=T.current.get(v);return N||(N=new _t,T.current.set(v,N)),N};k.useEffect(()=>{if(u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),L.current=null,b(!1),y([]),g([]),T.current.clear(),!t||!e||!o)return;const v=Ye({orgSlug:a.slug,virtualMcpId:t,branch:e,threadId:i??null},"events");let N=!1,$=0,Y=null,q=null,G=null,K=null,z=null,J=null;const Le=R=>{try{const O=JSON.parse(R.data);u(O),O.kind!=="failed"&&(b(!1),$=0),O.kind==="ready"&&oe()}catch(O){console.warn("[vm-events] bad phase payload",O)}},ne=()=>{b(!0),u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),y([]),g([]),T.current.clear()},re=R=>{try{const O=JSON.parse(R.data);if(typeof O.data!="string")return;$=0;const I=O.data.replace(/\r?\n/g,`\r
1
+ import{a2 as X,o as Be,r as k,j as n,K as W,b8 as ie,c as F,aL as Oe,l as H,H as Ae,b as Z,t as ce,h as ue,s as be,v as ye,q as ve,D as Se,d as je,y as de,aM as Ie,B as Ee}from"./index-Dif2W-7O.js";import{u as we,d as $e,b as Ne,f as Fe,T as He,A as ze,i as Ke,c as qe,j as Ge,k as Ue,p as Qe,L as Ve}from"./chat-context-CdCmbIQJ.js";import{b as Ye}from"./sandbox-url-D3mC8qhT.js";import{a as Je}from"./repository-binding-CyvRd5qV.js";import{e as We}from"./backoff-CrEUbyZT.js";import{n as Xe}from"./ArrowUp-DOUrgoGa.js";import{s as Ze,g as Ce,d as et}from"./tool-namespace-C03gU7a4.js";import{b as se,T as tt,a as st,c as nt}from"./tooltip-Be6wo5tR.js";import{d as rt,b as at,a as ot,D as lt}from"./drawer-xGVi5OhM.js";import{C as it}from"./collection-search-rdO0NJJu.js";import{u as ct}from"./use-mobile-DhCXGkCo.js";import{u as ut}from"./use-mcp-client-DvMvMjon.js";import{u as dt,g as ft}from"./use-mcp-prompts-DC5dS3tb.js";import{c as mt,P as pt}from"./usage-stats-NOThofFr.js";import{T as ht,d as gt,c as xt,e as bt,H as yt}from"./input-g6NzGPlJ.js";import{u as vt,a as St,S as jt,M as fe}from"./pair-DkbJ98yd.js";import{a as Et}from"./use-panel-navigate-nrEaz6Gi.js";import{u as wt}from"./thread-intent-BOI8Y8o4.js";import{N as Nt}from"./index-CvlSodIk.js";import{i as Ct}from"./LinkBroken01-Bt4dCcO2.js";import{e as Te}from"./agent-icon-C8bMTp7B.js";import{e as Tt}from"./use-decopilot-events-BjrSXQDA.js";import{u as kt}from"./use-deco-credits-BrUv9SlN.js";import{F as Pt}from"./feature-paywall-DA6siKP6.js";import{i as Dt}from"./AlertCircle-YMl3_Yl_.js";function me(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Rt={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ke=k.createContext(Rt),pe=16384;class _t{data="";append(e){this.data+=e,this.data.length>pe&&(this.data=this.data.slice(this.data.length-pe))}get(){return this.data}clear(){this.data=""}}const Lt=1e3,Mt=3e4,Bt=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],ge="log";function Ot(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function At(t){return t===404}async function It(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Bt)});return await e.body?.cancel().catch(()=>{}),At(e.status)}catch{return!1}}function Ds({virtualMcpId:t,branch:e,previewUrl:r=null,enabled:o=!0,children:s}){const{org:a}=X(),l=Be(),i=we()?.taskId??null,[c,u]=k.useState(null),[d,f]=k.useState({phase:"idle"}),[m,S]=k.useState({state:"running"}),[j,E]=k.useState({kind:"unknown"}),[x,b]=k.useState(!1),[C,y]=k.useState([]),[P,g]=k.useState([]),[,D]=k.useState(0),T=k.useRef(new Map),B=k.useRef(new Set),M=k.useRef(new Set),L=k.useRef(null),_=Ot(r),p=Je(t)?.metadata?.runtime?.selected==="deno",w=v=>{let N=T.current.get(v);return N||(N=new _t,T.current.set(v,N)),N};k.useEffect(()=>{if(u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),L.current=null,b(!1),y([]),g([]),T.current.clear(),!t||!e||!o)return;const v=Ye({orgSlug:a.slug,virtualMcpId:t,branch:e,threadId:i??null},"events");let N=!1,$=0,Y=null,q=null,G=null,K=null,z=null,J=null;const Le=R=>{try{const O=JSON.parse(R.data);u(O),O.kind!=="failed"&&(b(!1),$=0),O.kind==="ready"&&oe()}catch(O){console.warn("[vm-events] bad phase payload",O)}},ne=()=>{b(!0),u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),y([]),g([]),T.current.clear()},re=R=>{try{const O=JSON.parse(R.data);if(typeof O.data!="string")return;$=0;const I=O.data.replace(/\r?\n/g,`\r
2
2
  `);w(O.source).append(I);for(const A of B.current)try{A(O.source,I)}catch{}D(A=>A+1)}catch{}},ae=R=>{const O=R.type;try{const I=JSON.parse(R.data);switch($=0,O){case"lifecycle":{const A=I;f(A.state);const U=`${a.slug}/${t}/${e}`;if(me(A.state.phase)&&!(J&&me(J))){ie(l,a.id);const V=W.decofile(U);l.getQueryData(V)===void 0&&l.invalidateQueries({queryKey:V})}A.state.phase==="running"&&J!=="running"&&(ie(l,a.id),l.invalidateQueries({queryKey:W.decofile(U)}),l.invalidateQueries({queryKey:W.liveMeta(a.slug,t,e)})),J=A.state.phase;const Q=A.state.phase==="running"?A.state.port:null,te=L.current;if(L.current=Q,te!==null&&Q!==null&&te!==Q)for(const V of M.current)try{V()}catch{}return}case"status":S(I);return;case"tasks":{const U=I.active.map(Q=>Q.logName??"").filter(Boolean);g(U);return}case"scripts":y(I.scripts);return;case"branch":{const A=I.meta;E(A);return}case"reload":for(const A of M.current)try{A()}catch{}return;case"file-changed":{const{path:A}=I,U=`${a.slug}/${t}/${e}`;if(A.startsWith(".deco/")||A.includes("/.deco/")){if(!(J==="running"))return;G&&clearTimeout(G),G=setTimeout(()=>{if(G=null,l.invalidateQueries({queryKey:W.decofile(U)}),p)for(const V of M.current)try{V()}catch{}},500)}else q&&clearTimeout(q),q=setTimeout(()=>{q=null,l.invalidateQueries({queryKey:W.liveMeta(a.slug,t,e)})},1e3);return}}}catch{}};function ee(){if(N)return;const R=new EventSource(v);K=R,R.onopen=()=>{},R.onerror=()=>{K===R&&R.readyState===EventSource.CLOSED&&le("studio")},R.addEventListener("phase",Le),R.addEventListener("gone",ne),R.addEventListener(ge,re);for(const O of he)R.addEventListener(O,ae)}function oe(){if(N||!_||z)return;const R=new EventSource(_);z=R;let O=!1;R.onopen=()=>{if(N||z!==R)return;O=!0,$=0;const I=K;K=null,I?.close()},R.onerror=()=>{z===R&&R.readyState===EventSource.CLOSED&&Me(R,O)},R.addEventListener(ge,re);for(const I of he)R.addEventListener(I,ae)}async function Me(R,O){const I=_?await It(_):!1;if(!(N||z!==R)){if(R.close(),z=null,I){ne(),K||ee();return}O&&le("direct")}}function le(R){if(N||Y)return;const O=We(Mt,Lt,$,2,0);$++,Y=setTimeout(()=>{if(Y=null,!N){if(R==="direct"){z?.close(),z=null,oe();return}K?.close(),K=null,ee()}},O)}return ee(),()=>{N=!0,K?.close(),z?.close(),Y&&clearTimeout(Y),q&&clearTimeout(q),G&&clearTimeout(G)}},[t,e,a.slug,a.id,o,i,_,l,p]);const h={phase:c,lifecycle:d,status:m,branch:j,notFound:x,scripts:C,activeProcesses:P,getBuffer:v=>T.current.get(v)?.get()??"",hasData:v=>(T.current.get(v)?.get().length??0)>0,subscribeChunks:v=>(B.current.add(v),()=>{B.current.delete(v)}),subscribeReload:v=>(M.current.add(v),()=>{M.current.delete(v)})};return n.jsx(ke,{value:h,children:s})}function Pe(){return k.use(ke)}function Rs(t){const{subscribeChunks:e}=Pe(),r=k.useRef(t);r.current=t,k.useEffect(()=>e((a,l)=>{r.current?.(a,l)}),[e])}function _s(t){const{subscribeReload:e}=Pe(),r=k.useRef(t);r.current=t,k.useEffect(()=>e(()=>{r.current?.()}),[e])}const xe=3,De="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",$t="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function Re(t){const e=F.c(46),{item:r,onSelect:o,isLoading:s,isDisabled:a,variant:l}=t,i=l===void 0?"pill":l,{prompt:c}=r;let u;if(e[0]!==c._meta||e[1]!==c.name||e[2]!==c.title){const T=Ce(c._meta);u=c.title??et(c.name,T),e[0]=c._meta,e[1]=c.name,e[2]=c.title,e[3]=u}else u=e[3];const d=u,f=c.description||null;if(i==="card"){let T;e[4]!==o||e[5]!==c?(T=()=>o(c),e[4]=o,e[5]=c,e[6]=T):T=e[6];const B=a||s,M=s&&"bg-accent/40",L=(a||s)&&"cursor-not-allowed opacity-50";let _;e[7]!==M||e[8]!==L?(_=H($t,"hover:bg-accent/60 text-foreground",M,L),e[7]=M,e[8]=L,e[9]=_):_=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"font-medium truncate capitalize",children:d}),e[10]=d,e[11]=p):p=e[11];let w;e[12]!==s?(w=s&&n.jsx(ue,{size:"xs"}),e[12]=s,e[13]=w):w=e[13];let h;e[14]!==p||e[15]!==w?(h=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p,w]}),e[14]=p,e[15]=w,e[16]=h):h=e[16];let v;e[17]!==f?(v=f&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=v):v=e[18];let N;return e[19]!==h||e[20]!==v||e[21]!==T||e[22]!==B||e[23]!==_?(N=n.jsxs("button",{type:"button",onClick:T,disabled:B,className:_,children:[h,v]}),e[19]=h,e[20]=v,e[21]=T,e[22]=B,e[23]=_,e[24]=N):N=e[24],N}let m;e[25]!==o||e[26]!==c?(m=()=>o(c),e[25]=o,e[26]=c,e[27]=m):m=e[27];const S=a||s,j=s&&"bg-muted/50",E=(a||s)&&"cursor-not-allowed opacity-50";let x;e[28]!==j||e[29]!==E?(x=H(De,"hover:bg-muted/70 hover:text-foreground",j,E),e[28]=j,e[29]=E,e[30]=x):x=e[30];let b;e[31]!==d?(b=n.jsx("span",{className:"capitalize",children:d}),e[31]=d,e[32]=b):b=e[32];let C;e[33]!==s?(C=s&&n.jsx(ue,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let y;e[35]!==m||e[36]!==S||e[37]!==x||e[38]!==b||e[39]!==C?(y=n.jsx(tt,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:m,disabled:S,className:x,children:[b,C]})}),e[35]=m,e[36]=S,e[37]=x,e[38]=b,e[39]=C,e[40]=y):y=e[40];const P=f??d;let g;e[41]!==P?(g=n.jsx(st,{side:"top",className:"max-w-xs",children:n.jsx("p",{className:"text-xs",children:P})}),e[41]=P,e[42]=g):g=e[42];let D;return e[43]!==y||e[44]!==g?(D=n.jsxs(nt,{delayDuration:400,children:[y,g]}),e[43]=y,e[44]=g,e[45]=D):D=e[45],D}function Ft(t){const e=F.c(61),{items:r,open:o,onOpenChange:s,onSelect:a,loadingPrompt:l}=t,i=Z(),[c,u]=k.useState(""),d=!!l;let f;e[0]!==r||e[1]!==c?(f=c.trim()?r.filter(p=>{const w=c.toLowerCase();return p.prompt.name.toLowerCase().includes(w)||(p.prompt.title??"").toLowerCase().includes(w)||(p.prompt.description??"").toLowerCase().includes(w)}):r,e[0]=r,e[1]=c,e[2]=f):f=e[2];const m=f,S=ct();let j;e[3]!==m.length||e[4]!==c||e[5]!==i?(j=m.length===0&&n.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:i("chat.iceBreakers.noPromptsMatch",{search:c})}),e[3]=m.length,e[4]=c,e[5]=i,e[6]=j):j=e[6];let E;if(e[7]!==m||e[8]!==d||e[9]!==l?.name||e[10]!==s||e[11]!==a){let p;e[13]!==d||e[14]!==l?.name||e[15]!==s||e[16]!==a?(p=w=>n.jsx(Re,{item:w,variant:"card",onSelect:h=>{s(!1),a(h)},isLoading:l?.name===w.prompt.name,isDisabled:d&&l?.name!==w.prompt.name},w.prompt.name),e[13]=d,e[14]=l?.name,e[15]=s,e[16]=a,e[17]=p):p=e[17],E=m.map(p),e[7]=m,e[8]=d,e[9]=l?.name,e[10]=s,e[11]=a,e[12]=E}else E=e[12];let x;e[18]!==j||e[19]!==E?(x=n.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[j,E]})}),e[18]=j,e[19]=E,e[20]=x):x=e[20];const b=x;let C;e[21]!==i?(C=i("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=i,e[22]=C):C=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=p=>{p.key==="Escape"&&u("")},e[23]=y):y=e[23];let P;e[24]!==c||e[25]!==C?(P=n.jsx(it,{value:c,onChange:u,placeholder:C,onKeyDown:y}),e[24]=c,e[25]=C,e[26]=P):P=e[26];const g=P;if(S){let p;e[27]!==i?(p=i("chat.iceBreakers.allPromptsTitle"),e[27]=i,e[28]=p):p=e[28];let w;e[29]!==p?(w=n.jsx(rt,{className:"sr-only",children:n.jsx(at,{children:p})}),e[29]=p,e[30]=w):w=e[30];let h;e[31]!==i?(h=i("chat.iceBreakers.promptsLabel"),e[31]=i,e[32]=h):h=e[32];let v;e[33]!==h?(v=n.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:n.jsx("span",{className:"text-sm font-medium text-foreground",children:h})}),e[33]=h,e[34]=v):v=e[34];let N;e[35]!==b||e[36]!==g||e[37]!==v||e[38]!==w?(N=n.jsxs(ot,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[w,v,g,b]}),e[35]=b,e[36]=g,e[37]=v,e[38]=w,e[39]=N):N=e[39];let $;return e[40]!==s||e[41]!==o||e[42]!==N?($=n.jsx(se,{delayDuration:400,children:n.jsx(lt,{open:o,onOpenChange:s,children:N})}),e[40]=s,e[41]=o,e[42]=N,e[43]=$):$=e[43],$}let D;e[44]!==i?(D=i("chat.iceBreakers.allPromptsTitle"),e[44]=i,e[45]=D):D=e[45];let T;e[46]!==D?(T=n.jsx(be,{className:"sr-only",children:n.jsx(ye,{children:D})}),e[46]=D,e[47]=T):T=e[47];let B;e[48]!==i?(B=i("chat.iceBreakers.promptsLabel"),e[48]=i,e[49]=B):B=e[49];let M;e[50]!==B?(M=n.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:n.jsx("span",{className:"text-sm font-medium text-foreground",children:B})}),e[50]=B,e[51]=M):M=e[51];let L;e[52]!==b||e[53]!==g||e[54]!==M||e[55]!==T?(L=n.jsxs(ve,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[T,M,g,b]}),e[52]=b,e[53]=g,e[54]=M,e[55]=T,e[56]=L):L=e[56];let _;return e[57]!==s||e[58]!==o||e[59]!==L?(_=n.jsx(se,{delayDuration:400,children:n.jsx(Se,{open:o,onOpenChange:s,children:L})}),e[57]=s,e[58]=o,e[59]=L,e[60]=_):_=e[60],_}function Ht(t){const e=F.c(30),{items:r,onSelect:o,loadingPrompt:s,className:a}=t,l=Z(),[i,c]=k.useState(!1);if(r.length===0)return null;let u,d,f,m,S;if(e[0]!==a||e[1]!==r||e[2]!==s||e[3]!==o||e[4]!==l){const b=r.slice(0,xe),C=r.slice(xe),y=!!s;let P;e[10]!==y||e[11]!==s?.name||e[12]!==o?(P=D=>n.jsx(Re,{item:D,onSelect:o,isLoading:s?.name===D.prompt.name,isDisabled:y&&s?.name!==D.prompt.name},D.prompt.name),e[10]=y,e[11]=s?.name,e[12]=o,e[13]=P):P=e[13];const g=b.map(P);u=se,S=400,e[14]!==a?(d=H("w-full flex flex-wrap gap-2 justify-center",a),e[14]=a,e[15]=d):d=e[15],f=g,m=C.length>0&&n.jsx("button",{type:"button",disabled:y,onClick:()=>c(!0),className:H(De,"hover:bg-muted/70 hover:text-foreground",y&&"opacity-50 cursor-not-allowed"),children:l("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=m,e[9]=S}else u=e[5],d=e[6],f=e[7],m=e[8],S=e[9];let j;e[16]!==d||e[17]!==f||e[18]!==m?(j=n.jsxs("div",{className:d,children:[f,m]}),e[16]=d,e[17]=f,e[18]=m,e[19]=j):j=e[19];let E;e[20]!==r||e[21]!==s||e[22]!==i||e[23]!==o?(E=n.jsx(Ft,{items:r,open:i,onOpenChange:c,onSelect:o,loadingPrompt:s}),e[20]=r,e[21]=s,e[22]=i,e[23]=o,e[24]=E):E=e[24];let x;return e[25]!==u||e[26]!==S||e[27]!==j||e[28]!==E?(x=n.jsxs(u,{delayDuration:S,children:[j,E]}),e[25]=u,e[26]=S,e[27]=j,e[28]=E,e[29]=x):x=e[29],x}function zt(){return null}function Kt(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function qt(t){const e=F.c(31),{connectionId:r}=t,o=Z(),{sendMessage:s}=Ne(),{org:a}=X();let l;e[0]!==r||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:r,orgId:a.id,orgSlug:a.slug},e[0]=r,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const i=ut(l);let c;e[4]!==i?(c={client:i,staleTime:6e4},e[4]=i,e[5]=c):c=e[5];const{data:u}=dt(c);let d;e[6]!==u?.prompts?(d=u?.prompts??[],e[6]=u?.prompts,e[7]=d):d=e[7];const f=d;let m;e[8]!==f?(m=f.map(Gt),e[8]=f,e[9]=m):m=e[9];const S=m;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j={stage:"idle"},e[10]=j):j=e[10];const[E,x]=k.useReducer(Kt,j),[b,C]=k.useState(null);let y;e[11]!==i||e[12]!==s||e[13]!==o?(y=async(h,v)=>{if(!i){ce.error(o("chat.iceBreakers.mcpClientNotAvailable")),x({type:"RESET"});return}try{const N=await ft(i,h.name,v);x({type:"RESET"});const $={type:"doc",content:[{type:"paragraph",content:[mt({id:h.name,name:Ze(h.name,Ce(h._meta)),metadata:N.messages,char:"/",kind:"prompt",args:v}),{type:"text",text:" "}]}]};await s($)}catch(N){console.error("[ice-breakers] Failed to fetch prompt:",N),ce.error(o("chat.iceBreakers.failedToLoadPrompt")),x({type:"RESET"})}},e[11]=i,e[12]=s,e[13]=o,e[14]=y):y=e[14];const P=y;let g;e[15]!==P?(g=async h=>{if(h.arguments&&h.arguments.length>0){x({type:"SELECT_PROMPT",prompt:h}),C(h);return}x({type:"START_LOADING",prompt:h}),await P(h)},e[15]=P,e[16]=g):g=e[16];const D=g;let T;e[17]!==b||e[18]!==P?(T=async h=>{b&&(x({type:"START_LOADING",prompt:b,arguments:h}),C(null),await P(b,h))},e[17]=b,e[18]=P,e[19]=T):T=e[19];const B=T;if(S.length===0)return null;const M=E.stage==="loading"?E.prompt:null;let L;e[20]!==D||e[21]!==S||e[22]!==M?(L=n.jsx(Ht,{items:S,onSelect:D,loadingPrompt:M}),e[20]=D,e[21]=S,e[22]=M,e[23]=L):L=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{C(null),x({type:"RESET"})},e[24]=_):_=e[24];let p;e[25]!==b||e[26]!==B?(p=n.jsx(pt,{prompt:b,setPrompt:_,onSubmit:B}),e[25]=b,e[26]=B,e[27]=p):p=e[27];let w;return e[28]!==L||e[29]!==p?(w=n.jsxs(n.Fragment,{children:[L,p]}),e[28]=L,e[29]=p,e[30]=w):w=e[30],w}function Gt(t){return{prompt:t}}function Ut(t){const e=F.c(13),{className:r}=t,{selectedVirtualMcp:o}=$e(),{org:s}=X();let a;e[0]!==s.id?(a=Oe(s.id),e[0]=s.id,e[1]=a):a=e[1];const l=a.id,i=o?.id??l;let c;e[2]!==r?(c=H("w-full @container",r),e[2]=r,e[3]=c):c=e[3];const u=i??"default";let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(zt,{}),e[4]=d):d=e[4];let f;e[5]!==i?(f=n.jsx(qt,{connectionId:i}),e[5]=i,e[6]=f):f=e[6];let m;e[7]!==u||e[8]!==f?(m=n.jsx(Ae,{fallback:null,children:n.jsx(k.Suspense,{fallback:d,children:f},u)}),e[7]=u,e[8]=f,e[9]=m):m=e[9];let S;return e[10]!==c||e[11]!==m?(S=n.jsx("div",{className:c,children:m}),e[10]=c,e[11]=m,e[12]=S):S=e[12],S}function Qt(t){let e=0;for(const r of t)for(const o of r.parts??[]){const s=o;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function Vt(){const t=F.c(8),{openPanel:e}=Et(),r=wt(),o=Fe()?.messages??[],s=we()?.taskId??null;let a;t[0]!==o?(a=Qt(o),t[0]=o,t[1]=a):a=t[1];const l=a,i=k.useRef(null),c=k.useRef(null);let u,d;t[2]!==l||t[3]!==r||t[4]!==e||t[5]!==s?(u=()=>{if(!l||!s)return;const f=`${s}:${l}`;c.current!==f&&(c.current=f,r?.refreshThreadMetadata(s)),i.current!==s&&(i.current=s,e("site-editor"))},d=[l,s,e,r],t[2]=l,t[3]=r,t[4]=e,t[5]=s,t[6]=u,t[7]=d):(u=t[6],d=t[7]),k.useEffect(u,d)}function _e(t){return`deco-credits-empty-dismissed:${t}`}function Ls(t){try{return localStorage.getItem(_e(t))==="1"}catch{return!1}}function Yt(){const t=F.c(56),e=Z(),{org:r}=X(),o=Tt("credits"),s=je(),{decoKeyId:a}=kt(),[l,i]=k.useState(!0);let c;t[0]!==r.id?(c=()=>{de("credits_empty_state_dismissed",{organization_id:r.id}),i(!1);try{localStorage.setItem(_e(r.id),"1")}catch{}},t[0]=r.id,t[1]=c):c=t[1];const u=c;let d,f;if(t[2]!==l||t[3]!==r.id?(d=()=>{l&&de("credits_empty_state_shown",{organization_id:r.id})},f=[l,r.id],t[2]=l,t[3]=r.id,t[4]=d,t[5]=f):(d=t[4],f=t[5]),k.useEffect(d,f),!l)return null;if(!o){let h;t[6]!==e?(h=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=h):h=t[7];let v;t[8]!==h?(v={title:h},t[8]=h,t[9]=v):v=t[9];let N;return t[10]!==u||t[11]!==v?(N=n.jsx(Pt,{feature:"chat",copy:v,onDismiss:u}),t[10]=u,t[11]=v,t[12]=N):N=t[12],N}let m;t[13]!==u?(m=h=>!h&&u(),t[13]=u,t[14]=m):m=t[14];let S;t[15]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=S):S=t[15];let j;t[16]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:n.jsx(Te,{size:20,className:"text-warning"})}),t[16]=j):j=t[16];let E;t[17]!==e?(E=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=E):E=t[18];let x;t[19]!==E?(x=n.jsx(ye,{className:"text-lg font-semibold",children:E}),t[19]=E,t[20]=x):x=t[20];let b;t[21]!==e?(b=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=b):b=t[22];let C;t[23]!==b?(C=n.jsx(Ie,{className:"mt-2 text-[13px] leading-relaxed max-w-[320px] mx-auto",children:b}),t[23]=b,t[24]=C):C=t[24];let y;t[25]!==x||t[26]!==C?(y=n.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[S,n.jsxs(be,{className:"relative gap-3",children:[j,n.jsxs("div",{className:"text-center",children:[x,C]})]})]}),t[25]=x,t[26]=C,t[27]=y):y=t[27];let P;t[28]!==a||t[29]!==u?(P=a&&n.jsx("div",{className:"px-6 pb-5",children:n.jsx(ht,{source:"empty_state",onDone:u})}),t[28]=a,t[29]=u,t[30]=P):P=t[30];let g;t[31]!==u||t[32]!==s||t[33]!==r.slug?(g=()=>{s({to:"/$org/settings/ai-providers",params:{org:r.slug}}),u()},t[31]=u,t[32]=s,t[33]=r.slug,t[34]=g):g=t[34];let D;t[35]!==e?(D=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=D):D=t[36];let T;t[37]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Ct,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=T):T=t[37];let B;t[38]!==g||t[39]!==D?(B=n.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:g,children:[D,T]}),t[38]=g,t[39]=D,t[40]=B):B=t[40];let M;t[41]!==e?(M=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=M):M=t[42];let L;t[43]!==u||t[44]!==M?(L=n.jsx(Ee,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:u,children:M}),t[43]=u,t[44]=M,t[45]=L):L=t[45];let _;t[46]!==B||t[47]!==L?(_=n.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[B,L]}),t[46]=B,t[47]=L,t[48]=_):_=t[48];let p;t[49]!==y||t[50]!==P||t[51]!==_?(p=n.jsxs(ve,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Jt,children:[y,P,_]}),t[49]=y,t[50]=P,t[51]=_,t[52]=p):p=t[52];let w;return t[53]!==p||t[54]!==m?(w=n.jsx(Se,{open:!0,onOpenChange:m,children:p}),t[53]=p,t[54]=m,t[55]=w):w=t[55],w}function Jt(t){return t.preventDefault()}function Wt(t){const e=F.c(6),{balanceDollars:r}=t;let o;e[0]!==r?(o=r.toFixed(2),e[0]=r,e[1]=o):o=e[1];const s=o;let a,l;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),l=n.jsx(Te,{size:13,className:"text-success"}),e[2]=a,e[3]=l):(a=e[2],l=e[3]);let i;return e[4]!==s?(i=n.jsxs("div",{className:a,children:[l,n.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=i):i=e[5],i}function Xt(){const t=F.c(8),{org:e}=X(),r=je();let o;t[0]!==r||t[1]!==e.slug?(o=()=>r({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=r,t[1]=e.slug,t[2]=o):o=t[2];let s,a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=n.jsx(Dt,{size:13,className:"text-warning"}),l=n.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=a,t[5]=l):(s=t[3],a=t[4],l=t[5]);let i;return t[6]!==o?(i=n.jsxs("button",{type:"button",onClick:o,className:s,children:[a,l]}),t[6]=o,t[7]=i):i=t[7],i}function Zt(t){const e=F.c(7),{scrollRef:r,sentinelRef:o,hasMoreOlder:s,isFetchingOlder:a,fetchOlderMessages:l}=t;let i,c;e[0]!==l||e[1]!==s||e[2]!==a||e[3]!==r||e[4]!==o?(i=()=>{const u=o.current,d=r.current;if(!u||!d||!s)return;const f=new IntersectionObserver(async m=>{if(!m[0]?.isIntersecting||a||!s)return;const j=d.scrollHeight,E=d.scrollTop;await l(),requestAnimationFrame(()=>{const x=d.scrollHeight;d.scrollTop=E+(x-j)})},{root:d,rootMargin:"200px 0px 0px 0px"});return f.observe(u),()=>f.disconnect()},c=[r,o,s,a,l],e[0]=l,e[1]=s,e[2]=a,e[3]=r,e[4]=o,e[5]=i,e[6]=c):(i=e[5],c=e[6]),k.useEffect(i,c)}function es(t){const e=F.c(5),{className:r,children:o}=t;let s;e[0]!==r?(s=H("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",r),e[0]=r,e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==s?(a=n.jsx("div",{className:s,children:o}),e[2]=o,e[3]=s,e[4]=a):a=e[4],a}function ts(t){const e=F.c(5),{children:r,className:o}=t;let s;e[0]!==o?(s=H("flex-1 min-h-0 overflow-y-auto isolate",o),e[0]=o,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=n.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}function ss(t){const e=F.c(2),{children:r}=t;let o;return e[0]!==r?(o=n.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:r}),e[0]=r,e[1]=o):o=e[1],o}function ns(){const t=Z(),{messages:e,status:r,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:a,isRunInProgress:l}=Ne(),{taskId:i}=qe();Vt();const c=Ge(i??""),u=Ue(c),d=u.size===0?e:e.filter(g=>!u.has(g.id)),f=Qe(d,r==="submitted"||r==="streaming"||l),m=f.visible,S=vt(m),j=S.at(-1),x=bt()*yt+16,b=k.useRef(null),C=k.useRef(null);Zt({scrollRef:b,sentinelRef:C,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:a});const y=St({initial:!1}),P=g=>{b.current=g,y.scrollRef(g)};return n.jsx(Ve.Provider,{value:f,children:n.jsx(jt,{messages:e,children:n.jsxs("div",{className:"relative h-full w-full min-w-0",children:[n.jsx("div",{ref:P,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:x},children:n.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[n.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[n.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&n.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),S.slice(0,-1).map((g,D)=>n.jsx(fe,{pair:g,isLastPair:!1,status:D===S.length-1?r:void 0},`pair-${g.user?.id??g.assistant?.id}`))]}),j&&n.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:n.jsx(fe,{pair:j,isLastPair:!0,status:r},`pair-${j.user?.id??j.assistant?.id}`)})]})}),!y.isAtBottom&&n.jsx(Ee,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-md animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:x+8},onClick:()=>{y.scrollToBottom()},children:n.jsx(Xe,{size:14})})]})})})}function rs(t){const e=F.c(5),{children:r,className:o}=t;let s;e[0]!==o?(s=H("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",o),e[0]=o,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=n.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}const Ms=Object.assign(es,{Main:ts,Messages:ns,EmptyState:ss,Footer:rs,Input:xt,Provider:Ke,ActiveTaskProvider:ze,ThreadlessProvider:He,IceBreakers:Ut,NoAiProviderEmptyState:Nt,CreditsEmptyState:Yt,CreditsEyebrow:Wt,NoCreditsEyebrow:Xt,CreditsExhaustedBanner:gt});export{Ms as C,Ds as S,Rs as a,_s as b,me as i,Pe as u,Ls as w};