decocms 3.26.3 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/client/assets/{AlertCircle-DTxB9pUH.js → AlertCircle-Dk6vk346.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-zXKZw2Xb.js → ArrowUpRight-4oEjocH3.js} +1 -1
  3. package/dist/client/assets/{Check-CTLrORIv.js → Check-xMlMIzVH.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BUQijftD.js → CheckCircle-ieh2HpZJ.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CE2QQfze.js → ChevronDown-DXk0XLak.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-Cu7s4gqK.js → ChevronLeft-z0R4UDTf.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-VGojeAFz.js → ChevronRight-TZkuqway.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-4IXM99ti.js → ChevronUp-CDwUhj6r.js} +1 -1
  9. package/dist/client/assets/{Container-BoFlhIZL.js → Container-BuYdkyve.js} +1 -1
  10. package/dist/client/assets/{DotsVertical--R-pmXe3.js → DotsVertical-dauL8_mz.js} +1 -1
  11. package/dist/client/assets/{Eye-pMhw6sUG.js → Eye-DjmQZ2p3.js} +1 -1
  12. package/dist/client/assets/{FilterLines-Bz8yyibx.js → FilterLines-DCVUz1mF.js} +1 -1
  13. package/dist/client/assets/{Globe01-Cp3X_WfB.js → Globe01-BFX2DjNo.js} +1 -1
  14. package/dist/client/assets/{HardDrive-BH54c3De.js → HardDrive-ep-sJwLU.js} +1 -1
  15. package/dist/client/assets/{Key01-CfBifHqv.js → Key01-u8nOkLN5.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-DhbihSgJ.js → LayoutLeft-Ozgz9jeL.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-BGLjTHSM.js → LinkExternal01-C_bnt3ki.js} +1 -1
  18. package/dist/client/assets/{Monitor01-Djh_XBKr.js → Monitor01-BBuvzSNf.js} +1 -1
  19. package/dist/client/assets/{Palette-PH8MXuP9.js → Palette-CJj0LVDj.js} +1 -1
  20. package/dist/client/assets/{Play-C4oLlMWL.js → Play-BUy7F0as.js} +1 -1
  21. package/dist/client/assets/{Plus-BX4ueqQS.js → Plus-CSmw6cpp.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-Duj7NlwB.js → RefreshCcw01-Ct_5xx8z.js} +1 -1
  23. package/dist/client/assets/{SearchMd-CL91MHi_.js → SearchMd-DXp3IUvU.js} +1 -1
  24. package/dist/client/assets/{Settings02-DWXKmfg4.js → Settings02-DttqwSGe.js} +1 -1
  25. package/dist/client/assets/{Shield01-5PYVS020.js → Shield01-BlrpeOP8.js} +1 -1
  26. package/dist/client/assets/{Star01-E49TkgRa.js → Star01-s_hRJjwq.js} +1 -1
  27. package/dist/client/assets/{Stars01-NNVgYP83.js → Stars01-U1zM7H-d.js} +1 -1
  28. package/dist/client/assets/{Stars02-BVMEIcco.js → Stars02-Cg2K8h2t.js} +1 -1
  29. package/dist/client/assets/{Sun-CC_Mb8Zc.js → Sun-D1pch37z.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-Fq29tGDx.js → SwitchHorizontal01-DUBxuMB8.js} +1 -1
  31. package/dist/client/assets/{Tool01-B2YQjPAa.js → Tool01-CSM07Bd3.js} +1 -1
  32. package/dist/client/assets/{Trash01-XqCtMZQT.js → Trash01-BOiUMUTV.js} +1 -1
  33. package/dist/client/assets/{Upload01-CTIKtpO3.js → Upload01-B45bupsd.js} +1 -1
  34. package/dist/client/assets/{User01-Cz-IdAgQ.js → User01-CMlKZMq6.js} +1 -1
  35. package/dist/client/assets/{Users01-D7P0o8Z_.js → Users01-CHcmgQX1.js} +1 -1
  36. package/dist/client/assets/{Users03-DUZwXij4.js → Users03-C19XPgsH.js} +1 -1
  37. package/dist/client/assets/{X-8xcHoVBj.js → X-LT7RIKGm.js} +1 -1
  38. package/dist/client/assets/{XCircle-CGgdji5f.js → XCircle-fZmWWsk8.js} +1 -1
  39. package/dist/client/assets/{XClose-CxCjUb2p.js → XClose-CXQHotFO.js} +1 -1
  40. package/dist/client/assets/{Zap-DLFeSSQ0.js → Zap-DhYBCL8w.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-C2mTTgos.js → ZapSquare-Br5HjwCx.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-CR6ja8eb.js → ZoomOut-DiWWUJB1.js} +1 -1
  43. package/dist/client/assets/{access-gate-3WvSXWjg.js → access-gate-CAbN0Agd.js} +1 -1
  44. package/dist/client/assets/{accordion-DBEoJ6NR.js → accordion-CqS3rCYY.js} +1 -1
  45. package/dist/client/assets/add-section-modal-Xtytp9xF.js +1 -0
  46. package/dist/client/assets/{agent-capabilities-CeRZY0ao.js → agent-capabilities-CH2iEpSS.js} +1 -1
  47. package/dist/client/assets/{agent-icon-DyzI2_Id.js → agent-icon-DyETFFvd.js} +1 -1
  48. package/dist/client/assets/{agent-icons-CkjHTgLo.js → agent-icons-0as3WkuR.js} +1 -1
  49. package/dist/client/assets/{agents-list-DNeWvyP9.js → agents-list-CDTD2QQV.js} +1 -1
  50. package/dist/client/assets/{ai-providers-DAK2efaH.js → ai-providers-CmBK6tVa.js} +1 -1
  51. package/dist/client/assets/{alert-BHgS7nAN.js → alert-BvaxqAIW.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-tg3D4mnu.js → alert-dialog-C_C5CWIi.js} +1 -1
  53. package/dist/client/assets/app-editor-BeU6l_dS.js +1 -0
  54. package/dist/client/assets/{auth-catchall-BOC0nYtA.js → auth-catchall-DBSfiKWC.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-VA3PSXMI.js → auth-split-layout-CEZXGHtA.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-SEcTO2sW.js → automation-list-row-s3KQqnbA.js} +1 -1
  57. package/dist/client/assets/{automation-runs-S95csAA4.js → automation-runs-RFg521Hi.js} +1 -1
  58. package/dist/client/assets/{automations-Ce44y56V.js → automations-C4zBnLxc.js} +1 -1
  59. package/dist/client/assets/{avatar-DK3a4hPp.js → avatar-DI2KQvq0.js} +1 -1
  60. package/dist/client/assets/{badge-SRsZ13Ha.js → badge-DqS5s_eb.js} +1 -1
  61. package/dist/client/assets/{brand-context-CHR40nnF.js → brand-context-Cg_N2T5g.js} +1 -1
  62. package/dist/client/assets/{buckets-7WU_Biyf.js → buckets-CGFQSBKU.js} +1 -1
  63. package/dist/client/assets/{calendar-CC1tf37S.js → calendar-CuCfbpTI.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-C5tUHDdB.js → capability-load-error-DMe1nIxk.js} +1 -1
  65. package/dist/client/assets/{card-BU_YNBo4.js → card-C0qmaAJH.js} +1 -1
  66. package/dist/client/assets/{chat-context-Moe82J6D.js → chat-context-DEKG6yp4.js} +1 -1
  67. package/dist/client/assets/{checkbox-CGo4P_LC.js → checkbox-ClCQ7aIa.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-D15RP8BC.js → cli-auth-success-YaavH1FD.js} +1 -1
  69. package/dist/client/assets/{collection-detail-CiMl4FG7.js → collection-detail-TiY0uzM1.js} +1 -1
  70. package/dist/client/assets/{collection-display-button-M_1xgyCf.js → collection-display-button-C6_DwOqJ.js} +1 -1
  71. package/dist/client/assets/{collection-search-CfzW8Ljz.js → collection-search-uQS9yrST.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-B4EgEmky.js → collection-table-wrapper-CTY0qyxJ.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-BxpcEAFc.js → collection-tabs-dTL9gxGq.js} +1 -1
  74. package/dist/client/assets/{collections-BthqN0MR.js → collections-5f6Mz9W3.js} +1 -1
  75. package/dist/client/assets/{command-D_uV9Uyw.js → command-DZekvH1G.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-BSZmVMpV.js → connect-desktop-dialog-Bi-Fd5NF.js} +1 -1
  77. package/dist/client/assets/{connection-card-CMo6aDgc.js → connection-card-CVH5Hy6F.js} +1 -1
  78. package/dist/client/assets/{connection-detail-Mimew6o2.js → connection-detail-mj8sHl20.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-D7eAIFli.js → connection-form-helpers-DFXgro4O.js} +1 -1
  80. package/dist/client/assets/{connections-C3EDxDCA.js → connections-D3Q6bIzz.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-8oQl4q0c.js → decopilot-sse-pool-Keqs3wfV.js} +1 -1
  82. package/dist/client/assets/{dialog-DSHkVmzb.js → dialog-BE3BWPis.js} +1 -1
  83. package/dist/client/assets/{domain-settings-BOHvvqIE.js → domain-settings-Bq8L3_pf.js} +1 -1
  84. package/dist/client/assets/{drawer-BCmqLnLy.js → drawer-BSFXr7hp.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-DFCaJxA8.js → dropdown-menu-D7fqzmBS.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-D3tgFtHQ.js → dynamic-plugin-layout-CK3Aqazw.js} +1 -1
  87. package/dist/client/assets/{empty-state-CVOhfUW7.js → empty-state-BumLAiri.js} +1 -1
  88. package/dist/client/assets/{empty-state-DqgO6Psg.js → empty-state-Eik7Dn7e.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-B52LuKdR.js → extract-connection-data-BLVQkjXZ.js} +1 -1
  90. package/dist/client/assets/{features-Dsrgvggp.js → features-BPRhAfHF.js} +1 -1
  91. package/dist/client/assets/{file-explorer-CAiKkVp8.js → file-explorer-D9JJ-ABp.js} +1 -1
  92. package/dist/client/assets/{file-type-icon-ThJaLePn.js → file-type-icon-I99Qy2JI.js} +1 -1
  93. package/dist/client/assets/{files-BwgPol6-.js → files-Bo9D7ZcJ.js} +1 -1
  94. package/dist/client/assets/{form-DngzP8fb.js → form-Bn5_lJ6b.js} +1 -1
  95. package/dist/client/assets/{general-D61AQybp.js → general-BKEEaSjd.js} +1 -1
  96. package/dist/client/assets/{generate-id-CDzcbt9l.js → generate-id-D0pLsbUu.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-Dy1vUJSU.js → github-repo-picker-CKp3ba8m.js} +1 -1
  98. package/dist/client/assets/header-tab-button-CbbR6n8q.js +5 -0
  99. package/dist/client/assets/{hover-card-CK_HvQcf.js → hover-card-NLGI_Z11.js} +1 -1
  100. package/dist/client/assets/{image-field-pfu57PP0.js → image-field-Baxidks4.js} +1 -1
  101. package/dist/client/assets/{index-hwXZ3lhJ.js → index-B-No0lhl.js} +1 -1
  102. package/dist/client/assets/{index-DqC0vS4o.js → index-B6YB9tmn.js} +1 -1
  103. package/dist/client/assets/{index-5lPKE0PI.js → index-BE8dVooN.js} +1 -1
  104. package/dist/client/assets/index-BGdRrrmO.js +1 -0
  105. package/dist/client/assets/{index-LDNFPs7X.js → index-BM5cVzVa.js} +3 -3
  106. package/dist/client/assets/{index-Df6ljz6n.js → index-BTFwMarm.js} +1 -1
  107. package/dist/client/assets/{index-hMTvGWUn.js → index-Bgv8YQhF.js} +1 -1
  108. package/dist/client/assets/{index-DLy_MgNO.js → index-Bll1AlZi.js} +26 -26
  109. package/dist/client/assets/{index-Dj1voR4t.js → index-Bz4SrPhc.js} +1 -1
  110. package/dist/client/assets/{index-DdnG6T0z.js → index-CF_awNaT.js} +1 -1
  111. package/dist/client/assets/{index-G1Ev5Inf.js → index-ClpGtndr.js} +1 -1
  112. package/dist/client/assets/{index-CZJ35dl3.css → index-DfYyH4IW.css} +1 -1
  113. package/dist/client/assets/{index-BepaMXhR.js → index-DxNfIzhJ.js} +1 -1
  114. package/dist/client/assets/{index-2EH0OR7k.js → index-YVfCniqO.js} +1 -1
  115. package/dist/client/assets/index-apuzt69p.js +310 -0
  116. package/dist/client/assets/{index-D7h1Qkk4.js → index-bSiT8Vjd.js} +1 -1
  117. package/dist/client/assets/{index-redirect-BkbiWtap.js → index-redirect-DjHBgih0.js} +1 -1
  118. package/dist/client/assets/{infiniteQueryObserver-CJIUgHAf.js → infiniteQueryObserver-B-dakPwk.js} +1 -1
  119. package/dist/client/assets/{input-CTpSARTD.js → input-CMMOM0dD.js} +1 -1
  120. package/dist/client/assets/{integration-icon-BpF3qWll.js → integration-icon-DblM7d27.js} +1 -1
  121. package/dist/client/assets/{label-Dh8yif55.js → label-cKO6vIjy.js} +1 -1
  122. package/dist/client/assets/{layout-D7xM_FMD.js → layout-QBDJ_skY.js} +1 -1
  123. package/dist/client/assets/{login-BsYL8EoQ.js → login-BAGu_SJp.js} +1 -1
  124. package/dist/client/assets/{members-D3KerYs6.js → members-C7uPVWw3.js} +1 -1
  125. package/dist/client/assets/{monaco-editor-47G-YgBx.js → monaco-editor-BD33gVrt.js} +1 -1
  126. package/dist/client/assets/{monitoring-stats-row-DLPVsavd.js → monitoring-stats-row-Bvt3RsAI.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-DPmGsVIH.js → oauth-callback-DvAeoSNI.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-ai-provider-B2SdgtVf.js → oauth-callback-ai-provider-BuhDe7NV.js} +1 -1
  129. package/dist/client/assets/{onboarding-CUnTn08b.js → onboarding-DiyHWSGI.js} +1 -1
  130. package/dist/client/assets/{org-install-D55Hf-Ci.js → org-install-B1rM2juw.js} +1 -1
  131. package/dist/client/assets/{org-layout-D1CUrdu0.js → org-layout-Ck7vt_mB.js} +1 -1
  132. package/dist/client/assets/{org-plugin-layout-C_lutJvY.js → org-plugin-layout-Cc5oLilE.js} +1 -1
  133. package/dist/client/assets/{page-seo-form-CDMGSBfI.js → page-seo-form-CTM0Xp8N.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-nSdCZ-KL.js +1 -0
  135. package/dist/client/assets/{pair-C8e4qd_P.js → pair-BidrJ4sX.js} +5 -5
  136. package/dist/client/assets/{plugin-empty-state-DOz60yXL.js → plugin-empty-state-CERz9K1r.js} +1 -1
  137. package/dist/client/assets/{plugin-header-dSexLn5d.js → plugin-header-CISIxXxk.js} +1 -1
  138. package/dist/client/assets/{plugin-layout-DeJC8Je1.js → plugin-layout-UkXtyZlZ.js} +1 -1
  139. package/dist/client/assets/{popover-BTf4Nz5d.js → popover-CNh3Ozeq.js} +1 -1
  140. package/dist/client/assets/{post-editor-DqMVZSkF.js → post-editor-C3YLiXXM.js} +3 -3
  141. package/dist/client/assets/{primitives-C5R0vRG0.js → primitives-Y0YbWOD4.js} +1 -1
  142. package/dist/client/assets/{profile-D24Mm1Bo.js → profile-o29P_MC2.js} +1 -1
  143. package/dist/client/assets/project-app-view-DHVFZPIZ.js +1 -0
  144. package/dist/client/assets/record-editor-DtXRmftd.js +1 -0
  145. package/dist/client/assets/registry-jlRh9TsH.js +2 -0
  146. package/dist/client/assets/{registry-layout-BTGZh3rH.js → registry-layout-zUgwlIce.js} +1 -1
  147. package/dist/client/assets/{require-capability-VkdqqQVh.js → require-capability-CQkA6hP5.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-B_Qr5rQD.js → required-auth-layout-Sv9_QEzP.js} +1 -1
  149. package/dist/client/assets/{reset-password-EasI5IT7.js → reset-password-C1pH8pyn.js} +1 -1
  150. package/dist/client/assets/{resizable-psD7TWaW.js → resizable-BTpQlX-z.js} +1 -1
  151. package/dist/client/assets/{roles-DcdBU5wW.js → roles-CL5RMNps.js} +1 -1
  152. package/dist/client/assets/save-referenced-block-JBVOc1Wy.js +1 -0
  153. package/dist/client/assets/{save-status-BBtiR3n4.js → save-status-Dfy3Cw0L.js} +1 -1
  154. package/dist/client/assets/{schema-form-CQrr8C2Q.js → schema-form-BLq0KNxn.js} +1 -1
  155. package/dist/client/assets/{scroll-area-EinmnR6o.js → scroll-area-SRbC7c25.js} +1 -1
  156. package/dist/client/assets/{search-input-IQT_u5qN.js → search-input-JFEU6QlH.js} +1 -1
  157. package/dist/client/assets/{secrets-CvkPaEJL.js → secrets-DvkQvbwt.js} +1 -1
  158. package/dist/client/assets/{sections-editor-4lprX9C-.js → sections-editor-HXjdp6eB.js} +2 -2
  159. package/dist/client/assets/{select-Dz1PdScB.js → select-CTk6Rsq0.js} +1 -1
  160. package/dist/client/assets/{select-model-azh5-bst.js → select-model-D2KMm6n2.js} +1 -1
  161. package/dist/client/assets/{seo-editor-Bhb2HHgZ.js → seo-editor-ifMY-Fw8.js} +1 -1
  162. package/dist/client/assets/{settings-layout-DXfn8mRu.js → settings-layout-BCPOwwNR.js} +1 -1
  163. package/dist/client/assets/{settings-section-DqhmLe6Q.js → settings-section-CcspUfab.js} +1 -1
  164. package/dist/client/assets/{sheet-CtgWE_6O.js → sheet-DokH5LKH.js} +1 -1
  165. package/dist/client/assets/{shell-controls-D5kseyts.js → shell-controls-rZZhpuW4.js} +1 -1
  166. package/dist/client/assets/{shell-layout-CWL5imKS.js → shell-layout-DO1LZiwY.js} +1 -1
  167. package/dist/client/assets/{shell-route-loading-Co6LGu_q.js → shell-route-loading-DI9OtFHe.js} +1 -1
  168. package/dist/client/assets/{sidebar-DRcLUASh.js → sidebar-hk7mPADd.js} +1 -1
  169. package/dist/client/assets/{skeleton-BH3hvPuC.js → skeleton-CxMjy9Kg.js} +1 -1
  170. package/dist/client/assets/{sortable.esm-Bv55LbH0.js → sortable.esm-BnSJaRIy.js} +1 -1
  171. package/dist/client/assets/{spinner-B_3Siejz.js → spinner-Dstb6AhM.js} +1 -1
  172. package/dist/client/assets/{sso-0oMpJ4kh.js → sso-lfWsp7Wf.js} +1 -1
  173. package/dist/client/assets/{store-BVB26WGO.js → store-CHpKgn9g.js} +1 -1
  174. package/dist/client/assets/store-registry-D9xAoVoW.js +2 -0
  175. package/dist/client/assets/{studio-tools-BxKekKsO.js → studio-tools-I8Y7AvNq.js} +1 -1
  176. package/dist/client/assets/{switch-DH2AgpKj.js → switch-Ds4XHhlB.js} +1 -1
  177. package/dist/client/assets/{tab-id-xylxHxk-.js → tab-id-D_jK7L5o.js} +1 -1
  178. package/dist/client/assets/{table-BF0TGzWk.js → table-BvWfaT33.js} +1 -1
  179. package/dist/client/assets/{tabs-zn3_c2X4.js → tabs-2_PrfGe1.js} +1 -1
  180. package/dist/client/assets/{task-status-CcBiqoc9.js → task-status-CyBgq1B0.js} +1 -1
  181. package/dist/client/assets/{textarea--0YfTbVD.js → textarea-D7mZzw_Y.js} +1 -1
  182. package/dist/client/assets/{toggle-group-CzCtoT44.js → toggle-group-CcV2qfqh.js} +1 -1
  183. package/dist/client/assets/{toolbar-GqBUNMmA.js → toolbar-Vk0X9zFW.js} +1 -1
  184. package/dist/client/assets/{tools-list-6mOdBofe.js → tools-list-DZyHvyxj.js} +1 -1
  185. package/dist/client/assets/{tooltip-DUvSyhJC.js → tooltip-B2vnmSMM.js} +1 -1
  186. package/dist/client/assets/{types-DA4RGvyb.js → types-DsBzghfJ.js} +1 -1
  187. package/dist/client/assets/{use-ai-providers-D2lIJSNP.js → use-ai-providers-BDbyWdvc.js} +1 -1
  188. package/dist/client/assets/{use-automations-DBfmwk1I.js → use-automations-DjpksCFK.js} +1 -1
  189. package/dist/client/assets/{use-capability-B4Fg7dX0.js → use-capability-cYRWRLhr.js} +1 -1
  190. package/dist/client/assets/{use-collections-CmHxKkjG.js → use-collections-DI2EpqEk.js} +1 -1
  191. package/dist/client/assets/{use-connection-DBknh1_S.js → use-connection-Cam2HslE.js} +1 -1
  192. package/dist/client/assets/{use-copy-Cwl7g8AE.js → use-copy-CyNGh3eK.js} +1 -1
  193. package/dist/client/assets/{use-create-virtual-mcp-C1TsXsHi.js → use-create-virtual-mcp-TPoPQ6hG.js} +1 -1
  194. package/dist/client/assets/{use-debounced-autosave-Bxr0aFzV.js → use-debounced-autosave-b8Qk2OvK.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-R6nqWnGZ.js → use-delete-connection-DXpw9Kqu.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-DWXPP8uC.js → use-file-configs-J3tDrhRd.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-SoMG-nf0.js → use-infinite-scroll-CF4jvsDL.js} +1 -1
  198. package/dist/client/assets/{use-list-state-RN4viRCb.js → use-list-state-C3OBf8IN.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-FbAC4-Un.js → use-mcp-client-Des-fSV9.js} +1 -1
  200. package/dist/client/assets/{use-mcp-prompts-yCzBJuZf.js → use-mcp-prompts-d7xtcVsP.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-CxFt6L0J.js → use-mcp-tools-DVBLMBo3.js} +1 -1
  202. package/dist/client/assets/{use-members-B2ko1Eht.js → use-members-CTowYB9Z.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-Bg4INoCb.js → use-navigate-to-agent-TzPRxzJx.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-D0Et-q9V.js → use-org-auth-client-uSzlmndB.js} +1 -1
  205. package/dist/client/assets/{use-org-sso-Ba3MjbPK.js → use-org-sso-Bez1Sajf.js} +1 -1
  206. package/dist/client/assets/{use-organization-roles-jFwocdK5.js → use-organization-roles-DfnjRa-5.js} +1 -1
  207. package/dist/client/assets/{use-organization-settings-Bdk0M31t.js → use-organization-settings-B5dKExdR.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-DkTd3pip.js → use-registry-connections-CWiPZtVM.js} +1 -1
  209. package/dist/client/assets/{use-secrets-B3XtAhqh.js → use-secrets-CrukgaJs.js} +1 -1
  210. package/dist/client/assets/{use-status-sounds-Bi-eGoxq.js → use-status-sounds-B1WepgCG.js} +1 -1
  211. package/dist/client/assets/{use-view-mode-CVu0jG_s.js → use-view-mode-q_aFx9Fj.js} +1 -1
  212. package/dist/client/assets/{use-virtual-mcp-CL360k9_.js → use-virtual-mcp-71PpEQrs.js} +1 -1
  213. package/dist/client/assets/useInfiniteQuery-Dl7i7ptk.js +1 -0
  214. package/dist/client/assets/{useRouterState-CBsQY2cY.js → useRouterState-l6E4h2DF.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-CmT2FyND.js +1 -0
  216. package/dist/client/assets/{user-ce-n8AzQ.js → user-ZvpM4E3a.js} +1 -1
  217. package/dist/client/assets/{view-mode-toggle-DPvhvCSl.js → view-mode-toggle-oQJDkJzK.js} +1 -1
  218. package/dist/client/assets/workflow-detail-Ba-EIKe1.js +1 -0
  219. package/dist/client/assets/{workflow-DEw4Tgx1.js → workflow-i0CMnn6N.js} +1 -1
  220. package/dist/client/index.html +2 -2
  221. package/dist/server/cli.js +439 -419
  222. package/dist/server/migrate.js +95 -95
  223. package/dist/server/server.js +287 -282
  224. package/package.json +1 -1
  225. package/dist/client/assets/add-section-modal-B-90MHzy.js +0 -1
  226. package/dist/client/assets/app-editor-WcogQO88.js +0 -1
  227. package/dist/client/assets/header-tab-button-YP4v_sFN.js +0 -5
  228. package/dist/client/assets/index-CIBQMZc3.js +0 -310
  229. package/dist/client/assets/index-Dy_atLRy.js +0 -1
  230. package/dist/client/assets/page-seo-sheet-D9mMBTfk.js +0 -1
  231. package/dist/client/assets/project-app-view-Bww_ZnyA.js +0 -1
  232. package/dist/client/assets/record-editor-dyb9Ijad.js +0 -1
  233. package/dist/client/assets/registry-BnciKKiV.js +0 -2
  234. package/dist/client/assets/save-referenced-block-H29Sz2fU.js +0 -1
  235. package/dist/client/assets/store-registry-CO_g7WZl.js +0 -2
  236. package/dist/client/assets/useInfiniteQuery-68Zg22Ld.js +0 -1
  237. package/dist/client/assets/useSuspenseInfiniteQuery-C32oPBV5.js +0 -1
  238. package/dist/client/assets/workflow-detail-DPYK3MGg.js +0 -1
@@ -1,8 +1,8 @@
1
- import{e as le,r as K,f as bt,q as Be,j as t,B as Z,o as Ce,c as ce,K as it,n as yt,v as ss,d as rs,t as xt,E as ls}from"./index-DLy_MgNO.js";import{S as os}from"./search-input-IQT_u5qN.js";import{P as Me}from"./index-hMTvGWUn.js";import{E as wt}from"./empty-state-CVOhfUW7.js";import{R as as}from"./require-capability-VkdqqQVh.js";import{B as rt}from"./badge-SRsZ13Ha.js";import{P as ct,a as dt,b as mt}from"./popover-BTf4Nz5d.js";import{b as Ze,T as et,a as tt}from"./tooltip-DUvSyhJC.js";import{i as ft}from"./Check-CTLrORIv.js";import{a as Xe}from"./Eye-pMhw6sUG.js";import{n as kt}from"./Globe01-Cp3X_WfB.js";import{i as Pt}from"./FilterLines-Bz8yyibx.js";import{i as ns}from"./Key01-CfBifHqv.js";import{i as is}from"./Play-C4oLlMWL.js";import{a8 as cs,a9 as ds,Q as ms,F as us}from"./agent-icon-DyzI2_Id.js";import{M as Tt}from"./monaco-editor-47G-YgBx.js";import{u as xs}from"./use-members-B2ko1Eht.js";import{u as Mt}from"./use-connection-DBknh1_S.js";import{a as fs,u as ps,W as hs}from"./use-mcp-client-FbAC4-Un.js";import{a as gs}from"./use-virtual-mcp-CL360k9_.js";import{n as Ge}from"./Container-BoFlhIZL.js";import{c as js}from"./SwitchHorizontal01-Fq29tGDx.js";import{s as vs}from"./Plus-BX4ueqQS.js";import{s as Ns}from"./Trash01-XqCtMZQT.js";import{I as Qe}from"./input-CTpSARTD.js";import{g as bs,b as _t,f as st,a as At,c as pt,d as ys,e as Dt,h as Vt,A as ws,T as Ss,i as Is,M as ht}from"./automation-runs-S95csAA4.js";import{S as lt,a as ot,b as at,c as Fe,d as nt}from"./select-Dz1PdScB.js";import{S as Cs}from"./scroll-area-EinmnR6o.js";import{t as Ut}from"./ChevronDown-CE2QQfze.js";import{C as ks}from"./calendar-CC1tf37S.js";import{T as Ts}from"./textarea--0YfTbVD.js";import{C as Kt}from"./collection-tabs-BxpcEAFc.js";import{S as Ms}from"./switch-DH2AgpKj.js";import{L as _s}from"./label-Dh8yif55.js";import{I as qe}from"./integration-icon-BpF3qWll.js";import{A as qt}from"./avatar-DK3a4hPp.js";import{A as Ds,a as Ls,b as Fs}from"./alert-BHgS7nAN.js";import{C as Bt}from"./card-BU_YNBo4.js";import{K as ke}from"./monitoring-stats-row-DLPVsavd.js";import{u as Ht}from"./studio-tools-BxKekKsO.js";import{g as $s}from"./connection-slug-eyAPH6o3.js";import{u as Rs}from"./useSuspenseInfiniteQuery-C32oPBV5.js";import{d as zs,S as Os,a as Es,b as Ps}from"./sheet-CtgWE_6O.js";import{T as De,a as ut,b as Jt,c as Qt,d as Gt,e as oe}from"./table-BF0TGzWk.js";import{n as As}from"./ChevronUp-4IXM99ti.js";import{u as Vs}from"./use-infinite-scroll-SoMG-nf0.js";import{c as Us,b as Ks}from"./use-automations-DBfmwk1I.js";import"./SearchMd-CL91MHi_.js";import"./sidebar-DRcLUASh.js";import"./LayoutLeft-DhbihSgJ.js";import"./use-capability-B4Fg7dX0.js";import"./access-gate-3WvSXWjg.js";import"./capability-load-error-C5tUHDdB.js";import"./AlertCircle-DTxB9pUH.js";import"./Tool01-B2YQjPAa.js";import"./RefreshCcw01-Duj7NlwB.js";import"./XCircle-CGgdji5f.js";import"./ArrowUpRight-zXKZw2Xb.js";import"./ZapSquare-C2mTTgos.js";import"./Users03-DUZwXij4.js";import"./CheckCircle-BUQijftD.js";import"./ChevronLeft-Cu7s4gqK.js";import"./ChevronRight-VGojeAFz.js";import"./DotsVertical--R-pmXe3.js";import"./ZoomOut-CR6ja8eb.js";import"./Star01-E49TkgRa.js";import"./Palette-PH8MXuP9.js";import"./HardDrive-BH54c3De.js";import"./Stars02-BVMEIcco.js";import"./LinkExternal01-BGLjTHSM.js";import"./Monitor01-Djh_XBKr.js";import"./Sun-CC_Mb8Zc.js";import"./Settings02-DWXKmfg4.js";import"./Shield01-5PYVS020.js";import"./Stars01-NNVgYP83.js";import"./Upload01-CTIKtpO3.js";import"./User01-Cz-IdAgQ.js";import"./Users01-D7P0o8Z_.js";import"./XClose-CxCjUb2p.js";import"./X-8xcHoVBj.js";import"./Zap-DLFeSSQ0.js";import"./index-hwXZ3lhJ.js";import"./spinner-B_3Siejz.js";import"./use-org-auth-client-D0Et-q9V.js";import"./use-collections-CmHxKkjG.js";import"./useInfiniteQuery-68Zg22Ld.js";import"./infiniteQueryObserver-CJIUgHAf.js";import"./task-status-CcBiqoc9.js";import"./checkbox-CGo4P_LC.js";import"./command-D_uV9Uyw.js";import"./index-BepaMXhR.js";import"./dialog-DSHkVmzb.js";import"./pair-C8e4qd_P.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Cwl7g8AE.js";import"./file-type-icon-ThJaLePn.js";import"./content-blocks-o63cs2vh.js";import"./types-DA4RGvyb.js";import"./chat-context-Moe82J6D.js";import"./tab-id-xylxHxk-.js";import"./decopilot-sse-pool-8oQl4q0c.js";import"./create-sse-subscription-BS5983N4.js";import"./use-ai-providers-D2lIJSNP.js";import"./use-organization-settings-Bdk0M31t.js";import"./shell-layout-CWL5imKS.js";import"./required-auth-layout-B_Qr5rQD.js";import"./useRouterState-CBsQY2cY.js";import"./use-org-sso-Ba3MjbPK.js";import"./use-navigate-to-agent-Bg4INoCb.js";import"./use-mcp-prompts-yCzBJuZf.js";import"./form-DngzP8fb.js";import"./index-DqC0vS4o.js";const vt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Le(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{e as le,r as K,f as bt,q as Be,j as t,B as Z,o as Ce,c as ce,K as it,n as yt,v as ss,d as rs,t as xt,E as ls}from"./index-Bll1AlZi.js";import{S as os}from"./search-input-JFEU6QlH.js";import{P as Me}from"./index-Bgv8YQhF.js";import{E as wt}from"./empty-state-BumLAiri.js";import{R as as}from"./require-capability-CQkA6hP5.js";import{B as rt}from"./badge-DqS5s_eb.js";import{P as ct,a as dt,b as mt}from"./popover-CNh3Ozeq.js";import{b as Ze,T as et,a as tt}from"./tooltip-B2vnmSMM.js";import{i as ft}from"./Check-xMlMIzVH.js";import{a as Xe}from"./Eye-DjmQZ2p3.js";import{n as kt}from"./Globe01-BFX2DjNo.js";import{i as Pt}from"./FilterLines-DCVUz1mF.js";import{i as ns}from"./Key01-u8nOkLN5.js";import{i as is}from"./Play-BUy7F0as.js";import{a9 as cs,aa as ds,R as ms,G as us}from"./agent-icon-DyETFFvd.js";import{M as Tt}from"./monaco-editor-BD33gVrt.js";import{u as xs}from"./use-members-CTowYB9Z.js";import{u as Mt}from"./use-connection-Cam2HslE.js";import{a as fs,u as ps,W as hs}from"./use-mcp-client-Des-fSV9.js";import{a as gs}from"./use-virtual-mcp-71PpEQrs.js";import{n as Qe}from"./Container-BuYdkyve.js";import{c as js}from"./SwitchHorizontal01-DUBxuMB8.js";import{s as vs}from"./Plus-CSmw6cpp.js";import{s as Ns}from"./Trash01-BOiUMUTV.js";import{I as Ge}from"./input-CMMOM0dD.js";import{g as bs,b as _t,f as st,a as At,c as pt,d as ys,e as Dt,h as Vt,A as ws,T as Ss,i as Is,M as ht}from"./automation-runs-RFg521Hi.js";import{S as lt,a as ot,b as at,c as Fe,d as nt}from"./select-CTk6Rsq0.js";import{S as Cs}from"./scroll-area-SRbC7c25.js";import{t as Ut}from"./ChevronDown-DXk0XLak.js";import{C as ks}from"./calendar-CuCfbpTI.js";import{T as Ts}from"./textarea-D7mZzw_Y.js";import{C as Kt}from"./collection-tabs-dTL9gxGq.js";import{S as Ms}from"./switch-Ds4XHhlB.js";import{L as _s}from"./label-cKO6vIjy.js";import{I as qe}from"./integration-icon-DblM7d27.js";import{A as qt}from"./avatar-DI2KQvq0.js";import{A as Ds,a as Ls,b as Fs}from"./alert-BvaxqAIW.js";import{C as Bt}from"./card-C0qmaAJH.js";import{K as ke}from"./monitoring-stats-row-Bvt3RsAI.js";import{u as Ht}from"./studio-tools-I8Y7AvNq.js";import{g as $s}from"./connection-slug-eyAPH6o3.js";import{u as Rs}from"./useSuspenseInfiniteQuery-CmT2FyND.js";import{d as zs,S as Os,a as Es,b as Ps}from"./sheet-DokH5LKH.js";import{T as De,a as ut,b as Jt,c as Gt,d as Qt,e as oe}from"./table-BvWfaT33.js";import{n as As}from"./ChevronUp-CDwUhj6r.js";import{u as Vs}from"./use-infinite-scroll-CF4jvsDL.js";import{c as Us,b as Ks}from"./use-automations-DjpksCFK.js";import"./SearchMd-DXp3IUvU.js";import"./sidebar-hk7mPADd.js";import"./LayoutLeft-Ozgz9jeL.js";import"./use-capability-cYRWRLhr.js";import"./access-gate-CAbN0Agd.js";import"./capability-load-error-DMe1nIxk.js";import"./AlertCircle-Dk6vk346.js";import"./Tool01-CSM07Bd3.js";import"./RefreshCcw01-Ct_5xx8z.js";import"./XCircle-fZmWWsk8.js";import"./ArrowUpRight-4oEjocH3.js";import"./ZapSquare-Br5HjwCx.js";import"./Users03-C19XPgsH.js";import"./CheckCircle-ieh2HpZJ.js";import"./ChevronLeft-z0R4UDTf.js";import"./ChevronRight-TZkuqway.js";import"./DotsVertical-dauL8_mz.js";import"./ZoomOut-DiWWUJB1.js";import"./Star01-s_hRJjwq.js";import"./Palette-CJj0LVDj.js";import"./HardDrive-ep-sJwLU.js";import"./Stars02-Cg2K8h2t.js";import"./LinkExternal01-C_bnt3ki.js";import"./Monitor01-BBuvzSNf.js";import"./Sun-D1pch37z.js";import"./Settings02-DttqwSGe.js";import"./Shield01-BlrpeOP8.js";import"./Stars01-U1zM7H-d.js";import"./Upload01-B45bupsd.js";import"./User01-CMlKZMq6.js";import"./Users01-CHcmgQX1.js";import"./XClose-CXQHotFO.js";import"./X-LT7RIKGm.js";import"./Zap-DhYBCL8w.js";import"./index-B-No0lhl.js";import"./spinner-Dstb6AhM.js";import"./use-org-auth-client-uSzlmndB.js";import"./use-collections-DI2EpqEk.js";import"./useInfiniteQuery-Dl7i7ptk.js";import"./infiniteQueryObserver-B-dakPwk.js";import"./task-status-CyBgq1B0.js";import"./checkbox-ClCQ7aIa.js";import"./command-DZekvH1G.js";import"./index-DxNfIzhJ.js";import"./dialog-BE3BWPis.js";import"./pair-BidrJ4sX.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CyNGh3eK.js";import"./file-type-icon-I99Qy2JI.js";import"./content-blocks-o63cs2vh.js";import"./types-DsBzghfJ.js";import"./chat-context-DEKG6yp4.js";import"./tab-id-D_jK7L5o.js";import"./decopilot-sse-pool-Keqs3wfV.js";import"./create-sse-subscription-BS5983N4.js";import"./use-ai-providers-BDbyWdvc.js";import"./use-organization-settings-B5dKExdR.js";import"./shell-layout-DO1LZiwY.js";import"./required-auth-layout-Sv9_QEzP.js";import"./useRouterState-l6E4h2DF.js";import"./use-org-sso-Bez1Sajf.js";import"./use-navigate-to-agent-TzPRxzJx.js";import"./use-mcp-prompts-d7xtcVsP.js";import"./form-Bn5_lJ6b.js";import"./index-B6YB9tmn.js";const vt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Le(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Lt(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...l]=e.split("=");return{key:r||"",operator:"eq",value:l.join("=")}}if(e.includes("~")){const[r,...l]=e.split("~");return{key:r||"",operator:"contains",value:l.join("~")}}if(e.includes("@")){const[r,...l]=e.split("@");return{key:r||"",operator:"in",value:l.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},l=[],a={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(r[o.key]=`%${o.value}%`);break;case"exists":l.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:l.length>0?l:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Ft(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=vt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,vt.maxJsonRenderSize)+`
4
4
 
5
- ... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:r}}function $t(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function Hs(s){const e=le.c(116),{log:r}=s,[l,a]=K.useState(!1),[o,d]=K.useState(!1),i=bt(),{org:n}=Be(),c=Ft(r.input),u=Ft(r.output),j=Js;let v;e[0]!==r.input||e[1]!==r.output?(v=async se=>{const re=j(se==="input"?r.input:r.output);try{await navigator.clipboard.writeText(re),se==="input"?(a(!0),setTimeout(()=>a(!1),2e3)):(d(!0),setTimeout(()=>d(!1),2e3))}catch{Ce.error("Failed to copy to clipboard")}},e[0]=r.input,e[1]=r.output,e[2]=v):v=e[2];const b=v;let x;e[3]!==r.id||e[4]!==r.input||e[5]!==r.output||e[6]!==r.toolName?(x=se=>{const re=j(se==="input"?r.input:r.output),ie=new Blob([re],{type:"application/json"}),pe=URL.createObjectURL(ie),ye=document.createElement("a");ye.href=pe,ye.download=`${r.toolName}-${se}-${r.id}.json`,ye.click(),URL.revokeObjectURL(pe)},e[3]=r.id,e[4]=r.input,e[5]=r.output,e[6]=r.toolName,e[7]=x):x=e[7];const L=x;let p;e[8]!==r.connectionId||e[9]!==r.input||e[10]!==r.toolName||e[11]!==i||e[12]!==n.slug?(p=()=>{const se=crypto.randomUUID();sessionStorage.setItem(`replay-${se}`,JSON.stringify(r.input)),i({to:"/$org/settings/connections/$connectionId/$collectionName/$itemId",params:{org:n.slug,connectionId:r.connectionId,collectionName:"tools",itemId:encodeURIComponent(r.toolName)},search:{replayId:se}})},e[8]=r.connectionId,e[9]=r.input,e[10]=r.toolName,e[11]=i,e[12]=n.slug,e[13]=p):p=e[13];const g=p,[m,k]=K.useState(!1);let S;e[14]!==r.requestId?(S=async()=>{try{await navigator.clipboard.writeText(r.requestId),k(!0),setTimeout(()=>k(!1),2e3)}catch{Ce.error("Failed to copy to clipboard")}},e[14]=r.requestId,e[15]=S):S=e[15];const h=S;let T;e[16]!==r.timestamp?(T=new Date(r.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[16]=r.timestamp,e[17]=T):T=e[17];const I=T,f="text-sm px-5 md:px-6 py-5 space-y-5";let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[18]=M):M=e[18];let y;e[19]!==I?(y=t.jsxs("div",{children:[M,t.jsx("div",{className:"text-sm text-foreground",children:I})]}),e[19]=I,e[20]=y):y=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[21]=R):R=e[21];let C;e[22]!==r.durationMs?(C=t.jsxs("div",{children:[R,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[r.durationMs,"ms"]})]}),e[22]=r.durationMs,e[23]=C):C=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[24]=E):E=e[24];let F;e[25]!==r.userName?(F=t.jsxs("div",{children:[E,t.jsx("div",{className:"text-sm text-foreground",children:r.userName})]}),e[25]=r.userName,e[26]=F):F=e[26];let H;e[27]!==r.virtualMcpName?(H=r.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsx("div",{className:"text-sm text-foreground",children:r.virtualMcpName})]}),e[27]=r.virtualMcpName,e[28]=H):H=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[29]=A):A=e[29];let W;e[30]!==r.requestId?(W=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:r.requestId}),e[30]=r.requestId,e[31]=W):W=e[31];let w;e[32]!==m?(w=m?t.jsx(ft,{size:12}):t.jsx(Xe,{size:12}),e[32]=m,e[33]=w):w=e[33];let _;e[34]!==h||e[35]!==w?(_=t.jsx(Z,{size:"icon",variant:"ghost",onClick:h,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:w}),e[34]=h,e[35]=w,e[36]=_):_=e[36];let $;e[37]!==W||e[38]!==_?($=t.jsxs("div",{children:[A,t.jsxs("div",{className:"flex items-center gap-1",children:[W,_]})]}),e[37]=W,e[38]=_,e[39]=$):$=e[39];let z;e[40]!==r.userAgent?(z=r.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:r.userAgent})]}),e[40]=r.userAgent,e[41]=z):z=e[41];let O;e[42]!==r.properties||e[43]!==i||e[44]!==n.slug?(O=r.properties&&Object.keys(r.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:"Properties"}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(r.properties).map(se=>{const[re,ie]=se;return t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsxs(rt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[re,"=",ie]})}),t.jsx(mt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const pe={key:re,operator:"eq",value:ie};i({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Le([pe])}})},children:[t.jsx(Pt,{size:14,className:"mr-2"}),"Filter by this property"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${re}=${ie}`),Ce.success("Copied filter to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(Xe,{size:14,className:"mr-2"}),"Copy filter"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(re),Ce.success("Copied key to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(ns,{size:14,className:"mr-2"}),"Copy key"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(ie),Ce.success("Copied value to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(cs,{size:14,className:"mr-2"}),"Copy value"]})]})})]},re)})})]}),e[42]=r.properties,e[43]=i,e[44]=n.slug,e[45]=O):O=e[45];let V;e[46]!==C||e[47]!==F||e[48]!==H||e[49]!==$||e[50]!==z||e[51]!==O||e[52]!==y?(V=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[y,C,F,H,$,z,O]}),e[46]=C,e[47]=F,e[48]=H,e[49]=$,e[50]=z,e[51]=O,e[52]=y,e[53]=V):V=e[53];let q;e[54]!==r.errorMessage?(q=r.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:"Error"}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:r.errorMessage})]}),e[54]=r.errorMessage,e[55]=q):q=e[55];const J="space-y-4";let Q;e[56]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[56]=Q):Q=e[56];const G=c.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",$t(c.originalSize)," - truncated)"]});let U;e[57]!==G?(U=t.jsxs("div",{className:"flex items-center gap-2",children:[Q,G]}),e[57]=G,e[58]=U):U=e[58];let P;e[59]!==g||e[60]!==r.input?(P=r.input&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:g,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(is,{size:14})})}),t.jsx(tt,{children:"Replay tool call"})]}),e[59]=g,e[60]=r.input,e[61]=P):P=e[61];let N;e[62]!==L||e[63]!==c?(N=c.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(kt,{size:14})})}),t.jsx(tt,{children:"Download full input"})]}),e[62]=L,e[63]=c,e[64]=N):N=e[64];let D;e[65]!==b?(D=()=>b("input"),e[65]=b,e[66]=D):D=e[66];let B;e[67]!==l?(B=l?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[67]=l,e[68]=B):B=e[68];let ee;e[69]!==D||e[70]!==B?(ee=t.jsx(Z,{size:"icon",variant:"ghost",onClick:D,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:B}),e[69]=D,e[70]=B,e[71]=ee):ee=e[71];let X;e[72]!==P||e[73]!==N||e[74]!==ee?(X=t.jsxs("div",{className:"flex items-center gap-1",children:[P,N,ee]}),e[72]=P,e[73]=N,e[74]=ee,e[75]=X):X=e[75];let te;e[76]!==U||e[77]!==X?(te=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[U,X]}),e[76]=U,e[77]=X,e[78]=te):te=e[78];let Y;e[79]!==c?(Y=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Tt,{code:c.content,language:"json",height:"100%",readOnly:!0})}),e[79]=c,e[80]=Y):Y=e[80];let ae;e[81]!==te||e[82]!==Y?(ae=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[te,Y]})}),e[81]=te,e[82]=Y,e[83]=ae):ae=e[83];const _e="rounded-lg overflow-hidden border border-border",$e="flex items-center justify-between p-1 pl-4 border-b border-border",Se="flex items-center gap-2";let ne;e[84]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[84]=ne):ne=e[84];const he=u.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",$t(u.originalSize)," - truncated)"]});let ge;e[85]!==ne||e[86]!==he?(ge=t.jsxs("div",{className:Se,children:[ne,he]}),e[85]=ne,e[86]=he,e[87]=ge):ge=e[87];let je;e[88]!==L||e[89]!==u.isTruncated?(je=u.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(kt,{size:14})})}),t.jsx(tt,{children:"Download full output"})]}),e[88]=L,e[89]=u.isTruncated,e[90]=je):je=e[90];let ve;e[91]!==b?(ve=()=>b("output"),e[91]=b,e[92]=ve):ve=e[92];let Ne;e[93]!==o?(Ne=o?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[93]=o,e[94]=Ne):Ne=e[94];let de;e[95]!==ve||e[96]!==Ne?(de=t.jsx(Z,{size:"icon",variant:"ghost",onClick:ve,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:Ne}),e[95]=ve,e[96]=Ne,e[97]=de):de=e[97];let be;e[98]!==je||e[99]!==de?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[je,de]}),e[98]=je,e[99]=de,e[100]=be):be=e[100];let me;e[101]!==ge||e[102]!==be?(me=t.jsxs("div",{className:$e,children:[ge,be]}),e[101]=ge,e[102]=be,e[103]=me):me=e[103];let ue;e[104]!==u.content?(ue=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Tt,{code:u.content,language:"json",height:"100%",readOnly:!0})}),e[104]=u.content,e[105]=ue):ue=e[105];let xe;e[106]!==me||e[107]!==ue?(xe=t.jsx("div",{children:t.jsxs("div",{className:_e,children:[me,ue]})}),e[106]=me,e[107]=ue,e[108]=xe):xe=e[108];let fe;e[109]!==ae||e[110]!==xe?(fe=t.jsxs("div",{className:J,children:[ae,xe]}),e[109]=ae,e[110]=xe,e[111]=fe):fe=e[111];let Re;return e[112]!==V||e[113]!==q||e[114]!==fe?(Re=t.jsxs("div",{className:f,children:[V,q,fe]}),e[112]=V,e[113]=q,e[114]=fe,e[115]=Re):Re=e[115],Re}function Js(s){return JSON.stringify(s,null,2)}const Wt=/^now(?:-(\d+)([mhdwM]))?$/,Qs={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Xt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const r=e.match(Wt);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,a=r[2]||null;return{isNow:!0,offset:l,unit:a}}function we(s){const e=s.trim(),r=new Date(e);if(!Number.isNaN(r.getTime())&&e.includes("-"))return{valid:!0,date:r};const l=Xt(e);if(!l)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const a=new Date,o=new Date(a);if(l.offset===0||!l.unit)return{valid:!0,date:o};switch(l.unit){case"m":o.setMinutes(o.getMinutes()-l.offset);break;case"h":o.setHours(o.getHours()-l.offset);break;case"d":o.setDate(o.getDate()-l.offset);break;case"w":o.setDate(o.getDate()-l.offset*7);break;case"M":o.setMonth(o.getMonth()-l.offset);break}return{valid:!0,date:o}}function Gs(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Yt(s){const e=s.trim();return Wt.test(e)}function Rt(s){const e=s.trim();if(e==="now")return"Now";const r=Xt(e);if(!r||!r.unit){const o=we(e);return o.valid&&o.date?Gs(o.date):e}const l=Qs[r.unit],a=r.offset!==1?"s":"";return`${r.offset} ${l}${a} ago`}const Zt=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function Ws(s,e){const r=Zt.find(l=>l.from===s&&l.to===e);return r?r.label:`${Rt(s)} to ${Rt(e)}`}function Je(s){const e=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),a=String(s.getHours()).padStart(2,"0"),o=String(s.getMinutes()).padStart(2,"0"),d=String(s.getSeconds()).padStart(2,"0");return`${e}-${r}-${l} ${a}:${o}:${d}`}function Xs(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,r,l,a,o,d,i]=e,n=new Date(Number(r),Number(l)-1,Number(a),Number(o),Number(d),Number(i));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Yt(s))return s;const e=we(s);return e.valid&&e.date?Je(e.date):s}function zt({value:s,onChange:e,placeholder:r="now or now-2d",className:l,disabled:a,error:o}){const[d,i]=K.useState(!1),[n,c]=K.useState(()=>gt(s)),[u,j]=K.useState(),[v,b]=K.useState(!1),x=K.useRef(s);x.current!==s&&(x.current=s,v||c(gt(s)));const L=f=>{const M=f.target.value;c(M),j(void 0)},p=()=>{b(!0)},g=()=>{b(!1);const f=n.trim();if(Yt(f)){j(void 0),e(f);return}const M=Xs(f);if(M){j(void 0),e(M.toISOString()),c(Je(M));return}const y=we(f);if(y.valid&&y.date){j(void 0),e(f),c(Je(y.date));return}c(gt(s)),j(void 0)},m=f=>{if(f){const y=we(s).date||new Date;f.setHours(y.getHours()),f.setMinutes(y.getMinutes()),f.setSeconds(0),f.setMilliseconds(0);const R=f.toISOString();c(Je(f)),e(R),j(void 0)}i(!1)},k=f=>{const[M,y]=f.target.value.split(":").map(Number),C=we(s).date||new Date;C.setHours(M||0),C.setMinutes(y||0),C.setSeconds(0),C.setMilliseconds(0);const E=C.toISOString();c(Je(C)),e(E)},S=we(s),h=S.valid?S.date:new Date,T=h?`${String(h.getHours()).padStart(2,"0")}:${String(h.getMinutes()).padStart(2,"0")}`:"",I=o||u;return t.jsxs("div",{className:ce("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Qe,{value:n,onChange:L,onFocus:p,onBlur:g,placeholder:r,disabled:a,className:ce("text-sm h-8",I&&"border-destructive focus-visible:ring-destructive")}),I&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:I})]}),t.jsxs(ct,{open:d,onOpenChange:i,children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:a,children:t.jsx(ds,{className:"h-4 w-4"})})}),t.jsxs(mt,{className:"w-auto p-0",align:"end",children:[t.jsx(ks,{mode:"single",selected:h||void 0,onSelect:m,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Qe,{type:"time",value:T,onChange:k,className:"text-sm h-8"})]})]})]})]})}function Ys({value:s,onChange:e,className:r,disabled:l,quickRanges:a=Zt}){const[o,d]=K.useState(!1),[i,n]=K.useState(s.from),[c,u]=K.useState(s.to),[j,v]=K.useState(null),b=K.useRef({from:s.from,to:s.to});(b.current.from!==s.from||b.current.to!==s.to)&&(b.current={from:s.from,to:s.to},n(s.from),u(s.to));const x=m=>{b.current={from:m.from,to:m.to},n(m.from),u(m.to),d(!1),e({from:m.from,to:m.to})},L=()=>{const m=we(i),k=we(c);if(!m.valid||!m.date){v("Invalid 'From' date");return}if(!k.valid||!k.date){v("Invalid 'To' date");return}if(m.date>=k.date){v("'From' must be before 'To'");return}v(null),e({from:i,to:c}),d(!1)},p=m=>s.from===m.from&&s.to===m.to,g=Ws(s.from,s.to);return t.jsxs(ct,{open:o,onOpenChange:d,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:ce("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ms,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:g})]}),t.jsx(Ut,{className:"size-4 text-muted-foreground"})]})}),t.jsx(mt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:m=>m.preventDefault(),style:o?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:"Absolute time range"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"From"}),t.jsx(zt,{value:i,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"To"}),t.jsx(zt,{value:c,onChange:u,placeholder:"now"})]}),j&&t.jsx("p",{className:"text-xs text-destructive",children:j}),t.jsx(Z,{onClick:L,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(Cs,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:a.map(m=>{const k=p(m);return t.jsx("button",{type:"button",onClick:()=>x(m),className:ce("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",k&&"bg-accent text-accent-foreground font-medium"),children:m.label},m.value)})})})})]})})]})}const es="decopilot";async function ts(s,e){return await s.call("MONITORING_STATS",e)}function Zs(s,e){const r=le.c(12),{org:l}=Be(),a=Ht();let o,d,i;r[0]!==l.id||r[1]!==s?(i={...s,excludeConnectionIds:[es,...s.excludeConnectionIds??[]]},d=yt,o=it.monitoringStatsToolCalls(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=d,r[4]=i):(o=r[2],d=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ts(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let c;return r[8]!==e||r[9]!==o||r[10]!==n?(c={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=c):c=r[11],d(c)}function er(s,e){const r=le.c(12),{org:l}=Be(),a=Ht();let o,d,i;r[0]!==l.id||r[1]!==s?(i={...s,connectionIds:[es],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},d=yt,o=it.monitoringStatsLlm(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=d,r[4]=i):(o=r[2],d=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ts(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let c;return r[8]!==e||r[9]!==o||r[10]!==n?(c={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=c):c=r[11],d(c)}function Te(s){const e=le.c(20),{title:r,value:l,action:a,children:o,className:d}=s;let i;e[0]!==d?(i=ce("pt-4 px-4 pb-6 gap-8",d),e[0]=d,e[1]=i):i=e[1];let n;e[2]!==r?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:r}),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==l?(c=t.jsx("span",{className:"text-4xl font-normal",children:l}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==c?(u=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,c]}),e[6]=n,e[7]=c,e[8]=u):u=e[8];let j;e[9]!==a?(j=a&&t.jsx("div",{className:"shrink-0",children:a}),e[9]=a,e[10]=j):j=e[10];let v;e[11]!==u||e[12]!==j?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[u,j]}),e[11]=u,e[12]=j,e[13]=v):v=e[13];let b;e[14]!==o?(b=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=b):b=e[15];let x;return e[16]!==i||e[17]!==v||e[18]!==b?(x=t.jsxs(Bt,{className:i,children:[v,b]}),e[16]=i,e[17]=v,e[18]=b,e[19]=x):x=e[19],x}function jt(s){const e=le.c(14),{metrics:r,connections:l,mode:a,total:o}=s,{org:d}=Be(),i=bt();let n,c,u;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==i||e[4]!==d||e[5]!==o){u=Symbol.for("react.early_return_sentinel");e:{const v=l??[],b=new Map(r.map(sr));let x;e[9]!==a?(x=(p,g)=>{const m=Dt(p.metric,a);return Dt(g.metric,a)-m},e[9]=a,e[10]=x):x=e[10];const L=v.map(p=>({connection:p,metric:b.get(p.id)})).filter(tr).sort(x).slice(0,4);if(L.length===0){u=null;break e}n="flex flex-col",c=L.map((p,g)=>{const{connection:m,metric:k}=p,S=o>0?(k.calls/o*100).toFixed(1):"0.0",h=a==="errors"?`${k.errorRate.toFixed(1)}%`:`${S}%`,T=g===L.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!T&&"border-b border-border/50"),onClick:()=>i({to:"/$org/settings/connections/$appSlug",params:{org:d.slug,appSlug:$s(m)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:m.icon,name:m.title,size:"xs",fallbackIcon:t.jsx(Ge,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:m.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:h}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:ys(k,a)})]})]},m.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=i,e[4]=d,e[5]=o,e[6]=n,e[7]=c,e[8]=u}else n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let j;return e[11]!==n||e[12]!==c?(j=t.jsx("div",{className:n,children:c}),e[11]=n,e[12]=c,e[13]=j):j=e[13],j}function tr(s){return s.metric}function sr(s){return[s.connectionId,s]}const Ot=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Et(s){let e=0;for(let r=0;r<s.length;r++)e=e*31+s.charCodeAt(r)>>>0;return Ot[e%Ot.length]}function He(s){const e=le.c(21),{models:r,mode:l}=s,a=l===void 0?"calls":l;if(r.length===0)return null;let o;e[0]!==a?(o=x=>a==="tokens"?(x.inputTokens??0)+(x.outputTokens??0):a==="cost"?x.costUsd??0:x.calls,e[0]=a,e[1]=o):o=e[1];const d=o;let i;e[2]!==a?(i=x=>a==="cost"?At(x):a==="tokens"?st(x):x.toLocaleString(),e[2]=a,e[3]=i):i=e[3];const n=i;let c;e[4]!==d?(c=(x,L)=>x+d(L),e[4]=d,e[5]=c):c=e[5];const u=r.reduce(c,0);let j,v;if(e[6]!==n||e[7]!==r||e[8]!==u||e[9]!==d){let x;e[12]!==d?(x=(g,m)=>d(m)-d(g),e[12]=d,e[13]=x):x=e[13];const L=[...r].sort(x).slice(0,4);j="flex flex-col";let p;e[14]!==n||e[15]!==u||e[16]!==d?(p=(g,m,k)=>{const S=d(g),h=u>0?(S/u*100).toFixed(1):"0.0",T=m===k.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3",!T&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${Et(g.toolName)} 18%, transparent)`},children:t.jsx(Ge,{size:14,style:{color:Et(g.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:g.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[h,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(S)})]})]},g.toolName)},e[14]=n,e[15]=u,e[16]=d,e[17]=p):p=e[17],v=L.map(p),e[6]=n,e[7]=r,e[8]=u,e[9]=d,e[10]=j,e[11]=v}else j=e[10],v=e[11];let b;return e[18]!==j||e[19]!==v?(b=t.jsx("div",{className:j,children:v}),e[18]=j,e[19]=v,e[20]=b):b=e[20],b}function rr(s){const e=le.c(48),{displayDateRange:r,connectionIds:l,excludeConnectionIds:a,toolName:o,status:d,connections:i,isStreaming:n,streamingRefetchInterval:c,llmUserIds:u}=s,j=bs(r),v=n?c:!1;let b;e[0]!==v?(b={refetchInterval:v},e[0]=v,e[1]=b):b=e[1];const{data:x,isError:L}=Zs({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),connectionIds:l.length>0?l:void 0,excludeConnectionIds:a,toolNames:o?[o]:void 0,status:d},b);let p;e[2]!==v?(p={refetchInterval:v},e[2]=v,e[3]=p):p=e[3];const{data:g,isError:m}=er({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),userIds:u?.length?u:void 0},p),k=L||m,S=x?{totalCalls:x.totalCalls,totalErrors:x.totalErrors,avgDurationMs:x.avgDurationMs,p95DurationMs:x.p95DurationMs,data:_t(x.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},h=g?{totalCalls:g.totalCalls,totalErrors:g.totalErrors,avgDurationMs:g.avgDurationMs,p95DurationMs:g.p95DurationMs,data:_t(g.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let T;e[4]!==g?.topTools?(T=g?.topTools??[],e[4]=g?.topTools,e[5]=T):T=e[5];const I=T,f=g?.totalInputTokens??0,M=g?.totalOutputTokens??0,y=g?.totalTokens??0,R=g?.totalCostUsd??0;let C;e[6]!==x?.connectionBreakdown?(C=x?.connectionBreakdown??[],e[6]=x?.connectionBreakdown,e[7]=C):C=e[7];const E=C,[F,H]=K.useState("avg");let A;e[8]!==k?(A=k&&t.jsxs(Ds,{variant:"destructive",children:[t.jsx(ss,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Ls,{children:"Failed to load monitoring data"}),t.jsx(Fs,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=k,e[9]=A):A=e[9];let W;e[10]===Symbol.for("react.memo_cache_sentinel")?(W=_e=>H(_e),e[10]=W):W=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(lt,{className:"w-[120px]",children:t.jsx(ot,{})}),e[11]=w):w=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(at,{children:[t.jsx(Fe,{value:"avg",children:"Avg"}),t.jsx(Fe,{value:"p95",children:"P95"})]}),e[12]=_):_=e[12];let $;e[13]!==F?($=t.jsxs(nt,{value:F,onValueChange:W,children:[w,_]}),e[13]=F,e[14]=$):$=e[14];let z;e[15]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"AI Usage"}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),e[15]=z):z=e[15];let O;e[16]!==I?(O=t.jsx(He,{models:I,mode:"calls"}),e[16]=I,e[17]=O):O=e[17];let V;e[18]!==y?(V=st(y),e[18]=y,e[19]=V):V=e[19];let q;e[20]!==f?(q=st(f),e[20]=f,e[21]=q):q=e[21];let J;e[22]!==M?(J=st(M),e[22]=M,e[23]=J):J=e[23];let Q;e[24]!==q||e[25]!==J?(Q=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[q," in ·"," ",J," out"]}),e[24]=q,e[25]=J,e[26]=Q):Q=e[26];let G;e[27]!==I?(G=t.jsx(He,{models:I,mode:"tokens"}),e[27]=I,e[28]=G):G=e[28];let U;e[29]!==R?(U=R>0?At(R):"—",e[29]=R,e[30]=U):U=e[30];let P;e[31]!==R?(P=R===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=R,e[32]=P):P=e[32];let N;e[33]!==I||e[34]!==R?(N=R>0?t.jsx(He,{models:I,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:"Cost is reported only for the deco AI Gateway and OpenRouter providers."}),e[33]=I,e[34]=R,e[35]=N):N=e[35];let D;e[36]!==I?(D=t.jsx(He,{models:I,mode:"calls"}),e[36]=I,e[37]=D):D=e[37];const B=Te,ee="AI Errors",X=h.totalErrors.toLocaleString();let te;e[38]!==h.data?(te=t.jsx(ke,{data:h.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]"}),e[38]=h.data,e[39]=te):te=e[39];let Y;e[40]!==I||e[41]!==h.totalErrors?(Y=h.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No AI errors in this period"}):t.jsx(He,{models:I,mode:"calls"}),e[40]=I,e[41]=h.totalErrors,e[42]=Y):Y=e[42];let ae;return e[43]!==B||e[44]!==X||e[45]!==te||e[46]!==Y?(ae=t.jsxs(B,{title:ee,value:X,children:[te,Y]}),e[43]=B,e[44]=X,e[45]=te,e[46]=Y,e[47]=ae):ae=e[47],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[A,t.jsxs(Te,{title:"Tool Calls",value:S.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area"}),t.jsx(jt,{metrics:E,connections:i,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"Latency",value:pt(F==="avg"?S.avgDurationMs:S.p95DurationMs),action:$,children:[t.jsx(ke,{data:S.data,dataKey:F,colorNum:4,chartHeight:"h-[120px] md:h-[180px]"}),t.jsx(jt,{metrics:E,connections:i,mode:"latency",total:S.totalCalls})]}),t.jsxs(Te,{title:"Errors",value:S.totalErrors.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]"}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No errors in this period"}):t.jsx(jt,{metrics:E,connections:i,mode:"errors",total:S.totalErrors})]})]}),z,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(Te,{title:"AI Calls",value:h.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:h.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]"}),O]}),t.jsxs(Te,{title:"Tokens",value:V,action:Q,children:[t.jsx(ke,{data:h.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]"}),G]}),t.jsxs(Te,{title:"Cost",value:U,action:P,children:[t.jsx(ke,{data:h.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]"}),N]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"AI Latency",value:pt(h.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(h.p95DurationMs)]}),children:[t.jsx(ke,{data:h.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]"}),D]}),ae]})]})}function Ke(s){const e=le.c(8),{className:r}=s;let l;e[0]!==r?(l=ce("pt-4 px-4 pb-6 gap-8",r),e[0]=r,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=o):o=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=Array.from({length:4}).map(lr),e[4]=d):d=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex flex-col gap-6",children:[o,t.jsxs("div",{className:"flex flex-col",children:[d,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=i):i=e[5];let n;return e[6]!==l?(n=t.jsxs(Bt,{className:l,children:[a,i]}),e[6]=l,e[7]=n):n=e[7],n}function lr(s,e){return t.jsxs("div",{className:ce("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function or(){const s=le.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let r,l;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),l=t.jsx("div",{className:"border-t border-border"}),s[1]=r,s[2]=l):(r=s[1],l=s[2]);let a;return s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,r,l,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{}),t.jsx(Ke,{})]})]}),s[3]=a):a=s[3],a}function ar(s){const e=le.c(46),{log:r,connection:l,virtualMcpName:a,virtualMcpIcon:o,onClick:d,lastLogRef:i}=s;let n,c;if(e[0]!==r.timestamp){const F=new Date(r.timestamp);n=F.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c=F.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=n,e[2]=c}else n=e[1],c=e[2];const u=c,j=l?.icon||null,v=l?.title??r.connectionId;let b;e[3]!==j||e[4]!==v?(b=t.jsx(De,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(qe,{icon:j,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=j,e[4]=v,e[5]=b):b=e[5];let x;e[6]!==r.toolName?(x=t.jsx("div",{className:"font-medium text-foreground truncate block",children:r.toolName}),e[6]=r.toolName,e[7]=x):x=e[7];const L=l?.title??r.connectionId;let p;e[8]!==L?(p=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:L}),e[8]=L,e[9]=p):p=e[9];let g;e[10]!==x||e[11]!==p?(g=t.jsxs(De,{className:"min-w-0 pr-2 md:pr-4",children:[x,p]}),e[10]=x,e[11]=p,e[12]=g):g=e[12];let m;e[13]!==o||e[14]!==a?(m=t.jsx(De,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:a?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:o,name:a,size:"xs",fallbackIcon:t.jsx(Ge,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:a})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=a,e[15]=m):m=e[15];let k;e[16]!==r.userImage||e[17]!==r.userName?(k=t.jsx(qt,{url:r.userImage,fallback:r.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=r.userImage,e[17]=r.userName,e[18]=k):k=e[18];let S;e[19]!==r.userName?(S=t.jsx("span",{className:"truncate",children:r.userName}),e[19]=r.userName,e[20]=S):S=e[20];let h;e[21]!==k||e[22]!==S?(h=t.jsx(De,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[k,S]})}),e[21]=k,e[22]=S,e[23]=h):h=e[23];let T;e[24]!==n?(T=t.jsx("div",{children:n}),e[24]=n,e[25]=T):T=e[25];let I;e[26]!==u?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:u}),e[26]=u,e[27]=I):I=e[27];let f;e[28]!==T||e[29]!==I?(f=t.jsxs(De,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[T,I]}),e[28]=T,e[29]=I,e[30]=f):f=e[30];let M;e[31]!==r.durationMs?(M=t.jsxs(De,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[r.durationMs,"ms"]}),e[31]=r.durationMs,e[32]=M):M=e[32];const y=r.isError?"destructive":"success",R=r.isError?"Error":"OK";let C;e[33]!==y||e[34]!==R?(C=t.jsx(De,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(rt,{variant:y,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:R})})}),e[33]=y,e[34]=R,e[35]=C):C=e[35];let E;return e[36]!==i||e[37]!==d||e[38]!==h||e[39]!==f||e[40]!==M||e[41]!==C||e[42]!==b||e[43]!==g||e[44]!==m?(E=t.jsxs(ut,{ref:i,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:d,children:[b,g,m,h,f,M,C]}),e[36]=i,e[37]=d,e[38]=h,e[39]=f,e[40]=M,e[41]=C,e[42]=b,e[43]=g,e[44]=m,e[45]=E):E=e[45],E}function nr(s){const e=le.c(26),{connectionIds:r,virtualMcpIds:l,tool:a,status:o,search:d,logs:i,hasMore:n,onLoadMore:c,isLoadingMore:u,connections:j,virtualMcps:v,membersData:b,client:x}=s,L=j??[],p=v??[],[g,m]=K.useState(null),k=Vs(c,n,u),S=Vt(b),h=new Map(S.map(mr)),T=new Map(p.map(dr));let f=i.map(N=>{const D=h.get(N.userId??""),B=N.virtualMcpId?T.get(N.virtualMcpId):null;return{...N,userName:D?.name??N.userId??"Unknown",userImage:D?.image??void 0,virtualMcpName:B?.title??null,virtualMcpIcon:B?.icon??null}});if(r.length>1){let N;e[0]!==r?(N=D=>r.includes(D.connectionId),e[0]=r,e[1]=N):N=e[1],f=f.filter(N)}if(l.length>1){let N;e[2]!==l?(N=D=>D.virtualMcpId&&l.includes(D.virtualMcpId),e[2]=l,e[3]=N):N=e[3],f=f.filter(N)}const M=new Map(L.map(cr));if(d){const N=d.toLowerCase();f=f.filter(D=>D.toolName.toLowerCase().includes(N)||(M.get(D.connectionId)?.title??D.connectionId).toLowerCase().includes(N)||D.errorMessage?.toLowerCase().includes(N))}const y=g!==null?f[g]??null:null,R=yt({queryKey:it.monitoringLogDetail(y?.id??""),queryFn:async()=>{if(!x)throw new Error("MCP client is not available");const N=await x.callTool({name:"MONITORING_LOG_GET",arguments:{id:y.id}});return N.structuredContent??N},enabled:y!==null}),C=R.data?.log,E=y&&C?{...y,input:C.input,output:C.output}:y;if(f.length===0){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=N):N=e[4];const D=d||r.length>0||l.length>0||a||o!=="all"?"No logs match your filters":"No logs found in this time range";let B;return e[5]!==D?(B=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(wt,{image:N,title:"No logs found",description:D})}),e[5]=D,e[6]=B):B=e[6],B}const F="flex-1 flex flex-col min-w-0",H="flex-1 min-w-0 pt-1",A="min-w-[600px] md:min-w-0",W=Qt,w="w-full border-collapse";let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Gt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(oe,{className:"w-5"}),t.jsx(oe,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),t.jsx(oe,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),t.jsx(oe,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User"}),t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Latency"}),t.jsx(oe,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[7]=_):_=e[7];const $=Jt,z=f.map((N,D)=>t.jsx(ar,{log:N,connection:M.get(N.connectionId),virtualMcpName:N.virtualMcpName??"",virtualMcpIcon:N.virtualMcpIcon,onClick:()=>m(D),lastLogRef:D===f.length-1?k:void 0},N.id));let O;e[8]!==$||e[9]!==z?(O=t.jsx($,{children:z}),e[8]=$,e[9]=z,e[10]=O):O=e[10];let V;e[11]!==W||e[12]!==_||e[13]!==O?(V=t.jsx("div",{className:H,children:t.jsx("div",{className:A,children:t.jsxs(W,{className:w,children:[_,O]})})}),e[11]=W,e[12]=_,e[13]=O,e[14]=V):V=e[14];const q=g!==null;let J;e[15]!==m?(J=N=>{N||m(null)},e[15]=m,e[16]=J):J=e[16];const Q=y&&g!==null&&t.jsxs(t.Fragment,{children:[t.jsx(zs,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(qe,{icon:M.get(y.connectionId)?.icon||null,name:M.get(y.connectionId)?.title??y.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Os,{className:"text-sm leading-snug truncate",children:y.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:M.get(y.connectionId)?.title??y.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(ir),disabled:g===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(As,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(N=>N!==null&&N<f.length-1?N+1:N),disabled:g===f.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(Ut,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:R.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"size-5 border-2 border-muted-foreground/30 border-t-muted-foreground rounded-full animate-spin"})}):R.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:"Failed to load log details"}),t.jsx(Z,{variant:"outline",size:"sm",onClick:()=>R.refetch(),children:"Retry"})]}):t.jsx(Hs,{log:E})})]});let G;e[17]!==Q?(G=t.jsx(Es,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:Q}),e[17]=Q,e[18]=G):G=e[18];let U;e[19]!==J||e[20]!==G||e[21]!==q?(U=t.jsx(Ps,{open:q,onOpenChange:J,children:G}),e[19]=J,e[20]=G,e[21]=q,e[22]=U):U=e[22];let P;return e[23]!==U||e[24]!==V?(P=t.jsxs("div",{className:F,children:[V,U]}),e[23]=U,e[24]=V,e[25]=P):P=e[25],P}function ir(s){return s!==null&&s>0?s-1:s}function cr(s){return[s.id,s]}function dr(s){return[s.id,s]}function mr(s){return[s.userId,s.user]}function ur(){const s=le.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(oe,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(oe,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=r):r=s[1];let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(oe,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=l):l=s[2];let a;s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=a):a=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=o):o=s[4];let d;s[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s[5]=d):d=s[5];let i;s[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Gt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,r,l,a,o,d,t.jsx(oe,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),s[6]=i):i=s[6];let n;return s[7]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(Qt,{className:"w-full border-collapse",children:[i,t.jsx(Jt,{children:Array.from({length:8}).map(xr)})]})})}),s[7]=n):n=s[7],n}function xr(s,e){return t.jsxs(ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const Nt=Object.assign(nr,{Skeleton:ur});function fr(s){const e=le.c(34),{client:r,locator:l,baseParams:a,pageSize:o,isStreaming:d,streamingRefetchInterval:i,connectionIds:n,virtualMcpIds:c,tool:u,status:j,searchQuery:v,allConnections:b,allVirtualMcps:x,membersData:L}=s;let p;e[0]!==a||e[1]!==l?(p=it.monitoringLogsInfinite(l,JSON.stringify(a)),e[0]=a,e[1]=l,e[2]=p):p=e[2];let g;e[3]!==a||e[4]!==r||e[5]!==o?(g=async H=>{const{pageParam:A}=H,W=A===void 0?0:A;if(!r)throw new Error("MCP client is not available");const w=await r.callTool({name:"MONITORING_LOGS_LIST",arguments:{...a,limit:o,offset:W}});return w.structuredContent??w},e[3]=a,e[4]=r,e[5]=o,e[6]=g):g=e[6];let m;e[7]!==o?(m=(H,A)=>{if(!((H?.logs?.length??0)<o))return A.length*o},e[7]=o,e[8]=m):m=e[8];const k=d?i:!1;let S;e[9]!==p||e[10]!==g||e[11]!==m||e[12]!==k?(S={queryKey:p,queryFn:g,initialPageParam:0,getNextPageParam:m,staleTime:0,refetchInterval:k},e[9]=p,e[10]=g,e[11]=m,e[12]=k,e[13]=S):S=e[13];const{data:h,fetchNextPage:T,hasNextPage:I,isFetchingNextPage:f}=Rs(S);let M;e[14]!==h.pages?(M=h.pages.flatMap(pr),e[14]=h.pages,e[15]=M):M=e[15];const y=M;let R;e[16]!==T||e[17]!==I||e[18]!==f?(R=()=>{I&&!f&&T()},e[16]=T,e[17]=I,e[18]=f,e[19]=R):R=e[19];const C=R,E=I??!1;let F;return e[20]!==b||e[21]!==x||e[22]!==r||e[23]!==n||e[24]!==C||e[25]!==f||e[26]!==L||e[27]!==y||e[28]!==v||e[29]!==j||e[30]!==E||e[31]!==u||e[32]!==c?(F=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(Nt,{connectionIds:n,virtualMcpIds:c,tool:u,status:j,search:v,logs:y,hasMore:E,onLoadMore:C,isLoadingMore:f,connections:b,virtualMcps:x,membersData:L,client:r})})})}),e[20]=b,e[21]=x,e[22]=r,e[23]=n,e[24]=C,e[25]=f,e[26]=L,e[27]=y,e[28]=v,e[29]=j,e[30]=E,e[31]=u,e[32]=c,e[33]=F):F=e[33],F}function pr(s){return s.logs??[]}function hr(s){const e=le.c(15),{dateRange:r}=s,{data:l,isLoading:a}=Us(void 0);let o;e[0]!==l?(o=l===void 0?[]:l,e[0]=l,e[1]=o):o=e[1];const d=o,[i,n]=K.useState(null),c=i??d[0]?.id??null,{data:u}=Ks(c??"");let j;e[2]!==r.startDate?(j=r.startDate.toISOString(),e[2]=r.startDate,e[3]=j):j=e[3];let v;e[4]!==r.endDate?(v=r.endDate.toISOString(),e[4]=r.endDate,e[5]=v):v=e[5];let b;e[6]!==j||e[7]!==v?(b={startDate:j,endDate:v},e[6]=j,e[7]=v,e[8]=b):b=e[8];const x=b;let L;return e[9]!==u||e[10]!==d||e[11]!==c||e[12]!==a||e[13]!==x?(L=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:a?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):d.length===0?t.jsx("div",{className:"py-16",children:t.jsx(wt,{title:"No automations",description:"Create an automation to see its runs and usage here."})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(nt,{value:c??"",onValueChange:p=>n(p),children:[t.jsx(lt,{className:"w-72",children:t.jsx(ot,{placeholder:"Select an automation…"})}),t.jsx(at,{children:d.map(jr)})]})}),u?t.jsx(ws,{automationId:u.id,triggerIds:u.triggers.map(gr),range:x}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=u,e[10]=d,e[11]=c,e[12]=a,e[13]=x,e[14]=L):L=e[14],L}function gr(s){return s.id}function jr(s){return t.jsx(Fe,{value:s.id,children:s.name},s.id)}const vr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Nr({connectionIds:s,virtualMcpIds:e,tool:r,status:l,hideSystem:a,propertyFilters:o,connectionOptions:d,virtualMcpOptions:i,activeFiltersCount:n,onUpdateFilters:c,onConnectionSearchChange:u,memberOptions:j,llmUserIds:v=[],onLlmUserIdsChange:b,showMemberFilter:x}){const[L,p]=K.useState(!1),[g,m]=K.useState("form"),[k,S]=K.useState(r),[h,T]=K.useState(o),[I,f]=K.useState(Ye(o)),M=K.useRef(r),y=K.useRef(Le(o));M.current!==r&&(M.current=r,k!==r&&S(r));const R=Le(o);y.current!==R&&(y.current=R,T(o),f(Ye(o)));const C=(w,_)=>{const $=[...h],z=$[w];z&&($[w]={key:_.key??z.key,operator:_.operator??z.operator,value:_.value??z.value},T($))},E=()=>{T([...h,{key:"",operator:"eq",value:""}])},F=w=>{const _=h.filter(($,z)=>z!==w);T(_),f(Ye(_)),c({propertyFilters:Le(_)})},H=()=>{c({propertyFilters:Le(h)})},A=()=>{const w=Lt(I);T(w),c({propertyFilters:Le(w)})},W=()=>{if(g==="raw"){const w=Lt(I);T(w),m("form")}else f(Ye(h)),m("raw")};return t.jsxs(ct,{open:L,onOpenChange:p,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(Pt,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:n}),t.jsx(rt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:n})]})]})}),t.jsx(mt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(_s,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),t.jsx(Ms,{id:"hide-system-calls",checked:a,onCheckedChange:w=>c({hideSystem:!!w})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(ht,{options:d,defaultValue:s,onValueChange:w=>c({connectionId:w}),onSearchChange:u,placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),t.jsx(ht,{options:i,defaultValue:e,onValueChange:w=>c({virtualMcpId:w}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),x&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(ht,{options:j??[],defaultValue:v,onValueChange:w=>b?.(w),placeholder:"All members",variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Filters AI usage (calls, tokens, cost) only."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),t.jsx(Qe,{id:"filter-tool",placeholder:"Filter by tool...",value:k,onChange:w=>S(w.target.value),onBlur:()=>{k!==r&&c({tool:k})},onKeyDown:w=>{w.key==="Enter"&&k!==r&&c({tool:k})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),t.jsxs(nt,{value:l,onValueChange:w=>c({status:w}),children:[t.jsx(lt,{className:"w-full",children:t.jsx(ot,{})}),t.jsxs(at,{children:[t.jsx(Fe,{value:"all",children:"All Status"}),t.jsx(Fe,{value:"success",children:"Success Only"}),t.jsx(Fe,{value:"errors",children:"Errors Only"})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:W,children:g==="raw"?t.jsx(js,{size:14}):t.jsx(us,{size:14})})}),t.jsx(tt,{children:g==="raw"?"Switch to form view":"Switch to raw text"})]})]}),g==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ts,{placeholder:`Paste property filters here:
5
+ ... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:r}}function $t(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function Hs(s){const e=le.c(116),{log:r}=s,[l,a]=K.useState(!1),[o,d]=K.useState(!1),i=bt(),{org:n}=Be(),c=Ft(r.input),u=Ft(r.output),j=Js;let v;e[0]!==r.input||e[1]!==r.output?(v=async se=>{const re=j(se==="input"?r.input:r.output);try{await navigator.clipboard.writeText(re),se==="input"?(a(!0),setTimeout(()=>a(!1),2e3)):(d(!0),setTimeout(()=>d(!1),2e3))}catch{Ce.error("Failed to copy to clipboard")}},e[0]=r.input,e[1]=r.output,e[2]=v):v=e[2];const b=v;let x;e[3]!==r.id||e[4]!==r.input||e[5]!==r.output||e[6]!==r.toolName?(x=se=>{const re=j(se==="input"?r.input:r.output),ie=new Blob([re],{type:"application/json"}),pe=URL.createObjectURL(ie),ye=document.createElement("a");ye.href=pe,ye.download=`${r.toolName}-${se}-${r.id}.json`,ye.click(),URL.revokeObjectURL(pe)},e[3]=r.id,e[4]=r.input,e[5]=r.output,e[6]=r.toolName,e[7]=x):x=e[7];const L=x;let p;e[8]!==r.connectionId||e[9]!==r.input||e[10]!==r.toolName||e[11]!==i||e[12]!==n.slug?(p=()=>{const se=crypto.randomUUID();sessionStorage.setItem(`replay-${se}`,JSON.stringify(r.input)),i({to:"/$org/settings/connections/$connectionId/$collectionName/$itemId",params:{org:n.slug,connectionId:r.connectionId,collectionName:"tools",itemId:encodeURIComponent(r.toolName)},search:{replayId:se}})},e[8]=r.connectionId,e[9]=r.input,e[10]=r.toolName,e[11]=i,e[12]=n.slug,e[13]=p):p=e[13];const g=p,[m,k]=K.useState(!1);let S;e[14]!==r.requestId?(S=async()=>{try{await navigator.clipboard.writeText(r.requestId),k(!0),setTimeout(()=>k(!1),2e3)}catch{Ce.error("Failed to copy to clipboard")}},e[14]=r.requestId,e[15]=S):S=e[15];const h=S;let T;e[16]!==r.timestamp?(T=new Date(r.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[16]=r.timestamp,e[17]=T):T=e[17];const I=T,f="text-sm px-5 md:px-6 py-5 space-y-5";let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[18]=M):M=e[18];let y;e[19]!==I?(y=t.jsxs("div",{children:[M,t.jsx("div",{className:"text-sm text-foreground",children:I})]}),e[19]=I,e[20]=y):y=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[21]=R):R=e[21];let C;e[22]!==r.durationMs?(C=t.jsxs("div",{children:[R,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[r.durationMs,"ms"]})]}),e[22]=r.durationMs,e[23]=C):C=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[24]=E):E=e[24];let F;e[25]!==r.userName?(F=t.jsxs("div",{children:[E,t.jsx("div",{className:"text-sm text-foreground",children:r.userName})]}),e[25]=r.userName,e[26]=F):F=e[26];let H;e[27]!==r.virtualMcpName?(H=r.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsx("div",{className:"text-sm text-foreground",children:r.virtualMcpName})]}),e[27]=r.virtualMcpName,e[28]=H):H=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[29]=A):A=e[29];let W;e[30]!==r.requestId?(W=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:r.requestId}),e[30]=r.requestId,e[31]=W):W=e[31];let w;e[32]!==m?(w=m?t.jsx(ft,{size:12}):t.jsx(Xe,{size:12}),e[32]=m,e[33]=w):w=e[33];let _;e[34]!==h||e[35]!==w?(_=t.jsx(Z,{size:"icon",variant:"ghost",onClick:h,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:w}),e[34]=h,e[35]=w,e[36]=_):_=e[36];let $;e[37]!==W||e[38]!==_?($=t.jsxs("div",{children:[A,t.jsxs("div",{className:"flex items-center gap-1",children:[W,_]})]}),e[37]=W,e[38]=_,e[39]=$):$=e[39];let z;e[40]!==r.userAgent?(z=r.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:r.userAgent})]}),e[40]=r.userAgent,e[41]=z):z=e[41];let O;e[42]!==r.properties||e[43]!==i||e[44]!==n.slug?(O=r.properties&&Object.keys(r.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:"Properties"}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(r.properties).map(se=>{const[re,ie]=se;return t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsxs(rt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[re,"=",ie]})}),t.jsx(mt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const pe={key:re,operator:"eq",value:ie};i({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Le([pe])}})},children:[t.jsx(Pt,{size:14,className:"mr-2"}),"Filter by this property"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${re}=${ie}`),Ce.success("Copied filter to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(Xe,{size:14,className:"mr-2"}),"Copy filter"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(re),Ce.success("Copied key to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(ns,{size:14,className:"mr-2"}),"Copy key"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(ie),Ce.success("Copied value to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(cs,{size:14,className:"mr-2"}),"Copy value"]})]})})]},re)})})]}),e[42]=r.properties,e[43]=i,e[44]=n.slug,e[45]=O):O=e[45];let V;e[46]!==C||e[47]!==F||e[48]!==H||e[49]!==$||e[50]!==z||e[51]!==O||e[52]!==y?(V=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[y,C,F,H,$,z,O]}),e[46]=C,e[47]=F,e[48]=H,e[49]=$,e[50]=z,e[51]=O,e[52]=y,e[53]=V):V=e[53];let q;e[54]!==r.errorMessage?(q=r.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:"Error"}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:r.errorMessage})]}),e[54]=r.errorMessage,e[55]=q):q=e[55];const J="space-y-4";let G;e[56]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[56]=G):G=e[56];const Q=c.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",$t(c.originalSize)," - truncated)"]});let U;e[57]!==Q?(U=t.jsxs("div",{className:"flex items-center gap-2",children:[G,Q]}),e[57]=Q,e[58]=U):U=e[58];let P;e[59]!==g||e[60]!==r.input?(P=r.input&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:g,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(is,{size:14})})}),t.jsx(tt,{children:"Replay tool call"})]}),e[59]=g,e[60]=r.input,e[61]=P):P=e[61];let N;e[62]!==L||e[63]!==c?(N=c.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(kt,{size:14})})}),t.jsx(tt,{children:"Download full input"})]}),e[62]=L,e[63]=c,e[64]=N):N=e[64];let D;e[65]!==b?(D=()=>b("input"),e[65]=b,e[66]=D):D=e[66];let B;e[67]!==l?(B=l?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[67]=l,e[68]=B):B=e[68];let ee;e[69]!==D||e[70]!==B?(ee=t.jsx(Z,{size:"icon",variant:"ghost",onClick:D,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:B}),e[69]=D,e[70]=B,e[71]=ee):ee=e[71];let X;e[72]!==P||e[73]!==N||e[74]!==ee?(X=t.jsxs("div",{className:"flex items-center gap-1",children:[P,N,ee]}),e[72]=P,e[73]=N,e[74]=ee,e[75]=X):X=e[75];let te;e[76]!==U||e[77]!==X?(te=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[U,X]}),e[76]=U,e[77]=X,e[78]=te):te=e[78];let Y;e[79]!==c?(Y=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Tt,{code:c.content,language:"json",height:"100%",readOnly:!0})}),e[79]=c,e[80]=Y):Y=e[80];let ae;e[81]!==te||e[82]!==Y?(ae=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[te,Y]})}),e[81]=te,e[82]=Y,e[83]=ae):ae=e[83];const _e="rounded-lg overflow-hidden border border-border",$e="flex items-center justify-between p-1 pl-4 border-b border-border",Se="flex items-center gap-2";let ne;e[84]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[84]=ne):ne=e[84];const he=u.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",$t(u.originalSize)," - truncated)"]});let ge;e[85]!==ne||e[86]!==he?(ge=t.jsxs("div",{className:Se,children:[ne,he]}),e[85]=ne,e[86]=he,e[87]=ge):ge=e[87];let je;e[88]!==L||e[89]!==u.isTruncated?(je=u.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(kt,{size:14})})}),t.jsx(tt,{children:"Download full output"})]}),e[88]=L,e[89]=u.isTruncated,e[90]=je):je=e[90];let ve;e[91]!==b?(ve=()=>b("output"),e[91]=b,e[92]=ve):ve=e[92];let Ne;e[93]!==o?(Ne=o?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[93]=o,e[94]=Ne):Ne=e[94];let de;e[95]!==ve||e[96]!==Ne?(de=t.jsx(Z,{size:"icon",variant:"ghost",onClick:ve,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:Ne}),e[95]=ve,e[96]=Ne,e[97]=de):de=e[97];let be;e[98]!==je||e[99]!==de?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[je,de]}),e[98]=je,e[99]=de,e[100]=be):be=e[100];let me;e[101]!==ge||e[102]!==be?(me=t.jsxs("div",{className:$e,children:[ge,be]}),e[101]=ge,e[102]=be,e[103]=me):me=e[103];let ue;e[104]!==u.content?(ue=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Tt,{code:u.content,language:"json",height:"100%",readOnly:!0})}),e[104]=u.content,e[105]=ue):ue=e[105];let xe;e[106]!==me||e[107]!==ue?(xe=t.jsx("div",{children:t.jsxs("div",{className:_e,children:[me,ue]})}),e[106]=me,e[107]=ue,e[108]=xe):xe=e[108];let fe;e[109]!==ae||e[110]!==xe?(fe=t.jsxs("div",{className:J,children:[ae,xe]}),e[109]=ae,e[110]=xe,e[111]=fe):fe=e[111];let Re;return e[112]!==V||e[113]!==q||e[114]!==fe?(Re=t.jsxs("div",{className:f,children:[V,q,fe]}),e[112]=V,e[113]=q,e[114]=fe,e[115]=Re):Re=e[115],Re}function Js(s){return JSON.stringify(s,null,2)}const Wt=/^now(?:-(\d+)([mhdwM]))?$/,Gs={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Xt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const r=e.match(Wt);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,a=r[2]||null;return{isNow:!0,offset:l,unit:a}}function we(s){const e=s.trim(),r=new Date(e);if(!Number.isNaN(r.getTime())&&e.includes("-"))return{valid:!0,date:r};const l=Xt(e);if(!l)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const a=new Date,o=new Date(a);if(l.offset===0||!l.unit)return{valid:!0,date:o};switch(l.unit){case"m":o.setMinutes(o.getMinutes()-l.offset);break;case"h":o.setHours(o.getHours()-l.offset);break;case"d":o.setDate(o.getDate()-l.offset);break;case"w":o.setDate(o.getDate()-l.offset*7);break;case"M":o.setMonth(o.getMonth()-l.offset);break}return{valid:!0,date:o}}function Qs(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Yt(s){const e=s.trim();return Wt.test(e)}function Rt(s){const e=s.trim();if(e==="now")return"Now";const r=Xt(e);if(!r||!r.unit){const o=we(e);return o.valid&&o.date?Qs(o.date):e}const l=Gs[r.unit],a=r.offset!==1?"s":"";return`${r.offset} ${l}${a} ago`}const Zt=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function Ws(s,e){const r=Zt.find(l=>l.from===s&&l.to===e);return r?r.label:`${Rt(s)} to ${Rt(e)}`}function Je(s){const e=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),a=String(s.getHours()).padStart(2,"0"),o=String(s.getMinutes()).padStart(2,"0"),d=String(s.getSeconds()).padStart(2,"0");return`${e}-${r}-${l} ${a}:${o}:${d}`}function Xs(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,r,l,a,o,d,i]=e,n=new Date(Number(r),Number(l)-1,Number(a),Number(o),Number(d),Number(i));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Yt(s))return s;const e=we(s);return e.valid&&e.date?Je(e.date):s}function zt({value:s,onChange:e,placeholder:r="now or now-2d",className:l,disabled:a,error:o}){const[d,i]=K.useState(!1),[n,c]=K.useState(()=>gt(s)),[u,j]=K.useState(),[v,b]=K.useState(!1),x=K.useRef(s);x.current!==s&&(x.current=s,v||c(gt(s)));const L=f=>{const M=f.target.value;c(M),j(void 0)},p=()=>{b(!0)},g=()=>{b(!1);const f=n.trim();if(Yt(f)){j(void 0),e(f);return}const M=Xs(f);if(M){j(void 0),e(M.toISOString()),c(Je(M));return}const y=we(f);if(y.valid&&y.date){j(void 0),e(f),c(Je(y.date));return}c(gt(s)),j(void 0)},m=f=>{if(f){const y=we(s).date||new Date;f.setHours(y.getHours()),f.setMinutes(y.getMinutes()),f.setSeconds(0),f.setMilliseconds(0);const R=f.toISOString();c(Je(f)),e(R),j(void 0)}i(!1)},k=f=>{const[M,y]=f.target.value.split(":").map(Number),C=we(s).date||new Date;C.setHours(M||0),C.setMinutes(y||0),C.setSeconds(0),C.setMilliseconds(0);const E=C.toISOString();c(Je(C)),e(E)},S=we(s),h=S.valid?S.date:new Date,T=h?`${String(h.getHours()).padStart(2,"0")}:${String(h.getMinutes()).padStart(2,"0")}`:"",I=o||u;return t.jsxs("div",{className:ce("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ge,{value:n,onChange:L,onFocus:p,onBlur:g,placeholder:r,disabled:a,className:ce("text-sm h-8",I&&"border-destructive focus-visible:ring-destructive")}),I&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:I})]}),t.jsxs(ct,{open:d,onOpenChange:i,children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:a,children:t.jsx(ds,{className:"h-4 w-4"})})}),t.jsxs(mt,{className:"w-auto p-0",align:"end",children:[t.jsx(ks,{mode:"single",selected:h||void 0,onSelect:m,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ge,{type:"time",value:T,onChange:k,className:"text-sm h-8"})]})]})]})]})}function Ys({value:s,onChange:e,className:r,disabled:l,quickRanges:a=Zt}){const[o,d]=K.useState(!1),[i,n]=K.useState(s.from),[c,u]=K.useState(s.to),[j,v]=K.useState(null),b=K.useRef({from:s.from,to:s.to});(b.current.from!==s.from||b.current.to!==s.to)&&(b.current={from:s.from,to:s.to},n(s.from),u(s.to));const x=m=>{b.current={from:m.from,to:m.to},n(m.from),u(m.to),d(!1),e({from:m.from,to:m.to})},L=()=>{const m=we(i),k=we(c);if(!m.valid||!m.date){v("Invalid 'From' date");return}if(!k.valid||!k.date){v("Invalid 'To' date");return}if(m.date>=k.date){v("'From' must be before 'To'");return}v(null),e({from:i,to:c}),d(!1)},p=m=>s.from===m.from&&s.to===m.to,g=Ws(s.from,s.to);return t.jsxs(ct,{open:o,onOpenChange:d,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:ce("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ms,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:g})]}),t.jsx(Ut,{className:"size-4 text-muted-foreground"})]})}),t.jsx(mt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:m=>m.preventDefault(),style:o?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:"Absolute time range"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"From"}),t.jsx(zt,{value:i,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"To"}),t.jsx(zt,{value:c,onChange:u,placeholder:"now"})]}),j&&t.jsx("p",{className:"text-xs text-destructive",children:j}),t.jsx(Z,{onClick:L,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(Cs,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:a.map(m=>{const k=p(m);return t.jsx("button",{type:"button",onClick:()=>x(m),className:ce("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",k&&"bg-accent text-accent-foreground font-medium"),children:m.label},m.value)})})})})]})})]})}const es="decopilot";async function ts(s,e){return await s.call("MONITORING_STATS",e)}function Zs(s,e){const r=le.c(12),{org:l}=Be(),a=Ht();let o,d,i;r[0]!==l.id||r[1]!==s?(i={...s,excludeConnectionIds:[es,...s.excludeConnectionIds??[]]},d=yt,o=it.monitoringStatsToolCalls(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=d,r[4]=i):(o=r[2],d=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ts(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let c;return r[8]!==e||r[9]!==o||r[10]!==n?(c={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=c):c=r[11],d(c)}function er(s,e){const r=le.c(12),{org:l}=Be(),a=Ht();let o,d,i;r[0]!==l.id||r[1]!==s?(i={...s,connectionIds:[es],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},d=yt,o=it.monitoringStatsLlm(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=d,r[4]=i):(o=r[2],d=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ts(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let c;return r[8]!==e||r[9]!==o||r[10]!==n?(c={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=c):c=r[11],d(c)}function Te(s){const e=le.c(20),{title:r,value:l,action:a,children:o,className:d}=s;let i;e[0]!==d?(i=ce("pt-4 px-4 pb-6 gap-8",d),e[0]=d,e[1]=i):i=e[1];let n;e[2]!==r?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:r}),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==l?(c=t.jsx("span",{className:"text-4xl font-normal",children:l}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==c?(u=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,c]}),e[6]=n,e[7]=c,e[8]=u):u=e[8];let j;e[9]!==a?(j=a&&t.jsx("div",{className:"shrink-0",children:a}),e[9]=a,e[10]=j):j=e[10];let v;e[11]!==u||e[12]!==j?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[u,j]}),e[11]=u,e[12]=j,e[13]=v):v=e[13];let b;e[14]!==o?(b=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=b):b=e[15];let x;return e[16]!==i||e[17]!==v||e[18]!==b?(x=t.jsxs(Bt,{className:i,children:[v,b]}),e[16]=i,e[17]=v,e[18]=b,e[19]=x):x=e[19],x}function jt(s){const e=le.c(14),{metrics:r,connections:l,mode:a,total:o}=s,{org:d}=Be(),i=bt();let n,c,u;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==i||e[4]!==d||e[5]!==o){u=Symbol.for("react.early_return_sentinel");e:{const v=l??[],b=new Map(r.map(sr));let x;e[9]!==a?(x=(p,g)=>{const m=Dt(p.metric,a);return Dt(g.metric,a)-m},e[9]=a,e[10]=x):x=e[10];const L=v.map(p=>({connection:p,metric:b.get(p.id)})).filter(tr).sort(x).slice(0,4);if(L.length===0){u=null;break e}n="flex flex-col",c=L.map((p,g)=>{const{connection:m,metric:k}=p,S=o>0?(k.calls/o*100).toFixed(1):"0.0",h=a==="errors"?`${k.errorRate.toFixed(1)}%`:`${S}%`,T=g===L.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!T&&"border-b border-border/50"),onClick:()=>i({to:"/$org/settings/connections/$appSlug",params:{org:d.slug,appSlug:$s(m)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:m.icon,name:m.title,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:m.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:h}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:ys(k,a)})]})]},m.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=i,e[4]=d,e[5]=o,e[6]=n,e[7]=c,e[8]=u}else n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let j;return e[11]!==n||e[12]!==c?(j=t.jsx("div",{className:n,children:c}),e[11]=n,e[12]=c,e[13]=j):j=e[13],j}function tr(s){return s.metric}function sr(s){return[s.connectionId,s]}const Ot=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Et(s){let e=0;for(let r=0;r<s.length;r++)e=e*31+s.charCodeAt(r)>>>0;return Ot[e%Ot.length]}function He(s){const e=le.c(21),{models:r,mode:l}=s,a=l===void 0?"calls":l;if(r.length===0)return null;let o;e[0]!==a?(o=x=>a==="tokens"?(x.inputTokens??0)+(x.outputTokens??0):a==="cost"?x.costUsd??0:x.calls,e[0]=a,e[1]=o):o=e[1];const d=o;let i;e[2]!==a?(i=x=>a==="cost"?At(x):a==="tokens"?st(x):x.toLocaleString(),e[2]=a,e[3]=i):i=e[3];const n=i;let c;e[4]!==d?(c=(x,L)=>x+d(L),e[4]=d,e[5]=c):c=e[5];const u=r.reduce(c,0);let j,v;if(e[6]!==n||e[7]!==r||e[8]!==u||e[9]!==d){let x;e[12]!==d?(x=(g,m)=>d(m)-d(g),e[12]=d,e[13]=x):x=e[13];const L=[...r].sort(x).slice(0,4);j="flex flex-col";let p;e[14]!==n||e[15]!==u||e[16]!==d?(p=(g,m,k)=>{const S=d(g),h=u>0?(S/u*100).toFixed(1):"0.0",T=m===k.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3",!T&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${Et(g.toolName)} 18%, transparent)`},children:t.jsx(Qe,{size:14,style:{color:Et(g.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:g.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[h,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(S)})]})]},g.toolName)},e[14]=n,e[15]=u,e[16]=d,e[17]=p):p=e[17],v=L.map(p),e[6]=n,e[7]=r,e[8]=u,e[9]=d,e[10]=j,e[11]=v}else j=e[10],v=e[11];let b;return e[18]!==j||e[19]!==v?(b=t.jsx("div",{className:j,children:v}),e[18]=j,e[19]=v,e[20]=b):b=e[20],b}function rr(s){const e=le.c(48),{displayDateRange:r,connectionIds:l,excludeConnectionIds:a,toolName:o,status:d,connections:i,isStreaming:n,streamingRefetchInterval:c,llmUserIds:u}=s,j=bs(r),v=n?c:!1;let b;e[0]!==v?(b={refetchInterval:v},e[0]=v,e[1]=b):b=e[1];const{data:x,isError:L}=Zs({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),connectionIds:l.length>0?l:void 0,excludeConnectionIds:a,toolNames:o?[o]:void 0,status:d},b);let p;e[2]!==v?(p={refetchInterval:v},e[2]=v,e[3]=p):p=e[3];const{data:g,isError:m}=er({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),userIds:u?.length?u:void 0},p),k=L||m,S=x?{totalCalls:x.totalCalls,totalErrors:x.totalErrors,avgDurationMs:x.avgDurationMs,p95DurationMs:x.p95DurationMs,data:_t(x.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},h=g?{totalCalls:g.totalCalls,totalErrors:g.totalErrors,avgDurationMs:g.avgDurationMs,p95DurationMs:g.p95DurationMs,data:_t(g.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let T;e[4]!==g?.topTools?(T=g?.topTools??[],e[4]=g?.topTools,e[5]=T):T=e[5];const I=T,f=g?.totalInputTokens??0,M=g?.totalOutputTokens??0,y=g?.totalTokens??0,R=g?.totalCostUsd??0;let C;e[6]!==x?.connectionBreakdown?(C=x?.connectionBreakdown??[],e[6]=x?.connectionBreakdown,e[7]=C):C=e[7];const E=C,[F,H]=K.useState("avg");let A;e[8]!==k?(A=k&&t.jsxs(Ds,{variant:"destructive",children:[t.jsx(ss,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Ls,{children:"Failed to load monitoring data"}),t.jsx(Fs,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=k,e[9]=A):A=e[9];let W;e[10]===Symbol.for("react.memo_cache_sentinel")?(W=_e=>H(_e),e[10]=W):W=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(lt,{className:"w-[120px]",children:t.jsx(ot,{})}),e[11]=w):w=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(at,{children:[t.jsx(Fe,{value:"avg",children:"Avg"}),t.jsx(Fe,{value:"p95",children:"P95"})]}),e[12]=_):_=e[12];let $;e[13]!==F?($=t.jsxs(nt,{value:F,onValueChange:W,children:[w,_]}),e[13]=F,e[14]=$):$=e[14];let z;e[15]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"AI Usage"}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),e[15]=z):z=e[15];let O;e[16]!==I?(O=t.jsx(He,{models:I,mode:"calls"}),e[16]=I,e[17]=O):O=e[17];let V;e[18]!==y?(V=st(y),e[18]=y,e[19]=V):V=e[19];let q;e[20]!==f?(q=st(f),e[20]=f,e[21]=q):q=e[21];let J;e[22]!==M?(J=st(M),e[22]=M,e[23]=J):J=e[23];let G;e[24]!==q||e[25]!==J?(G=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[q," in ·"," ",J," out"]}),e[24]=q,e[25]=J,e[26]=G):G=e[26];let Q;e[27]!==I?(Q=t.jsx(He,{models:I,mode:"tokens"}),e[27]=I,e[28]=Q):Q=e[28];let U;e[29]!==R?(U=R>0?At(R):"—",e[29]=R,e[30]=U):U=e[30];let P;e[31]!==R?(P=R===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=R,e[32]=P):P=e[32];let N;e[33]!==I||e[34]!==R?(N=R>0?t.jsx(He,{models:I,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:"Cost is reported only for the deco AI Gateway and OpenRouter providers."}),e[33]=I,e[34]=R,e[35]=N):N=e[35];let D;e[36]!==I?(D=t.jsx(He,{models:I,mode:"calls"}),e[36]=I,e[37]=D):D=e[37];const B=Te,ee="AI Errors",X=h.totalErrors.toLocaleString();let te;e[38]!==h.data?(te=t.jsx(ke,{data:h.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]"}),e[38]=h.data,e[39]=te):te=e[39];let Y;e[40]!==I||e[41]!==h.totalErrors?(Y=h.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No AI errors in this period"}):t.jsx(He,{models:I,mode:"calls"}),e[40]=I,e[41]=h.totalErrors,e[42]=Y):Y=e[42];let ae;return e[43]!==B||e[44]!==X||e[45]!==te||e[46]!==Y?(ae=t.jsxs(B,{title:ee,value:X,children:[te,Y]}),e[43]=B,e[44]=X,e[45]=te,e[46]=Y,e[47]=ae):ae=e[47],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[A,t.jsxs(Te,{title:"Tool Calls",value:S.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area"}),t.jsx(jt,{metrics:E,connections:i,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"Latency",value:pt(F==="avg"?S.avgDurationMs:S.p95DurationMs),action:$,children:[t.jsx(ke,{data:S.data,dataKey:F,colorNum:4,chartHeight:"h-[120px] md:h-[180px]"}),t.jsx(jt,{metrics:E,connections:i,mode:"latency",total:S.totalCalls})]}),t.jsxs(Te,{title:"Errors",value:S.totalErrors.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]"}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No errors in this period"}):t.jsx(jt,{metrics:E,connections:i,mode:"errors",total:S.totalErrors})]})]}),z,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(Te,{title:"AI Calls",value:h.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:h.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]"}),O]}),t.jsxs(Te,{title:"Tokens",value:V,action:G,children:[t.jsx(ke,{data:h.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]"}),Q]}),t.jsxs(Te,{title:"Cost",value:U,action:P,children:[t.jsx(ke,{data:h.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]"}),N]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"AI Latency",value:pt(h.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(h.p95DurationMs)]}),children:[t.jsx(ke,{data:h.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]"}),D]}),ae]})]})}function Ke(s){const e=le.c(8),{className:r}=s;let l;e[0]!==r?(l=ce("pt-4 px-4 pb-6 gap-8",r),e[0]=r,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=o):o=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=Array.from({length:4}).map(lr),e[4]=d):d=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex flex-col gap-6",children:[o,t.jsxs("div",{className:"flex flex-col",children:[d,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=i):i=e[5];let n;return e[6]!==l?(n=t.jsxs(Bt,{className:l,children:[a,i]}),e[6]=l,e[7]=n):n=e[7],n}function lr(s,e){return t.jsxs("div",{className:ce("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function or(){const s=le.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let r,l;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),l=t.jsx("div",{className:"border-t border-border"}),s[1]=r,s[2]=l):(r=s[1],l=s[2]);let a;return s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,r,l,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{}),t.jsx(Ke,{})]})]}),s[3]=a):a=s[3],a}function ar(s){const e=le.c(46),{log:r,connection:l,virtualMcpName:a,virtualMcpIcon:o,onClick:d,lastLogRef:i}=s;let n,c;if(e[0]!==r.timestamp){const F=new Date(r.timestamp);n=F.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c=F.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=n,e[2]=c}else n=e[1],c=e[2];const u=c,j=l?.icon||null,v=l?.title??r.connectionId;let b;e[3]!==j||e[4]!==v?(b=t.jsx(De,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(qe,{icon:j,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=j,e[4]=v,e[5]=b):b=e[5];let x;e[6]!==r.toolName?(x=t.jsx("div",{className:"font-medium text-foreground truncate block",children:r.toolName}),e[6]=r.toolName,e[7]=x):x=e[7];const L=l?.title??r.connectionId;let p;e[8]!==L?(p=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:L}),e[8]=L,e[9]=p):p=e[9];let g;e[10]!==x||e[11]!==p?(g=t.jsxs(De,{className:"min-w-0 pr-2 md:pr-4",children:[x,p]}),e[10]=x,e[11]=p,e[12]=g):g=e[12];let m;e[13]!==o||e[14]!==a?(m=t.jsx(De,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:a?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:o,name:a,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:a})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=a,e[15]=m):m=e[15];let k;e[16]!==r.userImage||e[17]!==r.userName?(k=t.jsx(qt,{url:r.userImage,fallback:r.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=r.userImage,e[17]=r.userName,e[18]=k):k=e[18];let S;e[19]!==r.userName?(S=t.jsx("span",{className:"truncate",children:r.userName}),e[19]=r.userName,e[20]=S):S=e[20];let h;e[21]!==k||e[22]!==S?(h=t.jsx(De,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[k,S]})}),e[21]=k,e[22]=S,e[23]=h):h=e[23];let T;e[24]!==n?(T=t.jsx("div",{children:n}),e[24]=n,e[25]=T):T=e[25];let I;e[26]!==u?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:u}),e[26]=u,e[27]=I):I=e[27];let f;e[28]!==T||e[29]!==I?(f=t.jsxs(De,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[T,I]}),e[28]=T,e[29]=I,e[30]=f):f=e[30];let M;e[31]!==r.durationMs?(M=t.jsxs(De,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[r.durationMs,"ms"]}),e[31]=r.durationMs,e[32]=M):M=e[32];const y=r.isError?"destructive":"success",R=r.isError?"Error":"OK";let C;e[33]!==y||e[34]!==R?(C=t.jsx(De,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(rt,{variant:y,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:R})})}),e[33]=y,e[34]=R,e[35]=C):C=e[35];let E;return e[36]!==i||e[37]!==d||e[38]!==h||e[39]!==f||e[40]!==M||e[41]!==C||e[42]!==b||e[43]!==g||e[44]!==m?(E=t.jsxs(ut,{ref:i,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:d,children:[b,g,m,h,f,M,C]}),e[36]=i,e[37]=d,e[38]=h,e[39]=f,e[40]=M,e[41]=C,e[42]=b,e[43]=g,e[44]=m,e[45]=E):E=e[45],E}function nr(s){const e=le.c(26),{connectionIds:r,virtualMcpIds:l,tool:a,status:o,search:d,logs:i,hasMore:n,onLoadMore:c,isLoadingMore:u,connections:j,virtualMcps:v,membersData:b,client:x}=s,L=j??[],p=v??[],[g,m]=K.useState(null),k=Vs(c,n,u),S=Vt(b),h=new Map(S.map(mr)),T=new Map(p.map(dr));let f=i.map(N=>{const D=h.get(N.userId??""),B=N.virtualMcpId?T.get(N.virtualMcpId):null;return{...N,userName:D?.name??N.userId??"Unknown",userImage:D?.image??void 0,virtualMcpName:B?.title??null,virtualMcpIcon:B?.icon??null}});if(r.length>1){let N;e[0]!==r?(N=D=>r.includes(D.connectionId),e[0]=r,e[1]=N):N=e[1],f=f.filter(N)}if(l.length>1){let N;e[2]!==l?(N=D=>D.virtualMcpId&&l.includes(D.virtualMcpId),e[2]=l,e[3]=N):N=e[3],f=f.filter(N)}const M=new Map(L.map(cr));if(d){const N=d.toLowerCase();f=f.filter(D=>D.toolName.toLowerCase().includes(N)||(M.get(D.connectionId)?.title??D.connectionId).toLowerCase().includes(N)||D.errorMessage?.toLowerCase().includes(N))}const y=g!==null?f[g]??null:null,R=yt({queryKey:it.monitoringLogDetail(y?.id??""),queryFn:async()=>{if(!x)throw new Error("MCP client is not available");const N=await x.callTool({name:"MONITORING_LOG_GET",arguments:{id:y.id}});return N.structuredContent??N},enabled:y!==null}),C=R.data?.log,E=y&&C?{...y,input:C.input,output:C.output}:y;if(f.length===0){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=N):N=e[4];const D=d||r.length>0||l.length>0||a||o!=="all"?"No logs match your filters":"No logs found in this time range";let B;return e[5]!==D?(B=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(wt,{image:N,title:"No logs found",description:D})}),e[5]=D,e[6]=B):B=e[6],B}const F="flex-1 flex flex-col min-w-0",H="flex-1 min-w-0 pt-1",A="min-w-[600px] md:min-w-0",W=Gt,w="w-full border-collapse";let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Qt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(oe,{className:"w-5"}),t.jsx(oe,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),t.jsx(oe,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),t.jsx(oe,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User"}),t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Latency"}),t.jsx(oe,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[7]=_):_=e[7];const $=Jt,z=f.map((N,D)=>t.jsx(ar,{log:N,connection:M.get(N.connectionId),virtualMcpName:N.virtualMcpName??"",virtualMcpIcon:N.virtualMcpIcon,onClick:()=>m(D),lastLogRef:D===f.length-1?k:void 0},N.id));let O;e[8]!==$||e[9]!==z?(O=t.jsx($,{children:z}),e[8]=$,e[9]=z,e[10]=O):O=e[10];let V;e[11]!==W||e[12]!==_||e[13]!==O?(V=t.jsx("div",{className:H,children:t.jsx("div",{className:A,children:t.jsxs(W,{className:w,children:[_,O]})})}),e[11]=W,e[12]=_,e[13]=O,e[14]=V):V=e[14];const q=g!==null;let J;e[15]!==m?(J=N=>{N||m(null)},e[15]=m,e[16]=J):J=e[16];const G=y&&g!==null&&t.jsxs(t.Fragment,{children:[t.jsx(zs,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(qe,{icon:M.get(y.connectionId)?.icon||null,name:M.get(y.connectionId)?.title??y.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Os,{className:"text-sm leading-snug truncate",children:y.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:M.get(y.connectionId)?.title??y.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(ir),disabled:g===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(As,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(N=>N!==null&&N<f.length-1?N+1:N),disabled:g===f.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(Ut,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:R.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"size-5 border-2 border-muted-foreground/30 border-t-muted-foreground rounded-full animate-spin"})}):R.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:"Failed to load log details"}),t.jsx(Z,{variant:"outline",size:"sm",onClick:()=>R.refetch(),children:"Retry"})]}):t.jsx(Hs,{log:E})})]});let Q;e[17]!==G?(Q=t.jsx(Es,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:G}),e[17]=G,e[18]=Q):Q=e[18];let U;e[19]!==J||e[20]!==Q||e[21]!==q?(U=t.jsx(Ps,{open:q,onOpenChange:J,children:Q}),e[19]=J,e[20]=Q,e[21]=q,e[22]=U):U=e[22];let P;return e[23]!==U||e[24]!==V?(P=t.jsxs("div",{className:F,children:[V,U]}),e[23]=U,e[24]=V,e[25]=P):P=e[25],P}function ir(s){return s!==null&&s>0?s-1:s}function cr(s){return[s.id,s]}function dr(s){return[s.id,s]}function mr(s){return[s.userId,s.user]}function ur(){const s=le.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(oe,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(oe,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=r):r=s[1];let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(oe,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=l):l=s[2];let a;s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=a):a=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=o):o=s[4];let d;s[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s[5]=d):d=s[5];let i;s[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,r,l,a,o,d,t.jsx(oe,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),s[6]=i):i=s[6];let n;return s[7]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(Gt,{className:"w-full border-collapse",children:[i,t.jsx(Jt,{children:Array.from({length:8}).map(xr)})]})})}),s[7]=n):n=s[7],n}function xr(s,e){return t.jsxs(ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const Nt=Object.assign(nr,{Skeleton:ur});function fr(s){const e=le.c(34),{client:r,locator:l,baseParams:a,pageSize:o,isStreaming:d,streamingRefetchInterval:i,connectionIds:n,virtualMcpIds:c,tool:u,status:j,searchQuery:v,allConnections:b,allVirtualMcps:x,membersData:L}=s;let p;e[0]!==a||e[1]!==l?(p=it.monitoringLogsInfinite(l,JSON.stringify(a)),e[0]=a,e[1]=l,e[2]=p):p=e[2];let g;e[3]!==a||e[4]!==r||e[5]!==o?(g=async H=>{const{pageParam:A}=H,W=A===void 0?0:A;if(!r)throw new Error("MCP client is not available");const w=await r.callTool({name:"MONITORING_LOGS_LIST",arguments:{...a,limit:o,offset:W}});return w.structuredContent??w},e[3]=a,e[4]=r,e[5]=o,e[6]=g):g=e[6];let m;e[7]!==o?(m=(H,A)=>{if(!((H?.logs?.length??0)<o))return A.length*o},e[7]=o,e[8]=m):m=e[8];const k=d?i:!1;let S;e[9]!==p||e[10]!==g||e[11]!==m||e[12]!==k?(S={queryKey:p,queryFn:g,initialPageParam:0,getNextPageParam:m,staleTime:0,refetchInterval:k},e[9]=p,e[10]=g,e[11]=m,e[12]=k,e[13]=S):S=e[13];const{data:h,fetchNextPage:T,hasNextPage:I,isFetchingNextPage:f}=Rs(S);let M;e[14]!==h.pages?(M=h.pages.flatMap(pr),e[14]=h.pages,e[15]=M):M=e[15];const y=M;let R;e[16]!==T||e[17]!==I||e[18]!==f?(R=()=>{I&&!f&&T()},e[16]=T,e[17]=I,e[18]=f,e[19]=R):R=e[19];const C=R,E=I??!1;let F;return e[20]!==b||e[21]!==x||e[22]!==r||e[23]!==n||e[24]!==C||e[25]!==f||e[26]!==L||e[27]!==y||e[28]!==v||e[29]!==j||e[30]!==E||e[31]!==u||e[32]!==c?(F=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(Nt,{connectionIds:n,virtualMcpIds:c,tool:u,status:j,search:v,logs:y,hasMore:E,onLoadMore:C,isLoadingMore:f,connections:b,virtualMcps:x,membersData:L,client:r})})})}),e[20]=b,e[21]=x,e[22]=r,e[23]=n,e[24]=C,e[25]=f,e[26]=L,e[27]=y,e[28]=v,e[29]=j,e[30]=E,e[31]=u,e[32]=c,e[33]=F):F=e[33],F}function pr(s){return s.logs??[]}function hr(s){const e=le.c(15),{dateRange:r}=s,{data:l,isLoading:a}=Us(void 0);let o;e[0]!==l?(o=l===void 0?[]:l,e[0]=l,e[1]=o):o=e[1];const d=o,[i,n]=K.useState(null),c=i??d[0]?.id??null,{data:u}=Ks(c??"");let j;e[2]!==r.startDate?(j=r.startDate.toISOString(),e[2]=r.startDate,e[3]=j):j=e[3];let v;e[4]!==r.endDate?(v=r.endDate.toISOString(),e[4]=r.endDate,e[5]=v):v=e[5];let b;e[6]!==j||e[7]!==v?(b={startDate:j,endDate:v},e[6]=j,e[7]=v,e[8]=b):b=e[8];const x=b;let L;return e[9]!==u||e[10]!==d||e[11]!==c||e[12]!==a||e[13]!==x?(L=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:a?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):d.length===0?t.jsx("div",{className:"py-16",children:t.jsx(wt,{title:"No automations",description:"Create an automation to see its runs and usage here."})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(nt,{value:c??"",onValueChange:p=>n(p),children:[t.jsx(lt,{className:"w-72",children:t.jsx(ot,{placeholder:"Select an automation…"})}),t.jsx(at,{children:d.map(jr)})]})}),u?t.jsx(ws,{automationId:u.id,triggerIds:u.triggers.map(gr),range:x}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=u,e[10]=d,e[11]=c,e[12]=a,e[13]=x,e[14]=L):L=e[14],L}function gr(s){return s.id}function jr(s){return t.jsx(Fe,{value:s.id,children:s.name},s.id)}const vr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Nr({connectionIds:s,virtualMcpIds:e,tool:r,status:l,hideSystem:a,propertyFilters:o,connectionOptions:d,virtualMcpOptions:i,activeFiltersCount:n,onUpdateFilters:c,onConnectionSearchChange:u,memberOptions:j,llmUserIds:v=[],onLlmUserIdsChange:b,showMemberFilter:x}){const[L,p]=K.useState(!1),[g,m]=K.useState("form"),[k,S]=K.useState(r),[h,T]=K.useState(o),[I,f]=K.useState(Ye(o)),M=K.useRef(r),y=K.useRef(Le(o));M.current!==r&&(M.current=r,k!==r&&S(r));const R=Le(o);y.current!==R&&(y.current=R,T(o),f(Ye(o)));const C=(w,_)=>{const $=[...h],z=$[w];z&&($[w]={key:_.key??z.key,operator:_.operator??z.operator,value:_.value??z.value},T($))},E=()=>{T([...h,{key:"",operator:"eq",value:""}])},F=w=>{const _=h.filter(($,z)=>z!==w);T(_),f(Ye(_)),c({propertyFilters:Le(_)})},H=()=>{c({propertyFilters:Le(h)})},A=()=>{const w=Lt(I);T(w),c({propertyFilters:Le(w)})},W=()=>{if(g==="raw"){const w=Lt(I);T(w),m("form")}else f(Ye(h)),m("raw")};return t.jsxs(ct,{open:L,onOpenChange:p,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(Pt,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:n}),t.jsx(rt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:n})]})]})}),t.jsx(mt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(_s,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),t.jsx(Ms,{id:"hide-system-calls",checked:a,onCheckedChange:w=>c({hideSystem:!!w})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(ht,{options:d,defaultValue:s,onValueChange:w=>c({connectionId:w}),onSearchChange:u,placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),t.jsx(ht,{options:i,defaultValue:e,onValueChange:w=>c({virtualMcpId:w}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),x&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(ht,{options:j??[],defaultValue:v,onValueChange:w=>b?.(w),placeholder:"All members",variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Filters AI usage (calls, tokens, cost) only."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),t.jsx(Ge,{id:"filter-tool",placeholder:"Filter by tool...",value:k,onChange:w=>S(w.target.value),onBlur:()=>{k!==r&&c({tool:k})},onKeyDown:w=>{w.key==="Enter"&&k!==r&&c({tool:k})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),t.jsxs(nt,{value:l,onValueChange:w=>c({status:w}),children:[t.jsx(lt,{className:"w-full",children:t.jsx(ot,{})}),t.jsxs(at,{children:[t.jsx(Fe,{value:"all",children:"All Status"}),t.jsx(Fe,{value:"success",children:"Success Only"}),t.jsx(Fe,{value:"errors",children:"Errors Only"})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:W,children:g==="raw"?t.jsx(js,{size:14}):t.jsx(us,{size:14})})}),t.jsx(tt,{children:g==="raw"?"Switch to form view":"Switch to raw text"})]})]}),g==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ts,{placeholder:`Paste property filters here:
6
6
  thread_id=abc123
7
7
  user~test
8
- debug?`,value:I,onChange:w=>f(w.target.value),onBlur:A,onKeyDown:w=>{w.key==="Enter"&&w.metaKey&&A()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[h.map((w,_)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",_+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>F(_),children:t.jsx(Ns,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Qe,{placeholder:"Key (e.g., thread_id)",value:w.key,onChange:$=>C(_,{key:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:w.operator,onValueChange:$=>{const z=[...h],O=z[_];O&&(z[_]={...O,operator:$,value:$==="exists"?"":O.value},T(z),c({propertyFilters:Le(z)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:vr.map($=>t.jsx(Fe,{value:$.value,children:$.label},$.value))})]})]}),w.operator!=="exists"&&t.jsx(Qe,{placeholder:"Value",value:w.value,onChange:$=>C(_,{value:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"w-full font-mono text-sm"})]},_)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:E,children:[t.jsx(vs,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),T([]),f(""),c({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),p(!1)},children:"Clear all filters"})]})})]})}function br(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:d,tool:i,status:n,search:c,streaming:u,hideSystem:j,activeFiltersCount:v,from:b,to:x,propertyFilters:L,onUpdateFilters:p,onTimeRangeChange:g,onStreamingToggle:m,onTabChange:k}=s,S=Mt(),h=gs(),{data:T}=xs(),[I,f]=K.useState(""),M=I||void 0;let y;e[0]!==M?(y={searchTerm:M},e[0]=M,e[1]=y):y=e[1];const R=Mt(y);let C;e[2]!==R?(C=R??[],e[2]=R,e[3]=C):C=e[3];let E;e[4]!==C?(E=C.map(Sr),e[4]=C,e[5]=E):E=e[5];const F=E;let H;e[6]!==h?(H=h.map(wr),e[6]=h,e[7]=H):H=e[7];const A=H,{pageSize:W,streamingRefetchInterval:w}=vt,{org:_,locator:$}=Be();let z;e[8]!==_.id||e[9]!==_.slug?(z={connectionId:fs,orgId:_.id,orgSlug:_.slug},e[8]=_.id,e[9]=_.slug,e[10]=z):z=e[10];const O=ps(z);let V;e[11]!==L?(V=Bs(L),e[11]=L,e[12]=V):V=e[12];const q=V;let J;e[13]!==j||e[14]!==_.id?(J=j?[hs.SELF(_.id)]:void 0,e[13]=j,e[14]=_.id,e[15]=J):J=e[15];const Q=J;let G;e[16]===Symbol.for("react.memo_cache_sentinel")?(G=[],e[16]=G):G=e[16];const[U,P]=K.useState(G);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[D,B]=K.useState(N);let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=[],e[18]=ee):ee=e[18];const[X,te]=K.useState(ee),[Y,ae]=K.useState("all"),_e=(D.length>0?1:0)+(X.length>0?1:0)+(Y!=="all"?1:0);let $e;e[19]!==T?($e=Vt(T).map(yr),e[19]=T,e[20]=$e):$e=e[20];const Se=$e;let ne;e[21]!==l.startDate?(ne=l.startDate.toISOString(),e[21]=l.startDate,e[22]=ne):ne=e[22];let he;e[23]!==l.endDate?(he=l.endDate.toISOString(),e[23]=l.endDate,e[24]=he):he=e[24];const ge=o.length===1?o[0]:void 0,je=d.length===1?d[0]:void 0,ve=i||void 0,Ne=n==="errors"?!0:n==="success"?!1:void 0;let de;e[25]!==Q||e[26]!==q||e[27]!==ne||e[28]!==he||e[29]!==ge||e[30]!==je||e[31]!==ve||e[32]!==Ne?(de={startDate:ne,endDate:he,connectionId:ge,excludeConnectionIds:Q,virtualMcpId:je,toolName:ve,isError:Ne,...q},e[25]=Q,e[26]=q,e[27]=ne,e[28]=he,e[29]=ge,e[30]=je,e[31]=ve,e[32]=Ne,e[33]=de):de=e[33];const be=de;let me;e[34]===Symbol.for("react.memo_cache_sentinel")?(me={id:"overview",label:"Overview"},e[34]=me):me=e[34];let ue;e[35]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"audit",label:"Audit"},e[35]=ue):ue=e[35];let xe;e[36]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"threads",label:"Threads"},e[36]=xe):xe=e[36];let fe;e[37]===Symbol.for("react.memo_cache_sentinel")?(fe=[me,ue,xe,{id:"automations",label:"Automations"}],e[37]=fe):fe=e[37];const Re=fe;let se;e[38]===Symbol.for("react.memo_cache_sentinel")?(se=t.jsx(Me.Title,{children:"Monitoring"}),e[38]=se):se=e[38];let re;e[39]!==k?(re=Ie=>k(Ie),e[39]=k,e[40]=re):re=e[40];let ie;e[41]!==re||e[42]!==r?(ie=t.jsx(Kt,{tabs:Re,activeTab:r,onTabChange:re}),e[41]=re,e[42]=r,e[43]=ie):ie=e[43];let pe;e[44]!==v||e[45]!==o||e[46]!==F||e[47]!==I||e[48]!==j||e[49]!==u||e[50]!==U||e[51]!==Se||e[52]!==m||e[53]!==p||e[54]!==L||e[55]!==n||e[56]!==r||e[57]!==i||e[58]!==d||e[59]!==A?(pe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:u?"secondary":"outline",className:"gap-1.5",onClick:m,children:[u&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),u&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Nr,{connectionIds:o,virtualMcpIds:d,tool:i,status:n,hideSystem:j,propertyFilters:L,connectionOptions:F,virtualMcpOptions:A,activeFiltersCount:v,onUpdateFilters:p,connectionSearchTerm:I,onConnectionSearchChange:f,memberOptions:Se,llmUserIds:U,onLlmUserIdsChange:P,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=F,e[47]=I,e[48]=j,e[49]=u,e[50]=U,e[51]=Se,e[52]=m,e[53]=p,e[54]=L,e[55]=n,e[56]=r,e[57]=i,e[58]=d,e[59]=A,e[60]=pe):pe=e[60];let ye;e[61]!==Se||e[62]!==r||e[63]!==_e||e[64]!==D||e[65]!==Y||e[66]!==X||e[67]!==A?(ye=r==="threads"&&t.jsx(Ss,{filterAgentIds:D,filterUserIds:X,filterStatus:Y,virtualMcpOptions:A,memberOptions:Se,activeFiltersCount:_e,onUpdateFilters:Ie=>{const{filterAgentIds:St,filterUserIds:It,filterStatus:Ct}=Ie;St!==void 0&&B(St),It!==void 0&&te(It),Ct!==void 0&&ae(Ct)}}),e[61]=Se,e[62]=r,e[63]=_e,e[64]=D,e[65]=Y,e[66]=X,e[67]=A,e[68]=ye):ye=e[68];let ze;e[69]!==b||e[70]!==x?(ze={from:b,to:x},e[69]=b,e[70]=x,e[71]=ze):ze=e[71];let Oe;e[72]!==g||e[73]!==ze?(Oe=t.jsx(Ys,{value:ze,onChange:g}),e[72]=g,e[73]=ze,e[74]=Oe):Oe=e[74];let Ee;e[75]!==pe||e[76]!==ye||e[77]!==Oe?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[pe,ye,Oe]}),e[75]=pe,e[76]=ye,e[77]=Oe,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ie||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ie,Ee]}),e[79]=ie,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==p||e[83]!==c||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(os,{value:c,onChange:Ie=>p({search:Ie}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Ie=>{Ie.key==="Escape"&&(p({search:""}),Ie.target.blur())},className:"w-full md:w-[375px]"}),e[82]=p,e[83]=c,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(Me.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[se,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==h||e[91]!==be||e[92]!==O||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==Q||e[97]!==u||e[98]!==U||e[99]!==$||e[100]!==T||e[101]!==c||e[102]!==n||e[103]!==r||e[104]!==D||e[105]!==Y||e[106]!==X||e[107]!==i||e[108]!==d?(Ue=r==="automations"?t.jsx(hr,{dateRange:l}):r==="threads"?t.jsx(Is,{client:O,locator:$,membersData:T,allConnections:S,allVirtualMcps:h,dateRange:l,searchQuery:c,filterAgentIds:D,filterUserIds:X,filterStatus:Y}):r==="audit"?t.jsx(fr,{client:O,locator:$,baseParams:be,pageSize:W,isStreaming:u,streamingRefetchInterval:w,connectionIds:o,virtualMcpIds:d,tool:i,status:n,searchQuery:c,allConnections:S,allVirtualMcps:h,membersData:T}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:Q,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:u,streamingRefetchInterval:w,llmUserIds:U})}),e[89]=S,e[90]=h,e[91]=be,e[92]=O,e[93]=o,e[94]=l,e[95]=a,e[96]=Q,e[97]=u,e[98]=U,e[99]=$,e[100]=T,e[101]=c,e[102]=n,e[103]=r,e[104]=D,e[105]=Y,e[106]=X,e[107]=i,e[108]=d,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function yr(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(qt,{url:r,fallback:e,shape:"circle",size:"2xs",className:ce("shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Ge,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Sr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Ge,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Lo(){const s=le.c(83),{org:e}=Be(),r=bt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=rs(l),{tab:o,from:d,to:i,connectionId:n,virtualMcpId:c,tool:u,search:j,status:v,streaming:b,propertyFilters:x,hideSystem:L}=a,p=o===void 0?"overview":o;let g;s[1]!==n?(g=n===void 0?[]:n,s[1]=n,s[2]=g):g=s[2];const m=g;let k;s[3]!==c?(k=c===void 0?[]:c,s[3]=c,s[4]=k):k=s[4];const S=k,h=b===void 0?!0:b,T=x===void 0?"":x,I=L===void 0?!1:L;let f,M,y,R,C,E,F;if(s[5]!==m.length||s[6]!==d||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==T||s[11]!==a||s[12]!==v||s[13]!==h||s[14]!==i||s[15]!==u||s[16]!==S.length){C=qs(T);let P;s[24]!==r||s[25]!==e.slug||s[26]!==a?(P=X=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...X}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=P):P=s[27],F=P;let N;s[28]!==F?(N=X=>{F({from:X.from,to:X.to})},s[28]=F,s[29]=N):N=s[29],R=N;let D,B;if(s[30]!==d||s[31]!==h||s[32]!==i){const X=we(d),te=we(i);B=X.date||new Date(Date.now()-18e5);const Y=te.date||new Date;y={startDate:B,endDate:Y},D=Y,h&&i==="now"&&(D=new Date(Y),D.setHours(D.getHours()+1)),s[30]=d,s[31]=h,s[32]=i,s[33]=y,s[34]=D,s[35]=B}else y=s[33],D=s[34],B=s[35];let ee;s[36]!==D||s[37]!==B?(ee={startDate:B,endDate:D},s[36]=D,s[37]=B,s[38]=ee):ee=s[38],M=ee,f=0,m.length>0&&f++,S.length>0&&f++,u&&f++,v!=="all"&&f++,I&&f++,E=C.filter(Ir),s[5]=m.length,s[6]=d,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=T,s[11]=a,s[12]=v,s[13]=h,s[14]=i,s[15]=u,s[16]=S.length,s[17]=f,s[18]=M,s[19]=y,s[20]=R,s[21]=C,s[22]=E,s[23]=F}else f=s[17],M=s[18],y=s[19],R=s[20],C=s[21],E=s[22],F=s[23];const H=E;H.length>0&&(f=f+H.length);let A;s[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Me.Body,{className:"!pb-3",children:t.jsx(Me.Title,{children:"Monitoring"})}),s[39]=A):A=s[39];let W;s[40]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsxs(t.Fragment,{children:[A,t.jsx(Me.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(wt,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=W):W=s[40];let w;s[41]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Me.Title,{children:"Monitoring"}),s[41]=w):w=s[41];let _;s[42]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=_):_=s[42];let $;s[43]!==F?($=P=>F({tab:P}),s[43]=F,s[44]=$):$=s[44];let z;s[45]!==$||s[46]!==p?(z=t.jsx(Me.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[w,t.jsx(Kt,{tabs:_,activeTab:p,onTabChange:$})]})}),s[45]=$,s[46]=p,s[47]=z):z=s[47];let O;s[48]!==p?(O=p==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):p==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(or,{})}),s[48]=p,s[49]=O):O=s[49];let V;s[50]!==z||s[51]!==O?(V=t.jsxs(t.Fragment,{children:[z,O]}),s[50]=z,s[51]=O,s[52]=V):V=s[52];let q;s[53]!==R?(q=P=>{xt("monitoring_time_range_changed",{from:P.from,to:P.to}),R(P)},s[53]=R,s[54]=q):q=s[54];let J;s[55]!==h||s[56]!==F?(J=()=>{xt("monitoring_live_toggled",{enabled:!h}),F({streaming:!h})},s[55]=h,s[56]=F,s[57]=J):J=s[57];let Q;s[58]!==p||s[59]!==F?(Q=P=>{P!==p&&xt("monitoring_tab_changed",{from_tab:p,to_tab:P}),F({tab:P})},s[58]=p,s[59]=F,s[60]=Q):Q=s[60];let G;s[61]!==f||s[62]!==m||s[63]!==M||s[64]!==y||s[65]!==d||s[66]!==I||s[67]!==C||s[68]!==j||s[69]!==v||s[70]!==h||s[71]!==q||s[72]!==J||s[73]!==Q||s[74]!==p||s[75]!==i||s[76]!==u||s[77]!==F||s[78]!==S?(G=t.jsx(br,{tab:p,dateRange:M,displayDateRange:y,connectionIds:m,virtualMcpIds:S,tool:u,status:v,search:j,streaming:h,hideSystem:I,activeFiltersCount:f,from:d,to:i,propertyFilters:C,onUpdateFilters:F,onTimeRangeChange:q,onStreamingToggle:J,onTabChange:Q}),s[61]=f,s[62]=m,s[63]=M,s[64]=y,s[65]=d,s[66]=I,s[67]=C,s[68]=j,s[69]=v,s[70]=h,s[71]=q,s[72]=J,s[73]=Q,s[74]=p,s[75]=i,s[76]=u,s[77]=F,s[78]=S,s[79]=G):G=s[79];let U;return s[80]!==V||s[81]!==G?(U=t.jsx(as,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Me,{children:t.jsx(ls,{fallback:W,children:t.jsx(K.Suspense,{fallback:V,children:G})})})}),s[80]=V,s[81]=G,s[82]=U):U=s[82],U}function Ir(s){return s.key.trim()}export{Lo as default};
8
+ debug?`,value:I,onChange:w=>f(w.target.value),onBlur:A,onKeyDown:w=>{w.key==="Enter"&&w.metaKey&&A()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[h.map((w,_)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",_+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>F(_),children:t.jsx(Ns,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:w.key,onChange:$=>C(_,{key:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:w.operator,onValueChange:$=>{const z=[...h],O=z[_];O&&(z[_]={...O,operator:$,value:$==="exists"?"":O.value},T(z),c({propertyFilters:Le(z)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:vr.map($=>t.jsx(Fe,{value:$.value,children:$.label},$.value))})]})]}),w.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:w.value,onChange:$=>C(_,{value:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"w-full font-mono text-sm"})]},_)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:E,children:[t.jsx(vs,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),T([]),f(""),c({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),p(!1)},children:"Clear all filters"})]})})]})}function br(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:d,tool:i,status:n,search:c,streaming:u,hideSystem:j,activeFiltersCount:v,from:b,to:x,propertyFilters:L,onUpdateFilters:p,onTimeRangeChange:g,onStreamingToggle:m,onTabChange:k}=s,S=Mt(),h=gs(),{data:T}=xs(),[I,f]=K.useState(""),M=I||void 0;let y;e[0]!==M?(y={searchTerm:M},e[0]=M,e[1]=y):y=e[1];const R=Mt(y);let C;e[2]!==R?(C=R??[],e[2]=R,e[3]=C):C=e[3];let E;e[4]!==C?(E=C.map(Sr),e[4]=C,e[5]=E):E=e[5];const F=E;let H;e[6]!==h?(H=h.map(wr),e[6]=h,e[7]=H):H=e[7];const A=H,{pageSize:W,streamingRefetchInterval:w}=vt,{org:_,locator:$}=Be();let z;e[8]!==_.id||e[9]!==_.slug?(z={connectionId:fs,orgId:_.id,orgSlug:_.slug},e[8]=_.id,e[9]=_.slug,e[10]=z):z=e[10];const O=ps(z);let V;e[11]!==L?(V=Bs(L),e[11]=L,e[12]=V):V=e[12];const q=V;let J;e[13]!==j||e[14]!==_.id?(J=j?[hs.SELF(_.id)]:void 0,e[13]=j,e[14]=_.id,e[15]=J):J=e[15];const G=J;let Q;e[16]===Symbol.for("react.memo_cache_sentinel")?(Q=[],e[16]=Q):Q=e[16];const[U,P]=K.useState(Q);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[D,B]=K.useState(N);let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=[],e[18]=ee):ee=e[18];const[X,te]=K.useState(ee),[Y,ae]=K.useState("all"),_e=(D.length>0?1:0)+(X.length>0?1:0)+(Y!=="all"?1:0);let $e;e[19]!==T?($e=Vt(T).map(yr),e[19]=T,e[20]=$e):$e=e[20];const Se=$e;let ne;e[21]!==l.startDate?(ne=l.startDate.toISOString(),e[21]=l.startDate,e[22]=ne):ne=e[22];let he;e[23]!==l.endDate?(he=l.endDate.toISOString(),e[23]=l.endDate,e[24]=he):he=e[24];const ge=o.length===1?o[0]:void 0,je=d.length===1?d[0]:void 0,ve=i||void 0,Ne=n==="errors"?!0:n==="success"?!1:void 0;let de;e[25]!==G||e[26]!==q||e[27]!==ne||e[28]!==he||e[29]!==ge||e[30]!==je||e[31]!==ve||e[32]!==Ne?(de={startDate:ne,endDate:he,connectionId:ge,excludeConnectionIds:G,virtualMcpId:je,toolName:ve,isError:Ne,...q},e[25]=G,e[26]=q,e[27]=ne,e[28]=he,e[29]=ge,e[30]=je,e[31]=ve,e[32]=Ne,e[33]=de):de=e[33];const be=de;let me;e[34]===Symbol.for("react.memo_cache_sentinel")?(me={id:"overview",label:"Overview"},e[34]=me):me=e[34];let ue;e[35]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"audit",label:"Audit"},e[35]=ue):ue=e[35];let xe;e[36]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"threads",label:"Threads"},e[36]=xe):xe=e[36];let fe;e[37]===Symbol.for("react.memo_cache_sentinel")?(fe=[me,ue,xe,{id:"automations",label:"Automations"}],e[37]=fe):fe=e[37];const Re=fe;let se;e[38]===Symbol.for("react.memo_cache_sentinel")?(se=t.jsx(Me.Title,{children:"Monitoring"}),e[38]=se):se=e[38];let re;e[39]!==k?(re=Ie=>k(Ie),e[39]=k,e[40]=re):re=e[40];let ie;e[41]!==re||e[42]!==r?(ie=t.jsx(Kt,{tabs:Re,activeTab:r,onTabChange:re}),e[41]=re,e[42]=r,e[43]=ie):ie=e[43];let pe;e[44]!==v||e[45]!==o||e[46]!==F||e[47]!==I||e[48]!==j||e[49]!==u||e[50]!==U||e[51]!==Se||e[52]!==m||e[53]!==p||e[54]!==L||e[55]!==n||e[56]!==r||e[57]!==i||e[58]!==d||e[59]!==A?(pe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:u?"secondary":"outline",className:"gap-1.5",onClick:m,children:[u&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),u&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Nr,{connectionIds:o,virtualMcpIds:d,tool:i,status:n,hideSystem:j,propertyFilters:L,connectionOptions:F,virtualMcpOptions:A,activeFiltersCount:v,onUpdateFilters:p,connectionSearchTerm:I,onConnectionSearchChange:f,memberOptions:Se,llmUserIds:U,onLlmUserIdsChange:P,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=F,e[47]=I,e[48]=j,e[49]=u,e[50]=U,e[51]=Se,e[52]=m,e[53]=p,e[54]=L,e[55]=n,e[56]=r,e[57]=i,e[58]=d,e[59]=A,e[60]=pe):pe=e[60];let ye;e[61]!==Se||e[62]!==r||e[63]!==_e||e[64]!==D||e[65]!==Y||e[66]!==X||e[67]!==A?(ye=r==="threads"&&t.jsx(Ss,{filterAgentIds:D,filterUserIds:X,filterStatus:Y,virtualMcpOptions:A,memberOptions:Se,activeFiltersCount:_e,onUpdateFilters:Ie=>{const{filterAgentIds:St,filterUserIds:It,filterStatus:Ct}=Ie;St!==void 0&&B(St),It!==void 0&&te(It),Ct!==void 0&&ae(Ct)}}),e[61]=Se,e[62]=r,e[63]=_e,e[64]=D,e[65]=Y,e[66]=X,e[67]=A,e[68]=ye):ye=e[68];let ze;e[69]!==b||e[70]!==x?(ze={from:b,to:x},e[69]=b,e[70]=x,e[71]=ze):ze=e[71];let Oe;e[72]!==g||e[73]!==ze?(Oe=t.jsx(Ys,{value:ze,onChange:g}),e[72]=g,e[73]=ze,e[74]=Oe):Oe=e[74];let Ee;e[75]!==pe||e[76]!==ye||e[77]!==Oe?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[pe,ye,Oe]}),e[75]=pe,e[76]=ye,e[77]=Oe,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ie||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ie,Ee]}),e[79]=ie,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==p||e[83]!==c||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(os,{value:c,onChange:Ie=>p({search:Ie}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Ie=>{Ie.key==="Escape"&&(p({search:""}),Ie.target.blur())},className:"w-full md:w-[375px]"}),e[82]=p,e[83]=c,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(Me.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[se,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==h||e[91]!==be||e[92]!==O||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==G||e[97]!==u||e[98]!==U||e[99]!==$||e[100]!==T||e[101]!==c||e[102]!==n||e[103]!==r||e[104]!==D||e[105]!==Y||e[106]!==X||e[107]!==i||e[108]!==d?(Ue=r==="automations"?t.jsx(hr,{dateRange:l}):r==="threads"?t.jsx(Is,{client:O,locator:$,membersData:T,allConnections:S,allVirtualMcps:h,dateRange:l,searchQuery:c,filterAgentIds:D,filterUserIds:X,filterStatus:Y}):r==="audit"?t.jsx(fr,{client:O,locator:$,baseParams:be,pageSize:W,isStreaming:u,streamingRefetchInterval:w,connectionIds:o,virtualMcpIds:d,tool:i,status:n,searchQuery:c,allConnections:S,allVirtualMcps:h,membersData:T}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:G,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:u,streamingRefetchInterval:w,llmUserIds:U})}),e[89]=S,e[90]=h,e[91]=be,e[92]=O,e[93]=o,e[94]=l,e[95]=a,e[96]=G,e[97]=u,e[98]=U,e[99]=$,e[100]=T,e[101]=c,e[102]=n,e[103]=r,e[104]=D,e[105]=Y,e[106]=X,e[107]=i,e[108]=d,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function yr(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(qt,{url:r,fallback:e,shape:"circle",size:"2xs",className:ce("shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Sr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Lo(){const s=le.c(83),{org:e}=Be(),r=bt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=rs(l),{tab:o,from:d,to:i,connectionId:n,virtualMcpId:c,tool:u,search:j,status:v,streaming:b,propertyFilters:x,hideSystem:L}=a,p=o===void 0?"overview":o;let g;s[1]!==n?(g=n===void 0?[]:n,s[1]=n,s[2]=g):g=s[2];const m=g;let k;s[3]!==c?(k=c===void 0?[]:c,s[3]=c,s[4]=k):k=s[4];const S=k,h=b===void 0?!0:b,T=x===void 0?"":x,I=L===void 0?!1:L;let f,M,y,R,C,E,F;if(s[5]!==m.length||s[6]!==d||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==T||s[11]!==a||s[12]!==v||s[13]!==h||s[14]!==i||s[15]!==u||s[16]!==S.length){C=qs(T);let P;s[24]!==r||s[25]!==e.slug||s[26]!==a?(P=X=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...X}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=P):P=s[27],F=P;let N;s[28]!==F?(N=X=>{F({from:X.from,to:X.to})},s[28]=F,s[29]=N):N=s[29],R=N;let D,B;if(s[30]!==d||s[31]!==h||s[32]!==i){const X=we(d),te=we(i);B=X.date||new Date(Date.now()-18e5);const Y=te.date||new Date;y={startDate:B,endDate:Y},D=Y,h&&i==="now"&&(D=new Date(Y),D.setHours(D.getHours()+1)),s[30]=d,s[31]=h,s[32]=i,s[33]=y,s[34]=D,s[35]=B}else y=s[33],D=s[34],B=s[35];let ee;s[36]!==D||s[37]!==B?(ee={startDate:B,endDate:D},s[36]=D,s[37]=B,s[38]=ee):ee=s[38],M=ee,f=0,m.length>0&&f++,S.length>0&&f++,u&&f++,v!=="all"&&f++,I&&f++,E=C.filter(Ir),s[5]=m.length,s[6]=d,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=T,s[11]=a,s[12]=v,s[13]=h,s[14]=i,s[15]=u,s[16]=S.length,s[17]=f,s[18]=M,s[19]=y,s[20]=R,s[21]=C,s[22]=E,s[23]=F}else f=s[17],M=s[18],y=s[19],R=s[20],C=s[21],E=s[22],F=s[23];const H=E;H.length>0&&(f=f+H.length);let A;s[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Me.Body,{className:"!pb-3",children:t.jsx(Me.Title,{children:"Monitoring"})}),s[39]=A):A=s[39];let W;s[40]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsxs(t.Fragment,{children:[A,t.jsx(Me.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(wt,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=W):W=s[40];let w;s[41]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Me.Title,{children:"Monitoring"}),s[41]=w):w=s[41];let _;s[42]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=_):_=s[42];let $;s[43]!==F?($=P=>F({tab:P}),s[43]=F,s[44]=$):$=s[44];let z;s[45]!==$||s[46]!==p?(z=t.jsx(Me.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[w,t.jsx(Kt,{tabs:_,activeTab:p,onTabChange:$})]})}),s[45]=$,s[46]=p,s[47]=z):z=s[47];let O;s[48]!==p?(O=p==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):p==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(or,{})}),s[48]=p,s[49]=O):O=s[49];let V;s[50]!==z||s[51]!==O?(V=t.jsxs(t.Fragment,{children:[z,O]}),s[50]=z,s[51]=O,s[52]=V):V=s[52];let q;s[53]!==R?(q=P=>{xt("monitoring_time_range_changed",{from:P.from,to:P.to}),R(P)},s[53]=R,s[54]=q):q=s[54];let J;s[55]!==h||s[56]!==F?(J=()=>{xt("monitoring_live_toggled",{enabled:!h}),F({streaming:!h})},s[55]=h,s[56]=F,s[57]=J):J=s[57];let G;s[58]!==p||s[59]!==F?(G=P=>{P!==p&&xt("monitoring_tab_changed",{from_tab:p,to_tab:P}),F({tab:P})},s[58]=p,s[59]=F,s[60]=G):G=s[60];let Q;s[61]!==f||s[62]!==m||s[63]!==M||s[64]!==y||s[65]!==d||s[66]!==I||s[67]!==C||s[68]!==j||s[69]!==v||s[70]!==h||s[71]!==q||s[72]!==J||s[73]!==G||s[74]!==p||s[75]!==i||s[76]!==u||s[77]!==F||s[78]!==S?(Q=t.jsx(br,{tab:p,dateRange:M,displayDateRange:y,connectionIds:m,virtualMcpIds:S,tool:u,status:v,search:j,streaming:h,hideSystem:I,activeFiltersCount:f,from:d,to:i,propertyFilters:C,onUpdateFilters:F,onTimeRangeChange:q,onStreamingToggle:J,onTabChange:G}),s[61]=f,s[62]=m,s[63]=M,s[64]=y,s[65]=d,s[66]=I,s[67]=C,s[68]=j,s[69]=v,s[70]=h,s[71]=q,s[72]=J,s[73]=G,s[74]=p,s[75]=i,s[76]=u,s[77]=F,s[78]=S,s[79]=Q):Q=s[79];let U;return s[80]!==V||s[81]!==Q?(U=t.jsx(as,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Me,{children:t.jsx(ls,{fallback:W,children:t.jsx(K.Suspense,{fallback:V,children:Q})})})}),s[80]=V,s[81]=Q,s[82]=U):U=s[82],U}function Ir(s){return s.key.trim()}export{Lo as default};
@@ -1,3 +1,3 @@
1
- import{e as S,r as E,j as t,n as J,B as T,K as M,c as Y,f as Ce,d as Se,E as re,q as $e,G as Ge,C as Xe,o as I}from"./index-DLy_MgNO.js";import{i as Qe}from"./ChevronRight-VGojeAFz.js";import{s as De}from"./Eye-pMhw6sUG.js";import{n as ae,i as We}from"./Globe01-Cp3X_WfB.js";import{a as Ye,c as Ze}from"./ZoomOut-CR6ja8eb.js";import{s as Je}from"./Plus-BX4ueqQS.js";import{t as et}from"./Stars01-NNVgYP83.js";import{i as ze}from"./Upload01-CTIKtpO3.js";import{b as K,T as V,a as q,u as Fe}from"./tooltip-DUvSyhJC.js";import{A as tt,a as lt,b as st,c as nt,d as it,e as rt,f as ot,g as at}from"./alert-dialog-tg3D4mnu.js";import{c as Z,D as ce,a as de,f as ct,b as dt,e as ft,d as mt}from"./dialog-DSHkVmzb.js";import{I as ut}from"./input-CTpSARTD.js";import{S as H}from"./skeleton-BH3hvPuC.js";import{F as A,d as _e,M as ht}from"./file-type-icon-ThJaLePn.js";import{a as xt}from"./toolbar-GqBUNMmA.js";import{u as Oe,c as Pe,H as Te,e as Ue,f as Ae,b as fe,F as Ee,i as me,j as Me,h as pt,k as ye,l as jt,m as Le,n as gt}from"./header-tab-button-YP4v_sFN.js";import{i as ue}from"./DotsVertical--R-pmXe3.js";import{s as he}from"./Trash01-XqCtMZQT.js";import{i as Re}from"./Zap-DLFeSSQ0.js";import{a as xe,c as X,b as pe,D as je}from"./dropdown-menu-DFCaJxA8.js";import{R as ve,a as bt,b as yt}from"./resizable-psD7TWaW.js";import{n as Be}from"./LinkExternal01-BGLjTHSM.js";import{s as Ie}from"./XClose-CxCjUb2p.js";import{i as vt}from"./X-8xcHoVBj.js";import"./Check-CTLrORIv.js";import"./ChevronLeft-Cu7s4gqK.js";import"./LayoutLeft-DhbihSgJ.js";import"./index-hwXZ3lhJ.js";const wt=new Set(["output","upload","public","home"]),Nt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function kt(l){return wt.has(l)||!Nt.test(l)?"home":l}function Ct(l){const e=S.c(33);let s,i,o;e[0]!==l?({glyph:s,readOnly:o,...i}=l,e[0]=l,e[1]=s,e[2]=i,e[3]=o):(s=e[1],i=e[2],o=e[3]);const c=E.useId(),r=`${c}-back`,a=`${c}-front`,n=`url(#${r})`;let d;e[4]!==n?(d=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:n}),e[4]=n,e[5]=d):d=e[5];const m=`url(#${a})`;let f;e[6]!==m?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:m}),e[6]=m,e[7]=f):f=e[7];let u,g,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),g=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),b=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=u,e[9]=g,e[10]=b):(u=e[8],g=e[9],b=e[10]);let p;e[11]!==s?(p=s&&t.jsx(s,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=s,e[12]=p):p=e[12];let x;e[13]!==o?(x=o&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(De,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=o,e[14]=x):x=e[14];let h,N;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),N=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=h,e[16]=N):(h=e[15],N=e[16]);let v;e[17]!==r?(v=t.jsxs("linearGradient",{id:r,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[h,N]}),e[17]=r,e[18]=v):v=e[18];let w,j;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("stop",{stopColor:"#72B6FA"}),j=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=w,e[20]=j):(w=e[19],j=e[20]);let C;e[21]!==a?(C=t.jsxs("radialGradient",{id:a,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[w,j]}),e[21]=a,e[22]=C):C=e[22];let k;e[23]!==v||e[24]!==C?(k=t.jsxs("defs",{children:[v,C]}),e[23]=v,e[24]=C,e[25]=k):k=e[25];let $;return e[26]!==i||e[27]!==k||e[28]!==d||e[29]!==f||e[30]!==p||e[31]!==x?($=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,u,g,b,p,x,k]}),e[26]=i,e[27]=k,e[28]=d,e[29]=f,e[30]=p,e[31]=x,e[32]=$):$=e[32],$}function St(l){const e={};for(const s of l.split(`
1
+ import{e as S,r as E,j as t,n as J,B as T,K as M,c as Y,f as Ce,d as Se,E as re,q as $e,G as Ge,C as Xe,o as I}from"./index-Bll1AlZi.js";import{i as Qe}from"./ChevronRight-TZkuqway.js";import{s as De}from"./Eye-DjmQZ2p3.js";import{n as ae,i as We}from"./Globe01-BFX2DjNo.js";import{i as Ye,c as Ze}from"./ZoomOut-DiWWUJB1.js";import{s as Je}from"./Plus-CSmw6cpp.js";import{t as et}from"./Stars01-U1zM7H-d.js";import{i as ze}from"./Upload01-B45bupsd.js";import{b as K,T as V,a as q,u as Fe}from"./tooltip-B2vnmSMM.js";import{A as tt,a as lt,b as st,c as nt,d as it,e as rt,f as ot,g as at}from"./alert-dialog-C_C5CWIi.js";import{c as Z,D as ce,a as de,f as ct,b as dt,e as ft,d as mt}from"./dialog-BE3BWPis.js";import{I as ut}from"./input-CMMOM0dD.js";import{S as H}from"./skeleton-CxMjy9Kg.js";import{F as A,d as _e,M as ht}from"./file-type-icon-I99Qy2JI.js";import{a as xt}from"./toolbar-Vk0X9zFW.js";import{i as Oe,j as Pe,H as Te,k as Ue,h as Ae,f as fe,F as Ee,a as me,m as Me,l as pt,u as ye,b as jt,n as Le,o as gt}from"./header-tab-button-CbbR6n8q.js";import{i as ue}from"./DotsVertical-dauL8_mz.js";import{s as he}from"./Trash01-BOiUMUTV.js";import{i as Re}from"./Zap-DhYBCL8w.js";import{a as xe,c as X,b as pe,D as je}from"./dropdown-menu-D7fqzmBS.js";import{R as ve,a as bt,b as yt}from"./resizable-BTpQlX-z.js";import{n as Be}from"./LinkExternal01-C_bnt3ki.js";import{s as Ie}from"./XClose-CXQHotFO.js";import{i as vt}from"./X-LT7RIKGm.js";import"./Check-xMlMIzVH.js";import"./ChevronLeft-z0R4UDTf.js";import"./LayoutLeft-Ozgz9jeL.js";import"./index-B-No0lhl.js";const wt=new Set(["output","upload","public","home"]),Nt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function kt(l){return wt.has(l)||!Nt.test(l)?"home":l}function Ct(l){const e=S.c(33);let s,i,o;e[0]!==l?({glyph:s,readOnly:o,...i}=l,e[0]=l,e[1]=s,e[2]=i,e[3]=o):(s=e[1],i=e[2],o=e[3]);const c=E.useId(),r=`${c}-back`,a=`${c}-front`,n=`url(#${r})`;let d;e[4]!==n?(d=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:n}),e[4]=n,e[5]=d):d=e[5];const m=`url(#${a})`;let f;e[6]!==m?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:m}),e[6]=m,e[7]=f):f=e[7];let u,g,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),g=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),b=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=u,e[9]=g,e[10]=b):(u=e[8],g=e[9],b=e[10]);let p;e[11]!==s?(p=s&&t.jsx(s,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=s,e[12]=p):p=e[12];let x;e[13]!==o?(x=o&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(De,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=o,e[14]=x):x=e[14];let h,N;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),N=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=h,e[16]=N):(h=e[15],N=e[16]);let v;e[17]!==r?(v=t.jsxs("linearGradient",{id:r,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[h,N]}),e[17]=r,e[18]=v):v=e[18];let w,j;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("stop",{stopColor:"#72B6FA"}),j=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=w,e[20]=j):(w=e[19],j=e[20]);let C;e[21]!==a?(C=t.jsxs("radialGradient",{id:a,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[w,j]}),e[21]=a,e[22]=C):C=e[22];let k;e[23]!==v||e[24]!==C?(k=t.jsxs("defs",{children:[v,C]}),e[23]=v,e[24]=C,e[25]=k):k=e[25];let $;return e[26]!==i||e[27]!==k||e[28]!==d||e[29]!==f||e[30]!==p||e[31]!==x?($=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,u,g,b,p,x,k]}),e[26]=i,e[27]=k,e[28]=d,e[29]=f,e[30]=p,e[31]=x,e[32]=$):$=e[32],$}function St(l){const e={};for(const s of l.split(`
2
2
  `)){const i=s.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function we(l){for(const e of l.split(/\n\s*\n/)){const s=e.trim();if(!(!s||s.startsWith("#")))return s.replace(/\n/g," ")}return null}function He(l){const e=l.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:we(l),body:l};const s=St(e[1]),i=l.slice(e[0].length);return{name:s.name||null,description:s.description||we(i),body:i}}const $t=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Dt=new Set(["csv","tsv"]),zt=new Set(["mp4","webm","mov","m4v"]),Ft=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),_t=256*1024;function ee(l){const e=new Date(l);if(Number.isNaN(e.getTime()))return"";const s=Date.now()-e.getTime(),i=Math.floor(s/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const o=Math.floor(i/60);if(o<24)return`${o}h ago`;const c=Math.floor(o/24);return c<30?`${c}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ot(l){return l.split(".").pop()?.toLowerCase()??""}function Ke(l){const e=S.c(15),{downloadUrl:s,filename:i,onDelete:o}=l,c=`Actions for ${i}`;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ue,{size:14}),e[0]=r):r=e[0];let a;e[1]!==c?(a=t.jsx(xe,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Tt,"aria-label":c,children:r})}),e[1]=c,e[2]=a):a=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ae,{size:14}),e[3]=n):n=e[3];let d;e[4]!==s||e[5]!==i?(d=t.jsx(X,{asChild:!0,children:t.jsxs("a",{href:s,download:i,children:[n,"Download"]})}),e[4]=s,e[5]=i,e[6]=d):d=e[6];let m;e[7]!==o?(m=o&&t.jsxs(X,{variant:"destructive",onClick:o,children:[t.jsx(he,{size:14}),"Delete"]}),e[7]=o,e[8]=m):m=e[8];let f;e[9]!==d||e[10]!==m?(f=t.jsxs(pe,{align:"end",onClick:Pt,children:[d,m]}),e[9]=d,e[10]=m,e[11]=f):f=e[11];let u;return e[12]!==a||e[13]!==f?(u=t.jsxs(je,{children:[a,f]}),e[12]=a,e[13]=f,e[14]=u):u=e[14],u}function Pt(l){return l.stopPropagation()}function Tt(l){return l.stopPropagation()}function te(l){const e=S.c(9),{onOpen:s,children:i,className:o}=l;let c;e[0]!==s?(c=n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),s())},e[0]=s,e[1]=c):c=e[1];let r;e[2]!==o?(r=Y("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",o),e[2]=o,e[3]=r):r=e[3];let a;return e[4]!==i||e[5]!==s||e[6]!==c||e[7]!==r?(a=t.jsx("div",{role:"button",tabIndex:0,onClick:s,onKeyDown:c,className:r,children:i}),e[4]=i,e[5]=s,e[6]=c,e[7]=r,e[8]=a):a=e[8],a}function le(l){const e=S.c(16),{icon:s,name:i,meta:o,subtitle:c,actions:r}=l;let a;e[0]!==i?(a=t.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:i,children:i}),e[0]=i,e[1]=a):a=e[1];let n;e[2]!==o?(n=o&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=n):n=e[3];let d;e[4]!==a||e[5]!==n?(d=t.jsxs("div",{className:"flex items-start gap-3",children:[a,n]}),e[4]=a,e[5]=n,e[6]=d):d=e[6];let m;e[7]!==c?(m=c&&t.jsx("span",{className:"text-xs text-muted-foreground",children:c}),e[7]=c,e[8]=m):m=e[8];let f;e[9]!==d||e[10]!==m?(f=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[d,m]}),e[9]=d,e[10]=m,e[11]=f):f=e[11];let u;return e[12]!==r||e[13]!==s||e[14]!==f?(u=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[s,f,r]}),e[12]=r,e[13]=s,e[14]=f,e[15]=u):u=e[15],u}function se(l){const e=S.c(15),{name:s,meta:i,subtitle:o,glyph:c,readOnly:r,onOpen:a,onDelete:n}=l;let d;e[0]!==c||e[1]!==r?(d=t.jsx(Ct,{glyph:c,readOnly:r,className:"size-8 shrink-0"}),e[0]=c,e[1]=r,e[2]=d):d=e[2];let m;e[3]!==s||e[4]!==n?(m=n?t.jsxs(je,{children:[t.jsx(xe,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:At,"aria-label":`Actions for ${s}`,children:t.jsx(ue,{size:14})})}),t.jsx(pe,{align:"end",onClick:Ut,children:t.jsxs(X,{variant:"destructive",onClick:n,children:[t.jsx(he,{size:14}),"Delete"]})})]}):void 0,e[3]=s,e[4]=n,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==m?(f=t.jsx(le,{icon:d,name:s,meta:i,subtitle:o,actions:m}),e[6]=i,e[7]=s,e[8]=o,e[9]=d,e[10]=m,e[11]=f):f=e[11];let u;return e[12]!==a||e[13]!==f?(u=t.jsx(te,{onOpen:a,children:f}),e[12]=a,e[13]=f,e[14]=u):u=e[14],u}function Ut(l){return l.stopPropagation()}function At(l){return l.stopPropagation()}function Ve(l){const e=S.c(19),{filename:s,updatedAt:i,downloadUrl:o,onOpen:c,onDelete:r}=l;let a;e[0]!==s?(a=t.jsx(A,{filename:s,className:"h-8 w-6.5 shrink-0"}),e[0]=s,e[1]=a):a=e[1];let n;e[2]!==i?(n=ee(i),e[2]=i,e[3]=n):n=e[3];let d;e[4]!==s?(d=_e(s),e[4]=s,e[5]=d):d=e[5];let m;e[6]!==o||e[7]!==s||e[8]!==r?(m=t.jsx(Ke,{downloadUrl:o,filename:s,onDelete:r}),e[6]=o,e[7]=s,e[8]=r,e[9]=m):m=e[9];let f;e[10]!==s||e[11]!==a||e[12]!==n||e[13]!==d||e[14]!==m?(f=t.jsx(le,{icon:a,name:s,meta:n,subtitle:d,actions:m}),e[10]=s,e[11]=a,e[12]=n,e[13]=d,e[14]=m,e[15]=f):f=e[15];let u;return e[16]!==c||e[17]!==f?(u=t.jsx(te,{onOpen:c,children:f}),e[16]=c,e[17]=f,e[18]=u):u=e[18],u}function Et(l){const e=S.c(36),{dirName:s,updatedAt:i,skillMdUrl:o,onOpen:c,onBrowse:r,onDelete:a}=l;let n;e[0]!==o?(n=M.fileText(o),e[0]=o,e[1]=n):n=e[1];let d;e[2]!==o?(d=async()=>{const F=await fetch(o,{credentials:"include"});if(!F.ok)throw new Error(`fetch failed: ${F.status}`);return F.text()},e[2]=o,e[3]=d):d=e[3];let m;e[4]!==n||e[5]!==d?(m={queryKey:n,queryFn:d,staleTime:6e4,retry:!1},e[4]=n,e[5]=d,e[6]=m):m=e[6];const{data:f}=J(m);let u;e[7]!==f?(u=f?He(f):null,e[7]=f,e[8]=u):u=e[8];const g=u;let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(Re,{size:16})}),e[9]=b):b=e[9];const p=g?.name??s;let x;e[10]!==i?(x=ee(i),e[10]=i,e[11]=x):x=e[11];const h=`Actions for ${s}`;let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(ue,{size:14}),e[12]=N):N=e[12];let v;e[13]!==h?(v=t.jsx(xe,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Lt,"aria-label":h,children:N})}),e[13]=h,e[14]=v):v=e[14];let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Ye,{size:14}),e[15]=w):w=e[15];let j;e[16]!==r?(j=t.jsxs(X,{onClick:r,children:[w,"Browse files"]}),e[16]=r,e[17]=j):j=e[17];let C;e[18]!==a?(C=a&&t.jsxs(X,{variant:"destructive",onClick:a,children:[t.jsx(he,{size:14}),"Delete"]}),e[18]=a,e[19]=C):C=e[19];let k;e[20]!==j||e[21]!==C?(k=t.jsxs(pe,{align:"end",onClick:Mt,children:[j,C]}),e[20]=j,e[21]=C,e[22]=k):k=e[22];let $;e[23]!==v||e[24]!==k?($=t.jsxs(je,{children:[v,k]}),e[23]=v,e[24]=k,e[25]=$):$=e[25];let z;e[26]!==$||e[27]!==p||e[28]!==x?(z=t.jsx(le,{icon:b,name:p,meta:x,subtitle:"Skill",actions:$}),e[26]=$,e[27]=p,e[28]=x,e[29]=z):z=e[29];const P=g?.description??"";let D;e[30]!==P?(D=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:P}),e[30]=P,e[31]=D):D=e[31];let y;return e[32]!==c||e[33]!==z||e[34]!==D?(y=t.jsxs(te,{onOpen:c,children:[z,D]}),e[32]=c,e[33]=z,e[34]=D,e[35]=y):y=e[35],y}function Mt(l){return l.stopPropagation()}function Lt(l){return l.stopPropagation()}function oe(l){const e=S.c(4),{children:s}=l,[i,o]=E.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>n=>{if(!n)return;const d=new IntersectionObserver(m=>{const[f]=m;f?.isIntersecting&&(o(!0),d.disconnect())},{rootMargin:"200px"});d.observe(n)},e[0]=c):c=e[0];const[r]=E.useState(c);if(i){let n;return e[1]!==s?(n=t.jsx(t.Fragment,{children:s}),e[1]=s,e[2]=n):n=e[2],n}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{ref:r,className:"h-full w-full"}),e[3]=a):a=e[3],a}function Rt(l){const e=S.c(11),{url:s}=l;let i;e[0]!==s?(i=M.fileText(s),e[0]=s,e[1]=i):i=e[1];let o;e[2]!==s?(o=async()=>{const d=await fetch(s,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=s,e[3]=o):o=e[3];let c;e[4]!==i||e[5]!==o?(c={queryKey:i,queryFn:o,staleTime:6e4,retry:!1},e[4]=i,e[5]=o,e[6]=c):c=e[6];const{data:r}=J(c);if(!r)return null;let a;e[7]!==r?(a=r.slice(0,2e3),e[7]=r,e[8]=a):a=e[8];let n;return e[9]!==a?(n=t.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:a}),e[9]=a,e[10]=n):n=e[10],n}function Bt(l){const e=S.c(23),{url:s,ext:i}=l;let o;e[0]!==s?(o=M.csvThumb(s),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==s?(c=async()=>{const x=await fetch(s,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!x.ok)throw new Error(`fetch failed: ${x.status}`);return x.text()},e[2]=s,e[3]=c):c=e[3];let r;e[4]!==o||e[5]!==c?(r={queryKey:o,queryFn:c,staleTime:6e4,retry:!1},e[4]=o,e[5]=c,e[6]=r):r=e[6];const{data:a}=J(r);if(!a)return null;const n=i==="tsv"?" ":",";let d,m,f,u;if(e[7]!==a||e[8]!==n){u=Symbol.for("react.early_return_sentinel");e:{let x;e[13]!==n?(x=N=>N.split(n).slice(0,6).map(Kt),e[13]=n,e[14]=x):x=e[14];const h=a.split(`
3
3
  `).filter(Boolean).slice(0,7).map(x);if(h.length===0){u=null;break e}f="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",m="w-full border-collapse",d=h.map(It)}e[7]=a,e[8]=n,e[9]=d,e[10]=m,e[11]=f,e[12]=u}else d=e[9],m=e[10],f=e[11],u=e[12];if(u!==Symbol.for("react.early_return_sentinel"))return u;let g;e[15]!==d?(g=t.jsx("tbody",{children:d}),e[15]=d,e[16]=g):g=e[16];let b;e[17]!==m||e[18]!==g?(b=t.jsx("table",{className:m,children:g}),e[17]=m,e[18]=g,e[19]=b):b=e[19];let p;return e[20]!==f||e[21]!==b?(p=t.jsx("div",{className:f,children:b}),e[20]=f,e[21]=b,e[22]=p):p=e[22],p}function It(l,e){return t.jsx("tr",{className:Y(e===0&&"bg-muted/50 font-medium"),children:l.map(Ht)},e)}function Ht(l,e){return t.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:t.jsx("span",{className:"block truncate",children:l})},e)}function Kt(l){return l.trim().replace(/^"|"$/g,"")}function Vt(l){const e=S.c(14),{filename:s,size:i,downloadUrl:o}=l;let c;if(e[0]!==o||e[1]!==s||e[2]!==i){const r=Ot(s);let a;if($t.has(r)){let n;e[4]!==o?(n=t.jsx("img",{src:o,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=o,e[5]=n):n=e[5],a=n}else if(zt.has(r)){const n=`${o}#t=0.1`;let d;e[6]!==n?(d=t.jsx(oe,{children:t.jsx("video",{src:n,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=n,e[7]=d):d=e[7],a=d}else if(r==="pdf"){let n;e[8]!==s?(n=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(A,{filename:s,className:"h-14 w-11 opacity-60"})}),e[8]=s,e[9]=n):n=e[9],a=n}else if(Dt.has(r))a=t.jsx(oe,{children:t.jsx(Bt,{url:o,ext:r})});else if(Ft.has(r)&&i<=_t){let n;e[10]!==o?(n=t.jsx(oe,{children:t.jsx(Rt,{url:o})}),e[10]=o,e[11]=n):n=e[11],a=n}else{let n;e[12]!==s?(n=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(A,{filename:s,className:"h-14 w-11 opacity-60"})}),e[12]=s,e[13]=n):n=e[13],a=n}c=t.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:a}),e[0]=o,e[1]=s,e[2]=i,e[3]=c}else c=e[3];return c}function qt(l){const e=S.c(24),s=l.onOpen;let i;e[0]!==l.filename?(i=t.jsx(A,{filename:l.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=l.filename,e[1]=i):i=e[1];const o=l.filename;let c;e[2]!==l.updatedAt?(c=ee(l.updatedAt),e[2]=l.updatedAt,e[3]=c):c=e[3];let r;e[4]!==l.filename?(r=_e(l.filename),e[4]=l.filename,e[5]=r):r=e[5];let a;e[6]!==l.downloadUrl||e[7]!==l.filename||e[8]!==l.onDelete?(a=t.jsx(Ke,{downloadUrl:l.downloadUrl,filename:l.filename,onDelete:l.onDelete}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=l.onDelete,e[9]=a):a=e[9];let n;e[10]!==l.filename||e[11]!==i||e[12]!==c||e[13]!==r||e[14]!==a?(n=t.jsx(le,{icon:i,name:o,meta:c,subtitle:r,actions:a}),e[10]=l.filename,e[11]=i,e[12]=c,e[13]=r,e[14]=a,e[15]=n):n=e[15];let d;e[16]!==l.downloadUrl||e[17]!==l.filename||e[18]!==l.size?(d=t.jsx(Vt,{filename:l.filename,size:l.size,downloadUrl:l.downloadUrl}),e[16]=l.downloadUrl,e[17]=l.filename,e[18]=l.size,e[19]=d):d=e[19];let m;return e[20]!==l.onOpen||e[21]!==n||e[22]!==d?(m=t.jsxs(te,{onOpen:s,children:[n,d]}),e[20]=l.onOpen,e[21]=n,e[22]=d,e[23]=m):m=e[23],m}function ne(l){const e=l?l.split("/").filter(Boolean):[],s=e[0]==="public",i=s?e[1]??null:null,o=s?i?`public-${i}`:null:e[0]??null,c=(s?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:c,isPublic:s,publicSet:i,readOnly:s}}function W(l,e){return l.isPublic&&l.publicSet?`public/${l.publicSet}/${e}`:l.volume?`${l.volume}/${e}`:e}function O(l){const e=l.lastIndexOf("/");return e===-1?l:l.slice(e+1)}const Gt=l=>/\.html?$/i.test(l);function Xt(l){const e=S.c(26),{previewPath:s,onClose:i}=l;let o;e[0]!==s?(o=ne(s),e[0]=s,e[1]=o):o=e[1];const c=o,{volume:r,dirPath:a}=c,{data:n,isPending:d}=Oe(r,a),m=Pe(r??"");let f,u,g,b,p,x;if(e[2]!==m||e[3]!==n||e[4]!==a||e[5]!==d||e[6]!==i||e[7]!==s||e[8]!==r){const v=O(a),w=n&&n.kind==="file"?{key:s,filename:v,size:n.size,downloadUrl:m(n.path)}:null;u=ce,p=!0,e[15]!==i?(x=j=>{j||i()},e[15]=i,e[16]=x):x=e[16],f=de,g="flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",b=w&&n&&Gt(v)?t.jsxs(t.Fragment,{children:[t.jsx(Z,{className:"sr-only",children:v}),t.jsx(Te,{readUrl:w.downloadUrl,marker:Ue(n),title:v,savePath:r==="home"?a:void 0,trailing:t.jsx("div",{className:"w-8 shrink-0"})},s)]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-1 border-b border-border/60 py-1 pr-12 pl-2",children:[t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[t.jsx(A,{filename:v,className:"h-4.5 w-3.5 shrink-0"}),t.jsx(Z,{className:"truncate text-xs font-medium text-foreground",children:v}),w&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Ae(w.size)})]}),w&&t.jsxs(t.Fragment,{children:[t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:w.downloadUrl,download:w.filename,children:t.jsx(ae,{size:14})})})}),t.jsx(q,{side:"bottom",children:"Download"})]}),t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:()=>window.open(w.downloadUrl,"_blank","noopener"),children:t.jsx(Be,{size:14})})}),t.jsx(q,{side:"bottom",children:"Open in new tab"})]})]})]}),t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:w?t.jsx(fe,{file:w}):d?t.jsx(Ee,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(A,{filename:v,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})})]}),e[2]=m,e[3]=n,e[4]=a,e[5]=d,e[6]=i,e[7]=s,e[8]=r,e[9]=f,e[10]=u,e[11]=g,e[12]=b,e[13]=p,e[14]=x}else f=e[9],u=e[10],g=e[11],b=e[12],p=e[13],x=e[14];let h;e[17]!==f||e[18]!==g||e[19]!==b?(h=t.jsx(f,{className:g,children:b}),e[17]=f,e[18]=g,e[19]=b,e[20]=h):h=e[20];let N;return e[21]!==u||e[22]!==p||e[23]!==x||e[24]!==h?(N=t.jsx(u,{open:p,onOpenChange:x,children:h}),e[21]=u,e[22]=p,e[23]=x,e[24]=h,e[25]=N):N=e[25],N}const Qt=l=>/\.html?$/i.test(l);function Wt(l){const e=S.c(6),{onClose:s}=l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ie,{size:14}),e[0]=i):i=e[0];let o;e[1]!==s?(o=t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:s,children:i})}),e[1]=s,e[2]=o):o=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(q,{side:"bottom",children:"Close"}),e[3]=c):c=e[3];let r;return e[4]!==o?(r=t.jsxs(K,{children:[o,c]}),e[4]=o,e[5]=r):r=e[5],r}function Yt(l){const e=S.c(49),{previewPath:s,onClose:i}=l;let o;e[0]!==s?(o=ne(s),e[0]=s,e[1]=o):o=e[1];const c=o,{volume:r,dirPath:a}=c,{data:n,isPending:d}=Oe(r,a),m=Pe(r??"");let f,u,g,b,p,x,h,N,v;if(e[2]!==m||e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==s||e[7]!==r){v=Symbol.for("react.early_return_sentinel");e:{if(u=O(a),f=n&&n.kind==="file"?{key:s,filename:u,size:n.size,downloadUrl:m(n.path)}:null,f&&n&&Qt(u)){const F=f.downloadUrl;let U;e[17]!==n?(U=Ue(n),e[17]=n,e[18]=U):U=e[18];let B;e[19]!==i?(B=t.jsx(Wt,{onClose:i}),e[19]=i,e[20]=B):B=e[20],v=t.jsx(Te,{readUrl:F,marker:U,title:u,savePath:r==="home"?a:void 0,trailing:B},s);break e}N="flex h-full w-full flex-col bg-background",h="flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",g="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(A,{filename:u,className:"h-4.5 w-3.5 shrink-0"}),e[21]!==u?(p=t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:u}),e[21]=u,e[22]=p):p=e[22],x=f&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Ae(f.size)})}e[2]=m,e[3]=n,e[4]=a,e[5]=i,e[6]=s,e[7]=r,e[8]=f,e[9]=u,e[10]=g,e[11]=b,e[12]=p,e[13]=x,e[14]=h,e[15]=N,e[16]=v}else f=e[8],u=e[9],g=e[10],b=e[11],p=e[12],x=e[13],h=e[14],N=e[15],v=e[16];if(v!==Symbol.for("react.early_return_sentinel"))return v;let w;e[23]!==g||e[24]!==b||e[25]!==p||e[26]!==x?(w=t.jsxs("div",{className:g,children:[b,p,x]}),e[23]=g,e[24]=b,e[25]=p,e[26]=x,e[27]=w):w=e[27];let j;e[28]!==f?(j=f&&t.jsxs(t.Fragment,{children:[t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:f.downloadUrl,download:f.filename,children:t.jsx(ae,{size:14})})})}),t.jsx(q,{side:"bottom",children:"Download"})]}),t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:()=>window.open(f.downloadUrl,"_blank","noopener"),children:t.jsx(Be,{size:14})})}),t.jsx(q,{side:"bottom",children:"Open in new tab"})]})]}),e[28]=f,e[29]=j):j=e[29];let C;e[30]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ie,{size:14}),e[30]=C):C=e[30];let k;e[31]!==i?(k=t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:i,children:C})}),e[31]=i,e[32]=k):k=e[32];let $;e[33]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(q,{side:"bottom",children:"Close"}),e[33]=$):$=e[33];let z;e[34]!==k?(z=t.jsxs(K,{children:[k,$]}),e[34]=k,e[35]=z):z=e[35];let P;e[36]!==j||e[37]!==z||e[38]!==h||e[39]!==w?(P=t.jsxs("div",{className:h,children:[w,j,z]}),e[36]=j,e[37]=z,e[38]=h,e[39]=w,e[40]=P):P=e[40];let D;e[41]!==f||e[42]!==u||e[43]!==d?(D=t.jsx("div",{className:"relative min-h-0 flex-1",children:f?t.jsx(fe,{file:f}):d?t.jsx(Ee,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(A,{filename:u,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[41]=f,e[42]=u,e[43]=d,e[44]=D):D=e[44];let y;return e[45]!==P||e[46]!==D||e[47]!==N?(y=t.jsxs("div",{className:N,children:[P,D]}),e[45]=P,e[46]=D,e[47]=N,e[48]=y):y=e[48],y}function Zt(l){const e=S.c(21),{skillPath:s,onClose:i}=l,o=ne(s),{volume:c,dirPath:r}=o,a=me(),n=a(c??"",`${r}/SKILL.md`),d=M.fileText(n);let m;e[0]!==n?(m=async()=>{const _=await fetch(n,{credentials:"include"});if(!_.ok)throw new Error(`fetch failed: ${_.status}`);return _.text()},e[0]=n,e[1]=m):m=e[1];let f;e[2]!==d||e[3]!==m?(f={queryKey:d,queryFn:m,staleTime:6e4,retry:!1},e[2]=d,e[3]=m,e[4]=f):f=e[4];const u=J(f),g=Me(c??"",r);let b;e[5]!==r?(b=O(r),e[5]=r,e[6]=b):b=e[6];const p=b;let x;e[7]!==u.data?(x=u.data?He(u.data):null,e[7]=u.data,e[8]=x):x=e[8];const h=x,N=el;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(_,G)=>N(_.path)?-1:N(G.path)?1:O(_.path).localeCompare(O(G.path)),e[9]=v):v=e[9];const w=(g.data??[]).filter(Jt).sort(v),[j,C]=E.useState(null),k=j===null?null:w.find(_=>_.path===j)??null;let $;e[10]!==i?($=_=>{_||i()},e[10]=i,e[11]=$):$=e[11];let z;e[12]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Re,{size:18})}),e[12]=z):z=e[12];const P=h?.name??p;let D;e[13]!==P?(D=t.jsx(Z,{className:"flex-1 truncate text-base font-medium text-foreground",children:P}),e[13]=P,e[14]=D):D=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ct,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(vt,{size:16})})}),e[15]=y):y=e[15];let F;e[16]!==D?(F=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[z,D,y]}),e[16]=D,e[17]=F):F=e[17];let U;e[18]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[18]=U):U=e[18];const B="relative flex min-w-0 flex-1 flex-col overflow-y-auto",ie=k?t.jsx(fe,{file:{key:k.path,filename:O(k.path),size:k.size,downloadUrl:a(c??"",k.path)}}):u.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(H,{className:"h-4 w-1/3"}),t.jsx(H,{className:"h-3 w-full"}),t.jsx(H,{className:"h-3 w-5/6"}),t.jsx(H,{className:"h-3 w-2/3"})]}):u.isError||!h?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:h.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ht,{id:`skill-preview-${s}`,text:h.body})})]});let Q;return e[19]!==ie?(Q=t.jsx("div",{className:B,children:ie}),e[19]=ie,e[20]=Q):Q=e[20],t.jsx(ce,{open:!0,onOpenChange:$,children:t.jsxs(de,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:[F,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[U,g.isPending?t.jsx(H,{className:"mx-2 h-4 w-24"}):w.map(_=>{const G=N(_.path)?k===null:j===_.path;return t.jsxs("button",{type:"button",onClick:()=>C(N(_.path)?null:_.path),className:Y("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",G?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(A,{filename:O(_.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:Y("truncate text-sm",G?"text-foreground":"text-muted-foreground"),children:O(_.path)})]},_.path)})]}),Q]})]})})}function Jt(l){return l.kind==="file"}function el(l){return O(l)==="SKILL.md"}const qe=[{id:"home",description:"Your organization's home folder",glyph:Ze},{id:"uploads",description:"Files your team uploads",glyph:ze},{id:"outputs",description:"Agent run outputs",glyph:et}],Ne=3;function R(l){const e=S.c(2),{children:s}=l;let i;return e[0]!==s?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:s}),e[0]=s,e[1]=i):i=e[1],i}function L(l){const e=S.c(2),{children:s}=l;let i;return e[0]!==s?(i=t.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:s}),e[0]=s,e[1]=i):i=e[1],i}function ge(l){const e=S.c(2),{rows:s}=l,i=s===void 0?1:s;let o;return e[0]!==i?(o=t.jsx(L,{children:Array.from({length:i*3},tl)}),e[0]=i,e[1]=o):o=e[1],o}function tl(l,e){return t.jsx(H,{className:"h-16 rounded-2xl"},e)}function be(l){const e=S.c(2),{children:s}=l;let i;return e[0]!==s?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1],i}function ll(l){const e=S.c(6),{volume:s,displayName:i,description:o,glyph:c,onOpen:r}=l,a=gt(s),n=i??s,d=a.data?`${a.data.files} files`:void 0;let m;return e[0]!==o||e[1]!==c||e[2]!==r||e[3]!==n||e[4]!==d?(m=t.jsx(se,{name:n,meta:d,subtitle:o,glyph:c,onOpen:r}),e[0]=o,e[1]=c,e[2]=r,e[3]=n,e[4]=d,e[5]=m):m=e[5],m}function sl(l){const e=S.c(8),{segments:s,onNavigate:i}=l;let o;e[0]!==i?(o=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=o):o=e[1];let c;e[2]!==i||e[3]!==s?(c=s.map((a,n)=>{const d=s.slice(0,n+1).join("/"),m=n===s.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Qe,{size:12,className:"shrink-0 text-muted-foreground"}),m?t.jsx("span",{className:"truncate font-medium text-foreground",children:a}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(d),children:a})]},d)}),e[2]=i,e[3]=s,e[4]=c):c=e[4];let r;return e[5]!==o||e[6]!==c?(r=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[o,c]}),e[5]=o,e[6]=c,e[7]=r):r=e[7],r}function nl(l){const e=S.c(19),{onOpenDir:s,onOpenFile:i,onDelete:o}=l,{org:c}=$e(),r=jt(),a=Le(),n=me();let d;if(e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==i||e[4]!==c||e[5]!==a.data?.length||e[6]!==r.data||e[7]!==r.isPending){const m=r.data??[],f=m.slice(0,Ne),u=m.slice(Ne);let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(R,{children:"Folders"}),e[9]=g):g=e[9];let b;e[10]!==s||e[11]!==c?(b=qe.map(h=>t.jsx(ll,{volume:h.id,displayName:h.id==="home"?kt(c.slug):void 0,description:h.description,glyph:h.glyph,onOpen:()=>s(h.id)},h.id)),e[10]=s,e[11]=c,e[12]=b):b=e[12];let p;e[13]!==s||e[14]!==a.data?.length?(p=(a.data?.length??0)>0&&t.jsx(se,{name:"public",meta:`${a.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:We,readOnly:!0,onOpen:()=>s("public")}),e[13]=s,e[14]=a.data?.length,e[15]=p):p=e[15];let x;e[16]!==b||e[17]!==p?(x=t.jsxs("div",{className:"flex flex-col gap-3",children:[g,t.jsxs(L,{children:[b,p]})]}),e[16]=b,e[17]=p,e[18]=x):x=e[18],d=t.jsxs(t.Fragment,{children:[r.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Recently added"}),t.jsx(ge,{})]}):f.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Recently added"}),t.jsx(L,{children:f.map(h=>t.jsx(qt,{filename:O(h.path),updatedAt:h.updatedAt,size:h.size,downloadUrl:n(h.volume,h.path),onOpen:()=>i(`${h.volume}/${h.path}`),onDelete:()=>o({volume:h.volume,path:h.path,kind:"file"})},`${h.volume}/${h.path}`))})]}):t.jsx(be,{children:"No files yet — upload one, or ask an agent to produce something."}),x,u.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"All files"}),t.jsx(L,{children:u.map(h=>t.jsx(Ve,{filename:O(h.path),updatedAt:h.updatedAt,downloadUrl:n(h.volume,h.path),onOpen:()=>i(`${h.volume}/${h.path}`),onDelete:()=>o({volume:h.volume,path:h.path,kind:"file"})},`${h.volume}/${h.path}`))})]})]}),e[0]=n,e[1]=o,e[2]=s,e[3]=i,e[4]=c,e[5]=a.data?.length,e[6]=r.data,e[7]=r.isPending,e[8]=d}else d=e[8];return d}function il(l){const e=S.c(11),{onOpenDir:s}=l,i=Le();if(i.isPending){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ge,{}),e[0]=n):n=e[0],n}let o;e[1]!==i.data?(o=i.data??[],e[1]=i.data,e[2]=o):o=e[2];const c=o;if(c.length===0){let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(be,{children:"No public skill sets are configured."}),e[3]=n):n=e[3],n}let r;if(e[4]!==s||e[5]!==c){let n;e[7]!==s?(n=d=>t.jsx(se,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>s(`public/${d}`)},d),e[7]=s,e[8]=n):n=e[8],r=c.map(n),e[4]=s,e[5]=c,e[6]=r}else r=e[6];let a;return e[9]!==r?(a=t.jsx(L,{children:r}),e[9]=r,e[10]=a):a=e[10],a}function rl(l){const e=S.c(25),{location:s,onOpenDir:i,onOpenFile:o,onOpenSkill:c,onDelete:r}=l,a=s.volume??"",n=Me(a,s.dirPath),d=me();if(n.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ge,{rows:2}),e[0]=p):p=e[0],p}if(n.isError){const p=n.error instanceof Error?n.error.message:"Failed to load";let x;return e[1]!==p?(x=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[1]=p,e[2]=x):x=e[2],x}let m,f,u,g;if(e[3]!==d||e[4]!==n.data||e[5]!==s||e[6]!==r||e[7]!==i||e[8]!==o||e[9]!==c||e[10]!==a){g=Symbol.for("react.early_return_sentinel");e:{const p=n.data??[],x=p.filter(cl),h=p.filter(al),N=p.filter(ol);if(p.length===0){const j=s.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let C;e[15]!==j?(C=t.jsx(be,{children:j}),e[15]=j,e[16]=C):C=e[16],g=C;break e}let v;e[17]!==s.readOnly||e[18]!==r||e[19]!==a?(v=j=>s.readOnly?void 0:()=>r({volume:a,path:j.path,kind:j.kind}),e[17]=s.readOnly,e[18]=r,e[19]=a,e[20]=v):v=e[20];const w=v;m=x.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Skills"}),t.jsx(L,{children:x.map(j=>t.jsx(Et,{dirName:O(j.path),updatedAt:j.updatedAt,skillMdUrl:d(a,`${j.path}/SKILL.md`),onOpen:()=>c(W(s,j.path)),onBrowse:()=>i(W(s,j.path)),onDelete:w(j)},j.path))})]}),f=h.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Folders"}),t.jsx(L,{children:h.map(j=>t.jsx(se,{name:O(j.path),meta:ee(j.updatedAt),readOnly:s.readOnly,onOpen:()=>i(W(s,j.path)),onDelete:w(j)},j.path))})]}),u=N.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Files"}),t.jsx(L,{children:N.map(j=>t.jsx(Ve,{filename:O(j.path),updatedAt:j.updatedAt,downloadUrl:d(a,j.path),onOpen:()=>o(W(s,j.path)),onDelete:w(j)},j.path))})]})}e[3]=d,e[4]=n.data,e[5]=s,e[6]=r,e[7]=i,e[8]=o,e[9]=c,e[10]=a,e[11]=m,e[12]=f,e[13]=u,e[14]=g}else m=e[11],f=e[12],u=e[13],g=e[14];if(g!==Symbol.for("react.early_return_sentinel"))return g;let b;return e[21]!==m||e[22]!==f||e[23]!==u?(b=t.jsxs(t.Fragment,{children:[m,f,u]}),e[21]=m,e[22]=f,e[23]=u,e[24]=b):b=e[24],b}function ol(l){return l.kind==="file"}function al(l){return l.kind==="dir"&&!l.hasSkill}function cl(l){return l.kind==="dir"&&l.hasSkill}function ke(){const{org:l}=$e(),e=Ge(),s=Ce(),i=Fe(),o=Se({strict:!1}),c=o.path??"",r=ne(c),a=r.segments.length===0,n=(y,F)=>s({to:".",search:U=>({...U,[y]:F||void 0})}),d=y=>n("path",y),m=y=>n("preview",y),f=y=>n("skill",y),[u,g]=E.useState(null),[b,p]=E.useState(!1),[x,h]=E.useState(""),N=E.useRef(null),v=r.readOnly?null:r.volume??"uploads",w=r.volume?r.dirPath:"",{upload:j,mkdir:C}=ye(v??"uploads"),{remove:k}=ye(u?.volume??"uploads");async function $(y){if(!(!v||!y||y.length===0))try{await j.mutateAsync({dir:w,files:[...y]}),I.success(y.length===1?`Uploaded ${y[0]?.name}`:`Uploaded ${y.length} files`)}catch(F){I.error(F instanceof Error?F.message:"Upload failed")}finally{N.current&&(N.current.value="")}}async function z(){const y=x.trim();if(!(!v||!y))try{await C.mutateAsync(w?`${w}/${y}`:y),I.success(`Folder "${y}" created`),p(!1),h("")}catch(F){I.error(F instanceof Error?F.message:"Failed to create folder")}}async function P(){if(!u)return;const y=u;try{await k.mutateAsync(y.path),I.success(`Deleted ${O(y.path)}`)}catch(F){I.error(F instanceof Error?F.message:"Delete failed")}finally{g(null)}}function D(){for(const y of qe)e.invalidateQueries({queryKey:M.orgFsVolume(l.id,y.id)});r.volume&&e.invalidateQueries({queryKey:M.orgFsVolume(l.id,r.volume)}),e.invalidateQueries({queryKey:M.orgFsRecent(l.id)}),e.invalidateQueries({queryKey:M.orgFsPublicSets(l.id)})}return t.jsxs("div",{className:"h-full overflow-y-auto",children:[t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[!a&&t.jsx(sl,{segments:r.segments,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"min-w-0 flex-1 truncate text-xl font-medium text-foreground",children:a?"Library":r.segments.at(-1)??"Library"}),t.jsx(T,{variant:"ghost",size:"icon",onClick:D,"aria-label":"Refresh",children:t.jsx(Xe,{size:14})}),!a&&v&&t.jsxs(T,{variant:"outline",size:"sm",onClick:()=>p(!0),children:[t.jsx(Je,{size:14}),"New folder"]}),r.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(De,{size:12}),"Read-only"]}):t.jsxs(T,{size:"sm",disabled:j.isPending,onClick:()=>N.current?.click(),children:[t.jsx(ze,{size:14}),j.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:N,type:"file",multiple:!0,className:"hidden",onChange:y=>{$(y.target.files)}})]})]}),a?t.jsx(nl,{onOpenDir:d,onOpenFile:m,onDelete:g}):r.volume===null?t.jsx(il,{onOpenDir:d}):t.jsx(rl,{location:r,onOpenDir:d,onOpenFile:m,onOpenSkill:f,onDelete:g},r.volume)]}),o.preview?i&&t.jsx(Xt,{previewPath:o.preview,onClose:()=>n("preview",null)}):o.skill?t.jsx(Zt,{skillPath:o.skill,onClose:()=>n("skill",null)},o.skill):null,t.jsx(ce,{open:b,onOpenChange:p,children:t.jsxs(de,{children:[t.jsxs(dt,{children:[t.jsx(Z,{children:"New folder"}),t.jsxs(ft,{children:["Create a folder in ",c||"the library","."]})]}),t.jsx(ut,{autoFocus:!0,placeholder:"folder-name",value:x,onChange:y=>h(y.target.value),onKeyDown:y=>{y.key==="Enter"&&z()}}),t.jsxs(mt,{children:[t.jsx(T,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),t.jsx(T,{disabled:!x.trim()||C.isPending,onClick:()=>{z()},children:"Create"})]})]})}),t.jsx(tt,{open:u!==null,onOpenChange:y=>{y||g(null)},children:t.jsxs(lt,{children:[t.jsxs(st,{children:[t.jsxs(nt,{children:["Delete ",u?O(u.path):"","?"]}),t.jsx(it,{children:u?.kind==="dir"?"The folder and everything inside it will be deleted for the whole organization. Sandboxes see this change within seconds.":"The file will be deleted for the whole organization. Sandboxes see this change within seconds."})]}),t.jsxs(rt,{children:[t.jsx(ot,{children:"Cancel"}),t.jsx(at,{onClick:()=>{P()},children:"Delete"})]})]})})]})}function Ll(){const l=S.c(13),e=Fe(),s=Ce();let i;l[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},l[0]=i):i=l[0];const c=Se(i).preview;let r;l[1]!==c?(r=c?O(c):"",l[1]=c,l[2]=r):r=l[2];const a=r;let n;l[3]!==s?(n=()=>s({to:".",search:dl}),l[3]=s,l[4]=n):n=l[4];const d=n;if(e){let g;return l[5]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:t.jsx(re,{children:t.jsx(ke,{})})}),l[5]=g):g=l[5],g}let m;l[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ve,{order:1,minSize:30,defaultSize:55,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(re,{children:t.jsx(ke,{})})})})}),l[6]=m):m=l[6];let f;l[7]!==d||l[8]!==a||l[9]!==c?(f=c&&t.jsxs(t.Fragment,{children:[t.jsx(xt.Tabs,{children:t.jsx(pt,{title:a,icon:{kind:"component",Component:g=>t.jsx(A,{filename:a,...g})},active:!0,onClick:d})}),t.jsx(bt,{className:"bg-sidebar"}),t.jsx(ve,{order:2,minSize:25,defaultSize:45,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(re,{children:t.jsx(Yt,{previewPath:c,onClose:d})})})})})]}),l[7]=d,l[8]=a,l[9]=c,l[10]=f):f=l[10];let u;return l[11]!==f?(u=t.jsxs(yt,{direction:"horizontal",className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:[m,f]}),l[11]=f,l[12]=u):u=l[12],u}function dl(l){return{...l,preview:void 0}}export{Ll as default};
@@ -1 +1 @@
1
- import{e as f,c as d,r as p,j as r}from"./index-DLy_MgNO.js";import{m as w}from"./sidebar-DRcLUASh.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
1
+ import{e as f,c as d,r as p,j as r}from"./index-Bll1AlZi.js";import{m as w}from"./sidebar-hk7mPADd.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};