decocms 4.613.2 → 4.613.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/dist/client/assets/{AlertCircle-Dq-KNxM5.js → AlertCircle-DwSzq5uM.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DJZ5kkMZ.js → AreaChart-BD53lHXN.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-Dqn2bT_w.js → ArrowLeft-BqHCgh-K.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CAgDickW.js → ArrowRight-BTBfkPne.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-4sBBKZzK.js → ArrowUp-CZDDSEah.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-B7HgfzTg.js → BookOpen01-C9k43IqJ.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-C6F39bSp.js → CartesianChart-CEwlJSS3.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-C1JOIphb.js → CategoricalChart-BxKUKwEU.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-C_Ajm69Q.js → CheckCircle-CQXVMLht.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CTfQz_yW.js → ChevronDown-OTI5djzn.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-wx6gpppj.js → ChevronSelectorVertical-rhJDM4Rj.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-Bg3xtRAf.js → ChevronUp-B1aDls8C.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CB7PvVHx.js → CreditCard01-BRLPBJsI.js} +1 -1
  14. package/dist/client/assets/{Eye-DlR25mJG.js → Eye-B7bHPNlI.js} +1 -1
  15. package/dist/client/assets/{File02-B5-QN1Dl.js → File02-C0PbxigR.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-CN5vYo8p.js → Fingerprint04-CgXsJGLm.js} +1 -1
  17. package/dist/client/assets/{Globe04-H2BdZ0Ti.js → Globe04-BigCPaEo.js} +1 -1
  18. package/dist/client/assets/{Image01-BFqudZKw.js → Image01-R03ky3hy.js} +1 -1
  19. package/dist/client/assets/{Key01-DIFUZKO4.js → Key01-BKbEnhve.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-D8DREd3Q.js → LayoutLeft-CwLIeRIW.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-OtZzvuyI.js → LinkBroken01-30jdc1Ee.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-DiHU7gWc.js → MessageCircle01-DzETEiuY.js} +1 -1
  23. package/dist/client/assets/{Minus-C-L0uUsK.js → Minus-CJw7hyKt.js} +1 -1
  24. package/dist/client/assets/{Monitor01-Dd5mByvl.js → Monitor01-CILX5aJF.js} +1 -1
  25. package/dist/client/assets/{Play-Cz8nUNXY.js → Play-CupXu5V-.js} +1 -1
  26. package/dist/client/assets/{Plus-Hrr9Aktn.js → Plus-johmxWOE.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-DVi6s9_q.js → ReferenceLine-c20DchWo.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Bw_DK2gP.js → SearchMd-BF4D-OIS.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BcP4nQLO.js → ShoppingBag01-BeLSpVUq.js} +1 -1
  30. package/dist/client/assets/{Sun-BBMaxO6y.js → Sun-Dionl9S8.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DLzxh9Gd.js → SwitchHorizontal01-DbeDoxGW.js} +1 -1
  32. package/dist/client/assets/{Tool01-nVLtxvHv.js → Tool01-m86Phkll.js} +1 -1
  33. package/dist/client/assets/{Tooltip-B1HSol_f.js → Tooltip-CVw2D6V4.js} +1 -1
  34. package/dist/client/assets/{Trash01-Dh6D7ABD.js → Trash01-CEWo4AIU.js} +1 -1
  35. package/dist/client/assets/{Upload01-CuWxQjza.js → Upload01-sC3bIoAL.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-C0gKOYWe.js → UserCheck01-C8hLtzy2.js} +1 -1
  37. package/dist/client/assets/{UserSquare-DqYKKMSn.js → UserSquare-BhtzcYE8.js} +1 -1
  38. package/dist/client/assets/{Users01-BFb0vp-t.js → Users01-CDP9kGkf.js} +1 -1
  39. package/dist/client/assets/{XClose-CcNfsDjh.js → XClose-BMX-96qf.js} +1 -1
  40. package/dist/client/assets/{Zap-Dg9_Uuep.js → Zap-qmAhMIUT.js} +1 -1
  41. package/dist/client/assets/{access-gate-B0BUDTBB.js → access-gate-CGN7GdVX.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-D8yvZRqW.js → add-connection-dialog-h-WyH-Sw.js} +1 -1
  43. package/dist/client/assets/agent-app-BBW_INrK.js +1 -0
  44. package/dist/client/assets/{agent-assets-D4pZ70ME.js → agent-assets-Df94PYf8.js} +1 -1
  45. package/dist/client/assets/{agent-automation-Bou8c436.js → agent-automation-Z7tLCfNl.js} +1 -1
  46. package/dist/client/assets/{agent-automations-9MMhBcJW.js → agent-automations-CVFz5oDL.js} +1 -1
  47. package/dist/client/assets/{agent-blog-BB8ao3RW.js → agent-blog-Q_WLGWXC.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-CYDyrSUs.js → agent-blog-post-iwA32IPU.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-BTaC_R0K.js → agent-business-case-CiI2Xczo.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-COMylNyr.js → agent-calendar-CqR5W-Hq.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-B548bjTr.js → agent-capabilities-DXLNgo1M.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-CoXgdwS0.js → agent-connect-sources-CvAK-T0n.js} +1 -1
  53. package/dist/client/assets/agent-deck-BF1dU-8v.js +1 -0
  54. package/dist/client/assets/{agent-e2e-C65B8hGv.js → agent-e2e-DByjXXAj.js} +1 -1
  55. package/dist/client/assets/agent-experiments-CL3b9etx.js +1 -0
  56. package/dist/client/assets/agent-file-C2ZLB1fH.js +1 -0
  57. package/dist/client/assets/{agent-hosting-D4Z6xzJ7.js → agent-hosting-DixRZ6Ox.js} +1 -1
  58. package/dist/client/assets/{agent-icon-TiRfS6qN.js → agent-icon-Cm7N0-bv.js} +1 -1
  59. package/dist/client/assets/agent-library-COseJA1F.js +1 -0
  60. package/dist/client/assets/agent-library-file-BdbaxSWq.js +1 -0
  61. package/dist/client/assets/agent-overview-VRlh06Tf.js +1 -0
  62. package/dist/client/assets/{agent-releases-ChNVOFY0.js → agent-releases-DKxTF8La.js} +1 -1
  63. package/dist/client/assets/agent-settings-D75BvE5p.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-DeBHGJyd.js → agent-site-editor-CtRdDBZU.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-Cndvt_wh.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-CxAWxJNJ.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-DSNRZjpy.js +1 -0
  68. package/dist/client/assets/agent-view-LYcQ2dD7.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-6uqg13NS.js → agent-view-guard-ChA4W9VC.js} +1 -1
  70. package/dist/client/assets/{ai-providers-CU_EzZfp.js → ai-providers-BH-Mkyt5.js} +1 -1
  71. package/dist/client/assets/{alert-BAKJ5tDY.js → alert-DgZIrBNI.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-kXxFHR8K.js → analytics-sections-CJWXX2N_.js} +1 -1
  73. package/dist/client/assets/{api-keys-F_tbBvf0.js → api-keys-CN9LMJJs.js} +1 -1
  74. package/dist/client/assets/api-keys-CZQLoHQl.js +1 -0
  75. package/dist/client/assets/{app-editor-CBnearTx.js → app-editor-Dz4PZ47n.js} +1 -1
  76. package/dist/client/assets/{asset-utils-HMGAdoDi.js → asset-utils-BcZMmAKN.js} +1 -1
  77. package/dist/client/assets/{auth-D02eFBMZ.js → auth-BkXZCqsk.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-e7kz1Zn1.js → auth-catchall-FGnFebpX.js} +1 -1
  79. package/dist/client/assets/{auth-entry-BCAumgkq.js → auth-entry-DheEywcr.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-eS8OY8FQ.js → auth-split-layout-C39QkJ1e.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-ByjK-IN5.js → authenticate-and-persist-oauth-DMrLBEfk.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-BVpyBCbG.js → automation-list-row-u4x0HVUA.js} +1 -1
  83. package/dist/client/assets/{automation-runs-CNPxxThM.js → automation-runs-Bxcc51_7.js} +1 -1
  84. package/dist/client/assets/{automations-Dq3dBjCm.js → automations-DqoZex8a.js} +1 -1
  85. package/dist/client/assets/{badge-BBSQh6Uu.js → badge-DmhY0k4f.js} +1 -1
  86. package/dist/client/assets/{block-document-RjLwgnqu.js → block-document-BCK6nqqi.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-BPIeOkFy.js → blocks-preview-workspace-context-Brgl0CqW.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-BK5yayIF.js → blocks-tab-states-C_JjB7qS.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-C-j3cWFn.js → blog-preview-url-CSpGUPLK.js} +1 -1
  90. package/dist/client/assets/{blog-schema-DECpfoR_.js → blog-schema-B63sQwVb.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-4Qts-ar8.js → blog-source-gate-ChaoFSM3.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-DhsbDKri.js → blog-view-gate-BsZjR7OR.js} +1 -1
  93. package/dist/client/assets/{buckets-wb15whxi.js → buckets-DJk6e03b.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-DEjZ9hmy.js → build-improve-prompt-doc-CEwC-USg.js} +1 -1
  95. package/dist/client/assets/{calendar-D9jiUY0V.js → calendar-CXb62Hgf.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-CejuD9Wa.js → capability-load-error-XyENamfv.js} +1 -1
  97. package/dist/client/assets/{category-editor-CehKb-Ft.js → category-editor-DeOWsUFX.js} +1 -1
  98. package/dist/client/assets/{category-tree-B0yO1Gq4.js → category-tree-CdjA43Kw.js} +1 -1
  99. package/dist/client/assets/{chart-Di4PD1Ji.js → chart-BySfFX3r.js} +1 -1
  100. package/dist/client/assets/{chat-context-DpOzXt67.js → chat-context-BDbYH6DU.js} +24 -25
  101. package/dist/client/assets/{chat-draft-5W1w5RyD.js → chat-draft-Cf1fheTV.js} +1 -1
  102. package/dist/client/assets/{checkbox-DONKjPez.js → checkbox-CWIVoQk6.js} +1 -1
  103. package/dist/client/assets/{choose-editor-D6fBK6_s.js → choose-editor-I1gZeGh6.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-D5JPZlKL.js → cli-auth-success-DsudtvYn.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-B-tSTY59.js → cms-settings-editor-C7sCBTXN.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-COCpu3ir.js → cms-store-drafts-B0qG7N7H.js} +1 -1
  107. package/dist/client/assets/{collapsible-Bkbqa1G8.js → collapsible-GnB05mZz.js} +1 -1
  108. package/dist/client/assets/{collection-detail-C9zAMC1T.js → collection-detail-DpT77Jlo.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-B_m3Bbl9.js → collection-display-button-DRdttbaG.js} +1 -1
  110. package/dist/client/assets/{collection-search-CpEkYZRJ.js → collection-search-mwRnJ2oa.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-25JYiKDs.js → collection-table-wrapper-CcMxgrQ8.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-CcFA7CAt.js → collection-tabs-D7Vo1f2S.js} +1 -1
  113. package/dist/client/assets/{combobox-CtbjK522.js → combobox-LXt8RcDA.js} +1 -1
  114. package/dist/client/assets/{command-DOsfIbnR.js → command-rigJJqHv.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-ChQXno59.js → companion-mcps-section-BWd1ZX2P.js} +1 -1
  116. package/dist/client/assets/{config-SXpXedVw.js → config-il-mrtJw.js} +1 -1
  117. package/dist/client/assets/{connect-FNLd1CWe.js → connect-BjfkeFfN.js} +1 -1
  118. package/dist/client/assets/{connect-key-NAk-jeH9.js → connect-key-8z4sGhvS.js} +1 -1
  119. package/dist/client/assets/{connect-layout-DOfe8ci6.js → connect-layout-dfKj_tQM.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-8Z_ZVQcB.js → connect-source-dialog-Dd9Ks3Aq.js} +1 -1
  121. package/dist/client/assets/{connection-DVaoR-0s.js → connection-B5sc0Bj4.js} +1 -1
  122. package/dist/client/assets/{connection-card-B1-XvXXp.js → connection-card-Dboxtv4i.js} +1 -1
  123. package/dist/client/assets/{connection-detail-OV0LjFGf.js → connection-detail-BJbT2Bph.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-jkxcvfr-.js → connection-form-helpers-BJ4Q7lAD.js} +1 -1
  125. package/dist/client/assets/{connection-slug-woWVmFSM.js → connection-slug-9VOx21AD.js} +1 -1
  126. package/dist/client/assets/{connections-DPkjll4_.js → connections-ec2e5SmP.js} +1 -1
  127. package/dist/client/assets/{content-changes-CL5pqu3o.js → content-changes-Daox6Zqr.js} +1 -1
  128. package/dist/client/assets/{content-tab-DTlwh5lS.js → content-tab-C2FpsooE.js} +3 -3
  129. package/dist/client/assets/{context-Bzdt0Vmq.js → context-BcF0ky01.js} +1 -1
  130. package/dist/client/assets/{context-menu-DuU5Im6X.js → context-menu-D12azdee.js} +1 -1
  131. package/dist/client/assets/{context-shell-C34E3UmN.js → context-shell-D8-sF_A1.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-DCXCnTtw.js → create-organization-dialog-CSi6V0lf.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-pGzxz6az.js → daily-pulse-DAnz5NH_.js} +1 -1
  134. package/dist/client/assets/{delete-copy-DrkS10Tk.js → delete-copy-Z7_PHxsx.js} +1 -1
  135. package/dist/client/assets/{device-hint-D2mnF0WW.js → device-hint-CQvIrenj.js} +1 -1
  136. package/dist/client/assets/{discover-CxlzrXFo.js → discover-j1IgHy2y.js} +1 -1
  137. package/dist/client/assets/{domain-settings-5GZZzP9P.js → domain-settings-_2XhzV61.js} +1 -1
  138. package/dist/client/assets/{drawer-DBYfxUc5.js → drawer-CifkTfym.js} +1 -1
  139. package/dist/client/assets/{editor-k1lz5vd2.js → editor-DRWbb7ul.js} +1 -1
  140. package/dist/client/assets/{editor-classes-Dt9x0HTK.js → editor-classes-Ctf0rBwH.js} +1 -1
  141. package/dist/client/assets/{empty-state-BaX7qcT6.js → empty-state-CMB0iVjA.js} +1 -1
  142. package/dist/client/assets/{empty-state-DG74voMp.js → empty-state-Cnb10iC_.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-BuTlL0UN.js → experiments-tab-choice-DuGJxhlA.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-D8RA7aNY.js → extract-connection-data-DG39hguA.js} +1 -1
  145. package/dist/client/assets/{feature-gate-INFDgxGv.js → feature-gate-CHmgAE37.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-DzuuNoC0.js → feature-paywall-DQ4EONHv.js} +1 -1
  147. package/dist/client/assets/{file-explorer-BzowyIJt.js → file-explorer-sCulZW_U.js} +1 -1
  148. package/dist/client/assets/{file-preview-CFmw-Mpm.js → file-preview-DH8J73Em.js} +1 -1
  149. package/dist/client/assets/{file-share-button-jBqCmXDE.js → file-share-button-srSYNesY.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-DDtj-qsY.js → file-type-icon-CXoLbYfz.js} +1 -1
  151. package/dist/client/assets/{folder-icon-C6S6S7y5.js → folder-icon-XXOdM5DT.js} +1 -1
  152. package/dist/client/assets/{form-Dj9qATwb.js → form-Dm1g6Sbo.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-DfV5ZXB6.js → frame-navigation-BpxU-y8L.js} +1 -1
  154. package/dist/client/assets/{gateway-client-Bt-zgCod.js → gateway-client-C3ZU5-_v.js} +1 -1
  155. package/dist/client/assets/{general-DcAkDAnh.js → general-eb4TYqVd.js} +1 -1
  156. package/dist/client/assets/{github-icon-CA0Se8ib.js → github-icon-BHk-XZWW.js} +1 -1
  157. package/dist/client/assets/{held-block-view-DjEfvbV2.js → held-block-view-YD6GermY.js} +1 -1
  158. package/dist/client/assets/{home-BskRwsLF.js → home-DVWg_gYi.js} +1 -1
  159. package/dist/client/assets/{home-overview-BtB0DXFZ.js → home-overview-C3xphs6Y.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-5ztqbsR8.js → hosted-reconcile-Cz6xDabT.js} +1 -1
  161. package/dist/client/assets/{icon-button-C-do25HN.js → icon-button-Ymzn1_Ie.js} +1 -1
  162. package/dist/client/assets/{index-hsXsAM7a.js → index-At64nru8.js} +1 -1
  163. package/dist/client/assets/{index-BqI8xAEu.js → index-B_ZZ_ftJ.js} +1 -1
  164. package/dist/client/assets/{index-rQ7Z7wiX.js → index-C5XlOPVN.js} +1 -1
  165. package/dist/client/assets/{index-CxzzYASZ.js → index-CENCioIm.js} +1 -1
  166. package/dist/client/assets/{index-B9qoaIXB.js → index-CSaPdF21.js} +1 -1
  167. package/dist/client/assets/{index-D4h9lMWL.js → index-CTs6ZjMn.js} +1 -1
  168. package/dist/client/assets/{index-DFlR3TGo.js → index-CeUTayYv.js} +1 -1
  169. package/dist/client/assets/{index-BkmXMKSP.js → index-Chk8S0_L.js} +1 -1
  170. package/dist/client/assets/{index-OS1HwRA4.js → index-DNIV4h16.js} +1 -1
  171. package/dist/client/assets/{index-s9Fdb2Os.js → index-DTEDDR1x.js} +1 -1
  172. package/dist/client/assets/{index-TxpTb6t-.js → index-OSvXQU0Z.js} +3 -3
  173. package/dist/client/assets/{index-DI7rDat7.js → index-STwqHwlO.js} +1 -1
  174. package/dist/client/assets/{index-DV21r4ku.js → index-UuYqkkEe.js} +1 -1
  175. package/dist/client/assets/{index-CmIQCfmv.js → index-alfYFaP0.js} +1 -1
  176. package/dist/client/assets/{index-Cbr3sV-N.js → index-iIIvyJfN.js} +1 -1
  177. package/dist/client/assets/{index-redirect-B1lzC4kG.js → index-redirect-DXdV-rZ5.js} +1 -1
  178. package/dist/client/assets/{index-CKWVjdl2.js → index-toeooV8r.js} +1 -1
  179. package/dist/client/assets/{index-IihCyBIe.js → index-zaRScPY5.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-DIsWsg7j.js → infiniteQueryObserver-Db0Zh8ks.js} +1 -1
  181. package/dist/client/assets/{infra-billing-Cv366YeZ.js → infra-billing-CDiZ6RBn.js} +1 -1
  182. package/dist/client/assets/{input-B0bn39Xh.js → input-BpOitAQg.js} +3 -3
  183. package/dist/client/assets/{input-D3XRlNJ0.js → input-CkzjHKcN.js} +1 -1
  184. package/dist/client/assets/{integration-icon-BwJVBZD3.js → integration-icon-TVRwnFcy.js} +1 -1
  185. package/dist/client/assets/{item-actions-sAOtmY_t.js → item-actions-D8EmGNrI.js} +1 -1
  186. package/dist/client/assets/{jira-icon-DnVzGbtF.js → jira-icon-CF5qhLpK.js} +1 -1
  187. package/dist/client/assets/{label-DBXumtTI.js → label-Csx-3v8Y.js} +1 -1
  188. package/dist/client/assets/{layout-B01bM09Y.js → layout-DAB63K2K.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-BpjGA_Qv.js → legacy-admin-welcome-dialog-fjHNTqEg.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-D4KFdpXi.js → legacy-agents-deep-BdnWN3od.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-DtMiSRM8.js → legacy-main-redirect-1UI05rOH.js} +1 -1
  192. package/dist/client/assets/library-jbCzY4wv.js +1 -0
  193. package/dist/client/assets/{library-tab-DmJI4J-D.js → library-tab-D5IKmTiY.js} +1 -1
  194. package/dist/client/assets/{login-BeE0wfrC.js → login-DurVWD8e.js} +1 -1
  195. package/dist/client/assets/{markdown-hcA80xrk.js → markdown-BxJxdoCM.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-CLV9FGK8.js → mcp-app-renderer-Cy0OmtCt.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-5-PCIXK8.js → mcp-oauth-B2OKeCmx.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-D2tuj_Fq.js → mcp-oauth-CEDOnwdg.js} +1 -1
  199. package/dist/client/assets/{members-Dy1mBWZ8.js → members-D4FMAnpu.js} +1 -1
  200. package/dist/client/assets/{memory-BrJnBalp.js → memory-CztvH23y.js} +1 -1
  201. package/dist/client/assets/{mock-board-CPIKUKL1.js → mock-board-ByTUxseS.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-DMwFk1Pi.js → monaco-editor-AMxo4H5W.js} +1 -1
  203. package/dist/client/assets/{monitoring-CnoT48hP.js → monitoring-BNFgFK2o.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-BBhVaUWr.js → monitoring-stats-row-uNSiwzjZ.js} +1 -1
  205. package/dist/client/assets/{multi-select-D4aZZa9s.js → multi-select-BHamke2v.js} +1 -1
  206. package/dist/client/assets/{mustache-CGuBlULa.js → mustache-Bc9Tx8tY.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-JGMEcn4W.js → named-rule-step-vLZOuWhm.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-BfDnPZe1.js → named-rule-view-sostnkLf.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-dB7_i4Qt.js → new-project-dialog-DrWLNe2p.js} +1 -1
  210. package/dist/client/assets/{new-project-store-yM3ZBfr8.js → new-project-store-_S8_LTiv.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-BRFLeRze.js → oauth-callback-CanDqu36.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-BIkfCc8L.js → oauth-callback-ai-provider-dMtvFATR.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-n4PMUX9j.js → oauth-consent-BxpWlIkU.js} +1 -1
  214. package/dist/client/assets/{onboarding-COIJY0bR.js → onboarding-D8AU4sYt.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-DJJmihen.js → openai-conversation-jrE_WTun.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-CyT7T37Q.js → optimistic-project-sidebar-views-DhZJfXDY.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-xy0NwjGB.js → order-monitor-day-Bl63d_Ae.js} +1 -1
  218. package/dist/client/assets/{organization-choice-Dd6EFRi5.js → organization-choice-BwdPygLb.js} +1 -1
  219. package/dist/client/assets/{orgs-CVbB4v1z.js → orgs-C-asS8ND.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-hyTDXYqP.js → own-accounts-section-C9hEP3RU.js} +1 -1
  221. package/dist/client/assets/{pair-Cpn9911A.js → pair-CDFcpsxO.js} +1 -1
  222. package/dist/client/assets/{parse-sections-BNgGwb6K.js → parse-sections-3NET4EaN.js} +2 -2
  223. package/dist/client/assets/plan-DMpOcEfe.js +1 -0
  224. package/dist/client/assets/{plan-ladder-SUG2zxVV.js → plan-ladder-C250kgCs.js} +1 -1
  225. package/dist/client/assets/{plan-page-B97PZapX.js → plan-page-i6tfsurE.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-v0p0iaSW.js → plan-usage-card-CnkpfdI0.js} +1 -1
  227. package/dist/client/assets/{popover-BhQvI6Ci.js → popover-DOi1uePA.js} +1 -1
  228. package/dist/client/assets/{post-calendar-CJI0B6nx.js → post-calendar-DgGZhgGv.js} +1 -1
  229. package/dist/client/assets/{post-editor-Bm9waQu0.js → post-editor-DKlt5QP3.js} +1 -1
  230. package/dist/client/assets/{preview-content-v0t5au3m.js → preview-content-db_uBwtX.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-_4bYbxJT.js → preview-dialog-BH5MI3Sd.js} +1 -1
  232. package/dist/client/assets/{preview-panel-CT3YwHBi.js → preview-panel-CIuV7b2g.js} +1 -1
  233. package/dist/client/assets/{preview-tab-DnzBBG3r.js → preview-tab-Df_p6W4Z.js} +3 -3
  234. package/dist/client/assets/{primitives-B09ImGmM.js → primitives-EwKHIcqR.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-BpoeAcrJ.js → product-picker-dialog-DNGksfut.js} +1 -1
  236. package/dist/client/assets/{profile-B2mQKj4P.js → profile-DfYCpILk.js} +1 -1
  237. package/dist/client/assets/{project-app-view-CJ0A-hzz.js → project-app-view-C5iOrsaX.js} +1 -1
  238. package/dist/client/assets/{project-apps-DTdFltAq.js → project-apps-Dgu7yO2X.js} +1 -1
  239. package/dist/client/assets/{project-icon-79iKoL5J.js → project-icon-Cmr6SrmT.js} +1 -1
  240. package/dist/client/assets/{project-index-Dvzw5ZPI.js → project-index-UVS3LS58.js} +1 -1
  241. package/dist/client/assets/project-reports-BVeAsS6u.js +1 -0
  242. package/dist/client/assets/project-tasks-KnCd_VBG.js +1 -0
  243. package/dist/client/assets/{projects-empty-state-BXwSmEvF.js → projects-empty-state-BlZ1lAtQ.js} +1 -1
  244. package/dist/client/assets/{projects-DeIxK4ey.js → projects-vboChuyD.js} +1 -1
  245. package/dist/client/assets/{prompts-BtYZ6KQi.js → prompts-BIVHYAhc.js} +1 -1
  246. package/dist/client/assets/record-editor-B7mTnaNS.js +1 -0
  247. package/dist/client/assets/{redirect-editor-FE4kqSSu.js → redirect-editor-DZ5LR0gN.js} +1 -1
  248. package/dist/client/assets/reports-BRlneKJb.js +1 -0
  249. package/dist/client/assets/{reports-P6WItYho.js → reports-BgSi_02d.js} +1 -1
  250. package/dist/client/assets/{reports-onboarding-DQj52VFI.js → reports-onboarding-BkyvTqGD.js} +1 -1
  251. package/dist/client/assets/{reports-tab-ChXJb_14.js → reports-tab-CEGg1mRb.js} +2 -2
  252. package/dist/client/assets/{repositories-C9coyoWr.js → repositories-Bb18737J.js} +1 -1
  253. package/dist/client/assets/repositories-CGWctOW_.js +1 -0
  254. package/dist/client/assets/{repository-binding-C6Q6rTCq.js → repository-binding-DWcsSj-q.js} +1 -1
  255. package/dist/client/assets/{repository-picker-qO39HBTX.js → repository-picker-CG8_WRxv.js} +1 -1
  256. package/dist/client/assets/{require-capability-BGgQVq09.js → require-capability-vv-HxE0s.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-C0Zoqnd5.js → required-auth-layout-DtSikKoO.js} +1 -1
  258. package/dist/client/assets/{reset-password-DR2sfETw.js → reset-password-g8uRff77.js} +1 -1
  259. package/dist/client/assets/{resizable-BU4mxyhl.js → resizable-Ci9A7w1l.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-DzSk2OX5.js → resolve-tab-icon-CvkRgOIT.js} +1 -1
  261. package/dist/client/assets/{review-settings-CkjRPLoQ.js → review-settings-Y1CaoWpM.js} +1 -1
  262. package/dist/client/assets/{role-color-ofXYD2zQ.js → role-color-BhGPl3zi.js} +1 -1
  263. package/dist/client/assets/{roles-CeC1qNxL.js → roles-BfIkt_P2.js} +1 -1
  264. package/dist/client/assets/route-BATbmHrj.js +1 -0
  265. package/dist/client/assets/{route-Q-TODpFM.js → route-BKrtuNpH.js} +1 -1
  266. package/dist/client/assets/{route-CbX_GqVG.js → route-C_yL94er.js} +1 -1
  267. package/dist/client/assets/{route-page-header-1R1hO2lM.js → route-page-header-agJ7Uv7j.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-b8vIZog_.js → sandbox-git-api-DlqFzaAD.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-ByKDEtoo.js → sandbox-lifecycle-context-CkkccyCW.js} +1 -1
  270. package/dist/client/assets/{save-status-BSEg8O16.js → save-status-qqJSL1T9.js} +1 -1
  271. package/dist/client/assets/{schema-DQMwqc3y.js → schema-Bip4QZH5.js} +1 -1
  272. package/dist/client/assets/{schema-BMMpRaT7.js → schema-Bm0oqglz.js} +1 -1
  273. package/dist/client/assets/{scroll-area-BX1dEYr0.js → scroll-area-DrQPUtug.js} +1 -1
  274. package/dist/client/assets/{search-input-Cqw1sfoq.js → search-input-BTXo0rPM.js} +1 -1
  275. package/dist/client/assets/{search-toggle-DFPiKmeS.js → search-toggle-D8jolQEu.js} +1 -1
  276. package/dist/client/assets/{secret-picker-DM_GCERi.js → secret-picker-ClIgl45d.js} +1 -1
  277. package/dist/client/assets/{secrets-BZLR1Tiv.js → secrets-mknF8fmG.js} +1 -1
  278. package/dist/client/assets/{section-array-field-C53JCS6V.js → section-array-field-DllyfmAH.js} +1 -1
  279. package/dist/client/assets/{sections-Dm3F-fbD.js → sections-BdP8hHuS.js} +1 -1
  280. package/dist/client/assets/{sections-editor-DqVIkY4X.js → sections-editor-BRkk4nim.js} +1 -1
  281. package/dist/client/assets/{select-B043gNlI.js → select-DoQbBnCj.js} +1 -1
  282. package/dist/client/assets/{select-model-ey39mV4L.js → select-model-818450xb.js} +1 -1
  283. package/dist/client/assets/{seo-editor-3qfBE8tb.js → seo-editor-BcgXl8zO.js} +1 -1
  284. package/dist/client/assets/{separator-BbdzmQ7G.js → separator-BjQ0Rald.js} +1 -1
  285. package/dist/client/assets/{session-runtime-C7t2dJ2C.js → session-runtime-Cu_NMrs6.js} +1 -1
  286. package/dist/client/assets/settings-tab-CmVetGSh.js +1 -0
  287. package/dist/client/assets/{sheet-BabUGgfu.js → sheet-fInBGBxI.js} +1 -1
  288. package/dist/client/assets/{shell-layout-CQtuJ10m.js → shell-layout-DpAhzjkm.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-RiUXDN62.js → site-draft-actions-CxqzZOye.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-C02Ag8Td.js → site-draft-view-BGY6xXy2.js} +1 -1
  291. package/dist/client/assets/site-editor-BE_IMJ7-.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-Dw3Pw8Me.js → site-editor-toast-DBxnFIyu.js} +1 -1
  293. package/dist/client/assets/{skills-CHy7b1a1.js → skills-B4eDJD0R.js} +1 -1
  294. package/dist/client/assets/{slider-Cuy5OPtR.js → slider-VRF1NYvp.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-DsfJ7ZSD.js → sortable.esm-DePnbT4r.js} +1 -1
  296. package/dist/client/assets/{sso-a2YGfBSd.js → sso-dRpMeHNu.js} +1 -1
  297. package/dist/client/assets/{suggestion-C_46bv7Q.js → suggestion-OMwRo4J1.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-Cu75RS7q.js → super-agent-icon-C1CFeadh.js} +1 -1
  299. package/dist/client/assets/{switch-CYj4jY2U.js → switch-C_2jBQUd.js} +1 -1
  300. package/dist/client/assets/{synced-repos-_8GdV1yJ.js → synced-repos-C7Qyzjr1.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-C0XKpT27.js → tab-icon-glyph-tgmE1WHA.js} +1 -1
  302. package/dist/client/assets/{table-C7JAS84x.js → table-DHolGkDK.js} +1 -1
  303. package/dist/client/assets/{tabs-BjPWlou5.js → tabs-Dc_muwGD.js} +1 -1
  304. package/dist/client/assets/{task-board-nk38_QK1.js → task-board-D5OsG9Bh.js} +1 -1
  305. package/dist/client/assets/{task-key-BqL0wDoN.js → task-key-D5k81-kx.js} +1 -1
  306. package/dist/client/assets/{task-route-I0jIuRPI.js → task-route-BXv3go2m.js} +1 -1
  307. package/dist/client/assets/{task-status-bacBrTx-.js → task-status-BI-AtF2a.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-DlpWTStQ.js → taskboard-analytics-D76W-EjY.js} +1 -1
  309. package/dist/client/assets/{tasks-D3aEqkkc.js → tasks-CdDrLQcw.js} +1 -1
  310. package/dist/client/assets/tasks-VcFNUyV9.js +1 -0
  311. package/dist/client/assets/{textarea-BtM4NiRw.js → textarea-ChOXQSIh.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-Dc7tir8o.js → thread-analytics-W-kBvRGD.js} +1 -1
  313. package/dist/client/assets/{thread-button-DCotVRko.js → thread-button-CdZ-TuVw.js} +1 -1
  314. package/dist/client/assets/{thread-intent-xzBTK_RX.js → thread-intent-B7BYRHTJ.js} +1 -1
  315. package/dist/client/assets/{thread-route-De5HF2y6.js → thread-route-_rYXa6gz.js} +1 -1
  316. package/dist/client/assets/{thread-route-CHHapqFU.js → thread-route-pM3iBpC4.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-C-nzP9iT.js → thread-sheet-body-BXkFochM.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-BegNa_X6.js → time-range-picker-D6QM55zj.js} +1 -1
  319. package/dist/client/assets/{toggle-group-DKY7ztEe.js → toggle-group-D9Igy0TU.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-DgXNH17f.js → tool-set-selector-B7CUsfuy.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-uzcw3yD2.js → toolbar-icon-button-DilrTlb5.js} +1 -1
  322. package/dist/client/assets/{tooltip-DYXaNugu.js → tooltip-Cprju8cR.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-Jj9fHDnV.js → tooltipContext-Bl0kANqq.js} +1 -1
  324. package/dist/client/assets/{track-Bq86LoP3.js → track-jbmP2DUz.js} +1 -1
  325. package/dist/client/assets/{types-CIVGvpZ0.js → types-DLbeP8WB.js} +1 -1
  326. package/dist/client/assets/{url-slug-DMOAQ_lT.js → url-slug-a_10dVtL.js} +1 -1
  327. package/dist/client/assets/{usage-stats-BDD0I25a.js → usage-stats-C_4X9-qJ.js} +1 -1
  328. package/dist/client/assets/{use-ai-providers-B_vRXviN.js → use-ai-providers-BRdMfbSe.js} +1 -1
  329. package/dist/client/assets/{use-api-keys-uAL0hDQR.js → use-api-keys-TWl5p8YB.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-Dk0qpjV1.js → use-apply-named-rule-BGfWCdKo.js} +1 -1
  331. package/dist/client/assets/{use-ask-in-chat-BVkYjPHL.js → use-ask-in-chat-CGQ9y3j-.js} +1 -1
  332. package/dist/client/assets/{use-automations-DRPUZksG.js → use-automations-CSPsZ4D5.js} +1 -1
  333. package/dist/client/assets/{use-autosave-DV_OoQIn.js → use-autosave-o-tBgwll.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-DI6WOIKx.js +1 -0
  335. package/dist/client/assets/use-blog-view-618wKlvj.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-Cyyj9Un-.js → use-chat-layout-state-CtIcGcSR.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-OZwei3g4.js → use-cms-publish-actions-FJJVRnhf.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-BYNhLNMG.js → use-connect-companion-BI43ttca.js} +1 -1
  339. package/dist/client/assets/{use-connection-IXleYE4j.js → use-connection-Bo77wUI4.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-BMrVE7lN.js → use-content-sync-CTGZo4Cr.js} +1 -1
  341. package/dist/client/assets/{use-copy-9udQq6fq.js → use-copy-DEuGqQKY.js} +1 -1
  342. package/dist/client/assets/{use-current-view-mBQFHLUH.js → use-current-view-BY4Yr3Ak.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-BQ8fok30.js → use-date-fns-locale-DMkGMXGf.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-CKKt6tHK.js → use-debounced-autosave-BZewyMyg.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-CbXd2Ffh.js → use-debounced-value-jvU6cmtP.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-Cqj99_dF.js → use-deco-credits-eG1MTgeV.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-CSZ1As5G.js → use-decopilot-events-BM0ApVN1.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-Do2HxsU1.js → use-delete-block-208HXUpw.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-DrCH_dJP.js → use-delete-connection-CNoIHETe.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-TEfqeIeo.js → use-deployment-admin-DNEaqLy_.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-DQIFZSxg.js → use-entitlements-DJbHbqBs.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-DKxuxaaY.js → use-fast-preview-draft-url-DkBaYpBC.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-BUa8LWQS.js → use-file-configs-91P-D2_R.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-LPkxd-T5.js → use-id-selection-C-lytya_.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-CMsR7cZQ.js → use-in-settings-CXgr4nxD.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-BGCSyRP9.js → use-inbox-feed-CkOBChJk.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-BCd_t7BT.js → use-infinite-scroll-Bkw4TlTx.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-BQQOoEyQ.js → use-join-requests-BIEpa--C.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-DOFIkafU.js → use-main-panel-tabs-JO_-ERrE.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-BbCzZJ_7.js → use-mcp-auth-status-D0FGwEZO.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-ExS_LtHV.js → use-mcp-client-DC1kroLc.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-CMM6TNGu.js → use-mcp-prompts-CMsHTnDX.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-CCU4p9Rz.js → use-mcp-tools-D_gL0d3W.js} +1 -1
  364. package/dist/client/assets/{use-mobile-CJUXV6Cd.js → use-mobile-ke5ZDv8p.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-CVrXFQf9.js → use-move-blocks-CkPzsqe2.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-GgUPd_lv.js → use-navigate-to-agent-BBU44HO0.js} +1 -1
  367. package/dist/client/assets/{use-never-published-BXBSYXJD.js → use-never-published-BPXfnaqL.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-7ZhjAHDq.js → use-org-fs-CHGJY6Rv.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-DZNaXzPK.js → use-org-notice-DAIPpLvK.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-CU6eNoAC.js → use-org-repo-syncs-hRxa5k48.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-BKEBkMtq.js → use-org-sso-zv8-dYnz.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-BMzmJwkq.js → use-organization-settings-DXEvl8Mj.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-TXIh5Jjf.js → use-panel-navigate-Khvtzqqe.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-iIZzPh0n.js → use-project-native-view-presence-C7NO1GQL.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-CKvnTLpI.js → use-project-scope-BzxL6CLn.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-CsoTzvcJ.js → use-recent-apps-BaZdSz76.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-B5ktHIcG.js → use-reports-diagnostic-Bgp7rYme.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-DgTm5p14.js → use-sandbox-events-BTlzkAKE.js} +1 -1
  379. package/dist/client/assets/{use-secrets-CmhNvyh-.js → use-secrets-DHzfkbap.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-CxmHxD8c.js → use-section-preview-base-BpF0MXce.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-DdxzWT5S.js → use-sidebar-collapsed-CmbDjI-Q.js} +1 -1
  382. package/dist/client/assets/{use-tags-CyEQyAhi.js → use-tags-DYH5Nm8i.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-BPZdg5me.js → use-task-board-analytics-DbwC5UyL.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-ByWZevYZ.js → use-task-board-item-prs-CaZulkZP.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-BIQu-vu8.js → use-task-board-items-Cu-LAjNo.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-BD95sybY.js → use-task-board-prompts-CExnQ5c1.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-DGT_hCy-.js → use-task-metadata-B4wWxX-B.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-DvgezGKZ.js → use-thread-outputs-B4e3l9Oh.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-kwEa5AZ1.js → use-view-draft-kind-DZVyfsp9.js} +1 -1
  390. package/dist/client/assets/{use-voice-input-B_fCdMky.js → use-voice-input-BU9yzUIU.js} +1 -1
  391. package/dist/client/assets/useInfiniteQuery-Cc6x0EgG.js +1 -0
  392. package/dist/client/assets/{useQueries-DCrQluth.js → useQueries-Byj3pdb5.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-D6nr4CLj.js +1 -0
  394. package/dist/client/assets/{users-DdaIDntv.js → users-CC7MWtO-.js} +1 -1
  395. package/dist/client/assets/{utils-D0VJmDFc.js → utils-C6Bks5Ov.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-CY-CCOVR.js → variant-calendar-CSqIsMSl.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-cLg6yoTm.js → variant-matcher-override-BNelNYPY.js} +1 -1
  398. package/dist/client/assets/{view-header-b9iFwHmd.js → view-header-CVQgD12G.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-D_GJvAm-.js → virtual-mcp-CDsAa6_Y.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-El5ChbJr.js → watch-sse-pool-Cy0wnTy4.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +520 -520
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-DAxew1JC.js +0 -1
  405. package/dist/client/assets/agent-deck-BHuydkDy.js +0 -1
  406. package/dist/client/assets/agent-experiments-zhJy530d.js +0 -1
  407. package/dist/client/assets/agent-file-DRxbKJHY.js +0 -1
  408. package/dist/client/assets/agent-library-DAqV7GV5.js +0 -1
  409. package/dist/client/assets/agent-library-file-BOPS4LzV.js +0 -1
  410. package/dist/client/assets/agent-overview-765039jq.js +0 -1
  411. package/dist/client/assets/agent-settings-CAaYS-Qb.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-CkHYzP36.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-vjaFp3r3.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-D3yLw8y2.js +0 -1
  415. package/dist/client/assets/agent-view-Bmp94OXB.js +0 -1
  416. package/dist/client/assets/api-keys-DgrPbRdJ.js +0 -1
  417. package/dist/client/assets/library-C7GgLZCd.js +0 -1
  418. package/dist/client/assets/plan-BgBMTT48.js +0 -1
  419. package/dist/client/assets/project-reports-BOQt_VM8.js +0 -1
  420. package/dist/client/assets/project-tasks-D-84Davh.js +0 -1
  421. package/dist/client/assets/record-editor-QKxjwfux.js +0 -1
  422. package/dist/client/assets/reports-CC1bODVK.js +0 -1
  423. package/dist/client/assets/repositories-Dhj06u1H.js +0 -1
  424. package/dist/client/assets/route-D2IDmDBG.js +0 -1
  425. package/dist/client/assets/settings-tab-DmZrvXS-.js +0 -1
  426. package/dist/client/assets/site-editor-CvXc40pp.js +0 -1
  427. package/dist/client/assets/tasks-DrukY02x.js +0 -1
  428. package/dist/client/assets/use-blocks-v8-project-BSH68G_p.js +0 -1
  429. package/dist/client/assets/use-blog-view-CtOHSMkK.js +0 -1
  430. package/dist/client/assets/useInfiniteQuery-B1B1l9Rx.js +0 -1
  431. package/dist/client/assets/useSuspenseInfiniteQuery-DFT4-et2.js +0 -1
@@ -1 +1 @@
1
- import{c as I,b as X,r as M,m as B,j as s,a6 as Re,e as nt,t as je,D as lt,v as ot,w as at,x as ct,y as dt,B as Fe,ax as ut,Y as ke,a7 as ft,E as H,X as mt,Z as ht,_ as pt,d as gt,aE as bt,l as Ye,H as xt,au as $e,L as Ge,$ as jt,aw as Ve,aF as vt,aG as yt,P as St}from"./index-TxpTb6t-.js";import{u as Ie,c as Ze,g as wt,h as Ct,i as _t}from"./use-sidebar-collapsed-DdxzWT5S.js";import{S as kt,a as Ot,b as Rt}from"./sheet-BabUGgfu.js";import{u as Et}from"./use-mobile-CJUXV6Cd.js";import{u as zt,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./task-key-BqL0wDoN.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-DsfJ7ZSD.js";import{i as It}from"./Tool01-nVLtxvHv.js";import{t as Kt,u as Ft,v as Ut,w as Wt,A as Bt,x as Ue}from"./agent-icon-TiRfS6qN.js";import{s as Ht}from"./Plus-Hrr9Aktn.js";import{a as Xt}from"./UserSquare-DqYKKMSn.js";import{a as Yt}from"./UserCheck01-C0gKOYWe.js";import{s as qe}from"./XClose-CcNfsDjh.js";import{T as ge,a as be,c as xe}from"./tooltip-DYXaNugu.js";import{C as Pe,f as Gt,g as Vt,e as Zt}from"./context-menu-DuU5Im6X.js";import{a as qt,O as Je,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as is,t as ns,f as Qe,m as ls,o as os}from"./use-org-notice-DZNaXzPK.js";import{C as as}from"./create-organization-dialog-DCXCnTtw.js";import{P as cs}from"./project-apps-DTdFltAq.js";import{u as ds,a as us}from"./use-recent-apps-CsoTzvcJ.js";import{a as fs}from"./use-navigate-to-agent-GgUPd_lv.js";import{a as ms,u as hs}from"./use-project-scope-CKvnTLpI.js";import{C as We,a as ps,b as gs,c as bs,d as xs}from"./command-DOsfIbnR.js";import{u as js}from"./use-debounced-value-CbXd2Ffh.js";import{n as vs}from"./BookOpen01-B7HgfzTg.js";import{F as ys,a as Ae,b as Ss,c as et}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-BtM4NiRw.js";import{a as Cs}from"./thread-button-DCotVRko.js";function _s(t){const e=I.c(48),{open:i,onOpenChange:r,orgs:n,currentSlug:d,onSelect:l}=t,a=X(),[o,u]=M.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const p=b,m=js(p,150),h=p.length>0,f=m===p,{hits:v,isSearching:j,isStale:C,isError:w}=qt(h?m:""),c=h?v:n;let x;e[2]!==r?(x=L=>{r(L),L||u("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==a?(y=a("sidebar.rail.searchOrganizations"),e[4]=a,e[5]=y):y=e[5];let S;e[6]!==a?(S=a("sidebar.rail.searchPlaceholder"),e[6]=a,e[7]=S):S=e[7];let k;e[8]!==a?(k=a("sidebar.rail.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(ps,{value:o,onValueChange:u,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=h&&(C||!f)&&"opacity-50";let E;e[13]!==T?(E=B(T),e[13]=T,e[14]=E):E=e[14];let O;e[15]!==w||e[16]!==h||e[17]!==a?(O=h&&w&&s.jsx(We,{children:a("sidebar.rail.searchFailed")}),e[15]=w,e[16]=h,e[17]=a,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==c.length||e[22]!==f||e[23]!==a?(z=!w&&f&&!j&&c.length===0&&s.jsx(We,{children:a("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=c.length,e[22]=f,e[23]=a,e[24]=z):z=e[24];let D;if(e[25]!==d||e[26]!==l||e[27]!==g||e[28]!==c||e[29]!==a){let L;e[31]!==d||e[32]!==l||e[33]!==g||e[34]!==a?(L=P=>s.jsxs(gs,{value:P.slug,onSelect:()=>{g(!1),P.slug!==d&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Je,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===d&&s.jsx("span",{className:"text-meta shrink-0",children:a("sidebar.rail.currentOrganization")})]},P.id),e[31]=d,e[32]=l,e[33]=g,e[34]=a,e[35]=L):L=e[35],D=c.map(L),e[25]=d,e[26]=l,e[27]=g,e[28]=c,e[29]=a,e[30]=D}else D=e[30];let R;e[36]!==z||e[37]!==D||e[38]!==E||e[39]!==O?(R=s.jsxs(bs,{className:E,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=E,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==i||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:i,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=i,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function ks(t){const e=I.c(4),{size:i,className:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=n):n=e[0];let d;return e[1]!==r||e[2]!==i?(d=s.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:n}),e[1]=r,e[2]=i,e[3]=d):d=e[3],d}const Os=250;function Rs(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,i){return new Promise(r=>t.toBlob(r,e,i))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(d=>setTimeout(d,Os));const i=document.createElement("canvas");i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(i,"image/png");if((!r||r.size>et)&&(r=await Be(i,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const n=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${n}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:i}){const r=X(),n=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:d}=Re(),[l,a]=M.useState(""),[o,u]=M.useState([]),[b,p]=M.useState(!1),m=()=>{for(const c of o)URL.revokeObjectURL(c.previewUrl);u([]),a("")},h=c=>{const x=c.filter(S=>Ss.includes(S.type)?S.size>et?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&u(S=>[...S,...y])},f=c=>{URL.revokeObjectURL(c.previewUrl),u(x=>x.filter(g=>g!==c))},v=async()=>{p(!0);try{h([await Es()])}catch(c){c instanceof DOMException&&c.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",c),je.error(r("sidebar.feedback.screenshotFailed")))}finally{p(!1)}},j=c=>{const x=Array.from(c.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(c.preventDefault(),h(x))},C=nt({mutationFn:async()=>{const c=new FormData;c.set("kind",t),c.set("message",l.trim()),c.set("pageUrl",window.location.href);for(const g of o)c.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(d.slug)}/feedback`,{method:"POST",body:c});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(n.sent),m(),i(!1)},onError:()=>je.error(n.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(lt,{open:e&&!b,onOpenChange:i,children:s.jsxs(ot,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(at,{children:s.jsx(ct,{children:n.title})}),s.jsx(ws,{autoFocus:!0,value:l,onChange:c=>a(c.target.value),onPaste:j,onKeyDown:c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),w&&C.mutate())},placeholder:n.placeholder,className:"min-h-32 max-h-80",maxLength:ys}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((c,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:c.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:c.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},c.previewUrl))}),s.jsxs(dt,{className:"sm:justify-between",children:[Rs()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(Kt,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:i,label:r,children:n}=t,d=i?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==d?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",d),e[0]=d,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=a):a=e[3];let o;e[4]!==i||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=i,e[5]=r,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==a||e[9]!==o?(u=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,n,o]}),e[7]=n,e[8]=a,e[9]=o,e[10]=u):u=e[10],u}const zs="https://docs.decocms.com/",Ds="https://discord.gg/EQkX7CymV";function Ns(){const t=I.c(39),e=X(),{org:i}=Re(),[r,n]=M.useState(null),d=!!i.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),n(_)},t[0]=l):l=t[0];const a=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ut,{size:18}),t[3]=u):u=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ps,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:u})})}),t[4]=o,t[5]=b):b=t[5];let p;t[6]!==e?(p=e("sidebar.help.button"),t[6]=e,t[7]=p):p=t[7];let m;t[8]!==p?(m=s.jsx(be,{side:"right",children:p}),t[8]=p,t[9]=m):m=t[9];let h;t[10]!==b||t[11]!==m?(h=s.jsxs(xe,{children:[b,m]}),t[10]=b,t[11]=m,t[12]=h):h=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(vs,{}),t[13]=f):f=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ls,children:[f,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ks,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let c;t[21]!==w?(c=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Ds,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[C,w]})}),t[21]=w,t[22]=c):c=t[22];let x;t[23]!==d||t[24]!==e?(x=d&&s.jsxs(s.Fragment,{children:[s.jsx(ut,{}),s.jsxs(ke,{onSelect:()=>a("problem"),children:[s.jsx(ft,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>a("feedback"),children:[s.jsx(Ft,{}),e("sidebar.feedback.button")]})]}),t[23]=d,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==c||t[27]!==x||t[28]!==j?(g=s.jsxs(ht,{side:"right",align:"end",className:"w-56",children:[j,c,x]}),t[26]=c,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==h?(y=s.jsx(ve,{active:!1,children:s.jsxs(pt,{children:[h,g]})}),t[30]=g,t[31]=h,t[32]=y):y=t[32];let S;t[33]!==d||t[34]!==r?(S=d&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>n(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>n(_?"feedback":null)})]}),t[33]=d,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ts(){return H("help_menu_discord_opened")}function Ls(){return H("help_menu_guides_opened")}function Ps(){return H("help_menu_opened")}function As(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const Ms=()=>Qe(globalThis.innerHeight),$s=()=>Qe(0);function Is(t){const e=I.c(59),{org:i,active:r,onSelect:n,pinned:d,onOpenSettings:l,onTogglePin:a,onHide:o}=t,u=X();let b;e[0]!==i.slug?(b={id:i.slug},e[0]=i.slug,e[1]=b):b=e[1];const{setNodeRef:p,listeners:m,transform:h,transition:f,isDragging:v}=$t(b);let j;e[2]!==h?(j=Lt.Transform.toString(h?{...h,x:0}:null),e[2]=h,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${i.slug}`;let c;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==f?(c={transform:j,transition:f,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=f,e[8]=c):c=e[8];const x=i.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=n&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==i?(_=s.jsx(Je,{org:i,size:"lg"}),e[12]=i,e[13]=_):_=e[13];let T;e[14]!==d?(T=d&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=d,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==i.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(E=s.jsx(ge,{asChild:!0,children:s.jsx(Gt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:n,className:k,children:[_,T]})})}),e[16]=n,e[17]=i.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=E):E=e[22];let O;e[23]!==i.name?(O=s.jsx(be,{side:"right",children:i.name}),e[23]=i.name,e[24]=O):O=e[24];let z;e[25]!==E||e[26]!==O?(z=s.jsxs(xe,{children:[E,O]}),e[25]=E,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Yt,{}),e[28]=D):D=e[28];let R;e[29]!==u?(R=u("sidebar.rail.organizationSettings"),e[29]=u,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==d||e[36]!==u?(P=u(d?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=d,e[36]=u,e[37]=P):P=e[37];let F;e[38]!==a||e[39]!==P?(F=s.jsxs(Pe,{onSelect:a,children:[L,P]}),e[38]=a,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==u?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),u("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=u,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Vt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==m||e[55]!==p||e[56]!==W||e[57]!==c?(G=s.jsx("div",{ref:p,...m,style:c,className:"w-full shrink-0 touch-none",children:W}),e[54]=m,e[55]=p,e[56]=W,e[57]=c,e[58]=G):G=e[58],G}function Ks(t){const e=I.c(64),{project:i,orgSlug:r,active:n,onClose:d,onNavigate:l}=t,a=X();let o,u,b,p,m,h,f,v,j,C,w;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==i.icon||e[4]!==i.id||e[5]!==i.title){const L=Wt(i.icon,i.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,u=ge,C=!0,o=Ge,p=jt.root,e[17]!==r||e[18]!==i.id?(m={org:r,agentId:i.id},e[17]=r,e[18]=i.id,e[19]=m):m=e[19],h=i.title,f=n||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,n&&"ring-[1.5px] ring-current"),e[0]=n,e[1]=l,e[2]=r,e[3]=i.icon,e[4]=i.id,e[5]=i.title,e[6]=o,e[7]=u,e[8]=b,e[9]=p,e[10]=m,e[11]=h,e[12]=f,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],u=e[7],b=e[8],p=e[9],m=e[10],h=e[11],f=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let c;e[22]!==i.icon||e[23]!==i.title?(c=s.jsx(Bt,{icon:i.icon,name:i.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=i.icon,e[23]=i.title,e[24]=c):c=e[24];let x;e[25]!==o||e[26]!==p||e[27]!==m||e[28]!==h||e[29]!==f||e[30]!==v||e[31]!==j||e[32]!==c?(x=s.jsx(o,{to:p,params:m,"aria-label":h,"aria-current":f,onClick:v,className:j,children:c}),e[25]=o,e[26]=p,e[27]=m,e[28]=h,e[29]=f,e[30]=v,e[31]=j,e[32]=c,e[33]=x):x=e[33];let g;e[34]!==u||e[35]!==x||e[36]!==C?(g=s.jsx(u,{asChild:C,children:x}),e[34]=u,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==i.title?(y=s.jsx(be,{side:"right",children:i.title}),e[38]=i.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==i.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:i.title}),e[46]=i.title,e[47]=_,e[48]=T):T=e[48];let E;e[49]!==i.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:i.title}),e[49]=i.title,e[50]=a,e[51]=E):E=e[51];let O;e[52]!==d?(O=()=>{H("org_rail_recent_project_closed"),d()},e[52]=d,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let R;e[56]!==E||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":E,onClick:O,className:z,children:D}),e[56]=E,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Fs={"site-editor":"/site-editor"};function Us(t){const e=I.c(26),{app:i}=t,r=X(),n=cs[i],d=Fs[i];if(!n||!d)return null;let l;e[0]!==n.labelKey||e[1]!==r?(l=r(n.labelKey),e[0]=n.labelKey,e[1]=r,e[2]=l):l=e[2];let a;e[3]!==n.labelKey||e[4]!==r?(a=r(n.labelKey),e[3]=n.labelKey,e[4]=r,e[5]=a):a=e[5];let o;e[6]!==n.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",n.tone),e[6]=n.tone,e[7]=o):o=e[7];let u;e[8]!==n.Icon?(u=s.jsx(n.Icon,{size:18}),e[8]=n.Icon,e[9]=u):u=e[9];let b;e[10]!==a||e[11]!==o||e[12]!==u||e[13]!==d?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ge,{to:d,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:u})}),e[10]=a,e[11]=o,e[12]=u,e[13]=d,e[14]=b):b=e[14];let p;e[15]!==n.labelKey||e[16]!==r?(p=r(n.labelKey),e[15]=n.labelKey,e[16]=r,e[17]=p):p=e[17];let m;e[18]!==p?(m=s.jsx(be,{side:"right",children:p}),e[18]=p,e[19]=m):m=e[19];let h;e[20]!==b||e[21]!==m?(h=s.jsxs(xe,{children:[b,m]}),e[20]=b,e[21]=m,e[22]=h):h=e[22];let f;return e[23]!==l||e[24]!==h?(f=s.jsx(ve,{active:!0,label:l,children:h}),e[23]=l,e[24]=h,e[25]=f):f=e[25],f}function Ws(){const{org:t}=Re();return ds(t.slug),null}function tt(t){const e=I.c(77),{onNavigate:i}=t===void 0?{}:t,r=X(),n=gt(),{org:d}=Re(),l=bt();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ys},e[0]=a):a=e[0];const o=Ye(a);let u;e[1]!==o||e[2]!==l?(u=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=u):u=e[3];const b=u,p=b?b.org:d.slug,{data:m}=xt(),[h,f]=M.useState(!1),[v,j]=M.useState(!1),C=Ie(),{recent:w,forget:c}=fs(d.slug),{projects:x}=ms(),g=hs(),y=us(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter($=>$.id===N)),_=Jt(m??[],d),{recent:T}=Qt(),E=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ve.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,ts),R=Oe(z),A=M.useSyncExternalStore(As,Ms,$s),{shown:L}=ss(rs(_,R,d.slug),T,d.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Dt(Pt,P)),U=N=>{const{active:$,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(it=>ls(Oe(it),L.map(Xs),String($.id),String(Ke.id))))},Y=N=>{i?.(),n({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),i?.(),E(N,L.map(Hs))},W=()=>{if(H("org_rail_search_opened"),!d.id){j(!0);return}i?.(),os()},G=!C&&"border-r border-sidebar-border";let V;e[6]!==G?(V=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=V):V=e[7];const rt="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Ee=Nt,ze=Tt,De=At,Ne=L.map(Bs),Te=Mt,Le=L.map(N=>s.jsxs(M.Fragment,{children:[s.jsx(Is,{org:N,active:N.slug===p,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==d.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{i?.(),n({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D($=>ns(Oe($),N.slug)),onHide:N.slug===d.slug?void 0:()=>D($=>is(Oe($),N.slug))}),N.slug===d.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map($=>s.jsx(Ks,{project:$,orgSlug:d.slug,active:g===$.id,onClose:()=>c($.id),onNavigate:i},$.id))})]},N.id));let q;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(q=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=q):q=e[14];let J;e[15]!==Ee||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==q?(J=s.jsx(Ee,{sensors:F,collisionDetection:ze,onDragEnd:U,children:q}),e[15]=Ee,e[16]=U,e[17]=F,e[18]=ze,e[19]=q,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Us,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==Z?(ee=s.jsxs("div",{className:rt,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Xt,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ie;e[36]!==re?(ie=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ie):ie=e[37];let ne;e[38]!==se||e[39]!==ie?(ne=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=ne):ne=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==f?(oe=()=>f(!0),e[43]=f,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ht,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ns,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ne||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ne,ue,Ce]}),e[57]=ne,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==V?(me=s.jsxs("div",{className:V,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=V,e[63]=me):me=e[63];let he;e[64]!==d.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(_s,{open:v,onOpenChange:j,orgs:_,currentSlug:d.slug,onSelect:K}),e[64]=d.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==h||e[71]!==f?(pe=s.jsx(as,{open:h,onOpenChange:f}),e[70]=h,e[71]=f,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.slug}function Ys(t){return t.isLoading}function Gs(t){const e=I.c(15),{width:i,minWidth:r,maxWidth:n,onPointerDown:d,onKeyDown:l,onDoubleClick:a}=t,o=X(),{isMobile:u}=Ze(),b=Ie();if(u||b)return null;let p;e[0]!==o?(p=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=p):p=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let h,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=h,e[5]=f):(h=e[4],f=e[5]);let v;return e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==l||e[10]!==d||e[11]!==p||e[12]!==m||e[13]!==i?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":p,"aria-valuenow":i,"aria-valuemin":r,"aria-valuemax":n,title:m,tabIndex:0,onPointerDown:d,onKeyDown:l,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:h,children:f}),e[6]=n,e[7]=r,e[8]=a,e[9]=l,e[10]=d,e[11]=p,e[12]=m,e[13]=i,e[14]=v):v=e[14],v}const Me=400,Xe=16,Vs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>typeof f=="number"?e(f):192,t[0]=i):i=t[0];const[r,n]=$e(Vs,i),d=M.useRef(null);let l;t[1]!==n||t[2]!==r?(l=f=>{f.preventDefault();const v=f.clientX,j=e(r),C=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const c=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));n(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",c),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=n,t[2]=r,t[3]=l):l=t[3];const a=l;let o;t[4]!==n?(o=()=>{n(192)},t[4]=n,t[5]=o):o=t[5];const u=o;let b;t[6]!==n||t[7]!==r?(b=f=>{if(f.key==="ArrowLeft")n(e(r-Xe));else if(f.key==="ArrowRight")n(e(r+Xe));else if(f.key==="Home")n(192);else if(f.key==="End")n(Me);else return;f.preventDefault()},t[6]=n,t[7]=r,t[8]=b):b=t[8];const p=b,m=e(r);let h;return t[9]!==p||t[10]!==a||t[11]!==u||t[12]!==m?(h={width:m,minWidth:192,maxWidth:Me,wrapperRef:d,onStartResize:a,onKeyDownResize:p,resetWidth:u},t[9]=p,t[10]=a,t[11]=u,t[12]=m,t[13]=h):h=t[13],h}function qs(t){return Math.max(192,Math.min(Me,t))}const st=M.createContext(null);function Js(){const t=M.use(st);if(!t)throw new Error("Layout regions require a Layout");return t}function Qs({children:t,notice:e,outsideOrg:i}){const r=Et(),[n,d]=$e(Ve.sidebarOpen(),!0),l=Zs(),a=Ye({select:m=>yt(m.location.state)}),[o,u]=M.useState(!1);!a&&o&&u(!1);const b=a&&!o?!1:n,p=m=>{if(!a){d(m);return}u(m),m&&!n&&d(!0)};return s.jsx(st,{value:{isMobile:r,resize:l},children:s.jsx(wt,{open:b,onOpenChange:p,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!i&&s.jsx(Ws,{}),!r&&(i?.rail??!0)&&s.jsx(tt,{}),s.jsx(Ct,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(Cs,{children:t})})]})]})})})}function er(t){const e=I.c(36),{children:i,renderMobile:r}=t,n=X(),{isMobile:d,resize:l}=Js(),{openMobile:a,setOpenMobile:o}=Ze(),u=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const p=b;if(!d){let x;e[2]!==i||e[3]!==u?(x=s.jsx("div",{className:"contents",inert:u,children:i}),e[2]=i,e[3]=u,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Gs,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let m;e[15]!==n?(m=n("layouts.shellControls.navigationTitle"),e[15]=n,e[16]=m):m=e[16];let h;e[17]!==m?(h=s.jsx(kt,{className:"sr-only",children:m}),e[17]=m,e[18]=h):h=e[18];let f;e[19]!==p?(f=s.jsx(tt,{onNavigate:p}),e[19]=p,e[20]=f):f=e[20];let v;e[21]!==p||e[22]!==r?(v=r({onClose:p}),e[21]=p,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==f||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[f,j]}),e[26]=f,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==h||e[30]!==C?(w=s.jsxs(Ot,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:tr,children:[h,C]}),e[29]=h,e[30]=C,e[31]=w):w=e[31];let c;return e[32]!==a||e[33]!==o||e[34]!==w?(c=s.jsx(Rt,{open:a,onOpenChange:o,children:w}),e[32]=a,e[33]=o,e[34]=w,e[35]=c):c=e[35],c}function tr(t){return t.preventDefault()}function sr(t){const e=I.c(3),{children:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let n;return e[1]!==i?(n=s.jsx(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(St,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:i})})}),e[1]=i,e[2]=n):n=e[2],n}const Er=Object.assign(Qs,{Sidebar:er,Content:sr});export{Er as L};
1
+ import{c as I,b as X,r as M,m as B,j as s,a6 as Re,e as nt,t as je,D as lt,v as ot,w as at,x as ct,y as dt,B as Fe,ax as ut,Y as ke,a7 as ft,E as H,X as mt,Z as ht,_ as pt,d as gt,aE as bt,l as Ye,H as xt,au as $e,L as Ge,$ as jt,aw as Ve,aF as vt,aG as yt,P as St}from"./index-OSvXQU0Z.js";import{u as Ie,c as Ze,g as wt,h as Ct,i as _t}from"./use-sidebar-collapsed-CmbDjI-Q.js";import{S as kt,a as Ot,b as Rt}from"./sheet-fInBGBxI.js";import{u as Et}from"./use-mobile-ke5ZDv8p.js";import{u as zt,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./task-key-D5k81-kx.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-DePnbT4r.js";import{i as It}from"./Tool01-m86Phkll.js";import{t as Kt,u as Ft,v as Ut,w as Wt,A as Bt,x as Ue}from"./agent-icon-Cm7N0-bv.js";import{s as Ht}from"./Plus-johmxWOE.js";import{a as Xt}from"./UserSquare-BhtzcYE8.js";import{a as Yt}from"./UserCheck01-C8hLtzy2.js";import{s as qe}from"./XClose-BMX-96qf.js";import{T as ge,a as be,c as xe}from"./tooltip-Cprju8cR.js";import{C as Pe,f as Gt,g as Vt,e as Zt}from"./context-menu-D12azdee.js";import{a as qt,O as Je,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as is,t as ns,f as Qe,m as ls,o as os}from"./use-org-notice-DAIPpLvK.js";import{C as as}from"./create-organization-dialog-CSi6V0lf.js";import{P as cs}from"./project-apps-Dgu7yO2X.js";import{u as ds,a as us}from"./use-recent-apps-BaZdSz76.js";import{a as fs}from"./use-navigate-to-agent-BBU44HO0.js";import{a as ms,u as hs}from"./use-project-scope-BzxL6CLn.js";import{C as We,a as ps,b as gs,c as bs,d as xs}from"./command-rigJJqHv.js";import{u as js}from"./use-debounced-value-jvU6cmtP.js";import{n as vs}from"./BookOpen01-C9k43IqJ.js";import{F as ys,a as Ae,b as Ss,c as et}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-ChOXQSIh.js";import{a as Cs}from"./thread-button-CdZ-TuVw.js";function _s(t){const e=I.c(48),{open:i,onOpenChange:r,orgs:n,currentSlug:d,onSelect:l}=t,a=X(),[o,u]=M.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const p=b,m=js(p,150),h=p.length>0,f=m===p,{hits:v,isSearching:j,isStale:C,isError:w}=qt(h?m:""),c=h?v:n;let x;e[2]!==r?(x=L=>{r(L),L||u("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==a?(y=a("sidebar.rail.searchOrganizations"),e[4]=a,e[5]=y):y=e[5];let S;e[6]!==a?(S=a("sidebar.rail.searchPlaceholder"),e[6]=a,e[7]=S):S=e[7];let k;e[8]!==a?(k=a("sidebar.rail.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(ps,{value:o,onValueChange:u,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=h&&(C||!f)&&"opacity-50";let E;e[13]!==T?(E=B(T),e[13]=T,e[14]=E):E=e[14];let O;e[15]!==w||e[16]!==h||e[17]!==a?(O=h&&w&&s.jsx(We,{children:a("sidebar.rail.searchFailed")}),e[15]=w,e[16]=h,e[17]=a,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==c.length||e[22]!==f||e[23]!==a?(z=!w&&f&&!j&&c.length===0&&s.jsx(We,{children:a("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=c.length,e[22]=f,e[23]=a,e[24]=z):z=e[24];let D;if(e[25]!==d||e[26]!==l||e[27]!==g||e[28]!==c||e[29]!==a){let L;e[31]!==d||e[32]!==l||e[33]!==g||e[34]!==a?(L=P=>s.jsxs(gs,{value:P.slug,onSelect:()=>{g(!1),P.slug!==d&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Je,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===d&&s.jsx("span",{className:"text-meta shrink-0",children:a("sidebar.rail.currentOrganization")})]},P.id),e[31]=d,e[32]=l,e[33]=g,e[34]=a,e[35]=L):L=e[35],D=c.map(L),e[25]=d,e[26]=l,e[27]=g,e[28]=c,e[29]=a,e[30]=D}else D=e[30];let R;e[36]!==z||e[37]!==D||e[38]!==E||e[39]!==O?(R=s.jsxs(bs,{className:E,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=E,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==i||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:i,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=i,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function ks(t){const e=I.c(4),{size:i,className:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=n):n=e[0];let d;return e[1]!==r||e[2]!==i?(d=s.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:n}),e[1]=r,e[2]=i,e[3]=d):d=e[3],d}const Os=250;function Rs(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,i){return new Promise(r=>t.toBlob(r,e,i))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(d=>setTimeout(d,Os));const i=document.createElement("canvas");i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(i,"image/png");if((!r||r.size>et)&&(r=await Be(i,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const n=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${n}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:i}){const r=X(),n=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:d}=Re(),[l,a]=M.useState(""),[o,u]=M.useState([]),[b,p]=M.useState(!1),m=()=>{for(const c of o)URL.revokeObjectURL(c.previewUrl);u([]),a("")},h=c=>{const x=c.filter(S=>Ss.includes(S.type)?S.size>et?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&u(S=>[...S,...y])},f=c=>{URL.revokeObjectURL(c.previewUrl),u(x=>x.filter(g=>g!==c))},v=async()=>{p(!0);try{h([await Es()])}catch(c){c instanceof DOMException&&c.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",c),je.error(r("sidebar.feedback.screenshotFailed")))}finally{p(!1)}},j=c=>{const x=Array.from(c.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(c.preventDefault(),h(x))},C=nt({mutationFn:async()=>{const c=new FormData;c.set("kind",t),c.set("message",l.trim()),c.set("pageUrl",window.location.href);for(const g of o)c.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(d.slug)}/feedback`,{method:"POST",body:c});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(n.sent),m(),i(!1)},onError:()=>je.error(n.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(lt,{open:e&&!b,onOpenChange:i,children:s.jsxs(ot,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(at,{children:s.jsx(ct,{children:n.title})}),s.jsx(ws,{autoFocus:!0,value:l,onChange:c=>a(c.target.value),onPaste:j,onKeyDown:c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),w&&C.mutate())},placeholder:n.placeholder,className:"min-h-32 max-h-80",maxLength:ys}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((c,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:c.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:c.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},c.previewUrl))}),s.jsxs(dt,{className:"sm:justify-between",children:[Rs()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(Kt,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:i,label:r,children:n}=t,d=i?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==d?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",d),e[0]=d,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=a):a=e[3];let o;e[4]!==i||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=i,e[5]=r,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==a||e[9]!==o?(u=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,n,o]}),e[7]=n,e[8]=a,e[9]=o,e[10]=u):u=e[10],u}const zs="https://docs.decocms.com/",Ds="https://discord.gg/EQkX7CymV";function Ns(){const t=I.c(39),e=X(),{org:i}=Re(),[r,n]=M.useState(null),d=!!i.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),n(_)},t[0]=l):l=t[0];const a=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ut,{size:18}),t[3]=u):u=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ps,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:u})})}),t[4]=o,t[5]=b):b=t[5];let p;t[6]!==e?(p=e("sidebar.help.button"),t[6]=e,t[7]=p):p=t[7];let m;t[8]!==p?(m=s.jsx(be,{side:"right",children:p}),t[8]=p,t[9]=m):m=t[9];let h;t[10]!==b||t[11]!==m?(h=s.jsxs(xe,{children:[b,m]}),t[10]=b,t[11]=m,t[12]=h):h=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(vs,{}),t[13]=f):f=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ls,children:[f,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ks,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let c;t[21]!==w?(c=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Ds,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[C,w]})}),t[21]=w,t[22]=c):c=t[22];let x;t[23]!==d||t[24]!==e?(x=d&&s.jsxs(s.Fragment,{children:[s.jsx(ut,{}),s.jsxs(ke,{onSelect:()=>a("problem"),children:[s.jsx(ft,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>a("feedback"),children:[s.jsx(Ft,{}),e("sidebar.feedback.button")]})]}),t[23]=d,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==c||t[27]!==x||t[28]!==j?(g=s.jsxs(ht,{side:"right",align:"end",className:"w-56",children:[j,c,x]}),t[26]=c,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==h?(y=s.jsx(ve,{active:!1,children:s.jsxs(pt,{children:[h,g]})}),t[30]=g,t[31]=h,t[32]=y):y=t[32];let S;t[33]!==d||t[34]!==r?(S=d&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>n(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>n(_?"feedback":null)})]}),t[33]=d,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ts(){return H("help_menu_discord_opened")}function Ls(){return H("help_menu_guides_opened")}function Ps(){return H("help_menu_opened")}function As(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const Ms=()=>Qe(globalThis.innerHeight),$s=()=>Qe(0);function Is(t){const e=I.c(59),{org:i,active:r,onSelect:n,pinned:d,onOpenSettings:l,onTogglePin:a,onHide:o}=t,u=X();let b;e[0]!==i.slug?(b={id:i.slug},e[0]=i.slug,e[1]=b):b=e[1];const{setNodeRef:p,listeners:m,transform:h,transition:f,isDragging:v}=$t(b);let j;e[2]!==h?(j=Lt.Transform.toString(h?{...h,x:0}:null),e[2]=h,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${i.slug}`;let c;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==f?(c={transform:j,transition:f,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=f,e[8]=c):c=e[8];const x=i.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=n&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==i?(_=s.jsx(Je,{org:i,size:"lg"}),e[12]=i,e[13]=_):_=e[13];let T;e[14]!==d?(T=d&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=d,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==i.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(E=s.jsx(ge,{asChild:!0,children:s.jsx(Gt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:n,className:k,children:[_,T]})})}),e[16]=n,e[17]=i.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=E):E=e[22];let O;e[23]!==i.name?(O=s.jsx(be,{side:"right",children:i.name}),e[23]=i.name,e[24]=O):O=e[24];let z;e[25]!==E||e[26]!==O?(z=s.jsxs(xe,{children:[E,O]}),e[25]=E,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Yt,{}),e[28]=D):D=e[28];let R;e[29]!==u?(R=u("sidebar.rail.organizationSettings"),e[29]=u,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==d||e[36]!==u?(P=u(d?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=d,e[36]=u,e[37]=P):P=e[37];let F;e[38]!==a||e[39]!==P?(F=s.jsxs(Pe,{onSelect:a,children:[L,P]}),e[38]=a,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==u?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),u("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=u,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Vt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==m||e[55]!==p||e[56]!==W||e[57]!==c?(G=s.jsx("div",{ref:p,...m,style:c,className:"w-full shrink-0 touch-none",children:W}),e[54]=m,e[55]=p,e[56]=W,e[57]=c,e[58]=G):G=e[58],G}function Ks(t){const e=I.c(64),{project:i,orgSlug:r,active:n,onClose:d,onNavigate:l}=t,a=X();let o,u,b,p,m,h,f,v,j,C,w;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==i.icon||e[4]!==i.id||e[5]!==i.title){const L=Wt(i.icon,i.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,u=ge,C=!0,o=Ge,p=jt.root,e[17]!==r||e[18]!==i.id?(m={org:r,agentId:i.id},e[17]=r,e[18]=i.id,e[19]=m):m=e[19],h=i.title,f=n||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,n&&"ring-[1.5px] ring-current"),e[0]=n,e[1]=l,e[2]=r,e[3]=i.icon,e[4]=i.id,e[5]=i.title,e[6]=o,e[7]=u,e[8]=b,e[9]=p,e[10]=m,e[11]=h,e[12]=f,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],u=e[7],b=e[8],p=e[9],m=e[10],h=e[11],f=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let c;e[22]!==i.icon||e[23]!==i.title?(c=s.jsx(Bt,{icon:i.icon,name:i.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=i.icon,e[23]=i.title,e[24]=c):c=e[24];let x;e[25]!==o||e[26]!==p||e[27]!==m||e[28]!==h||e[29]!==f||e[30]!==v||e[31]!==j||e[32]!==c?(x=s.jsx(o,{to:p,params:m,"aria-label":h,"aria-current":f,onClick:v,className:j,children:c}),e[25]=o,e[26]=p,e[27]=m,e[28]=h,e[29]=f,e[30]=v,e[31]=j,e[32]=c,e[33]=x):x=e[33];let g;e[34]!==u||e[35]!==x||e[36]!==C?(g=s.jsx(u,{asChild:C,children:x}),e[34]=u,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==i.title?(y=s.jsx(be,{side:"right",children:i.title}),e[38]=i.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==i.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:i.title}),e[46]=i.title,e[47]=_,e[48]=T):T=e[48];let E;e[49]!==i.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:i.title}),e[49]=i.title,e[50]=a,e[51]=E):E=e[51];let O;e[52]!==d?(O=()=>{H("org_rail_recent_project_closed"),d()},e[52]=d,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let R;e[56]!==E||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":E,onClick:O,className:z,children:D}),e[56]=E,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Fs={"site-editor":"/site-editor"};function Us(t){const e=I.c(26),{app:i}=t,r=X(),n=cs[i],d=Fs[i];if(!n||!d)return null;let l;e[0]!==n.labelKey||e[1]!==r?(l=r(n.labelKey),e[0]=n.labelKey,e[1]=r,e[2]=l):l=e[2];let a;e[3]!==n.labelKey||e[4]!==r?(a=r(n.labelKey),e[3]=n.labelKey,e[4]=r,e[5]=a):a=e[5];let o;e[6]!==n.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",n.tone),e[6]=n.tone,e[7]=o):o=e[7];let u;e[8]!==n.Icon?(u=s.jsx(n.Icon,{size:18}),e[8]=n.Icon,e[9]=u):u=e[9];let b;e[10]!==a||e[11]!==o||e[12]!==u||e[13]!==d?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ge,{to:d,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:u})}),e[10]=a,e[11]=o,e[12]=u,e[13]=d,e[14]=b):b=e[14];let p;e[15]!==n.labelKey||e[16]!==r?(p=r(n.labelKey),e[15]=n.labelKey,e[16]=r,e[17]=p):p=e[17];let m;e[18]!==p?(m=s.jsx(be,{side:"right",children:p}),e[18]=p,e[19]=m):m=e[19];let h;e[20]!==b||e[21]!==m?(h=s.jsxs(xe,{children:[b,m]}),e[20]=b,e[21]=m,e[22]=h):h=e[22];let f;return e[23]!==l||e[24]!==h?(f=s.jsx(ve,{active:!0,label:l,children:h}),e[23]=l,e[24]=h,e[25]=f):f=e[25],f}function Ws(){const{org:t}=Re();return ds(t.slug),null}function tt(t){const e=I.c(77),{onNavigate:i}=t===void 0?{}:t,r=X(),n=gt(),{org:d}=Re(),l=bt();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ys},e[0]=a):a=e[0];const o=Ye(a);let u;e[1]!==o||e[2]!==l?(u=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=u):u=e[3];const b=u,p=b?b.org:d.slug,{data:m}=xt(),[h,f]=M.useState(!1),[v,j]=M.useState(!1),C=Ie(),{recent:w,forget:c}=fs(d.slug),{projects:x}=ms(),g=hs(),y=us(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter($=>$.id===N)),_=Jt(m??[],d),{recent:T}=Qt(),E=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ve.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,ts),R=Oe(z),A=M.useSyncExternalStore(As,Ms,$s),{shown:L}=ss(rs(_,R,d.slug),T,d.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Dt(Pt,P)),U=N=>{const{active:$,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(it=>ls(Oe(it),L.map(Xs),String($.id),String(Ke.id))))},Y=N=>{i?.(),n({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),i?.(),E(N,L.map(Hs))},W=()=>{if(H("org_rail_search_opened"),!d.id){j(!0);return}i?.(),os()},G=!C&&"border-r border-sidebar-border";let V;e[6]!==G?(V=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=V):V=e[7];const rt="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Ee=Nt,ze=Tt,De=At,Ne=L.map(Bs),Te=Mt,Le=L.map(N=>s.jsxs(M.Fragment,{children:[s.jsx(Is,{org:N,active:N.slug===p,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==d.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{i?.(),n({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D($=>ns(Oe($),N.slug)),onHide:N.slug===d.slug?void 0:()=>D($=>is(Oe($),N.slug))}),N.slug===d.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map($=>s.jsx(Ks,{project:$,orgSlug:d.slug,active:g===$.id,onClose:()=>c($.id),onNavigate:i},$.id))})]},N.id));let q;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(q=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=q):q=e[14];let J;e[15]!==Ee||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==q?(J=s.jsx(Ee,{sensors:F,collisionDetection:ze,onDragEnd:U,children:q}),e[15]=Ee,e[16]=U,e[17]=F,e[18]=ze,e[19]=q,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Us,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==Z?(ee=s.jsxs("div",{className:rt,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Xt,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ie;e[36]!==re?(ie=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ie):ie=e[37];let ne;e[38]!==se||e[39]!==ie?(ne=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=ne):ne=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==f?(oe=()=>f(!0),e[43]=f,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ht,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ns,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ne||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ne,ue,Ce]}),e[57]=ne,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==V?(me=s.jsxs("div",{className:V,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=V,e[63]=me):me=e[63];let he;e[64]!==d.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(_s,{open:v,onOpenChange:j,orgs:_,currentSlug:d.slug,onSelect:K}),e[64]=d.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==h||e[71]!==f?(pe=s.jsx(as,{open:h,onOpenChange:f}),e[70]=h,e[71]=f,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.slug}function Ys(t){return t.isLoading}function Gs(t){const e=I.c(15),{width:i,minWidth:r,maxWidth:n,onPointerDown:d,onKeyDown:l,onDoubleClick:a}=t,o=X(),{isMobile:u}=Ze(),b=Ie();if(u||b)return null;let p;e[0]!==o?(p=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=p):p=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let h,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=h,e[5]=f):(h=e[4],f=e[5]);let v;return e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==l||e[10]!==d||e[11]!==p||e[12]!==m||e[13]!==i?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":p,"aria-valuenow":i,"aria-valuemin":r,"aria-valuemax":n,title:m,tabIndex:0,onPointerDown:d,onKeyDown:l,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:h,children:f}),e[6]=n,e[7]=r,e[8]=a,e[9]=l,e[10]=d,e[11]=p,e[12]=m,e[13]=i,e[14]=v):v=e[14],v}const Me=400,Xe=16,Vs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>typeof f=="number"?e(f):192,t[0]=i):i=t[0];const[r,n]=$e(Vs,i),d=M.useRef(null);let l;t[1]!==n||t[2]!==r?(l=f=>{f.preventDefault();const v=f.clientX,j=e(r),C=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const c=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));n(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",c),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=n,t[2]=r,t[3]=l):l=t[3];const a=l;let o;t[4]!==n?(o=()=>{n(192)},t[4]=n,t[5]=o):o=t[5];const u=o;let b;t[6]!==n||t[7]!==r?(b=f=>{if(f.key==="ArrowLeft")n(e(r-Xe));else if(f.key==="ArrowRight")n(e(r+Xe));else if(f.key==="Home")n(192);else if(f.key==="End")n(Me);else return;f.preventDefault()},t[6]=n,t[7]=r,t[8]=b):b=t[8];const p=b,m=e(r);let h;return t[9]!==p||t[10]!==a||t[11]!==u||t[12]!==m?(h={width:m,minWidth:192,maxWidth:Me,wrapperRef:d,onStartResize:a,onKeyDownResize:p,resetWidth:u},t[9]=p,t[10]=a,t[11]=u,t[12]=m,t[13]=h):h=t[13],h}function qs(t){return Math.max(192,Math.min(Me,t))}const st=M.createContext(null);function Js(){const t=M.use(st);if(!t)throw new Error("Layout regions require a Layout");return t}function Qs({children:t,notice:e,outsideOrg:i}){const r=Et(),[n,d]=$e(Ve.sidebarOpen(),!0),l=Zs(),a=Ye({select:m=>yt(m.location.state)}),[o,u]=M.useState(!1);!a&&o&&u(!1);const b=a&&!o?!1:n,p=m=>{if(!a){d(m);return}u(m),m&&!n&&d(!0)};return s.jsx(st,{value:{isMobile:r,resize:l},children:s.jsx(wt,{open:b,onOpenChange:p,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!i&&s.jsx(Ws,{}),!r&&(i?.rail??!0)&&s.jsx(tt,{}),s.jsx(Ct,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(Cs,{children:t})})]})]})})})}function er(t){const e=I.c(36),{children:i,renderMobile:r}=t,n=X(),{isMobile:d,resize:l}=Js(),{openMobile:a,setOpenMobile:o}=Ze(),u=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const p=b;if(!d){let x;e[2]!==i||e[3]!==u?(x=s.jsx("div",{className:"contents",inert:u,children:i}),e[2]=i,e[3]=u,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Gs,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let m;e[15]!==n?(m=n("layouts.shellControls.navigationTitle"),e[15]=n,e[16]=m):m=e[16];let h;e[17]!==m?(h=s.jsx(kt,{className:"sr-only",children:m}),e[17]=m,e[18]=h):h=e[18];let f;e[19]!==p?(f=s.jsx(tt,{onNavigate:p}),e[19]=p,e[20]=f):f=e[20];let v;e[21]!==p||e[22]!==r?(v=r({onClose:p}),e[21]=p,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==f||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[f,j]}),e[26]=f,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==h||e[30]!==C?(w=s.jsxs(Ot,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:tr,children:[h,C]}),e[29]=h,e[30]=C,e[31]=w):w=e[31];let c;return e[32]!==a||e[33]!==o||e[34]!==w?(c=s.jsx(Rt,{open:a,onOpenChange:o,children:w}),e[32]=a,e[33]=o,e[34]=w,e[35]=c):c=e[35],c}function tr(t){return t.preventDefault()}function sr(t){const e=I.c(3),{children:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let n;return e[1]!==i?(n=s.jsx(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(St,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:i})})}),e[1]=i,e[2]=n):n=e[2],n}const Er=Object.assign(Qs,{Sidebar:er,Content:sr});export{Er as L};
@@ -1,4 +1,4 @@
1
- import{c as $,b as j,r as _,j as f,m as B,a_ as at,t as se,b8 as Oe,a6 as ot,ho as lt,i as ct,K as ut,cd as ht,h as De,o as pt}from"./index-TxpTb6t-.js";import{u as dt,v as Be,f as ue,B as ft,w as gt,_ as P,$ as mt,a0 as kt,J as xt,K as D,a1 as ve,a2 as bt,e as wt,a3 as Se,a4 as yt,a5 as G,N as Fe,a6 as he,c as qe,a7 as pe,a8 as Tt,a9 as vt,s as St,aa as Mt,a as Et,E as At}from"./usage-stats-BDD0I25a.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-Dt9x0HTK.js";import{a as Ct,e as Ue,s as Lt,S as It}from"./suggestion-C_46bv7Q.js";import{B as zt}from"./index-IihCyBIe.js";import{aF as Pt,aj as jt,ak as Nt,am as Ht,L as Ot,aZ as Dt,aK as Bt}from"./agent-icon-TiRfS6qN.js";import{i as Ft}from"./SwitchHorizontal01-DLzxh9Gd.js";import{s as qt}from"./Trash01-Dh6D7ABD.js";import{k as Ut,a as Zt}from"./use-org-fs-7ZhjAHDq.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Jt}from"./markdown-hcA80xrk.js";import{s as Yt,T as en}from"./index-BqI8xAEu.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-DOsfIbnR.js";import{I as an}from"./icon-button-C-do25HN.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("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")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{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)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {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+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).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(),En=S(Qe).replace(/bull/g,fe).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(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="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",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {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",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).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",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\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",ee).getRegex(),Ln={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).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",ee).getRegex()},In={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).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:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
1
+ import{c as $,b as j,r as _,j as f,m as B,a_ as at,t as se,b8 as Oe,a6 as ot,ho as lt,i as ct,K as ut,cd as ht,h as De,o as pt}from"./index-OSvXQU0Z.js";import{u as dt,v as Be,f as ue,B as ft,w as gt,_ as P,$ as mt,a0 as kt,J as xt,K as D,a1 as ve,a2 as bt,e as wt,a3 as Se,a4 as yt,a5 as G,N as Fe,a6 as he,c as qe,a7 as pe,a8 as Tt,a9 as vt,s as St,aa as Mt,a as Et,E as At}from"./usage-stats-C_4X9-qJ.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-Ctf0rBwH.js";import{a as Ct,e as Ue,s as Lt,S as It}from"./suggestion-OMwRo4J1.js";import{B as zt}from"./index-zaRScPY5.js";import{aF as Pt,aj as jt,ak as Nt,am as Ht,L as Ot,aZ as Dt,aK as Bt}from"./agent-icon-Cm7N0-bv.js";import{i as Ft}from"./SwitchHorizontal01-DbeDoxGW.js";import{s as qt}from"./Trash01-CEWo4AIU.js";import{k as Ut,a as Zt}from"./use-org-fs-CHGJY6Rv.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Jt}from"./markdown-BxJxdoCM.js";import{s as Yt,T as en}from"./index-B_ZZ_ftJ.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-rigJJqHv.js";import{I as an}from"./icon-button-Ymzn1_Ie.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("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")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{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)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {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+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).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(),En=S(Qe).replace(/bull/g,fe).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(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="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",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {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",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).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",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\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",ee).getRegex(),Ln={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).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",ee).getRegex()},In={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).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:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Xe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Je=/^( {2,}|\\)\n(?!\s*$)/,jn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,te=/[\s\p{P}\p{S}]/u,be=/[^\s\p{P}\p{S}]/u,Nn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,te).getRegex(),Ye=/(?!~)[\p{P}\p{S}]/u,Hn=/(?!~)[\s\p{P}\p{S}]/u,On=/(?:[^\s\p{P}\p{S}]|~)/u,Dn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),et=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bn=S(et,"u").replace(/punct/g,F).getRegex(),Fn=S(et,"u").replace(/punct/g,Ye).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qn=S(tt,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Un=S(tt,"gu").replace(/notPunctSpace/g,On).replace(/punctSpace/g,Hn).replace(/punct/g,Ye).getRegex(),Zn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Gn=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),Kn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Wn=S(Kn,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Qn=S(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),Xn=S(/^<(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(),Vn=S(ke).replace("(?:-->|$)","-->").getRegex(),Jn=S("^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",Vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Yn=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nt=S(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",me).getRegex(),rt=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",me).getRegex(),er=S("reflink|nolink(?!\\()","g").replace("reflink",nt).replace("nolink",rt).getRegex(),_e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,we={_backpedal:N,anyPunctuation:Qn,autolink:Xn,blockSkip:Dn,br:Je,code:Pn,del:N,delLDelim:N,delRDelim:N,emStrongLDelim:Bn,emStrongRDelimAst:qn,emStrongRDelimUnd:Zn,escape:zn,link:Yn,nolink:rt,punctuation:Nn,reflink:nt,reflinkSearch:er,tag:Jn,text:jn,url:N},tr={...we,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},ae={...we,emStrongRDelimAst:Un,emStrongLDelim:Fn,delLDelim:Gn,delRDelim:Wn,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_e).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:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_e).getRegex()},nr={...ae,br:S(Je).replace("{2,}","*").getRegex(),text:S(ae.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:xe,gfm:Ln,pedantic:In},q={normal:we,gfm:ae,breaks:nr,pedantic:tr},rr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$e=t=>rr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,$e)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,$e);return t}function Ce(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Le(t,e){let n=t.replace(R.findPipe,(a,i,l)=>{let o=!1,h=i;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),s=n.split(R.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(R.slashPipe,"|");return s}function U(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function sr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function ir(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let a=4-n%4;s+=" ".repeat(a),n+=a}else s+=r,n++;return s}function Ie(t,e,n,s,r){let a=e.href,i=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function ar(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
3
3
  `).map(a=>{let i=a.match(n.other.beginningSpace);if(i===null)return a;let[l]=i;return l.length>=r.length?a.slice(r.length):a}).join(`
4
4
  `)}var J=class{options;rules;lexer;constructor(t){this.options=t||O}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:U(n,`
@@ -1 +1 @@
1
- import{r as l,c4 as ce,j as p,ca as _,c9 as T,c7 as C,cf as le,c3 as de,cr as ue,cn as fe,cg as me}from"./index-TxpTb6t-.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};
1
+ import{r as l,c4 as ce,j as p,ca as _,c9 as T,c7 as C,cf as le,c3 as de,cr as ue,cn as fe,cg as me}from"./index-OSvXQU0Z.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};
@@ -1,4 +1,4 @@
1
- import{c as ue,r as xe,d as ns,a6 as ht,b as _e,j as t,B as je,t as dt,a_ as Yt,an as as,K as bt,i as Et,a7 as As,m as ot,gK as _s,o as cs,h as Us,e3 as Ks,ad as Vs,u as qs,n as _t,E as Wt,R as Hs,dZ as Bs,hk as Js,T as Gs,W as Qs,I as Xt}from"./index-TxpTb6t-.js";import{S as Ys}from"./search-input-Cqw1sfoq.js";import{E as Ht}from"./empty-state-DG74voMp.js";import{R as Ws}from"./require-capability-BGgQVq09.js";import{f as js}from"./pair-Cpn9911A.js";import{b as ts}from"./use-connection-IXleYE4j.js";import{g as Ps}from"./connection-slug-woWVmFSM.js";import{B as Lt}from"./badge-BBSQh6Uu.js";import{P as ds,a as ms,b as us}from"./popover-BhQvI6Ci.js";import{c as Pt,T as Dt,a as Rt,b as Xs}from"./tooltip-DYXaNugu.js";import{B as fs,e as Kt,by as Zs,aw as Ns,L as el}from"./agent-icon-TiRfS6qN.js";import{i as tl}from"./Key01-DIFUZKO4.js";import{i as sl}from"./Play-Cz8nUNXY.js";import{MonacoCodeEditor as bs}from"./monaco-editor-DMwFk1Pi.js";import{u as ll}from"./use-mcp-client-ExS_LtHV.js";import{u as rl}from"./repository-binding-C6Q6rTCq.js";import{n as Ot}from"./LinkBroken01-OtZzvuyI.js";import{c as il}from"./SwitchHorizontal01-DLzxh9Gd.js";import{s as ol}from"./Plus-Hrr9Aktn.js";import{s as nl}from"./Trash01-Dh6D7ABD.js";import{M as $t}from"./multi-select-D4aZZa9s.js";import{b as yt,a as wt,c as $e,d as St,S as It}from"./select-B043gNlI.js";import{e as ys,T as al}from"./time-range-picker-BegNa_X6.js";import{T as cl}from"./textarea-BtM4NiRw.js";import{C as Ds}from"./collection-tabs-CcFA7CAt.js";import{S as dl}from"./switch-CYj4jY2U.js";import{L as ml}from"./label-DBXumtTI.js";import{I as Ct}from"./integration-icon-BwJVBZD3.js";import{A as ul,a as fl,b as xl}from"./alert-BAKJ5tDY.js";import{K as gt}from"./monitoring-stats-row-BBhVaUWr.js";import{b as Bt}from"./use-entitlements-DQIFZSxg.js";import{g as pl,b as ws,f as Nt,c as Zt,d as gl,e as Ss,a as xs,h as hl,i as ps,T as vl,j as jl,r as Nl,k as bl}from"./thread-sheet-body-C-nzP9iT.js";import{u as yl}from"./useSuspenseInfiniteQuery-DFT4-et2.js";import{c as wl,S as Sl,b as Rs,a as Ls}from"./sheet-BabUGgfu.js";import{c as De,b as vt,d as Jt,e as Gt,T as he,a as Qt}from"./table-C7JAS84x.js";import{t as ss}from"./ChevronDown-CTfQz_yW.js";import{n as ls}from"./ChevronUp-Bg3xtRAf.js";import{u as Os}from"./use-id-selection-LPkxd-T5.js";import{u as Fs}from"./use-infinite-scroll-BCd_t7BT.js";import{u as Il}from"./useInfiniteQuery-B1B1l9Rx.js";import{g as Cl}from"./task-status-bacBrTx-.js";import{u as Tl,d as kl}from"./use-automations-DRPUZksG.js";import{A as Ml}from"./automation-runs-CNPxxThM.js";import{i as _l}from"./ArrowLeft-Dqn2bT_w.js";import{E as Is}from"./empty-state-BaX7qcT6.js";import{O as zs}from"./watch-sse-pool-El5ChbJr.js";import{c as Pl,r as Dl,O as Rl,h as Ll}from"./order-monitor-day-xy0NwjGB.js";import{F as Ol}from"./feature-gate-INFDgxGv.js";import"./SearchMd-Bw_DK2gP.js";import"./access-gate-B0BUDTBB.js";import"./capability-load-error-CejuD9Wa.js";import"./Tool01-nVLtxvHv.js";import"./ArrowRight-CAgDickW.js";import"./collapsible-Bkbqa1G8.js";import"./use-copy-9udQq6fq.js";import"./usage-stats-BDD0I25a.js";import"./utils-CVEq3hMx.js";import"./markdown-hcA80xrk.js";import"./chat-context-DpOzXt67.js";import"./use-panel-navigate-TXIh5Jjf.js";import"./thread-route-CHHapqFU.js";import"./use-project-scope-CKvnTLpI.js";import"./use-view-draft-kind-kwEa5AZ1.js";import"./use-blog-view-CtOHSMkK.js";import"./use-organization-settings-BMzmJwkq.js";import"./schema-DQMwqc3y.js";import"./task-board-nk38_QK1.js";import"./thread-intent-xzBTK_RX.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-C7t2dJ2C.js";import"./use-ai-providers-B_vRXviN.js";import"./use-current-view-mBQFHLUH.js";import"./use-in-settings-CMsR7cZQ.js";import"./use-decopilot-events-CSZ1As5G.js";import"./use-org-fs-7ZhjAHDq.js";import"./use-mobile-CJUXV6Cd.js";import"./File02-B5-QN1Dl.js";import"./gateway-client-Bt-zgCod.js";import"./form-Dj9qATwb.js";import"./UserCheck01-C0gKOYWe.js";import"./task-key-BqL0wDoN.js";import"./use-task-board-items-BIQu-vu8.js";import"./config-SXpXedVw.js";import"./AlertCircle-Dq-KNxM5.js";import"./CheckCircle-C_Ajm69Q.js";import"./Eye-DlR25mJG.js";import"./task-route-I0jIuRPI.js";import"./project-index-Dvzw5ZPI.js";import"./UserSquare-DqYKKMSn.js";import"./shell-layout-CQtuJ10m.js";import"./Globe04-H2BdZ0Ti.js";import"./use-deployment-admin-TEfqeIeo.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-CcNfsDjh.js";import"./use-org-notice-DZNaXzPK.js";import"./Monitor01-Dd5mByvl.js";import"./Zap-Dg9_Uuep.js";import"./command-DOsfIbnR.js";import"./index-CKWVjdl2.js";import"./project-icon-79iKoL5J.js";import"./use-navigate-to-agent-GgUPd_lv.js";import"./use-debounced-value-CbXd2Ffh.js";import"./new-project-dialog-dB7_i4Qt.js";import"./repository-picker-qO39HBTX.js";import"./github-icon-CA0Se8ib.js";import"./collection-search-CpEkYZRJ.js";import"./BookOpen01-B7HgfzTg.js";import"./ShoppingBag01-BcP4nQLO.js";import"./new-project-store-yM3ZBfr8.js";import"./legacy-admin-welcome-dialog-BpjGA_Qv.js";import"./drawer-DBYfxUc5.js";import"./required-auth-layout-C0Zoqnd5.js";import"./use-org-sso-BKEBkMtq.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLV9FGK8.js";import"./types-CIVGvpZ0.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-BFqudZKw.js";import"./use-mcp-prompts-CMM6TNGu.js";import"./use-thread-outputs-DvgezGKZ.js";import"./file-type-icon-DDtj-qsY.js";import"./index-hsXsAM7a.js";import"./ArrowUp-4sBBKZzK.js";import"./ChevronSelectorVertical-wx6gpppj.js";import"./CreditCard01-CB7PvVHx.js";import"./MessageCircle01-DiHU7gWc.js";import"./Fingerprint04-CN5vYo8p.js";import"./LayoutLeft-D8DREd3Q.js";import"./Minus-C-L0uUsK.js";import"./Sun-BBMaxO6y.js";import"./Upload01-CuWxQjza.js";import"./Users01-BFb0vp-t.js";import"./editor-k1lz5vd2.js";import"./auth-D02eFBMZ.js";import"./checkbox-DONKjPez.js";import"./index-BdQq_4o_.js";import"./scroll-area-BX1dEYr0.js";import"./calendar-D9jiUY0V.js";import"./chart-Di4PD1Ji.js";import"./CategoricalChart-C1JOIphb.js";import"./index-s9Fdb2Os.js";import"./tooltipContext-Jj9fHDnV.js";import"./CartesianChart-C6F39bSp.js";import"./AreaChart-DJZ5kkMZ.js";import"./infiniteQueryObserver-DIsWsg7j.js";import"./useQueries-DCrQluth.js";import"./ReferenceLine-DVi6s9_q.js";import"./feature-paywall-DzuuNoC0.js";import"./plan-ladder-SUG2zxVV.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Fl=["eq","contains","exists","in"];function zl(s){return Fl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function $l(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),o=l?decodeURIComponent(l):"";if(o.trim())return{key:o,operator:i&&zl(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as ue,r as xe,d as ns,a6 as ht,b as _e,j as t,B as je,t as dt,a_ as Yt,an as as,K as bt,i as Et,a7 as As,m as ot,gK as _s,o as cs,h as Us,e3 as Ks,ad as Vs,u as qs,n as _t,E as Wt,R as Hs,dZ as Bs,hk as Js,T as Gs,W as Qs,I as Xt}from"./index-OSvXQU0Z.js";import{S as Ys}from"./search-input-BTXo0rPM.js";import{E as Ht}from"./empty-state-Cnb10iC_.js";import{R as Ws}from"./require-capability-vv-HxE0s.js";import{f as js}from"./pair-CDFcpsxO.js";import{b as ts}from"./use-connection-Bo77wUI4.js";import{g as Ps}from"./connection-slug-9VOx21AD.js";import{B as Lt}from"./badge-DmhY0k4f.js";import{P as ds,a as ms,b as us}from"./popover-DOi1uePA.js";import{c as Pt,T as Dt,a as Rt,b as Xs}from"./tooltip-Cprju8cR.js";import{B as fs,e as Kt,by as Zs,aw as Ns,L as el}from"./agent-icon-Cm7N0-bv.js";import{i as tl}from"./Key01-BKbEnhve.js";import{i as sl}from"./Play-CupXu5V-.js";import{MonacoCodeEditor as bs}from"./monaco-editor-AMxo4H5W.js";import{u as ll}from"./use-mcp-client-DC1kroLc.js";import{u as rl}from"./repository-binding-DWcsSj-q.js";import{n as Ot}from"./LinkBroken01-30jdc1Ee.js";import{c as il}from"./SwitchHorizontal01-DbeDoxGW.js";import{s as ol}from"./Plus-johmxWOE.js";import{s as nl}from"./Trash01-CEWo4AIU.js";import{M as $t}from"./multi-select-BHamke2v.js";import{b as yt,a as wt,c as $e,d as St,S as It}from"./select-DoQbBnCj.js";import{e as ys,T as al}from"./time-range-picker-D6QM55zj.js";import{T as cl}from"./textarea-ChOXQSIh.js";import{C as Ds}from"./collection-tabs-D7Vo1f2S.js";import{S as dl}from"./switch-C_2jBQUd.js";import{L as ml}from"./label-Csx-3v8Y.js";import{I as Ct}from"./integration-icon-TVRwnFcy.js";import{A as ul,a as fl,b as xl}from"./alert-DgZIrBNI.js";import{K as gt}from"./monitoring-stats-row-uNSiwzjZ.js";import{b as Bt}from"./use-entitlements-DJbHbqBs.js";import{g as pl,b as ws,f as Nt,c as Zt,d as gl,e as Ss,a as xs,h as hl,i as ps,T as vl,j as jl,r as Nl,k as bl}from"./thread-sheet-body-BXkFochM.js";import{u as yl}from"./useSuspenseInfiniteQuery-D6nr4CLj.js";import{c as wl,S as Sl,b as Rs,a as Ls}from"./sheet-fInBGBxI.js";import{c as De,b as vt,d as Jt,e as Gt,T as he,a as Qt}from"./table-DHolGkDK.js";import{t as ss}from"./ChevronDown-OTI5djzn.js";import{n as ls}from"./ChevronUp-B1aDls8C.js";import{u as Os}from"./use-id-selection-C-lytya_.js";import{u as Fs}from"./use-infinite-scroll-Bkw4TlTx.js";import{u as Il}from"./useInfiniteQuery-Cc6x0EgG.js";import{g as Cl}from"./task-status-BI-AtF2a.js";import{u as Tl,d as kl}from"./use-automations-CSPsZ4D5.js";import{A as Ml}from"./automation-runs-Bxcc51_7.js";import{i as _l}from"./ArrowLeft-BqHCgh-K.js";import{E as Is}from"./empty-state-CMB0iVjA.js";import{O as zs}from"./watch-sse-pool-Cy0wnTy4.js";import{c as Pl,r as Dl,O as Rl,h as Ll}from"./order-monitor-day-Bl63d_Ae.js";import{F as Ol}from"./feature-gate-CHmgAE37.js";import"./SearchMd-BF4D-OIS.js";import"./access-gate-CGN7GdVX.js";import"./capability-load-error-XyENamfv.js";import"./Tool01-m86Phkll.js";import"./ArrowRight-BTBfkPne.js";import"./collapsible-GnB05mZz.js";import"./use-copy-DEuGqQKY.js";import"./usage-stats-C_4X9-qJ.js";import"./utils-CVEq3hMx.js";import"./markdown-BxJxdoCM.js";import"./chat-context-BDbYH6DU.js";import"./use-panel-navigate-Khvtzqqe.js";import"./thread-route-pM3iBpC4.js";import"./use-project-scope-BzxL6CLn.js";import"./use-view-draft-kind-DZVyfsp9.js";import"./use-blog-view-618wKlvj.js";import"./use-organization-settings-DXEvl8Mj.js";import"./schema-Bip4QZH5.js";import"./task-board-D5OsG9Bh.js";import"./thread-intent-B7BYRHTJ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-Cu_NMrs6.js";import"./use-ai-providers-BRdMfbSe.js";import"./use-current-view-BY4Yr3Ak.js";import"./use-in-settings-CXgr4nxD.js";import"./use-decopilot-events-BM0ApVN1.js";import"./use-org-fs-CHGJY6Rv.js";import"./use-mobile-ke5ZDv8p.js";import"./File02-C0PbxigR.js";import"./gateway-client-C3ZU5-_v.js";import"./form-Dm1g6Sbo.js";import"./UserCheck01-C8hLtzy2.js";import"./task-key-D5k81-kx.js";import"./use-task-board-items-Cu-LAjNo.js";import"./config-il-mrtJw.js";import"./AlertCircle-DwSzq5uM.js";import"./CheckCircle-CQXVMLht.js";import"./Eye-B7bHPNlI.js";import"./task-route-BXv3go2m.js";import"./project-index-UVS3LS58.js";import"./UserSquare-BhtzcYE8.js";import"./shell-layout-DpAhzjkm.js";import"./Globe04-BigCPaEo.js";import"./use-deployment-admin-DNEaqLy_.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BMX-96qf.js";import"./use-org-notice-DAIPpLvK.js";import"./Monitor01-CILX5aJF.js";import"./Zap-qmAhMIUT.js";import"./command-rigJJqHv.js";import"./index-toeooV8r.js";import"./project-icon-Cmr6SrmT.js";import"./use-navigate-to-agent-BBU44HO0.js";import"./use-debounced-value-jvU6cmtP.js";import"./new-project-dialog-DrWLNe2p.js";import"./repository-picker-CG8_WRxv.js";import"./github-icon-BHk-XZWW.js";import"./collection-search-mwRnJ2oa.js";import"./BookOpen01-C9k43IqJ.js";import"./ShoppingBag01-BeLSpVUq.js";import"./new-project-store-_S8_LTiv.js";import"./legacy-admin-welcome-dialog-fjHNTqEg.js";import"./drawer-CifkTfym.js";import"./required-auth-layout-DtSikKoO.js";import"./use-org-sso-zv8-dYnz.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Cy0OmtCt.js";import"./types-DLbeP8WB.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-R03ky3hy.js";import"./use-mcp-prompts-CMsHTnDX.js";import"./use-thread-outputs-B4e3l9Oh.js";import"./file-type-icon-CXoLbYfz.js";import"./index-At64nru8.js";import"./ArrowUp-CZDDSEah.js";import"./ChevronSelectorVertical-rhJDM4Rj.js";import"./CreditCard01-BRLPBJsI.js";import"./MessageCircle01-DzETEiuY.js";import"./Fingerprint04-CgXsJGLm.js";import"./LayoutLeft-CwLIeRIW.js";import"./Minus-CJw7hyKt.js";import"./Sun-Dionl9S8.js";import"./Upload01-sC3bIoAL.js";import"./Users01-CDP9kGkf.js";import"./editor-DRWbb7ul.js";import"./auth-BkXZCqsk.js";import"./checkbox-CWIVoQk6.js";import"./index-BdQq_4o_.js";import"./scroll-area-DrQPUtug.js";import"./calendar-CXb62Hgf.js";import"./chart-BySfFX3r.js";import"./CategoricalChart-BxKUKwEU.js";import"./index-DTEDDR1x.js";import"./tooltipContext-Bl0kANqq.js";import"./CartesianChart-CEwlJSS3.js";import"./AreaChart-BD53lHXN.js";import"./infiniteQueryObserver-Db0Zh8ks.js";import"./useQueries-Byj3pdb5.js";import"./ReferenceLine-c20DchWo.js";import"./feature-paywall-DQ4EONHv.js";import"./plan-ladder-C250kgCs.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Fl=["eq","contains","exists","in"];function zl(s){return Fl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function $l(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),o=l?decodeURIComponent(l):"";if(o.trim())return{key:o,operator:i&&zl(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Cs(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function El(s){const e={},l={},i=[],m={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(l[o.key]=`%${o.value}%`);break;case"exists":i.push(o.key);break;case"in":o.value&&(m[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{c as f,f as p,ay as u,j as s,ba as x,N as a}from"./index-TxpTb6t-.js";import{C as j}from"./capability-load-error-CejuD9Wa.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
1
+ import{c as f,f as p,ay as u,j as s,ba as x,N as a}from"./index-OSvXQU0Z.js";import{C as j}from"./capability-load-error-XyENamfv.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
@@ -1 +1 @@
1
- import{r as n,c6 as q,d_ as R,d$ as Ee,e0 as ke,e1 as Se,aU as xe,e2 as j}from"./index-TxpTb6t-.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
1
+ import{r as n,c6 as q,d_ as R,d$ as Ee,e0 as ke,e1 as Se,aU as xe,e2 as j}from"./index-OSvXQU0Z.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
@@ -1 +1 @@
1
- import{B as H,v as U,ab as S,H as X,ac as Z,f as R,ad as J,ae as Q,p as z}from"./usage-stats-BDD0I25a.js";import{gE as M,hp as C,gD as P,hq as x,hr as L,hs as V,ht as K,hu as _,gG as A,eX as N,r as p,cd as B}from"./index-TxpTb6t-.js";import{C as k}from"./index-BqI8xAEu.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof X){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Z(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),B.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),B.createPortal(d,u.current)});export{Tt as B};
1
+ import{B as H,v as U,ab as S,H as X,ac as Z,f as R,ad as J,ae as Q,p as z}from"./usage-stats-C_4X9-qJ.js";import{gE as M,hp as C,gD as P,hq as x,hr as L,hs as V,ht as K,hu as _,gG as A,eX as N,r as p,cd as B}from"./index-OSvXQU0Z.js";import{C as k}from"./index-B_ZZ_ftJ.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof X){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Z(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),B.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),B.createPortal(d,u.current)});export{Tt as B};