decocms 4.373.0 → 4.373.1

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 (361) hide show
  1. package/dist/client/assets/{AlertCircle-3PzOAmGf.js → AlertCircle-2L7lI8NL.js} +1 -1
  2. package/dist/client/assets/{AreaChart-7E6DaaEO.js → AreaChart-BSJ08P7a.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-JCMxLp8E.js → ArrowLeft-8rouBEwC.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-Cl3bzAIC.js → ArrowRight-DCA5zjxW.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Bmd2w7Fx.js → ArrowUp-BtksDHBQ.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-D-MpJhL1.js → CartesianChart-BbOaLmfq.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Co3IBXeH.js → CheckCircle-BmVuh1xp.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-Djmy8s04.js → ChevronUp-fg9sod-H.js} +1 -1
  9. package/dist/client/assets/{Copy01-BYK2zIkj.js → Copy01-BgwuTJFm.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-C7PO4dVs.js → CreditCard01-CIt471eG.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-BozfeMf6.js → DotsVertical-CE2o6L6N.js} +1 -1
  12. package/dist/client/assets/{Download01-Z6w2IrLj.js → Download01-DNhEQzg0.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-G3lO5Hsl.js → ErrorBarContext-DxNax47N.js} +1 -1
  14. package/dist/client/assets/{Eye-ChO6k3fk.js → Eye-Dq6Vw6FI.js} +1 -1
  15. package/dist/client/assets/{Globe01-D3UtmZtY.js → Globe01-g_y8gAs1.js} +1 -1
  16. package/dist/client/assets/{Globe04-CCIm2Cf2.js → Globe04-GFiRExL0.js} +1 -1
  17. package/dist/client/assets/{Image01-Dx7ea-3O.js → Image01-QB6twEDu.js} +1 -1
  18. package/dist/client/assets/{Key01-B8q0d-op.js → Key01-CO_i2QPb.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-DUo3bbMr.js → LayoutLeft-BfySK4h8.js} +1 -1
  20. package/dist/client/assets/{Line-DC3wc0Zn.js → Line-Cr57fOtp.js} +1 -1
  21. package/dist/client/assets/{Link01-C-mBEv93.js → Link01-BIFMl_M0.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-uHE64k_w.js → LinkExternal01-DQD59o7F.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CevElukI.js → Monitor01-Ddm2yOG6.js} +1 -1
  24. package/dist/client/assets/{Package-C6yqPbb7.js → Package-CvzEol5_.js} +1 -1
  25. package/dist/client/assets/{Palette-B2v8R7_D.js → Palette-DT856bn6.js} +1 -1
  26. package/dist/client/assets/{Play-D26LBNWf.js → Play-wYDcJhBq.js} +1 -1
  27. package/dist/client/assets/{Plus-CoGTSnEd.js → Plus-BSp00qOC.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BvCfRAbg.js → SearchLg-DFD1t2UL.js} +1 -1
  29. package/dist/client/assets/{SearchMd-C0e2gT30.js → SearchMd-Bb5gjLcX.js} +1 -1
  30. package/dist/client/assets/{Sector-Cztbz-wz.js → Sector-wViCnB96.js} +1 -1
  31. package/dist/client/assets/{Settings02-azWHb0MO.js → Settings02-D9Qv7BDm.js} +1 -1
  32. package/dist/client/assets/{Share07-CW1RSVqD.js → Share07-CZ7JzYs9.js} +1 -1
  33. package/dist/client/assets/{Stars01-Ch2E4B6o.js → Stars01-D-wYuyik.js} +1 -1
  34. package/dist/client/assets/{Sun-Cx4zdBZx.js → Sun-DLRcOzSd.js} +1 -1
  35. package/dist/client/assets/{Tool01-DbFf2Je1.js → Tool01-Dwy1nlT9.js} +1 -1
  36. package/dist/client/assets/{Tool02-Hh7HLEzm.js → Tool02-CvlAGFBM.js} +1 -1
  37. package/dist/client/assets/{Trash01-D8ICnU7E.js → Trash01-DtE0n00a.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-ZTgT_kdi.js → TrendUp01-BCriuXJd.js} +1 -1
  39. package/dist/client/assets/{Upload01-BoLmU8be.js → Upload01-Ba-RLxE1.js} +1 -1
  40. package/dist/client/assets/{User01-CQXsOD6P.js → User01-DHd46PZp.js} +1 -1
  41. package/dist/client/assets/{UserSquare-C4_QxRGQ.js → UserSquare-CcF49LHs.js} +1 -1
  42. package/dist/client/assets/{Users01-mzXfNn0j.js → Users01-B8gdz27Y.js} +1 -1
  43. package/dist/client/assets/{X-BmPcW1eb.js → X-BtMi8Qau.js} +1 -1
  44. package/dist/client/assets/{XCircle-jpeASVbU.js → XCircle-BLCHBIhx.js} +1 -1
  45. package/dist/client/assets/{XClose-BhXJw65F.js → XClose-CvcHLHe2.js} +1 -1
  46. package/dist/client/assets/{Zap-Cc5rEM6R.js → Zap-DZAIluO6.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-DtzZmmbM.js → ZoomOut-DUFJq3-K.js} +1 -1
  48. package/dist/client/assets/{access-gate-C720AIcS.js → access-gate-C9Dl5e5c.js} +1 -1
  49. package/dist/client/assets/{add-connection-dialog-DqhI8LLv.js → add-connection-dialog-DA05asFs.js} +1 -1
  50. package/dist/client/assets/{agent-analytics-CEaAXQWf.js → agent-analytics-CDo5Hugr.js} +1 -1
  51. package/dist/client/assets/agent-app-lfl4wDqj.js +1 -0
  52. package/dist/client/assets/{agent-assets-QG4QLYi4.js → agent-assets-6UK-ev9d.js} +1 -1
  53. package/dist/client/assets/{agent-automation-C9l9hEWB.js → agent-automation-BC-cMvrG.js} +1 -1
  54. package/dist/client/assets/{agent-automations-7OvEQ1VY.js → agent-automations-CnHTcvU7.js} +1 -1
  55. package/dist/client/assets/{agent-connect-sources-D4Eixo2_.js → agent-connect-sources-CJ8artss.js} +1 -1
  56. package/dist/client/assets/agent-deck-BCZ0G4O2.js +1 -0
  57. package/dist/client/assets/{agent-e2e-Dhn8AUR2.js → agent-e2e-Cj1Q_JS0.js} +1 -1
  58. package/dist/client/assets/{agent-experiments-DXXxqvO5.js → agent-experiments-DJ13yAp9.js} +1 -1
  59. package/dist/client/assets/agent-file-DbKP1r-4.js +1 -0
  60. package/dist/client/assets/{agent-git-Dz0OC5zZ.js → agent-git-B8LMQ2zl.js} +1 -1
  61. package/dist/client/assets/{agent-hosting-h_IXMzav.js → agent-hosting-Bm-WxahY.js} +1 -1
  62. package/dist/client/assets/{agent-icon-DbgbaBWC.js → agent-icon-CTsmTxHg.js} +1 -1
  63. package/dist/client/assets/agent-library-file-DvybgEEZ.js +1 -0
  64. package/dist/client/assets/{agent-monitor-K9XcbQ8_.js → agent-monitor-DgVt0zbx.js} +1 -1
  65. package/dist/client/assets/{agent-overview-CHDp8hoe.js → agent-overview-pOglhwpN.js} +1 -1
  66. package/dist/client/assets/agent-settings-Bx-Ya3hQ.js +1 -0
  67. package/dist/client/assets/{agent-site-editor-DQY9pg4H.js → agent-site-editor-DVT-M9T0.js} +1 -1
  68. package/dist/client/assets/agent-site-editor-code-DpPWdLwT.js +2 -0
  69. package/dist/client/assets/{agent-site-editor-content-N2XOogCr.js → agent-site-editor-content-eM0WchN0.js} +2 -2
  70. package/dist/client/assets/{agent-site-editor-preview-Dt5NU6JJ.js → agent-site-editor-preview-3VO_kTqr.js} +3 -3
  71. package/dist/client/assets/{agent-view-guard-DJyWI4yF.js → agent-view-guard-BNYKK-x9.js} +1 -1
  72. package/dist/client/assets/agent-view-v-h5B6vN.js +1 -0
  73. package/dist/client/assets/{agents-list-CLIUc54V.js → agents-list-BXPjUzIN.js} +1 -1
  74. package/dist/client/assets/{ai-providers-Dq0uWBim.js → ai-providers-BAmCFPvS.js} +1 -1
  75. package/dist/client/assets/{alert-D9Xs8r1J.js → alert-C8o4-kn8.js} +1 -1
  76. package/dist/client/assets/{alert-dialog-CMdGVc5y.js → alert-dialog-9n2p5SCQ.js} +1 -1
  77. package/dist/client/assets/{api-keys-BaELtPjJ.js → api-keys-Cu1KdEtK.js} +1 -1
  78. package/dist/client/assets/api-keys-DCurVLgh.js +1 -0
  79. package/dist/client/assets/app-editor-C3QSidsO.js +1 -0
  80. package/dist/client/assets/{asset-utils-B2xrnUou.js → asset-utils-CK3Em4fb.js} +1 -1
  81. package/dist/client/assets/{auth-DvTDuEnH.js → auth-BBW3DF0r.js} +1 -1
  82. package/dist/client/assets/{auth-catchall-CE_y-mnY.js → auth-catchall-Bva2z4Gj.js} +1 -1
  83. package/dist/client/assets/{auth-entry-BWD0wZ2A.js → auth-entry-BuHqwUIr.js} +1 -1
  84. package/dist/client/assets/{auth-split-layout-tneb1o26.js → auth-split-layout-DMgxvbll.js} +1 -1
  85. package/dist/client/assets/{authenticate-and-persist-oauth-CyEJ3ZKP.js → authenticate-and-persist-oauth-Pk9b2m8R.js} +1 -1
  86. package/dist/client/assets/{automation-list-row-CJ0AVjPL.js → automation-list-row-D-zBLXA-.js} +1 -1
  87. package/dist/client/assets/{automation-runs-CbMZ10A-.js → automation-runs-C8Wbje-n.js} +1 -1
  88. package/dist/client/assets/{automations-kGGjILm8.js → automations-D69ikqKh.js} +1 -1
  89. package/dist/client/assets/{autosend-CESqNA2a.js → autosend-CVNOmzPu.js} +1 -1
  90. package/dist/client/assets/{avatar-CsDZ0T22.js → avatar-BzRNaDEk.js} +1 -1
  91. package/dist/client/assets/{badge-BMuU0t5h.js → badge-C5M6nZd4.js} +1 -1
  92. package/dist/client/assets/{block-document-BydU2jcx.js → block-document-UPtnFOJG.js} +1 -1
  93. package/dist/client/assets/{blocks-preview-workspace-context-CuzoVyh9.js → blocks-preview-workspace-context-DAFMxzU6.js} +1 -1
  94. package/dist/client/assets/{breadcrumb-CV5rO8sh.js → breadcrumb-0yy48vm9.js} +1 -1
  95. package/dist/client/assets/{buckets-Dm9YtrYe.js → buckets-CktpbsrB.js} +1 -1
  96. package/dist/client/assets/{build-improve-prompt-doc-EvTa14jr.js → build-improve-prompt-doc-C-SX02eL.js} +1 -1
  97. package/dist/client/assets/{bulk-category-panel-CY3h3K-9.js → bulk-category-panel-MrIv4eD2.js} +1 -1
  98. package/dist/client/assets/{calendar-BhMl9dZ9.js → calendar-QcX36iLy.js} +1 -1
  99. package/dist/client/assets/{capability-load-error-HRK6520w.js → capability-load-error-BVb3VEU2.js} +1 -1
  100. package/dist/client/assets/{category-editor-z_l9WPAc.js → category-editor-DZThBJlF.js} +1 -1
  101. package/dist/client/assets/{chart-pALnZlqd.js → chart-BVjaATZw.js} +1 -1
  102. package/dist/client/assets/{chat-context-CHZ5Yehn.js → chat-context-ELO8A2Ar.js} +1 -1
  103. package/dist/client/assets/{chat-draft-CZ4LRf6I.js → chat-draft-tDfZTlxU.js} +1 -1
  104. package/dist/client/assets/{checkbox-BoN76eap.js → checkbox-iGlb02v9.js} +1 -1
  105. package/dist/client/assets/{choose-editor-DHr5QgoP.js → choose-editor-CWLAiGtz.js} +1 -1
  106. package/dist/client/assets/{cli-auth-success-BOpU9sA8.js → cli-auth-success-DyNW_Pmq.js} +1 -1
  107. package/dist/client/assets/{client-icons-BPRdY54C.js → client-icons-BuRYGGKe.js} +1 -1
  108. package/dist/client/assets/{collapsible-D3vKPIBT.js → collapsible-PyJ2NOzW.js} +1 -1
  109. package/dist/client/assets/{collection-detail-B44G83q8.js → collection-detail-DXmBNKMr.js} +1 -1
  110. package/dist/client/assets/{collection-display-button-BndwflUf.js → collection-display-button-Cz5AkuIg.js} +1 -1
  111. package/dist/client/assets/{collection-search-BmT0oV8g.js → collection-search-DM8MkJfo.js} +1 -1
  112. package/dist/client/assets/{collection-table-wrapper-UMxhNoR0.js → collection-table-wrapper-cBr_X4Jo.js} +1 -1
  113. package/dist/client/assets/{collection-tabs-D6Sk9riW.js → collection-tabs-aKKPIP9M.js} +1 -1
  114. package/dist/client/assets/{combobox-BXOISFpW.js → combobox-CQBdlQef.js} +1 -1
  115. package/dist/client/assets/{command-bqq51nHs.js → command-CZcxzTcw.js} +1 -1
  116. package/dist/client/assets/{companion-mcps-section-7NiZEsE1.js → companion-mcps-section-B7qgbnOZ.js} +1 -1
  117. package/dist/client/assets/{connect-gdFpiJzg.js → connect-D6Wz7x6C.js} +1 -1
  118. package/dist/client/assets/{connect-layout-BNcHFw2B.js → connect-layout-DzSDvFP2.js} +1 -1
  119. package/dist/client/assets/{connection-DlOqhGn3.js → connection-DStV2sLP.js} +1 -1
  120. package/dist/client/assets/{connection-card-Dh4yj-V8.js → connection-card-CpIJKLp3.js} +1 -1
  121. package/dist/client/assets/{connection-detail-Cjp3fFqG.js → connection-detail-junbbrHX.js} +1 -1
  122. package/dist/client/assets/{connection-form-helpers-DoXq4oCN.js → connection-form-helpers-DM_wSOEJ.js} +1 -1
  123. package/dist/client/assets/{connections-BTo7AfIR.js → connections-DvjnCZJT.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-CjRZ3hmF.js → create-organization-dialog-CvXOAbwA.js} +1 -1
  125. package/dist/client/assets/{decofile-api-DlO_JJTI.js → decofile-api-zRlIvvNL.js} +1 -1
  126. package/dist/client/assets/{decopilot-BbHxwoKU.js → decopilot-BI8eOOPY.js} +1 -1
  127. package/dist/client/assets/{dialog-yUWKJPsU.js → dialog-AoC07APJ.js} +1 -1
  128. package/dist/client/assets/{discover-_mwx3kHk.js → discover-zo2iAYFW.js} +1 -1
  129. package/dist/client/assets/{domain-settings-DWfJmRnt.js → domain-settings-C6kSznIr.js} +1 -1
  130. package/dist/client/assets/{download-app-dialog-CnJNRM3l.js → download-app-dialog-CsiIuf7j.js} +1 -1
  131. package/dist/client/assets/{drawer-CFueQivP.js → drawer-DGzquxJ8.js} +1 -1
  132. package/dist/client/assets/{editor-9_pChBN4.js → editor-oL1B7LVJ.js} +1 -1
  133. package/dist/client/assets/{empty-state-DTENIvqH.js → empty-state-DxJQDjCw.js} +1 -1
  134. package/dist/client/assets/{empty-state-1TOptJ4i.js → empty-state-Y08kvU5o.js} +1 -1
  135. package/dist/client/assets/{extract-connection-data-B7yRd0El.js → extract-connection-data-C7Wh9xkI.js} +1 -1
  136. package/dist/client/assets/{feature-gate-DmyzkRdC.js → feature-gate-C1d068b1.js} +1 -1
  137. package/dist/client/assets/{feature-paywall-CFcsZgv5.js → feature-paywall-BoABVlUQ.js} +1 -1
  138. package/dist/client/assets/{file-explorer-BPttIqTX.js → file-explorer-DG5Gvb-w.js} +1 -1
  139. package/dist/client/assets/{file-preview-h8_PuEm0.js → file-preview-iaqpqUYi.js} +1 -1
  140. package/dist/client/assets/{file-share-button-CYWl5jll.js → file-share-button-D0lT5ixf.js} +1 -1
  141. package/dist/client/assets/{file-type-icon-C7b31Eu-.js → file-type-icon-lZW2ows7.js} +1 -1
  142. package/dist/client/assets/{folder-icon-Cp3UZ2f7.js → folder-icon-DVG7PK8X.js} +1 -1
  143. package/dist/client/assets/{form-D4fabgxt.js → form-CYsJTpNM.js} +1 -1
  144. package/dist/client/assets/{gateway-client-BqcIzR1f.js → gateway-client-CnYYocwu.js} +1 -1
  145. package/dist/client/assets/{general-BVFviafD.js → general-BiYLEv2o.js} +1 -1
  146. package/dist/client/assets/{github-icon-BJ-JIGKg.js → github-icon-swNUSpAU.js} +1 -1
  147. package/dist/client/assets/{home-D_wLSsVp.js → home-BbjS-573.js} +1 -1
  148. package/dist/client/assets/{hooks-CzhqOgxt.js → hooks-BlE0QZwR.js} +1 -1
  149. package/dist/client/assets/{hooks-GmRpr8h8.js → hooks-D0dDgrIf.js} +1 -1
  150. package/dist/client/assets/{icon-button-BtmumYDv.js → icon-button-7c--Wy5B.js} +1 -1
  151. package/dist/client/assets/{index-CLlrN2I7.js → index-0-s9o3tr.js} +1 -1
  152. package/dist/client/assets/{index-CFPoNDBi.js → index-BDYXeKzz.js} +1 -1
  153. package/dist/client/assets/{index-DaUTlKSt.css → index-BOHOyAF8.css} +1 -1
  154. package/dist/client/assets/{index-ui6lA5FC.js → index-BUfoj27y.js} +1 -1
  155. package/dist/client/assets/{index-PXtwpYFZ.js → index-BchRuDAc.js} +1 -1
  156. package/dist/client/assets/{index-Bxbv_23l.js → index-C97O3ClY.js} +1 -1
  157. package/dist/client/assets/{index-BIAbKV8r.js → index-CutV0Ygc.js} +1 -1
  158. package/dist/client/assets/{index-DmozmqiR.js → index-DGY2nhhI.js} +1 -1
  159. package/dist/client/assets/{index-DEoa7bfP.js → index-DItj2r3e.js} +1 -1
  160. package/dist/client/assets/{index-CxyF2W3e.js → index-DKXWNSdB.js} +1 -1
  161. package/dist/client/assets/{index-CLccaHLm.js → index-DllcfiZL.js} +1 -1
  162. package/dist/client/assets/{index-CuhH8P7u.js → index-DyCAAYSx.js} +1 -1
  163. package/dist/client/assets/{index-BiU3YmQL.js → index-EcuFIS2a.js} +2 -2
  164. package/dist/client/assets/{index-DAWDSRE3.js → index-Exw_Yjch.js} +1 -1
  165. package/dist/client/assets/{index-DyLXwR4J.js → index-fN6RkMSD.js} +1 -1
  166. package/dist/client/assets/{index-redirect-C_mVUP1U.js → index-redirect-Bm4zqVUy.js} +1 -1
  167. package/dist/client/assets/{infiniteQueryObserver-QHtAxfIQ.js → infiniteQueryObserver-3RxH1tr-.js} +1 -1
  168. package/dist/client/assets/{infra-billing-BUNh4stc.js → infra-billing-CmY2herT.js} +1 -1
  169. package/dist/client/assets/{input-BGhe0a85.js → input-BrPa4I3Z.js} +1 -1
  170. package/dist/client/assets/{input-4CSpUSQl.js → input-Buz_7xoG.js} +1 -1
  171. package/dist/client/assets/{input-CRD8MdDS.js → input-C5klQNJJ.js} +1 -1
  172. package/dist/client/assets/{integration-icon-1ySWGOUX.js → integration-icon-D3FHJbYu.js} +1 -1
  173. package/dist/client/assets/{label-BNElcQf4.js → label-BX1BwzZ4.js} +1 -1
  174. package/dist/client/assets/{last-preview-page-CriZ3Ybr.js → last-preview-page-BSVfE6AT.js} +1 -1
  175. package/dist/client/assets/{layout-JObct3sA.js → layout-030aDjqi.js} +1 -1
  176. package/dist/client/assets/{legacy-agents-deep-Be8TTzCS.js → legacy-agents-deep-BblX_qPq.js} +1 -1
  177. package/dist/client/assets/{legacy-main-redirect-B7vEff38.js → legacy-main-redirect-BDaODIKZ.js} +1 -1
  178. package/dist/client/assets/{library-DiWyPd02.js → library-CmkU9fCT.js} +1 -1
  179. package/dist/client/assets/{login-Cp8tUb0B.js → login-BpUdj6Fq.js} +1 -1
  180. package/dist/client/assets/{markdown-Cyp9lJ5l.js → markdown-VKlC4_bJ.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-swczxBq4.js → mcp-app-renderer-wS7imsel.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-S1Th8e_4.js → mcp-oauth-B7YJNr4N.js} +1 -1
  183. package/dist/client/assets/{members--h5oznU6.js → members-2ZkimP3H.js} +1 -1
  184. package/dist/client/assets/{message-templates-B7sm0uFT.js → message-templates-DyGM313y.js} +1 -1
  185. package/dist/client/assets/{mini-report-page-gIgc_0u6.js → mini-report-page-CYdef8vQ.js} +1 -1
  186. package/dist/client/assets/{mock-board-BgLaLM9b.js → mock-board-Dk2mRFCa.js} +3 -3
  187. package/dist/client/assets/{monaco-editor-BTTiRg3C.js → monaco-editor-ChRh_qus.js} +1 -1
  188. package/dist/client/assets/{monitoring-stats-row-SqX44qyF.js → monitoring-stats-row-DirMMFq2.js} +1 -1
  189. package/dist/client/assets/{multi-select-DlCEHd3Z.js → multi-select-CYKeAXVo.js} +1 -1
  190. package/dist/client/assets/{mustache-CgVU0pmm.js → mustache-BpzqsH6c.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-DVF3P0k_.js → oauth-callback-CLQttSb2.js} +1 -1
  192. package/dist/client/assets/{oauth-callback-ai-provider-DnZgYvOg.js → oauth-callback-ai-provider-C5AqSldx.js} +1 -1
  193. package/dist/client/assets/{onboarding-KuoWylVw.js → onboarding-BYeSkDcE.js} +1 -1
  194. package/dist/client/assets/{optimistic-project-sidebar-views-DbOixNPz.js → optimistic-project-sidebar-views-hB0JGrCs.js} +1 -1
  195. package/dist/client/assets/{org-file-open-context-ZSKUsYTL.js → org-file-open-context-D26BTBiX.js} +1 -1
  196. package/dist/client/assets/{organization-choice-xHSL_jFs.js → organization-choice-sm9k2ko4.js} +1 -1
  197. package/dist/client/assets/{orgs-BZ30h814.js → orgs-BT6gh3Sc.js} +1 -1
  198. package/dist/client/assets/{page-seo-form-uvAq8WeJ.js → page-seo-form-Bhk-2qvu.js} +1 -1
  199. package/dist/client/assets/{pair-TxCwxPu7.js → pair-Bh73YYpe.js} +2 -2
  200. package/dist/client/assets/{plan-ladder-Jef48mB3.js → plan-ladder-B-hb17ya.js} +1 -1
  201. package/dist/client/assets/{popover-QnaOlHhb.js → popover-Bff85VlI.js} +1 -1
  202. package/dist/client/assets/{post-calendar-iJnYrJKe.js → post-calendar-BUJnl75O.js} +1 -1
  203. package/dist/client/assets/{post-editor-Bo6bvTrf.js → post-editor-B8ClYTJb.js} +1 -1
  204. package/dist/client/assets/{preview-content-BZw1CdZv.js → preview-content-C4FuOpTi.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-CW8lM0wY.js → preview-dialog-DY1kQ4y_.js} +1 -1
  206. package/dist/client/assets/{primitives-K6663FBF.js → primitives-BCCkMTJb.js} +1 -1
  207. package/dist/client/assets/{profile-SyCdTPAI.js → profile-T7ySaz_t.js} +1 -1
  208. package/dist/client/assets/{project-app-view-LEql7xV5.js → project-app-view-D4HCSkue.js} +1 -1
  209. package/dist/client/assets/{project-feed-B-N2eAAK.js → project-feed-CRHprIgj.js} +1 -1
  210. package/dist/client/assets/{project-icon-DeL96Npe.js → project-icon-D_oHwik9.js} +1 -1
  211. package/dist/client/assets/project-reports-CzVFjEoR.js +1 -0
  212. package/dist/client/assets/project-tasks-c_cBe8VF.js +1 -0
  213. package/dist/client/assets/{prompts-xGBFLFgt.js → prompts-BuPAnA4R.js} +1 -1
  214. package/dist/client/assets/record-editor-CHfqyrFA.js +1 -0
  215. package/dist/client/assets/{redirect-editor-DXB_8yBv.js → redirect-editor-BrEMZWAU.js} +1 -1
  216. package/dist/client/assets/registry-4kJYrulU.js +2 -0
  217. package/dist/client/assets/{registry-layout-hsve34X8.js → registry-layout-o90YrVKa.js} +1 -1
  218. package/dist/client/assets/reports-COffkxyo.js +1 -0
  219. package/dist/client/assets/{reports-cM3vPGFG.js → reports-DEVutxJq.js} +1 -1
  220. package/dist/client/assets/{reports-onboarding-VXLjX7pO.js → reports-onboarding-Dt5mvf07.js} +1 -1
  221. package/dist/client/assets/{reports-tab-D8TZTv9m.js → reports-tab-C6PZg0b6.js} +2 -2
  222. package/dist/client/assets/{repositories-CPa6SZ5V.js → repositories-DBFrDUwl.js} +1 -1
  223. package/dist/client/assets/{repository-import-picker-IY5VTzNS.js → repository-import-picker-ftg0FRzY.js} +1 -1
  224. package/dist/client/assets/{repository-picker-BZKrcN4Y.js → repository-picker-BKj90hIS.js} +1 -1
  225. package/dist/client/assets/{require-capability-CimSbmsz.js → require-capability-gpVnF6U4.js} +1 -1
  226. package/dist/client/assets/{required-auth-layout-C1pT7wzX.js → required-auth-layout-BhdxJMdb.js} +1 -1
  227. package/dist/client/assets/{reset-password-BjWIunWT.js → reset-password-DD2ixVIR.js} +1 -1
  228. package/dist/client/assets/{resizable-YNqh8MUH.js → resizable-wU1MiASn.js} +1 -1
  229. package/dist/client/assets/{review-settings-Be2fdXif.js → review-settings-3uLiRV1J.js} +1 -1
  230. package/dist/client/assets/{rich-text-link-control-BExHOMAv.js → rich-text-link-control-Bn-QsIS6.js} +1 -1
  231. package/dist/client/assets/{roles-0e4U7If5.js → roles-DX_ap2B0.js} +1 -1
  232. package/dist/client/assets/{route-B5ZmPhcw.js → route-Bdqr734y.js} +1 -1
  233. package/dist/client/assets/route-Cg6AOuOY.js +1 -0
  234. package/dist/client/assets/{route-ajAF3k6E.js → route-DGhKwFXa.js} +1 -1
  235. package/dist/client/assets/{route-page-header-DEpOaETW.js → route-page-header-DKm5kHtX.js} +1 -1
  236. package/dist/client/assets/{runnable-block-editor-MngLlGqF.js → runnable-block-editor-9i5DpxOA.js} +1 -1
  237. package/dist/client/assets/{sandbox-lifecycle-context-BfUCaKZp.js → sandbox-lifecycle-context-BHn9YFEW.js} +1 -1
  238. package/dist/client/assets/{schema-C2CxTC2d.js → schema-FDf70VFI.js} +1 -1
  239. package/dist/client/assets/{scroll-area-IfiqBxp0.js → scroll-area-DMmJ7JtI.js} +1 -1
  240. package/dist/client/assets/{search-input-_eiEHUe0.js → search-input-BHVk6m6A.js} +1 -1
  241. package/dist/client/assets/{search-toggle-Stpj_aWt.js → search-toggle-CCC7TvwN.js} +1 -1
  242. package/dist/client/assets/{secrets-CDqpILuq.js → secrets-BNtrMaDs.js} +1 -1
  243. package/dist/client/assets/{sections-editor-BBGWhCb9.js → sections-editor-HtflyYMM.js} +1 -1
  244. package/dist/client/assets/{select-47N7H1PV.js → select-DBfOOW9i.js} +1 -1
  245. package/dist/client/assets/{select-model-BCgtIi3z.js → select-model-2C5Fdpra.js} +1 -1
  246. package/dist/client/assets/{seo-editor-BrPfy2aB.js → seo-editor-CFULobkJ.js} +1 -1
  247. package/dist/client/assets/{separator-BlNapRt2.js → separator-8fswVHAH.js} +1 -1
  248. package/dist/client/assets/{settings-tab-Dx5o1dO5.js → settings-tab-s3d5MtS-.js} +1 -1
  249. package/dist/client/assets/{sheet-CvV2x5yz.js → sheet-DWSThpSZ.js} +1 -1
  250. package/dist/client/assets/{shell-layout-BMyUKhgs.js → shell-layout-BQnbNNla.js} +1 -1
  251. package/dist/client/assets/{sidebar-BMWTk3Ss.js → sidebar-CoC2_Nad.js} +1 -1
  252. package/dist/client/assets/{skill-preview-CqDKvwdL.js → skill-preview-QgrtYNqp.js} +1 -1
  253. package/dist/client/assets/{skills-CXSauL5l.js → skills-BVINvlqv.js} +1 -1
  254. package/dist/client/assets/{sso-yxBZIEQo.js → sso-CSqM_F3b.js} +1 -1
  255. package/dist/client/assets/{store-t7yAo4iS.js → store-DBNpNTVQ.js} +1 -1
  256. package/dist/client/assets/store-registry-DLmFNBij.js +2 -0
  257. package/dist/client/assets/{switch-DUPW32_G.js → switch-BIfmgDHS.js} +1 -1
  258. package/dist/client/assets/{synced-repos-DWXwM86N.js → synced-repos-CG_pm_Ch.js} +1 -1
  259. package/dist/client/assets/{table-D1-dnD05.js → table-CEVOOGGz.js} +1 -1
  260. package/dist/client/assets/{tabs-uJDG1LT-.js → tabs-Dd0IWElc.js} +1 -1
  261. package/dist/client/assets/{task-board-iF-5OywY.js → task-board-Dip4Wu9j.js} +1 -1
  262. package/dist/client/assets/{task-route-D4VqZZFU.js → task-route-SKFoAFiU.js} +1 -1
  263. package/dist/client/assets/{task-status-CUfsYmVV.js → task-status-k7EGfTLN.js} +1 -1
  264. package/dist/client/assets/{taskboard-analytics-C0r-zgde.js → taskboard-analytics-C3lk9wb7.js} +1 -1
  265. package/dist/client/assets/tasks-Sl_c9zFF.js +1 -0
  266. package/dist/client/assets/{tasks-Dig9WuPL.js → tasks-ebQIYdwz.js} +1 -1
  267. package/dist/client/assets/{textarea-DbE6fIU0.js → textarea-D5v3ol7T.js} +1 -1
  268. package/dist/client/assets/{thread-button-DcS2EMEc.js → thread-button-C3YUAV-G.js} +1 -1
  269. package/dist/client/assets/{thread-intent-CnRICyzb.js → thread-intent-CTSjhfEo.js} +1 -1
  270. package/dist/client/assets/{thread-route-D_e3Th_q.js → thread-route-B57JfaL5.js} +1 -1
  271. package/dist/client/assets/{thread-route-CTwlz0m2.js → thread-route-CHwqHPf_.js} +1 -1
  272. package/dist/client/assets/{thread-sheet-body-BPOqWNL-.js → thread-sheet-body-Hqh1hVbj.js} +1 -1
  273. package/dist/client/assets/{toggle-group-ofCffann.js → toggle-group-CwAn2mKr.js} +1 -1
  274. package/dist/client/assets/{toolbar-icon-button-DPZ8v-BD.js → toolbar-icon-button-ChZE-2zp.js} +1 -1
  275. package/dist/client/assets/{tooltip-BGb6Kdym.js → tooltip-nr5oS_bm.js} +1 -1
  276. package/dist/client/assets/{track-BtbUodA4.js → track-BDYWN4z3.js} +1 -1
  277. package/dist/client/assets/{types-CyZPxJ7C.js → types-7UQ7SDxU.js} +1 -1
  278. package/dist/client/assets/{usage-stats-UqDPk1rl.js → usage-stats-YafP0g9G.js} +1 -1
  279. package/dist/client/assets/{use-ai-providers-Cxi0vxkS.js → use-ai-providers-D-abiIwe.js} +1 -1
  280. package/dist/client/assets/{use-automations-CbK79XsB.js → use-automations-D_y1YNke.js} +1 -1
  281. package/dist/client/assets/{use-autosave-BEIVrcUg.js → use-autosave-z8cIzzdm.js} +1 -1
  282. package/dist/client/assets/{use-connect-companion-B3ql1eAJ.js → use-connect-companion-jQzCS0Na.js} +1 -1
  283. package/dist/client/assets/{use-connection-C2XMAF5j.js → use-connection-BKZRi94S.js} +1 -1
  284. package/dist/client/assets/{use-copy-BhRM5JUh.js → use-copy-Cp_DyXH6.js} +1 -1
  285. package/dist/client/assets/{use-create-virtual-mcp-CZM9_2b6.js → use-create-virtual-mcp-nvoTomrD.js} +1 -1
  286. package/dist/client/assets/{use-date-fns-locale-bOp1dUM9.js → use-date-fns-locale-CNoKSvxx.js} +1 -1
  287. package/dist/client/assets/{use-debounced-autosave-DwFjgR25.js → use-debounced-autosave-B0HBbqeX.js} +1 -1
  288. package/dist/client/assets/{use-debounced-value-CoGGtS8x.js → use-debounced-value-BgYHDTDk.js} +1 -1
  289. package/dist/client/assets/{use-deco-credits-CKQJlHZi.js → use-deco-credits-CqbkXgA9.js} +1 -1
  290. package/dist/client/assets/{use-decopilot-events-CuJ7CkFw.js → use-decopilot-events-qaEKsixC.js} +1 -1
  291. package/dist/client/assets/{use-delete-connection-BF9eR-10.js → use-delete-connection-CqvqqWgS.js} +1 -1
  292. package/dist/client/assets/{use-deployment-admin-5L_GV7bf.js → use-deployment-admin-DzkF6L4b.js} +1 -1
  293. package/dist/client/assets/{use-entitlements-BGdUcutE.js → use-entitlements-kPr6KRf9.js} +1 -1
  294. package/dist/client/assets/{use-fast-preview-draft-url-JPVt7oTt.js → use-fast-preview-draft-url-BBBDyhsD.js} +1 -1
  295. package/dist/client/assets/{use-file-configs-CrAdkDbm.js → use-file-configs-6ygOocDG.js} +1 -1
  296. package/dist/client/assets/{use-in-settings-CaGFgkXe.js → use-in-settings-BCDqA2EC.js} +1 -1
  297. package/dist/client/assets/{use-infinite-scroll-LXktD04_.js → use-infinite-scroll-D0T36z_V.js} +1 -1
  298. package/dist/client/assets/{use-join-requests-Cju9AeLh.js → use-join-requests-BBovhUnp.js} +1 -1
  299. package/dist/client/assets/{use-main-panel-tabs-C86PuGT_.js → use-main-panel-tabs-BghanH6r.js} +1 -1
  300. package/dist/client/assets/{use-mcp-auth-status-g0Tk-Phb.js → use-mcp-auth-status-h4sAecTI.js} +1 -1
  301. package/dist/client/assets/{use-mcp-client-Br7XFHza.js → use-mcp-client-B_gcvvCy.js} +1 -1
  302. package/dist/client/assets/{use-mcp-prompts-C6590AFl.js → use-mcp-prompts-DfSKL4Gu.js} +1 -1
  303. package/dist/client/assets/{use-mcp-tools-DpaWZTAA.js → use-mcp-tools-DC47roTz.js} +1 -1
  304. package/dist/client/assets/{use-members-buh6Kqlm.js → use-members-C6brpkJ1.js} +1 -1
  305. package/dist/client/assets/{use-mobile-DVkjqQzh.js → use-mobile-BZ15DgEB.js} +1 -1
  306. package/dist/client/assets/{use-navigate-to-agent-LXQlcEnV.js → use-navigate-to-agent-B8SXI0oO.js} +1 -1
  307. package/dist/client/assets/{use-open-billing-url-Bage8zng.js → use-open-billing-url-BAg3ZeFq.js} +1 -1
  308. package/dist/client/assets/{use-org-auth-client-cknSmCL5.js → use-org-auth-client-8fDIgHEZ.js} +1 -1
  309. package/dist/client/assets/{use-org-fs-CJMhF9AL.js → use-org-fs-Bf6n51Xm.js} +1 -1
  310. package/dist/client/assets/{use-org-repo-syncs-D2u9tZI_.js → use-org-repo-syncs-CnBqiATM.js} +1 -1
  311. package/dist/client/assets/{use-org-sso-zl0gtui9.js → use-org-sso-QeqdMaIa.js} +1 -1
  312. package/dist/client/assets/{use-organization-roles-DUhOIBRz.js → use-organization-roles-tuKknI1K.js} +1 -1
  313. package/dist/client/assets/{use-organization-settings-DalrVcZ1.js → use-organization-settings-DvtBymY3.js} +1 -1
  314. package/dist/client/assets/{use-panel-navigate-DMG8fP2m.js → use-panel-navigate-IItrbgmN.js} +1 -1
  315. package/dist/client/assets/{use-project-native-view-presence-DB5jQXqg.js → use-project-native-view-presence-WwnxvZuP.js} +1 -1
  316. package/dist/client/assets/{use-project-scope-_WcnrAA6.js → use-project-scope-CCxyXvEU.js} +1 -1
  317. package/dist/client/assets/{use-registry-connections-BQknTkkv.js → use-registry-connections-Bd4wJHbx.js} +1 -1
  318. package/dist/client/assets/{use-releases-CKVB62Nw.js → use-releases-DZvNer89.js} +1 -1
  319. package/dist/client/assets/{use-reports-diagnostic-BezpL0wm.js → use-reports-diagnostic-BeTEI2FZ.js} +1 -1
  320. package/dist/client/assets/{use-route-default-main-fIaACxCL.js → use-route-default-main-BhbKsXCz.js} +1 -1
  321. package/dist/client/assets/{use-secrets-BN4lI9QI.js → use-secrets-Bq9yyXHE.js} +1 -1
  322. package/dist/client/assets/{use-section-preview-base-UXUDJdZU.js → use-section-preview-base--XbKHK2U.js} +1 -1
  323. package/dist/client/assets/{use-session-runtime-CGqfWswP.js → use-session-runtime-B5wMaHtP.js} +1 -1
  324. package/dist/client/assets/{use-tags-DUoR_C2Q.js → use-tags-Do2tDPSO.js} +1 -1
  325. package/dist/client/assets/{use-task-board-analytics-C5PpaVy-.js → use-task-board-analytics-MK_Z2cUq.js} +1 -1
  326. package/dist/client/assets/{use-task-metadata-Cd-4aUjL.js → use-task-metadata-CQjLXps1.js} +1 -1
  327. package/dist/client/assets/{use-thread-outputs-B1ptcJGL.js → use-thread-outputs-DYukUH5N.js} +1 -1
  328. package/dist/client/assets/{use-view-mode-IY2Xk-sG.js → use-view-mode-BEPkb8x0.js} +1 -1
  329. package/dist/client/assets/{use-virtual-mcp-CmFx7CJY.js → use-virtual-mcp-Ji9vcgUj.js} +1 -1
  330. package/dist/client/assets/useInfiniteQuery-CzQJkRT9.js +1 -0
  331. package/dist/client/assets/{useQueries-D09LYNgo.js → useQueries-D0xhxw7a.js} +1 -1
  332. package/dist/client/assets/useSuspenseInfiniteQuery-D9iG0Y5m.js +1 -0
  333. package/dist/client/assets/{users-Cd0bupzj.js → users-DzwkCv2F.js} +1 -1
  334. package/dist/client/assets/{utils-Bn3HByb8.js → utils-y2q6u6PK.js} +1 -1
  335. package/dist/client/assets/{variant-calendar-BKkugrKM.js → variant-calendar-D1R9xk7D.js} +1 -1
  336. package/dist/client/assets/{variant-matcher-override-dOY9vOi0.js → variant-matcher-override-qHzE4baz.js} +1 -1
  337. package/dist/client/assets/{view-mode-toggle-HCiL8YHS.js → view-mode-toggle-Ca0bFull.js} +1 -1
  338. package/dist/client/assets/{virtual-mcp-BaEt1QHH.js → virtual-mcp-Dji-1ojO.js} +1 -1
  339. package/dist/client/index.html +2 -2
  340. package/dist/server/cli.js +3 -3
  341. package/dist/server/server.js +3 -3
  342. package/package.json +1 -1
  343. package/dist/client/assets/agent-app-DZehCYZl.js +0 -1
  344. package/dist/client/assets/agent-deck-BVRxo7rJ.js +0 -1
  345. package/dist/client/assets/agent-file-CoPjYzW3.js +0 -1
  346. package/dist/client/assets/agent-library-file-DLEwy6vn.js +0 -1
  347. package/dist/client/assets/agent-settings-Cw8w6Gap.js +0 -1
  348. package/dist/client/assets/agent-site-editor-code-B1APLc6I.js +0 -2
  349. package/dist/client/assets/agent-view-DVRDYkCo.js +0 -1
  350. package/dist/client/assets/api-keys-DMJLQGyU.js +0 -1
  351. package/dist/client/assets/app-editor-CxVdHjkp.js +0 -1
  352. package/dist/client/assets/project-reports-bArXCdyS.js +0 -1
  353. package/dist/client/assets/project-tasks-CK2bx81L.js +0 -1
  354. package/dist/client/assets/record-editor-Bf769MFv.js +0 -1
  355. package/dist/client/assets/registry-lIOKlNUJ.js +0 -2
  356. package/dist/client/assets/reports-CXzE7a39.js +0 -1
  357. package/dist/client/assets/route-FGDifUW3.js +0 -1
  358. package/dist/client/assets/store-registry-BsImLhdC.js +0 -2
  359. package/dist/client/assets/tasks-C5Yiiaae.js +0 -1
  360. package/dist/client/assets/useInfiniteQuery-KPKjfQBF.js +0 -1
  361. package/dist/client/assets/useSuspenseInfiniteQuery-97L-Gf2j.js +0 -1
@@ -1 +1 @@
1
- import{r as i,j as t,bo as o}from"./index-BiU3YmQL.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
1
+ import{r as i,j as t,bo as o}from"./index-EcuFIS2a.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
@@ -1 +1 @@
1
- import{r as s,bt as L,bu as q,j as d,es as B,bo as x,bm as E,eq as K,bp as C,er as _,dj as T,bF as w,bE as U,bJ as V}from"./index-BiU3YmQL.js";var I="Radio",[z,P]=w(I),[H,J]=z(I),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":j(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var g="RadioIndicator",G=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=J(g,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});G.displayName=g;var W="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=W;function j(t){return t?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=w(y,[_,P]),A=_(),N=P(),[Q,Z]=Y(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=A(o),u=L(R),[b,h]=q({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(B,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=A(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=M;var $="RadioGroupIndicator",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(G,{...e,...n,ref:c})});O.displayName=$;var oe=D,re=F,te=O;export{re as I,oe as R,te as a};
1
+ import{r as s,bt as L,bu as q,j as d,es as B,bo as x,bm as E,eq as K,bp as C,er as _,dj as T,bF as w,bE as U,bJ as V}from"./index-EcuFIS2a.js";var I="Radio",[z,P]=w(I),[H,J]=z(I),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":j(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var g="RadioIndicator",G=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=J(g,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});G.displayName=g;var W="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=W;function j(t){return t?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=w(y,[_,P]),A=_(),N=P(),[Q,Z]=Y(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=A(o),u=L(R),[b,h]=q({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(B,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=A(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=M;var $="RadioGroupIndicator",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(G,{...e,...n,ref:c})});O.displayName=$;var oe=D,re=F,te=O;export{re as I,oe as R,te as a};
@@ -1 +1 @@
1
- import{c,f as p,ah as u,j as s,aK as x,N as a}from"./index-BiU3YmQL.js";import{C as j}from"./capability-load-error-HRK6520w.js";function d(){const t=c.c(21);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:f}=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(f){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("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{d as default};
1
+ import{c,f as p,ah as u,j as s,aK as x,N as a}from"./index-EcuFIS2a.js";import{C as j}from"./capability-load-error-BVb3VEU2.js";function d(){const t=c.c(21);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:f}=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(f){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("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{d as default};
@@ -1 +1 @@
1
- import{dp as g,dG as d,dH as v}from"./index-BiU3YmQL.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{dp as g,dG as d,dH as v}from"./index-EcuFIS2a.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{eM as Ge,co as Gt,r as S,f7 as ie,aO as Yt,c as Q,j as o,fr as Ht,b as Rt,ft as Xt,fu as Jt,fv as $t,eL as K,dW as de,B as Lt,aP as ae}from"./index-BiU3YmQL.js";import{i as Qt}from"./CreditCard01-C7PO4dVs.js";import{n as Ct}from"./LinkExternal01-uHE64k_w.js";import{B as ne}from"./badge-BMuU0t5h.js";import{M as er}from"./multi-select-DlCEHd3Z.js";import{S as tr,d as rr,c as nr,a as ir,b as ar}from"./select-47N7H1PV.js";import{e as sr,a as or,b as Ye,T as C,d as lr,c as ee}from"./table-D1-dnD05.js";import{aw as cr,ax as _t,ay as ur,az as fr,aA as dr,aB as mr,aC as gr,aD as yr,P as pr,aE as ue,aF as br,J as D,aG as hr,W as vr,aa as fe,aH as kt,z as G,aI as jr,aJ as xr,j as He,aK as Sr,aL as Or,v as wr,x as Pr,at as Br,Z as Ar,D as se,_ as Tr,r as Dr,ac as Er,aM as Nr,aN as qr,aO as Mr,aP as Ir,aQ as Rr,aR as Lr,aS as _r,aT as kr,aU as Ur,aV as Fr,C as Wr,X as Kr,Y as zr,aW as Vr}from"./CartesianChart-D-MpJhL1.js";import{R as Zr,S as Gr}from"./Sector-Cztbz-wz.js";import{A as Yr,a as Hr}from"./AreaChart-7E6DaaEO.js";import{R as Xr}from"./require-capability-CimSbmsz.js";import"./checkbox-BoN76eap.js";import"./ChevronUp-Djmy8s04.js";import"./command-bqq51nHs.js";import"./index-Bxbv_23l.js";import"./dialog-yUWKJPsU.js";import"./X-BmPcW1eb.js";import"./SearchMd-C0e2gT30.js";import"./popover-QnaOlHhb.js";import"./index-DAWDSRE3.js";import"./index-CLlrN2I7.js";import"./access-gate-C720AIcS.js";import"./capability-load-error-HRK6520w.js";var me={},ge={},Xe;function Jr(){return Xe||(Xe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const a=new Map;for(let s=0;s<r.length;s++){const l=r[s],f=n(l,s,r);a.has(f)||a.set(f,l)}return Array.from(a.values())}e.uniqBy=t})(ge)),ge}var ye={},Je;function $r(){return Je||(Je=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...a){return r.apply(this,a.slice(0,n))}}e.ary=t})(ye)),ye}var pe={},$e;function Ut(){return $e||($e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(pe)),pe}var be={},he={},Qe;function Qr(){return Qe||(Qe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(he)),he}var Ce;function Cr(){return Ce||(Ce=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cr(),r=Qr();function n(a){return r.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=n})(be)),be}var ve={},je={},et;function en(){return et||(et=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_t();function r(n){return function(a){return t.get(a,n)}}e.property=r})(je)),je}var xe={},Se={},Oe={},we={},tt;function Ft(){return tt||(tt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(we)),we}var rt;function tn(){return rt||(rt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ur(),r=Ft(),n=fr();function a(u,i,d){return typeof d!="function"?a(u,i,()=>{}):s(u,i,function b(m,p,v,c,h,x){const w=d(m,p,v,c,h,x);return w!==void 0?!!w:s(m,p,b,x)},new Map)}function s(u,i,d,b){if(i===u)return!0;switch(typeof i){case"object":return l(u,i,d,b);case"function":return Object.keys(i).length>0?s(u,{...i},d,b):n.isEqualsSameValueZero(u,i);default:return t.isObject(u)?typeof i=="string"?i==="":!0:n.isEqualsSameValueZero(u,i)}}function l(u,i,d,b){if(i==null)return!0;if(Array.isArray(i))return g(u,i,d,b);if(i instanceof Map)return f(u,i,d,b);if(i instanceof Set)return y(u,i,d,b);const m=Object.keys(i);if(u==null||r.isPrimitive(u))return m.length===0;if(m.length===0)return!0;if(b?.has(i))return b.get(i)===u;b?.set(i,u);try{for(let p=0;p<m.length;p++){const v=m[p];if(!r.isPrimitive(u)&&!(v in u)||i[v]===void 0&&u[v]!==void 0||i[v]===null&&u[v]!==null||!d(u[v],i[v],v,u,i,b))return!1}return!0}finally{b?.delete(i)}}function f(u,i,d,b){if(i.size===0)return!0;if(!(u instanceof Map))return!1;for(const[m,p]of i.entries()){const v=u.get(m);if(d(v,p,m,u,i,b)===!1)return!1}return!0}function g(u,i,d,b){if(i.length===0)return!0;if(!Array.isArray(u))return!1;const m=new Set;for(let p=0;p<i.length;p++){const v=i[p];let c=!1;for(let h=0;h<u.length;h++){if(m.has(h))continue;const x=u[h];let w=!1;if(d(x,v,p,u,i,b)&&(w=!0),w){m.add(h),c=!0;break}}if(!c)return!1}return!0}function y(u,i,d,b){return i.size===0?!0:u instanceof Set?g([...u],[...i],d,b):!1}e.isMatchWith=a,e.isSetMatch=y})(Oe)),Oe}var nt;function Wt(){return nt||(nt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tn();function r(n,a){return t.isMatchWith(n,a,()=>{})}e.isMatch=r})(Se)),Se}var Pe={},Be={},Ae={},it;function rn(){return it||(it=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Ae)),Ae}var Te={},at;function Ve(){return at||(at=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Te)),Te}var De={},st;function Kt(){return st||(st=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",s="[object Arguments]",l="[object Symbol]",f="[object Date]",g="[object Map]",y="[object Set]",u="[object Array]",i="[object Function]",d="[object ArrayBuffer]",b="[object Object]",m="[object Error]",p="[object DataView]",v="[object Uint8Array]",c="[object Uint8ClampedArray]",h="[object Uint16Array]",x="[object Uint32Array]",w="[object BigUint64Array]",O="[object Int8Array]",P="[object Int16Array]",T="[object Int32Array]",A="[object BigInt64Array]",_="[object Float32Array]",U="[object Float64Array]";e.argumentsTag=s,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=A,e.bigUint64ArrayTag=w,e.booleanTag=a,e.dataViewTag=p,e.dateTag=f,e.errorTag=m,e.float32ArrayTag=_,e.float64ArrayTag=U,e.functionTag=i,e.int16ArrayTag=P,e.int32ArrayTag=T,e.int8ArrayTag=O,e.mapTag=g,e.numberTag=n,e.objectTag=b,e.regexpTag=t,e.setTag=y,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=h,e.uint32ArrayTag=x,e.uint8ArrayTag=v,e.uint8ClampedArrayTag=c})(De)),De}var Ee={},Ne={},ot;function nn(){return ot||(ot=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof Ge=="object"&&Ge||(function(){return this})()||Function("return this")();e.globalThis=t})(Ne)),Ne}var lt;function an(){return lt||(lt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nn();function r(n){return typeof t.globalThis.Buffer<"u"&&t.globalThis.Buffer.isBuffer(n)}e.isBuffer=r})(Ee)),Ee}var qe={},ct;function sn(){return ct||(ct=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(qe)),qe}var ut;function zt(){return ut||(ut=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rn(),r=Ve(),n=Kt(),a=an(),s=Ft(),l=sn();function f(i,d){return g(i,void 0,i,new Map,d)}function g(i,d,b,m=new Map,p=void 0){const v=p?.(i,d,b,m);if(v!==void 0)return v;if(s.isPrimitive(i))return i;if(m.has(i))return m.get(i);if(Array.isArray(i)){const c=new Array(i.length);m.set(i,c);for(let h=0;h<i.length;h++)c[h]=g(i[h],h,b,m,p);return Object.hasOwn(i,"index")&&(c.index=i.index),Object.hasOwn(i,"input")&&(c.input=i.input),c}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const c=new RegExp(i.source,i.flags);return c.lastIndex=i.lastIndex,c}if(i instanceof Map){const c=new Map;m.set(i,c);for(const[h,x]of i)c.set(h,g(x,h,b,m,p));return c}if(i instanceof Set){const c=new Set;m.set(i,c);for(const h of i)c.add(g(h,void 0,b,m,p));return c}if(a.isBuffer(i))return i.subarray();if(l.isTypedArray(i)){const c=new(Object.getPrototypeOf(i)).constructor(i.length);m.set(i,c);for(let h=0;h<i.length;h++)c[h]=g(i[h],h,b,m,p);return c}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const c=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return m.set(i,c),y(c,i,b,m,p),c}if(typeof File<"u"&&i instanceof File){const c=new File([i],i.name,{type:i.type});return m.set(i,c),y(c,i,b,m,p),c}if(typeof Blob<"u"&&i instanceof Blob){const c=new Blob([i],{type:i.type});return m.set(i,c),y(c,i,b,m,p),c}if(i instanceof Error){const c=structuredClone(i);return m.set(i,c),c.message=i.message,c.name=i.name,c.stack=i.stack,c.cause=i.cause,c.constructor=i.constructor,y(c,i,b,m,p),c}if(i instanceof Boolean){const c=new Boolean(i.valueOf());return m.set(i,c),y(c,i,b,m,p),c}if(i instanceof Number){const c=new Number(i.valueOf());return m.set(i,c),y(c,i,b,m,p),c}if(i instanceof String){const c=new String(i.valueOf());return m.set(i,c),y(c,i,b,m,p),c}if(typeof i=="object"&&u(i)){const c=Object.create(Object.getPrototypeOf(i));return m.set(i,c),y(c,i,b,m,p),c}return i}function y(i,d,b=i,m,p){const v=[...Object.keys(d),...t.getSymbols(d)];for(let c=0;c<v.length;c++){const h=v[c],x=Object.getOwnPropertyDescriptor(i,h);(x==null||x.writable)&&(i[h]=g(d[h],h,b,m,p))}}function u(i){switch(r.getTag(i)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=f,e.cloneDeepWithImpl=g,e.copyProperties=y})(Be)),Be}var ft;function on(){return ft||(ft=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zt();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Pe)),Pe}var dt;function ln(){return dt||(dt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wt(),r=on();function n(a){return a=r.cloneDeep(a),s=>t.isMatch(s,a)}e.matches=n})(xe)),xe}var Me={},Ie={},Re={},mt;function cn(){return mt||(mt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zt(),r=Ve(),n=Kt();function a(s,l){return t.cloneDeepWith(s,(f,g,y,u)=>{const i=l?.(f,g,y,u);if(i!==void 0)return i;if(typeof s=="object"){if(r.getTag(s)===n.objectTag&&typeof s.constructor!="function"){const d={};return u.set(s,d),t.copyProperties(d,s,y,u),d}switch(Object.prototype.toString.call(s)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new s.constructor(s?.valueOf());return t.copyProperties(d,s),d}case n.argumentsTag:{const d={};return t.copyProperties(d,s),d.length=s.length,d[Symbol.iterator]=s[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=a})(Re)),Re}var gt;function un(){return gt||(gt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cn();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Ie)),Ie}var Le={},_e={},yt;function fn(){return yt||(yt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ve();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(_e)),_e}var pt;function dn(){return pt||(pt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dr(),r=gr(),n=fn(),a=mr();function s(l,f){let g;if(Array.isArray(f)?g=f:typeof f=="string"&&t.isDeepKey(f)&&l?.[f]==null?g=a.toPath(f):g=[f],g.length===0)return!1;let y=l;for(let u=0;u<g.length;u++){const i=g[u];if((y==null||!Object.hasOwn(y,i))&&!((Array.isArray(y)||n.isArguments(y))&&r.isIndex(i)&&i<y.length))return!1;y=y[i]}return!0}e.has=s})(Le)),Le}var bt;function mn(){return bt||(bt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wt(),r=yr(),n=un(),a=_t(),s=dn();function l(f,g){switch(typeof f){case"object":{Object.is(f?.valueOf(),-0)&&(f="-0");break}case"number":{f=r.toKey(f);break}}return g=n.cloneDeep(g),function(y){const u=a.get(y,f);return u===void 0?s.has(y,f):g===void 0?u===void 0:t.isMatch(u,g)}}e.matchesProperty=l})(Me)),Me}var ht;function gn(){return ht||(ht=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ut(),r=en(),n=ln(),a=mn();function s(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?a.matchesProperty(l[0],l[1]):n.matches(l);case"string":case"symbol":case"number":return r.property(l)}}e.iteratee=s})(ve)),ve}var vt;function yn(){return vt||(vt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jr(),r=$r(),n=Ut(),a=Cr(),s=gn();function l(f,g=n.identity){return a.isArrayLikeObject(f)?t.uniqBy(Array.from(f),r.ary(s.iteratee(g),1)):[]}e.uniqBy=l})(me)),me}var ke,jt;function pn(){return jt||(jt=1,ke=yn().uniqBy),ke}var bn=pn();const xt=Gt(bn);function hn(e,t,r){return t===!0?xt(e,r):typeof t=="function"?xt(e,t):e}var oe=1;function vn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(a=>{if(a!=null){var s=a.getBoundingClientRect(),l={height:s.height,left:s.left,top:s.top,width:s.width};(Math.abs(l.height-t.height)>oe||Math.abs(l.left-t.left)>oe||Math.abs(l.top-t.top)>oe||Math.abs(l.width-t.width)>oe)&&r({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},We.apply(null,arguments)}function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?St(Object(r),!0).forEach(function(n){jn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jn(e,t,r){return(t=xn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xn(e){var t=Sn(e,"string");return typeof t=="symbol"?t:t+""}function Sn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function On(e){return Array.isArray(e)&&ue(e[0])&&ue(e[1])?e.join(" ~ "):e}var J={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function wn(e,t){return t==null?e:br(e,t)}var Pn=e=>{var{separator:t=J.separator,contentStyle:r,itemStyle:n,labelStyle:a=J.labelStyle,payload:s,formatter:l,itemSorter:f,wrapperClassName:g,labelClassName:y,label:u,labelFormatter:i,accessibilityLayer:d=J.accessibilityLayer}=e,b=()=>{if(s&&s.length){var O={padding:0,margin:0},P=wn(s,f),T=P.map((A,_)=>{if(!A||A.type==="none")return null;var U=A.formatter||l||On,{value:E,name:N}=A,R=E,q=N;if(U){var M=U(E,N,A,_,s);if(Array.isArray(M))[R,q]=M;else if(M!=null)R=M;else return null}var k=te(te({},J.itemStyle),{},{color:A.color||J.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(_),style:k},ue(q)?S.createElement("span",{className:"recharts-tooltip-item-name"},q):null,ue(q)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},R),S.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:O},T)}return null},m=te(te({},J.contentStyle),r),p=te({margin:0},a),v=!pr(u),c=v?u:"",h=ie("recharts-default-tooltip",g),x=ie("recharts-tooltip-label",y);v&&i&&s!==void 0&&s!==null&&(c=i(u,s));var w=d?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",We({className:h,style:m},w),S.createElement("p",{className:x,style:p},S.isValidElement(c)?c:"".concat(c)),b())},re="recharts-tooltip-wrapper",Bn={visibility:"hidden"};function An(e){var{coordinate:t,translateX:r,translateY:n}=e;return ie(re,{["".concat(re,"-right")]:D(r)&&t&&D(t.x)&&r>=t.x,["".concat(re,"-left")]:D(r)&&t&&D(t.x)&&r<t.x,["".concat(re,"-bottom")]:D(n)&&t&&D(t.y)&&n>=t.y,["".concat(re,"-top")]:D(n)&&t&&D(t.y)&&n<t.y})}function Ot(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:a,position:s,reverseDirection:l,tooltipDimension:f,viewBox:g,viewBoxDimension:y}=e;if(s&&D(s[n]))return s[n];var u=r[n]-f-(a>0?a:0),i=r[n]+a;if(t[n])return l[n]?u:i;var d=g[n];if(d==null)return 0;if(l[n]){var b=u,m=d;return b<m?Math.max(i,d):Math.max(u,d)}if(y==null)return 0;var p=i+f,v=d+y;return p>v?Math.max(u,d):Math.max(i,d)}function Tn(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Dn(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:a,position:s,reverseDirection:l,tooltipBox:f,useTranslate3d:g,viewBox:y}=e,u,i,d;return f.height>0&&f.width>0&&r?(i=Ot({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:s,reverseDirection:l,tooltipDimension:f.width,viewBox:y,viewBoxDimension:y.width}),d=Ot({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:s,reverseDirection:l,tooltipDimension:f.height,viewBox:y,viewBoxDimension:y.height}),u=Tn({translateX:i,translateY:d,useTranslate3d:g})):u=Bn,{cssProperties:u,cssClasses:An({translateX:i,translateY:d,coordinate:r})}}function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wt(Object(r),!0).forEach(function(n){En(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function En(e,t,r){return(t=Nn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e){var t=qn(e,"string");return typeof t=="symbol"?t:t+""}function qn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mn(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function In(e){var t,r,n,a,s,l,f=hr(),[g,y]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var m=p=>{if(p.key==="Escape"){var v,c,h,x;y({dismissed:!0,dismissedAtCoordinate:{x:(v=(c=e.coordinate)===null||c===void 0?void 0:c.x)!==null&&v!==void 0?v:0,y:(h=(x=e.coordinate)===null||x===void 0?void 0:x.y)!==null&&h!==void 0?h:0}})}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),g.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==g.dismissedAtCoordinate.x||((s=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&s!==void 0?s:0)!==g.dismissedAtCoordinate.y)&&y($($({},g),{},{dismissed:!1}));var{cssClasses:u,cssProperties:i}=Dn({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),d=e.hasPortalFromProps?{}:$($({transition:Mn({prefersReducedMotion:f,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},i),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=$($({},d),{},{visibility:!g.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:u,style:b,ref:e.innerRef},e.children)}var Rn=S.memo(In),Ln=["x","y","top","left","width","height","className"];function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ke.apply(null,arguments)}function Pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pt(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(e,t,r){return(t=Un(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Un(e){var t=Fn(e,"string");return typeof t=="symbol"?t:t+""}function Fn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wn(e,t){if(e==null)return{};var r,n,a=Kn(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Kn(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var zn=(e,t,r,n,a,s)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(s,",").concat(t,"h").concat(r),Vn=e=>{var{x:t=0,y:r=0,top:n=0,left:a=0,width:s=0,height:l=0,className:f}=e,g=Wn(e,Ln),y=_n({x:t,y:r,top:n,left:a,width:s,height:l},g);return!D(t)||!D(r)||!D(s)||!D(l)||!D(n)||!D(a)?null:S.createElement("path",Ke({},vr(y),{className:ie("recharts-cross",f),d:zn(t,r,s,l,n,a)}))};function Zn(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Vt(e){var{cx:t,cy:r,radius:n,startAngle:a,endAngle:s}=e,l=fe(t,r,n,a),f=fe(t,r,n,s);return{points:[l,f],cx:t,cy:r,radius:n,startAngle:a,endAngle:s}}function Gn(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(kt(t)){if(e==="centric"){var{cx:n,cy:a,innerRadius:s,outerRadius:l,angle:f}=t,g=fe(n,a,s,f),y=fe(n,a,l,f);return[{x:g.x,y:g.y},{x:y.x,y:y.y}]}return Vt(t)}}function Bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bt(Object(r),!0).forEach(function(n){Yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yn(e,t,r){return(t=Hn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hn(e){var t=Xn(e,"string");return typeof t=="symbol"?t:t+""}function Xn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jn=()=>G(Sr),$n=()=>{var e=Jn(),t=G(jr),r=G(xr);return!e||!r?He(void 0,t):He(At(At({},e),{},{scale:r}),t)};function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ze.apply(null,arguments)}function Tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tt(Object(r),!0).forEach(function(n){Qn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qn(e,t,r){return(t=Cn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cn(e){var t=ei(e,"string");return typeof t=="symbol"?t:t+""}function ei(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ti(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function ri(e){var t,{coordinate:r,payload:n,index:a,offset:s,tooltipAxisBandSize:l,layout:f,cursor:g,tooltipEventType:y,chartName:u}=e,i=r,d=n,b=a;if(!g||!i||u!=="ScatterChart"&&y!=="axis")return null;var m,p,v;if(u==="ScatterChart")m=i,p=Vn,v=se.cursorLine;else if(u==="BarChart")m=Zn(f,i,s,l),p=Zr,v=se.cursorRectangle;else if(f==="radial"&&kt(i)){var{cx:c,cy:h,radius:x,startAngle:w,endAngle:O}=Vt(i);m={cx:c,cy:h,startAngle:w,endAngle:O,innerRadius:x,outerRadius:x},p=Gr,v=se.cursorLine}else m={points:Gn(f,i,s)},p=Tr,v=se.cursorLine;var P=typeof g=="object"&&"className"in g?g.className:void 0,T=le(le(le(le({stroke:"#ccc",pointerEvents:"none"},s),m),Br(g)),{},{payload:d,payloadIndex:b,className:ie("recharts-tooltip-cursor",P)});return S.createElement(Ar,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:v},S.createElement(ti,{cursor:g,cursorComp:p,cursorProps:T}))}function ni(e){var t=$n(),r=Or(),n=wr(),a=Pr();return t==null||r==null||n==null||a==null?null:S.createElement(ri,ze({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}function Dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dt(Object(r),!0).forEach(function(n){ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ii(e,t,r){return(t=ai(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ai(e){var t=si(e,"string");return typeof t=="symbol"?t:t+""}function si(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oi(e){return e.dataKey}function li(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(Pn,t)}var Nt=[],ci={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function ui(e){var t,r,n=Dr(e,ci),{active:a,allowEscapeViewBox:s,animationDuration:l,animationEasing:f,content:g,filterNull:y,isAnimationActive:u,offset:i,payloadUniqBy:d,position:b,reverseDirection:m,useTranslate3d:p,wrapperStyle:v,cursor:c,shared:h,trigger:x,defaultIndex:w,portal:O,axisId:P}=n,T=Er(),A=typeof w=="number"?String(w):w;S.useEffect(()=>{T(Nr({shared:h,trigger:x,axisId:P,active:a,defaultIndex:A}))},[T,h,x,P,a,A]);var _=qr(),U=Mr(),E=Ir(h),{activeIndex:N,isActive:R}=(t=G(B=>Rr(B,E,x,A)))!==null&&t!==void 0?t:{},q=G(B=>Lr(B,E,x,A)),M=G(B=>_r(B,E,x,A)),k=G(B=>kr(B,E,x,A)),z=q,F=Ur(),I=(r=a??R)!==null&&r!==void 0?r:!1,[Y,W]=vn([z,I]),V=E==="axis"?M:void 0;Fr(E,x,k,V,N,I);var Z=O??F;if(Z==null||_==null||E==null)return null;var L=z??Nt;I||(L=Nt),y&&L.length&&(L=hn(L.filter(B=>B.value!=null&&(B.hide!==!0||n.includeHidden)),d,oi));var H=L.length>0,X=Et(Et({},n),{},{payload:L,label:V,active:I,activeIndex:N,coordinate:k,accessibilityLayer:U}),j=S.createElement(Rn,{allowEscapeViewBox:s,animationDuration:l,animationEasing:f,isAnimationActive:u,active:I,coordinate:k,hasPayload:H,offset:i,position:b,reverseDirection:m,useTranslate3d:p,viewBox:_,wrapperStyle:v,lastBoundingBox:Y,innerRef:W,hasPortalFromProps:!!O},li(g,X));return S.createElement(S.Fragment,null,Yt.createPortal(j,Z),I&&S.createElement(ni,{cursor:c,tooltipEventType:E,coordinate:k,payload:L,index:N}))}const Ze=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),qt=["B","KB","MB","GB","TB","PB"];function Zt(e){if(e<=0)return"0 B";const t=Math.min(qt.length-1,Math.floor(Math.log(e)/Math.log(1024))),r=e/1024**t;return`${r.toFixed(r>=100||t===0?0:1)} ${qt[t]}`}const Ue=50,fi="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",di=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Mt(e){return new Date(`${e.slice(0,10)}T00:00:00Z`)}function mi(){const e=new Date;return Array.from({length:12},(t,r)=>{const n=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()-r,1));return{value:n.toISOString().slice(0,10),label:n.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function gi(e){return new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function It(e){const t=Q.c(30),{usage:r,metric:n,colorNum:a,formatValue:s,height:l}=e,f=`var(--chart-${a})`,g=`infra-billing-${n}`;let y;t[0]!==r?(y=r.map(yi),t[0]=r,t[1]=y):y=t[1];const u=y;let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i={left:0,right:4,top:8,bottom:0},t[2]=i):i=t[2];let d,b;t[3]!==f?(d=o.jsx("stop",{offset:"0%",stopColor:f,stopOpacity:.25}),b=o.jsx("stop",{offset:"100%",stopColor:f,stopOpacity:0}),t[3]=f,t[4]=d,t[5]=b):(d=t[4],b=t[5]);let m;t[6]!==g||t[7]!==d||t[8]!==b?(m=o.jsx("defs",{children:o.jsxs("linearGradient",{id:g,x1:"0",y1:"0",x2:"0",y2:"1",children:[d,b]})}),t[6]=g,t[7]=d,t[8]=b,t[9]=m):m=t[9];let p;t[10]!==s||t[11]!==l?(p=l>100&&o.jsxs(o.Fragment,{children:[o.jsx(Wr,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),o.jsx(Kr,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),o.jsx(zr,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:s,width:68})]}),t[10]=s,t[11]=l,t[12]=p):p=t[12];let v,c;t[13]===Symbol.for("react.memo_cache_sentinel")?(v={stroke:"var(--border)",strokeDasharray:"4 4"},c={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},t[13]=v,t[14]=c):(v=t[13],c=t[14]);let h;t[15]!==s?(h=o.jsx(ui,{cursor:v,contentStyle:c,formatter:T=>s(Number(T)||0)}),t[15]=s,t[16]=h):h=t[16];const x=`url(#${g})`;let w;t[17]!==f||t[18]!==n||t[19]!==x?(w=o.jsx(Yr,{type:"linear",dataKey:n,stroke:f,strokeWidth:2,fill:x,dot:!1}),t[17]=f,t[18]=n,t[19]=x,t[20]=w):w=t[20];let O;t[21]!==u||t[22]!==w||t[23]!==m||t[24]!==p||t[25]!==h?(O=o.jsxs(Hr,{data:u,margin:i,children:[m,p,h,w]}),t[21]=u,t[22]=w,t[23]=m,t[24]=p,t[25]=h,t[26]=O):O=t[26];let P;return t[27]!==l||t[28]!==O?(P=o.jsx(Vr,{width:"100%",height:l,children:O}),t[27]=l,t[28]=O,t[29]=P):P=t[29],P}function yi(e){return{...e,label:gi(e.date)}}function ce(e,t){return e.reduce((r,n)=>r+n[t],0)}function pi(){const e=Q.c(47),t=Rt(),{sites:r,isLoading:n}=Xt(),[a,s]=S.useState(null),l=mi(),[f,g]=S.useState(l[0].value);let y;e[0]!==a||e[1]!==r?(y=a??r.slice(0,Ue),e[0]=a,e[1]=r,e[2]=y):y=e[2];const u=y,i=!a&&r.length>Ue,{data:d,isLoading:b}=Jt(u,f),m=$t();if(n){let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(ae,{className:"h-64 w-full"}),e[3]=j):j=e[3],j}if(r.length===0){let j;e[4]!==t?(j=t("settings.infraBilling.noSites"),e[4]=t,e[5]=j):j=e[5];let B;return e[6]!==j?(B=o.jsx(K,{className:"p-6 text-sm text-muted-foreground",children:j}),e[6]=j,e[7]=B):B=e[7],B}const p=d?.usage??[],v=d?.pageviewsAvailable??!1,c=!!d&&!d.usageUnavailable,h=(j,B)=>c?B(ce(p,j)):"—",x=[{key:"pageviews",title:t("settings.infraBilling.pageviews"),description:t("settings.infraBilling.pageviewsDescription"),colorNum:1,total:v&&c?Ze.format(ce(p,"pageviews")):"—"},{key:"requests",title:t("settings.infraBilling.requests"),description:t("settings.infraBilling.requestsDescription"),colorNum:2,total:h("requests",Si)},{key:"dataTransferBytes",title:t("settings.infraBilling.dataTransfer"),description:t("settings.infraBilling.dataTransferDescription"),colorNum:3,total:h("dataTransferBytes",Zt)}],w=ji,O=d?.billing??null;let P;e[8]!==O?.invoices?(P=O?.invoices??[],e[8]=O?.invoices,e[9]=P):P=e[9];let T;e[10]!==P?(T=P.some(vi),e[10]=P,e[11]=T):T=e[11];const A=T,_=ce(p,"pageviews"),U=_>0?ce(p,"requests")/_:0,E=v&&c&&_>0?U.toFixed(U<10?1:0):"—";let N;e[12]!==t?(N=t("settings.infraBilling.multipleTeams"),e[12]=t,e[13]=N):N=e[13];let R;e[14]!==t?(R=t("settings.infraBilling.noTeam"),e[14]=t,e[15]=R):R=e[15];let q;e[16]!==t?(q=t("settings.infraBilling.partialTeam"),e[16]=t,e[17]=q):q=e[17];let M;e[18]!==t?(M=t("settings.infraBilling.billingUnavailable"),e[18]=t,e[19]=M):M=e[19];let k;e[20]!==N||e[21]!==R||e[22]!==q||e[23]!==M?(k={multiple_teams:N,no_team:R,partial_team:q,unavailable:M},e[20]=N,e[21]=R,e[22]=q,e[23]=M,e[24]=k):k=e[24];const z=k[d?.billingUnavailableReason??"multiple_teams"];let F;e[25]!==r?(F=r.map(hi),e[25]=r,e[26]=F):F=e[26];let I;e[27]!==t?(I=t("settings.infraBilling.siteLabel"),e[27]=t,e[28]=I):I=e[28];let Y;e[29]!==u||e[30]!==F||e[31]!==I?(Y=o.jsx(er,{className:"w-auto min-w-56 max-w-full",options:F,defaultValue:u,maxCount:2,placeholder:I,onValueChange:s}),e[29]=u,e[30]=F,e[31]=I,e[32]=Y):Y=e[32];let W;e[33]!==t?(W=t("settings.infraBilling.monthLabel"),e[33]=t,e[34]=W):W=e[34];let V;e[35]===Symbol.for("react.memo_cache_sentinel")?(V=o.jsx(ir,{}),e[35]=V):V=e[35];let Z;e[36]!==W?(Z=o.jsx(ar,{className:"w-48","aria-label":W,children:V}),e[36]=W,e[37]=Z):Z=e[37];let L;e[38]!==u.length||e[39]!==t?(L=u.length===0&&o.jsx(K,{className:"mx-4 p-4 text-sm text-muted-foreground",children:t("settings.infraBilling.pickASite")}),e[38]=u.length,e[39]=t,e[40]=L):L=e[40];let H;e[41]!==t||e[42]!==i?(H=i&&o.jsx(K,{className:"mx-4 p-4 text-sm text-muted-foreground",children:t("settings.infraBilling.tooManySites",{count:String(Ue)})}),e[41]=t,e[42]=i,e[43]=H):H=e[43];let X;return e[44]!==d?.usageUnavailable||e[45]!==t?(X=d?.usageUnavailable&&o.jsx(K,{className:"mx-4 p-4 text-sm text-muted-foreground",children:t("settings.infraBilling.warehouseUnavailable")}),e[44]=d?.usageUnavailable,e[45]=t,e[46]=X):X=e[46],o.jsxs("div",{className:"flex flex-col gap-8",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[Y,o.jsxs(tr,{value:f,onValueChange:g,children:[Z,o.jsx(rr,{children:l.map(bi)})]})]}),L,H,X,u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(de,{title:t("settings.infraBilling.summaryTitle"),children:o.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[o.jsxs(K,{className:"flex-1 flex flex-col gap-4 p-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Qt,{size:16,className:"text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:t("settings.infraBilling.detailsTitle")})]}),O?.canManageSubscription&&o.jsx(Lt,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>m.mutate(u),children:t("settings.infraBilling.manageButton")})]}),o.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[O?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx("span",{className:"text-muted-foreground",children:t("settings.infraBilling.currentPlan")}),b?o.jsx(ae,{className:"h-5 w-16"}):o.jsx(ne,{variant:O.planType==="free"?"secondary":"success",children:t(`settings.infraBilling.plan.${O.planType}`)})]}),o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx("span",{className:"text-muted-foreground",children:t("settings.infraBilling.nextBilling")}),o.jsx("span",{className:"font-medium tabular-nums",children:O.nextBillingDate?new Date(`${O.nextBillingDate}T00:00:00Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}):"—"})]})]}):!b&&o.jsx("p",{className:"text-xs text-muted-foreground",children:z}),o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx("span",{className:"text-muted-foreground",children:t("settings.infraBilling.requestsPerPageview")}),o.jsx("span",{className:"font-medium tabular-nums",children:E})]})]})]}),x.map(j=>o.jsxs(K,{className:"flex-1 flex flex-col gap-2 p-4",children:[o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[o.jsx("span",{className:"text-sm font-medium",children:j.title}),o.jsx("span",{className:"text-xs text-muted-foreground",children:l.find(B=>B.value===f)?.label})]}),b?o.jsx(ae,{className:"h-8 w-24"}):o.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:j.total}),o.jsx("div",{className:"-mx-2",children:o.jsx(It,{usage:p,metric:j.key,colorNum:j.colorNum,formatValue:w(j.key),height:64})})]},j.key))]})}),o.jsx(de,{title:t("settings.infraBilling.metricsTitle"),children:o.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:x.map(j=>o.jsxs(K,{className:"flex-1 flex flex-col gap-3 p-4",children:[o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("span",{className:"text-sm font-medium",children:j.title}),o.jsx("span",{className:"text-xs text-muted-foreground",children:j.description})]}),o.jsx(It,{usage:p,metric:j.key,colorNum:j.colorNum,formatValue:w(j.key),height:220})]},j.key))})}),o.jsx(de,{title:t("settings.infraBilling.invoicesTitle"),children:o.jsx(K,{className:"mx-4 overflow-x-auto",children:d?(O?.invoices.length??0)===0?o.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:O?t("settings.infraBilling.noInvoices"):z}):o.jsxs(sr,{children:[o.jsx(or,{children:o.jsxs(Ye,{children:[o.jsx(C,{children:t("settings.infraBilling.invoiceReference")}),o.jsx(C,{children:t("settings.infraBilling.invoiceDue")}),o.jsx(C,{children:t("settings.infraBilling.invoiceAmount")}),o.jsx(C,{children:t("settings.infraBilling.invoiceStatus")}),o.jsx(C,{children:t("settings.infraBilling.invoiceDocuments")})]})}),o.jsx(lr,{children:(O?.invoices??[]).map(j=>o.jsxs(Ye,{children:[o.jsx(ee,{children:j.referenceMonth?Mt(j.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),o.jsx(ee,{children:j.dueDate?Mt(j.dueDate).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}):"—"}),o.jsx(ee,{className:"tabular-nums",children:di.format(j.value)}),o.jsx(ee,{children:o.jsx(Oi,{status:j.status})}),o.jsxs(ee,{className:"flex gap-2",children:[j.nfUrl&&o.jsx(Fe,{href:j.nfUrl,label:t("settings.infraBilling.invoiceNf")}),j.bankSlipUrl&&o.jsx(Fe,{href:j.bankSlipUrl,label:t("settings.infraBilling.invoiceBankSlip")}),!j.bankSlipUrl&&!A&&j.nfUrl&&o.jsx(Fe,{href:fi,label:t("settings.infraBilling.invoiceBankTransfer")}),!j.nfUrl&&!j.bankSlipUrl&&"—"]})]},j.id))})]}):o.jsx(ae,{className:"m-4 h-24"})})})]})]})}function bi(e){return o.jsx(nr,{value:e.value,children:e.label},e.value)}function hi(e){return{label:e,value:e}}function vi(e){return!!e.bankSlipUrl}function ji(e){return e==="dataTransferBytes"?Zt:xi}function xi(e){return Ze.format(e)}function Si(e){return Ze.format(e)}function Fe(e){const t=Q.c(4),{href:r,label:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Ct,{size:14}),t[0]=a):a=t[0];let s;return t[1]!==r||t[2]!==n?(s=o.jsx(Lt,{variant:"outline",size:"sm",asChild:!0,children:o.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",children:[a,n]})}),t[1]=r,t[2]=n,t[3]=s):s=t[3],s}function Oi(e){const t=Q.c(14),{status:r}=e,n=Rt(),a=r.toLowerCase();if(a==="paid"){let l;t[0]!==n?(l=n("settings.infraBilling.statusPaid"),t[0]=n,t[1]=l):l=t[1];let f;return t[2]!==l?(f=o.jsx(ne,{variant:"success",children:l}),t[2]=l,t[3]=f):f=t[3],f}if(a==="overdue"){let l;t[4]!==n?(l=n("settings.infraBilling.statusOverdue"),t[4]=n,t[5]=l):l=t[5];let f;return t[6]!==l?(f=o.jsx(ne,{variant:"destructive",children:l}),t[6]=l,t[7]=f):f=t[7],f}if(a==="registered"){let l;t[8]!==n?(l=n("settings.infraBilling.statusPending"),t[8]=n,t[9]=l):l=t[9];let f;return t[10]!==l?(f=o.jsx(ne,{variant:"warning",children:l}),t[10]=l,t[11]=f):f=t[11],f}let s;return t[12]!==r?(s=o.jsx(ne,{variant:"secondary",children:r}),t[12]=r,t[13]=s):s=t[13],s}function wi(){const e=Q.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(Ht,{group:"billing",children:o.jsx(pi,{})}),e[0]=t):t=e[0],t}function Hi(){const e=Q.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(Xr,{capability:"members:manage",area:"billing",children:o.jsx(wi,{})}),e[0]=t):t=e[0],t}export{Hi as default};
1
+ import{eM as Ge,co as Gt,r as S,f7 as ie,aO as Yt,c as Q,j as o,fr as Ht,b as Rt,ft as Xt,fu as Jt,fv as $t,eL as K,dW as de,B as Lt,aP as ae}from"./index-EcuFIS2a.js";import{i as Qt}from"./CreditCard01-CIt471eG.js";import{n as Ct}from"./LinkExternal01-DQD59o7F.js";import{B as ne}from"./badge-C5M6nZd4.js";import{M as er}from"./multi-select-CYKeAXVo.js";import{S as tr,d as rr,c as nr,a as ir,b as ar}from"./select-DBfOOW9i.js";import{e as sr,a as or,b as Ye,T as C,d as lr,c as ee}from"./table-CEVOOGGz.js";import{aw as cr,ax as _t,ay as ur,az as fr,aA as dr,aB as mr,aC as gr,aD as yr,P as pr,aE as ue,aF as br,J as D,aG as hr,W as vr,aa as fe,aH as kt,z as G,aI as jr,aJ as xr,j as He,aK as Sr,aL as Or,v as wr,x as Pr,at as Br,Z as Ar,D as se,_ as Tr,r as Dr,ac as Er,aM as Nr,aN as qr,aO as Mr,aP as Ir,aQ as Rr,aR as Lr,aS as _r,aT as kr,aU as Ur,aV as Fr,C as Wr,X as Kr,Y as zr,aW as Vr}from"./CartesianChart-BbOaLmfq.js";import{R as Zr,S as Gr}from"./Sector-wViCnB96.js";import{A as Yr,a as Hr}from"./AreaChart-BSJ08P7a.js";import{R as Xr}from"./require-capability-gpVnF6U4.js";import"./checkbox-iGlb02v9.js";import"./ChevronUp-fg9sod-H.js";import"./command-CZcxzTcw.js";import"./index-C97O3ClY.js";import"./dialog-AoC07APJ.js";import"./X-BtMi8Qau.js";import"./SearchMd-Bb5gjLcX.js";import"./popover-Bff85VlI.js";import"./index-Exw_Yjch.js";import"./index-0-s9o3tr.js";import"./access-gate-C9Dl5e5c.js";import"./capability-load-error-BVb3VEU2.js";var me={},ge={},Xe;function Jr(){return Xe||(Xe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const a=new Map;for(let s=0;s<r.length;s++){const l=r[s],f=n(l,s,r);a.has(f)||a.set(f,l)}return Array.from(a.values())}e.uniqBy=t})(ge)),ge}var ye={},Je;function $r(){return Je||(Je=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...a){return r.apply(this,a.slice(0,n))}}e.ary=t})(ye)),ye}var pe={},$e;function Ut(){return $e||($e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(pe)),pe}var be={},he={},Qe;function Qr(){return Qe||(Qe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(he)),he}var Ce;function Cr(){return Ce||(Ce=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cr(),r=Qr();function n(a){return r.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=n})(be)),be}var ve={},je={},et;function en(){return et||(et=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_t();function r(n){return function(a){return t.get(a,n)}}e.property=r})(je)),je}var xe={},Se={},Oe={},we={},tt;function Ft(){return tt||(tt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(we)),we}var rt;function tn(){return rt||(rt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ur(),r=Ft(),n=fr();function a(u,i,d){return typeof d!="function"?a(u,i,()=>{}):s(u,i,function b(m,p,v,c,h,x){const w=d(m,p,v,c,h,x);return w!==void 0?!!w:s(m,p,b,x)},new Map)}function s(u,i,d,b){if(i===u)return!0;switch(typeof i){case"object":return l(u,i,d,b);case"function":return Object.keys(i).length>0?s(u,{...i},d,b):n.isEqualsSameValueZero(u,i);default:return t.isObject(u)?typeof i=="string"?i==="":!0:n.isEqualsSameValueZero(u,i)}}function l(u,i,d,b){if(i==null)return!0;if(Array.isArray(i))return g(u,i,d,b);if(i instanceof Map)return f(u,i,d,b);if(i instanceof Set)return y(u,i,d,b);const m=Object.keys(i);if(u==null||r.isPrimitive(u))return m.length===0;if(m.length===0)return!0;if(b?.has(i))return b.get(i)===u;b?.set(i,u);try{for(let p=0;p<m.length;p++){const v=m[p];if(!r.isPrimitive(u)&&!(v in u)||i[v]===void 0&&u[v]!==void 0||i[v]===null&&u[v]!==null||!d(u[v],i[v],v,u,i,b))return!1}return!0}finally{b?.delete(i)}}function f(u,i,d,b){if(i.size===0)return!0;if(!(u instanceof Map))return!1;for(const[m,p]of i.entries()){const v=u.get(m);if(d(v,p,m,u,i,b)===!1)return!1}return!0}function g(u,i,d,b){if(i.length===0)return!0;if(!Array.isArray(u))return!1;const m=new Set;for(let p=0;p<i.length;p++){const v=i[p];let c=!1;for(let h=0;h<u.length;h++){if(m.has(h))continue;const x=u[h];let w=!1;if(d(x,v,p,u,i,b)&&(w=!0),w){m.add(h),c=!0;break}}if(!c)return!1}return!0}function y(u,i,d,b){return i.size===0?!0:u instanceof Set?g([...u],[...i],d,b):!1}e.isMatchWith=a,e.isSetMatch=y})(Oe)),Oe}var nt;function Wt(){return nt||(nt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tn();function r(n,a){return t.isMatchWith(n,a,()=>{})}e.isMatch=r})(Se)),Se}var Pe={},Be={},Ae={},it;function rn(){return it||(it=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Ae)),Ae}var Te={},at;function Ve(){return at||(at=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Te)),Te}var De={},st;function Kt(){return st||(st=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",s="[object Arguments]",l="[object Symbol]",f="[object Date]",g="[object Map]",y="[object Set]",u="[object Array]",i="[object Function]",d="[object ArrayBuffer]",b="[object Object]",m="[object Error]",p="[object DataView]",v="[object Uint8Array]",c="[object Uint8ClampedArray]",h="[object Uint16Array]",x="[object Uint32Array]",w="[object BigUint64Array]",O="[object Int8Array]",P="[object Int16Array]",T="[object Int32Array]",A="[object BigInt64Array]",_="[object Float32Array]",U="[object Float64Array]";e.argumentsTag=s,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=A,e.bigUint64ArrayTag=w,e.booleanTag=a,e.dataViewTag=p,e.dateTag=f,e.errorTag=m,e.float32ArrayTag=_,e.float64ArrayTag=U,e.functionTag=i,e.int16ArrayTag=P,e.int32ArrayTag=T,e.int8ArrayTag=O,e.mapTag=g,e.numberTag=n,e.objectTag=b,e.regexpTag=t,e.setTag=y,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=h,e.uint32ArrayTag=x,e.uint8ArrayTag=v,e.uint8ClampedArrayTag=c})(De)),De}var Ee={},Ne={},ot;function nn(){return ot||(ot=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof Ge=="object"&&Ge||(function(){return this})()||Function("return this")();e.globalThis=t})(Ne)),Ne}var lt;function an(){return lt||(lt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nn();function r(n){return typeof t.globalThis.Buffer<"u"&&t.globalThis.Buffer.isBuffer(n)}e.isBuffer=r})(Ee)),Ee}var qe={},ct;function sn(){return ct||(ct=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(qe)),qe}var ut;function zt(){return ut||(ut=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rn(),r=Ve(),n=Kt(),a=an(),s=Ft(),l=sn();function f(i,d){return g(i,void 0,i,new Map,d)}function g(i,d,b,m=new Map,p=void 0){const v=p?.(i,d,b,m);if(v!==void 0)return v;if(s.isPrimitive(i))return i;if(m.has(i))return m.get(i);if(Array.isArray(i)){const c=new Array(i.length);m.set(i,c);for(let h=0;h<i.length;h++)c[h]=g(i[h],h,b,m,p);return Object.hasOwn(i,"index")&&(c.index=i.index),Object.hasOwn(i,"input")&&(c.input=i.input),c}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const c=new RegExp(i.source,i.flags);return c.lastIndex=i.lastIndex,c}if(i instanceof Map){const c=new Map;m.set(i,c);for(const[h,x]of i)c.set(h,g(x,h,b,m,p));return c}if(i instanceof Set){const c=new Set;m.set(i,c);for(const h of i)c.add(g(h,void 0,b,m,p));return c}if(a.isBuffer(i))return i.subarray();if(l.isTypedArray(i)){const c=new(Object.getPrototypeOf(i)).constructor(i.length);m.set(i,c);for(let h=0;h<i.length;h++)c[h]=g(i[h],h,b,m,p);return c}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const c=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return m.set(i,c),y(c,i,b,m,p),c}if(typeof File<"u"&&i instanceof File){const c=new File([i],i.name,{type:i.type});return m.set(i,c),y(c,i,b,m,p),c}if(typeof Blob<"u"&&i instanceof Blob){const c=new Blob([i],{type:i.type});return m.set(i,c),y(c,i,b,m,p),c}if(i instanceof Error){const c=structuredClone(i);return m.set(i,c),c.message=i.message,c.name=i.name,c.stack=i.stack,c.cause=i.cause,c.constructor=i.constructor,y(c,i,b,m,p),c}if(i instanceof Boolean){const c=new Boolean(i.valueOf());return m.set(i,c),y(c,i,b,m,p),c}if(i instanceof Number){const c=new Number(i.valueOf());return m.set(i,c),y(c,i,b,m,p),c}if(i instanceof String){const c=new String(i.valueOf());return m.set(i,c),y(c,i,b,m,p),c}if(typeof i=="object"&&u(i)){const c=Object.create(Object.getPrototypeOf(i));return m.set(i,c),y(c,i,b,m,p),c}return i}function y(i,d,b=i,m,p){const v=[...Object.keys(d),...t.getSymbols(d)];for(let c=0;c<v.length;c++){const h=v[c],x=Object.getOwnPropertyDescriptor(i,h);(x==null||x.writable)&&(i[h]=g(d[h],h,b,m,p))}}function u(i){switch(r.getTag(i)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=f,e.cloneDeepWithImpl=g,e.copyProperties=y})(Be)),Be}var ft;function on(){return ft||(ft=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zt();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Pe)),Pe}var dt;function ln(){return dt||(dt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wt(),r=on();function n(a){return a=r.cloneDeep(a),s=>t.isMatch(s,a)}e.matches=n})(xe)),xe}var Me={},Ie={},Re={},mt;function cn(){return mt||(mt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zt(),r=Ve(),n=Kt();function a(s,l){return t.cloneDeepWith(s,(f,g,y,u)=>{const i=l?.(f,g,y,u);if(i!==void 0)return i;if(typeof s=="object"){if(r.getTag(s)===n.objectTag&&typeof s.constructor!="function"){const d={};return u.set(s,d),t.copyProperties(d,s,y,u),d}switch(Object.prototype.toString.call(s)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new s.constructor(s?.valueOf());return t.copyProperties(d,s),d}case n.argumentsTag:{const d={};return t.copyProperties(d,s),d.length=s.length,d[Symbol.iterator]=s[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=a})(Re)),Re}var gt;function un(){return gt||(gt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cn();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Ie)),Ie}var Le={},_e={},yt;function fn(){return yt||(yt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ve();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(_e)),_e}var pt;function dn(){return pt||(pt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dr(),r=gr(),n=fn(),a=mr();function s(l,f){let g;if(Array.isArray(f)?g=f:typeof f=="string"&&t.isDeepKey(f)&&l?.[f]==null?g=a.toPath(f):g=[f],g.length===0)return!1;let y=l;for(let u=0;u<g.length;u++){const i=g[u];if((y==null||!Object.hasOwn(y,i))&&!((Array.isArray(y)||n.isArguments(y))&&r.isIndex(i)&&i<y.length))return!1;y=y[i]}return!0}e.has=s})(Le)),Le}var bt;function mn(){return bt||(bt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wt(),r=yr(),n=un(),a=_t(),s=dn();function l(f,g){switch(typeof f){case"object":{Object.is(f?.valueOf(),-0)&&(f="-0");break}case"number":{f=r.toKey(f);break}}return g=n.cloneDeep(g),function(y){const u=a.get(y,f);return u===void 0?s.has(y,f):g===void 0?u===void 0:t.isMatch(u,g)}}e.matchesProperty=l})(Me)),Me}var ht;function gn(){return ht||(ht=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ut(),r=en(),n=ln(),a=mn();function s(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?a.matchesProperty(l[0],l[1]):n.matches(l);case"string":case"symbol":case"number":return r.property(l)}}e.iteratee=s})(ve)),ve}var vt;function yn(){return vt||(vt=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jr(),r=$r(),n=Ut(),a=Cr(),s=gn();function l(f,g=n.identity){return a.isArrayLikeObject(f)?t.uniqBy(Array.from(f),r.ary(s.iteratee(g),1)):[]}e.uniqBy=l})(me)),me}var ke,jt;function pn(){return jt||(jt=1,ke=yn().uniqBy),ke}var bn=pn();const xt=Gt(bn);function hn(e,t,r){return t===!0?xt(e,r):typeof t=="function"?xt(e,t):e}var oe=1;function vn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(a=>{if(a!=null){var s=a.getBoundingClientRect(),l={height:s.height,left:s.left,top:s.top,width:s.width};(Math.abs(l.height-t.height)>oe||Math.abs(l.left-t.left)>oe||Math.abs(l.top-t.top)>oe||Math.abs(l.width-t.width)>oe)&&r({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},We.apply(null,arguments)}function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?St(Object(r),!0).forEach(function(n){jn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jn(e,t,r){return(t=xn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xn(e){var t=Sn(e,"string");return typeof t=="symbol"?t:t+""}function Sn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function On(e){return Array.isArray(e)&&ue(e[0])&&ue(e[1])?e.join(" ~ "):e}var J={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function wn(e,t){return t==null?e:br(e,t)}var Pn=e=>{var{separator:t=J.separator,contentStyle:r,itemStyle:n,labelStyle:a=J.labelStyle,payload:s,formatter:l,itemSorter:f,wrapperClassName:g,labelClassName:y,label:u,labelFormatter:i,accessibilityLayer:d=J.accessibilityLayer}=e,b=()=>{if(s&&s.length){var O={padding:0,margin:0},P=wn(s,f),T=P.map((A,_)=>{if(!A||A.type==="none")return null;var U=A.formatter||l||On,{value:E,name:N}=A,R=E,q=N;if(U){var M=U(E,N,A,_,s);if(Array.isArray(M))[R,q]=M;else if(M!=null)R=M;else return null}var k=te(te({},J.itemStyle),{},{color:A.color||J.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(_),style:k},ue(q)?S.createElement("span",{className:"recharts-tooltip-item-name"},q):null,ue(q)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},R),S.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:O},T)}return null},m=te(te({},J.contentStyle),r),p=te({margin:0},a),v=!pr(u),c=v?u:"",h=ie("recharts-default-tooltip",g),x=ie("recharts-tooltip-label",y);v&&i&&s!==void 0&&s!==null&&(c=i(u,s));var w=d?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",We({className:h,style:m},w),S.createElement("p",{className:x,style:p},S.isValidElement(c)?c:"".concat(c)),b())},re="recharts-tooltip-wrapper",Bn={visibility:"hidden"};function An(e){var{coordinate:t,translateX:r,translateY:n}=e;return ie(re,{["".concat(re,"-right")]:D(r)&&t&&D(t.x)&&r>=t.x,["".concat(re,"-left")]:D(r)&&t&&D(t.x)&&r<t.x,["".concat(re,"-bottom")]:D(n)&&t&&D(t.y)&&n>=t.y,["".concat(re,"-top")]:D(n)&&t&&D(t.y)&&n<t.y})}function Ot(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:a,position:s,reverseDirection:l,tooltipDimension:f,viewBox:g,viewBoxDimension:y}=e;if(s&&D(s[n]))return s[n];var u=r[n]-f-(a>0?a:0),i=r[n]+a;if(t[n])return l[n]?u:i;var d=g[n];if(d==null)return 0;if(l[n]){var b=u,m=d;return b<m?Math.max(i,d):Math.max(u,d)}if(y==null)return 0;var p=i+f,v=d+y;return p>v?Math.max(u,d):Math.max(i,d)}function Tn(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Dn(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:a,position:s,reverseDirection:l,tooltipBox:f,useTranslate3d:g,viewBox:y}=e,u,i,d;return f.height>0&&f.width>0&&r?(i=Ot({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:s,reverseDirection:l,tooltipDimension:f.width,viewBox:y,viewBoxDimension:y.width}),d=Ot({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:s,reverseDirection:l,tooltipDimension:f.height,viewBox:y,viewBoxDimension:y.height}),u=Tn({translateX:i,translateY:d,useTranslate3d:g})):u=Bn,{cssProperties:u,cssClasses:An({translateX:i,translateY:d,coordinate:r})}}function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wt(Object(r),!0).forEach(function(n){En(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function En(e,t,r){return(t=Nn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e){var t=qn(e,"string");return typeof t=="symbol"?t:t+""}function qn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mn(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function In(e){var t,r,n,a,s,l,f=hr(),[g,y]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var m=p=>{if(p.key==="Escape"){var v,c,h,x;y({dismissed:!0,dismissedAtCoordinate:{x:(v=(c=e.coordinate)===null||c===void 0?void 0:c.x)!==null&&v!==void 0?v:0,y:(h=(x=e.coordinate)===null||x===void 0?void 0:x.y)!==null&&h!==void 0?h:0}})}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),g.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==g.dismissedAtCoordinate.x||((s=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&s!==void 0?s:0)!==g.dismissedAtCoordinate.y)&&y($($({},g),{},{dismissed:!1}));var{cssClasses:u,cssProperties:i}=Dn({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),d=e.hasPortalFromProps?{}:$($({transition:Mn({prefersReducedMotion:f,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},i),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=$($({},d),{},{visibility:!g.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:u,style:b,ref:e.innerRef},e.children)}var Rn=S.memo(In),Ln=["x","y","top","left","width","height","className"];function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ke.apply(null,arguments)}function Pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pt(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(e,t,r){return(t=Un(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Un(e){var t=Fn(e,"string");return typeof t=="symbol"?t:t+""}function Fn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wn(e,t){if(e==null)return{};var r,n,a=Kn(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Kn(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var zn=(e,t,r,n,a,s)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(s,",").concat(t,"h").concat(r),Vn=e=>{var{x:t=0,y:r=0,top:n=0,left:a=0,width:s=0,height:l=0,className:f}=e,g=Wn(e,Ln),y=_n({x:t,y:r,top:n,left:a,width:s,height:l},g);return!D(t)||!D(r)||!D(s)||!D(l)||!D(n)||!D(a)?null:S.createElement("path",Ke({},vr(y),{className:ie("recharts-cross",f),d:zn(t,r,s,l,n,a)}))};function Zn(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Vt(e){var{cx:t,cy:r,radius:n,startAngle:a,endAngle:s}=e,l=fe(t,r,n,a),f=fe(t,r,n,s);return{points:[l,f],cx:t,cy:r,radius:n,startAngle:a,endAngle:s}}function Gn(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(kt(t)){if(e==="centric"){var{cx:n,cy:a,innerRadius:s,outerRadius:l,angle:f}=t,g=fe(n,a,s,f),y=fe(n,a,l,f);return[{x:g.x,y:g.y},{x:y.x,y:y.y}]}return Vt(t)}}function Bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bt(Object(r),!0).forEach(function(n){Yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yn(e,t,r){return(t=Hn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hn(e){var t=Xn(e,"string");return typeof t=="symbol"?t:t+""}function Xn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jn=()=>G(Sr),$n=()=>{var e=Jn(),t=G(jr),r=G(xr);return!e||!r?He(void 0,t):He(At(At({},e),{},{scale:r}),t)};function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ze.apply(null,arguments)}function Tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tt(Object(r),!0).forEach(function(n){Qn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qn(e,t,r){return(t=Cn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cn(e){var t=ei(e,"string");return typeof t=="symbol"?t:t+""}function ei(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ti(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function ri(e){var t,{coordinate:r,payload:n,index:a,offset:s,tooltipAxisBandSize:l,layout:f,cursor:g,tooltipEventType:y,chartName:u}=e,i=r,d=n,b=a;if(!g||!i||u!=="ScatterChart"&&y!=="axis")return null;var m,p,v;if(u==="ScatterChart")m=i,p=Vn,v=se.cursorLine;else if(u==="BarChart")m=Zn(f,i,s,l),p=Zr,v=se.cursorRectangle;else if(f==="radial"&&kt(i)){var{cx:c,cy:h,radius:x,startAngle:w,endAngle:O}=Vt(i);m={cx:c,cy:h,startAngle:w,endAngle:O,innerRadius:x,outerRadius:x},p=Gr,v=se.cursorLine}else m={points:Gn(f,i,s)},p=Tr,v=se.cursorLine;var P=typeof g=="object"&&"className"in g?g.className:void 0,T=le(le(le(le({stroke:"#ccc",pointerEvents:"none"},s),m),Br(g)),{},{payload:d,payloadIndex:b,className:ie("recharts-tooltip-cursor",P)});return S.createElement(Ar,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:v},S.createElement(ti,{cursor:g,cursorComp:p,cursorProps:T}))}function ni(e){var t=$n(),r=Or(),n=wr(),a=Pr();return t==null||r==null||n==null||a==null?null:S.createElement(ri,ze({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}function Dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dt(Object(r),!0).forEach(function(n){ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ii(e,t,r){return(t=ai(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ai(e){var t=si(e,"string");return typeof t=="symbol"?t:t+""}function si(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oi(e){return e.dataKey}function li(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(Pn,t)}var Nt=[],ci={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function ui(e){var t,r,n=Dr(e,ci),{active:a,allowEscapeViewBox:s,animationDuration:l,animationEasing:f,content:g,filterNull:y,isAnimationActive:u,offset:i,payloadUniqBy:d,position:b,reverseDirection:m,useTranslate3d:p,wrapperStyle:v,cursor:c,shared:h,trigger:x,defaultIndex:w,portal:O,axisId:P}=n,T=Er(),A=typeof w=="number"?String(w):w;S.useEffect(()=>{T(Nr({shared:h,trigger:x,axisId:P,active:a,defaultIndex:A}))},[T,h,x,P,a,A]);var _=qr(),U=Mr(),E=Ir(h),{activeIndex:N,isActive:R}=(t=G(B=>Rr(B,E,x,A)))!==null&&t!==void 0?t:{},q=G(B=>Lr(B,E,x,A)),M=G(B=>_r(B,E,x,A)),k=G(B=>kr(B,E,x,A)),z=q,F=Ur(),I=(r=a??R)!==null&&r!==void 0?r:!1,[Y,W]=vn([z,I]),V=E==="axis"?M:void 0;Fr(E,x,k,V,N,I);var Z=O??F;if(Z==null||_==null||E==null)return null;var L=z??Nt;I||(L=Nt),y&&L.length&&(L=hn(L.filter(B=>B.value!=null&&(B.hide!==!0||n.includeHidden)),d,oi));var H=L.length>0,X=Et(Et({},n),{},{payload:L,label:V,active:I,activeIndex:N,coordinate:k,accessibilityLayer:U}),j=S.createElement(Rn,{allowEscapeViewBox:s,animationDuration:l,animationEasing:f,isAnimationActive:u,active:I,coordinate:k,hasPayload:H,offset:i,position:b,reverseDirection:m,useTranslate3d:p,viewBox:_,wrapperStyle:v,lastBoundingBox:Y,innerRef:W,hasPortalFromProps:!!O},li(g,X));return S.createElement(S.Fragment,null,Yt.createPortal(j,Z),I&&S.createElement(ni,{cursor:c,tooltipEventType:E,coordinate:k,payload:L,index:N}))}const Ze=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),qt=["B","KB","MB","GB","TB","PB"];function Zt(e){if(e<=0)return"0 B";const t=Math.min(qt.length-1,Math.floor(Math.log(e)/Math.log(1024))),r=e/1024**t;return`${r.toFixed(r>=100||t===0?0:1)} ${qt[t]}`}const Ue=50,fi="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",di=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Mt(e){return new Date(`${e.slice(0,10)}T00:00:00Z`)}function mi(){const e=new Date;return Array.from({length:12},(t,r)=>{const n=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()-r,1));return{value:n.toISOString().slice(0,10),label:n.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function gi(e){return new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function It(e){const t=Q.c(30),{usage:r,metric:n,colorNum:a,formatValue:s,height:l}=e,f=`var(--chart-${a})`,g=`infra-billing-${n}`;let y;t[0]!==r?(y=r.map(yi),t[0]=r,t[1]=y):y=t[1];const u=y;let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i={left:0,right:4,top:8,bottom:0},t[2]=i):i=t[2];let d,b;t[3]!==f?(d=o.jsx("stop",{offset:"0%",stopColor:f,stopOpacity:.25}),b=o.jsx("stop",{offset:"100%",stopColor:f,stopOpacity:0}),t[3]=f,t[4]=d,t[5]=b):(d=t[4],b=t[5]);let m;t[6]!==g||t[7]!==d||t[8]!==b?(m=o.jsx("defs",{children:o.jsxs("linearGradient",{id:g,x1:"0",y1:"0",x2:"0",y2:"1",children:[d,b]})}),t[6]=g,t[7]=d,t[8]=b,t[9]=m):m=t[9];let p;t[10]!==s||t[11]!==l?(p=l>100&&o.jsxs(o.Fragment,{children:[o.jsx(Wr,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),o.jsx(Kr,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),o.jsx(zr,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:s,width:68})]}),t[10]=s,t[11]=l,t[12]=p):p=t[12];let v,c;t[13]===Symbol.for("react.memo_cache_sentinel")?(v={stroke:"var(--border)",strokeDasharray:"4 4"},c={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},t[13]=v,t[14]=c):(v=t[13],c=t[14]);let h;t[15]!==s?(h=o.jsx(ui,{cursor:v,contentStyle:c,formatter:T=>s(Number(T)||0)}),t[15]=s,t[16]=h):h=t[16];const x=`url(#${g})`;let w;t[17]!==f||t[18]!==n||t[19]!==x?(w=o.jsx(Yr,{type:"linear",dataKey:n,stroke:f,strokeWidth:2,fill:x,dot:!1}),t[17]=f,t[18]=n,t[19]=x,t[20]=w):w=t[20];let O;t[21]!==u||t[22]!==w||t[23]!==m||t[24]!==p||t[25]!==h?(O=o.jsxs(Hr,{data:u,margin:i,children:[m,p,h,w]}),t[21]=u,t[22]=w,t[23]=m,t[24]=p,t[25]=h,t[26]=O):O=t[26];let P;return t[27]!==l||t[28]!==O?(P=o.jsx(Vr,{width:"100%",height:l,children:O}),t[27]=l,t[28]=O,t[29]=P):P=t[29],P}function yi(e){return{...e,label:gi(e.date)}}function ce(e,t){return e.reduce((r,n)=>r+n[t],0)}function pi(){const e=Q.c(47),t=Rt(),{sites:r,isLoading:n}=Xt(),[a,s]=S.useState(null),l=mi(),[f,g]=S.useState(l[0].value);let y;e[0]!==a||e[1]!==r?(y=a??r.slice(0,Ue),e[0]=a,e[1]=r,e[2]=y):y=e[2];const u=y,i=!a&&r.length>Ue,{data:d,isLoading:b}=Jt(u,f),m=$t();if(n){let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(ae,{className:"h-64 w-full"}),e[3]=j):j=e[3],j}if(r.length===0){let j;e[4]!==t?(j=t("settings.infraBilling.noSites"),e[4]=t,e[5]=j):j=e[5];let B;return e[6]!==j?(B=o.jsx(K,{className:"p-6 text-sm text-muted-foreground",children:j}),e[6]=j,e[7]=B):B=e[7],B}const p=d?.usage??[],v=d?.pageviewsAvailable??!1,c=!!d&&!d.usageUnavailable,h=(j,B)=>c?B(ce(p,j)):"—",x=[{key:"pageviews",title:t("settings.infraBilling.pageviews"),description:t("settings.infraBilling.pageviewsDescription"),colorNum:1,total:v&&c?Ze.format(ce(p,"pageviews")):"—"},{key:"requests",title:t("settings.infraBilling.requests"),description:t("settings.infraBilling.requestsDescription"),colorNum:2,total:h("requests",Si)},{key:"dataTransferBytes",title:t("settings.infraBilling.dataTransfer"),description:t("settings.infraBilling.dataTransferDescription"),colorNum:3,total:h("dataTransferBytes",Zt)}],w=ji,O=d?.billing??null;let P;e[8]!==O?.invoices?(P=O?.invoices??[],e[8]=O?.invoices,e[9]=P):P=e[9];let T;e[10]!==P?(T=P.some(vi),e[10]=P,e[11]=T):T=e[11];const A=T,_=ce(p,"pageviews"),U=_>0?ce(p,"requests")/_:0,E=v&&c&&_>0?U.toFixed(U<10?1:0):"—";let N;e[12]!==t?(N=t("settings.infraBilling.multipleTeams"),e[12]=t,e[13]=N):N=e[13];let R;e[14]!==t?(R=t("settings.infraBilling.noTeam"),e[14]=t,e[15]=R):R=e[15];let q;e[16]!==t?(q=t("settings.infraBilling.partialTeam"),e[16]=t,e[17]=q):q=e[17];let M;e[18]!==t?(M=t("settings.infraBilling.billingUnavailable"),e[18]=t,e[19]=M):M=e[19];let k;e[20]!==N||e[21]!==R||e[22]!==q||e[23]!==M?(k={multiple_teams:N,no_team:R,partial_team:q,unavailable:M},e[20]=N,e[21]=R,e[22]=q,e[23]=M,e[24]=k):k=e[24];const z=k[d?.billingUnavailableReason??"multiple_teams"];let F;e[25]!==r?(F=r.map(hi),e[25]=r,e[26]=F):F=e[26];let I;e[27]!==t?(I=t("settings.infraBilling.siteLabel"),e[27]=t,e[28]=I):I=e[28];let Y;e[29]!==u||e[30]!==F||e[31]!==I?(Y=o.jsx(er,{className:"w-auto min-w-56 max-w-full",options:F,defaultValue:u,maxCount:2,placeholder:I,onValueChange:s}),e[29]=u,e[30]=F,e[31]=I,e[32]=Y):Y=e[32];let W;e[33]!==t?(W=t("settings.infraBilling.monthLabel"),e[33]=t,e[34]=W):W=e[34];let V;e[35]===Symbol.for("react.memo_cache_sentinel")?(V=o.jsx(ir,{}),e[35]=V):V=e[35];let Z;e[36]!==W?(Z=o.jsx(ar,{className:"w-48","aria-label":W,children:V}),e[36]=W,e[37]=Z):Z=e[37];let L;e[38]!==u.length||e[39]!==t?(L=u.length===0&&o.jsx(K,{className:"mx-4 p-4 text-sm text-muted-foreground",children:t("settings.infraBilling.pickASite")}),e[38]=u.length,e[39]=t,e[40]=L):L=e[40];let H;e[41]!==t||e[42]!==i?(H=i&&o.jsx(K,{className:"mx-4 p-4 text-sm text-muted-foreground",children:t("settings.infraBilling.tooManySites",{count:String(Ue)})}),e[41]=t,e[42]=i,e[43]=H):H=e[43];let X;return e[44]!==d?.usageUnavailable||e[45]!==t?(X=d?.usageUnavailable&&o.jsx(K,{className:"mx-4 p-4 text-sm text-muted-foreground",children:t("settings.infraBilling.warehouseUnavailable")}),e[44]=d?.usageUnavailable,e[45]=t,e[46]=X):X=e[46],o.jsxs("div",{className:"flex flex-col gap-8",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[Y,o.jsxs(tr,{value:f,onValueChange:g,children:[Z,o.jsx(rr,{children:l.map(bi)})]})]}),L,H,X,u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(de,{title:t("settings.infraBilling.summaryTitle"),children:o.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[o.jsxs(K,{className:"flex-1 flex flex-col gap-4 p-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Qt,{size:16,className:"text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:t("settings.infraBilling.detailsTitle")})]}),O?.canManageSubscription&&o.jsx(Lt,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>m.mutate(u),children:t("settings.infraBilling.manageButton")})]}),o.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[O?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx("span",{className:"text-muted-foreground",children:t("settings.infraBilling.currentPlan")}),b?o.jsx(ae,{className:"h-5 w-16"}):o.jsx(ne,{variant:O.planType==="free"?"secondary":"success",children:t(`settings.infraBilling.plan.${O.planType}`)})]}),o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx("span",{className:"text-muted-foreground",children:t("settings.infraBilling.nextBilling")}),o.jsx("span",{className:"font-medium tabular-nums",children:O.nextBillingDate?new Date(`${O.nextBillingDate}T00:00:00Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}):"—"})]})]}):!b&&o.jsx("p",{className:"text-xs text-muted-foreground",children:z}),o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx("span",{className:"text-muted-foreground",children:t("settings.infraBilling.requestsPerPageview")}),o.jsx("span",{className:"font-medium tabular-nums",children:E})]})]})]}),x.map(j=>o.jsxs(K,{className:"flex-1 flex flex-col gap-2 p-4",children:[o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[o.jsx("span",{className:"text-sm font-medium",children:j.title}),o.jsx("span",{className:"text-xs text-muted-foreground",children:l.find(B=>B.value===f)?.label})]}),b?o.jsx(ae,{className:"h-8 w-24"}):o.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:j.total}),o.jsx("div",{className:"-mx-2",children:o.jsx(It,{usage:p,metric:j.key,colorNum:j.colorNum,formatValue:w(j.key),height:64})})]},j.key))]})}),o.jsx(de,{title:t("settings.infraBilling.metricsTitle"),children:o.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:x.map(j=>o.jsxs(K,{className:"flex-1 flex flex-col gap-3 p-4",children:[o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("span",{className:"text-sm font-medium",children:j.title}),o.jsx("span",{className:"text-xs text-muted-foreground",children:j.description})]}),o.jsx(It,{usage:p,metric:j.key,colorNum:j.colorNum,formatValue:w(j.key),height:220})]},j.key))})}),o.jsx(de,{title:t("settings.infraBilling.invoicesTitle"),children:o.jsx(K,{className:"mx-4 overflow-x-auto",children:d?(O?.invoices.length??0)===0?o.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:O?t("settings.infraBilling.noInvoices"):z}):o.jsxs(sr,{children:[o.jsx(or,{children:o.jsxs(Ye,{children:[o.jsx(C,{children:t("settings.infraBilling.invoiceReference")}),o.jsx(C,{children:t("settings.infraBilling.invoiceDue")}),o.jsx(C,{children:t("settings.infraBilling.invoiceAmount")}),o.jsx(C,{children:t("settings.infraBilling.invoiceStatus")}),o.jsx(C,{children:t("settings.infraBilling.invoiceDocuments")})]})}),o.jsx(lr,{children:(O?.invoices??[]).map(j=>o.jsxs(Ye,{children:[o.jsx(ee,{children:j.referenceMonth?Mt(j.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),o.jsx(ee,{children:j.dueDate?Mt(j.dueDate).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}):"—"}),o.jsx(ee,{className:"tabular-nums",children:di.format(j.value)}),o.jsx(ee,{children:o.jsx(Oi,{status:j.status})}),o.jsxs(ee,{className:"flex gap-2",children:[j.nfUrl&&o.jsx(Fe,{href:j.nfUrl,label:t("settings.infraBilling.invoiceNf")}),j.bankSlipUrl&&o.jsx(Fe,{href:j.bankSlipUrl,label:t("settings.infraBilling.invoiceBankSlip")}),!j.bankSlipUrl&&!A&&j.nfUrl&&o.jsx(Fe,{href:fi,label:t("settings.infraBilling.invoiceBankTransfer")}),!j.nfUrl&&!j.bankSlipUrl&&"—"]})]},j.id))})]}):o.jsx(ae,{className:"m-4 h-24"})})})]})]})}function bi(e){return o.jsx(nr,{value:e.value,children:e.label},e.value)}function hi(e){return{label:e,value:e}}function vi(e){return!!e.bankSlipUrl}function ji(e){return e==="dataTransferBytes"?Zt:xi}function xi(e){return Ze.format(e)}function Si(e){return Ze.format(e)}function Fe(e){const t=Q.c(4),{href:r,label:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Ct,{size:14}),t[0]=a):a=t[0];let s;return t[1]!==r||t[2]!==n?(s=o.jsx(Lt,{variant:"outline",size:"sm",asChild:!0,children:o.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",children:[a,n]})}),t[1]=r,t[2]=n,t[3]=s):s=t[3],s}function Oi(e){const t=Q.c(14),{status:r}=e,n=Rt(),a=r.toLowerCase();if(a==="paid"){let l;t[0]!==n?(l=n("settings.infraBilling.statusPaid"),t[0]=n,t[1]=l):l=t[1];let f;return t[2]!==l?(f=o.jsx(ne,{variant:"success",children:l}),t[2]=l,t[3]=f):f=t[3],f}if(a==="overdue"){let l;t[4]!==n?(l=n("settings.infraBilling.statusOverdue"),t[4]=n,t[5]=l):l=t[5];let f;return t[6]!==l?(f=o.jsx(ne,{variant:"destructive",children:l}),t[6]=l,t[7]=f):f=t[7],f}if(a==="registered"){let l;t[8]!==n?(l=n("settings.infraBilling.statusPending"),t[8]=n,t[9]=l):l=t[9];let f;return t[10]!==l?(f=o.jsx(ne,{variant:"warning",children:l}),t[10]=l,t[11]=f):f=t[11],f}let s;return t[12]!==r?(s=o.jsx(ne,{variant:"secondary",children:r}),t[12]=r,t[13]=s):s=t[13],s}function wi(){const e=Q.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(Ht,{group:"billing",children:o.jsx(pi,{})}),e[0]=t):t=e[0],t}function Hi(){const e=Q.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(Xr,{capability:"members:manage",area:"billing",children:o.jsx(wi,{})}),e[0]=t):t=e[0],t}export{Hi as default};
@@ -1,4 +1,4 @@
1
- import{c as R,b as G,r as L,l as O,j as s,ao as fe,bL as os,ap as be,bN as $e,B as ee,ar as rs,aq as as,bM as Vs,bK as is,x as he,aU as ls,dS as me,dT as st,a6 as cs,e as ds,t as ye,q as X,a0 as we,d as Oe,a9 as Ke,dK as us,T as ps,K as ms,m as fs,I as hs,F as xs,H as gs,G as pe,aR as nt,aS as ot,aT as rt,h as bs,aD as As,aC as vs,an as js,a as ys,_ as ws,$ as Cs,au as ze,R as bt,bT as Ns,aB as Ss}from"./index-BiU3YmQL.js";import{c as ks,d as At,P as Ts,i as Is}from"./index-CuhH8P7u.js";import{K as _s,b as Ds}from"./shell-layout-BMyUKhgs.js";import{a as Ps}from"./use-virtual-mcp-CmFx7CJY.js";import{w as Rs,A as Ms}from"./autosend-CESqNA2a.js";import{s as Es,r as at,i as Fs,c as Ls,w as zs,H as Us}from"./chat-draft-CZ4LRf6I.js";import{u as Bs}from"./use-session-runtime-CGqfWswP.js";import{i as vt}from"./ArrowRight-Cl3bzAIC.js";import{i as jt}from"./ArrowUp-Bmd2w7Fx.js";import{t as Ie,as as $s,a9 as yt,d as Qe,ab as Os,O as Ks,at as Qs,L as wt,j as Ct,au as Nt,x as Ys,av as Gs,aw as qs}from"./agent-icon-DbgbaBWC.js";import{a as St}from"./Image01-Dx7ea-3O.js";import{i as Hs}from"./Upload01-BoLmU8be.js";import{i as Ye}from"./X-BmPcW1eb.js";import{a as Ge,b as Ws,c as _e,i as Zs,k as Js,l as Xs,m as en,n as tn,o as sn,p as nn,q as on,f as rn,u as an,s as Vn,d as ln}from"./chat-context-CHZ5Yehn.js";import{e as cn,z as dn,p as un,c as pn}from"./hooks-GmRpr8h8.js";import{i as mn}from"./AlertCircle-3PzOAmGf.js";import{a as fn}from"./Copy01-BYK2zIkj.js";import{a as Ue,b as qe,d as He,f as We,F as kt}from"./form-D4fabgxt.js";import{c as hn,S as xn,b as gn,a as bn,d as An}from"./select-47N7H1PV.js";import{t as Tt}from"./ChevronUp-Djmy8s04.js";import{T as De,a as Pe,c as Re}from"./tooltip-BGb6Kdym.js";import{i as vn}from"./ArrowLeft-JCMxLp8E.js";import{M as jn,S as yn}from"./usage-stats-UqDPk1rl.js";import{c as wn,b as Cn}from"./tabs-uJDG1LT-.js";import{t as Be}from"./Tool02-Hh7HLEzm.js";import{d as Nn,h as Sn,c as kn,b as Tn,D as In}from"./dialog-yUWKJPsU.js";import{d as Ce,e as _n,b as Dn,f as Pn}from"./use-entitlements-BGdUcutE.js";import{u as Rn}from"./use-deco-credits-CKQJlHZi.js";import{I as Mn}from"./input-4CSpUSQl.js";import{T as Vt,a as En}from"./toggle-group-ofCffann.js";import{s as Fn}from"./tool-namespace-DmnQIdtF.js";import{t as Ln}from"./utils-CVEq3hMx.js";import{u as zn}from"./use-open-billing-url-Bage8zng.js";import{s as Un}from"./XClose-BhXJw65F.js";import{M as Bn,m as Ze,g as $n,a as On}from"./decopilot-BbHxwoKU.js";import{a as It,b as _t,P as Dt}from"./popover-QnaOlHhb.js";import{c as Kn,b as Qn,a as Yn,D as Gn}from"./drawer-CFueQivP.js";import{u as qn}from"./use-mobile-DVkjqQzh.js";import{t as Hn}from"./Stars01-Ch2E4B6o.js";import{d as Wn}from"./use-organization-settings-DalrVcZ1.js";import{u as Pt,c as Zn}from"./use-ai-providers-Cxi0vxkS.js";import{M as Jn}from"./index-CLccaHLm.js";import{p as Rt,u as Xn,T as eo,a as to,U as so}from"./input-CRD8MdDS.js";import{d as no,g as it,s as oo}from"./gateway-client-BqcIzR1f.js";import{u as ro}from"./use-mcp-client-Br7XFHza.js";import{l as ao,g as Vo}from"./use-mcp-prompts-C6590AFl.js";import{i as io}from"./Link01-C-mBEv93.js";import{s as lt}from"./Plus-CoGTSnEd.js";import"./hooks-CzhqOgxt.js";import{p as lo,q as co}from"./question-004-sINsf4GQ.js";import{A as uo}from"./avatar-CsDZ0T22.js";import{u as po}from"./use-members-buh6Kqlm.js";import{F as ct}from"./feature-paywall-CFcsZgv5.js";import{A as mo}from"./add-connection-dialog-DqhI8LLv.js";import{u as fo}from"./use-is-desktop-app-BNujXJc_.js";const Le="cubic-bezier(0.645, 0.045, 0.355, 1)",iV=44,ho={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},xo={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},go={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function ue(t){const e=R.c(69),{icon:n,label:o,count:a,title:V,footerLeft:r,footerRight:i,children:l,defaultExpanded:p,variant:d,onClose:c}=t,u=d===void 0?"default":d,m=G(),[h,f]=L.useState(p),[x,b]=L.useState(!1);let g;e[0]!==c?(g=()=>{b(!0),c?.()},e[0]=c,e[1]=g):g=e[1];const v=g;if(x)return null;const A=xo[u],j=ho[u];let w;e[2]!==A||e[3]!==j?(w=O("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",A,j),e[2]=A,e[3]=j,e[4]=w):w=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>f(bo),e[5]=y):y=e[5];const C=h&&"rounded-b-none",S=!h&&"rounded-b-xl";let N;e[6]!==C||e[7]!==S?(N=O("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",C,S),e[6]=C,e[7]=S,e[8]=N):N=e[8];const _=go[u];let k;e[9]!==_?(k=O("shrink-0",_),e[9]=_,e[10]=k):k=e[10];let P;e[11]!==n||e[12]!==k?(P=s.jsx("span",{className:k,children:n}),e[11]=n,e[12]=k,e[13]=P):P=e[13];let D;e[14]!==o?(D=s.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=D):D=e[15];let M;e[16]!==a?(M=a?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a}):null,e[16]=a,e[17]=M):M=e[17];const E=h?"rotate(180deg)":"rotate(0deg)";let T;e[18]!==E?(T=s.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:s.jsx(Tt,{size:16,style:{transform:E,transition:`transform 180ms ${Le}`}})}),e[18]=E,e[19]=T):T=e[19];let F;e[20]!==m?(F=m("chat.collapsibleHighlight.closeLabel"),e[20]=m,e[21]=F):F=e[21];let U;e[22]!==m?(U=m("chat.collapsibleHighlight.closeTitle"),e[22]=m,e[23]=U):U=e[23];let q,$;e[24]!==v?(q=re=>{re.stopPropagation(),v()},$=re=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),re.stopPropagation(),v())},e[24]=v,e[25]=q,e[26]=$):(q=e[25],$=e[26]);let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ye,{size:16}),e[27]=z):z=e[27];let Q;e[28]!==F||e[29]!==U||e[30]!==q||e[31]!==$?(Q=s.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":F,title:U,onClick:q,onKeyDown:$,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:z}),e[28]=F,e[29]=U,e[30]=q,e[31]=$,e[32]=Q):Q=e[32];let B;e[33]!==h||e[34]!==P||e[35]!==D||e[36]!==M||e[37]!==T||e[38]!==Q||e[39]!==N?(B=s.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:y,className:N,children:[P,D,M,T,Q]}),e[33]=h,e[34]=P,e[35]=D,e[36]=M,e[37]=T,e[38]=Q,e[39]=N,e[40]=B):B=e[40];const te=h?"1fr":"0fr";let J;e[41]!==te?(J={display:"grid",gridTemplateRows:te,transition:`grid-template-rows 180ms ${Le}`},e[41]=te,e[42]=J):J=e[42];let I;e[43]===Symbol.for("react.memo_cache_sentinel")?(I={overflow:"hidden",minHeight:0},e[43]=I):I=e[43];const Y=h?1:0;let H;e[44]!==Y?(H={opacity:Y,transition:`opacity 120ms ${Le}`,maxHeight:"60vh"},e[44]=Y,e[45]=H):H=e[45];let Z;e[46]!==V?(Z=V?s.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:s.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:V})}):s.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=V,e[47]=Z):Z=e[47];let W;e[48]!==l||e[49]!==V?(W=l?s.jsx("div",{className:O("pb-4",!V&&"pt-4"),children:l}):null,e[48]=l,e[49]=V,e[50]=W):W=e[50];let se;e[51]!==Z||e[52]!==W?(se=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Z,W]}),e[51]=Z,e[52]=W,e[53]=se):se=e[53];let ae;e[54]!==r||e[55]!==i?(ae=r||i?s.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:r}),s.jsx("div",{className:"flex items-center gap-2",children:i})]})}):null,e[54]=r,e[55]=i,e[56]=ae):ae=e[56];let Ve;e[57]!==H||e[58]!==se||e[59]!==ae?(Ve=s.jsx("div",{style:I,children:s.jsxs("div",{className:"flex flex-col",style:H,children:[se,ae]})}),e[57]=H,e[58]=se,e[59]=ae,e[60]=Ve):Ve=e[60];let ne;e[61]!==J||e[62]!==Ve?(ne=s.jsx("div",{"data-testid":"collapsible-highlight-body",style:J,children:Ve}),e[61]=J,e[62]=Ve,e[63]=ne):ne=e[63];let ie;return e[64]!==B||e[65]!==ne||e[66]!==w||e[67]!==u?(ie=s.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":u,className:w,children:[B,ne]}),e[64]=B,e[65]=ne,e[66]=w,e[67]=u,e[68]=ie):ie=e[68],ie}function bo(t){return!t}const Ao=fe({content:be().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:$e(["pending","in_progress","completed"]),activeForm:be().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),Mt=fe({todos:os(Ao)}),vo="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";cn({description:vo,inputSchema:dn(Mt),execute:async({todos:t})=>({ok:!0,count:t.length})});const jo="tool-todo_write",yo=new Set(["input-available","output-available"]);function wo(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.role!=="assistant")continue;const o=n.parts;if(Array.isArray(o))for(let a=o.length-1;a>=0;a--){const V=o[a];if(V.type!==jo||typeof V.state!="string"||!yo.has(V.state))continue;const r=Mt.safeParse(V.input);if(r.success)return r.data.todos}}return[]}function Et(t){const e=[];for(const n of t)if("state"in n&&n.state==="approval-requested"&&"approval"in n&&n.approval?.id&&"toolCallId"in n&&n.toolCallId){const o="toolName"in n&&typeof n.toolName=="string"?n.toolName:n.type.startsWith("tool-")?n.type.replace("tool-",""):"Tool";e.push({approvalId:n.approval.id,toolCallId:n.toolCallId,toolName:o,friendlyName:Ln(Fn(o)),input:n.input})}return e}function Ft(t){return t.at(-1)}function Lt(t){const e=[];for(const n of t)n.type==="tool-propose_plan"&&n.state==="input-available"&&e.push({toolCallId:n.toolCallId,plan:n.input.plan,state:n.state});return e}function Co(t){return t?t.message.startsWith("[CREDITS]"):!1}const No={isCreditExhausted:!1,planRefusal:null,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,todos:[]};function So(t){const{messages:e,error:n,finishReason:o,isStreaming:a,isWaitingForApprovals:V}=t;if(!a&&n&&Co(n))return{...No,isCreditExhausted:!0};const r=e.at(-1),i=r?.role==="assistant"?r.parts:[],l=i,d=!!l.filter(j=>j.type==="tool-user_ask").filter(j=>j.state!=="output-available").length,c=Lt(i),u=Et(l),m=wo(e),h=a?null:Es(n),f=a?null:un(n),x=!a&&!!n&&!h&&!f,b=u.length>0||a&&V,g=c.length>0,A=!a&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(d||b||g))&&!x;return{isCreditExhausted:!1,planRefusal:f,subscriptionErrorKind:h,hasTodos:m.length>0,showError:x,showWarning:A,hasApprovals:b,hasPlans:g,isWaitingForUserInput:d,todos:m}}function zt(){const t=R.c(6),{messages:e,error:n,finishReason:o,isStreaming:a,isWaitingForApprovals:V}=Ge(),r=n??null,i=o??null;let l;return t[0]!==a||t[1]!==V||t[2]!==e||t[3]!==r||t[4]!==i?(l=So({messages:e,error:r,finishReason:i,isStreaming:a,isWaitingForApprovals:V}),t[0]=a,t[1]=V,t[2]=e,t[3]=r,t[4]=i,t[5]=l):l=t[5],l}function lV(){const t=zt(),e=Ce("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)}const dt="start-task",ko=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
1
+ import{c as R,b as G,r as L,l as O,j as s,ao as fe,bL as os,ap as be,bN as $e,B as ee,ar as rs,aq as as,bM as Vs,bK as is,x as he,aU as ls,dS as me,dT as st,a6 as cs,e as ds,t as ye,q as X,a0 as we,d as Oe,a9 as Ke,dK as us,T as ps,K as ms,m as fs,I as hs,F as xs,H as gs,G as pe,aR as nt,aS as ot,aT as rt,h as bs,aD as As,aC as vs,an as js,a as ys,_ as ws,$ as Cs,au as ze,R as bt,bT as Ns,aB as Ss}from"./index-EcuFIS2a.js";import{c as ks,d as At,P as Ts,i as Is}from"./index-DyCAAYSx.js";import{K as _s,b as Ds}from"./shell-layout-BQnbNNla.js";import{a as Ps}from"./use-virtual-mcp-Ji9vcgUj.js";import{w as Rs,A as Ms}from"./autosend-CVNOmzPu.js";import{s as Es,r as at,i as Fs,c as Ls,w as zs,H as Us}from"./chat-draft-tDfZTlxU.js";import{u as Bs}from"./use-session-runtime-B5wMaHtP.js";import{i as vt}from"./ArrowRight-DCA5zjxW.js";import{i as jt}from"./ArrowUp-BtksDHBQ.js";import{t as Ie,as as $s,a9 as yt,d as Qe,ab as Os,O as Ks,at as Qs,L as wt,j as Ct,au as Nt,x as Ys,av as Gs,aw as qs}from"./agent-icon-CTsmTxHg.js";import{a as St}from"./Image01-QB6twEDu.js";import{i as Hs}from"./Upload01-Ba-RLxE1.js";import{i as Ye}from"./X-BtMi8Qau.js";import{a as Ge,b as Ws,c as _e,i as Zs,k as Js,l as Xs,m as en,n as tn,o as sn,p as nn,q as on,f as rn,u as an,s as Vn,d as ln}from"./chat-context-ELO8A2Ar.js";import{e as cn,z as dn,p as un,c as pn}from"./hooks-D0dDgrIf.js";import{i as mn}from"./AlertCircle-2L7lI8NL.js";import{a as fn}from"./Copy01-BgwuTJFm.js";import{a as Ue,b as qe,d as He,f as We,F as kt}from"./form-CYsJTpNM.js";import{c as hn,S as xn,b as gn,a as bn,d as An}from"./select-DBfOOW9i.js";import{t as Tt}from"./ChevronUp-fg9sod-H.js";import{T as De,a as Pe,c as Re}from"./tooltip-nr5oS_bm.js";import{i as vn}from"./ArrowLeft-8rouBEwC.js";import{M as jn,S as yn}from"./usage-stats-YafP0g9G.js";import{c as wn,b as Cn}from"./tabs-Dd0IWElc.js";import{t as Be}from"./Tool02-CvlAGFBM.js";import{d as Nn,h as Sn,c as kn,b as Tn,D as In}from"./dialog-AoC07APJ.js";import{d as Ce,e as _n,b as Dn,f as Pn}from"./use-entitlements-kPr6KRf9.js";import{u as Rn}from"./use-deco-credits-CqbkXgA9.js";import{I as Mn}from"./input-Buz_7xoG.js";import{T as Vt,a as En}from"./toggle-group-CwAn2mKr.js";import{s as Fn}from"./tool-namespace-DmnQIdtF.js";import{t as Ln}from"./utils-CVEq3hMx.js";import{u as zn}from"./use-open-billing-url-BAg3ZeFq.js";import{s as Un}from"./XClose-CvcHLHe2.js";import{M as Bn,m as Ze,g as $n,a as On}from"./decopilot-BI8eOOPY.js";import{a as It,b as _t,P as Dt}from"./popover-Bff85VlI.js";import{c as Kn,b as Qn,a as Yn,D as Gn}from"./drawer-DGzquxJ8.js";import{u as qn}from"./use-mobile-BZ15DgEB.js";import{t as Hn}from"./Stars01-D-wYuyik.js";import{d as Wn}from"./use-organization-settings-DvtBymY3.js";import{u as Pt,c as Zn}from"./use-ai-providers-D-abiIwe.js";import{M as Jn}from"./index-DllcfiZL.js";import{p as Rt,u as Xn,T as eo,a as to,U as so}from"./input-C5klQNJJ.js";import{d as no,g as it,s as oo}from"./gateway-client-CnYYocwu.js";import{u as ro}from"./use-mcp-client-B_gcvvCy.js";import{l as ao,g as Vo}from"./use-mcp-prompts-DfSKL4Gu.js";import{i as io}from"./Link01-BIFMl_M0.js";import{s as lt}from"./Plus-BSp00qOC.js";import"./hooks-BlE0QZwR.js";import{p as lo,q as co}from"./question-004-sINsf4GQ.js";import{A as uo}from"./avatar-BzRNaDEk.js";import{u as po}from"./use-members-C6brpkJ1.js";import{F as ct}from"./feature-paywall-BoABVlUQ.js";import{A as mo}from"./add-connection-dialog-DA05asFs.js";import{u as fo}from"./use-is-desktop-app-BNujXJc_.js";const Le="cubic-bezier(0.645, 0.045, 0.355, 1)",iV=44,ho={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},xo={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},go={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function ue(t){const e=R.c(69),{icon:n,label:o,count:a,title:V,footerLeft:r,footerRight:i,children:l,defaultExpanded:p,variant:d,onClose:c}=t,u=d===void 0?"default":d,m=G(),[h,f]=L.useState(p),[x,b]=L.useState(!1);let g;e[0]!==c?(g=()=>{b(!0),c?.()},e[0]=c,e[1]=g):g=e[1];const v=g;if(x)return null;const A=xo[u],j=ho[u];let w;e[2]!==A||e[3]!==j?(w=O("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",A,j),e[2]=A,e[3]=j,e[4]=w):w=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>f(bo),e[5]=y):y=e[5];const C=h&&"rounded-b-none",S=!h&&"rounded-b-xl";let N;e[6]!==C||e[7]!==S?(N=O("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",C,S),e[6]=C,e[7]=S,e[8]=N):N=e[8];const _=go[u];let k;e[9]!==_?(k=O("shrink-0",_),e[9]=_,e[10]=k):k=e[10];let P;e[11]!==n||e[12]!==k?(P=s.jsx("span",{className:k,children:n}),e[11]=n,e[12]=k,e[13]=P):P=e[13];let D;e[14]!==o?(D=s.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=D):D=e[15];let M;e[16]!==a?(M=a?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a}):null,e[16]=a,e[17]=M):M=e[17];const E=h?"rotate(180deg)":"rotate(0deg)";let T;e[18]!==E?(T=s.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:s.jsx(Tt,{size:16,style:{transform:E,transition:`transform 180ms ${Le}`}})}),e[18]=E,e[19]=T):T=e[19];let F;e[20]!==m?(F=m("chat.collapsibleHighlight.closeLabel"),e[20]=m,e[21]=F):F=e[21];let U;e[22]!==m?(U=m("chat.collapsibleHighlight.closeTitle"),e[22]=m,e[23]=U):U=e[23];let q,$;e[24]!==v?(q=re=>{re.stopPropagation(),v()},$=re=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),re.stopPropagation(),v())},e[24]=v,e[25]=q,e[26]=$):(q=e[25],$=e[26]);let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ye,{size:16}),e[27]=z):z=e[27];let Q;e[28]!==F||e[29]!==U||e[30]!==q||e[31]!==$?(Q=s.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":F,title:U,onClick:q,onKeyDown:$,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:z}),e[28]=F,e[29]=U,e[30]=q,e[31]=$,e[32]=Q):Q=e[32];let B;e[33]!==h||e[34]!==P||e[35]!==D||e[36]!==M||e[37]!==T||e[38]!==Q||e[39]!==N?(B=s.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:y,className:N,children:[P,D,M,T,Q]}),e[33]=h,e[34]=P,e[35]=D,e[36]=M,e[37]=T,e[38]=Q,e[39]=N,e[40]=B):B=e[40];const te=h?"1fr":"0fr";let J;e[41]!==te?(J={display:"grid",gridTemplateRows:te,transition:`grid-template-rows 180ms ${Le}`},e[41]=te,e[42]=J):J=e[42];let I;e[43]===Symbol.for("react.memo_cache_sentinel")?(I={overflow:"hidden",minHeight:0},e[43]=I):I=e[43];const Y=h?1:0;let H;e[44]!==Y?(H={opacity:Y,transition:`opacity 120ms ${Le}`,maxHeight:"60vh"},e[44]=Y,e[45]=H):H=e[45];let Z;e[46]!==V?(Z=V?s.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:s.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:V})}):s.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=V,e[47]=Z):Z=e[47];let W;e[48]!==l||e[49]!==V?(W=l?s.jsx("div",{className:O("pb-4",!V&&"pt-4"),children:l}):null,e[48]=l,e[49]=V,e[50]=W):W=e[50];let se;e[51]!==Z||e[52]!==W?(se=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Z,W]}),e[51]=Z,e[52]=W,e[53]=se):se=e[53];let ae;e[54]!==r||e[55]!==i?(ae=r||i?s.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:r}),s.jsx("div",{className:"flex items-center gap-2",children:i})]})}):null,e[54]=r,e[55]=i,e[56]=ae):ae=e[56];let Ve;e[57]!==H||e[58]!==se||e[59]!==ae?(Ve=s.jsx("div",{style:I,children:s.jsxs("div",{className:"flex flex-col",style:H,children:[se,ae]})}),e[57]=H,e[58]=se,e[59]=ae,e[60]=Ve):Ve=e[60];let ne;e[61]!==J||e[62]!==Ve?(ne=s.jsx("div",{"data-testid":"collapsible-highlight-body",style:J,children:Ve}),e[61]=J,e[62]=Ve,e[63]=ne):ne=e[63];let ie;return e[64]!==B||e[65]!==ne||e[66]!==w||e[67]!==u?(ie=s.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":u,className:w,children:[B,ne]}),e[64]=B,e[65]=ne,e[66]=w,e[67]=u,e[68]=ie):ie=e[68],ie}function bo(t){return!t}const Ao=fe({content:be().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:$e(["pending","in_progress","completed"]),activeForm:be().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),Mt=fe({todos:os(Ao)}),vo="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";cn({description:vo,inputSchema:dn(Mt),execute:async({todos:t})=>({ok:!0,count:t.length})});const jo="tool-todo_write",yo=new Set(["input-available","output-available"]);function wo(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.role!=="assistant")continue;const o=n.parts;if(Array.isArray(o))for(let a=o.length-1;a>=0;a--){const V=o[a];if(V.type!==jo||typeof V.state!="string"||!yo.has(V.state))continue;const r=Mt.safeParse(V.input);if(r.success)return r.data.todos}}return[]}function Et(t){const e=[];for(const n of t)if("state"in n&&n.state==="approval-requested"&&"approval"in n&&n.approval?.id&&"toolCallId"in n&&n.toolCallId){const o="toolName"in n&&typeof n.toolName=="string"?n.toolName:n.type.startsWith("tool-")?n.type.replace("tool-",""):"Tool";e.push({approvalId:n.approval.id,toolCallId:n.toolCallId,toolName:o,friendlyName:Ln(Fn(o)),input:n.input})}return e}function Ft(t){return t.at(-1)}function Lt(t){const e=[];for(const n of t)n.type==="tool-propose_plan"&&n.state==="input-available"&&e.push({toolCallId:n.toolCallId,plan:n.input.plan,state:n.state});return e}function Co(t){return t?t.message.startsWith("[CREDITS]"):!1}const No={isCreditExhausted:!1,planRefusal:null,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,todos:[]};function So(t){const{messages:e,error:n,finishReason:o,isStreaming:a,isWaitingForApprovals:V}=t;if(!a&&n&&Co(n))return{...No,isCreditExhausted:!0};const r=e.at(-1),i=r?.role==="assistant"?r.parts:[],l=i,d=!!l.filter(j=>j.type==="tool-user_ask").filter(j=>j.state!=="output-available").length,c=Lt(i),u=Et(l),m=wo(e),h=a?null:Es(n),f=a?null:un(n),x=!a&&!!n&&!h&&!f,b=u.length>0||a&&V,g=c.length>0,A=!a&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(d||b||g))&&!x;return{isCreditExhausted:!1,planRefusal:f,subscriptionErrorKind:h,hasTodos:m.length>0,showError:x,showWarning:A,hasApprovals:b,hasPlans:g,isWaitingForUserInput:d,todos:m}}function zt(){const t=R.c(6),{messages:e,error:n,finishReason:o,isStreaming:a,isWaitingForApprovals:V}=Ge(),r=n??null,i=o??null;let l;return t[0]!==a||t[1]!==V||t[2]!==e||t[3]!==r||t[4]!==i?(l=So({messages:e,error:r,finishReason:i,isStreaming:a,isWaitingForApprovals:V}),t[0]=a,t[1]=V,t[2]=e,t[3]=r,t[4]=i,t[5]=l):l=t[5],l}function lV(){const t=zt(),e=Ce("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)}const dt="start-task",ko=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
2
2
 
3
3
  1. Read the report and any attached screenshots. Carry the reporter's own words into the task description, plus the URL of any attachment.
4
4
  2. Call TASK_BOARD_ITEM_LIST. Its \`repos\` are this organization's repositories — the only valid values for a task's repo, so pick the one the report is about and never invent a name. Its \`items\` tell you whether an open task already covers this report: if one does, link it and stop.
@@ -1 +1 @@
1
- import{c as s,l as a,j as d}from"./index-BiU3YmQL.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-[var(--studio-input-background)] px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
1
+ import{c as s,l as a,j as d}from"./index-EcuFIS2a.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-[var(--studio-input-background)] px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
@@ -1 +1 @@
1
- import{c as Y,r as h,b as le,j as b,t as V,T as ct,B as ut,e9 as dt,ea as Ke,eb as ft,ec as z,ed as pe,aO as mt,ee as pt,ef as ge,eg as gt,eh as ht,ei as vt,ej as bt,ek as xt,el as yt,em as wt,en as St,l as Ue,h as Rt,o as qe,a0 as Be,K as ce,q as J,eo as Qe,c_ as Ce,ep as oe}from"./index-BiU3YmQL.js";import{u as Ct,S as Et,a as It,b as kt,s as Pt}from"./hooks-CzhqOgxt.js";import{f as Tt,h as Ft,j as Nt,i as se,k as _t,P as Ee,l as At,c as Mt,u as Dt,n as jt,d as Lt,e as Ot,F as $t,s as Kt,b as Ut}from"./index-CuhH8P7u.js";import{d as qt,h as Bt,c as Qt,b as Ht,D as Vt}from"./dialog-yUWKJPsU.js";import{aH as Wt,A as zt}from"./agent-icon-DbgbaBWC.js";import"./chat-context-CHZ5Yehn.js";import{m as Yt,i as Xt,a as Gt}from"./decopilot-BbHxwoKU.js";import{u as He}from"./use-mcp-client-Br7XFHza.js";import{b as Jt}from"./use-virtual-mcp-CmFx7CJY.js";import{g as ue,d as Zt,s as Ve}from"./gateway-client-BqcIzR1f.js";import{g as en}from"./use-project-scope-_WcnrAA6.js";import{l as Ie,g as We}from"./use-mcp-prompts-C6590AFl.js";import{f as tn,a as nn}from"./use-org-fs-CJMhF9AL.js";async function rn(t,e,n,r,o,s){if(!Yt(e)){V.error("Selected model does not support file uploads");return}const i=n.type||"application/octet-stream";if(!Xt(i,e)){const c=Gt(e).parts.map(f=>s(f)).join(", "),u=e?.title??"This model";o?o({fileName:n.name,modelName:u,accepted:c}):V.error(`"${n.name}" can't be attached`,{description:`${u} accepts ${c}.`});return}const a=10*1024*1024;if(n.size>a){V.error(`File "${n.name}" exceeds 10MB limit`);return}try{const c=new FileReader,u=new Promise((l,d)=>{c.onload=()=>{const g=c.result;if(typeof g!="string"){d(new Error("Failed to read file as data URL"));return}const m=g.includes(",")?g.split(",")[1]??g:g;l(m)},c.onerror=d});c.readAsDataURL(n);const f=await u,p={id:crypto.randomUUID(),name:n.name,mimeType:n.type||"application/octet-stream",size:n.size,data:f};Tt(t,{from:r,to:r},p)}catch(c){console.error("Failed to process file:",c),V.error(`Failed to load file "${n.name}"`)}}function on(t){const e=Y.c(9),{editor:n,selectedModel:r,onUnsupportedFile:o}=t,s=le(),i=h.useRef(an);let a,c;e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==s?(a=()=>{i.current=async(p,l)=>{await rn(n,r,p,l,o,s)}},c=[n,r,o,s],e[0]=n,e[1]=o,e[2]=r,e[3]=s,e[4]=a,e[5]=c):(a=e[4],c=e[5]),h.useEffect(a,c);let u,f;return e[6]!==n?(u=()=>{if(n?.isDestroyed)return;const p=new Ft("fileDropHandler");n.state.plugins.find(g=>g.spec.key===p)&&n.unregisterPlugin(p);const d=new Nt({key:p,props:{handleDrop:(g,m,v,y)=>{if(y)return!1;const x=m.dataTransfer?.files;if(!x||x.length===0)return!1;m.preventDefault();const w=g.posAtCoords({left:m.clientX,top:m.clientY});if(!w)return!1;const I=Array.from(x);return(async()=>{let N=w.pos;for(const T of I)await i.current?.(T,N),N=g.state.selection.to})(),!0},handlePaste:(g,m)=>{const v=m.clipboardData?.items;if(!v)return!1;const y=Array.from(v).filter(sn);return y.length===0?!1:(m.preventDefault(),(async()=>{let x=g.state.selection.from;for(const w of y){const I=w.getAsFile();I&&(await i.current?.(I,x),x=g.state.selection.to)}})(),!0)}}});return n.registerPlugin(d),()=>{n?.isDestroyed||n.unregisterPlugin(p)}},f=[n],e[6]=n,e[7]=u,e[8]=f):(u=e[7],f=e[8]),h.useEffect(u,f),null}function sn(t){return t.kind==="file"}function an(){return Promise.resolve()}function jr(t){const e=Y.c(43),{info:n,onClose:r}=t,o=le(),s=n!==null;let i;e[0]!==r?(i=A=>!A&&r(),e[0]=r,e[1]=i):i=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=["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]=a):a=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=b.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:a.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=c):c=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:b.jsx(ct,{size:18})}),e[4]=u):u=e[4];let f;e[5]!==o?(f=o("chat.uploader.fileTypeNotSupported"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=b.jsx(qt,{className:"text-xl font-semibold tracking-tight",children:f}),e[7]=f,e[8]=p):p=e[8];const l=n?.fileName;let d;e[9]!==l?(d=b.jsxs("span",{className:"font-medium text-foreground",children:["“",l,"”"]}),e[9]=l,e[10]=d):d=e[10];let g;e[11]!==o?(g=o("chat.uploader.cantAttachToChat"),e[11]=o,e[12]=g):g=e[12];let m;e[13]!==g||e[14]!==d?(m=b.jsxs(Bt,{className:"mt-1.5 text-sm leading-relaxed",children:[d," ",g]}),e[13]=g,e[14]=d,e[15]=m):m=e[15];let v;e[16]!==m||e[17]!==p?(v=b.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[c,b.jsxs(Qt,{className:"relative gap-4",children:[u,b.jsxs("div",{children:[p,m]})]})]}),e[16]=m,e[17]=p,e[18]=v):v=e[18];const y=n?.modelName??"";let x;e[19]!==o||e[20]!==y?(x=o("chat.uploader.accepts",{modelName:y}),e[19]=o,e[20]=y,e[21]=x):x=e[21];let w;e[22]!==x?(w=b.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:x}),e[22]=x,e[23]=w):w=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=b.jsx(Wt,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const N=n?.accepted;let T;e[25]!==N?(T=b.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,b.jsx("span",{className:"capitalize",children:N})]}),e[25]=N,e[26]=T):T=e[26];let S;e[27]!==w||e[28]!==T?(S=b.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:b.jsxs("div",{className:"rounded-xl border border-border p-4",children:[w,T]})}),e[27]=w,e[28]=T,e[29]=S):S=e[29];let R;e[30]!==o?(R=o("chat.uploader.gotIt"),e[30]=o,e[31]=R):R=e[31];let k;e[32]!==r||e[33]!==R?(k=b.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:b.jsx(ut,{onClick:r,children:R})}),e[32]=r,e[33]=R,e[34]=k):k=e[34];let F;e[35]!==v||e[36]!==S||e[37]!==k?(F=b.jsxs(Ht,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ln,children:[v,S,k]}),e[35]=v,e[36]=S,e[37]=k,e[38]=F):F=e[38];let D;return e[39]!==s||e[40]!==i||e[41]!==F?(D=b.jsx(Vt,{open:s,onOpenChange:i,children:F}),e[39]=s,e[40]=i,e[41]=F,e[42]=D):D=e[42],D}function ln(t){return t.preventDefault()}function Lr(){const t=Y.c(3),[e,n]=h.useState(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>n(null),t[0]=r):r=t[0];let o;return t[1]!==e?(o={unsupportedFile:e,onUnsupportedFile:n,clearUnsupportedFile:r},t[1]=e,t[2]=o):o=t[2],o}var cn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],xe=cn.join(","),ze=typeof Element>"u",ie=ze?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fe=!ze&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},me=function(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):me(e.parentNode));return i},un=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},dn=function(e,n,r){if(me(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(xe));return n&&ie.call(e,xe)&&o.unshift(e),o=o.filter(r),o},ye=function(e,n,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!me(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,u=ye(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var f=ie.call(i,xe);f&&r.filter(i)&&(n||!e.includes(i))&&o.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),l=!me(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&l){var d=ye(p===!0?i.children:p.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},Ye=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||un(e))&&!Ye(e)?0:e.tabIndex},fn=function(e,n){var r=Xe(e);return r<0&&n&&!Ye(e)?0:r},mn=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ge=function(e){return e.tagName==="INPUT"},pn=function(e){return Ge(e)&&e.type==="hidden"},gn=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},hn=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},vn=function(e){if(!e.name)return!0;var n=e.form||fe(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=hn(o,e.form);return!s||s===e},bn=function(e){return Ge(e)&&e.type==="radio"},xn=function(e){return bn(e)&&!vn(e)},yn=function(e){var n,r=e&&fe(e),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var i,a,c;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!s&&o;){var u,f,p;r=fe(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=o)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},ke=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},wn=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=ie.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(ie.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var c=e;e;){var u=e.parentElement,f=fe(e);if(u&&!u.shadowRoot&&o(u)===!0)return ke(e);e.assignedSlot?e=e.assignedSlot:!u&&f!==e.ownerDocument?e=f.host:e=u}e=c}if(yn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ke(e);return!1},Sn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ie.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Rn=function(e,n){return!(n.disabled||pn(n)||wn(n,e)||gn(n)||Sn(n))},Pe=function(e,n){return!(xn(n)||Xe(n)<0||!Rn(e,n))},Cn=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Je=function(e){var n=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,c=fn(a,i),u=i?Je(o.candidates):a;c===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:o,isScope:i,content:u})}),r.sort(mn).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ze=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ye([e],n.includeContainer,{filter:Pe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Cn}):r=dn(e,n.includeContainer,Pe.bind(null,n)),Je(r)};function En(){return/apple/i.test(navigator.vendor)}const Te="data-floating-ui-focusable";function In(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function we(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&dt(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function re(t){return"composedPath"in t?t.composedPath()[0]:t.target}function he(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function kn(t){return t.matches("html,body")}function ae(t){return t?.ownerDocument||document}function Pn(t){return t?t.hasAttribute(Te)?t:t.querySelector("["+Te+"]")||t:null}function de(t,e,n){return n===void 0&&(n=!0),t.filter(o=>{var s;return o.parentId===e&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...de(t,o.id,n)])}function Tn(t){return"nativeEvent"in t}var Fn=typeof document<"u",Nn=function(){},Z=Fn?h.useLayoutEffect:Nn;const _n={...Ke},An=_n.useInsertionEffect,Mn=An||(t=>t());function te(t){const e=h.useRef(()=>{});return Mn(()=>{e.current=t}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const et=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tt(t,e){const n=Ze(t,et()),r=n.length;if(r===0)return;const o=In(ae(t)),s=n.indexOf(o),i=s===-1?e===1?0:r-1:s+e;return n[i]}function Dn(t){return tt(ae(t).body,1)||t}function jn(t){return tt(ae(t).body,-1)||t}function ve(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!we(n,r)}function Ln(t){Ze(t,et()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Fe(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const On="data-floating-ui-focusable",Ne="active",_e="selected",$n={...Ke};let Ae=!1,Kn=0;const Me=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kn++;function Un(){const[t,e]=h.useState(()=>Ae?Me():void 0);return Z(()=>{t==null&&e(Me())},[]),h.useEffect(()=>{Ae=!0},[]),t}const qn=$n.useId,Se=qn||Un;function Bn(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Qn=h.createContext(null),Hn=h.createContext(null),nt=()=>{var t;return((t=h.useContext(Qn))==null?void 0:t.id)||null},rt=()=>h.useContext(Hn);function Re(t){return"data-floating-ui-"+t}const Vn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},De=h.forwardRef(function(e,n){const[r,o]=h.useState();Z(()=>{En()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Re("focus-guard")]:"",style:Vn};return b.jsx("span",{...e,...s})}),Wn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ot=h.createContext(null),je=Re("portal");function zn(t){t===void 0&&(t={});const{id:e,root:n}=t,r=Se(),o=Xn(),[s,i]=h.useState(null),a=h.useRef(null);return Z(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),Z(()=>{if(!r||a.current)return;const c=e?document.getElementById(e):null;if(!c)return;const u=document.createElement("div");u.id=r,u.setAttribute(je,""),c.appendChild(u),a.current=u,i(u)},[e,r]),Z(()=>{if(n===null||!r||a.current)return;let c=n||o?.portalNode;c&&!bt(c)&&(c=c.current),c=c||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,c.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(je,""),c=u||c,c.appendChild(f),a.current=f,i(f)},[e,n,r,o]),s}function Yn(t){const{children:e,id:n,root:r,preserveTabOrder:o=!0}=t,s=zn({id:n,root:r}),[i,a]=h.useState(null),c=h.useRef(null),u=h.useRef(null),f=h.useRef(null),p=h.useRef(null),l=i?.modal,d=i?.open,g=!!i&&!i.modal&&i.open&&o&&!!(r||s);return h.useEffect(()=>{if(!s||!o||l)return;function m(v){s&&ve(v)&&(v.type==="focusin"?Fe:Ln)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,l]),h.useEffect(()=>{s&&(d||Fe(s))},[d,s]),b.jsxs(ot.Provider,{value:h.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:p,portalNode:s,setFocusManagerState:a}),[o,s]),children:[g&&s&&b.jsx(De,{"data-type":"outside",ref:c,onFocus:m=>{if(ve(m,s)){var v;(v=f.current)==null||v.focus()}else{const y=i?i.domReference:null,x=jn(y);x?.focus()}}}),g&&s&&b.jsx("span",{"aria-owns":s.id,style:Wn}),s&&mt.createPortal(e,s),g&&s&&b.jsx(De,{"data-type":"outside",ref:u,onFocus:m=>{if(ve(m,s)){var v;(v=p.current)==null||v.focus()}else{const y=i?i.domReference:null,x=Dn(y);x?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const Xn=()=>h.useContext(ot),Gn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Jn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Le=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function Zn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=t,{enabled:i=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:l=!1,bubbles:d,capture:g}=e,m=rt(),v=te(typeof c=="function"?c:()=>!1),y=typeof c=="function"?v:c,x=h.useRef(!1),{escapeKey:w,outsidePress:I}=Le(d),{escapeKey:N,outsidePress:T}=Le(g),S=h.useRef(!1),R=te(E=>{var M;if(!n||!i||!a||E.key!=="Escape"||S.current)return;const C=(M=s.current.floatingContext)==null?void 0:M.nodeId,$=m?de(m.nodesRef.current,C):[];if(!w&&(E.stopPropagation(),$.length>0)){let P=!0;if($.forEach(L=>{var O;if((O=L.context)!=null&&O.open&&!L.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,Tn(E)?E.nativeEvent:E,"escape-key")}),k=te(E=>{var M;const C=()=>{var $;R(E),($=re(E))==null||$.removeEventListener("keydown",C)};(M=re(E))==null||M.addEventListener("keydown",C)}),F=te(E=>{var M;const C=s.current.insideReactTree;s.current.insideReactTree=!1;const $=x.current;if(x.current=!1,u==="click"&&$||C||typeof y=="function"&&!y(E))return;const P=re(E),L="["+Re("inert")+"]",O=ae(o.floating).querySelectorAll(L);let H=z(P)?P:null;for(;H&&!ge(H);){const j=gt(H);if(ge(j)||!z(j))break;H=j}if(O.length&&z(P)&&!kn(P)&&!we(P,o.floating)&&Array.from(O).every(j=>!we(H,j)))return;if(ht(P)&&Q){const j=ge(P),K=vt(P),W=/auto|scroll/,q=j||W.test(K.overflowX),U=j||W.test(K.overflowY),ee=q&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,B=U&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,ne=K.direction==="rtl",at=B&&(ne?E.offsetX<=P.offsetWidth-P.clientWidth:E.offsetX>P.clientWidth),lt=ee&&E.offsetY>P.clientHeight;if(at||lt)return}const G=(M=s.current.floatingContext)==null?void 0:M.nodeId,X=m&&de(m.nodesRef.current,G).some(j=>{var K;return he(E,(K=j.context)==null?void 0:K.elements.floating)});if(he(E,o.floating)||he(E,o.domReference)||X)return;const _=m?de(m.nodesRef.current,G):[];if(_.length>0){let j=!0;if(_.forEach(K=>{var W;if((W=K.context)!=null&&W.open&&!K.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}r(!1,E,"outside-press")}),D=te(E=>{var M;const C=()=>{var $;F(E),($=re(E))==null||$.removeEventListener(u,C)};(M=re(E))==null||M.addEventListener(u,C)});h.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=I;let E=-1;function M(O){r(!1,O,"ancestor-scroll")}function C(){window.clearTimeout(E),S.current=!0}function $(){E=window.setTimeout(()=>{S.current=!1},pt()?5:0)}const P=ae(o.floating);a&&(P.addEventListener("keydown",N?k:R,N),P.addEventListener("compositionstart",C),P.addEventListener("compositionend",$)),y&&P.addEventListener(u,T?D:F,T);let L=[];return l&&(z(o.domReference)&&(L=pe(o.domReference)),z(o.floating)&&(L=L.concat(pe(o.floating))),!z(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(pe(o.reference.contextElement)))),L=L.filter(O=>{var H;return O!==((H=P.defaultView)==null?void 0:H.visualViewport)}),L.forEach(O=>{O.addEventListener("scroll",M,{passive:!0})}),()=>{a&&(P.removeEventListener("keydown",N?k:R,N),P.removeEventListener("compositionstart",C),P.removeEventListener("compositionend",$)),y&&P.removeEventListener(u,T?D:F,T),L.forEach(O=>{O.removeEventListener("scroll",M)}),window.clearTimeout(E)}},[s,o,a,y,u,n,r,l,i,w,I,R,N,k,F,T,D]),h.useEffect(()=>{s.current.insideReactTree=!1},[s,y,u]);const A=h.useMemo(()=>({onKeyDown:R,...f&&{[Gn[p]]:E=>{r(!1,E.nativeEvent,"reference-press")},...p!=="click"&&{onClick(E){r(!1,E.nativeEvent,"reference-press")}}}}),[R,r,f,p]),Q=h.useMemo(()=>{function E(M){M.button===0&&(x.current=!0)}return{onKeyDown:R,onMouseDown:E,onMouseUp:E,[Jn[u]]:()=>{s.current.insideReactTree=!0}}},[R,u,s]);return h.useMemo(()=>i?{reference:A,floating:Q}:{},[i,A,Q])}function er(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=Se(),s=h.useRef({}),[i]=h.useState(()=>Bn()),a=nt()!=null,[c,u]=h.useState(r.reference),f=te((d,g,m)=>{s.current.openEvent=d?g:void 0,i.emit("openchange",{open:d,event:g,reason:m,nested:a}),n?.(d,g,m)}),p=h.useMemo(()=>({setPositionReference:u}),[]),l=h.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return h.useMemo(()=>({dataRef:s,open:e,onOpenChange:f,elements:l,events:i,floatingId:o,refs:p}),[e,f,l,i,o,p])}function tr(t){t===void 0&&(t={});const{nodeId:e}=t,n=er({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[s,i]=h.useState(null),[a,c]=h.useState(null),f=o?.domReference||s,p=h.useRef(null),l=rt();Z(()=>{f&&(p.current=f)},[f]);const d=ft({...t,elements:{...o,...a&&{reference:a}}}),g=h.useCallback(w=>{const I=z(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(I),d.refs.setReference(I)},[d.refs]),m=h.useCallback(w=>{(z(w)||w===null)&&(p.current=w,i(w)),(z(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!z(w))&&d.refs.setReference(w)},[d.refs]),v=h.useMemo(()=>({...d.refs,setReference:m,setPositionReference:g,domReference:p}),[d.refs,m,g]),y=h.useMemo(()=>({...d.elements,domReference:f}),[d.elements,f]),x=h.useMemo(()=>({...d,...r,refs:v,elements:y,nodeId:e}),[d,v,y,e,r]);return Z(()=>{r.dataRef.current.floatingContext=x;const w=l?.nodesRef.current.find(I=>I.id===e);w&&(w.context=x)}),h.useMemo(()=>({...d,context:x,refs:v,elements:y}),[d,v,y,x])}function be(t,e,n){const r=new Map,o=n==="item";let s=t;if(o&&t){const{[Ne]:i,[_e]:a,...c}=t;s=c}return{...n==="floating"&&{tabIndex:-1,[On]:""},...s,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(c=>{let[u,f]=c;if(!(o&&[Ne,_e].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var p;(p=r.get(u))==null||p.push(f),i[u]=function(){for(var l,d=arguments.length,g=new Array(d),m=0;m<d;m++)g[m]=arguments[m];return(l=r.get(u))==null?void 0:l.map(v=>v(...g)).find(v=>v!==void 0)}}}else i[u]=f}),i),{})}}function nr(t){t===void 0&&(t=[]);const e=t.map(a=>a?.reference),n=t.map(a=>a?.floating),r=t.map(a=>a?.item),o=h.useCallback(a=>be(a,t,"reference"),e),s=h.useCallback(a=>be(a,t,"floating"),n),i=h.useCallback(a=>be(a,t,"item"),r);return h.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const rr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function or(t,e){var n,r;e===void 0&&(e={});const{open:o,elements:s,floatingId:i}=t,{enabled:a=!0,role:c="dialog"}=e,u=Se(),f=((n=s.domReference)==null?void 0:n.id)||u,p=h.useMemo(()=>{var x;return((x=Pn(s.floating))==null?void 0:x.id)||i},[s.floating,i]),l=(r=rr.get(c))!=null?r:c,g=nt()!=null,m=h.useMemo(()=>l==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":o?p:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:f},...l==="menu"&&g&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[l,p,g,o,f,c]),v=h.useMemo(()=>{const x={id:p,...l&&{role:l}};return l==="tooltip"||c==="label"?x:{...x,...l==="menu"&&{"aria-labelledby":f}}},[l,p,f,c]),y=h.useCallback(x=>{let{active:w,selected:I}=x;const N={role:"option",...w&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...N,"aria-selected":I}}return{}},[p,c]);return h.useMemo(()=>a?{reference:m,floating:v,item:y}:{},[a,m,v,y])}function sr({children:t}){const{state:e,dispatch:n}=It(),{open:r,element:o}=e,s=()=>{n({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:c}=tr({placement:"bottom-start",open:r,onOpenChange:l=>{l||s()},elements:{reference:o},middleware:[xt(10),yt(),wt()],whileElementsMounted:St}),u=Zn(c,{outsidePress:l=>!(l.target instanceof Element&&l.target.closest(".ProseMirror"))}),f=or(c,{role:"listbox"}),{getFloatingProps:p}=nr([u,f]);return r?b.jsx(Yn,{children:b.jsx("div",{ref:i.setFloating,style:a,...p(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:t})}):null}const ir=t=>{const e=Y.c(29),{item:n,isSelected:r,onSelect:o,isLoading:s,ref:i}=t;let a;if(e[0]!==n){const T=ue(n._meta);a=n.title||Zt(n.name,T),e[0]=n,e[1]=a}else a=e[1];const c=a,u=n.description||null,f=n.icon,p=r&&"bg-accent text-accent-foreground",l=s&&"pointer-events-none opacity-50";let d;e[2]!==p||e[3]!==l?(d=Ue("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",p,l),e[2]=p,e[3]=l,e[4]=d):d=e[4];let g;e[5]!==f||e[6]!==c?(g=f!==void 0&&b.jsx(zt,{icon:f,name:c,size:"xs",className:"mr-2"}),e[5]=f,e[6]=c,e[7]=g):g=e[7];let m;e[8]!==c?(m=b.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),e[8]=c,e[9]=m):m=e[9];let v;e[10]!==s?(v=s&&b.jsx(Rt,{size:"xs"}),e[10]=s,e[11]=v):v=e[11];let y;e[12]!==m||e[13]!==v?(y=b.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m,v]}),e[12]=m,e[13]=v,e[14]=y):y=e[14];let x;e[15]!==u?(x=u&&b.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:u}),e[15]=u,e[16]=x):x=e[16];let w;e[17]!==y||e[18]!==x?(w=b.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[y,x]}),e[17]=y,e[18]=x,e[19]=w):w=e[19];let I;e[20]!==n.drillable?(I=n.drillable&&b.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"}),e[20]=n.drillable,e[21]=I):I=e[21];let N;return e[22]!==o||e[23]!==i||e[24]!==w||e[25]!==I||e[26]!==d||e[27]!==g?(N=b.jsxs("div",{ref:i,onClick:o,className:d,children:[g,w,I]}),e[22]=o,e[23]=i,e[24]=w,e[25]=I,e[26]=d,e[27]=g,e[28]=N):N=e[28],N},ar=t=>{const e=Y.c(21),{editor:n,queryKey:r,queryFn:o,onSelect:s}=t,i=le();let a;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==r?(a={editor:n,queryKey:r,queryFn:o,onSelect:s},e[0]=n,e[1]=s,e[2]=o,e[3]=r,e[4]=a):a=e[4];const{items:c,selectedIndex:u,onSelect:f,selectedItem:p}=kt(a);if(!c.length){let m;e[5]!==i?(m=i("chat.mention.noItemsFound"),e[5]=i,e[6]=m):m=e[6];let v;return e[7]!==m?(v=b.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:m}),e[7]=m,e[8]=v):v=e[8],v}let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[9]=l):l=e[9];let d;if(e[10]!==f||e[11]!==c||e[12]!==u||e[13]!==p?.name){let m;e[15]!==f||e[16]!==u||e[17]!==p?.name?(m=(v,y)=>b.jsx(ir,{item:v,isSelected:y===u,ref:y===u?ur:void 0,onSelect:()=>f(v,y),isLoading:p?.name===v.name},`${v.kind??"item"}:${v.name}`),e[15]=f,e[16]=u,e[17]=p?.name,e[18]=m):m=e[18],d=c.map(m),e[10]=f,e[11]=c,e[12]=u,e[13]=p?.name,e[14]=d}else d=e[14];let g;return e[19]!==d?(g=b.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:l,children:b.jsx("div",{className:"p-1",children:d})}),e[19]=d,e[20]=g):g=e[20],g};function lr(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"p-1",children:[...Array(3)].map(cr)}),t[0]=e):e=t[0],e}function cr(t,e){return b.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[b.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),b.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function st(t){const e=Y.c(18),{editor:n,char:r,pluginKey:o,queryKey:s,queryFn:i,onSelect:a,allow:c,onOpenChange:u}=t;let f;e[0]!==c||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==o?(f={editor:n,char:r,pluginKey:o,allow:c,onOpenChange:u},e[0]=c,e[1]=r,e[2]=n,e[3]=u,e[4]=o,e[5]=f):f=e[5];const{state:p,dispatch:l}=Ct(f);let d;e[6]!==l||e[7]!==p?(d={state:p,dispatch:l},e[6]=l,e[7]=p,e[8]=d):d=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=b.jsx(lr,{}),e[9]=g):g=e[9];let m;e[10]!==n||e[11]!==a||e[12]!==i||e[13]!==s?(m=b.jsx(sr,{children:b.jsx(h.Suspense,{fallback:g,children:b.jsx(ar,{editor:n,queryKey:s,queryFn:i,onSelect:a})})}),e[10]=n,e[11]=a,e[12]=i,e[13]=s,e[14]=m):m=e[14];let v;return e[15]!==d||e[16]!==m?(v=b.jsx(Et.Provider,{value:d,children:m}),e[15]=d,e[16]=m,e[17]=v):v=e[17],v}function ur(t){t&&t.scrollIntoView({block:"center",behavior:"smooth"})}const dr=t=>{const e=Y.c(53),{editor:n,virtualMcpId:r,suggestionOpenRef:o}=t,s=le(),i=qe(),{org:a}=Be(),c=Jt();let u;e[0]!==c?(u=en(c),e[0]=c,e[1]=u):u=e[1];const f=u;let p;e[2]!==a.id||e[3]!==a.slug||e[4]!==r?(p={connectionId:r,orgId:a.id,orgSlug:a.slug},e[2]=a.id,e[3]=a.slug,e[4]=r,e[5]=p):p=e[5];const l=He(p);let d;e[6]!==a.id||e[7]!==r?(d=ce.virtualMcpResources(r,a.id),e[6]=a.id,e[7]=r,e[8]=d):d=e[8];const g=d,[m,v]=h.useState("categories");let y;e[9]!==m?(y=()=>m,e[9]=m,e[10]=y):y=e[10];const x=h.useEffectEvent(y),w=h.useRef(null),I=h.useRef(!1),N=r??"default";let T;e[11]!==m||e[12]!==a.id||e[13]!==N?(T=["at-mention",a.id,N,m],e[11]=m,e[12]=a.id,e[13]=N,e[14]=T):T=e[14];const S=T;let R;e[15]!==s?(R=s("chat.mentionAt.agentsTitle"),e[15]=s,e[16]=R):R=e[16];let k;e[17]!==s?(k=s("chat.mentionAt.agentsDescription"),e[17]=s,e[18]=k):k=e[18];let F;e[19]!==R||e[20]!==k?(F={name:"agents",title:R,description:k,kind:"category",drillable:!0},e[19]=R,e[20]=k,e[21]=F):F=e[21];let D;e[22]!==s?(D=s("chat.mentionAt.resourcesTitle"),e[22]=s,e[23]=D):D=e[23];let A;e[24]!==s?(A=s("chat.mentionAt.resourcesDescription"),e[24]=s,e[25]=A):A=e[25];let Q;e[26]!==D||e[27]!==A?(Q={name:"resources",title:D,description:A,kind:"category",drillable:!0},e[26]=D,e[27]=A,e[28]=Q):Q=e[28];let E;e[29]!==Q||e[30]!==F?(E=[F,Q],e[29]=Q,e[30]=F,e[31]=E):E=e[31];const M=E;let C;e[32]!==l||e[33]!==n||e[34]!==s?(C=async X=>{const{item:_,range:j}=X;if(J("chat_picker_item_selected",{picker:"@",item_kind:_.kind,item_name:_.name}),_.kind!=="category"&&(I.current=!0),_.kind==="category")return v(_.name==="agents"?"agents":"resources"),!1;if(_.kind==="agent"&&_.agentId){se(n,j,{id:_.agentId,name:_.name,metadata:{agentId:_.agentId,title:_.name},char:"@"}),v("categories");return}if(_.kind==="resource"&&_.uri&&l){try{const K=await Qe(l,_.uri);se(n,j,{id:_.uri,name:_.uri,metadata:K.contents,char:"@"})}catch(K){console.error("[at-mention] Failed to fetch resource:",K),V.error(s("chat.mentionAt.failedToLoadResource"))}v("categories");return}},e[32]=l,e[33]=n,e[34]=s,e[35]=C):C=e[35];const $=C;let P;e[36]!==c||e[37]!==M||e[38]!==l||e[39]!==f||e[40]!==x||e[41]!==i||e[42]!==g||e[43]!==r?(P=async X=>{const{query:_}=X,j=x();if(j==="categories"){if(!_.trim())return M;const q=_.toLowerCase(),U=c.filter(B=>B.status==="active"&&(!B.id||!Ce(B.id))&&!f.has(B.id)&&B.id!==r&&(B.title.toLowerCase().includes(q)||B.description?.toLowerCase().includes(q))).map(fr),ee=await(async()=>{if(!l)return[];let B=i.getQueryData(g);return B||(B=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4})),(B?.resources??[]).filter(ne=>ne.uri.toLowerCase().includes(q)||ne.name?.toLowerCase().includes(q)||ne.description?.toLowerCase().includes(q)).map(mr)})();return[...U,...ee]}if(j==="agents"){let q=c.filter(U=>U.status==="active"&&(!U.id||!Ce(U.id))&&!f.has(U.id)&&U.id!==r);if(_.trim()){const U=_.toLowerCase();q=q.filter(ee=>ee.title.toLowerCase().includes(U)||ee.description?.toLowerCase().includes(U))}return q.map(pr)}if(!l)return[];let K=i.getQueryData(g);K?i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4}).catch(gr):K=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4});let W=K?.resources??[];if(_.trim()){const q=_.toLowerCase();W=W.filter(U=>U.uri.toLowerCase().includes(q)||U.name?.toLowerCase().includes(q)||U.description?.toLowerCase().includes(q))}return W.map(hr)},e[36]=c,e[37]=M,e[38]=l,e[39]=f,e[40]=x,e[41]=i,e[42]=g,e[43]=r,e[44]=P):P=e[44];const L=P;let O;e[45]!==o?(O=X=>{if(o&&(o.current=X),X)w.current=Date.now(),I.current=!1,J("chat_picker_opened",{picker:"@"});else{const _=w.current;J("chat_picker_closed",{picker:"@",outcome:I.current?"selected":"dismissed",duration_ms:_?Date.now()-_:null}),w.current=null,v("categories")}},e[45]=o,e[46]=O):O=e[46];const H=O;let G;return e[47]!==n||e[48]!==L||e[49]!==$||e[50]!==H||e[51]!==S?(G=b.jsx(st,{editor:n,char:"@",pluginKey:"atDropdownMenu",queryKey:S,queryFn:L,onSelect:$,onOpenChange:H}),e[47]=n,e[48]=L,e[49]=$,e[50]=H,e[51]=S,e[52]=G):G=e[52],G};function fr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function mr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function pr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function gr(){}function hr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function Oe(t,e,n,r,o,s,i){try{const a=await We(n,r,s);se(t,e,{id:r,name:Ve(r,o),metadata:a.messages,char:"/",kind:"prompt",args:s})}catch(a){console.error("[slash] Failed to fetch prompt:",a),V.error(i.t("chat.mentionSlash.failedLoadPrompt"))}}async function vr(t,e,n,r,o){try{const s=await Qe(n,r);se(t,e,{id:r,name:r,metadata:s.contents,char:"/",kind:"resource"})}catch(s){console.error("[slash] Failed to fetch resource:",s),V.error(o.t("chat.mentionSlash.failedLoadResource"))}}async function br(t,e,n,r,o){try{const{files:s,omittedPaths:i}=await tn(n,r.volume,r.path),a={sandboxPath:r.sandboxPath,volume:r.volume,path:r.path,files:s,omittedPaths:i};se(t,e,{id:r.id,name:r.name,metadata:a,char:"/",kind:"skill"})}catch(s){console.error("[slash] Failed to fetch skill:",s),V.error(o.t("chat.mentionSlash.failedLoadSkill"))}}const xr=({editor:t,virtualMcpId:e,suggestionOpenRef:n})=>{const r=le(),o=qe(),{org:s}=Be(),i=He({connectionId:e,orgId:s.id,orgSlug:s.slug}),a=ce.virtualMcpPrompts(e,s.id),c=ce.virtualMcpResources(e,s.id),u=ce.slashSkills(s.id),f=["slash-mention",s.id,e??"default"],[p,l]=h.useState(null),[d,g]=h.useState(null),m=_t(t);m&&(m.onEditChip=async S=>{if(i)try{const k=(await $e(o,a,i)).find(F=>F.name===S.promptId);if(!k?.arguments||k.arguments.length===0)return;g({...S,prompt:k})}catch(R){console.error("[slash] Failed to load prompt for editing:",R),V.error(r("chat.mentionSlash.failedLoadPrompt"))}});const v=h.useRef(null),y=h.useRef(!1),x=async({item:S,range:R})=>{if(J("chat_picker_item_selected",{picker:"/",item_kind:S.kind,item_name:S.name}),y.current=!0,!!i)if(S.kind==="prompt"){if(S.arguments&&S.arguments.length>0){l({range:R,item:S});return}const k=ue(S._meta);await Oe(t,R,i,S.name,k,void 0,{t:r})}else S.kind==="skill"?S.skill&&await br(t,R,s.slug,S.skill,{t:r}):S.uri&&await vr(t,R,i,S.uri,{t:r})},w=async S=>{if(!p||!i)return;const{range:R,item:k}=p,F=ue(k._meta);await Oe(t,R,i,k.name,F,S,{t:r}),l(null)},I=async S=>{if(!(!d||!i)){if(!At(t,d.pos,d.promptId)){V.error(r("chat.mentionSlash.failedUpdatePrompt")),g(null);return}try{const R=await We(i,d.promptId,S),k=ue(d.prompt._meta);t.chain().focus().setNodeSelection(d.pos).deleteSelection().insertContentAt(d.pos,Mt({id:d.promptId,name:Ve(d.promptId,k),metadata:R.messages,char:"/",kind:"prompt",args:S})).run(),J("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:d.promptId})}catch(R){console.error("[slash] Failed to update prompt:",R),V.error(r("chat.mentionSlash.failedUpdatePrompt"))}g(null)}},N=async S=>{const{query:R}=S;if(!i)return[];const[k,F,D]=await Promise.all([$e(o,a,i),wr(o,c,i),yr(o,u,s.slug)]),A=R.trim().toLowerCase(),Q=(k??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.title?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.title,description:C.description,kind:"prompt",arguments:C.arguments,_meta:C._meta})),E=(F??[]).filter(C=>!A||C.uri.toLowerCase().includes(A)||C.name?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name??C.uri,title:C.name,description:C.description,kind:"resource",uri:C.uri})),M=(D??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.id.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.name,description:C.description??void 0,kind:"skill",skill:C}));return[...Q,...E,...M]},T=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 b.jsxs(b.Fragment,{children:[b.jsx(st,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:f,queryFn:N,onSelect:x,onOpenChange:S=>{if(n&&(n.current=S),S)v.current=Date.now(),y.current=!1,J("chat_picker_opened",{picker:"/"});else{const R=v.current;J("chat_picker_closed",{picker:"/",outcome:y.current?"selected":"dismissed",duration_ms:R?Date.now()-R:null}),v.current=null}}}),b.jsx(Ee,{prompt:T,setPrompt:()=>l(null),onSubmit:w}),b.jsx(Ee,{prompt:d?.prompt??null,setPrompt:()=>g(null),onSubmit:I,defaultValues:d?.args},d?`edit-${d.promptId}-${d.pos}`:"edit-idle")]})};async function $e(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}).catch(()=>{}),r?.prompts??[]}async function yr(t,e,n){const r=t.getQueryData(e),o=()=>t.fetchQuery({queryKey:e,queryFn:()=>nn(n),staleTime:6e4});return r?(o().catch(()=>{}),r):o().catch(()=>[])}async function wr(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}).catch(()=>{}),r?.resources??[]}const it="Ask anything, / for prompts & skills, @ for agents & resources...";function Sr(t){return[Kt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Pt.configure({placeholder:()=>t.current??it,showOnlyWhenEditable:!1}),Ot,$t]}function Or({tiptapDoc:t,setTiptapDoc:e,disabled:n=!1,enterToSubmit:r=!1,placeholder:o,onSubmit:s,suggestionOpenRef:i,children:a}){const c=h.useRef(s),u=h.useRef(e),f=h.useRef(r),p=h.useRef(o),l=Dt({extensions:Sr(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":o??it,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(d,g)=>g.key==="Enter"&&!g.shiftKey&&f.current&&!i?.current?(g.preventDefault(),c.current?.(),!0):!1},onUpdate:({editor:d})=>{u.current(d?.getJSON())}});return h.useEffect(()=>{l?.setEditable(!n)},[l,n]),h.useEffect(()=>{c.current=s},[s]),h.useEffect(()=>{u.current=e},[e]),h.useEffect(()=>{f.current=r},[r]),h.useEffect(()=>{p.current=o},[o]),h.useEffect(()=>{if(!l||l.isDestroyed)return;const d=JSON.stringify(l.getJSON()),g=JSON.stringify(t||{type:"doc",content:[]});d!==g&&l.commands.setContent(t||{type:"doc",content:[]})},[l,t]),b.jsx(jt.Provider,{value:{editor:l},children:a})}function $r(t){const e=Y.c(29),{disabled:n,virtualMcpId:r,showFileUploader:o,selectedModel:s,onUnsupportedFile:i,suggestionOpenRef:a,ref:c,className:u}=t,f=n===void 0?!1:n,p=o===void 0?!1:o,{editor:l}=Lt();let d,g;if(e[0]!==l?(d=()=>({focus:()=>{l?.commands.focus()},clear:()=>{l?.commands.clearContent(!0)},appendText:k=>{if(!l)return;const F=l.state.doc.textContent.trim()==="";l.commands.focus("end"),F||l.commands.insertContent(" "),l.commands.insertContent(k)},syncVoiceText:(k,F)=>{if(l&&(l.commands.setContent(k||{type:"doc",content:[]}),F)){l.commands.focus("end");const D=l.state.doc.textContent.trim().length>0;l.commands.insertContent({type:"text",text:D?" "+F:F})}},restoreContent:k=>{l&&l.commands.setContent(k||{type:"doc",content:[]})}}),g=[l],e[0]=l,e[1]=d,e[2]=g):(d=e[1],g=e[2]),h.useImperativeHandle(c??null,d,g),!l)return null;const m=f&&"cursor-not-allowed opacity-70",v=f&&"[&_.ProseMirror]:cursor-not-allowed";let y;e[3]!==u||e[4]!==m||e[5]!==v?(y=Ue("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",u,"[&_.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",m,v),e[3]=u,e[4]=m,e[5]=v,e[6]=y):y=e[6];let x;e[7]!==l||e[8]!==y?(x=b.jsx(Ut,{editor:l,className:y}),e[7]=l,e[8]=y,e[9]=x):x=e[9];const w=r??null;let I;e[10]!==l||e[11]!==a||e[12]!==w?(I=b.jsx(h.Suspense,{fallback:null,children:b.jsx(xr,{editor:l,virtualMcpId:w,suggestionOpenRef:a})}),e[10]=l,e[11]=a,e[12]=w,e[13]=I):I=e[13];const N=r??null;let T;e[14]!==l||e[15]!==a||e[16]!==N?(T=b.jsx(h.Suspense,{fallback:null,children:b.jsx(dr,{editor:l,virtualMcpId:N,suggestionOpenRef:a})}),e[14]=l,e[15]=a,e[16]=N,e[17]=T):T=e[17];let S;e[18]!==f||e[19]!==l||e[20]!==i||e[21]!==s||e[22]!==p?(S=p&&s&&!f?b.jsx(on,{editor:l,selectedModel:s,onUnsupportedFile:i}):null,e[18]=f,e[19]=l,e[20]=i,e[21]=s,e[22]=p,e[23]=S):S=e[23];let R;return e[24]!==I||e[25]!==T||e[26]!==S||e[27]!==x?(R=b.jsxs(b.Fragment,{children:[x,I,T,S]}),e[24]=I,e[25]=T,e[26]=S,e[27]=x,e[28]=R):R=e[28],R}export{Or as T,jr as U,$r as a,rn as p,Lr as u};
1
+ import{c as Y,r as h,b as le,j as b,t as V,T as ct,B as ut,e9 as dt,ea as Ke,eb as ft,ec as z,ed as pe,aO as mt,ee as pt,ef as ge,eg as gt,eh as ht,ei as vt,ej as bt,ek as xt,el as yt,em as wt,en as St,l as Ue,h as Rt,o as qe,a0 as Be,K as ce,q as J,eo as Qe,c_ as Ce,ep as oe}from"./index-EcuFIS2a.js";import{u as Ct,S as Et,a as It,b as kt,s as Pt}from"./hooks-BlE0QZwR.js";import{f as Tt,h as Ft,j as Nt,i as se,k as _t,P as Ee,l as At,c as Mt,u as Dt,n as jt,d as Lt,e as Ot,F as $t,s as Kt,b as Ut}from"./index-DyCAAYSx.js";import{d as qt,h as Bt,c as Qt,b as Ht,D as Vt}from"./dialog-AoC07APJ.js";import{aH as Wt,A as zt}from"./agent-icon-CTsmTxHg.js";import"./chat-context-ELO8A2Ar.js";import{m as Yt,i as Xt,a as Gt}from"./decopilot-BI8eOOPY.js";import{u as He}from"./use-mcp-client-B_gcvvCy.js";import{b as Jt}from"./use-virtual-mcp-Ji9vcgUj.js";import{g as ue,d as Zt,s as Ve}from"./gateway-client-CnYYocwu.js";import{g as en}from"./use-project-scope-CCxyXvEU.js";import{l as Ie,g as We}from"./use-mcp-prompts-DfSKL4Gu.js";import{f as tn,a as nn}from"./use-org-fs-Bf6n51Xm.js";async function rn(t,e,n,r,o,s){if(!Yt(e)){V.error("Selected model does not support file uploads");return}const i=n.type||"application/octet-stream";if(!Xt(i,e)){const c=Gt(e).parts.map(f=>s(f)).join(", "),u=e?.title??"This model";o?o({fileName:n.name,modelName:u,accepted:c}):V.error(`"${n.name}" can't be attached`,{description:`${u} accepts ${c}.`});return}const a=10*1024*1024;if(n.size>a){V.error(`File "${n.name}" exceeds 10MB limit`);return}try{const c=new FileReader,u=new Promise((l,d)=>{c.onload=()=>{const g=c.result;if(typeof g!="string"){d(new Error("Failed to read file as data URL"));return}const m=g.includes(",")?g.split(",")[1]??g:g;l(m)},c.onerror=d});c.readAsDataURL(n);const f=await u,p={id:crypto.randomUUID(),name:n.name,mimeType:n.type||"application/octet-stream",size:n.size,data:f};Tt(t,{from:r,to:r},p)}catch(c){console.error("Failed to process file:",c),V.error(`Failed to load file "${n.name}"`)}}function on(t){const e=Y.c(9),{editor:n,selectedModel:r,onUnsupportedFile:o}=t,s=le(),i=h.useRef(an);let a,c;e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==s?(a=()=>{i.current=async(p,l)=>{await rn(n,r,p,l,o,s)}},c=[n,r,o,s],e[0]=n,e[1]=o,e[2]=r,e[3]=s,e[4]=a,e[5]=c):(a=e[4],c=e[5]),h.useEffect(a,c);let u,f;return e[6]!==n?(u=()=>{if(n?.isDestroyed)return;const p=new Ft("fileDropHandler");n.state.plugins.find(g=>g.spec.key===p)&&n.unregisterPlugin(p);const d=new Nt({key:p,props:{handleDrop:(g,m,v,y)=>{if(y)return!1;const x=m.dataTransfer?.files;if(!x||x.length===0)return!1;m.preventDefault();const w=g.posAtCoords({left:m.clientX,top:m.clientY});if(!w)return!1;const I=Array.from(x);return(async()=>{let N=w.pos;for(const T of I)await i.current?.(T,N),N=g.state.selection.to})(),!0},handlePaste:(g,m)=>{const v=m.clipboardData?.items;if(!v)return!1;const y=Array.from(v).filter(sn);return y.length===0?!1:(m.preventDefault(),(async()=>{let x=g.state.selection.from;for(const w of y){const I=w.getAsFile();I&&(await i.current?.(I,x),x=g.state.selection.to)}})(),!0)}}});return n.registerPlugin(d),()=>{n?.isDestroyed||n.unregisterPlugin(p)}},f=[n],e[6]=n,e[7]=u,e[8]=f):(u=e[7],f=e[8]),h.useEffect(u,f),null}function sn(t){return t.kind==="file"}function an(){return Promise.resolve()}function jr(t){const e=Y.c(43),{info:n,onClose:r}=t,o=le(),s=n!==null;let i;e[0]!==r?(i=A=>!A&&r(),e[0]=r,e[1]=i):i=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=["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]=a):a=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=b.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:a.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=c):c=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:b.jsx(ct,{size:18})}),e[4]=u):u=e[4];let f;e[5]!==o?(f=o("chat.uploader.fileTypeNotSupported"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=b.jsx(qt,{className:"text-xl font-semibold tracking-tight",children:f}),e[7]=f,e[8]=p):p=e[8];const l=n?.fileName;let d;e[9]!==l?(d=b.jsxs("span",{className:"font-medium text-foreground",children:["“",l,"”"]}),e[9]=l,e[10]=d):d=e[10];let g;e[11]!==o?(g=o("chat.uploader.cantAttachToChat"),e[11]=o,e[12]=g):g=e[12];let m;e[13]!==g||e[14]!==d?(m=b.jsxs(Bt,{className:"mt-1.5 text-sm leading-relaxed",children:[d," ",g]}),e[13]=g,e[14]=d,e[15]=m):m=e[15];let v;e[16]!==m||e[17]!==p?(v=b.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[c,b.jsxs(Qt,{className:"relative gap-4",children:[u,b.jsxs("div",{children:[p,m]})]})]}),e[16]=m,e[17]=p,e[18]=v):v=e[18];const y=n?.modelName??"";let x;e[19]!==o||e[20]!==y?(x=o("chat.uploader.accepts",{modelName:y}),e[19]=o,e[20]=y,e[21]=x):x=e[21];let w;e[22]!==x?(w=b.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:x}),e[22]=x,e[23]=w):w=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=b.jsx(Wt,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const N=n?.accepted;let T;e[25]!==N?(T=b.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,b.jsx("span",{className:"capitalize",children:N})]}),e[25]=N,e[26]=T):T=e[26];let S;e[27]!==w||e[28]!==T?(S=b.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:b.jsxs("div",{className:"rounded-xl border border-border p-4",children:[w,T]})}),e[27]=w,e[28]=T,e[29]=S):S=e[29];let R;e[30]!==o?(R=o("chat.uploader.gotIt"),e[30]=o,e[31]=R):R=e[31];let k;e[32]!==r||e[33]!==R?(k=b.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:b.jsx(ut,{onClick:r,children:R})}),e[32]=r,e[33]=R,e[34]=k):k=e[34];let F;e[35]!==v||e[36]!==S||e[37]!==k?(F=b.jsxs(Ht,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ln,children:[v,S,k]}),e[35]=v,e[36]=S,e[37]=k,e[38]=F):F=e[38];let D;return e[39]!==s||e[40]!==i||e[41]!==F?(D=b.jsx(Vt,{open:s,onOpenChange:i,children:F}),e[39]=s,e[40]=i,e[41]=F,e[42]=D):D=e[42],D}function ln(t){return t.preventDefault()}function Lr(){const t=Y.c(3),[e,n]=h.useState(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>n(null),t[0]=r):r=t[0];let o;return t[1]!==e?(o={unsupportedFile:e,onUnsupportedFile:n,clearUnsupportedFile:r},t[1]=e,t[2]=o):o=t[2],o}var cn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],xe=cn.join(","),ze=typeof Element>"u",ie=ze?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fe=!ze&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},me=function(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):me(e.parentNode));return i},un=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},dn=function(e,n,r){if(me(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(xe));return n&&ie.call(e,xe)&&o.unshift(e),o=o.filter(r),o},ye=function(e,n,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!me(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,u=ye(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var f=ie.call(i,xe);f&&r.filter(i)&&(n||!e.includes(i))&&o.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),l=!me(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&l){var d=ye(p===!0?i.children:p.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},Ye=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||un(e))&&!Ye(e)?0:e.tabIndex},fn=function(e,n){var r=Xe(e);return r<0&&n&&!Ye(e)?0:r},mn=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ge=function(e){return e.tagName==="INPUT"},pn=function(e){return Ge(e)&&e.type==="hidden"},gn=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},hn=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},vn=function(e){if(!e.name)return!0;var n=e.form||fe(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=hn(o,e.form);return!s||s===e},bn=function(e){return Ge(e)&&e.type==="radio"},xn=function(e){return bn(e)&&!vn(e)},yn=function(e){var n,r=e&&fe(e),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var i,a,c;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!s&&o;){var u,f,p;r=fe(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=o)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},ke=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},wn=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=ie.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(ie.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var c=e;e;){var u=e.parentElement,f=fe(e);if(u&&!u.shadowRoot&&o(u)===!0)return ke(e);e.assignedSlot?e=e.assignedSlot:!u&&f!==e.ownerDocument?e=f.host:e=u}e=c}if(yn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ke(e);return!1},Sn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ie.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Rn=function(e,n){return!(n.disabled||pn(n)||wn(n,e)||gn(n)||Sn(n))},Pe=function(e,n){return!(xn(n)||Xe(n)<0||!Rn(e,n))},Cn=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Je=function(e){var n=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,c=fn(a,i),u=i?Je(o.candidates):a;c===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:o,isScope:i,content:u})}),r.sort(mn).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ze=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ye([e],n.includeContainer,{filter:Pe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Cn}):r=dn(e,n.includeContainer,Pe.bind(null,n)),Je(r)};function En(){return/apple/i.test(navigator.vendor)}const Te="data-floating-ui-focusable";function In(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function we(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&dt(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function re(t){return"composedPath"in t?t.composedPath()[0]:t.target}function he(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function kn(t){return t.matches("html,body")}function ae(t){return t?.ownerDocument||document}function Pn(t){return t?t.hasAttribute(Te)?t:t.querySelector("["+Te+"]")||t:null}function de(t,e,n){return n===void 0&&(n=!0),t.filter(o=>{var s;return o.parentId===e&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...de(t,o.id,n)])}function Tn(t){return"nativeEvent"in t}var Fn=typeof document<"u",Nn=function(){},Z=Fn?h.useLayoutEffect:Nn;const _n={...Ke},An=_n.useInsertionEffect,Mn=An||(t=>t());function te(t){const e=h.useRef(()=>{});return Mn(()=>{e.current=t}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const et=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tt(t,e){const n=Ze(t,et()),r=n.length;if(r===0)return;const o=In(ae(t)),s=n.indexOf(o),i=s===-1?e===1?0:r-1:s+e;return n[i]}function Dn(t){return tt(ae(t).body,1)||t}function jn(t){return tt(ae(t).body,-1)||t}function ve(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!we(n,r)}function Ln(t){Ze(t,et()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Fe(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const On="data-floating-ui-focusable",Ne="active",_e="selected",$n={...Ke};let Ae=!1,Kn=0;const Me=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kn++;function Un(){const[t,e]=h.useState(()=>Ae?Me():void 0);return Z(()=>{t==null&&e(Me())},[]),h.useEffect(()=>{Ae=!0},[]),t}const qn=$n.useId,Se=qn||Un;function Bn(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Qn=h.createContext(null),Hn=h.createContext(null),nt=()=>{var t;return((t=h.useContext(Qn))==null?void 0:t.id)||null},rt=()=>h.useContext(Hn);function Re(t){return"data-floating-ui-"+t}const Vn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},De=h.forwardRef(function(e,n){const[r,o]=h.useState();Z(()=>{En()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Re("focus-guard")]:"",style:Vn};return b.jsx("span",{...e,...s})}),Wn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ot=h.createContext(null),je=Re("portal");function zn(t){t===void 0&&(t={});const{id:e,root:n}=t,r=Se(),o=Xn(),[s,i]=h.useState(null),a=h.useRef(null);return Z(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),Z(()=>{if(!r||a.current)return;const c=e?document.getElementById(e):null;if(!c)return;const u=document.createElement("div");u.id=r,u.setAttribute(je,""),c.appendChild(u),a.current=u,i(u)},[e,r]),Z(()=>{if(n===null||!r||a.current)return;let c=n||o?.portalNode;c&&!bt(c)&&(c=c.current),c=c||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,c.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(je,""),c=u||c,c.appendChild(f),a.current=f,i(f)},[e,n,r,o]),s}function Yn(t){const{children:e,id:n,root:r,preserveTabOrder:o=!0}=t,s=zn({id:n,root:r}),[i,a]=h.useState(null),c=h.useRef(null),u=h.useRef(null),f=h.useRef(null),p=h.useRef(null),l=i?.modal,d=i?.open,g=!!i&&!i.modal&&i.open&&o&&!!(r||s);return h.useEffect(()=>{if(!s||!o||l)return;function m(v){s&&ve(v)&&(v.type==="focusin"?Fe:Ln)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,l]),h.useEffect(()=>{s&&(d||Fe(s))},[d,s]),b.jsxs(ot.Provider,{value:h.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:p,portalNode:s,setFocusManagerState:a}),[o,s]),children:[g&&s&&b.jsx(De,{"data-type":"outside",ref:c,onFocus:m=>{if(ve(m,s)){var v;(v=f.current)==null||v.focus()}else{const y=i?i.domReference:null,x=jn(y);x?.focus()}}}),g&&s&&b.jsx("span",{"aria-owns":s.id,style:Wn}),s&&mt.createPortal(e,s),g&&s&&b.jsx(De,{"data-type":"outside",ref:u,onFocus:m=>{if(ve(m,s)){var v;(v=p.current)==null||v.focus()}else{const y=i?i.domReference:null,x=Dn(y);x?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const Xn=()=>h.useContext(ot),Gn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Jn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Le=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function Zn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=t,{enabled:i=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:l=!1,bubbles:d,capture:g}=e,m=rt(),v=te(typeof c=="function"?c:()=>!1),y=typeof c=="function"?v:c,x=h.useRef(!1),{escapeKey:w,outsidePress:I}=Le(d),{escapeKey:N,outsidePress:T}=Le(g),S=h.useRef(!1),R=te(E=>{var M;if(!n||!i||!a||E.key!=="Escape"||S.current)return;const C=(M=s.current.floatingContext)==null?void 0:M.nodeId,$=m?de(m.nodesRef.current,C):[];if(!w&&(E.stopPropagation(),$.length>0)){let P=!0;if($.forEach(L=>{var O;if((O=L.context)!=null&&O.open&&!L.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,Tn(E)?E.nativeEvent:E,"escape-key")}),k=te(E=>{var M;const C=()=>{var $;R(E),($=re(E))==null||$.removeEventListener("keydown",C)};(M=re(E))==null||M.addEventListener("keydown",C)}),F=te(E=>{var M;const C=s.current.insideReactTree;s.current.insideReactTree=!1;const $=x.current;if(x.current=!1,u==="click"&&$||C||typeof y=="function"&&!y(E))return;const P=re(E),L="["+Re("inert")+"]",O=ae(o.floating).querySelectorAll(L);let H=z(P)?P:null;for(;H&&!ge(H);){const j=gt(H);if(ge(j)||!z(j))break;H=j}if(O.length&&z(P)&&!kn(P)&&!we(P,o.floating)&&Array.from(O).every(j=>!we(H,j)))return;if(ht(P)&&Q){const j=ge(P),K=vt(P),W=/auto|scroll/,q=j||W.test(K.overflowX),U=j||W.test(K.overflowY),ee=q&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,B=U&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,ne=K.direction==="rtl",at=B&&(ne?E.offsetX<=P.offsetWidth-P.clientWidth:E.offsetX>P.clientWidth),lt=ee&&E.offsetY>P.clientHeight;if(at||lt)return}const G=(M=s.current.floatingContext)==null?void 0:M.nodeId,X=m&&de(m.nodesRef.current,G).some(j=>{var K;return he(E,(K=j.context)==null?void 0:K.elements.floating)});if(he(E,o.floating)||he(E,o.domReference)||X)return;const _=m?de(m.nodesRef.current,G):[];if(_.length>0){let j=!0;if(_.forEach(K=>{var W;if((W=K.context)!=null&&W.open&&!K.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}r(!1,E,"outside-press")}),D=te(E=>{var M;const C=()=>{var $;F(E),($=re(E))==null||$.removeEventListener(u,C)};(M=re(E))==null||M.addEventListener(u,C)});h.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=I;let E=-1;function M(O){r(!1,O,"ancestor-scroll")}function C(){window.clearTimeout(E),S.current=!0}function $(){E=window.setTimeout(()=>{S.current=!1},pt()?5:0)}const P=ae(o.floating);a&&(P.addEventListener("keydown",N?k:R,N),P.addEventListener("compositionstart",C),P.addEventListener("compositionend",$)),y&&P.addEventListener(u,T?D:F,T);let L=[];return l&&(z(o.domReference)&&(L=pe(o.domReference)),z(o.floating)&&(L=L.concat(pe(o.floating))),!z(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(pe(o.reference.contextElement)))),L=L.filter(O=>{var H;return O!==((H=P.defaultView)==null?void 0:H.visualViewport)}),L.forEach(O=>{O.addEventListener("scroll",M,{passive:!0})}),()=>{a&&(P.removeEventListener("keydown",N?k:R,N),P.removeEventListener("compositionstart",C),P.removeEventListener("compositionend",$)),y&&P.removeEventListener(u,T?D:F,T),L.forEach(O=>{O.removeEventListener("scroll",M)}),window.clearTimeout(E)}},[s,o,a,y,u,n,r,l,i,w,I,R,N,k,F,T,D]),h.useEffect(()=>{s.current.insideReactTree=!1},[s,y,u]);const A=h.useMemo(()=>({onKeyDown:R,...f&&{[Gn[p]]:E=>{r(!1,E.nativeEvent,"reference-press")},...p!=="click"&&{onClick(E){r(!1,E.nativeEvent,"reference-press")}}}}),[R,r,f,p]),Q=h.useMemo(()=>{function E(M){M.button===0&&(x.current=!0)}return{onKeyDown:R,onMouseDown:E,onMouseUp:E,[Jn[u]]:()=>{s.current.insideReactTree=!0}}},[R,u,s]);return h.useMemo(()=>i?{reference:A,floating:Q}:{},[i,A,Q])}function er(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=Se(),s=h.useRef({}),[i]=h.useState(()=>Bn()),a=nt()!=null,[c,u]=h.useState(r.reference),f=te((d,g,m)=>{s.current.openEvent=d?g:void 0,i.emit("openchange",{open:d,event:g,reason:m,nested:a}),n?.(d,g,m)}),p=h.useMemo(()=>({setPositionReference:u}),[]),l=h.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return h.useMemo(()=>({dataRef:s,open:e,onOpenChange:f,elements:l,events:i,floatingId:o,refs:p}),[e,f,l,i,o,p])}function tr(t){t===void 0&&(t={});const{nodeId:e}=t,n=er({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[s,i]=h.useState(null),[a,c]=h.useState(null),f=o?.domReference||s,p=h.useRef(null),l=rt();Z(()=>{f&&(p.current=f)},[f]);const d=ft({...t,elements:{...o,...a&&{reference:a}}}),g=h.useCallback(w=>{const I=z(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(I),d.refs.setReference(I)},[d.refs]),m=h.useCallback(w=>{(z(w)||w===null)&&(p.current=w,i(w)),(z(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!z(w))&&d.refs.setReference(w)},[d.refs]),v=h.useMemo(()=>({...d.refs,setReference:m,setPositionReference:g,domReference:p}),[d.refs,m,g]),y=h.useMemo(()=>({...d.elements,domReference:f}),[d.elements,f]),x=h.useMemo(()=>({...d,...r,refs:v,elements:y,nodeId:e}),[d,v,y,e,r]);return Z(()=>{r.dataRef.current.floatingContext=x;const w=l?.nodesRef.current.find(I=>I.id===e);w&&(w.context=x)}),h.useMemo(()=>({...d,context:x,refs:v,elements:y}),[d,v,y,x])}function be(t,e,n){const r=new Map,o=n==="item";let s=t;if(o&&t){const{[Ne]:i,[_e]:a,...c}=t;s=c}return{...n==="floating"&&{tabIndex:-1,[On]:""},...s,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(c=>{let[u,f]=c;if(!(o&&[Ne,_e].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var p;(p=r.get(u))==null||p.push(f),i[u]=function(){for(var l,d=arguments.length,g=new Array(d),m=0;m<d;m++)g[m]=arguments[m];return(l=r.get(u))==null?void 0:l.map(v=>v(...g)).find(v=>v!==void 0)}}}else i[u]=f}),i),{})}}function nr(t){t===void 0&&(t=[]);const e=t.map(a=>a?.reference),n=t.map(a=>a?.floating),r=t.map(a=>a?.item),o=h.useCallback(a=>be(a,t,"reference"),e),s=h.useCallback(a=>be(a,t,"floating"),n),i=h.useCallback(a=>be(a,t,"item"),r);return h.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const rr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function or(t,e){var n,r;e===void 0&&(e={});const{open:o,elements:s,floatingId:i}=t,{enabled:a=!0,role:c="dialog"}=e,u=Se(),f=((n=s.domReference)==null?void 0:n.id)||u,p=h.useMemo(()=>{var x;return((x=Pn(s.floating))==null?void 0:x.id)||i},[s.floating,i]),l=(r=rr.get(c))!=null?r:c,g=nt()!=null,m=h.useMemo(()=>l==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":o?p:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:f},...l==="menu"&&g&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[l,p,g,o,f,c]),v=h.useMemo(()=>{const x={id:p,...l&&{role:l}};return l==="tooltip"||c==="label"?x:{...x,...l==="menu"&&{"aria-labelledby":f}}},[l,p,f,c]),y=h.useCallback(x=>{let{active:w,selected:I}=x;const N={role:"option",...w&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...N,"aria-selected":I}}return{}},[p,c]);return h.useMemo(()=>a?{reference:m,floating:v,item:y}:{},[a,m,v,y])}function sr({children:t}){const{state:e,dispatch:n}=It(),{open:r,element:o}=e,s=()=>{n({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:c}=tr({placement:"bottom-start",open:r,onOpenChange:l=>{l||s()},elements:{reference:o},middleware:[xt(10),yt(),wt()],whileElementsMounted:St}),u=Zn(c,{outsidePress:l=>!(l.target instanceof Element&&l.target.closest(".ProseMirror"))}),f=or(c,{role:"listbox"}),{getFloatingProps:p}=nr([u,f]);return r?b.jsx(Yn,{children:b.jsx("div",{ref:i.setFloating,style:a,...p(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:t})}):null}const ir=t=>{const e=Y.c(29),{item:n,isSelected:r,onSelect:o,isLoading:s,ref:i}=t;let a;if(e[0]!==n){const T=ue(n._meta);a=n.title||Zt(n.name,T),e[0]=n,e[1]=a}else a=e[1];const c=a,u=n.description||null,f=n.icon,p=r&&"bg-accent text-accent-foreground",l=s&&"pointer-events-none opacity-50";let d;e[2]!==p||e[3]!==l?(d=Ue("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",p,l),e[2]=p,e[3]=l,e[4]=d):d=e[4];let g;e[5]!==f||e[6]!==c?(g=f!==void 0&&b.jsx(zt,{icon:f,name:c,size:"xs",className:"mr-2"}),e[5]=f,e[6]=c,e[7]=g):g=e[7];let m;e[8]!==c?(m=b.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),e[8]=c,e[9]=m):m=e[9];let v;e[10]!==s?(v=s&&b.jsx(Rt,{size:"xs"}),e[10]=s,e[11]=v):v=e[11];let y;e[12]!==m||e[13]!==v?(y=b.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m,v]}),e[12]=m,e[13]=v,e[14]=y):y=e[14];let x;e[15]!==u?(x=u&&b.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:u}),e[15]=u,e[16]=x):x=e[16];let w;e[17]!==y||e[18]!==x?(w=b.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[y,x]}),e[17]=y,e[18]=x,e[19]=w):w=e[19];let I;e[20]!==n.drillable?(I=n.drillable&&b.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"}),e[20]=n.drillable,e[21]=I):I=e[21];let N;return e[22]!==o||e[23]!==i||e[24]!==w||e[25]!==I||e[26]!==d||e[27]!==g?(N=b.jsxs("div",{ref:i,onClick:o,className:d,children:[g,w,I]}),e[22]=o,e[23]=i,e[24]=w,e[25]=I,e[26]=d,e[27]=g,e[28]=N):N=e[28],N},ar=t=>{const e=Y.c(21),{editor:n,queryKey:r,queryFn:o,onSelect:s}=t,i=le();let a;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==r?(a={editor:n,queryKey:r,queryFn:o,onSelect:s},e[0]=n,e[1]=s,e[2]=o,e[3]=r,e[4]=a):a=e[4];const{items:c,selectedIndex:u,onSelect:f,selectedItem:p}=kt(a);if(!c.length){let m;e[5]!==i?(m=i("chat.mention.noItemsFound"),e[5]=i,e[6]=m):m=e[6];let v;return e[7]!==m?(v=b.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:m}),e[7]=m,e[8]=v):v=e[8],v}let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[9]=l):l=e[9];let d;if(e[10]!==f||e[11]!==c||e[12]!==u||e[13]!==p?.name){let m;e[15]!==f||e[16]!==u||e[17]!==p?.name?(m=(v,y)=>b.jsx(ir,{item:v,isSelected:y===u,ref:y===u?ur:void 0,onSelect:()=>f(v,y),isLoading:p?.name===v.name},`${v.kind??"item"}:${v.name}`),e[15]=f,e[16]=u,e[17]=p?.name,e[18]=m):m=e[18],d=c.map(m),e[10]=f,e[11]=c,e[12]=u,e[13]=p?.name,e[14]=d}else d=e[14];let g;return e[19]!==d?(g=b.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:l,children:b.jsx("div",{className:"p-1",children:d})}),e[19]=d,e[20]=g):g=e[20],g};function lr(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"p-1",children:[...Array(3)].map(cr)}),t[0]=e):e=t[0],e}function cr(t,e){return b.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[b.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),b.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function st(t){const e=Y.c(18),{editor:n,char:r,pluginKey:o,queryKey:s,queryFn:i,onSelect:a,allow:c,onOpenChange:u}=t;let f;e[0]!==c||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==o?(f={editor:n,char:r,pluginKey:o,allow:c,onOpenChange:u},e[0]=c,e[1]=r,e[2]=n,e[3]=u,e[4]=o,e[5]=f):f=e[5];const{state:p,dispatch:l}=Ct(f);let d;e[6]!==l||e[7]!==p?(d={state:p,dispatch:l},e[6]=l,e[7]=p,e[8]=d):d=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=b.jsx(lr,{}),e[9]=g):g=e[9];let m;e[10]!==n||e[11]!==a||e[12]!==i||e[13]!==s?(m=b.jsx(sr,{children:b.jsx(h.Suspense,{fallback:g,children:b.jsx(ar,{editor:n,queryKey:s,queryFn:i,onSelect:a})})}),e[10]=n,e[11]=a,e[12]=i,e[13]=s,e[14]=m):m=e[14];let v;return e[15]!==d||e[16]!==m?(v=b.jsx(Et.Provider,{value:d,children:m}),e[15]=d,e[16]=m,e[17]=v):v=e[17],v}function ur(t){t&&t.scrollIntoView({block:"center",behavior:"smooth"})}const dr=t=>{const e=Y.c(53),{editor:n,virtualMcpId:r,suggestionOpenRef:o}=t,s=le(),i=qe(),{org:a}=Be(),c=Jt();let u;e[0]!==c?(u=en(c),e[0]=c,e[1]=u):u=e[1];const f=u;let p;e[2]!==a.id||e[3]!==a.slug||e[4]!==r?(p={connectionId:r,orgId:a.id,orgSlug:a.slug},e[2]=a.id,e[3]=a.slug,e[4]=r,e[5]=p):p=e[5];const l=He(p);let d;e[6]!==a.id||e[7]!==r?(d=ce.virtualMcpResources(r,a.id),e[6]=a.id,e[7]=r,e[8]=d):d=e[8];const g=d,[m,v]=h.useState("categories");let y;e[9]!==m?(y=()=>m,e[9]=m,e[10]=y):y=e[10];const x=h.useEffectEvent(y),w=h.useRef(null),I=h.useRef(!1),N=r??"default";let T;e[11]!==m||e[12]!==a.id||e[13]!==N?(T=["at-mention",a.id,N,m],e[11]=m,e[12]=a.id,e[13]=N,e[14]=T):T=e[14];const S=T;let R;e[15]!==s?(R=s("chat.mentionAt.agentsTitle"),e[15]=s,e[16]=R):R=e[16];let k;e[17]!==s?(k=s("chat.mentionAt.agentsDescription"),e[17]=s,e[18]=k):k=e[18];let F;e[19]!==R||e[20]!==k?(F={name:"agents",title:R,description:k,kind:"category",drillable:!0},e[19]=R,e[20]=k,e[21]=F):F=e[21];let D;e[22]!==s?(D=s("chat.mentionAt.resourcesTitle"),e[22]=s,e[23]=D):D=e[23];let A;e[24]!==s?(A=s("chat.mentionAt.resourcesDescription"),e[24]=s,e[25]=A):A=e[25];let Q;e[26]!==D||e[27]!==A?(Q={name:"resources",title:D,description:A,kind:"category",drillable:!0},e[26]=D,e[27]=A,e[28]=Q):Q=e[28];let E;e[29]!==Q||e[30]!==F?(E=[F,Q],e[29]=Q,e[30]=F,e[31]=E):E=e[31];const M=E;let C;e[32]!==l||e[33]!==n||e[34]!==s?(C=async X=>{const{item:_,range:j}=X;if(J("chat_picker_item_selected",{picker:"@",item_kind:_.kind,item_name:_.name}),_.kind!=="category"&&(I.current=!0),_.kind==="category")return v(_.name==="agents"?"agents":"resources"),!1;if(_.kind==="agent"&&_.agentId){se(n,j,{id:_.agentId,name:_.name,metadata:{agentId:_.agentId,title:_.name},char:"@"}),v("categories");return}if(_.kind==="resource"&&_.uri&&l){try{const K=await Qe(l,_.uri);se(n,j,{id:_.uri,name:_.uri,metadata:K.contents,char:"@"})}catch(K){console.error("[at-mention] Failed to fetch resource:",K),V.error(s("chat.mentionAt.failedToLoadResource"))}v("categories");return}},e[32]=l,e[33]=n,e[34]=s,e[35]=C):C=e[35];const $=C;let P;e[36]!==c||e[37]!==M||e[38]!==l||e[39]!==f||e[40]!==x||e[41]!==i||e[42]!==g||e[43]!==r?(P=async X=>{const{query:_}=X,j=x();if(j==="categories"){if(!_.trim())return M;const q=_.toLowerCase(),U=c.filter(B=>B.status==="active"&&(!B.id||!Ce(B.id))&&!f.has(B.id)&&B.id!==r&&(B.title.toLowerCase().includes(q)||B.description?.toLowerCase().includes(q))).map(fr),ee=await(async()=>{if(!l)return[];let B=i.getQueryData(g);return B||(B=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4})),(B?.resources??[]).filter(ne=>ne.uri.toLowerCase().includes(q)||ne.name?.toLowerCase().includes(q)||ne.description?.toLowerCase().includes(q)).map(mr)})();return[...U,...ee]}if(j==="agents"){let q=c.filter(U=>U.status==="active"&&(!U.id||!Ce(U.id))&&!f.has(U.id)&&U.id!==r);if(_.trim()){const U=_.toLowerCase();q=q.filter(ee=>ee.title.toLowerCase().includes(U)||ee.description?.toLowerCase().includes(U))}return q.map(pr)}if(!l)return[];let K=i.getQueryData(g);K?i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4}).catch(gr):K=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4});let W=K?.resources??[];if(_.trim()){const q=_.toLowerCase();W=W.filter(U=>U.uri.toLowerCase().includes(q)||U.name?.toLowerCase().includes(q)||U.description?.toLowerCase().includes(q))}return W.map(hr)},e[36]=c,e[37]=M,e[38]=l,e[39]=f,e[40]=x,e[41]=i,e[42]=g,e[43]=r,e[44]=P):P=e[44];const L=P;let O;e[45]!==o?(O=X=>{if(o&&(o.current=X),X)w.current=Date.now(),I.current=!1,J("chat_picker_opened",{picker:"@"});else{const _=w.current;J("chat_picker_closed",{picker:"@",outcome:I.current?"selected":"dismissed",duration_ms:_?Date.now()-_:null}),w.current=null,v("categories")}},e[45]=o,e[46]=O):O=e[46];const H=O;let G;return e[47]!==n||e[48]!==L||e[49]!==$||e[50]!==H||e[51]!==S?(G=b.jsx(st,{editor:n,char:"@",pluginKey:"atDropdownMenu",queryKey:S,queryFn:L,onSelect:$,onOpenChange:H}),e[47]=n,e[48]=L,e[49]=$,e[50]=H,e[51]=S,e[52]=G):G=e[52],G};function fr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function mr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function pr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function gr(){}function hr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function Oe(t,e,n,r,o,s,i){try{const a=await We(n,r,s);se(t,e,{id:r,name:Ve(r,o),metadata:a.messages,char:"/",kind:"prompt",args:s})}catch(a){console.error("[slash] Failed to fetch prompt:",a),V.error(i.t("chat.mentionSlash.failedLoadPrompt"))}}async function vr(t,e,n,r,o){try{const s=await Qe(n,r);se(t,e,{id:r,name:r,metadata:s.contents,char:"/",kind:"resource"})}catch(s){console.error("[slash] Failed to fetch resource:",s),V.error(o.t("chat.mentionSlash.failedLoadResource"))}}async function br(t,e,n,r,o){try{const{files:s,omittedPaths:i}=await tn(n,r.volume,r.path),a={sandboxPath:r.sandboxPath,volume:r.volume,path:r.path,files:s,omittedPaths:i};se(t,e,{id:r.id,name:r.name,metadata:a,char:"/",kind:"skill"})}catch(s){console.error("[slash] Failed to fetch skill:",s),V.error(o.t("chat.mentionSlash.failedLoadSkill"))}}const xr=({editor:t,virtualMcpId:e,suggestionOpenRef:n})=>{const r=le(),o=qe(),{org:s}=Be(),i=He({connectionId:e,orgId:s.id,orgSlug:s.slug}),a=ce.virtualMcpPrompts(e,s.id),c=ce.virtualMcpResources(e,s.id),u=ce.slashSkills(s.id),f=["slash-mention",s.id,e??"default"],[p,l]=h.useState(null),[d,g]=h.useState(null),m=_t(t);m&&(m.onEditChip=async S=>{if(i)try{const k=(await $e(o,a,i)).find(F=>F.name===S.promptId);if(!k?.arguments||k.arguments.length===0)return;g({...S,prompt:k})}catch(R){console.error("[slash] Failed to load prompt for editing:",R),V.error(r("chat.mentionSlash.failedLoadPrompt"))}});const v=h.useRef(null),y=h.useRef(!1),x=async({item:S,range:R})=>{if(J("chat_picker_item_selected",{picker:"/",item_kind:S.kind,item_name:S.name}),y.current=!0,!!i)if(S.kind==="prompt"){if(S.arguments&&S.arguments.length>0){l({range:R,item:S});return}const k=ue(S._meta);await Oe(t,R,i,S.name,k,void 0,{t:r})}else S.kind==="skill"?S.skill&&await br(t,R,s.slug,S.skill,{t:r}):S.uri&&await vr(t,R,i,S.uri,{t:r})},w=async S=>{if(!p||!i)return;const{range:R,item:k}=p,F=ue(k._meta);await Oe(t,R,i,k.name,F,S,{t:r}),l(null)},I=async S=>{if(!(!d||!i)){if(!At(t,d.pos,d.promptId)){V.error(r("chat.mentionSlash.failedUpdatePrompt")),g(null);return}try{const R=await We(i,d.promptId,S),k=ue(d.prompt._meta);t.chain().focus().setNodeSelection(d.pos).deleteSelection().insertContentAt(d.pos,Mt({id:d.promptId,name:Ve(d.promptId,k),metadata:R.messages,char:"/",kind:"prompt",args:S})).run(),J("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:d.promptId})}catch(R){console.error("[slash] Failed to update prompt:",R),V.error(r("chat.mentionSlash.failedUpdatePrompt"))}g(null)}},N=async S=>{const{query:R}=S;if(!i)return[];const[k,F,D]=await Promise.all([$e(o,a,i),wr(o,c,i),yr(o,u,s.slug)]),A=R.trim().toLowerCase(),Q=(k??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.title?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.title,description:C.description,kind:"prompt",arguments:C.arguments,_meta:C._meta})),E=(F??[]).filter(C=>!A||C.uri.toLowerCase().includes(A)||C.name?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name??C.uri,title:C.name,description:C.description,kind:"resource",uri:C.uri})),M=(D??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.id.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.name,description:C.description??void 0,kind:"skill",skill:C}));return[...Q,...E,...M]},T=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 b.jsxs(b.Fragment,{children:[b.jsx(st,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:f,queryFn:N,onSelect:x,onOpenChange:S=>{if(n&&(n.current=S),S)v.current=Date.now(),y.current=!1,J("chat_picker_opened",{picker:"/"});else{const R=v.current;J("chat_picker_closed",{picker:"/",outcome:y.current?"selected":"dismissed",duration_ms:R?Date.now()-R:null}),v.current=null}}}),b.jsx(Ee,{prompt:T,setPrompt:()=>l(null),onSubmit:w}),b.jsx(Ee,{prompt:d?.prompt??null,setPrompt:()=>g(null),onSubmit:I,defaultValues:d?.args},d?`edit-${d.promptId}-${d.pos}`:"edit-idle")]})};async function $e(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}).catch(()=>{}),r?.prompts??[]}async function yr(t,e,n){const r=t.getQueryData(e),o=()=>t.fetchQuery({queryKey:e,queryFn:()=>nn(n),staleTime:6e4});return r?(o().catch(()=>{}),r):o().catch(()=>[])}async function wr(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}).catch(()=>{}),r?.resources??[]}const it="Ask anything, / for prompts & skills, @ for agents & resources...";function Sr(t){return[Kt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Pt.configure({placeholder:()=>t.current??it,showOnlyWhenEditable:!1}),Ot,$t]}function Or({tiptapDoc:t,setTiptapDoc:e,disabled:n=!1,enterToSubmit:r=!1,placeholder:o,onSubmit:s,suggestionOpenRef:i,children:a}){const c=h.useRef(s),u=h.useRef(e),f=h.useRef(r),p=h.useRef(o),l=Dt({extensions:Sr(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":o??it,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(d,g)=>g.key==="Enter"&&!g.shiftKey&&f.current&&!i?.current?(g.preventDefault(),c.current?.(),!0):!1},onUpdate:({editor:d})=>{u.current(d?.getJSON())}});return h.useEffect(()=>{l?.setEditable(!n)},[l,n]),h.useEffect(()=>{c.current=s},[s]),h.useEffect(()=>{u.current=e},[e]),h.useEffect(()=>{f.current=r},[r]),h.useEffect(()=>{p.current=o},[o]),h.useEffect(()=>{if(!l||l.isDestroyed)return;const d=JSON.stringify(l.getJSON()),g=JSON.stringify(t||{type:"doc",content:[]});d!==g&&l.commands.setContent(t||{type:"doc",content:[]})},[l,t]),b.jsx(jt.Provider,{value:{editor:l},children:a})}function $r(t){const e=Y.c(29),{disabled:n,virtualMcpId:r,showFileUploader:o,selectedModel:s,onUnsupportedFile:i,suggestionOpenRef:a,ref:c,className:u}=t,f=n===void 0?!1:n,p=o===void 0?!1:o,{editor:l}=Lt();let d,g;if(e[0]!==l?(d=()=>({focus:()=>{l?.commands.focus()},clear:()=>{l?.commands.clearContent(!0)},appendText:k=>{if(!l)return;const F=l.state.doc.textContent.trim()==="";l.commands.focus("end"),F||l.commands.insertContent(" "),l.commands.insertContent(k)},syncVoiceText:(k,F)=>{if(l&&(l.commands.setContent(k||{type:"doc",content:[]}),F)){l.commands.focus("end");const D=l.state.doc.textContent.trim().length>0;l.commands.insertContent({type:"text",text:D?" "+F:F})}},restoreContent:k=>{l&&l.commands.setContent(k||{type:"doc",content:[]})}}),g=[l],e[0]=l,e[1]=d,e[2]=g):(d=e[1],g=e[2]),h.useImperativeHandle(c??null,d,g),!l)return null;const m=f&&"cursor-not-allowed opacity-70",v=f&&"[&_.ProseMirror]:cursor-not-allowed";let y;e[3]!==u||e[4]!==m||e[5]!==v?(y=Ue("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",u,"[&_.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",m,v),e[3]=u,e[4]=m,e[5]=v,e[6]=y):y=e[6];let x;e[7]!==l||e[8]!==y?(x=b.jsx(Ut,{editor:l,className:y}),e[7]=l,e[8]=y,e[9]=x):x=e[9];const w=r??null;let I;e[10]!==l||e[11]!==a||e[12]!==w?(I=b.jsx(h.Suspense,{fallback:null,children:b.jsx(xr,{editor:l,virtualMcpId:w,suggestionOpenRef:a})}),e[10]=l,e[11]=a,e[12]=w,e[13]=I):I=e[13];const N=r??null;let T;e[14]!==l||e[15]!==a||e[16]!==N?(T=b.jsx(h.Suspense,{fallback:null,children:b.jsx(dr,{editor:l,virtualMcpId:N,suggestionOpenRef:a})}),e[14]=l,e[15]=a,e[16]=N,e[17]=T):T=e[17];let S;e[18]!==f||e[19]!==l||e[20]!==i||e[21]!==s||e[22]!==p?(S=p&&s&&!f?b.jsx(on,{editor:l,selectedModel:s,onUnsupportedFile:i}):null,e[18]=f,e[19]=l,e[20]=i,e[21]=s,e[22]=p,e[23]=S):S=e[23];let R;return e[24]!==I||e[25]!==T||e[26]!==S||e[27]!==x?(R=b.jsxs(b.Fragment,{children:[x,I,T,S]}),e[24]=I,e[25]=T,e[26]=S,e[27]=x,e[28]=R):R=e[28],R}export{Or as T,jr as U,$r as a,rn as p,Lr as u};