decocms 4.618.1 → 4.619.0

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 (436) hide show
  1. package/dist/client/assets/{AlertCircle-GoAGGV0G.js → AlertCircle-CS5y5cdF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BCH9fczV.js → AreaChart-6i9ddKAo.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DuGHc_Gh.js → ArrowLeft-CnpYebJt.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CMJyKdyB.js → ArrowRight-CTIzvrRD.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-s5a8DQxj.js → ArrowUp-B_rPxUl3.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-DZs1-yi9.js → BookOpen01-0vmOJP7K.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BFVvuNgw.js → CartesianChart-BLh4dFJB.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-iNQ2kTf5.js → CategoricalChart-CwzUkCwO.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-vIQcB0iT.js → CheckCircle-CVSsEuJs.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-Dm2xO7jf.js → ChevronDown-BkddO6nk.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Cvgyclsz.js → ChevronSelectorVertical-B_EPXu-J.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BKdcyIOm.js → ChevronUp-hmtO7NfN.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BUXydXso.js → CreditCard01-CYAMo28t.js} +1 -1
  14. package/dist/client/assets/{Eye-DwRCQHLk.js → Eye-NyWbd_Et.js} +1 -1
  15. package/dist/client/assets/{File02-Y4Nh84qP.js → File02-B0o8Z6Rd.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-DlIWxzRc.js → Fingerprint04-DFly9X11.js} +1 -1
  17. package/dist/client/assets/{Globe04-5yHQa01g.js → Globe04-Bu51hlDK.js} +1 -1
  18. package/dist/client/assets/{Image01-BRABRo3v.js → Image01-Xgs_5RZR.js} +1 -1
  19. package/dist/client/assets/{Key01-DfLmV_su.js → Key01-B6wydByr.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-owMYqid0.js → LayoutLeft-ww8XIIKY.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-CyjdgWmP.js → LinkBroken01-CothmVOv.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-zc37Krdu.js → MessageCircle01-BoiiT0Ka.js} +1 -1
  23. package/dist/client/assets/{Minus-CFYZtYi9.js → Minus-DjGZhteG.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DUhT2Mcw.js → Monitor01-BnNa35fy.js} +1 -1
  25. package/dist/client/assets/{Play-C_9Fb_Ik.js → Play-DYcX2TsV.js} +1 -1
  26. package/dist/client/assets/{Plus-BoPsX_T8.js → Plus-BlCDSK3_.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-ChigmKEb.js → ReferenceLine-ysfQtWpe.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BGRe_18c.js → SearchMd-B2ZqlWzx.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-CoN4FBW5.js → ShoppingBag01-CO-Ik7_a.js} +1 -1
  30. package/dist/client/assets/{Sun-uwKn4QPm.js → Sun-C31h0XVy.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CHtrDs50.js → SwitchHorizontal01-B9krqVlE.js} +1 -1
  32. package/dist/client/assets/{Tool01-D90Wr5xR.js → Tool01-D_bTJJvK.js} +1 -1
  33. package/dist/client/assets/{Tooltip-Vyb5xIGx.js → Tooltip-BDg85pZn.js} +1 -1
  34. package/dist/client/assets/{Trash01-Ctp9Olbr.js → Trash01-CvVvZjMc.js} +1 -1
  35. package/dist/client/assets/{Upload01-DgxprpI7.js → Upload01-DAa882sM.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-CA8kXGn8.js → UserCheck01-B7Ux1cXt.js} +1 -1
  37. package/dist/client/assets/{UserSquare-dgrNjiXb.js → UserSquare-fSKR9s5Z.js} +1 -1
  38. package/dist/client/assets/{Users01-BasqfwpC.js → Users01-CYXQ60-Z.js} +1 -1
  39. package/dist/client/assets/{XClose-BUxhnZ3x.js → XClose-BvzwUB-E.js} +1 -1
  40. package/dist/client/assets/{Zap-CxPsn4FS.js → Zap-BALSokOc.js} +1 -1
  41. package/dist/client/assets/{access-gate-4Yp7vAaA.js → access-gate-JiR82oco.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-D2t3ivnz.js → add-connection-dialog-DYa3N2eg.js} +1 -1
  43. package/dist/client/assets/agent-app-Ccrencfm.js +1 -0
  44. package/dist/client/assets/{agent-assets-DDFIPSsr.js → agent-assets-DThFx4M4.js} +1 -1
  45. package/dist/client/assets/{agent-automation-B7CVzf5F.js → agent-automation-BNyRdPpc.js} +1 -1
  46. package/dist/client/assets/{agent-automations-5RoGEa0z.js → agent-automations-DJGo3Vpm.js} +1 -1
  47. package/dist/client/assets/{agent-blog-Sl8lv70B.js → agent-blog-SWKAlIDs.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-CeGtmOXI.js → agent-blog-post-BMj1nG5H.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-CMOhhL4x.js → agent-business-case-DWa8MdFx.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-DN3_psfi.js → agent-calendar-Dc34MYin.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-DmT72SWM.js → agent-capabilities-B0JydJjP.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-B2mB08r7.js → agent-connect-sources-BzvV2s_2.js} +1 -1
  53. package/dist/client/assets/agent-deck-t8ah4YL3.js +1 -0
  54. package/dist/client/assets/{agent-e2e-63TLdzRb.js → agent-e2e-CVKnE_cq.js} +1 -1
  55. package/dist/client/assets/agent-experiments-B6WL8a55.js +1 -0
  56. package/dist/client/assets/agent-file-DzOVJ5jJ.js +1 -0
  57. package/dist/client/assets/{agent-hosting-DR49fQQv.js → agent-hosting-CzWiy0GX.js} +1 -1
  58. package/dist/client/assets/{agent-icon-DoabtHNW.js → agent-icon-qKbICqBE.js} +1 -1
  59. package/dist/client/assets/agent-library-CkWv-QK0.js +1 -0
  60. package/dist/client/assets/agent-library-file-BeuXNSru.js +1 -0
  61. package/dist/client/assets/agent-overview-vn0B99S2.js +1 -0
  62. package/dist/client/assets/{agent-releases-CjOdbsoc.js → agent-releases-DVlreX78.js} +1 -1
  63. package/dist/client/assets/agent-settings-C8Vbd4tx.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-CZ2oqt5O.js → agent-site-editor-BscJQYUu.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-znS9yeFa.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-DFaZauTr.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-Bshkv5l8.js +1 -0
  68. package/dist/client/assets/agent-view-DbsCo68i.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-wWwEqBbc.js → agent-view-guard-2l72ULUX.js} +1 -1
  70. package/dist/client/assets/ai-providers-BuJXSSAm.js +1 -0
  71. package/dist/client/assets/{alert-C5EpdwBA.js → alert-pq0Y8AC8.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-BjczT6mc.js → analytics-sections-BcskhJEQ.js} +1 -1
  73. package/dist/client/assets/api-keys-C3uBLxjm.js +1 -0
  74. package/dist/client/assets/{api-keys-CV36tutN.js → api-keys-SpdE7FiC.js} +1 -1
  75. package/dist/client/assets/{app-editor--um7u6Wc.js → app-editor-1yI1PePZ.js} +1 -1
  76. package/dist/client/assets/{asset-utils-D7ZsoUjl.js → asset-utils-tz_LHKas.js} +1 -1
  77. package/dist/client/assets/{auth-IBAsOARn.js → auth-AT-S53oU.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-DPqMCEC6.js → auth-catchall-CFacQ3p_.js} +1 -1
  79. package/dist/client/assets/{auth-entry-Bk_VrJBw.js → auth-entry-BuYf9qZf.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-zr8fqIYk.js → auth-split-layout-Bdnex8hf.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-BmdGjqM8.js → authenticate-and-persist-oauth-BOJ6RO7H.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-kZcPBX-Y.js → automation-list-row-Du2hwkkk.js} +1 -1
  83. package/dist/client/assets/{automation-runs-NP4ibGIs.js → automation-runs-Bg2KLqhb.js} +1 -1
  84. package/dist/client/assets/{automations-D7IUlLWI.js → automations-BJ-1CA9i.js} +1 -1
  85. package/dist/client/assets/{badge-DONoxQO7.js → badge-CFiK0EOx.js} +1 -1
  86. package/dist/client/assets/{block-document-Dlll0MPP.js → block-document-DUVkY9ea.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-LApXEaVX.js → blocks-preview-workspace-context-B9duZzas.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-CTy1iAF5.js → blocks-tab-states-DC7kOtf6.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-BGp0zYxW.js → blog-preview-url-sQQ4EaTX.js} +1 -1
  90. package/dist/client/assets/{blog-schema-CGys1Vfw.js → blog-schema-jwHNvUT9.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-D3KL0oEF.js → blog-source-gate-CdJyl3s4.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-BFq59z60.js → blog-view-gate-CH_KIbwu.js} +1 -1
  93. package/dist/client/assets/{buckets-C-9n1VRF.js → buckets-B4_-T0ED.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-CcS36Qyr.js → build-improve-prompt-doc-BviIkkQs.js} +1 -1
  95. package/dist/client/assets/{calendar-BRx4DiEx.js → calendar-C02ezVcS.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-C6JoLBp9.js → capability-load-error-C7VfNWgD.js} +1 -1
  97. package/dist/client/assets/{category-editor-B-RRxjlW.js → category-editor-DqRDNx2v.js} +1 -1
  98. package/dist/client/assets/{category-tree-CW0acTf_.js → category-tree-dngYOFzN.js} +1 -1
  99. package/dist/client/assets/{chart-BhhOak8o.js → chart-D2etphpL.js} +1 -1
  100. package/dist/client/assets/chat-context-CvQ-sM5v.js +43 -0
  101. package/dist/client/assets/{chat-draft-C93TMi7F.js → chat-draft-CPECGWWa.js} +1 -1
  102. package/dist/client/assets/{checkbox-CkODjqKt.js → checkbox-DR7-Iy_E.js} +1 -1
  103. package/dist/client/assets/{choose-editor-CUGLPz2R.js → choose-editor-C-XxlJ7G.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-DISNojzj.js → cli-auth-success-BvJuyvyk.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-DLMpcsg9.js → cms-settings-editor-CTMXFNOv.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-DgvuEc1i.js → cms-store-drafts-q3yACtXx.js} +1 -1
  107. package/dist/client/assets/{collapsible-BdVp5Lcb.js → collapsible-BKxoPjIN.js} +1 -1
  108. package/dist/client/assets/{collection-detail-CYRLagxm.js → collection-detail-iP9tRfV6.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-CrLnf-_h.js → collection-display-button-BVsx6EDz.js} +1 -1
  110. package/dist/client/assets/{collection-search-DL8nJQx4.js → collection-search-CphnxlYD.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-fYA2bGN6.js → collection-table-wrapper-BfQjodPV.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-9jbbjBDw.js → collection-tabs-C9T1HZQP.js} +1 -1
  113. package/dist/client/assets/{combobox-B9eEiOM0.js → combobox-BTP9T0Pc.js} +1 -1
  114. package/dist/client/assets/{command-D5O7M-Cf.js → command-Cqqhh_W6.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-D_ernmuP.js → companion-mcps-section-SEt2U7bz.js} +1 -1
  116. package/dist/client/assets/{config-BOn4tvAD.js → config-DGvqEncS.js} +1 -1
  117. package/dist/client/assets/{connect-key-BddF4e4b.js → connect-key-DVNtQy7y.js} +1 -1
  118. package/dist/client/assets/{connect-layout-CNgkeyZs.js → connect-layout-sx7G_FMd.js} +1 -1
  119. package/dist/client/assets/{connect-B9Or7Mba.js → connect-obEE-StP.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-F5S3IN4q.js → connect-source-dialog-DnCXZ3Bm.js} +1 -1
  121. package/dist/client/assets/{connection-BxF6Rdiu.js → connection-BZJlBrLd.js} +1 -1
  122. package/dist/client/assets/{connection-card-Ca3jxrTD.js → connection-card-B8Lj_r0P.js} +1 -1
  123. package/dist/client/assets/{connection-detail-B5pUbex_.js → connection-detail-CVYzedpa.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-oAW0sDLm.js → connection-form-helpers-veDVCb9w.js} +1 -1
  125. package/dist/client/assets/{connection-slug-B7w04sZ1.js → connection-slug-DOi8cWyk.js} +1 -1
  126. package/dist/client/assets/{connections-C0U7G-PU.js → connections-k9zhxlcM.js} +1 -1
  127. package/dist/client/assets/{content-changes-DXqxs3Wb.js → content-changes-CFJfbWRJ.js} +1 -1
  128. package/dist/client/assets/{content-tab-C23eyWcW.js → content-tab-Cq6li-sw.js} +3 -3
  129. package/dist/client/assets/{context-LlVd3qyN.js → context-DCQPaz03.js} +1 -1
  130. package/dist/client/assets/{context-menu-DJtvu4JZ.js → context-menu-BfINdeF4.js} +1 -1
  131. package/dist/client/assets/{context-shell-0fpmlncZ.js → context-shell-DkTSiVhx.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-97eVCkRr.js → create-organization-dialog-pttnLi8P.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-DVtdyKrr.js → daily-pulse-BMeIrOO8.js} +1 -1
  134. package/dist/client/assets/{delete-copy-rajlpHzK.js → delete-copy-BI2Sd04D.js} +1 -1
  135. package/dist/client/assets/{device-hint-DVUadRrt.js → device-hint-XFntojbN.js} +1 -1
  136. package/dist/client/assets/{discover-CCbrOrMD.js → discover-DCJNP2ov.js} +1 -1
  137. package/dist/client/assets/{domain-settings-CcAHeKi4.js → domain-settings-C369ETrU.js} +1 -1
  138. package/dist/client/assets/{drawer-DO0sMAej.js → drawer-DtT_qu3U.js} +1 -1
  139. package/dist/client/assets/{editor-UaRoONxx.js → editor-DpPPqPRR.js} +1 -1
  140. package/dist/client/assets/{editor-classes-DMpdrv32.js → editor-classes-Bw4_cV_9.js} +1 -1
  141. package/dist/client/assets/{empty-state-UX_DOq42.js → empty-state-CWawuVzh.js} +1 -1
  142. package/dist/client/assets/{empty-state-C4MgLcBg.js → empty-state-l9Tatoxd.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-loxGESO7.js → experiments-tab-choice-DLka__Fj.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-DXA3Rt-s.js → extract-connection-data-DjE1yVUY.js} +1 -1
  145. package/dist/client/assets/{feature-gate-Bc8aW-U-.js → feature-gate-wF4resWq.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-hqI35k49.js → feature-paywall-DF7aqMQM.js} +1 -1
  147. package/dist/client/assets/{file-explorer-DE4Pg5Zn.js → file-explorer-Bm3jEOW7.js} +1 -1
  148. package/dist/client/assets/{file-preview-BKJnTrOe.js → file-preview-p0rGgJtU.js} +1 -1
  149. package/dist/client/assets/{file-share-button--SjJonFb.js → file-share-button-BAJCRraz.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-R4tsODq6.js → file-type-icon-CEKCIITa.js} +1 -1
  151. package/dist/client/assets/{folder-icon-DC-T6LMD.js → folder-icon-DCqfnk5g.js} +1 -1
  152. package/dist/client/assets/{form-DwGozYbG.js → form-eUXxZ5Qg.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-CoKnARJv.js → frame-navigation-DlTZKvqt.js} +1 -1
  154. package/dist/client/assets/{gateway-client-C5MrdR_p.js → gateway-client-BYWq7W1f.js} +1 -1
  155. package/dist/client/assets/{general-BiR6hkWa.js → general-dOdvSQ1l.js} +1 -1
  156. package/dist/client/assets/{github-icon-YYYF_UPl.js → github-icon-PNZqrJY6.js} +1 -1
  157. package/dist/client/assets/{held-block-view-CRIGJWyy.js → held-block-view-CPPtRU-n.js} +1 -1
  158. package/dist/client/assets/{home-Crikv5tf.js → home-B2gF0aRT.js} +1 -1
  159. package/dist/client/assets/{home-overview-CJ86tdHp.js → home-overview-DkyPJx_z.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-CTronLZo.js → hosted-reconcile-DEHcrXPf.js} +1 -1
  161. package/dist/client/assets/{icon-button-DFliy54K.js → icon-button-CfgrKbmG.js} +1 -1
  162. package/dist/client/assets/{index-DdK1k8EY.js → index-B1yf8QQv.js} +1 -1
  163. package/dist/client/assets/{index-DJ-fS83G.js → index-BHLuDBD-.js} +1 -1
  164. package/dist/client/assets/{index-BVDmO57n.js → index-BUHQM-fc.js} +1 -1
  165. package/dist/client/assets/{index-B9Qs-0Gp.js → index-Bp_BkLlL.js} +1 -1
  166. package/dist/client/assets/{index-D5QLXgD8.js → index-CEoORQx_.js} +1 -1
  167. package/dist/client/assets/{index-DRuy-mDa.js → index-CdR9qfQl.js} +1 -1
  168. package/dist/client/assets/{index-BH4xxzAP.js → index-CePbUNpp.js} +1 -1
  169. package/dist/client/assets/{index-w1wolPTy.js → index-CorQG-PM.js} +1 -1
  170. package/dist/client/assets/{index-BFFHlwFA.js → index-D9pnpNHk.js} +1 -1
  171. package/dist/client/assets/{index-BKFaN6Ld.js → index-DQFWZMPO.js} +1 -1
  172. package/dist/client/assets/{index-DDritN78.js → index-DYf9rJn2.js} +1 -1
  173. package/dist/client/assets/{index-DoEtSiIe.js → index-FRxLT_js.js} +5 -5
  174. package/dist/client/assets/{index-D4CqkEu4.js → index-K-FtkPVI.js} +1 -1
  175. package/dist/client/assets/{index-BTNa7cC6.js → index-UwOo6lse.js} +1 -1
  176. package/dist/client/assets/{index-CcrP-nDa.js → index-VEcIOiWN.js} +1 -1
  177. package/dist/client/assets/{index-FcoC7l5_.js → index-oOJhkPK6.js} +1 -1
  178. package/dist/client/assets/{index-redirect-CbsKaCLd.js → index-redirect-DVZANI8q.js} +1 -1
  179. package/dist/client/assets/{index-C_NkXLoh.js → index-xNvvPF5K.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-BRGiYBJv.js → infiniteQueryObserver-CZ7GCbwa.js} +1 -1
  181. package/dist/client/assets/{infra-billing-mbjUHJA6.js → infra-billing-CBaX0rFG.js} +1 -1
  182. package/dist/client/assets/{input-DIuJhVNp.js → input-B0jMF0e_.js} +1 -1
  183. package/dist/client/assets/{input-C6McKl01.js → input-DS1fkrsU.js} +3 -3
  184. package/dist/client/assets/{integration-icon-DvT6X8cI.js → integration-icon-BTN_yWEk.js} +1 -1
  185. package/dist/client/assets/{item-actions-BSnXs1TT.js → item-actions-iEQmPVrr.js} +1 -1
  186. package/dist/client/assets/{jira-icon-pZDG9IEF.js → jira-icon-DXOB8Lmw.js} +1 -1
  187. package/dist/client/assets/{label-G4Rj_cXa.js → label-DKoCaul6.js} +1 -1
  188. package/dist/client/assets/{layout-CTvR7VG1.js → layout-DbhvOsyV.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-BYL3pyxT.js → legacy-admin-welcome-dialog-B3iJcsKr.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-Df5JF_SK.js → legacy-agents-deep-em6yOC_F.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-oBYkuRmD.js → legacy-main-redirect-CehX4Bni.js} +1 -1
  192. package/dist/client/assets/library-Dly_OLLg.js +1 -0
  193. package/dist/client/assets/{library-tab-DJQybwNu.js → library-tab-ekrJ9bue.js} +1 -1
  194. package/dist/client/assets/{login-DdaMpBPE.js → login-DJDyJ1ju.js} +1 -1
  195. package/dist/client/assets/{markdown-DeZATUv_.js → markdown-we-cHxXq.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-pvE5c1WF.js → mcp-app-renderer-BAfMgB1Z.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-BkAlBGe_.js → mcp-oauth-Ci6yqFTl.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-C4zfq49i.js → mcp-oauth-Ds0j31F2.js} +1 -1
  199. package/dist/client/assets/{members-Dhg3sD3K.js → members-BcSHOsjX.js} +1 -1
  200. package/dist/client/assets/{memory-ls8FI-ER.js → memory-BowPTmEv.js} +1 -1
  201. package/dist/client/assets/{mock-board-UBlWXoTV.js → mock-board-CW6QKw2v.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-BwfJ8i7M.js → monaco-editor-B5PTOxIz.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-CBrA5DNm.js → monitoring-stats-row-DJXMqCN0.js} +1 -1
  204. package/dist/client/assets/{monitoring-CQc-Jc5R.js → monitoring-xIY_IPi8.js} +1 -1
  205. package/dist/client/assets/{multi-select-D3r33Eqf.js → multi-select-DuNPPMuZ.js} +1 -1
  206. package/dist/client/assets/{mustache-DKc6J7pv.js → mustache-Bwl2DYO1.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-BAentWbs.js → named-rule-step-DS5kGuIs.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-B12Mihtd.js → named-rule-view-Z5BTjESF.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-CT39WKMt.js → new-project-dialog-HgjtDq4l.js} +1 -1
  210. package/dist/client/assets/{new-project-store-DYc4RZIM.js → new-project-store-CKvMs4hG.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ByK2SiJO.js → oauth-callback-DmgNmP6n.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-Beze5ATE.js → oauth-callback-ai-provider-CSpD6uGn.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-C7XByUpM.js → oauth-consent-Cr-15ieV.js} +1 -1
  214. package/dist/client/assets/{onboarding-DxARgVon.js → onboarding-Ete3lfiA.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-BZPG3E07.js → openai-conversation-BCGRvpnO.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DtHZp47L.js → optimistic-project-sidebar-views-B_55Z4kz.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-BjMh6dP-.js → order-monitor-day-Clbe0SA4.js} +1 -1
  218. package/dist/client/assets/{organization-choice-B7oZjoV-.js → organization-choice-B_iJSsFB.js} +1 -1
  219. package/dist/client/assets/{orgs-Dnp8mGIE.js → orgs-BFePKqBY.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-Ox_H5E7F.js → own-accounts-section-CSwSnoe4.js} +1 -1
  221. package/dist/client/assets/{pair-C9Fumckp.js → pair-DhT-6yBR.js} +1 -1
  222. package/dist/client/assets/{parse-sections-Bbp8QY_-.js → parse-sections-BZeGOsxE.js} +2 -2
  223. package/dist/client/assets/plan-BO0tgjWI.js +1 -0
  224. package/dist/client/assets/{plan-ladder-DNa_CJD5.js → plan-ladder-aYguFL8S.js} +1 -1
  225. package/dist/client/assets/{plan-page-DA2CBoO7.js → plan-page-B07fHd07.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-DnVnSftp.js → plan-usage-card-D_4-ZHg-.js} +1 -1
  227. package/dist/client/assets/{popover-mrQ4T9ru.js → popover-BI-lpUhu.js} +1 -1
  228. package/dist/client/assets/{post-calendar-D-RLnzxz.js → post-calendar-Bh8YSwE0.js} +1 -1
  229. package/dist/client/assets/{post-editor-BpIis1xH.js → post-editor-BbMWUU2h.js} +1 -1
  230. package/dist/client/assets/{preview-content-DTs-hWSP.js → preview-content-c-gz2Si_.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-CGhTVXYZ.js → preview-dialog-BFH4K3zp.js} +1 -1
  232. package/dist/client/assets/{preview-panel-CS2evrdt.js → preview-panel-5axMxyLP.js} +1 -1
  233. package/dist/client/assets/{preview-tab-C8EYcsK2.js → preview-tab-DrWOVhIi.js} +3 -3
  234. package/dist/client/assets/{primitives-DCeh9ZFM.js → primitives-phHVGNAI.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-BuD1Uiqo.js → product-picker-dialog-BJO35u0n.js} +1 -1
  236. package/dist/client/assets/{profile-Drm_c_7P.js → profile-1_I-_x94.js} +1 -1
  237. package/dist/client/assets/{project-app-view-BK0cCPsD.js → project-app-view-TcCrX4oT.js} +1 -1
  238. package/dist/client/assets/{project-apps-CSkPT54a.js → project-apps-55s0I8iz.js} +1 -1
  239. package/dist/client/assets/{project-icon-BxqBM24K.js → project-icon-piFAIvmP.js} +1 -1
  240. package/dist/client/assets/{project-index-BcbyhrUz.js → project-index-C209sCKL.js} +1 -1
  241. package/dist/client/assets/project-reports-_pvoxKuL.js +1 -0
  242. package/dist/client/assets/project-tasks-TZDHHmpj.js +1 -0
  243. package/dist/client/assets/{projects-Bt0tB7bD.js → projects-DJz5LDl0.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-CUxxduZa.js → projects-empty-state-Bjbej4Jx.js} +1 -1
  245. package/dist/client/assets/{prompts-Cypbuo50.js → prompts-C3wMciT-.js} +1 -1
  246. package/dist/client/assets/record-editor-CEpespPR.js +1 -0
  247. package/dist/client/assets/{redirect-editor-C4dWTnRQ.js → redirect-editor-CXYG17gC.js} +1 -1
  248. package/dist/client/assets/{reports-BJDaNojR.js → reports-BAWCIXn8.js} +1 -1
  249. package/dist/client/assets/reports-CPxs2BgN.js +1 -0
  250. package/dist/client/assets/{reports-onboarding-CH17bHGS.js → reports-onboarding-B3L3kaVX.js} +1 -1
  251. package/dist/client/assets/{reports-tab-muq1g1pm.js → reports-tab-UTeYJ_79.js} +2 -2
  252. package/dist/client/assets/repositories-Bj1ogpqH.js +1 -0
  253. package/dist/client/assets/{repositories-Bf8CqdKD.js → repositories-Dj3HbYDX.js} +1 -1
  254. package/dist/client/assets/{repository-binding-BAQCDq-W.js → repository-binding-DjFY5b0y.js} +1 -1
  255. package/dist/client/assets/{repository-picker-BBkgoOlP.js → repository-picker-BHJB5432.js} +1 -1
  256. package/dist/client/assets/{require-capability-FcSdruCZ.js → require-capability-BtI4Tyqp.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-DPL2sBE1.js → required-auth-layout-ChAYpVpn.js} +1 -1
  258. package/dist/client/assets/{reset-password-D15aZJot.js → reset-password-CtG7aWDw.js} +1 -1
  259. package/dist/client/assets/{resizable-DwqWjQSo.js → resizable-BL8CU-aJ.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-De0SSCOI.js → resolve-tab-icon-Ds9JNWyg.js} +1 -1
  261. package/dist/client/assets/{review-settings-X9fyjheP.js → review-settings-DNfSW4xg.js} +1 -1
  262. package/dist/client/assets/{role-color-BX_AhYik.js → role-color-Kmb8GwCh.js} +1 -1
  263. package/dist/client/assets/{roles-B-siyM42.js → roles-DXacyEKl.js} +1 -1
  264. package/dist/client/assets/route-ChWaxiqL.js +1 -0
  265. package/dist/client/assets/{route-CNMBOzJN.js → route-CvOWJgQ8.js} +1 -1
  266. package/dist/client/assets/{route-Cz_N3YLd.js → route-DhGhu9Ec.js} +1 -1
  267. package/dist/client/assets/{route-page-header-nTLU5ayk.js → route-page-header-D4_8Ct3f.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-DiUyKbJU.js → sandbox-git-api-CuR5rUpq.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-CRyp43o1.js → sandbox-lifecycle-context-Bt4OsDeb.js} +1 -1
  270. package/dist/client/assets/{save-status-CQe-z40L.js → save-status-DbwiLwGt.js} +1 -1
  271. package/dist/client/assets/{schema-C5ZQLddp.js → schema-D1mfj_VD.js} +1 -1
  272. package/dist/client/assets/{schema-CG6ylG0z.js → schema-DFMNr5Cf.js} +1 -1
  273. package/dist/client/assets/{scroll-area-KLotig-P.js → scroll-area-BBpO5xX_.js} +1 -1
  274. package/dist/client/assets/{search-input-wk0beNbE.js → search-input-Dij8WCfy.js} +1 -1
  275. package/dist/client/assets/{search-toggle-CMYcoB9P.js → search-toggle-BJsu_1mi.js} +1 -1
  276. package/dist/client/assets/{secret-picker-j7H2EK7l.js → secret-picker-D6eOapYQ.js} +1 -1
  277. package/dist/client/assets/{secrets-B9rKvRSV.js → secrets-ctTTJkDR.js} +1 -1
  278. package/dist/client/assets/{section-array-field-yz7QHNSD.js → section-array-field-D4XW_wJ4.js} +1 -1
  279. package/dist/client/assets/{sections-44_mUmcy.js → sections-B5mL2aQs.js} +1 -1
  280. package/dist/client/assets/{sections-editor-vs42n8iz.js → sections-editor-Dx_9N0tS.js} +1 -1
  281. package/dist/client/assets/{select-OlcoUSVg.js → select-D5aPAOxI.js} +1 -1
  282. package/dist/client/assets/{select-model-D0BbDHat.js → select-model-3J7FOs0F.js} +1 -1
  283. package/dist/client/assets/{seo-editor-D1i_wsxL.js → seo-editor-DP1v2Hug.js} +1 -1
  284. package/dist/client/assets/{separator-CunLPufQ.js → separator-Dy_gHFOY.js} +1 -1
  285. package/dist/client/assets/{session-runtime-CZKHty5X.js → session-runtime-CVF2LvNW.js} +1 -1
  286. package/dist/client/assets/settings-tab-BI3y61p6.js +1 -0
  287. package/dist/client/assets/{sheet-De8qzGNI.js → sheet-Dps_OtzY.js} +1 -1
  288. package/dist/client/assets/{shell-layout-596_q4a1.js → shell-layout-B7ONrK1S.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-DXu7he69.js → site-draft-actions-DhANjN0X.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-UnsYH70N.js → site-draft-view-BYqJs7J2.js} +1 -1
  291. package/dist/client/assets/site-editor-0AMhqN9R.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-B-FDGvtN.js → site-editor-toast-D2oMdvIY.js} +1 -1
  293. package/dist/client/assets/{skills-BjbKR2I7.js → skills-DxDybFRs.js} +1 -1
  294. package/dist/client/assets/{slider-c-3WdQpH.js → slider-w4rF_qju.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-B0hCRAsX.js → sortable.esm-MHH13t78.js} +1 -1
  296. package/dist/client/assets/{sso-D4qQzdCn.js → sso-Dl9I7AOe.js} +1 -1
  297. package/dist/client/assets/{suggestion-CIik1sqO.js → suggestion-SjSKJeBU.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-BQUmZAhN.js → super-agent-icon-Cc4Ciwsy.js} +1 -1
  299. package/dist/client/assets/{switch-C5tCt-1T.js → switch-CEzsWFkp.js} +1 -1
  300. package/dist/client/assets/{synced-repos-CBI3cJpx.js → synced-repos-CNS7qyVv.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-DrXbuC1r.js → tab-icon-glyph-BJZJf5lc.js} +1 -1
  302. package/dist/client/assets/{table-RDPVkrI6.js → table-DdZpQzqo.js} +1 -1
  303. package/dist/client/assets/{tabs-Bh3jtZIY.js → tabs-JKAPr-O4.js} +1 -1
  304. package/dist/client/assets/{task-board-BRF3ZwKz.js → task-board-B_oKjzEP.js} +1 -1
  305. package/dist/client/assets/{task-key-CajjdR3t.js → task-key-BWDMUi9g.js} +1 -1
  306. package/dist/client/assets/{task-route-DltlnXMA.js → task-route-Cr6uckKl.js} +1 -1
  307. package/dist/client/assets/{task-status-CS7Ps1ks.js → task-status-BkYGOB1i.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-BM7xNDXS.js → taskboard-analytics-nugCG6C8.js} +1 -1
  309. package/dist/client/assets/tasks-9sGiiD4G.js +1 -0
  310. package/dist/client/assets/{tasks-BeWBUFN3.js → tasks-DGRvo6F8.js} +1 -1
  311. package/dist/client/assets/{textarea-CP9TQ5HN.js → textarea-Cipr2aDL.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-CyVeHqD_.js → thread-analytics-CUyAWSkz.js} +1 -1
  313. package/dist/client/assets/{thread-button-B51gC6ln.js → thread-button-DEmMau3d.js} +1 -1
  314. package/dist/client/assets/{thread-intent-R2KI8ie_.js → thread-intent-CoFgTbor.js} +1 -1
  315. package/dist/client/assets/{thread-route-B5gjf6Cd.js → thread-route-BRmRa2CS.js} +1 -1
  316. package/dist/client/assets/{thread-route-D-UE3Db_.js → thread-route-TTLcBPLy.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-B9XdKhNS.js → thread-sheet-body-DU2O97KV.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-5TsTBsYK.js → time-range-picker-CBoxldZD.js} +1 -1
  319. package/dist/client/assets/{toggle-group-CtXgLS7e.js → toggle-group-4Uqc6vzQ.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-WN2Xo0Mj.js → tool-set-selector-DoFKwoWc.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-Ce7Zk4Z1.js → toolbar-icon-button-DnvtDhiO.js} +1 -1
  322. package/dist/client/assets/{tooltip-DhlWzeQv.js → tooltip-C6OYlSV-.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-BkLzQGib.js → tooltipContext-D2O58pOO.js} +1 -1
  324. package/dist/client/assets/{track-xlpKzX88.js → track-D2uS6dpC.js} +1 -1
  325. package/dist/client/assets/{types-rurFGFZy.js → types-cOzCnmYI.js} +1 -1
  326. package/dist/client/assets/{url-slug-CiUrNKts.js → url-slug-DgA17VrJ.js} +1 -1
  327. package/dist/client/assets/{usage-stats-CLeyhHyT.js → usage-stats-X4jMwPwX.js} +1 -1
  328. package/dist/client/assets/use-ai-providers-BDyMN-N5.js +1 -0
  329. package/dist/client/assets/{use-api-keys-B_vZqtxC.js → use-api-keys-CsFZ7MWC.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-CaZ5oLnq.js → use-apply-named-rule-CnSwu1YP.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-C_ce63qF.js +1 -0
  332. package/dist/client/assets/{use-automations-CLa8yUdj.js → use-automations-DGxEZMH1.js} +1 -1
  333. package/dist/client/assets/{use-autosave-CwP_nadT.js → use-autosave-JaDxGSls.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-DA-pr0Uy.js +1 -0
  335. package/dist/client/assets/use-blog-view-DhODFkA8.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-x3sd6PWp.js → use-chat-layout-state-D4d4l3oL.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-Bn8BUqaj.js → use-cms-publish-actions-CdubuGTA.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-CkgH2aNV.js → use-connect-companion-DCQqrJld.js} +1 -1
  339. package/dist/client/assets/{use-connection-BO-ZUzee.js → use-connection-DoUaPNkI.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-By62We3p.js → use-content-sync-Cxyhqioh.js} +1 -1
  341. package/dist/client/assets/{use-copy-CjEnyhFT.js → use-copy-nYlH4I4g.js} +1 -1
  342. package/dist/client/assets/{use-current-view-C2fbVQ-O.js → use-current-view-1HEoI3qR.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-DQRGqxvr.js → use-date-fns-locale-DxgiZ7Lq.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-DN03qSfm.js → use-debounced-autosave-Bi5JPKsx.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-DqHSmPMR.js → use-debounced-value-ZpPSvQwP.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-5H0OzCE5.js → use-deco-credits-DcRWtP9o.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-DwNDOIa1.js → use-decopilot-events-B-T0Hrvx.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-nP_FtjiY.js → use-delete-block-DP79Au-4.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-BBTdkJYy.js → use-delete-connection-4Fx-JLmK.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-Bh76rlF7.js → use-deployment-admin-BmC0uFFM.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-4v7LU4jM.js → use-entitlements-CmxoG1H2.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-DQSkfUDT.js → use-fast-preview-draft-url-DXFM6T8R.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-J6lDtEfO.js → use-file-configs-Wy-M6u4j.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-2psZYBx1.js → use-id-selection-65R8Y0Rr.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-LMUeu63D.js → use-in-settings-CG5n8E8Q.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-_58TtHpK.js → use-inbox-feed-DxcWHUtc.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-uxxC9xbL.js → use-infinite-scroll-DxkQp5Qv.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-Dlx4kfO9.js → use-join-requests-CyJQy1RH.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-D5zQhSWJ.js → use-main-panel-tabs-DJGu6nFZ.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-FhB3trZz.js → use-mcp-auth-status-BabDSoXH.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-86j-Nolb.js → use-mcp-client-rOHZbD3Y.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-CPXLXWTp.js → use-mcp-prompts-Cq6mpthN.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-BeJ4_Tij.js → use-mcp-tools-DfFo5hFt.js} +1 -1
  364. package/dist/client/assets/{use-mobile-BjsAkqwr.js → use-mobile-eRuVOAzy.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-CCDsEu9Z.js → use-move-blocks-DWNb-nFG.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-C-BC28kE.js → use-navigate-to-agent-CoxxT5G0.js} +1 -1
  367. package/dist/client/assets/{use-never-published-C4cAqdmZ.js → use-never-published-ZzuVsx8k.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-C62_MbqW.js → use-org-fs-Bjw5czAm.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-BzvGZbQ2.js → use-org-notice-QAyxiINx.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-SmfSLgc1.js → use-org-repo-syncs-CvKMwzFX.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-CypQjzG8.js → use-org-sso-CFsTaV-A.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-CgKOO7Ms.js → use-organization-settings-BQz13Hmn.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-DHff9CS9.js → use-panel-navigate-DRtgWUMv.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-Dug5CWyl.js → use-project-native-view-presence-BIFke35D.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-AMUoXt2c.js → use-project-scope-BEEh5L8P.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-qXhoWNgp.js → use-recent-apps-DnI5Ea5w.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-CiiYsnje.js → use-reports-diagnostic-KjDTU46X.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-A8aB0HnP.js → use-sandbox-events-B1e4GG__.js} +1 -1
  379. package/dist/client/assets/{use-secrets-DumIaW5z.js → use-secrets-DG4KpaBa.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-BcIQh9cw.js → use-section-preview-base-CTUunTIy.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-iTcR18ZK.js → use-sidebar-collapsed-Cvh_KEOx.js} +1 -1
  382. package/dist/client/assets/{use-tags-Bm6VkRP9.js → use-tags-oUXL8Eao.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-CcKWYx4U.js → use-task-board-analytics-CY3DJsc5.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-Db89Oevz.js → use-task-board-item-prs-DSrWn6bY.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-BVQx7Wft.js → use-task-board-items-BbyDm5G0.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-C468T8Y7.js → use-task-board-prompts-CqjpsSVo.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-FjAJnVQn.js → use-task-metadata-BYbicOrw.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-BnMyEJ2l.js → use-thread-outputs-OIyH_XWf.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-hbAZo1QG.js → use-view-draft-kind-BaIs6zLO.js} +1 -1
  390. package/dist/client/assets/use-voice-input-IeU241I1.js +1 -0
  391. package/dist/client/assets/useInfiniteQuery-D_gObArx.js +1 -0
  392. package/dist/client/assets/{useQueries-CuzZgNOl.js → useQueries-D35FEy3E.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-DTGymExJ.js +1 -0
  394. package/dist/client/assets/{users-QlOHt7jV.js → users-D7EeASCC.js} +1 -1
  395. package/dist/client/assets/{utils-CzRFs-0R.js → utils-CfyLtUqt.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-DaLwTMzO.js → variant-calendar-C6gDTqNE.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-BBj0ymp1.js → variant-matcher-override-BugDO5Is.js} +1 -1
  398. package/dist/client/assets/{view-header-CRFbPvFT.js → view-header-BpDzpk8m.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-K5tXQmiD.js → virtual-mcp-DFw2lKMC.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-C0me6Edt.js → watch-sse-pool-DGsiEkeQ.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +651 -651
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-CKN609Ao.js +0 -1
  405. package/dist/client/assets/agent-deck-B4OrR3A7.js +0 -1
  406. package/dist/client/assets/agent-experiments-D6tEEJ7A.js +0 -1
  407. package/dist/client/assets/agent-file-BbWhb5MG.js +0 -1
  408. package/dist/client/assets/agent-library-DB8Gnwn6.js +0 -1
  409. package/dist/client/assets/agent-library-file-Cc6xu5fG.js +0 -1
  410. package/dist/client/assets/agent-overview-Dp6TUwUW.js +0 -1
  411. package/dist/client/assets/agent-settings-Bl07TGrR.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-D7ZiHs5k.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-D7tLGQbd.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-BwKMWPep.js +0 -1
  415. package/dist/client/assets/agent-view-DkN5uE0f.js +0 -1
  416. package/dist/client/assets/ai-providers-DTKly69Q.js +0 -1
  417. package/dist/client/assets/api-keys-BCHOPkMm.js +0 -1
  418. package/dist/client/assets/chat-context-vJ6R-Clt.js +0 -43
  419. package/dist/client/assets/library-mSFHNE8F.js +0 -1
  420. package/dist/client/assets/plan-Bkifmwdt.js +0 -1
  421. package/dist/client/assets/project-reports-C1LMMcEB.js +0 -1
  422. package/dist/client/assets/project-tasks-CYJZp2Uh.js +0 -1
  423. package/dist/client/assets/record-editor-BsKWufWE.js +0 -1
  424. package/dist/client/assets/reports-oGZqT3QW.js +0 -1
  425. package/dist/client/assets/repositories-JzZI0XMl.js +0 -1
  426. package/dist/client/assets/route-CalpiHU1.js +0 -1
  427. package/dist/client/assets/settings-tab-VZsLRrpt.js +0 -1
  428. package/dist/client/assets/site-editor-2NiQbUmg.js +0 -1
  429. package/dist/client/assets/tasks-BVcnl5hV.js +0 -1
  430. package/dist/client/assets/use-ai-providers-BwkzkRi2.js +0 -1
  431. package/dist/client/assets/use-ask-in-chat-CuhqUmC7.js +0 -1
  432. package/dist/client/assets/use-blocks-v8-project-BLAijVCk.js +0 -1
  433. package/dist/client/assets/use-blog-view-DJnS2ipo.js +0 -1
  434. package/dist/client/assets/use-voice-input-DJjQBO4e.js +0 -1
  435. package/dist/client/assets/useInfiniteQuery-9vIAXgqG.js +0 -1
  436. package/dist/client/assets/useSuspenseInfiniteQuery-CucINu-S.js +0 -1
@@ -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-DoEtSiIe.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-FRxLT_js.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 +1 @@
1
- import{c as v,a6 as z,K as Y,i as U,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aW as Z,w as J,v as ee,D as te}from"./index-DoEtSiIe.js";import{n as se}from"./ArrowUp-s5a8DQxj.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-vJ6R-Clt.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-C6McKl01.js";import{u as je,a as ve,S as be,M as A}from"./pair-C9Fumckp.js";import{A as ye,f as W}from"./agent-icon-DoabtHNW.js";import{j as Ne}from"./content-changes-DXqxs3Wb.js";import{a as Ce}from"./agent-capabilities-DmT72SWM.js";import{a as we}from"./repository-binding-BAQCDq-W.js";import{c as Se,i as ke}from"./thread-intent-R2KI8ie_.js";import{a as Te}from"./use-panel-navigate-DHff9CS9.js";import{N as $e}from"./index-BVDmO57n.js";import{i as Ee}from"./ArrowRight-CMJyKdyB.js";import{c as De}from"./use-entitlements-4v7LU4jM.js";import{u as Pe}from"./use-deco-credits-5H0OzCE5.js";import{F as _e}from"./feature-paywall-hqI35k49.js";import{i as Ie}from"./AlertCircle-GoAGGV0G.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=Y.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=U(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function Q(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(Q(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(Q(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(W,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(W,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function We(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Qe(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function Ye(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ue(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Qe({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(Ye,{Main:Ue,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:We,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
1
+ import{c as v,a6 as z,K as Y,i as U,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aW as Z,w as J,v as ee,D as te}from"./index-FRxLT_js.js";import{n as se}from"./ArrowUp-B_rPxUl3.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-CvQ-sM5v.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-DS1fkrsU.js";import{u as je,a as ve,S as be,M as A}from"./pair-DhT-6yBR.js";import{A as ye,f as W}from"./agent-icon-qKbICqBE.js";import{j as Ne}from"./content-changes-CFJfbWRJ.js";import{a as Ce}from"./agent-capabilities-B0JydJjP.js";import{a as we}from"./repository-binding-DjFY5b0y.js";import{c as Se,i as ke}from"./thread-intent-CoFgTbor.js";import{a as Te}from"./use-panel-navigate-DRtgWUMv.js";import{N as $e}from"./index-BUHQM-fc.js";import{i as Ee}from"./ArrowRight-CTIzvrRD.js";import{c as De}from"./use-entitlements-CmxoG1H2.js";import{u as Pe}from"./use-deco-credits-DcRWtP9o.js";import{F as _e}from"./feature-paywall-DF7aqMQM.js";import{i as Ie}from"./AlertCircle-CS5y5cdF.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=Y.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=U(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function Q(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(Q(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(Q(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(W,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(W,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function We(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Qe(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function Ye(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ue(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Qe({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(Ye,{Main:Ue,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:We,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
@@ -1 +1 @@
1
- import{c as f,a6 as h,h6 as d,j as g,N as m,ag as p,a2 as j}from"./index-DoEtSiIe.js";import{L as v}from"./legacy-main-redirect-oBYkuRmD.js";import"./thread-route-D-UE3Db_.js";const x=j("/shell/$org/org-shell/");function L(){const t=f.c(19),{org:a}=h(),l=x.useSearch(),{main:i,virtualmcpid:o}=l;if(i!==void 0){let e;t[0]!==i||t[1]!==a.slug||t[2]!==l||t[3]!==o?(e=d({org:a.slug,agentId:o,main:i,search:l}),t[0]=i,t[1]=a.slug,t[2]=l,t[3]=o,t[4]=e):e=t[4];const s=e;if(s?.kind==="canonical"){let r;return t[5]!==s?(r=g.jsx(v,{target:s}),t[5]=s,t[6]=r):r=t[6],r}}let n;t[7]!==o?(n=o?.trim()||null,t[7]=o,t[8]=n):n=t[8];const u=n;if(u){let e;t[9]!==a.slug||t[10]!==u?(e={org:a.slug,agentId:u},t[9]=a.slug,t[10]=u,t[11]=e):e=t[11];let s;t[12]!==l?(s={...l,virtualmcpid:void 0},t[12]=l,t[13]=s):s=t[13];let r;return t[14]!==e||t[15]!==s?(r=g.jsx(m,{to:p.projects,params:e,search:s,hash:!0,replace:!0}),t[14]=e,t[15]=s,t[16]=r):r=t[16],r}let c;return t[17]!==a.slug?(c=g.jsx(m,{to:p.home,params:{org:a.slug},search:N,hash:!0,replace:!0}),t[17]=a.slug,t[18]=c):c=t[18],c}function N(t){return{...t,virtualmcpid:void 0}}export{L as default};
1
+ import{c as f,a6 as h,h6 as d,j as g,N as m,ag as p,a2 as j}from"./index-FRxLT_js.js";import{L as v}from"./legacy-main-redirect-CehX4Bni.js";import"./thread-route-TTLcBPLy.js";const x=j("/shell/$org/org-shell/");function L(){const t=f.c(19),{org:a}=h(),l=x.useSearch(),{main:i,virtualmcpid:o}=l;if(i!==void 0){let e;t[0]!==i||t[1]!==a.slug||t[2]!==l||t[3]!==o?(e=d({org:a.slug,agentId:o,main:i,search:l}),t[0]=i,t[1]=a.slug,t[2]=l,t[3]=o,t[4]=e):e=t[4];const s=e;if(s?.kind==="canonical"){let r;return t[5]!==s?(r=g.jsx(v,{target:s}),t[5]=s,t[6]=r):r=t[6],r}}let n;t[7]!==o?(n=o?.trim()||null,t[7]=o,t[8]=n):n=t[8];const u=n;if(u){let e;t[9]!==a.slug||t[10]!==u?(e={org:a.slug,agentId:u},t[9]=a.slug,t[10]=u,t[11]=e):e=t[11];let s;t[12]!==l?(s={...l,virtualmcpid:void 0},t[12]=l,t[13]=s):s=t[13];let r;return t[14]!==e||t[15]!==s?(r=g.jsx(m,{to:p.projects,params:e,search:s,hash:!0,replace:!0}),t[14]=e,t[15]=s,t[16]=r):r=t[16],r}let c;return t[17]!==a.slug?(c=g.jsx(m,{to:p.home,params:{org:a.slug},search:N,hash:!0,replace:!0}),t[17]=a.slug,t[18]=c):c=t[18],c}function N(t){return{...t,virtualmcpid:void 0}}export{L as default};
@@ -1 +1 @@
1
- import{c as j,au as W,aw as q,b as E,r as w,d as G,j as o,aV as $,R as I,P as N,n as U,B as k,ba as V}from"./index-DoEtSiIe.js";import{u as K}from"./use-mobile-BjsAkqwr.js";import{T as Y,a as Z,c as J}from"./tooltip-DhlWzeQv.js";import{t as Q,a as X}from"./MessageCircle01-zc37Krdu.js";import{s as ee}from"./XClose-BUxhnZ3x.js";import{b as te}from"./thread-button-B51gC6ln.js";import{T as ne}from"./toolbar-icon-button-Ce7Zk4Z1.js";import{b as se,R as oe,a as D}from"./resizable-DwqWjQSo.js";import{c as re,r as ie,m as ae}from"./use-chat-layout-state-x3sd6PWp.js";import{R as le}from"./route-page-header-nTLU5ayk.js";import"./index-BFFHlwFA.js";import"./use-sidebar-collapsed-iTcR18ZK.js";import"./sheet-De8qzGNI.js";import"./use-in-settings-LMUeu63D.js";import"./use-panel-navigate-DHff9CS9.js";import"./thread-route-D-UE3Db_.js";import"./use-project-scope-AMUoXt2c.js";import"./repository-binding-BAQCDq-W.js";import"./use-mcp-client-86j-Nolb.js";import"./auth-IBAsOARn.js";import"./LayoutLeft-owMYqid0.js";import"./use-current-view-C2fbVQ-O.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,a]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let l;return n[5]!==a||n[6]!==s?(l=[s,a],n[5]=a,n[6]=s,n[7]=l):l=n[7],l}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",M="chat-layout-content",H="320px",O=w.createContext(null);function Fe(){return T()}function fe(){return w.use(O)}function T(){const t=w.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),a=G(),s=w.useRef(null),[l,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?l:h.side,p=100-m,y=b=>{const v=b.getLayout(),_=v[P],S=v[M];typeof _!="number"||typeof S!="number"||Math.abs(_-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[M]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==a||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{a({to:".",search:b=>({...b,...ae(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=a,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[M]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:_}=v;if(!_){const R=s.current;R&&y(R);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let z;return e[18]!==g||e[19]!==L||e[20]!==f?(z=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=z):z=e[21],z}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=T();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let a;e[4]!==i.contentOpen?(a=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=a):a=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let l;e[8]!==s||e[9]!==r?(l=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=l):l=e[10];let c;return e[11]!==a||e[12]!==l?(c=o.jsxs(o.Fragment,{children:[a,l]}),e[11]=a,e[12]=l,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:a}=t;let s;e[0]!==a||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:a})}),e[0]=a,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let l;e[5]!==n?(l=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=l):l=e[6];let c;return e[7]!==s||e[8]!==l?(c=o.jsxs(J,{children:[s,l]}),e[7]=s,e[8]=l,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=T();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let a;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(a=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":r,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),pressed:r,onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=a):a=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let l;return t[9]!==a||t[10]!==s?(l=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,a,s]}),t[9]=a,t[10]=s,t[11]=l):l=t[11],l}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(xe,{}),t[0]=a):a=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let l;t[3]!==r.toggleContent||t[4]!==s?(l=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[a,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=l):l=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==l?(u=o.jsxs(o.Fragment,{children:[l,c]}),t[7]=l,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function B(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:a}=t,s=T();if(s.isMobile&&s.mobileSurface!=="main")return null;const l=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(le,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==l||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:l,children:p}),e[16]=l,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==a?(f=a&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:a})},w.isValidElement(a)?a.key??void 0:void 0)})}),e[21]=a,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:M,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(B,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let a;e[0]!==i?(a=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=a):a=e[1];let s;e[2]!==a?(s=o.jsx("h2",{className:"text-lg font-medium",children:a}),e[2]=a,e[3]=s):s=e[3];let l;e[4]!==n.message||e[5]!==i?(l=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=l):l=e[6];let c;e[7]!==l?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(B,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:B});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
1
+ import{c as j,au as W,aw as q,b as E,r as w,d as G,j as o,aV as $,R as I,P as N,n as U,B as k,ba as V}from"./index-FRxLT_js.js";import{u as K}from"./use-mobile-eRuVOAzy.js";import{T as Y,a as Z,c as J}from"./tooltip-C6OYlSV-.js";import{t as Q,a as X}from"./MessageCircle01-BoiiT0Ka.js";import{s as ee}from"./XClose-BvzwUB-E.js";import{b as te}from"./thread-button-DEmMau3d.js";import{T as ne}from"./toolbar-icon-button-DnvtDhiO.js";import{b as se,R as oe,a as D}from"./resizable-BL8CU-aJ.js";import{c as re,r as ie,m as ae}from"./use-chat-layout-state-D4d4l3oL.js";import{R as le}from"./route-page-header-D4_8Ct3f.js";import"./index-D9pnpNHk.js";import"./use-sidebar-collapsed-Cvh_KEOx.js";import"./sheet-Dps_OtzY.js";import"./use-in-settings-CG5n8E8Q.js";import"./use-panel-navigate-DRtgWUMv.js";import"./thread-route-TTLcBPLy.js";import"./use-project-scope-BEEh5L8P.js";import"./repository-binding-DjFY5b0y.js";import"./use-mcp-client-rOHZbD3Y.js";import"./auth-AT-S53oU.js";import"./LayoutLeft-ww8XIIKY.js";import"./use-current-view-1HEoI3qR.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,a]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let l;return n[5]!==a||n[6]!==s?(l=[s,a],n[5]=a,n[6]=s,n[7]=l):l=n[7],l}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",M="chat-layout-content",H="320px",O=w.createContext(null);function Fe(){return T()}function fe(){return w.use(O)}function T(){const t=w.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),a=G(),s=w.useRef(null),[l,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?l:h.side,p=100-m,y=b=>{const v=b.getLayout(),_=v[P],S=v[M];typeof _!="number"||typeof S!="number"||Math.abs(_-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[M]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==a||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{a({to:".",search:b=>({...b,...ae(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=a,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[M]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:_}=v;if(!_){const R=s.current;R&&y(R);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let z;return e[18]!==g||e[19]!==L||e[20]!==f?(z=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=z):z=e[21],z}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=T();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let a;e[4]!==i.contentOpen?(a=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=a):a=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let l;e[8]!==s||e[9]!==r?(l=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=l):l=e[10];let c;return e[11]!==a||e[12]!==l?(c=o.jsxs(o.Fragment,{children:[a,l]}),e[11]=a,e[12]=l,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:a}=t;let s;e[0]!==a||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:a})}),e[0]=a,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let l;e[5]!==n?(l=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=l):l=e[6];let c;return e[7]!==s||e[8]!==l?(c=o.jsxs(J,{children:[s,l]}),e[7]=s,e[8]=l,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=T();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let a;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(a=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":r,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),pressed:r,onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=a):a=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let l;return t[9]!==a||t[10]!==s?(l=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,a,s]}),t[9]=a,t[10]=s,t[11]=l):l=t[11],l}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(xe,{}),t[0]=a):a=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let l;t[3]!==r.toggleContent||t[4]!==s?(l=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[a,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=l):l=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==l?(u=o.jsxs(o.Fragment,{children:[l,c]}),t[7]=l,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function B(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:a}=t,s=T();if(s.isMobile&&s.mobileSurface!=="main")return null;const l=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(le,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==l||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:l,children:p}),e[16]=l,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==a?(f=a&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:a})},w.isValidElement(a)?a.key??void 0:void 0)})}),e[21]=a,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:M,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(B,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let a;e[0]!==i?(a=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=a):a=e[1];let s;e[2]!==a?(s=o.jsx("h2",{className:"text-lg font-medium",children:a}),e[2]=a,e[3]=s):s=e[3];let l;e[4]!==n.message||e[5]!==i?(l=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=l):l=e[6];let c;e[7]!==l?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(B,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:B});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
@@ -1 +1 @@
1
- import{c as f,f as p,ay as u,j as s,ba as x,N as a}from"./index-DoEtSiIe.js";import{C as j}from"./capability-load-error-C6JoLBp9.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-FRxLT_js.js";import{C as j}from"./capability-load-error-C7VfNWgD.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{d8 as _}from"./index-DoEtSiIe.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
1
+ import{d8 as _}from"./index-FRxLT_js.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
@@ -1 +1 @@
1
- import{e7 as g,e8 as d,e9 as v}from"./index-DoEtSiIe.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
1
+ import{e7 as g,e8 as d,e9 as v}from"./index-FRxLT_js.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
@@ -1 +1 @@
1
- import{c as k,j as s,i9 as de,b as G,ia as ue,r as le,ib as xe,ic as re,gK as T,gZ as W,B as J,e3 as V,a9 as pe}from"./index-DoEtSiIe.js";import{i as he}from"./CreditCard01-BUXydXso.js";import{B as L}from"./badge-DONoxQO7.js";import{M as je}from"./multi-select-D3r33Eqf.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-OlcoUSVg.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-RDPVkrI6.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-BFVvuNgw.js";import{T as De}from"./Tooltip-Vyb5xIGx.js";import{a as _e,A as Me}from"./AreaChart-BCH9fczV.js";import{c8 as Re}from"./CategoricalChart-iNQ2kTf5.js";import{R as Le}from"./require-capability-FcSdruCZ.js";import"./checkbox-CkODjqKt.js";import"./Minus-CFYZtYi9.js";import"./ChevronDown-Dm2xO7jf.js";import"./command-D5O7M-Cf.js";import"./index-DRuy-mDa.js";import"./SearchMd-BGRe_18c.js";import"./popover-mrQ4T9ru.js";import"./index-BdQq_4o_.js";import"./index-BFFHlwFA.js";import"./ChevronUp-BKdcyIOm.js";import"./index-C_NkXLoh.js";import"./access-gate-4Yp7vAaA.js";import"./capability-load-error-C6JoLBp9.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Me,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Re,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=G(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const K=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(K.length>0?1:0)>1,Y=Z(u,"pageviews"),se=Y>0?Z(u,"requests")/Y:0,me=B&&v&&Y>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(W,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(L,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(W,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(W,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ge,{team:c,showSites:te},c.siteSlugs.join(","))),K.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:K.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ge(t){const e=k.c(13),{team:n,showSites:l}=t,o=G(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(L,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ke,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ke(t){const e=k.c(40),{invoices:n}=t,l=G();let o;e[0]!==n?(o=n.some(Ye),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(We,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function Ye(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function We(t){const e=k.c(14),{status:n}=t,l=G(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(L,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(L,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{Bt as default};
1
+ import{c as k,j as s,i9 as de,b as G,ia as ue,r as le,ib as xe,ic as re,gK as T,gZ as W,B as J,e3 as V,a9 as pe}from"./index-FRxLT_js.js";import{i as he}from"./CreditCard01-CYAMo28t.js";import{B as L}from"./badge-CFiK0EOx.js";import{M as je}from"./multi-select-DuNPPMuZ.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-D5aPAOxI.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-DdZpQzqo.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-BLh4dFJB.js";import{T as De}from"./Tooltip-BDg85pZn.js";import{a as _e,A as Me}from"./AreaChart-6i9ddKAo.js";import{c8 as Re}from"./CategoricalChart-CwzUkCwO.js";import{R as Le}from"./require-capability-BtI4Tyqp.js";import"./checkbox-DR7-Iy_E.js";import"./Minus-DjGZhteG.js";import"./ChevronDown-BkddO6nk.js";import"./command-Cqqhh_W6.js";import"./index-CdR9qfQl.js";import"./SearchMd-B2ZqlWzx.js";import"./popover-BI-lpUhu.js";import"./index-BdQq_4o_.js";import"./index-D9pnpNHk.js";import"./ChevronUp-hmtO7NfN.js";import"./index-xNvvPF5K.js";import"./access-gate-JiR82oco.js";import"./capability-load-error-C7VfNWgD.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Me,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Re,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=G(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const K=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(K.length>0?1:0)>1,Y=Z(u,"pageviews"),se=Y>0?Z(u,"requests")/Y:0,me=B&&v&&Y>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(W,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(L,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(W,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(W,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ge,{team:c,showSites:te},c.siteSlugs.join(","))),K.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:K.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ge(t){const e=k.c(13),{team:n,showSites:l}=t,o=G(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(L,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ke,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ke(t){const e=k.c(40),{invoices:n}=t,l=G();let o;e[0]!==n?(o=n.some(Ye),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(We,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function Ye(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function We(t){const e=k.c(14),{status:n}=t,l=G(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(L,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(L,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{Bt as default};
@@ -1 +1 @@
1
- import{c as B,r as S,b as G,j as h,t as A,a7 as ye,x as xe,aW as we,w as ke,B as be,v as Ce,D as Se,q as le,a6 as ce,K as Y,E as Q,gp as ue,gq as re,gr as H,m as _e}from"./index-DoEtSiIe.js";import{S as de,s as Pe}from"./suggestion-CIik1sqO.js";import{O as Fe,v as Ie,B as De,q as z,Q as ve,P as ne,U as je,k as Me,a as Ee,V as Le,p as Re,C as Ae,l as Ne,n as Te,F as Qe,E as Oe}from"./usage-stats-CLeyhHyT.js";import{aK as Ue}from"./agent-icon-DoabtHNW.js";import"./chat-context-vJ6R-Clt.js";import{m as $e,i as qe,b as Ke}from"./index-BVDmO57n.js";import{u as me}from"./use-mcp-client-86j-Nolb.js";import{u as He}from"./repository-binding-BAQCDq-W.js";import{g as se,a as fe}from"./gateway-client-C5MrdR_p.js";import{l as oe,g as pe}from"./use-mcp-prompts-CPXLXWTp.js";import{f as ze,b as Be}from"./use-org-fs-C62_MbqW.js";async function Je(t,e,r,s,i,o){if(!$e(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!qe(l,e)){const g=Ke(e).parts.map(m=>o(m)).join(", "),w=e?.title??"This model";i?i({fileName:r.name,modelName:w,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${w} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,w=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await w,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Ve(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function We(t){const e=B.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=S.useRef(Ye);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await Je(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),S.useEffect(c,g);let w,m;return e[6]!==r?(w=()=>{if(r?.isDestroyed)return;const p=new Ie("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new De({key:p,props:{handleDrop:(d,b,F,P)=>Ve(d,b,P,(_,v)=>l.current(_,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const P=Array.from(F).filter(Xe);return P.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const v of P){const D=v.getAsFile();D&&(await l.current?.(D,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=w,e[8]=m):(w=e[7],m=e[8]),S.useEffect(w,m),null}function Xe(t){return t.kind==="file"}function Ye(){return Promise.resolve()}function Ct(t){const e=B.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=j=>!j&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=w):w=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(we,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(ke,{className:"relative gap-4",children:[w,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const P=r?.modelName??"";let _;e[19]!==i||e[20]!==P?(_=i("chat.uploader.accepts",{modelName:P}),e[19]=i,e[20]=P,e[21]=_):_=e[21];let v;e[22]!==_?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=v):v=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=h.jsx(Ue,{size:14,className:"text-muted-foreground"}),e[24]=D):D=e[24];const E=r?.accepted;let I;e[25]!==E?(I=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[D,h.jsx("span",{className:"capitalize",children:E})]}),e[25]=E,e[26]=I):I=e[26];let a;e[27]!==v||e[28]!==I?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[v,I]})}),e[27]=v,e[28]=I,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let C;e[35]!==F||e[36]!==a||e[37]!==x?(C=h.jsxs(Ce,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ge,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=C):C=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==C?(M=h.jsx(Se,{open:o,onOpenChange:l,children:C}),e[39]=o,e[40]=l,e[41]=C,e[42]=M):M=e[42],M}function Ge(t){return t.preventDefault()}function St(){const t=B.c(3),[e,r]=S.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=B.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=He();let w;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(w={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=w):w=e[3];const m=me(w);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=S.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=S.useEffectEvent(b),P=S.useRef(null),_=S.useRef(!1),v=s??"default";let D;e[9]!==u||e[10]!==c.id||e[11]!==v?(D=["at-mention",c.id,v,u],e[9]=u,e[10]=c.id,e[11]=v,e[12]=D):D=e[12];const E=D;let I;e[13]!==o?(I=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=I):I=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==I||e[18]!==a?(f={name:"agents",title:I,description:a,kind:"category",drillable:!0},e[17]=I,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let C;e[22]!==o?(C=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=C):C=e[23];let M;e[24]!==C||e[25]!==x?(M={name:"resources",title:x,description:C,kind:"category",drillable:!0},e[24]=C,e[25]=x,e[26]=M):M=e[26];let j;e[27]!==M||e[28]!==f?(j=[f,M],e[27]=M,e[28]=f,e[29]=j):j=e[29];const $=j;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:k,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:k.kind,item_name:k.name}),k.kind!=="category"&&(_.current=!0),k.kind==="category")return d(k.name==="agents"?"agents":"resources"),!1;if(k.kind==="agent"&&k.agentId){z(r,K,{id:k.agentId,name:k.name,metadata:{agentId:k.agentId,title:k.name},char:"@"}),d("categories");return}if(k.kind==="resource"&&k.uri&&m){try{const T=await ue(m,k.uri);z(r,K,{id:k.uri,name:k.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:k}=U,K=F();if(K==="categories"){if(!k.trim())return $;const L=k.toLowerCase(),R=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(et),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(tt)})();return[...R,...X]}if(K==="agents"){let L=g.filter(R=>R.status==="active"&&(!R.id||!re(R.id))&&R.id!==s);if(k.trim()){const R=k.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(R)||X.description?.toLowerCase().includes(R))}return L.map(st)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4}).catch(rt):T=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4});let W=T?.resources??[];if(k.trim()){const L=k.toLowerCase();W=W.filter(R=>R.uri.toLowerCase().includes(L)||R.name?.toLowerCase().includes(L)||R.description?.toLowerCase().includes(L))}return W.map(nt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)P.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const k=P.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:k?Date.now()-k:null}),P.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==E?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:E,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=E,e[49]=V):V=e[49],V};function et(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function tt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function st(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function rt(){}function nt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);z(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function ot(t,e,r,s,i){try{const o=await ue(r,s);z(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function it(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};z(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const at=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),w=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=S.useState(null),[u,d]=S.useState(null),b=ve(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(C=>C.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=S.useRef(null),P=S.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),P.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await it(t,f,o.slug,a.skill,{t:s}):a.uri&&await ot(t,f,l,a.uri,{t:s})},v=async a=>{if(!p||!l)return;const{range:f,item:x}=p,C=se(x._meta);await ie(t,f,l,x.name,C,a,{t:s}),n(null)},D=async a=>{if(!(!u||!l)){if(!je(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},E=async a=>{const{query:f}=a;if(!l)return[];const[x,C,M]=await Promise.all([ae(i,c,l),ct(i,g,l),lt(i,w,o.slug)]),j=f.trim().toLowerCase(),$=(x??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.title?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(C??[]).filter(y=>!j||y.uri.toLowerCase().includes(j)||y.name?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.id.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},I=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:E,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),P.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:P.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:I,setPrompt:()=>n(null),onSubmit:v}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:D,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function lt(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function ct(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ut(t){return[Ne,Pe.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Te,Qe]}function _t({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=S.useRef(o),w=S.useRef(e),m=S.useRef(s),p=S.useRef(i),n=Ee({extensions:ut(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[14px] max-md:text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{w.current(u?.getJSON())}});return S.useEffect(()=>{n?.setEditable(!r)},[n,r]),S.useEffect(()=>{g.current=o},[o]),S.useEffect(()=>{w.current=e},[e]),S.useEffect(()=>{m.current=s},[s]),S.useEffect(()=>{p.current=i},[i]),S.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function Pt(t){const e=B.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:w}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Re();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const C=n.state.doc.textContent.trim()==="";n.commands.focus("end"),C||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,C)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),C)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+C:C})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),S.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let P;e[3]!==w||e[4]!==b||e[5]!==F?(P=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",w,Ae,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=w,e[4]=b,e[5]=F,e[6]=P):P=e[6];let _;e[7]!==n||e[8]!==P?(_=h.jsx(Oe,{editor:n,className:P}),e[7]=n,e[8]=P,e[9]=_):_=e[9];const v=s??null;let D;e[10]!==n||e[11]!==c||e[12]!==v?(D=h.jsx(S.Suspense,{fallback:null,children:h.jsx(at,{editor:n,virtualMcpId:v,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=v,e[13]=D):D=e[13];const E=s??null;let I;e[14]!==n||e[15]!==c||e[16]!==E?(I=h.jsx(S.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:E,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=E,e[17]=I):I=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(We,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==D||e[25]!==I||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,D,I,a]}),e[24]=D,e[25]=I,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{_t as T,Ct as U,Pt as a,Je as p,St as u};
1
+ import{c as B,r as S,b as G,j as h,t as A,a7 as ye,x as xe,aW as we,w as ke,B as be,v as Ce,D as Se,q as le,a6 as ce,K as Y,E as Q,gp as ue,gq as re,gr as H,m as _e}from"./index-FRxLT_js.js";import{S as de,s as Pe}from"./suggestion-SjSKJeBU.js";import{O as Fe,v as Ie,B as De,q as z,Q as ve,P as ne,U as je,k as Me,a as Ee,V as Le,p as Re,C as Ae,l as Ne,n as Te,F as Qe,E as Oe}from"./usage-stats-X4jMwPwX.js";import{aK as Ue}from"./agent-icon-qKbICqBE.js";import"./chat-context-CvQ-sM5v.js";import{m as $e,i as qe,b as Ke}from"./index-BUHQM-fc.js";import{u as me}from"./use-mcp-client-rOHZbD3Y.js";import{u as He}from"./repository-binding-DjFY5b0y.js";import{g as se,a as fe}from"./gateway-client-BYWq7W1f.js";import{l as oe,g as pe}from"./use-mcp-prompts-Cq6mpthN.js";import{f as ze,b as Be}from"./use-org-fs-Bjw5czAm.js";async function Je(t,e,r,s,i,o){if(!$e(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!qe(l,e)){const g=Ke(e).parts.map(m=>o(m)).join(", "),w=e?.title??"This model";i?i({fileName:r.name,modelName:w,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${w} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,w=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await w,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Ve(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function We(t){const e=B.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=S.useRef(Ye);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await Je(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),S.useEffect(c,g);let w,m;return e[6]!==r?(w=()=>{if(r?.isDestroyed)return;const p=new Ie("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new De({key:p,props:{handleDrop:(d,b,F,P)=>Ve(d,b,P,(_,v)=>l.current(_,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const P=Array.from(F).filter(Xe);return P.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const v of P){const D=v.getAsFile();D&&(await l.current?.(D,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=w,e[8]=m):(w=e[7],m=e[8]),S.useEffect(w,m),null}function Xe(t){return t.kind==="file"}function Ye(){return Promise.resolve()}function Ct(t){const e=B.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=j=>!j&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=w):w=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(we,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(ke,{className:"relative gap-4",children:[w,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const P=r?.modelName??"";let _;e[19]!==i||e[20]!==P?(_=i("chat.uploader.accepts",{modelName:P}),e[19]=i,e[20]=P,e[21]=_):_=e[21];let v;e[22]!==_?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=v):v=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=h.jsx(Ue,{size:14,className:"text-muted-foreground"}),e[24]=D):D=e[24];const E=r?.accepted;let I;e[25]!==E?(I=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[D,h.jsx("span",{className:"capitalize",children:E})]}),e[25]=E,e[26]=I):I=e[26];let a;e[27]!==v||e[28]!==I?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[v,I]})}),e[27]=v,e[28]=I,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let C;e[35]!==F||e[36]!==a||e[37]!==x?(C=h.jsxs(Ce,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ge,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=C):C=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==C?(M=h.jsx(Se,{open:o,onOpenChange:l,children:C}),e[39]=o,e[40]=l,e[41]=C,e[42]=M):M=e[42],M}function Ge(t){return t.preventDefault()}function St(){const t=B.c(3),[e,r]=S.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=B.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=He();let w;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(w={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=w):w=e[3];const m=me(w);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=S.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=S.useEffectEvent(b),P=S.useRef(null),_=S.useRef(!1),v=s??"default";let D;e[9]!==u||e[10]!==c.id||e[11]!==v?(D=["at-mention",c.id,v,u],e[9]=u,e[10]=c.id,e[11]=v,e[12]=D):D=e[12];const E=D;let I;e[13]!==o?(I=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=I):I=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==I||e[18]!==a?(f={name:"agents",title:I,description:a,kind:"category",drillable:!0},e[17]=I,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let C;e[22]!==o?(C=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=C):C=e[23];let M;e[24]!==C||e[25]!==x?(M={name:"resources",title:x,description:C,kind:"category",drillable:!0},e[24]=C,e[25]=x,e[26]=M):M=e[26];let j;e[27]!==M||e[28]!==f?(j=[f,M],e[27]=M,e[28]=f,e[29]=j):j=e[29];const $=j;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:k,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:k.kind,item_name:k.name}),k.kind!=="category"&&(_.current=!0),k.kind==="category")return d(k.name==="agents"?"agents":"resources"),!1;if(k.kind==="agent"&&k.agentId){z(r,K,{id:k.agentId,name:k.name,metadata:{agentId:k.agentId,title:k.name},char:"@"}),d("categories");return}if(k.kind==="resource"&&k.uri&&m){try{const T=await ue(m,k.uri);z(r,K,{id:k.uri,name:k.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:k}=U,K=F();if(K==="categories"){if(!k.trim())return $;const L=k.toLowerCase(),R=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(et),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(tt)})();return[...R,...X]}if(K==="agents"){let L=g.filter(R=>R.status==="active"&&(!R.id||!re(R.id))&&R.id!==s);if(k.trim()){const R=k.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(R)||X.description?.toLowerCase().includes(R))}return L.map(st)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4}).catch(rt):T=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4});let W=T?.resources??[];if(k.trim()){const L=k.toLowerCase();W=W.filter(R=>R.uri.toLowerCase().includes(L)||R.name?.toLowerCase().includes(L)||R.description?.toLowerCase().includes(L))}return W.map(nt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)P.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const k=P.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:k?Date.now()-k:null}),P.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==E?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:E,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=E,e[49]=V):V=e[49],V};function et(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function tt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function st(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function rt(){}function nt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);z(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function ot(t,e,r,s,i){try{const o=await ue(r,s);z(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function it(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};z(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const at=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),w=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=S.useState(null),[u,d]=S.useState(null),b=ve(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(C=>C.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=S.useRef(null),P=S.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),P.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await it(t,f,o.slug,a.skill,{t:s}):a.uri&&await ot(t,f,l,a.uri,{t:s})},v=async a=>{if(!p||!l)return;const{range:f,item:x}=p,C=se(x._meta);await ie(t,f,l,x.name,C,a,{t:s}),n(null)},D=async a=>{if(!(!u||!l)){if(!je(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},E=async a=>{const{query:f}=a;if(!l)return[];const[x,C,M]=await Promise.all([ae(i,c,l),ct(i,g,l),lt(i,w,o.slug)]),j=f.trim().toLowerCase(),$=(x??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.title?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(C??[]).filter(y=>!j||y.uri.toLowerCase().includes(j)||y.name?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.id.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},I=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:E,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),P.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:P.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:I,setPrompt:()=>n(null),onSubmit:v}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:D,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function lt(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function ct(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ut(t){return[Ne,Pe.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Te,Qe]}function _t({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=S.useRef(o),w=S.useRef(e),m=S.useRef(s),p=S.useRef(i),n=Ee({extensions:ut(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[14px] max-md:text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{w.current(u?.getJSON())}});return S.useEffect(()=>{n?.setEditable(!r)},[n,r]),S.useEffect(()=>{g.current=o},[o]),S.useEffect(()=>{w.current=e},[e]),S.useEffect(()=>{m.current=s},[s]),S.useEffect(()=>{p.current=i},[i]),S.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function Pt(t){const e=B.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:w}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Re();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const C=n.state.doc.textContent.trim()==="";n.commands.focus("end"),C||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,C)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),C)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+C:C})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),S.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let P;e[3]!==w||e[4]!==b||e[5]!==F?(P=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",w,Ae,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=w,e[4]=b,e[5]=F,e[6]=P):P=e[6];let _;e[7]!==n||e[8]!==P?(_=h.jsx(Oe,{editor:n,className:P}),e[7]=n,e[8]=P,e[9]=_):_=e[9];const v=s??null;let D;e[10]!==n||e[11]!==c||e[12]!==v?(D=h.jsx(S.Suspense,{fallback:null,children:h.jsx(at,{editor:n,virtualMcpId:v,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=v,e[13]=D):D=e[13];const E=s??null;let I;e[14]!==n||e[15]!==c||e[16]!==E?(I=h.jsx(S.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:E,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=E,e[17]=I):I=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(We,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==D||e[25]!==I||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,D,I,a]}),e[24]=D,e[25]=I,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{_t as T,Ct as U,Pt as a,Je as p,St as u};