decocms 4.92.2 → 4.92.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Cvc_10Uv.js → AlertCircle-B9GlbKHh.js} +1 -1
- package/dist/client/assets/{AreaChart-D4PMIsMV.js → AreaChart-DHN9bK0l.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dq6JgHsq.js → ArrowUp-DNZsq7Zt.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DgI9ki5h.js → ArrowUpRight-DZZygrAi.js} +1 -1
- package/dist/client/assets/{CheckCircle-B5oIKeSF.js → CheckCircle-BEcdXH7-.js} +1 -1
- package/dist/client/assets/{ChevronDown-D_W2bIqv.js → ChevronDown-BSRiDjXd.js} +1 -1
- package/dist/client/assets/{ChevronRight-BnIvJcIZ.js → ChevronRight-YmTewr_B.js} +1 -1
- package/dist/client/assets/{ChevronUp-Ci-XiWb6.js → ChevronUp-D5F6V6Tm.js} +1 -1
- package/dist/client/assets/{Copy01-Q4xZmPKp.js → Copy01-BkGYkmm-.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bcfqjiks.js → DotsVertical-BmTi7wpl.js} +1 -1
- package/dist/client/assets/{Eye-BuukW7MV.js → Eye-B-ZfWIGj.js} +1 -1
- package/dist/client/assets/{FilterLines-Do4UgzmV.js → FilterLines-BwWG7tAk.js} +1 -1
- package/dist/client/assets/{Globe01-qjaQZUfN.js → Globe01-D3vBqhI7.js} +1 -1
- package/dist/client/assets/{Globe04-CqIGMVDi.js → Globe04-pvxBukgJ.js} +1 -1
- package/dist/client/assets/{HardDrive-DrLvUMYg.js → HardDrive-DutZPQFL.js} +1 -1
- package/dist/client/assets/{Image01-BWotytID.js → Image01-PIeYnf-K.js} +1 -1
- package/dist/client/assets/{Key01-BPZUhUcV.js → Key01-DhLD806C.js} +1 -1
- package/dist/client/assets/{LayoutLeft-COV7zlIC.js → LayoutLeft-BI-sXAac.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CyMOdGfe.js → LinkExternal01-DO3QnLus.js} +1 -1
- package/dist/client/assets/{Monitor01-dLHbd0CB.js → Monitor01-BOILvS2u.js} +1 -1
- package/dist/client/assets/{Package-B7Qii2Tl.js → Package-DbEcG94t.js} +1 -1
- package/dist/client/assets/{Palette-tVNOj7Ym.js → Palette-CyZvWKmI.js} +1 -1
- package/dist/client/assets/{Play-BE8nTtBp.js → Play-B8fWmOst.js} +1 -1
- package/dist/client/assets/{Plus-5VWQJEkS.js → Plus-2c1jULco.js} +1 -1
- package/dist/client/assets/{SearchLg-BiyFAMx0.js → SearchLg-XmvudKlH.js} +1 -1
- package/dist/client/assets/{SearchMd-LbMkvaPD.js → SearchMd-lwIiBODG.js} +1 -1
- package/dist/client/assets/{Settings02-CU2rilKq.js → Settings02-DMpqOK24.js} +1 -1
- package/dist/client/assets/{Shield01-7KT2UKvg.js → Shield01-gTFc9c17.js} +1 -1
- package/dist/client/assets/{Star01-D4LxiizA.js → Star01-DoUbKevt.js} +1 -1
- package/dist/client/assets/{Stars01-HAbkffzq.js → Stars01-CJsm_THn.js} +1 -1
- package/dist/client/assets/{Stars02-CdgckoDr.js → Stars02-B08FvcHQ.js} +1 -1
- package/dist/client/assets/{Sun-Ca3eslhz.js → Sun-nDXz4jeM.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DNcPUv7P.js → SwitchHorizontal01-Rgis0XWf.js} +1 -1
- package/dist/client/assets/{Tool01-DBXzU6aR.js → Tool01-BR3IBeV9.js} +1 -1
- package/dist/client/assets/{Tool02-rl8XhSPG.js → Tool02-B0-a0UMl.js} +1 -1
- package/dist/client/assets/{Trash01-DxXosbkh.js → Trash01-Ba6bCbNY.js} +1 -1
- package/dist/client/assets/{TrendUp01-BmzCTIbp.js → TrendUp01-CeRF_789.js} +1 -1
- package/dist/client/assets/{Upload01-CXsTipbe.js → Upload01-B14IruoN.js} +1 -1
- package/dist/client/assets/{User01-CZgThaZQ.js → User01-ByIE6k8L.js} +1 -1
- package/dist/client/assets/{Users01-IdyAszrF.js → Users01-BdldAr7H.js} +1 -1
- package/dist/client/assets/{Users03-3HXi1aia.js → Users03-Bx4g7VTC.js} +1 -1
- package/dist/client/assets/{X-CLG08ht8.js → X-Dif5I5BD.js} +1 -1
- package/dist/client/assets/{XCircle-pZ6nD22L.js → XCircle-C0OdV3N_.js} +1 -1
- package/dist/client/assets/{XClose-BYq2BBpT.js → XClose-DomD4542.js} +1 -1
- package/dist/client/assets/{Zap-C6tkfs5m.js → Zap-CEUVQQOc.js} +1 -1
- package/dist/client/assets/{ZapSquare-DdKvM81Z.js → ZapSquare-EvC2T9CP.js} +1 -1
- package/dist/client/assets/{ZoomOut-DAAhtu2Z.js → ZoomOut-BprgOfkE.js} +1 -1
- package/dist/client/assets/{access-gate-B8spscer.js → access-gate-NCJKEJqO.js} +1 -1
- package/dist/client/assets/{add-section-modal-De0GxBTc.js → add-section-modal-DBjaDtzc.js} +1 -1
- package/dist/client/assets/{agent-icon-BIj6WxKp.js → agent-icon-DicjSkHu.js} +1 -1
- package/dist/client/assets/{agents-list-Cc-986WT.js → agents-list-Bt1R4ueI.js} +1 -1
- package/dist/client/assets/{ai-providers-Ck_-NP1I.js → ai-providers-TK1CCOpK.js} +1 -1
- package/dist/client/assets/{alert-CI7flGPF.js → alert-C_4AvGUo.js} +1 -1
- package/dist/client/assets/{alert-dialog-D2oa47X8.js → alert-dialog-DDtUbhoS.js} +1 -1
- package/dist/client/assets/{app-editor-Cn-tT-ug.js → app-editor-ptKJtHHM.js} +1 -1
- package/dist/client/assets/{auth-Kymy4xkz.js → auth-CsHQFHV_.js} +1 -1
- package/dist/client/assets/{auth-catchall-B0gQyYvu.js → auth-catchall-_TQy6GDd.js} +1 -1
- package/dist/client/assets/{auth-entry-Crrd0hkP.js → auth-entry-_ePf9_J1.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BO4l9cCp.js → auth-split-layout-D9UYTbxy.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DAAmwSgR.js → authenticate-and-persist-oauth-CEv4KtcH.js} +1 -1
- package/dist/client/assets/{automation-list-row-D-cT9rxb.js → automation-list-row-CyDHI_uf.js} +1 -1
- package/dist/client/assets/{automation-runs-_XAGR1m2.js → automation-runs-D8v8nlly.js} +2 -2
- package/dist/client/assets/{automations-Bh1OF4xf.js → automations-BoSNNWPc.js} +1 -1
- package/dist/client/assets/{autosend-D-JHJKNK.js → autosend-BgYoPuWD.js} +1 -1
- package/dist/client/assets/{avatar-1o2VQKTj.js → avatar-BVdHZbMN.js} +1 -1
- package/dist/client/assets/{badge-dHBIjKyY.js → badge-C_9mnuBd.js} +1 -1
- package/dist/client/assets/{block-document-nemKITlN.js → block-document-CcMdXbqY.js} +1 -1
- package/dist/client/assets/{brand-context-DSZ7O9_c.js → brand-context-B-nZCoNx.js} +1 -1
- package/dist/client/assets/{buckets-BDkQllTH.js → buckets-DcRE1RUQ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Cn58Io0u.js → bulk-category-panel-BkJQrEio.js} +1 -1
- package/dist/client/assets/calendar-Bxkf6gvE.js +102 -0
- package/dist/client/assets/{capability-load-error-DI4Ww9LY.js → capability-load-error-i6NCyxxk.js} +1 -1
- package/dist/client/assets/{card-CoG27DVs.js → card-C3gg1LtP.js} +1 -1
- package/dist/client/assets/{category-editor-BmpcIx1s.js → category-editor-CaGAyBNX.js} +1 -1
- package/dist/client/assets/{chat-context-glCfFIWX.js → chat-context-DSveBxCg.js} +1 -1
- package/dist/client/assets/{checkbox-BOAToSlJ.js → checkbox-Ba2-hx8r.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CqzQrYb8.js → cli-auth-success-Cc2B25iW.js} +1 -1
- package/dist/client/assets/{collection-detail-I0O1ME9a.js → collection-detail-D9ZCPDhA.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bw2bFMNm.js → collection-display-button-D_kIgil2.js} +1 -1
- package/dist/client/assets/{collection-search-DuPY-s4R.js → collection-search-TcSAZpqK.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BOKHq7cp.js → collection-table-wrapper-H4bzUKoO.js} +1 -1
- package/dist/client/assets/{collection-tabs-CcN3J070.js → collection-tabs-CIRa_M2W.js} +1 -1
- package/dist/client/assets/{command-BB6Oir8o.js → command-3z1R7bvy.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DejhsIyX.js → commerce-onboarding-DbQ0hYyA.js} +1 -1
- package/dist/client/assets/{companions-core-C-kZqiTC.js → companions-core-C68sN4Wc.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CUGIAU17.js → connect-desktop-dialog-DEEL81vf.js} +1 -1
- package/dist/client/assets/{connection-card-7gBTmFox.js → connection-card-D_K36Swx.js} +1 -1
- package/dist/client/assets/{connection-detail-BB0rtYjx.js → connection-detail-CKGrDl_p.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CJKig9hy.js → connection-form-helpers-DyOAEqE9.js} +1 -1
- package/dist/client/assets/{connections-E7mextbc.js → connections-BJO0R_-8.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DEJZ4gJu.js → decopilot-sse-pool-CEQrv8Fn.js} +1 -1
- package/dist/client/assets/{dialog-ChJw5xnr.js → dialog-DUqhzGiD.js} +1 -1
- package/dist/client/assets/{domain-settings-B6Co6UtW.js → domain-settings-CRIqu0Bs.js} +1 -1
- package/dist/client/assets/{drawer-_WfOhyRU.js → drawer-DvhdIHph.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B7HOgSu8.js → dropdown-menu-D5BTIZvH.js} +1 -1
- package/dist/client/assets/{empty-state-kSEyPCAz.js → empty-state-BHuw6cM9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-oUFnwuwD.js → extract-connection-data-_NDoBHMa.js} +1 -1
- package/dist/client/assets/{file-explorer-CnTvRnvj.js → file-explorer-CUr9mfMv.js} +1 -1
- package/dist/client/assets/{file-type-icon-CeQVzqDu.js → file-type-icon-BOCZKON3.js} +1 -1
- package/dist/client/assets/{files-CCxNqj9u.js → files-CelFf8dg.js} +1 -1
- package/dist/client/assets/{form-BUM27CLj.js → form-C9InGmo4.js} +1 -1
- package/dist/client/assets/{general-BjF2DfAd.js → general-DlHL1tW3.js} +1 -1
- package/dist/client/assets/{github-repo-picker-4TIPzYjR.js → github-repo-picker-Biy9UFu8.js} +1 -1
- package/dist/client/assets/{hooks-CJqrF4BQ.js → hooks-DU-2h9eZ.js} +1 -1
- package/dist/client/assets/{index-DVotD2Sm.js → index-629FAmzK.js} +1 -1
- package/dist/client/assets/{index-BHqz24vm.js → index-BOgwoJjn.js} +1 -1
- package/dist/client/assets/{index-CWlzI7M3.js → index-BQK4XWOD.js} +2 -2
- package/dist/client/assets/{index-CR0rMz7E.js → index-CO3868Cu.js} +1 -1
- package/dist/client/assets/{index-BderZvBT.js → index-Cb_X1LK0.js} +1 -1
- package/dist/client/assets/{index-WDnleR3r.js → index-CbhDnqOu.js} +1 -1
- package/dist/client/assets/{index-D6ixbRYa.js → index-Cs6hIS7C.js} +4 -4
- package/dist/client/assets/{index-Bj_MaVUP.js → index-DBhNC4I_.js} +1 -1
- package/dist/client/assets/{index-CQwS9Ezr.js → index-DivFugQC.js} +1 -1
- package/dist/client/assets/{index-C8rlFaFO.js → index-DmhdwAgP.js} +3 -3
- package/dist/client/assets/{index-DyXd0E61.js → index-DnrPO2j2.js} +1 -1
- package/dist/client/assets/{index-CWGwstEz.js → index-Du80fsxC.js} +1 -1
- package/dist/client/assets/{index-CHWLrEqX.js → index-f6gbzJ8b.js} +1 -1
- package/dist/client/assets/{index-B_qFi_-_.js → index-nNhZx5bw.js} +27 -27
- package/dist/client/assets/index-oE__K1ye.css +1 -0
- package/dist/client/assets/{index-redirect-CZuVtK8Y.js → index-redirect-hJFu02mm.js} +1 -1
- package/dist/client/assets/{input-CWExGH7j.js → input-TkvVVsQL.js} +1 -1
- package/dist/client/assets/{integration-icon-BXEpLE2r.js → integration-icon-CWb3OXTV.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Cj35CA_W.js → invite-member-dialog-BA1mFY2X.js} +1 -1
- package/dist/client/assets/{label-BbLr7wPS.js → label-CB2o7dZ2.js} +1 -1
- package/dist/client/assets/{layout-yKsHfaYu.js → layout-CqMMMVMm.js} +1 -1
- package/dist/client/assets/{login-g6Yf2A86.js → login-B0EX352Z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B2KaqQoI.js → mcp-oauth-B5rKpHdd.js} +1 -1
- package/dist/client/assets/{members-yX31omZQ.js → members-Ds_Onv02.js} +1 -1
- package/dist/client/assets/{monaco-editor-CJKnQM68.js → monaco-editor-DfuNvLfy.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DTqvYy56.js → monitoring-stats-row-B43TP1bq.js} +1 -1
- package/dist/client/assets/{multi-select-C9lH7lr4.js → multi-select-DhXl88EK.js} +1 -1
- package/dist/client/assets/{oauth-callback-DPu8Jv31.js → oauth-callback-CZ8I3e9V.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DXhgROtl.js → oauth-callback-ai-provider-BiKjtCpj.js} +1 -1
- package/dist/client/assets/{onboarding-b8UESLyK.js → onboarding-U4YqP9I9.js} +1 -1
- package/dist/client/assets/{org-install-DFTAzRMO.js → org-install-BYDat95r.js} +1 -1
- package/dist/client/assets/{org-layout-BbjFIQ-M.js → org-layout-CVqWtNQa.js} +1 -1
- package/dist/client/assets/{organization-choice-DjVV9MCZ.js → organization-choice-CkG6QFWH.js} +1 -1
- package/dist/client/assets/{orgs-B1jGApXW.js → orgs-B4DrO8iC.js} +1 -1
- package/dist/client/assets/{page-seo-form-DeD_2a8R.js → page-seo-form-8ToiuKnD.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BTyypxho.js +1 -0
- package/dist/client/assets/{popover-kOy_asOa.js → popover-DwV6WXHS.js} +1 -1
- package/dist/client/assets/{post-editor-BZQdhdwo.js → post-editor-j9JAXwQN.js} +1 -1
- package/dist/client/assets/{primitives-Cyz_TV23.js → primitives-RdkZFzQM.js} +1 -1
- package/dist/client/assets/{profile-D5HUGTyF.js → profile-DwVJzm_R.js} +1 -1
- package/dist/client/assets/project-app-view-e40sJb24.js +1 -0
- package/dist/client/assets/record-editor-BBPLTix7.js +1 -0
- package/dist/client/assets/redirect-editor-C8EDxpmx.js +1 -0
- package/dist/client/assets/registry-CFSvMZwJ.js +2 -0
- package/dist/client/assets/{registry-layout-JPmaR-tb.js → registry-layout-C2NoRJs0.js} +2 -2
- package/dist/client/assets/{reports-Btc-1oN-.js → reports-J4B5GOoc.js} +1 -1
- package/dist/client/assets/{require-capability-BBszzyH9.js → require-capability-DnfzULDW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CR5_YK6W.js → required-auth-layout-ABsqitxw.js} +1 -1
- package/dist/client/assets/{reset-password-u9Nbv0bS.js → reset-password-CbrThkFS.js} +1 -1
- package/dist/client/assets/{roles-B7bUsR2h.js → roles-BqueMkJJ.js} +1 -1
- package/dist/client/assets/{search-input-B6akQV4Y.js → search-input-B-RkAjzQ.js} +1 -1
- package/dist/client/assets/{secrets-Dsj3iy5H.js → secrets-CEZOniOS.js} +1 -1
- package/dist/client/assets/{sections-editor-CvIj0bPs.js → sections-editor-BW9cZUKJ.js} +1 -1
- package/dist/client/assets/{select-4-vdHbLT.js → select-AzuoAc3H.js} +1 -1
- package/dist/client/assets/{select-model-CVcEVUsi.js → select-model-BAk08l-M.js} +1 -1
- package/dist/client/assets/{self-tool-result-Cwdk21K_.js → self-tool-result-C94YNykg.js} +1 -1
- package/dist/client/assets/{seo-editor-B0_qMHl0.js → seo-editor-CR8P7sfk.js} +1 -1
- package/dist/client/assets/{settings-layout-BURikhtl.js → settings-layout-9yQD_m0n.js} +1 -1
- package/dist/client/assets/{settings-section-DxqR9iml.js → settings-section-CNVe03BK.js} +1 -1
- package/dist/client/assets/{shell-controls-DYq3DSuV.js → shell-controls-5d4ZCRmi.js} +1 -1
- package/dist/client/assets/{shell-layout-DvMdeukx.js → shell-layout-6KUu0MA6.js} +1 -1
- package/dist/client/assets/{sidebar-AfeWMY1r.js → sidebar-DnKMI8jz.js} +1 -1
- package/dist/client/assets/{skeleton-DraYvTQP.js → skeleton-xDZ5Iwb8.js} +1 -1
- package/dist/client/assets/{sso-DWBNvY6X.js → sso-DNsZ7Hie.js} +1 -1
- package/dist/client/assets/{store-BFhYLhoT.js → store-BoCHTDSB.js} +1 -1
- package/dist/client/assets/store-registry-WZUtBjlh.js +2 -0
- package/dist/client/assets/{studio-tools-B3FHZXsQ.js → studio-tools-DIWsVaKg.js} +1 -1
- package/dist/client/assets/{switch-CyZjNvfZ.js → switch-DS9vYGS-.js} +1 -1
- package/dist/client/assets/{table-iG6kCmeS.js → table-DnoPpUup.js} +1 -1
- package/dist/client/assets/{tabs-C1LpzuaJ.js → tabs-2srR2H7A.js} +1 -1
- package/dist/client/assets/{textarea-B8dhUfp9.js → textarea-DjtAtA2l.js} +1 -1
- package/dist/client/assets/{toggle-group-c5TjS6xS.js → toggle-group-DGvoaiio.js} +1 -1
- package/dist/client/assets/{toolbar-Daz4jqLs.js → toolbar-CvkbyWaX.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bbbo7hyv.js → toolbar-icon-button-Cr-N30KB.js} +1 -1
- package/dist/client/assets/{tooltip-DE_gqCm3.js → tooltip-cvFTpZ9W.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CGzSWtp7.js → use-ai-providers-ZLuBEaKb.js} +1 -1
- package/dist/client/assets/{use-automations-Btiu7Z09.js → use-automations-COcieFX-.js} +1 -1
- package/dist/client/assets/{use-autosave-DphOvxb9.js → use-autosave-C46oRXRb.js} +1 -1
- package/dist/client/assets/{use-capability-BNcFOggs.js → use-capability-3dRU8tE2.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Dw7sAB29.js → use-clock-tick-BzcS25hV.js} +1 -1
- package/dist/client/assets/{use-collections-u5tkBX1a.js → use-collections-DaXoNaLL.js} +1 -1
- package/dist/client/assets/{use-connection-CcmTBTY-.js → use-connection-DM1ROgj3.js} +1 -1
- package/dist/client/assets/{use-copy-CveeH2p4.js → use-copy-DC217syR.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-jvSmQNTU.js → use-create-virtual-mcp-Clu62lnk.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DFle-8Sb.js → use-debounced-autosave-DYog9M6N.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D1xFGN32.js → use-debounced-value-CSp0_yRg.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CV7sw9Em.js → use-deco-credits-Bm6Hzrca.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-VInARyiN.js → use-decopilot-events-CX_EuT5c.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DDV7XY4a.js → use-delete-connection-CxGr7t4A.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-h9tth1Ey.js → use-deployment-admin-C6-1CBki.js} +1 -1
- package/dist/client/assets/{use-file-configs-BEHJ-b8Q.js → use-file-configs-DASxzk9O.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BI8YTyTt.js → use-infinite-scroll-XidGSyic.js} +1 -1
- package/dist/client/assets/{use-join-requests-V5rMqfIc.js → use-join-requests-CjypbTMc.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DINFEYgi.js → use-mcp-auth-status-BpAt0IbR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-PcphUWIj.js → use-mcp-client-DseZ3Mea.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CakNulXp.js → use-mcp-tools-DJGNLf9H.js} +1 -1
- package/dist/client/assets/{use-members-JooO5O_z.js → use-members-CncY3QG2.js} +1 -1
- package/dist/client/assets/{use-mobile-C57pT7o9.js → use-mobile-D8w2xyip.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DVHUkqpb.js → use-navigate-to-agent-YScxPu5L.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C0qPMRhc.js → use-org-auth-client-DjREcL_I.js} +1 -1
- package/dist/client/assets/{use-org-sso-BaYh30WC.js → use-org-sso-diAgeADE.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BG6jMK7e.js → use-organization-roles-BuFi-QNO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DBhnNnJm.js → use-organization-settings-bBY4klS6.js} +1 -1
- package/dist/client/assets/{use-registry-app-Dyfesgrg.js → use-registry-app-Cy7ipz7c.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CTtHQqlB.js → use-registry-connections-BZ0Z0jCg.js} +1 -1
- package/dist/client/assets/{use-secrets-BYzFSfMf.js → use-secrets-q_kPvC5B.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DJxvpKl9.js → use-status-sounds-DG0Zyz9B.js} +1 -1
- package/dist/client/assets/use-t-BjZG1zRp.js +1 -0
- package/dist/client/assets/{use-view-mode-C0yNdLzJ.js → use-view-mode-B02hzmMj.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BtFe5DoR.js → use-virtual-mcp-urYy02xb.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-nK_JPgM8.js +1 -0
- package/dist/client/assets/{useRouterState-C6jzqArr.js → useRouterState-C7tRHRC7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_ObcRUnC.js +1 -0
- package/dist/client/assets/{users-C0dY9LVq.js → users-CZVOiXsq.js} +1 -1
- package/dist/client/assets/{variant-calendar-FpbApEV2.js → variant-calendar-DibyF3zD.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DwdmtuKb.js → view-mode-toggle-DziN7a9n.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +418 -418
- package/dist/server/server.js +288 -288
- package/package.json +1 -1
- package/dist/client/assets/calendar-C9b1I5Xh.js +0 -102
- package/dist/client/assets/index-DxTnZ0Oo.css +0 -1
- package/dist/client/assets/page-seo-sheet-BWnl0tVz.js +0 -1
- package/dist/client/assets/project-app-view-Bsaa-6LK.js +0 -1
- package/dist/client/assets/record-editor-Bjgurgfp.js +0 -1
- package/dist/client/assets/redirect-editor-DnT7ef0C.js +0 -1
- package/dist/client/assets/registry-DHjmo34d.js +0 -2
- package/dist/client/assets/store-registry-C50_5LUp.js +0 -2
- package/dist/client/assets/use-t-BeHordU2.js +0 -1
- package/dist/client/assets/useInfiniteQuery-mNPfD3Pk.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DIVSilzv.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{c as re,r as
|
|
1
|
+
import{c as re,r as q,b as yt,C as He,j as t,B as Z,t as Ie,l as de,K as ut,m as wt,x as ls,u as rs,p as ft,E as as}from"./index-DmhdwAgP.js";import{S as os}from"./search-input-B-RkAjzQ.js";import{P as Le}from"./index-DBhNC4I_.js";import{E as St}from"./empty-state-BHuw6cM9.js";import{R as ns}from"./require-capability-DnfzULDW.js";import{r as _t,m as is,t as cs,v as Mt,w as it,x as Pt,y as pt,z as ds,B as Dt,D as Ut,A as ms,E as us}from"./automation-runs-D8v8nlly.js";import{u as vt}from"./use-connection-DM1ROgj3.js";import{g as Vt}from"./connection-slug-eyAPH6o3.js";import{B as qe}from"./badge-C_9mnuBd.js";import{b as tt,P as st,a as lt}from"./popover-DwV6WXHS.js";import{b as ct,T as dt,a as mt}from"./tooltip-cvFTpZ9W.js";import{i as ht,n as xs}from"./ChevronUp-D5F6V6Tm.js";import{a as ot}from"./Copy01-BkGYkmm-.js";import{n as Lt}from"./Globe01-D3vBqhI7.js";import{i as It}from"./FilterLines-BwWG7tAk.js";import{i as fs}from"./Key01-DhLD806C.js";import{i as ps}from"./Play-B8fWmOst.js";import{aB as hs,W as gs,a0 as js}from"./agent-icon-DicjSkHu.js";import{M as Ft}from"./monaco-editor-DfuNvLfy.js";import{a as vs}from"./use-members-CncY3QG2.js";import{S as Ns,u as bs,W as ys}from"./use-mcp-client-DseZ3Mea.js";import{u as ws}from"./use-virtual-mcp-urYy02xb.js";import{n as rt}from"./Tool02-B0-a0UMl.js";import{c as Ss}from"./SwitchHorizontal01-Rgis0XWf.js";import{s as Is}from"./Plus-2c1jULco.js";import{s as Cs}from"./Trash01-Ba6bCbNY.js";import{I as Qe}from"./input-TkvVVsQL.js";import{M as We}from"./multi-select-DhXl88EK.js";import{a as Xe,b as Ye,c as Ze,d as ge,S as et}from"./select-AzuoAc3H.js";import{t as Kt}from"./ChevronDown-BSRiDjXd.js";import{s as ks}from"./Stars02-B08FvcHQ.js";import{C as Ts}from"./calendar-Bxkf6gvE.js";import{T as _s}from"./textarea-DjtAtA2l.js";import{C as qt}from"./collection-tabs-CIRa_M2W.js";import{S as Ms}from"./switch-DS9vYGS-.js";import{L as Ds}from"./label-CB2o7dZ2.js";import{I as Be}from"./integration-icon-CWb3OXTV.js";import{A as Bt}from"./avatar-BVdHZbMN.js";import{A as Ls,a as Fs,b as Rs}from"./alert-C_4AvGUo.js";import{C as Ht}from"./card-C3gg1LtP.js";import{K as Me}from"./monitoring-stats-row-B43TP1bq.js";import{u as Jt}from"./studio-tools-DIWsVaKg.js";import{u as Os}from"./useSuspenseInfiniteQuery-_ObcRUnC.js";import{o as $s,m as zs,p as As,q as Es}from"./sidebar-DnKMI8jz.js";import{T as Re,a as xt,b as Gt,c as Qt,d as Wt,e as oe}from"./table-DnoPpUup.js";import{u as Ps}from"./use-infinite-scroll-XidGSyic.js";import{c as Us,b as Vs}from"./use-automations-COcieFX-.js";import"./SearchMd-lwIiBODG.js";import"./use-capability-3dRU8tE2.js";import"./access-gate-NCJKEJqO.js";import"./capability-load-error-i6NCyxxk.js";import"./useInfiniteQuery-nK_JPgM8.js";import"./use-clock-tick-BzcS25hV.js";import"./AlertCircle-B9GlbKHh.js";import"./CheckCircle-BEcdXH7-.js";import"./DotsVertical-BmTi7wpl.js";import"./XCircle-C0OdV3N_.js";import"./Stars01-CJsm_THn.js";import"./ChevronRight-YmTewr_B.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DC217syR.js";import"./file-type-icon-BOCZKON3.js";import"./dialog-DUqhzGiD.js";import"./X-Dif5I5BD.js";import"./ZoomOut-BprgOfkE.js";import"./use-mobile-D8w2xyip.js";import"./tab-id-BijBBRwE.js";import"./hooks-DU-2h9eZ.js";import"./decopilot-sse-pool-CEQrv8Fn.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DSveBxCg.js";import"./autosend-BgYoPuWD.js";import"./use-ai-providers-ZLuBEaKb.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CX_EuT5c.js";import"./use-organization-settings-bBY4klS6.js";import"./index-f6gbzJ8b.js";import"./Eye-B-ZfWIGj.js";import"./Star01-DoUbKevt.js";import"./XClose-DomD4542.js";import"./ZapSquare-EvC2T9CP.js";import"./Tool01-BR3IBeV9.js";import"./Monitor01-BOILvS2u.js";import"./Upload01-B14IruoN.js";import"./shell-layout-6KUu0MA6.js";import"./Users03-Bx4g7VTC.js";import"./SearchLg-XmvudKlH.js";import"./Zap-CEUVQQOc.js";import"./use-t-BjZG1zRp.js";import"./required-auth-layout-ABsqitxw.js";import"./use-org-sso-diAgeADE.js";import"./Image01-PIeYnf-K.js";import"./LinkExternal01-DO3QnLus.js";import"./ArrowUpRight-DZZygrAi.js";import"./Palette-CyZvWKmI.js";import"./use-navigate-to-agent-YScxPu5L.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DHN9bK0l.js";import"./form-C9InGmo4.js";import"./use-collections-DaXoNaLL.js";import"./ArrowUp-DNZsq7Zt.js";import"./Settings02-DMpqOK24.js";import"./TrendUp01-CeRF_789.js";import"./Globe04-pvxBukgJ.js";import"./HardDrive-DutZPQFL.js";import"./LayoutLeft-BI-sXAac.js";import"./Sun-nDXz4jeM.js";import"./Package-DbEcG94t.js";import"./Shield01-gTFc9c17.js";import"./User01-ByIE6k8L.js";import"./Users01-BdldAr7H.js";import"./index-DnrPO2j2.js";import"./use-org-auth-client-DjREcL_I.js";import"./auth-CsHQFHV_.js";import"./checkbox-Ba2-hx8r.js";import"./command-3z1R7bvy.js";import"./index-CO3868Cu.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Ks=["eq","contains","exists","in"];function qs(s){return Ks.includes(s)}function Oe(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),r=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${r}`}).join(",")}function Bs(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,r,...o]=e.split(":"),a=l?decodeURIComponent(l):"";if(a.trim())return{key:a,operator:r&&qs(r)?r:"eq",value:decodeURIComponent(o.join(":")||"")}}).filter(e=>e!==void 0)}function nt(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 Rt(s){return s.trim()?s.split(`
|
|
3
|
-
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...r]=e.split("=");return{key:l||"",operator:"eq",value:r.join("=")}}if(e.includes("~")){const[l,...r]=e.split("~");return{key:l||"",operator:"contains",value:r.join("~")}}if(e.includes("@")){const[l,...r]=e.split("@");return{key:l||"",operator:"in",value:r.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Hs(s){const e={},l={},r=[],o={};for(const a of s)if(a.key.trim())switch(a.operator){case"eq":a.value&&(e[a.key]=a.value);break;case"contains":a.value&&(l[a.key]=`%${a.value}%`);break;case"exists":r.push(a.key);break;case"in":a.value&&(o[a.key]=a.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:r.length>0?r:void 0,propertyInValues:Object.keys(o).length>0?o:void 0}}function Ot(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof
|
|
3
|
+
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...r]=e.split("=");return{key:l||"",operator:"eq",value:r.join("=")}}if(e.includes("~")){const[l,...r]=e.split("~");return{key:l||"",operator:"contains",value:r.join("~")}}if(e.includes("@")){const[l,...r]=e.split("@");return{key:l||"",operator:"in",value:r.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Hs(s){const e={},l={},r=[],o={};for(const a of s)if(a.key.trim())switch(a.operator){case"eq":a.value&&(e[a.key]=a.value);break;case"contains":a.value&&(l[a.key]=`%${a.value}%`);break;case"exists":r.push(a.key);break;case"in":a.value&&(o[a.key]=a.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:r.length>0?r:void 0,propertyInValues:Object.keys(o).length>0?o:void 0}}function Ot(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const r=l.length;return r<=Nt.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:r}:{content:l.slice(0,Nt.maxJsonRenderSize)+`
|
|
4
4
|
|
|
5
|
-
... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:l}}function Js(s){const e=re.c(117),{log:l}=s,[r,o]=K.useState(!1),[a,c]=K.useState(!1),i=yt(),{org:n}=He(),d=vt(),h=Ot(l.input),f=Ot(l.output),v=Gs;let N;e[0]!==l.input||e[1]!==l.output?(N=async se=>{const ee=v(se==="input"?l.input:l.output);try{await navigator.clipboard.writeText(ee),se==="input"?(o(!0),setTimeout(()=>o(!1),2e3)):(c(!0),setTimeout(()=>c(!1),2e3))}catch{Ie.error("Failed to copy to clipboard")}},e[0]=l.input,e[1]=l.output,e[2]=N):N=e[2];const u=N;let L;e[3]!==l.id||e[4]!==l.input||e[5]!==l.output||e[6]!==l.toolName?(L=se=>{const ee=v(se==="input"?l.input:l.output),ae=new Blob([ee],{type:"application/json"}),he=URL.createObjectURL(ae),ye=document.createElement("a");ye.href=he,ye.download=`${l.toolName}-${se}-${l.id}.json`,ye.click(),URL.revokeObjectURL(he)},e[3]=l.id,e[4]=l.input,e[5]=l.output,e[6]=l.toolName,e[7]=L):L=e[7];const g=L;let j;e[8]!==d||e[9]!==l.connectionId||e[10]!==l.input||e[11]!==l.toolName||e[12]!==i||e[13]!==n?(j=()=>{const se=d.find(ae=>ae.id===l.connectionId);if(!se){Ie.error("Could not find the connection for this tool call");return}const ee=crypto.randomUUID();sessionStorage.setItem(`replay-${ee}`,JSON.stringify(l.input)),i({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:n.slug,appSlug:Ut(se),collectionName:"tools",itemId:encodeURIComponent(l.toolName)},search:{replayId:ee}})},e[8]=d,e[9]=l.connectionId,e[10]=l.input,e[11]=l.toolName,e[12]=i,e[13]=n,e[14]=j):j=e[14];const m=j,[C,w]=K.useState(!1);let p;e[15]!==l.requestId?(p=async()=>{try{await navigator.clipboard.writeText(l.requestId),w(!0),setTimeout(()=>w(!1),2e3)}catch{Ie.error("Failed to copy to clipboard")}},e[15]=l.requestId,e[16]=p):p=e[16];const T=p;let S;e[17]!==l.timestamp?(S=new Date(l.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[17]=l.timestamp,e[18]=S):S=e[18];const x=S,M="text-sm px-5 md:px-6 py-5 space-y-5";let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[19]=b):b=e[19];let _;e[20]!==x?(_=t.jsxs("div",{children:[b,t.jsx("div",{className:"text-sm text-foreground",children:x})]}),e[20]=x,e[21]=_):_=e[21];let k;e[22]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[22]=k):k=e[22];let $;e[23]!==l.durationMs?($=t.jsxs("div",{children:[k,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[l.durationMs,"ms"]})]}),e[23]=l.durationMs,e[24]=$):$=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[25]=D):D=e[25];let E;e[26]!==l.userName?(E=t.jsxs("div",{children:[D,t.jsx("div",{className:"text-sm text-foreground",children:l.userName})]}),e[26]=l.userName,e[27]=E):E=e[27];let P;e[28]!==l.virtualMcpName?(P=l.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:l.virtualMcpName})]}),e[28]=l.virtualMcpName,e[29]=P):P=e[29];let X;e[30]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[30]=X):X=e[30];let I;e[31]!==l.requestId?(I=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:l.requestId}),e[31]=l.requestId,e[32]=I):I=e[32];let F;e[33]!==C?(F=C?t.jsx(ht,{size:12}):t.jsx(ot,{size:12}),e[33]=C,e[34]=F):F=e[34];let O;e[35]!==T||e[36]!==F?(O=t.jsx(Z,{size:"icon",variant:"ghost",onClick:T,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:F}),e[35]=T,e[36]=F,e[37]=O):O=e[37];let z;e[38]!==I||e[39]!==O?(z=t.jsxs("div",{children:[X,t.jsxs("div",{className:"flex items-center gap-1",children:[I,O]})]}),e[38]=I,e[39]=O,e[40]=z):z=e[40];let A;e[41]!==l.userAgent?(A=l.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:l.userAgent})]}),e[41]=l.userAgent,e[42]=A):A=e[42];let q;e[43]!==l.properties||e[44]!==i||e[45]!==n?(q=l.properties&&Object.keys(l.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(l.properties).map(se=>{const[ee,ae]=se;return t.jsxs(tt,{children:[t.jsx(st,{asChild:!0,children:t.jsxs(Ke,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[ee,"=",ae]})}),t.jsx(lt,{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 he={key:ee,operator:"eq",value:ae};i({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Oe([he])}})},children:[t.jsx(It,{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(`${ee}=${ae}`),Ie.success("Copied filter to clipboard")}catch{Ie.error("Failed to copy to clipboard")}},children:[t.jsx(ot,{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(ee),Ie.success("Copied key to clipboard")}catch{Ie.error("Failed to copy to clipboard")}},children:[t.jsx(fs,{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(ae),Ie.success("Copied value to clipboard")}catch{Ie.error("Failed to copy to clipboard")}},children:[t.jsx(hs,{size:14,className:"mr-2"}),"Copy value"]})]})})]},ee)})})]}),e[43]=l.properties,e[44]=i,e[45]=n,e[46]=q):q=e[46];let B;e[47]!==$||e[48]!==E||e[49]!==P||e[50]!==z||e[51]!==A||e[52]!==q||e[53]!==_?(B=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[_,$,E,P,z,A,q]}),e[47]=$,e[48]=E,e[49]=P,e[50]=z,e[51]=A,e[52]=q,e[53]=_,e[54]=B):B=e[54];let U;e[55]!==l.errorMessage?(U=l.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:l.errorMessage})]}),e[55]=l.errorMessage,e[56]=U):U=e[56];const Y="space-y-4";let H;e[57]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[57]=H):H=e[57];const G=h.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",Tt(h.originalSize)," - truncated)"]});let V;e[58]!==G?(V=t.jsxs("div",{className:"flex items-center gap-2",children:[H,G]}),e[58]=G,e[59]=V):V=e[59];let y;e[60]!==m||e[61]!==l.input?(y=l.input&&t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:m,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(ps,{size:14})})}),t.jsx(mt,{children:"Replay tool call"})]}),e[60]=m,e[61]=l.input,e[62]=y):y=e[62];let R;e[63]!==g||e[64]!==h?(R=h.isTruncated&&t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>g("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Lt,{size:14})})}),t.jsx(mt,{children:"Download full input"})]}),e[63]=g,e[64]=h,e[65]=R):R=e[65];let J;e[66]!==u?(J=()=>u("input"),e[66]=u,e[67]=J):J=e[67];let te;e[68]!==r?(te=r?t.jsx(ht,{size:14}):t.jsx(ot,{size:14}),e[68]=r,e[69]=te):te=e[69];let Q;e[70]!==J||e[71]!==te?(Q=t.jsx(Z,{size:"icon",variant:"ghost",onClick:J,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:te}),e[70]=J,e[71]=te,e[72]=Q):Q=e[72];let le;e[73]!==y||e[74]!==R||e[75]!==Q?(le=t.jsxs("div",{className:"flex items-center gap-1",children:[y,R,Q]}),e[73]=y,e[74]=R,e[75]=Q,e[76]=le):le=e[76];let W;e[77]!==V||e[78]!==le?(W=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[V,le]}),e[77]=V,e[78]=le,e[79]=W):W=e[79];let ne;e[80]!==h?(ne=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Ft,{code:h.content,language:"json",height:"100%",readOnly:!0})}),e[80]=h,e[81]=ne):ne=e[81];let ce;e[82]!==W||e[83]!==ne?(ce=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[W,ne]})}),e[82]=W,e[83]=ne,e[84]=ce):ce=e[84];const $e="rounded-lg overflow-hidden border border-border",Ce="flex items-center justify-between p-1 pl-4 border-b border-border",ke="flex items-center gap-2";let ie;e[85]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[85]=ie):ie=e[85];const Fe=f.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",Tt(f.originalSize)," - truncated)"]});let je;e[86]!==ie||e[87]!==Fe?(je=t.jsxs("div",{className:ke,children:[ie,Fe]}),e[86]=ie,e[87]=Fe,e[88]=je):je=e[88];let ve;e[89]!==g||e[90]!==f.isTruncated?(ve=f.isTruncated&&t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>g("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Lt,{size:14})})}),t.jsx(mt,{children:"Download full output"})]}),e[89]=g,e[90]=f.isTruncated,e[91]=ve):ve=e[91];let Ne;e[92]!==u?(Ne=()=>u("output"),e[92]=u,e[93]=Ne):Ne=e[93];let me;e[94]!==a?(me=a?t.jsx(ht,{size:14}):t.jsx(ot,{size:14}),e[94]=a,e[95]=me):me=e[95];let be;e[96]!==Ne||e[97]!==me?(be=t.jsx(Z,{size:"icon",variant:"ghost",onClick:Ne,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:me}),e[96]=Ne,e[97]=me,e[98]=be):be=e[98];let ue;e[99]!==ve||e[100]!==be?(ue=t.jsxs("div",{className:"flex items-center gap-1",children:[ve,be]}),e[99]=ve,e[100]=be,e[101]=ue):ue=e[101];let xe;e[102]!==je||e[103]!==ue?(xe=t.jsxs("div",{className:Ce,children:[je,ue]}),e[102]=je,e[103]=ue,e[104]=xe):xe=e[104];let fe;e[105]!==f.content?(fe=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Ft,{code:f.content,language:"json",height:"100%",readOnly:!0})}),e[105]=f.content,e[106]=fe):fe=e[106];let pe;e[107]!==xe||e[108]!==fe?(pe=t.jsx("div",{children:t.jsxs("div",{className:$e,children:[xe,fe]})}),e[107]=xe,e[108]=fe,e[109]=pe):pe=e[109];let _e;e[110]!==ce||e[111]!==pe?(_e=t.jsxs("div",{className:Y,children:[ce,pe]}),e[110]=ce,e[111]=pe,e[112]=_e):_e=e[112];let Se;return e[113]!==B||e[114]!==U||e[115]!==_e?(Se=t.jsxs("div",{className:M,children:[B,U,_e]}),e[113]=B,e[114]=U,e[115]=_e,e[116]=Se):Se=e[116],Se}function Gs(s){return JSON.stringify(s,null,2)}const Xt=/^now(?:-(\d+)([mhdwM]))?$/,Qs={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Yt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const l=e.match(Xt);if(!l)return null;const r=l[1]?Number.parseInt(l[1],10):0,o=l[2]||null;return{isNow:!0,offset:r,unit:o}}function we(s){const e=s.trim(),l=new Date(e);if(!Number.isNaN(l.getTime())&&e.includes("-"))return{valid:!0,date:l};const r=Yt(e);if(!r)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const o=new Date,a=new Date(o);if(r.offset===0||!r.unit)return{valid:!0,date:a};switch(r.unit){case"m":a.setMinutes(a.getMinutes()-r.offset);break;case"h":a.setHours(a.getHours()-r.offset);break;case"d":a.setDate(a.getDate()-r.offset);break;case"w":a.setDate(a.getDate()-r.offset*7);break;case"M":a.setMonth(a.getMonth()-r.offset);break}return{valid:!0,date:a}}function Ws(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Zt(s){const e=s.trim();return Xt.test(e)}function $t(s){const e=s.trim();if(e==="now")return"Now";const l=Yt(e);if(!l||!l.unit){const a=we(e);return a.valid&&a.date?Ws(a.date):e}const r=Qs[l.unit],o=l.offset!==1?"s":"";return`${l.offset} ${r}${o} ago`}const es=[{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 Xs(s,e){const l=es.find(r=>r.from===s&&r.to===e);return l?l.label:`${$t(s)} to ${$t(e)}`}function Ge(s){const e=s.getFullYear(),l=String(s.getMonth()+1).padStart(2,"0"),r=String(s.getDate()).padStart(2,"0"),o=String(s.getHours()).padStart(2,"0"),a=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${e}-${l}-${r} ${o}:${a}:${c}`}function Ys(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,l,r,o,a,c,i]=e,n=new Date(Number(l),Number(r)-1,Number(o),Number(a),Number(c),Number(i));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Zt(s))return s;const e=we(s);return e.valid&&e.date?Ge(e.date):s}function zt({value:s,onChange:e,placeholder:l="now or now-2d",className:r,disabled:o,error:a}){const[c,i]=K.useState(!1),[n,d]=K.useState(()=>gt(s)),[h,f]=K.useState(),[v,N]=K.useState(!1),u=K.useRef(s);u.current!==s&&(u.current=s,v||d(gt(s)));const L=x=>{const M=x.target.value;d(M),f(void 0)},g=()=>{N(!0)},j=()=>{N(!1);const x=n.trim();if(Zt(x)){f(void 0),e(x);return}const M=Ys(x);if(M){f(void 0),e(M.toISOString()),d(Ge(M));return}const b=we(x);if(b.valid&&b.date){f(void 0),e(x),d(Ge(b.date));return}d(gt(s)),f(void 0)},m=x=>{if(x){const b=we(s).date||new Date;x.setHours(b.getHours()),x.setMinutes(b.getMinutes()),x.setSeconds(0),x.setMilliseconds(0);const _=x.toISOString();d(Ge(x)),e(_),f(void 0)}i(!1)},C=x=>{const[M,b]=x.target.value.split(":").map(Number),k=we(s).date||new Date;k.setHours(M||0),k.setMinutes(b||0),k.setSeconds(0),k.setMilliseconds(0);const $=k.toISOString();d(Ge(k)),e($)},w=we(s),p=w.valid?w.date:new Date,T=p?`${String(p.getHours()).padStart(2,"0")}:${String(p.getMinutes()).padStart(2,"0")}`:"",S=a||h;return t.jsxs("div",{className:de("flex gap-1",r),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Qe,{value:n,onChange:L,onFocus:g,onBlur:j,placeholder:l,disabled:o,className:de("text-sm h-8",S&&"border-destructive focus-visible:ring-destructive")}),S&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:S})]}),t.jsxs(tt,{open:c,onOpenChange:i,children:[t.jsx(st,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:o,children:t.jsx(gs,{className:"h-4 w-4"})})}),t.jsxs(lt,{className:"w-auto p-0",align:"end",children:[t.jsx(_s,{mode:"single",selected:p||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:C,className:"text-sm h-8"})]})]})]})]})}function Zs({value:s,onChange:e,className:l,disabled:r,quickRanges:o=es}){const[a,c]=K.useState(!1),[i,n]=K.useState(s.from),[d,h]=K.useState(s.to),[f,v]=K.useState(null),N=K.useRef({from:s.from,to:s.to});(N.current.from!==s.from||N.current.to!==s.to)&&(N.current={from:s.from,to:s.to},n(s.from),h(s.to));const u=m=>{N.current={from:m.from,to:m.to},n(m.from),h(m.to),c(!1),e({from:m.from,to:m.to})},L=()=>{const m=we(i),C=we(d);if(!m.valid||!m.date){v("Invalid 'From' date");return}if(!C.valid||!C.date){v("Invalid 'To' date");return}if(m.date>=C.date){v("'From' must be before 'To'");return}v(null),e({from:i,to:d}),c(!1)},g=m=>s.from===m.from&&s.to===m.to,j=Xs(s.from,s.to);return t.jsxs(tt,{open:a,onOpenChange:c,children:[t.jsx(st,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:de("gap-1.5 min-w-[160px] justify-between",l),disabled:r,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ks,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:j})]}),t.jsx(qt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(lt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:m=>m.preventDefault(),style:a?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:d,onChange:h,placeholder:"now"})]}),f&&t.jsx("p",{className:"text-xs text-destructive",children:f}),t.jsx(Z,{onClick:L,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(is,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:o.map(m=>{const C=g(m);return t.jsx("button",{type:"button",onClick:()=>u(m),className:de("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",C&&"bg-accent text-accent-foreground font-medium"),children:m.label},m.value)})})})})]})})]})}const ts="decopilot";async function ss(s,e){return await s.call("MONITORING_STATS",e)}function el(s,e){const l=re.c(12),{org:r}=He(),o=Jt();let a,c,i;l[0]!==r.id||l[1]!==s?(i={...s,excludeConnectionIds:[ts,...s.excludeConnectionIds??[]]},c=wt,a=ut.monitoringStatsToolCalls(r.id,JSON.stringify(i)),l[0]=r.id,l[1]=s,l[2]=a,l[3]=c,l[4]=i):(a=l[2],c=l[3],i=l[4]);let n;l[5]!==o||l[6]!==i?(n=()=>ss(o,i),l[5]=o,l[6]=i,l[7]=n):n=l[7];let d;return l[8]!==e||l[9]!==a||l[10]!==n?(d={queryKey:a,queryFn:n,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=a,l[10]=n,l[11]=d):d=l[11],c(d)}function tl(s,e){const l=re.c(12),{org:r}=He(),o=Jt();let a,c,i;l[0]!==r.id||l[1]!==s?(i={...s,connectionIds:[ts],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},c=wt,a=ut.monitoringStatsLlm(r.id,JSON.stringify(i)),l[0]=r.id,l[1]=s,l[2]=a,l[3]=c,l[4]=i):(a=l[2],c=l[3],i=l[4]);let n;l[5]!==o||l[6]!==i?(n=()=>ss(o,i),l[5]=o,l[6]=i,l[7]=n):n=l[7];let d;return l[8]!==e||l[9]!==a||l[10]!==n?(d={queryKey:a,queryFn:n,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=a,l[10]=n,l[11]=d):d=l[11],c(d)}function De(s){const e=re.c(20),{title:l,value:r,action:o,children:a,className:c}=s;let i;e[0]!==c?(i=de("pt-4 px-4 pb-6 gap-8",c),e[0]=c,e[1]=i):i=e[1];let n;e[2]!==l?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:l}),e[2]=l,e[3]=n):n=e[3];let d;e[4]!==r?(d=t.jsx("span",{className:"text-4xl font-normal",children:r}),e[4]=r,e[5]=d):d=e[5];let h;e[6]!==n||e[7]!==d?(h=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,d]}),e[6]=n,e[7]=d,e[8]=h):h=e[8];let f;e[9]!==o?(f=o&&t.jsx("div",{className:"shrink-0",children:o}),e[9]=o,e[10]=f):f=e[10];let v;e[11]!==h||e[12]!==f?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[h,f]}),e[11]=h,e[12]=f,e[13]=v):v=e[13];let N;e[14]!==a?(N=a&&t.jsx("div",{className:"flex flex-col gap-6",children:a}),e[14]=a,e[15]=N):N=e[15];let u;return e[16]!==i||e[17]!==v||e[18]!==N?(u=t.jsxs(Ht,{className:i,children:[v,N]}),e[16]=i,e[17]=v,e[18]=N,e[19]=u):u=e[19],u}function jt(s){const e=re.c(14),{metrics:l,connections:r,mode:o,total:a}=s,{org:c}=He(),i=yt();let n,d,h;if(e[0]!==r||e[1]!==l||e[2]!==o||e[3]!==i||e[4]!==c||e[5]!==a){h=Symbol.for("react.early_return_sentinel");e:{const v=r??[],N=new Map(l.map(ll));let u;e[9]!==o?(u=(g,j)=>{const m=Dt(g.metric,o);return Dt(j.metric,o)-m},e[9]=o,e[10]=u):u=e[10];const L=v.map(g=>({connection:g,metric:N.get(g.id)})).filter(sl).sort(u).slice(0,4);if(L.length===0){h=null;break e}n="flex flex-col",d=L.map((g,j)=>{const{connection:m,metric:C}=g,w=a>0?(C.calls/a*100).toFixed(1):"0.0",p=o==="errors"?`${C.errorRate.toFixed(1)}%`:`${w}%`,T=j===L.length-1;return t.jsxs("div",{className:de("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:c.slug,appSlug:Ut(m)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(Be,{icon:m.icon,name:m.title,size:"xs",fallbackIcon:t.jsx(rt,{}),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:p}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:ds(C,o)})]})]},m.id)})}e[0]=r,e[1]=l,e[2]=o,e[3]=i,e[4]=c,e[5]=a,e[6]=n,e[7]=d,e[8]=h}else n=e[6],d=e[7],h=e[8];if(h!==Symbol.for("react.early_return_sentinel"))return h;let f;return e[11]!==n||e[12]!==d?(f=t.jsx("div",{className:n,children:d}),e[11]=n,e[12]=d,e[13]=f):f=e[13],f}function sl(s){return s.metric}function ll(s){return[s.connectionId,s]}const At=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Et(s){let e=0;for(let l=0;l<s.length;l++)e=e*31+s.charCodeAt(l)>>>0;return At[e%At.length]}function Je(s){const e=re.c(21),{models:l,mode:r}=s,o=r===void 0?"calls":r;if(l.length===0)return null;let a;e[0]!==o?(a=u=>o==="tokens"?(u.inputTokens??0)+(u.outputTokens??0):o==="cost"?u.costUsd??0:u.calls,e[0]=o,e[1]=a):a=e[1];const c=a;let i;e[2]!==o?(i=u=>o==="cost"?Pt(u):o==="tokens"?it(u):u.toLocaleString(),e[2]=o,e[3]=i):i=e[3];const n=i;let d;e[4]!==c?(d=(u,L)=>u+c(L),e[4]=c,e[5]=d):d=e[5];const h=l.reduce(d,0);let f,v;if(e[6]!==n||e[7]!==l||e[8]!==h||e[9]!==c){let u;e[12]!==c?(u=(j,m)=>c(m)-c(j),e[12]=c,e[13]=u):u=e[13];const L=[...l].sort(u).slice(0,4);f="flex flex-col";let g;e[14]!==n||e[15]!==h||e[16]!==c?(g=(j,m,C)=>{const w=c(j),p=h>0?(w/h*100).toFixed(1):"0.0",T=m===C.length-1;return t.jsxs("div",{className:de("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(j.toolName)} 18%, transparent)`},children:t.jsx(rt,{size:14,style:{color:Et(j.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:j.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:[p,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(w)})]})]},j.toolName)},e[14]=n,e[15]=h,e[16]=c,e[17]=g):g=e[17],v=L.map(g),e[6]=n,e[7]=l,e[8]=h,e[9]=c,e[10]=f,e[11]=v}else f=e[10],v=e[11];let N;return e[18]!==f||e[19]!==v?(N=t.jsx("div",{className:f,children:v}),e[18]=f,e[19]=v,e[20]=N):N=e[20],N}function rl(s){const e=re.c(48),{displayDateRange:l,connectionIds:r,excludeConnectionIds:o,toolName:a,status:c,connections:i,isStreaming:n,streamingRefetchInterval:d,llmUserIds:h}=s,f=cs(l),v=n?d:!1;let N;e[0]!==v?(N={refetchInterval:v},e[0]=v,e[1]=N):N=e[1];const{data:u,isError:L}=el({interval:f,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),connectionIds:r.length>0?r:void 0,excludeConnectionIds:o,toolNames:a?[a]:void 0,status:c},N);let g;e[2]!==v?(g={refetchInterval:v},e[2]=v,e[3]=g):g=e[3];const{data:j,isError:m}=tl({interval:f,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),userIds:h?.length?h:void 0},g),C=L||m,w=u?{totalCalls:u.totalCalls,totalErrors:u.totalErrors,avgDurationMs:u.avgDurationMs,p95DurationMs:u.p95DurationMs,data:Mt(u.timeseries,l,f)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},p=j?{totalCalls:j.totalCalls,totalErrors:j.totalErrors,avgDurationMs:j.avgDurationMs,p95DurationMs:j.p95DurationMs,data:Mt(j.timeseries,l,f)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let T;e[4]!==j?.topTools?(T=j?.topTools??[],e[4]=j?.topTools,e[5]=T):T=e[5];const S=T,x=j?.totalInputTokens??0,M=j?.totalOutputTokens??0,b=j?.totalTokens??0,_=j?.totalCostUsd??0;let k;e[6]!==u?.connectionBreakdown?(k=u?.connectionBreakdown??[],e[6]=u?.connectionBreakdown,e[7]=k):k=e[7];const $=k,[D,E]=K.useState("avg");let P;e[8]!==C?(P=C&&t.jsxs(Ls,{variant:"destructive",children:[t.jsx(ls,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Fs,{children:"Failed to load monitoring data"}),t.jsx(Rs,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=C,e[9]=P):P=e[9];let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=ce=>E(ce),e[10]=X):X=e[10];let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Xe,{className:"w-[120px]",children:t.jsx(Ye,{})}),e[11]=I):I=e[11];let F;e[12]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsxs(Ze,{children:[t.jsx(ge,{value:"avg",children:"Avg"}),t.jsx(ge,{value:"p95",children:"P95"})]}),e[12]=F):F=e[12];let O;e[13]!==D?(O=t.jsxs(et,{value:D,onValueChange:X,children:[I,F]}),e[13]=D,e[14]=O):O=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 A;e[16]!==S?(A=t.jsx(Je,{models:S,mode:"calls"}),e[16]=S,e[17]=A):A=e[17];let q;e[18]!==b?(q=it(b),e[18]=b,e[19]=q):q=e[19];let B;e[20]!==x?(B=it(x),e[20]=x,e[21]=B):B=e[21];let U;e[22]!==M?(U=it(M),e[22]=M,e[23]=U):U=e[23];let Y;e[24]!==B||e[25]!==U?(Y=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[B," in ·"," ",U," out"]}),e[24]=B,e[25]=U,e[26]=Y):Y=e[26];let H;e[27]!==S?(H=t.jsx(Je,{models:S,mode:"tokens"}),e[27]=S,e[28]=H):H=e[28];let G;e[29]!==_?(G=_>0?Pt(_):"—",e[29]=_,e[30]=G):G=e[30];let V;e[31]!==_?(V=_===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=_,e[32]=V):V=e[32];let y;e[33]!==S||e[34]!==_?(y=_>0?t.jsx(Je,{models:S,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]=S,e[34]=_,e[35]=y):y=e[35];let R;e[36]!==S?(R=t.jsx(Je,{models:S,mode:"calls"}),e[36]=S,e[37]=R):R=e[37];const J=De,te="AI Errors",Q=p.totalErrors.toLocaleString();let le;e[38]!==p.data?(le=t.jsx(Me,{data:p.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"AI errors over time"}),e[38]=p.data,e[39]=le):le=e[39];let W;e[40]!==S||e[41]!==p.totalErrors?(W=p.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(Je,{models:S,mode:"calls"}),e[40]=S,e[41]=p.totalErrors,e[42]=W):W=e[42];let ne;return e[43]!==J||e[44]!==Q||e[45]!==le||e[46]!==W?(ne=t.jsxs(J,{title:te,value:Q,children:[le,W]}),e[43]=J,e[44]=Q,e[45]=le,e[46]=W,e[47]=ne):ne=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:[P,t.jsxs(De,{title:"Tool Calls",value:w.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:w.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:"Tool calls over time"}),t.jsx(jt,{metrics:$,connections:i,mode:"requests",total:w.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(De,{title:"Latency",value:pt(D==="avg"?w.avgDurationMs:w.p95DurationMs),action:O,children:[t.jsx(Me,{data:w.data,dataKey:D,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:`${D==="avg"?"Average":"P95"} latency over time`}),t.jsx(jt,{metrics:$,connections:i,mode:"latency",total:w.totalCalls})]}),t.jsxs(De,{title:"Errors",value:w.totalErrors.toLocaleString(),children:[t.jsx(Me,{data:w.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:"Errors over time"}),w.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:$,connections:i,mode:"errors",total:w.totalErrors})]})]}),z,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(De,{title:"AI Calls",value:p.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:p.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"AI calls over time"}),A]}),t.jsxs(De,{title:"Tokens",value:q,action:Y,children:[t.jsx(Me,{data:p.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"Total tokens over time"}),H]}),t.jsxs(De,{title:"Cost",value:G,action:V,children:[t.jsx(Me,{data:p.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"Cost over time"}),y]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(De,{title:"AI Latency",value:pt(p.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(p.p95DurationMs)]}),children:[t.jsx(Me,{data:p.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"AI latency over time"}),R]}),ne]})]})}function qe(s){const e=re.c(8),{className:l}=s;let r;e[0]!==l?(r=de("pt-4 px-4 pb-6 gap-8",l),e[0]=l,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=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]=o):o=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=a):a=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=Array.from({length:4}).map(al),e[4]=c):c=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex flex-col gap-6",children:[a,t.jsxs("div",{className:"flex flex-col",children:[c,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]!==r?(n=t.jsxs(Ht,{className:r,children:[o,i]}),e[6]=r,e[7]=n):n=e[7],n}function al(s,e){return t.jsxs("div",{className:de("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 ol(){const s=re.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(qe,{}),s[0]=e):e=s[0];let l,r;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(qe,{}),t.jsx(qe,{})]}),r=t.jsx("div",{className:"border-t border-border"}),s[1]=l,s[2]=r):(l=s[1],r=s[2]);let o;return s[3]===Symbol.for("react.memo_cache_sentinel")?(o=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,l,r,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(qe,{}),t.jsx(qe,{}),t.jsx(qe,{})]})]}),s[3]=o):o=s[3],o}function nl(s){const e=re.c(46),{log:l,connection:r,virtualMcpName:o,virtualMcpIcon:a,onClick:c,lastLogRef:i}=s;let n,d;if(e[0]!==l.timestamp){const D=new Date(l.timestamp);n=D.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=D.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=l.timestamp,e[1]=n,e[2]=d}else n=e[1],d=e[2];const h=d,f=r?.icon||null,v=r?.title??l.connectionId;let N;e[3]!==f||e[4]!==v?(N=t.jsx(Re,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(Be,{icon:f,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=f,e[4]=v,e[5]=N):N=e[5];let u;e[6]!==l.toolName?(u=t.jsx("div",{className:"font-medium text-foreground truncate block",children:l.toolName}),e[6]=l.toolName,e[7]=u):u=e[7];const L=r?.title??l.connectionId;let g;e[8]!==L?(g=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:L}),e[8]=L,e[9]=g):g=e[9];let j;e[10]!==u||e[11]!==g?(j=t.jsxs(Re,{className:"min-w-0 pr-2 md:pr-4",children:[u,g]}),e[10]=u,e[11]=g,e[12]=j):j=e[12];let m;e[13]!==a||e[14]!==o?(m=t.jsx(Re,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:o?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(Be,{icon:a,name:o,size:"xs",fallbackIcon:t.jsx(rt,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:o})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=a,e[14]=o,e[15]=m):m=e[15];let C;e[16]!==l.userImage||e[17]!==l.userName?(C=t.jsx(Bt,{url:l.userImage,fallback:l.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=l.userImage,e[17]=l.userName,e[18]=C):C=e[18];let w;e[19]!==l.userName?(w=t.jsx("span",{className:"truncate",children:l.userName}),e[19]=l.userName,e[20]=w):w=e[20];let p;e[21]!==C||e[22]!==w?(p=t.jsx(Re,{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:[C,w]})}),e[21]=C,e[22]=w,e[23]=p):p=e[23];let T;e[24]!==n?(T=t.jsx("div",{children:n}),e[24]=n,e[25]=T):T=e[25];let S;e[26]!==h?(S=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:h}),e[26]=h,e[27]=S):S=e[27];let x;e[28]!==T||e[29]!==S?(x=t.jsxs(Re,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[T,S]}),e[28]=T,e[29]=S,e[30]=x):x=e[30];let M;e[31]!==l.durationMs?(M=t.jsxs(Re,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[l.durationMs,"ms"]}),e[31]=l.durationMs,e[32]=M):M=e[32];const b=l.isError?"destructive":"success",_=l.isError?"Error":"OK";let k;e[33]!==b||e[34]!==_?(k=t.jsx(Re,{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(Ke,{variant:b,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:_})})}),e[33]=b,e[34]=_,e[35]=k):k=e[35];let $;return e[36]!==i||e[37]!==c||e[38]!==p||e[39]!==x||e[40]!==M||e[41]!==k||e[42]!==N||e[43]!==j||e[44]!==m?($=t.jsxs(xt,{ref:i,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:c,children:[N,j,m,p,x,M,k]}),e[36]=i,e[37]=c,e[38]=p,e[39]=x,e[40]=M,e[41]=k,e[42]=N,e[43]=j,e[44]=m,e[45]=$):$=e[45],$}function il(s){const e=re.c(26),{connectionIds:l,virtualMcpIds:r,tool:o,status:a,search:c,logs:i,hasMore:n,onLoadMore:d,isLoadingMore:h,connections:f,virtualMcps:v,membersData:N,client:u}=s,L=f??[],g=v??[],[j,m]=K.useState(null),C=Ps(d,n,h),w=Vt(N),p=new Map(w.map(ul)),T=new Map(g.map(ml));let x=i.map(y=>{const R=p.get(y.userId??""),J=y.virtualMcpId?T.get(y.virtualMcpId):null;return{...y,userName:R?.name??y.userId??"Unknown",userImage:R?.image??void 0,virtualMcpName:J?.title??null,virtualMcpIcon:J?.icon??null}});if(l.length>1){let y;e[0]!==l?(y=R=>l.includes(R.connectionId),e[0]=l,e[1]=y):y=e[1],x=x.filter(y)}if(r.length>1){let y;e[2]!==r?(y=R=>R.virtualMcpId&&r.includes(R.virtualMcpId),e[2]=r,e[3]=y):y=e[3],x=x.filter(y)}const M=new Map(L.map(dl));if(c){const y=c.toLowerCase();x=x.filter(R=>R.toolName.toLowerCase().includes(y)||(M.get(R.connectionId)?.title??R.connectionId).toLowerCase().includes(y)||R.errorMessage?.toLowerCase().includes(y))}const b=j!==null?x[j]??null:null,_=wt({queryKey:ut.monitoringLogDetail(b?.id??""),queryFn:async()=>{if(!u)throw new Error("MCP client is not available");const y=await u.callTool({name:"MONITORING_LOG_GET",arguments:{id:b.id}});return y.structuredContent??y},enabled:b!==null}),k=_.data?.log,$=b&&k?{...b,input:k.input,output:k.output}:b;if(x.length===0){let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=y):y=e[4];const R=c||l.length>0||r.length>0||o||a!=="all"?"No logs match your filters":"No logs found in this time range";let J;return e[5]!==R?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(St,{image:y,title:"No logs found",description:R})}),e[5]=R,e[6]=J):J=e[6],J}const D="flex-1 flex flex-col min-w-0",E="flex-1 min-w-0 pt-1",P="min-w-[600px] md:min-w-0",X=Qt,I="w-full border-collapse";let F;e[7]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(xt,{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]=F):F=e[7];const O=Gt,z=x.map((y,R)=>t.jsx(nl,{log:y,connection:M.get(y.connectionId),virtualMcpName:y.virtualMcpName??"",virtualMcpIcon:y.virtualMcpIcon,onClick:()=>m(R),lastLogRef:R===x.length-1?C:void 0},y.id));let A;e[8]!==O||e[9]!==z?(A=t.jsx(O,{children:z}),e[8]=O,e[9]=z,e[10]=A):A=e[10];let q;e[11]!==X||e[12]!==F||e[13]!==A?(q=t.jsx("div",{className:E,children:t.jsx("div",{className:P,children:t.jsxs(X,{className:I,children:[F,A]})})}),e[11]=X,e[12]=F,e[13]=A,e[14]=q):q=e[14];const B=j!==null;let U;e[15]!==m?(U=y=>{y||m(null)},e[15]=m,e[16]=U):U=e[16];const Y=b&&j!==null&&t.jsxs(t.Fragment,{children:[t.jsx($s,{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(Be,{icon:M.get(b.connectionId)?.icon||null,name:M.get(b.connectionId)?.title??b.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(zs,{className:"text-sm leading-snug truncate",children:b.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:M.get(b.connectionId)?.title??b.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(cl),disabled:j===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(xs,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(y=>y!==null&&y<x.length-1?y+1:y),disabled:j===x.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(qt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:_.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"})}):_.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:()=>_.refetch(),children:"Retry"})]}):t.jsx(Js,{log:$})})]});let H;e[17]!==Y?(H=t.jsx(As,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:Y}),e[17]=Y,e[18]=H):H=e[18];let G;e[19]!==U||e[20]!==H||e[21]!==B?(G=t.jsx(Es,{open:B,onOpenChange:U,children:H}),e[19]=U,e[20]=H,e[21]=B,e[22]=G):G=e[22];let V;return e[23]!==G||e[24]!==q?(V=t.jsxs("div",{className:D,children:[q,G]}),e[23]=G,e[24]=q,e[25]=V):V=e[25],V}function cl(s){return s!==null&&s>0?s-1:s}function dl(s){return[s.id,s]}function ml(s){return[s.id,s]}function ul(s){return[s.userId,s.user]}function xl(){const s=re.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 l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=s[1];let r;s[2]===Symbol.for("react.memo_cache_sentinel")?(r=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]=r):r=s[2];let o;s[3]===Symbol.for("react.memo_cache_sentinel")?(o=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]=o):o=s[3];let a;s[4]===Symbol.for("react.memo_cache_sentinel")?(a=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]=a):a=s[4];let c;s[5]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=s[5];let i;s[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(xt,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,l,r,o,a,c,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(Gt,{children:Array.from({length:8}).map(fl)})]})})}),s[7]=n):n=s[7],n}function fl(s,e){return t.jsxs(xt,{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 bt=Object.assign(il,{Skeleton:xl});function pl(s){const e=re.c(34),{client:l,locator:r,baseParams:o,pageSize:a,isStreaming:c,streamingRefetchInterval:i,connectionIds:n,virtualMcpIds:d,tool:h,status:f,searchQuery:v,allConnections:N,allVirtualMcps:u,membersData:L}=s;let g;e[0]!==o||e[1]!==r?(g=ut.monitoringLogsInfinite(r,JSON.stringify(o)),e[0]=o,e[1]=r,e[2]=g):g=e[2];let j;e[3]!==o||e[4]!==l||e[5]!==a?(j=async E=>{const{pageParam:P}=E,X=P===void 0?0:P;if(!l)throw new Error("MCP client is not available");const I=await l.callTool({name:"MONITORING_LOGS_LIST",arguments:{...o,limit:a,offset:X}});return I.structuredContent??I},e[3]=o,e[4]=l,e[5]=a,e[6]=j):j=e[6];let m;e[7]!==a?(m=(E,P)=>{if(!((E?.logs?.length??0)<a))return P.length*a},e[7]=a,e[8]=m):m=e[8];const C=c?i:!1;let w;e[9]!==g||e[10]!==j||e[11]!==m||e[12]!==C?(w={queryKey:g,queryFn:j,initialPageParam:0,getNextPageParam:m,staleTime:0,refetchInterval:C},e[9]=g,e[10]=j,e[11]=m,e[12]=C,e[13]=w):w=e[13];const{data:p,fetchNextPage:T,hasNextPage:S,isFetchingNextPage:x}=Os(w);let M;e[14]!==p.pages?(M=p.pages.flatMap(hl),e[14]=p.pages,e[15]=M):M=e[15];const b=M;let _;e[16]!==T||e[17]!==S||e[18]!==x?(_=()=>{S&&!x&&T()},e[16]=T,e[17]=S,e[18]=x,e[19]=_):_=e[19];const k=_,$=S??!1;let D;return e[20]!==N||e[21]!==u||e[22]!==l||e[23]!==n||e[24]!==k||e[25]!==x||e[26]!==L||e[27]!==b||e[28]!==v||e[29]!==f||e[30]!==$||e[31]!==h||e[32]!==d?(D=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(bt,{connectionIds:n,virtualMcpIds:d,tool:h,status:f,search:v,logs:b,hasMore:$,onLoadMore:k,isLoadingMore:x,connections:N,virtualMcps:u,membersData:L,client:l})})})}),e[20]=N,e[21]=u,e[22]=l,e[23]=n,e[24]=k,e[25]=x,e[26]=L,e[27]=b,e[28]=v,e[29]=f,e[30]=$,e[31]=h,e[32]=d,e[33]=D):D=e[33],D}function hl(s){return s.logs??[]}function gl(s){const e=re.c(43),{filterAgentIds:l,filterUserIds:r,filterStatus:o,virtualMcpOptions:a,memberOptions:c,activeFiltersCount:i,onUpdateFilters:n}=s,[d,h]=K.useState(!1);let f,v;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(It,{size:16}),v=t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),e[0]=f,e[1]=v):(f=e[0],v=e[1]);let N;e[2]!==i?(N=i>0&&t.jsxs(t.Fragment,{children:[t.jsx(Ke,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:i}),t.jsx(Ke,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:i})]}),e[2]=i,e[3]=N):N=e[3];let u;e[4]!==N?(u=t.jsx(st,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[f,v,N]})}),e[4]=N,e[5]=u):u=e[5];let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("h4",{className:"font-medium text-sm",children:"Filter Chats"}),e[6]=L):L=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agent"}),e[7]=g):g=e[7];let j;e[8]!==n?(j=E=>n({filterAgentIds:E.slice(0,1)}),e[8]=n,e[9]=j):j=e[9];let m;e[10]!==l||e[11]!==j||e[12]!==a?(m=t.jsxs("div",{children:[g,t.jsx(We,{options:a,defaultValue:l,onValueChange:j,placeholder:"All agents",variant:"secondary",className:"w-full",maxCount:1})]}),e[10]=l,e[11]=j,e[12]=a,e[13]=m):m=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"User"}),e[14]=C):C=e[14];let w;e[15]!==n?(w=E=>n({filterUserIds:E.slice(0,1)}),e[15]=n,e[16]=w):w=e[16];let p;e[17]!==r||e[18]!==c||e[19]!==w?(p=t.jsxs("div",{children:[C,t.jsx(We,{options:c,defaultValue:r,onValueChange:w,placeholder:"All users",variant:"secondary",className:"w-full",maxCount:1})]}),e[17]=r,e[18]=c,e[19]=w,e[20]=p):p=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),e[21]=T):T=e[21];let S;e[22]!==n?(S=E=>n({filterStatus:E}),e[22]=n,e[23]=S):S=e[23];let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Xe,{className:"w-full",children:t.jsx(Ye,{})}),e[24]=x):x=e[24];let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsxs(Ze,{children:[t.jsx(ge,{value:"all",children:"All statuses"}),t.jsx(ge,{value:"completed",children:"Completed"}),t.jsx(ge,{value:"active",children:"Active"}),t.jsx(ge,{value:"failed",children:"Failed"})]}),e[25]=M):M=e[25];let b;e[26]!==o||e[27]!==S?(b=t.jsxs("div",{children:[T,t.jsxs(et,{value:o,onValueChange:S,children:[x,M]})]}),e[26]=o,e[27]=S,e[28]=b):b=e[28];let _;e[29]!==p||e[30]!==b||e[31]!==m?(_=t.jsxs("div",{className:"space-y-3",children:[m,p,b]}),e[29]=p,e[30]=b,e[31]=m,e[32]=_):_=e[32];let k;e[33]!==i||e[34]!==n?(k=i>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{n({filterAgentIds:[],filterUserIds:[],filterStatus:"all"}),h(!1)},children:"Clear all filters"}),e[33]=i,e[34]=n,e[35]=k):k=e[35];let $;e[36]!==_||e[37]!==k?($=t.jsx(lt,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[L,_,k]})}),e[36]=_,e[37]=k,e[38]=$):$=e[38];let D;return e[39]!==d||e[40]!==$||e[41]!==u?(D=t.jsxs(tt,{open:d,onOpenChange:h,children:[u,$]}),e[39]=d,e[40]=$,e[41]=u,e[42]=D):D=e[42],D}function jl(s){const e=re.c(15),{dateRange:l}=s,{data:r,isLoading:o}=Vs(void 0);let a;e[0]!==r?(a=r===void 0?[]:r,e[0]=r,e[1]=a):a=e[1];const c=a,[i,n]=K.useState(null),d=i??c[0]?.id??null,{data:h}=Us(d??"");let f;e[2]!==l.startDate?(f=l.startDate.toISOString(),e[2]=l.startDate,e[3]=f):f=e[3];let v;e[4]!==l.endDate?(v=l.endDate.toISOString(),e[4]=l.endDate,e[5]=v):v=e[5];let N;e[6]!==f||e[7]!==v?(N={startDate:f,endDate:v},e[6]=f,e[7]=v,e[8]=N):N=e[8];const u=N;let L;return e[9]!==h||e[10]!==c||e[11]!==d||e[12]!==o||e[13]!==u?(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:o?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):c.length===0?t.jsx("div",{className:"py-16",children:t.jsx(St,{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(et,{value:d??"",onValueChange:g=>n(g),children:[t.jsx(Xe,{className:"w-72",children:t.jsx(Ye,{placeholder:"Select an automation…"})}),t.jsx(Ze,{children:c.map(Nl)})]})}),h?t.jsx(ms,{automationId:h.id,triggerIds:h.triggers.map(vl),range:u}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=h,e[10]=c,e[11]=d,e[12]=o,e[13]=u,e[14]=L):L=e[14],L}function vl(s){return s.id}function Nl(s){return t.jsx(ge,{value:s.id,children:s.name},s.id)}const bl=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function yl({connectionIds:s,virtualMcpIds:e,tool:l,status:r,hideSystem:o,propertyFilters:a,connectionOptions:c,virtualMcpOptions:i,activeFiltersCount:n,onUpdateFilters:d,onConnectionSearchChange:h,memberOptions:f,llmUserIds:v=[],onLlmUserIdsChange:N,showMemberFilter:u}){const[L,g]=K.useState(!1),[j,m]=K.useState("form"),[C,w]=K.useState(l),[p,T]=K.useState(a),[S,x]=K.useState(nt(a)),M=K.useRef(l),b=K.useRef(Oe(a));M.current!==l&&(M.current=l,C!==l&&w(l));const _=Oe(a);b.current!==_&&(b.current=_,T(a),x(nt(a)));const k=(I,F)=>{const O=[...p],z=O[I];z&&(O[I]={key:F.key??z.key,operator:F.operator??z.operator,value:F.value??z.value},T(O))},$=()=>{T([...p,{key:"",operator:"eq",value:""}])},D=I=>{const F=p.filter((O,z)=>z!==I);T(F),x(nt(F)),d({propertyFilters:Oe(F)})},E=()=>{d({propertyFilters:Oe(p)})},P=()=>{const I=Rt(S);T(I),d({propertyFilters:Oe(I)})},X=()=>{if(j==="raw"){const I=Rt(S);T(I),m("form")}else x(nt(p)),m("raw")};return t.jsxs(tt,{open:L,onOpenChange:g,children:[t.jsx(st,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(It,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(Ke,{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(Ke,{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(lt,{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(Ds,{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:o,onCheckedChange:I=>d({hideSystem:!!I})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(We,{options:c,defaultValue:s,onValueChange:I=>d({connectionId:I}),onSearchChange:h,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(We,{options:i,defaultValue:e,onValueChange:I=>d({virtualMcpId:I}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),u&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(We,{options:f??[],defaultValue:v,onValueChange:I=>N?.(I),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:C,onChange:I=>w(I.target.value),onBlur:()=>{C!==l&&d({tool:C})},onKeyDown:I=>{I.key==="Enter"&&C!==l&&d({tool:C})},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(et,{value:r,onValueChange:I=>d({status:I}),children:[t.jsx(Xe,{className:"w-full",children:t.jsx(Ye,{})}),t.jsxs(Ze,{children:[t.jsx(ge,{value:"all",children:"All Status"}),t.jsx(ge,{value:"success",children:"Success Only"}),t.jsx(ge,{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(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:X,children:j==="raw"?t.jsx(Ss,{size:14}):t.jsx(js,{size:14})})}),t.jsx(mt,{children:j==="raw"?"Switch to form view":"Switch to raw text"})]})]}),j==="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 Js(s){const e=re.c(117),{log:l}=s,[r,o]=q.useState(!1),[a,c]=q.useState(!1),i=yt(),{org:n}=He(),d=vt(),h=Ot(l.input),f=Ot(l.output),v=Gs;let N;e[0]!==l.input||e[1]!==l.output?(N=async se=>{const ee=v(se==="input"?l.input:l.output);try{await navigator.clipboard.writeText(ee),se==="input"?(o(!0),setTimeout(()=>o(!1),2e3)):(c(!0),setTimeout(()=>c(!1),2e3))}catch{Ie.error("Failed to copy to clipboard")}},e[0]=l.input,e[1]=l.output,e[2]=N):N=e[2];const u=N;let L;e[3]!==l.id||e[4]!==l.input||e[5]!==l.output||e[6]!==l.toolName?(L=se=>{const ee=v(se==="input"?l.input:l.output),ae=new Blob([ee],{type:"application/json"}),he=URL.createObjectURL(ae),ye=document.createElement("a");ye.href=he,ye.download=`${l.toolName}-${se}-${l.id}.json`,ye.click(),URL.revokeObjectURL(he)},e[3]=l.id,e[4]=l.input,e[5]=l.output,e[6]=l.toolName,e[7]=L):L=e[7];const g=L;let j;e[8]!==d||e[9]!==l.connectionId||e[10]!==l.input||e[11]!==l.toolName||e[12]!==i||e[13]!==n?(j=()=>{const se=d.find(ae=>ae.id===l.connectionId);if(!se){Ie.error("Could not find the connection for this tool call");return}const ee=crypto.randomUUID();sessionStorage.setItem(`replay-${ee}`,JSON.stringify(l.input)),i({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:n.slug,appSlug:Vt(se),collectionName:"tools",itemId:encodeURIComponent(l.toolName)},search:{replayId:ee}})},e[8]=d,e[9]=l.connectionId,e[10]=l.input,e[11]=l.toolName,e[12]=i,e[13]=n,e[14]=j):j=e[14];const m=j,[C,w]=q.useState(!1);let p;e[15]!==l.requestId?(p=async()=>{try{await navigator.clipboard.writeText(l.requestId),w(!0),setTimeout(()=>w(!1),2e3)}catch{Ie.error("Failed to copy to clipboard")}},e[15]=l.requestId,e[16]=p):p=e[16];const _=p;let S;e[17]!==l.timestamp?(S=new Date(l.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[17]=l.timestamp,e[18]=S):S=e[18];const x=S,M="text-sm px-5 md:px-6 py-5 space-y-5";let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[19]=b):b=e[19];let T;e[20]!==x?(T=t.jsxs("div",{children:[b,t.jsx("div",{className:"text-sm text-foreground",children:x})]}),e[20]=x,e[21]=T):T=e[21];let k;e[22]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[22]=k):k=e[22];let $;e[23]!==l.durationMs?($=t.jsxs("div",{children:[k,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[l.durationMs,"ms"]})]}),e[23]=l.durationMs,e[24]=$):$=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[25]=D):D=e[25];let E;e[26]!==l.userName?(E=t.jsxs("div",{children:[D,t.jsx("div",{className:"text-sm text-foreground",children:l.userName})]}),e[26]=l.userName,e[27]=E):E=e[27];let P;e[28]!==l.virtualMcpName?(P=l.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:l.virtualMcpName})]}),e[28]=l.virtualMcpName,e[29]=P):P=e[29];let X;e[30]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[30]=X):X=e[30];let I;e[31]!==l.requestId?(I=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:l.requestId}),e[31]=l.requestId,e[32]=I):I=e[32];let F;e[33]!==C?(F=C?t.jsx(ht,{size:12}):t.jsx(ot,{size:12}),e[33]=C,e[34]=F):F=e[34];let O;e[35]!==_||e[36]!==F?(O=t.jsx(Z,{size:"icon",variant:"ghost",onClick:_,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:F}),e[35]=_,e[36]=F,e[37]=O):O=e[37];let z;e[38]!==I||e[39]!==O?(z=t.jsxs("div",{children:[X,t.jsxs("div",{className:"flex items-center gap-1",children:[I,O]})]}),e[38]=I,e[39]=O,e[40]=z):z=e[40];let A;e[41]!==l.userAgent?(A=l.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:l.userAgent})]}),e[41]=l.userAgent,e[42]=A):A=e[42];let K;e[43]!==l.properties||e[44]!==i||e[45]!==n?(K=l.properties&&Object.keys(l.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(l.properties).map(se=>{const[ee,ae]=se;return t.jsxs(tt,{children:[t.jsx(st,{asChild:!0,children:t.jsxs(qe,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[ee,"=",ae]})}),t.jsx(lt,{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 he={key:ee,operator:"eq",value:ae};i({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Oe([he])}})},children:[t.jsx(It,{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(`${ee}=${ae}`),Ie.success("Copied filter to clipboard")}catch{Ie.error("Failed to copy to clipboard")}},children:[t.jsx(ot,{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(ee),Ie.success("Copied key to clipboard")}catch{Ie.error("Failed to copy to clipboard")}},children:[t.jsx(fs,{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(ae),Ie.success("Copied value to clipboard")}catch{Ie.error("Failed to copy to clipboard")}},children:[t.jsx(hs,{size:14,className:"mr-2"}),"Copy value"]})]})})]},ee)})})]}),e[43]=l.properties,e[44]=i,e[45]=n,e[46]=K):K=e[46];let B;e[47]!==$||e[48]!==E||e[49]!==P||e[50]!==z||e[51]!==A||e[52]!==K||e[53]!==T?(B=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[T,$,E,P,z,A,K]}),e[47]=$,e[48]=E,e[49]=P,e[50]=z,e[51]=A,e[52]=K,e[53]=T,e[54]=B):B=e[54];let V;e[55]!==l.errorMessage?(V=l.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:l.errorMessage})]}),e[55]=l.errorMessage,e[56]=V):V=e[56];const Y="space-y-4";let H;e[57]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[57]=H):H=e[57];const G=h.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",_t(h.originalSize)," - truncated)"]});let U;e[58]!==G?(U=t.jsxs("div",{className:"flex items-center gap-2",children:[H,G]}),e[58]=G,e[59]=U):U=e[59];let y;e[60]!==m||e[61]!==l.input?(y=l.input&&t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:m,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(ps,{size:14})})}),t.jsx(mt,{children:"Replay tool call"})]}),e[60]=m,e[61]=l.input,e[62]=y):y=e[62];let R;e[63]!==g||e[64]!==h?(R=h.isTruncated&&t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>g("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Lt,{size:14})})}),t.jsx(mt,{children:"Download full input"})]}),e[63]=g,e[64]=h,e[65]=R):R=e[65];let J;e[66]!==u?(J=()=>u("input"),e[66]=u,e[67]=J):J=e[67];let te;e[68]!==r?(te=r?t.jsx(ht,{size:14}):t.jsx(ot,{size:14}),e[68]=r,e[69]=te):te=e[69];let Q;e[70]!==J||e[71]!==te?(Q=t.jsx(Z,{size:"icon",variant:"ghost",onClick:J,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:te}),e[70]=J,e[71]=te,e[72]=Q):Q=e[72];let le;e[73]!==y||e[74]!==R||e[75]!==Q?(le=t.jsxs("div",{className:"flex items-center gap-1",children:[y,R,Q]}),e[73]=y,e[74]=R,e[75]=Q,e[76]=le):le=e[76];let W;e[77]!==U||e[78]!==le?(W=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[U,le]}),e[77]=U,e[78]=le,e[79]=W):W=e[79];let ne;e[80]!==h?(ne=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Ft,{code:h.content,language:"json",height:"100%",readOnly:!0})}),e[80]=h,e[81]=ne):ne=e[81];let ce;e[82]!==W||e[83]!==ne?(ce=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[W,ne]})}),e[82]=W,e[83]=ne,e[84]=ce):ce=e[84];const $e="rounded-lg overflow-hidden border border-border",Ce="flex items-center justify-between p-1 pl-4 border-b border-border",ke="flex items-center gap-2";let ie;e[85]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[85]=ie):ie=e[85];const Fe=f.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",_t(f.originalSize)," - truncated)"]});let je;e[86]!==ie||e[87]!==Fe?(je=t.jsxs("div",{className:ke,children:[ie,Fe]}),e[86]=ie,e[87]=Fe,e[88]=je):je=e[88];let ve;e[89]!==g||e[90]!==f.isTruncated?(ve=f.isTruncated&&t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>g("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Lt,{size:14})})}),t.jsx(mt,{children:"Download full output"})]}),e[89]=g,e[90]=f.isTruncated,e[91]=ve):ve=e[91];let Ne;e[92]!==u?(Ne=()=>u("output"),e[92]=u,e[93]=Ne):Ne=e[93];let me;e[94]!==a?(me=a?t.jsx(ht,{size:14}):t.jsx(ot,{size:14}),e[94]=a,e[95]=me):me=e[95];let be;e[96]!==Ne||e[97]!==me?(be=t.jsx(Z,{size:"icon",variant:"ghost",onClick:Ne,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:me}),e[96]=Ne,e[97]=me,e[98]=be):be=e[98];let ue;e[99]!==ve||e[100]!==be?(ue=t.jsxs("div",{className:"flex items-center gap-1",children:[ve,be]}),e[99]=ve,e[100]=be,e[101]=ue):ue=e[101];let xe;e[102]!==je||e[103]!==ue?(xe=t.jsxs("div",{className:Ce,children:[je,ue]}),e[102]=je,e[103]=ue,e[104]=xe):xe=e[104];let fe;e[105]!==f.content?(fe=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Ft,{code:f.content,language:"json",height:"100%",readOnly:!0})}),e[105]=f.content,e[106]=fe):fe=e[106];let pe;e[107]!==xe||e[108]!==fe?(pe=t.jsx("div",{children:t.jsxs("div",{className:$e,children:[xe,fe]})}),e[107]=xe,e[108]=fe,e[109]=pe):pe=e[109];let Te;e[110]!==ce||e[111]!==pe?(Te=t.jsxs("div",{className:Y,children:[ce,pe]}),e[110]=ce,e[111]=pe,e[112]=Te):Te=e[112];let Se;return e[113]!==B||e[114]!==V||e[115]!==Te?(Se=t.jsxs("div",{className:M,children:[B,V,Te]}),e[113]=B,e[114]=V,e[115]=Te,e[116]=Se):Se=e[116],Se}function Gs(s){return JSON.stringify(s,null,2)}const Xt=/^now(?:-(\d+)([mhdwM]))?$/,Qs={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Yt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const l=e.match(Xt);if(!l)return null;const r=l[1]?Number.parseInt(l[1],10):0,o=l[2]||null;return{isNow:!0,offset:r,unit:o}}function we(s){const e=s.trim(),l=new Date(e);if(!Number.isNaN(l.getTime())&&e.includes("-"))return{valid:!0,date:l};const r=Yt(e);if(!r)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const o=new Date,a=new Date(o);if(r.offset===0||!r.unit)return{valid:!0,date:a};switch(r.unit){case"m":a.setMinutes(a.getMinutes()-r.offset);break;case"h":a.setHours(a.getHours()-r.offset);break;case"d":a.setDate(a.getDate()-r.offset);break;case"w":a.setDate(a.getDate()-r.offset*7);break;case"M":a.setMonth(a.getMonth()-r.offset);break}return{valid:!0,date:a}}function Ws(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Zt(s){const e=s.trim();return Xt.test(e)}function $t(s){const e=s.trim();if(e==="now")return"Now";const l=Yt(e);if(!l||!l.unit){const a=we(e);return a.valid&&a.date?Ws(a.date):e}const r=Qs[l.unit],o=l.offset!==1?"s":"";return`${l.offset} ${r}${o} ago`}const es=[{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 Xs(s,e){const l=es.find(r=>r.from===s&&r.to===e);return l?l.label:`${$t(s)} to ${$t(e)}`}function Ge(s){const e=s.getFullYear(),l=String(s.getMonth()+1).padStart(2,"0"),r=String(s.getDate()).padStart(2,"0"),o=String(s.getHours()).padStart(2,"0"),a=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${e}-${l}-${r} ${o}:${a}:${c}`}function Ys(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,l,r,o,a,c,i]=e,n=new Date(Number(l),Number(r)-1,Number(o),Number(a),Number(c),Number(i));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Zt(s))return s;const e=we(s);return e.valid&&e.date?Ge(e.date):s}function zt({value:s,onChange:e,placeholder:l="now or now-2d",className:r,disabled:o,error:a}){const[c,i]=q.useState(!1),[n,d]=q.useState(()=>gt(s)),[h,f]=q.useState(),[v,N]=q.useState(!1),u=q.useRef(s);u.current!==s&&(u.current=s,v||d(gt(s)));const L=x=>{const M=x.target.value;d(M),f(void 0)},g=()=>{N(!0)},j=()=>{N(!1);const x=n.trim();if(Zt(x)){f(void 0),e(x);return}const M=Ys(x);if(M){f(void 0),e(M.toISOString()),d(Ge(M));return}const b=we(x);if(b.valid&&b.date){f(void 0),e(x),d(Ge(b.date));return}d(gt(s)),f(void 0)},m=x=>{if(x){const b=we(s).date||new Date;x.setHours(b.getHours()),x.setMinutes(b.getMinutes()),x.setSeconds(0),x.setMilliseconds(0);const T=x.toISOString();d(Ge(x)),e(T),f(void 0)}i(!1)},C=x=>{const[M,b]=x.target.value.split(":").map(Number),k=we(s).date||new Date;k.setHours(M||0),k.setMinutes(b||0),k.setSeconds(0),k.setMilliseconds(0);const $=k.toISOString();d(Ge(k)),e($)},w=we(s),p=w.valid?w.date:new Date,_=p?`${String(p.getHours()).padStart(2,"0")}:${String(p.getMinutes()).padStart(2,"0")}`:"",S=a||h;return t.jsxs("div",{className:de("flex gap-1",r),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Qe,{value:n,onChange:L,onFocus:g,onBlur:j,placeholder:l,disabled:o,className:de("text-sm h-8",S&&"border-destructive focus-visible:ring-destructive")}),S&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:S})]}),t.jsxs(tt,{open:c,onOpenChange:i,children:[t.jsx(st,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:o,children:t.jsx(gs,{className:"h-4 w-4"})})}),t.jsxs(lt,{className:"w-auto p-0",align:"end",children:[t.jsx(Ts,{mode:"single",selected:p||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:_,onChange:C,className:"text-sm h-8"})]})]})]})]})}function Zs({value:s,onChange:e,className:l,disabled:r,quickRanges:o=es}){const[a,c]=q.useState(!1),[i,n]=q.useState(s.from),[d,h]=q.useState(s.to),[f,v]=q.useState(null),N=q.useRef({from:s.from,to:s.to});(N.current.from!==s.from||N.current.to!==s.to)&&(N.current={from:s.from,to:s.to},n(s.from),h(s.to));const u=m=>{N.current={from:m.from,to:m.to},n(m.from),h(m.to),c(!1),e({from:m.from,to:m.to})},L=()=>{const m=we(i),C=we(d);if(!m.valid||!m.date){v("Invalid 'From' date");return}if(!C.valid||!C.date){v("Invalid 'To' date");return}if(m.date>=C.date){v("'From' must be before 'To'");return}v(null),e({from:i,to:d}),c(!1)},g=m=>s.from===m.from&&s.to===m.to,j=Xs(s.from,s.to);return t.jsxs(tt,{open:a,onOpenChange:c,children:[t.jsx(st,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:de("gap-1.5 min-w-[160px] justify-between",l),disabled:r,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ks,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:j})]}),t.jsx(Kt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(lt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:m=>m.preventDefault(),style:a?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:d,onChange:h,placeholder:"now"})]}),f&&t.jsx("p",{className:"text-xs text-destructive",children:f}),t.jsx(Z,{onClick:L,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(is,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:o.map(m=>{const C=g(m);return t.jsx("button",{type:"button",onClick:()=>u(m),className:de("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",C&&"bg-accent text-accent-foreground font-medium"),children:m.label},m.value)})})})})]})})]})}const ts="decopilot";async function ss(s,e){return await s.call("MONITORING_STATS",e)}function el(s,e){const l=re.c(12),{org:r}=He(),o=Jt();let a,c,i;l[0]!==r.id||l[1]!==s?(i={...s,excludeConnectionIds:[ts,...s.excludeConnectionIds??[]]},c=wt,a=ut.monitoringStatsToolCalls(r.id,JSON.stringify(i)),l[0]=r.id,l[1]=s,l[2]=a,l[3]=c,l[4]=i):(a=l[2],c=l[3],i=l[4]);let n;l[5]!==o||l[6]!==i?(n=()=>ss(o,i),l[5]=o,l[6]=i,l[7]=n):n=l[7];let d;return l[8]!==e||l[9]!==a||l[10]!==n?(d={queryKey:a,queryFn:n,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=a,l[10]=n,l[11]=d):d=l[11],c(d)}function tl(s,e){const l=re.c(12),{org:r}=He(),o=Jt();let a,c,i;l[0]!==r.id||l[1]!==s?(i={...s,connectionIds:[ts],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},c=wt,a=ut.monitoringStatsLlm(r.id,JSON.stringify(i)),l[0]=r.id,l[1]=s,l[2]=a,l[3]=c,l[4]=i):(a=l[2],c=l[3],i=l[4]);let n;l[5]!==o||l[6]!==i?(n=()=>ss(o,i),l[5]=o,l[6]=i,l[7]=n):n=l[7];let d;return l[8]!==e||l[9]!==a||l[10]!==n?(d={queryKey:a,queryFn:n,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=a,l[10]=n,l[11]=d):d=l[11],c(d)}function De(s){const e=re.c(20),{title:l,value:r,action:o,children:a,className:c}=s;let i;e[0]!==c?(i=de("pt-4 px-4 pb-6 gap-8",c),e[0]=c,e[1]=i):i=e[1];let n;e[2]!==l?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:l}),e[2]=l,e[3]=n):n=e[3];let d;e[4]!==r?(d=t.jsx("span",{className:"text-4xl font-normal",children:r}),e[4]=r,e[5]=d):d=e[5];let h;e[6]!==n||e[7]!==d?(h=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,d]}),e[6]=n,e[7]=d,e[8]=h):h=e[8];let f;e[9]!==o?(f=o&&t.jsx("div",{className:"shrink-0",children:o}),e[9]=o,e[10]=f):f=e[10];let v;e[11]!==h||e[12]!==f?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[h,f]}),e[11]=h,e[12]=f,e[13]=v):v=e[13];let N;e[14]!==a?(N=a&&t.jsx("div",{className:"flex flex-col gap-6",children:a}),e[14]=a,e[15]=N):N=e[15];let u;return e[16]!==i||e[17]!==v||e[18]!==N?(u=t.jsxs(Ht,{className:i,children:[v,N]}),e[16]=i,e[17]=v,e[18]=N,e[19]=u):u=e[19],u}function jt(s){const e=re.c(14),{metrics:l,connections:r,mode:o,total:a}=s,{org:c}=He(),i=yt();let n,d,h;if(e[0]!==r||e[1]!==l||e[2]!==o||e[3]!==i||e[4]!==c||e[5]!==a){h=Symbol.for("react.early_return_sentinel");e:{const v=r??[],N=new Map(l.map(ll));let u;e[9]!==o?(u=(g,j)=>{const m=Dt(g.metric,o);return Dt(j.metric,o)-m},e[9]=o,e[10]=u):u=e[10];const L=v.map(g=>({connection:g,metric:N.get(g.id)})).filter(sl).sort(u).slice(0,4);if(L.length===0){h=null;break e}n="flex flex-col",d=L.map((g,j)=>{const{connection:m,metric:C}=g,w=a>0?(C.calls/a*100).toFixed(1):"0.0",p=o==="errors"?`${C.errorRate.toFixed(1)}%`:`${w}%`,_=j===L.length-1;return t.jsxs("div",{className:de("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!_&&"border-b border-border/50"),onClick:()=>i({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:Vt(m)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(Be,{icon:m.icon,name:m.title,size:"xs",fallbackIcon:t.jsx(rt,{}),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:p}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:ds(C,o)})]})]},m.id)})}e[0]=r,e[1]=l,e[2]=o,e[3]=i,e[4]=c,e[5]=a,e[6]=n,e[7]=d,e[8]=h}else n=e[6],d=e[7],h=e[8];if(h!==Symbol.for("react.early_return_sentinel"))return h;let f;return e[11]!==n||e[12]!==d?(f=t.jsx("div",{className:n,children:d}),e[11]=n,e[12]=d,e[13]=f):f=e[13],f}function sl(s){return s.metric}function ll(s){return[s.connectionId,s]}const At=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Et(s){let e=0;for(let l=0;l<s.length;l++)e=e*31+s.charCodeAt(l)>>>0;return At[e%At.length]}function Je(s){const e=re.c(21),{models:l,mode:r}=s,o=r===void 0?"calls":r;if(l.length===0)return null;let a;e[0]!==o?(a=u=>o==="tokens"?(u.inputTokens??0)+(u.outputTokens??0):o==="cost"?u.costUsd??0:u.calls,e[0]=o,e[1]=a):a=e[1];const c=a;let i;e[2]!==o?(i=u=>o==="cost"?Pt(u):o==="tokens"?it(u):u.toLocaleString(),e[2]=o,e[3]=i):i=e[3];const n=i;let d;e[4]!==c?(d=(u,L)=>u+c(L),e[4]=c,e[5]=d):d=e[5];const h=l.reduce(d,0);let f,v;if(e[6]!==n||e[7]!==l||e[8]!==h||e[9]!==c){let u;e[12]!==c?(u=(j,m)=>c(m)-c(j),e[12]=c,e[13]=u):u=e[13];const L=[...l].sort(u).slice(0,4);f="flex flex-col";let g;e[14]!==n||e[15]!==h||e[16]!==c?(g=(j,m,C)=>{const w=c(j),p=h>0?(w/h*100).toFixed(1):"0.0",_=m===C.length-1;return t.jsxs("div",{className:de("flex items-center h-10 px-3",!_&&"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(j.toolName)} 18%, transparent)`},children:t.jsx(rt,{size:14,style:{color:Et(j.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:j.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:[p,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(w)})]})]},j.toolName)},e[14]=n,e[15]=h,e[16]=c,e[17]=g):g=e[17],v=L.map(g),e[6]=n,e[7]=l,e[8]=h,e[9]=c,e[10]=f,e[11]=v}else f=e[10],v=e[11];let N;return e[18]!==f||e[19]!==v?(N=t.jsx("div",{className:f,children:v}),e[18]=f,e[19]=v,e[20]=N):N=e[20],N}function rl(s){const e=re.c(48),{displayDateRange:l,connectionIds:r,excludeConnectionIds:o,toolName:a,status:c,connections:i,isStreaming:n,streamingRefetchInterval:d,llmUserIds:h}=s,f=cs(l),v=n?d:!1;let N;e[0]!==v?(N={refetchInterval:v},e[0]=v,e[1]=N):N=e[1];const{data:u,isError:L}=el({interval:f,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),connectionIds:r.length>0?r:void 0,excludeConnectionIds:o,toolNames:a?[a]:void 0,status:c},N);let g;e[2]!==v?(g={refetchInterval:v},e[2]=v,e[3]=g):g=e[3];const{data:j,isError:m}=tl({interval:f,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),userIds:h?.length?h:void 0},g),C=L||m,w=u?{totalCalls:u.totalCalls,totalErrors:u.totalErrors,avgDurationMs:u.avgDurationMs,p95DurationMs:u.p95DurationMs,data:Mt(u.timeseries,l,f)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},p=j?{totalCalls:j.totalCalls,totalErrors:j.totalErrors,avgDurationMs:j.avgDurationMs,p95DurationMs:j.p95DurationMs,data:Mt(j.timeseries,l,f)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let _;e[4]!==j?.topTools?(_=j?.topTools??[],e[4]=j?.topTools,e[5]=_):_=e[5];const S=_,x=j?.totalInputTokens??0,M=j?.totalOutputTokens??0,b=j?.totalTokens??0,T=j?.totalCostUsd??0;let k;e[6]!==u?.connectionBreakdown?(k=u?.connectionBreakdown??[],e[6]=u?.connectionBreakdown,e[7]=k):k=e[7];const $=k,[D,E]=q.useState("avg");let P;e[8]!==C?(P=C&&t.jsxs(Ls,{variant:"destructive",children:[t.jsx(ls,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Fs,{children:"Failed to load monitoring data"}),t.jsx(Rs,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=C,e[9]=P):P=e[9];let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=ce=>E(ce),e[10]=X):X=e[10];let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Xe,{className:"w-[120px]",children:t.jsx(Ye,{})}),e[11]=I):I=e[11];let F;e[12]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsxs(Ze,{children:[t.jsx(ge,{value:"avg",children:"Avg"}),t.jsx(ge,{value:"p95",children:"P95"})]}),e[12]=F):F=e[12];let O;e[13]!==D?(O=t.jsxs(et,{value:D,onValueChange:X,children:[I,F]}),e[13]=D,e[14]=O):O=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 A;e[16]!==S?(A=t.jsx(Je,{models:S,mode:"calls"}),e[16]=S,e[17]=A):A=e[17];let K;e[18]!==b?(K=it(b),e[18]=b,e[19]=K):K=e[19];let B;e[20]!==x?(B=it(x),e[20]=x,e[21]=B):B=e[21];let V;e[22]!==M?(V=it(M),e[22]=M,e[23]=V):V=e[23];let Y;e[24]!==B||e[25]!==V?(Y=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[B," in ·"," ",V," out"]}),e[24]=B,e[25]=V,e[26]=Y):Y=e[26];let H;e[27]!==S?(H=t.jsx(Je,{models:S,mode:"tokens"}),e[27]=S,e[28]=H):H=e[28];let G;e[29]!==T?(G=T>0?Pt(T):"—",e[29]=T,e[30]=G):G=e[30];let U;e[31]!==T?(U=T===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=T,e[32]=U):U=e[32];let y;e[33]!==S||e[34]!==T?(y=T>0?t.jsx(Je,{models:S,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]=S,e[34]=T,e[35]=y):y=e[35];let R;e[36]!==S?(R=t.jsx(Je,{models:S,mode:"calls"}),e[36]=S,e[37]=R):R=e[37];const J=De,te="AI Errors",Q=p.totalErrors.toLocaleString();let le;e[38]!==p.data?(le=t.jsx(Me,{data:p.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"AI errors over time"}),e[38]=p.data,e[39]=le):le=e[39];let W;e[40]!==S||e[41]!==p.totalErrors?(W=p.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(Je,{models:S,mode:"calls"}),e[40]=S,e[41]=p.totalErrors,e[42]=W):W=e[42];let ne;return e[43]!==J||e[44]!==Q||e[45]!==le||e[46]!==W?(ne=t.jsxs(J,{title:te,value:Q,children:[le,W]}),e[43]=J,e[44]=Q,e[45]=le,e[46]=W,e[47]=ne):ne=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:[P,t.jsxs(De,{title:"Tool Calls",value:w.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:w.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:"Tool calls over time"}),t.jsx(jt,{metrics:$,connections:i,mode:"requests",total:w.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(De,{title:"Latency",value:pt(D==="avg"?w.avgDurationMs:w.p95DurationMs),action:O,children:[t.jsx(Me,{data:w.data,dataKey:D,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:`${D==="avg"?"Average":"P95"} latency over time`}),t.jsx(jt,{metrics:$,connections:i,mode:"latency",total:w.totalCalls})]}),t.jsxs(De,{title:"Errors",value:w.totalErrors.toLocaleString(),children:[t.jsx(Me,{data:w.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:"Errors over time"}),w.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:$,connections:i,mode:"errors",total:w.totalErrors})]})]}),z,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(De,{title:"AI Calls",value:p.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:p.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"AI calls over time"}),A]}),t.jsxs(De,{title:"Tokens",value:K,action:Y,children:[t.jsx(Me,{data:p.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"Total tokens over time"}),H]}),t.jsxs(De,{title:"Cost",value:G,action:U,children:[t.jsx(Me,{data:p.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"Cost over time"}),y]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(De,{title:"AI Latency",value:pt(p.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(p.p95DurationMs)]}),children:[t.jsx(Me,{data:p.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:"AI latency over time"}),R]}),ne]})]})}function Ke(s){const e=re.c(8),{className:l}=s;let r;e[0]!==l?(r=de("pt-4 px-4 pb-6 gap-8",l),e[0]=l,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=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]=o):o=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=a):a=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=Array.from({length:4}).map(al),e[4]=c):c=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex flex-col gap-6",children:[a,t.jsxs("div",{className:"flex flex-col",children:[c,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]!==r?(n=t.jsxs(Ht,{className:r,children:[o,i]}),e[6]=r,e[7]=n):n=e[7],n}function al(s,e){return t.jsxs("div",{className:de("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 ol(){const s=re.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let l,r;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),r=t.jsx("div",{className:"border-t border-border"}),s[1]=l,s[2]=r):(l=s[1],r=s[2]);let o;return s[3]===Symbol.for("react.memo_cache_sentinel")?(o=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,l,r,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]=o):o=s[3],o}function nl(s){const e=re.c(46),{log:l,connection:r,virtualMcpName:o,virtualMcpIcon:a,onClick:c,lastLogRef:i}=s;let n,d;if(e[0]!==l.timestamp){const D=new Date(l.timestamp);n=D.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=D.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=l.timestamp,e[1]=n,e[2]=d}else n=e[1],d=e[2];const h=d,f=r?.icon||null,v=r?.title??l.connectionId;let N;e[3]!==f||e[4]!==v?(N=t.jsx(Re,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(Be,{icon:f,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=f,e[4]=v,e[5]=N):N=e[5];let u;e[6]!==l.toolName?(u=t.jsx("div",{className:"font-medium text-foreground truncate block",children:l.toolName}),e[6]=l.toolName,e[7]=u):u=e[7];const L=r?.title??l.connectionId;let g;e[8]!==L?(g=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:L}),e[8]=L,e[9]=g):g=e[9];let j;e[10]!==u||e[11]!==g?(j=t.jsxs(Re,{className:"min-w-0 pr-2 md:pr-4",children:[u,g]}),e[10]=u,e[11]=g,e[12]=j):j=e[12];let m;e[13]!==a||e[14]!==o?(m=t.jsx(Re,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:o?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(Be,{icon:a,name:o,size:"xs",fallbackIcon:t.jsx(rt,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:o})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=a,e[14]=o,e[15]=m):m=e[15];let C;e[16]!==l.userImage||e[17]!==l.userName?(C=t.jsx(Bt,{url:l.userImage,fallback:l.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=l.userImage,e[17]=l.userName,e[18]=C):C=e[18];let w;e[19]!==l.userName?(w=t.jsx("span",{className:"truncate",children:l.userName}),e[19]=l.userName,e[20]=w):w=e[20];let p;e[21]!==C||e[22]!==w?(p=t.jsx(Re,{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:[C,w]})}),e[21]=C,e[22]=w,e[23]=p):p=e[23];let _;e[24]!==n?(_=t.jsx("div",{children:n}),e[24]=n,e[25]=_):_=e[25];let S;e[26]!==h?(S=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:h}),e[26]=h,e[27]=S):S=e[27];let x;e[28]!==_||e[29]!==S?(x=t.jsxs(Re,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[_,S]}),e[28]=_,e[29]=S,e[30]=x):x=e[30];let M;e[31]!==l.durationMs?(M=t.jsxs(Re,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[l.durationMs,"ms"]}),e[31]=l.durationMs,e[32]=M):M=e[32];const b=l.isError?"destructive":"success",T=l.isError?"Error":"OK";let k;e[33]!==b||e[34]!==T?(k=t.jsx(Re,{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(qe,{variant:b,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:T})})}),e[33]=b,e[34]=T,e[35]=k):k=e[35];let $;return e[36]!==i||e[37]!==c||e[38]!==p||e[39]!==x||e[40]!==M||e[41]!==k||e[42]!==N||e[43]!==j||e[44]!==m?($=t.jsxs(xt,{ref:i,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:c,children:[N,j,m,p,x,M,k]}),e[36]=i,e[37]=c,e[38]=p,e[39]=x,e[40]=M,e[41]=k,e[42]=N,e[43]=j,e[44]=m,e[45]=$):$=e[45],$}function il(s){const e=re.c(26),{connectionIds:l,virtualMcpIds:r,tool:o,status:a,search:c,logs:i,hasMore:n,onLoadMore:d,isLoadingMore:h,connections:f,virtualMcps:v,membersData:N,client:u}=s,L=f??[],g=v??[],[j,m]=q.useState(null),C=Ps(d,n,h),w=Ut(N),p=new Map(w.map(ul)),_=new Map(g.map(ml));let x=i.map(y=>{const R=p.get(y.userId??""),J=y.virtualMcpId?_.get(y.virtualMcpId):null;return{...y,userName:R?.name??y.userId??"Unknown",userImage:R?.image??void 0,virtualMcpName:J?.title??null,virtualMcpIcon:J?.icon??null}});if(l.length>1){let y;e[0]!==l?(y=R=>l.includes(R.connectionId),e[0]=l,e[1]=y):y=e[1],x=x.filter(y)}if(r.length>1){let y;e[2]!==r?(y=R=>R.virtualMcpId&&r.includes(R.virtualMcpId),e[2]=r,e[3]=y):y=e[3],x=x.filter(y)}const M=new Map(L.map(dl));if(c){const y=c.toLowerCase();x=x.filter(R=>R.toolName.toLowerCase().includes(y)||(M.get(R.connectionId)?.title??R.connectionId).toLowerCase().includes(y)||R.errorMessage?.toLowerCase().includes(y))}const b=j!==null?x[j]??null:null,T=wt({queryKey:ut.monitoringLogDetail(b?.id??""),queryFn:async()=>{if(!u)throw new Error("MCP client is not available");const y=await u.callTool({name:"MONITORING_LOG_GET",arguments:{id:b.id}});return y.structuredContent??y},enabled:b!==null}),k=T.data?.log,$=b&&k?{...b,input:k.input,output:k.output}:b;if(x.length===0){let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=y):y=e[4];const R=c||l.length>0||r.length>0||o||a!=="all"?"No logs match your filters":"No logs found in this time range";let J;return e[5]!==R?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(St,{image:y,title:"No logs found",description:R})}),e[5]=R,e[6]=J):J=e[6],J}const D="flex-1 flex flex-col min-w-0",E="flex-1 min-w-0 pt-1",P="min-w-[600px] md:min-w-0",X=Qt,I="w-full border-collapse";let F;e[7]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(xt,{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]=F):F=e[7];const O=Gt,z=x.map((y,R)=>t.jsx(nl,{log:y,connection:M.get(y.connectionId),virtualMcpName:y.virtualMcpName??"",virtualMcpIcon:y.virtualMcpIcon,onClick:()=>m(R),lastLogRef:R===x.length-1?C:void 0},y.id));let A;e[8]!==O||e[9]!==z?(A=t.jsx(O,{children:z}),e[8]=O,e[9]=z,e[10]=A):A=e[10];let K;e[11]!==X||e[12]!==F||e[13]!==A?(K=t.jsx("div",{className:E,children:t.jsx("div",{className:P,children:t.jsxs(X,{className:I,children:[F,A]})})}),e[11]=X,e[12]=F,e[13]=A,e[14]=K):K=e[14];const B=j!==null;let V;e[15]!==m?(V=y=>{y||m(null)},e[15]=m,e[16]=V):V=e[16];const Y=b&&j!==null&&t.jsxs(t.Fragment,{children:[t.jsx($s,{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(Be,{icon:M.get(b.connectionId)?.icon||null,name:M.get(b.connectionId)?.title??b.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(zs,{className:"text-sm leading-snug truncate",children:b.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:M.get(b.connectionId)?.title??b.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(cl),disabled:j===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(xs,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(y=>y!==null&&y<x.length-1?y+1:y),disabled:j===x.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(Kt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:T.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"})}):T.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:()=>T.refetch(),children:"Retry"})]}):t.jsx(Js,{log:$})})]});let H;e[17]!==Y?(H=t.jsx(As,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:Y}),e[17]=Y,e[18]=H):H=e[18];let G;e[19]!==V||e[20]!==H||e[21]!==B?(G=t.jsx(Es,{open:B,onOpenChange:V,children:H}),e[19]=V,e[20]=H,e[21]=B,e[22]=G):G=e[22];let U;return e[23]!==G||e[24]!==K?(U=t.jsxs("div",{className:D,children:[K,G]}),e[23]=G,e[24]=K,e[25]=U):U=e[25],U}function cl(s){return s!==null&&s>0?s-1:s}function dl(s){return[s.id,s]}function ml(s){return[s.id,s]}function ul(s){return[s.userId,s.user]}function xl(){const s=re.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 l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=s[1];let r;s[2]===Symbol.for("react.memo_cache_sentinel")?(r=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]=r):r=s[2];let o;s[3]===Symbol.for("react.memo_cache_sentinel")?(o=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]=o):o=s[3];let a;s[4]===Symbol.for("react.memo_cache_sentinel")?(a=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]=a):a=s[4];let c;s[5]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=s[5];let i;s[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(xt,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,l,r,o,a,c,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(Gt,{children:Array.from({length:8}).map(fl)})]})})}),s[7]=n):n=s[7],n}function fl(s,e){return t.jsxs(xt,{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 bt=Object.assign(il,{Skeleton:xl});function pl(s){const e=re.c(34),{client:l,locator:r,baseParams:o,pageSize:a,isStreaming:c,streamingRefetchInterval:i,connectionIds:n,virtualMcpIds:d,tool:h,status:f,searchQuery:v,allConnections:N,allVirtualMcps:u,membersData:L}=s;let g;e[0]!==o||e[1]!==r?(g=ut.monitoringLogsInfinite(r,JSON.stringify(o)),e[0]=o,e[1]=r,e[2]=g):g=e[2];let j;e[3]!==o||e[4]!==l||e[5]!==a?(j=async E=>{const{pageParam:P}=E,X=P===void 0?0:P;if(!l)throw new Error("MCP client is not available");const I=await l.callTool({name:"MONITORING_LOGS_LIST",arguments:{...o,limit:a,offset:X}});return I.structuredContent??I},e[3]=o,e[4]=l,e[5]=a,e[6]=j):j=e[6];let m;e[7]!==a?(m=(E,P)=>{if(!((E?.logs?.length??0)<a))return P.length*a},e[7]=a,e[8]=m):m=e[8];const C=c?i:!1;let w;e[9]!==g||e[10]!==j||e[11]!==m||e[12]!==C?(w={queryKey:g,queryFn:j,initialPageParam:0,getNextPageParam:m,staleTime:0,refetchInterval:C},e[9]=g,e[10]=j,e[11]=m,e[12]=C,e[13]=w):w=e[13];const{data:p,fetchNextPage:_,hasNextPage:S,isFetchingNextPage:x}=Os(w);let M;e[14]!==p.pages?(M=p.pages.flatMap(hl),e[14]=p.pages,e[15]=M):M=e[15];const b=M;let T;e[16]!==_||e[17]!==S||e[18]!==x?(T=()=>{S&&!x&&_()},e[16]=_,e[17]=S,e[18]=x,e[19]=T):T=e[19];const k=T,$=S??!1;let D;return e[20]!==N||e[21]!==u||e[22]!==l||e[23]!==n||e[24]!==k||e[25]!==x||e[26]!==L||e[27]!==b||e[28]!==v||e[29]!==f||e[30]!==$||e[31]!==h||e[32]!==d?(D=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(bt,{connectionIds:n,virtualMcpIds:d,tool:h,status:f,search:v,logs:b,hasMore:$,onLoadMore:k,isLoadingMore:x,connections:N,virtualMcps:u,membersData:L,client:l})})})}),e[20]=N,e[21]=u,e[22]=l,e[23]=n,e[24]=k,e[25]=x,e[26]=L,e[27]=b,e[28]=v,e[29]=f,e[30]=$,e[31]=h,e[32]=d,e[33]=D):D=e[33],D}function hl(s){return s.logs??[]}function gl(s){const e=re.c(43),{filterAgentIds:l,filterUserIds:r,filterStatus:o,virtualMcpOptions:a,memberOptions:c,activeFiltersCount:i,onUpdateFilters:n}=s,[d,h]=q.useState(!1);let f,v;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(It,{size:16}),v=t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),e[0]=f,e[1]=v):(f=e[0],v=e[1]);let N;e[2]!==i?(N=i>0&&t.jsxs(t.Fragment,{children:[t.jsx(qe,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:i}),t.jsx(qe,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:i})]}),e[2]=i,e[3]=N):N=e[3];let u;e[4]!==N?(u=t.jsx(st,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[f,v,N]})}),e[4]=N,e[5]=u):u=e[5];let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("h4",{className:"font-medium text-sm",children:"Filter Chats"}),e[6]=L):L=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agent"}),e[7]=g):g=e[7];let j;e[8]!==n?(j=E=>n({filterAgentIds:E.slice(0,1)}),e[8]=n,e[9]=j):j=e[9];let m;e[10]!==l||e[11]!==j||e[12]!==a?(m=t.jsxs("div",{children:[g,t.jsx(We,{options:a,defaultValue:l,onValueChange:j,placeholder:"All agents",variant:"secondary",className:"w-full",maxCount:1})]}),e[10]=l,e[11]=j,e[12]=a,e[13]=m):m=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"User"}),e[14]=C):C=e[14];let w;e[15]!==n?(w=E=>n({filterUserIds:E.slice(0,1)}),e[15]=n,e[16]=w):w=e[16];let p;e[17]!==r||e[18]!==c||e[19]!==w?(p=t.jsxs("div",{children:[C,t.jsx(We,{options:c,defaultValue:r,onValueChange:w,placeholder:"All users",variant:"secondary",className:"w-full",maxCount:1})]}),e[17]=r,e[18]=c,e[19]=w,e[20]=p):p=e[20];let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),e[21]=_):_=e[21];let S;e[22]!==n?(S=E=>n({filterStatus:E}),e[22]=n,e[23]=S):S=e[23];let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Xe,{className:"w-full",children:t.jsx(Ye,{})}),e[24]=x):x=e[24];let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsxs(Ze,{children:[t.jsx(ge,{value:"all",children:"All statuses"}),t.jsx(ge,{value:"completed",children:"Completed"}),t.jsx(ge,{value:"active",children:"Active"}),t.jsx(ge,{value:"failed",children:"Failed"})]}),e[25]=M):M=e[25];let b;e[26]!==o||e[27]!==S?(b=t.jsxs("div",{children:[_,t.jsxs(et,{value:o,onValueChange:S,children:[x,M]})]}),e[26]=o,e[27]=S,e[28]=b):b=e[28];let T;e[29]!==p||e[30]!==b||e[31]!==m?(T=t.jsxs("div",{className:"space-y-3",children:[m,p,b]}),e[29]=p,e[30]=b,e[31]=m,e[32]=T):T=e[32];let k;e[33]!==i||e[34]!==n?(k=i>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{n({filterAgentIds:[],filterUserIds:[],filterStatus:"all"}),h(!1)},children:"Clear all filters"}),e[33]=i,e[34]=n,e[35]=k):k=e[35];let $;e[36]!==T||e[37]!==k?($=t.jsx(lt,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[L,T,k]})}),e[36]=T,e[37]=k,e[38]=$):$=e[38];let D;return e[39]!==d||e[40]!==$||e[41]!==u?(D=t.jsxs(tt,{open:d,onOpenChange:h,children:[u,$]}),e[39]=d,e[40]=$,e[41]=u,e[42]=D):D=e[42],D}function jl(s){const e=re.c(15),{dateRange:l}=s,{data:r,isLoading:o}=Us(void 0);let a;e[0]!==r?(a=r===void 0?[]:r,e[0]=r,e[1]=a):a=e[1];const c=a,[i,n]=q.useState(null),d=i??c[0]?.id??null,{data:h}=Vs(d??"");let f;e[2]!==l.startDate?(f=l.startDate.toISOString(),e[2]=l.startDate,e[3]=f):f=e[3];let v;e[4]!==l.endDate?(v=l.endDate.toISOString(),e[4]=l.endDate,e[5]=v):v=e[5];let N;e[6]!==f||e[7]!==v?(N={startDate:f,endDate:v},e[6]=f,e[7]=v,e[8]=N):N=e[8];const u=N;let L;return e[9]!==h||e[10]!==c||e[11]!==d||e[12]!==o||e[13]!==u?(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:o?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):c.length===0?t.jsx("div",{className:"py-16",children:t.jsx(St,{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(et,{value:d??"",onValueChange:g=>n(g),children:[t.jsx(Xe,{className:"w-72",children:t.jsx(Ye,{placeholder:"Select an automation…"})}),t.jsx(Ze,{children:c.map(Nl)})]})}),h?t.jsx(ms,{automationId:h.id,triggerIds:h.triggers.map(vl),range:u}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=h,e[10]=c,e[11]=d,e[12]=o,e[13]=u,e[14]=L):L=e[14],L}function vl(s){return s.id}function Nl(s){return t.jsx(ge,{value:s.id,children:s.name},s.id)}const bl=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function yl({connectionIds:s,virtualMcpIds:e,tool:l,status:r,hideSystem:o,propertyFilters:a,connectionOptions:c,virtualMcpOptions:i,activeFiltersCount:n,onUpdateFilters:d,onConnectionSearchChange:h,memberOptions:f,llmUserIds:v=[],onLlmUserIdsChange:N,showMemberFilter:u}){const[L,g]=q.useState(!1),[j,m]=q.useState("form"),[C,w]=q.useState(l),[p,_]=q.useState(a),[S,x]=q.useState(nt(a)),M=q.useRef(l),b=q.useRef(Oe(a));M.current!==l&&(M.current=l,C!==l&&w(l));const T=Oe(a);b.current!==T&&(b.current=T,_(a),x(nt(a)));const k=(I,F)=>{const O=[...p],z=O[I];z&&(O[I]={key:F.key??z.key,operator:F.operator??z.operator,value:F.value??z.value},_(O))},$=()=>{_([...p,{key:"",operator:"eq",value:""}])},D=I=>{const F=p.filter((O,z)=>z!==I);_(F),x(nt(F)),d({propertyFilters:Oe(F)})},E=()=>{d({propertyFilters:Oe(p)})},P=()=>{const I=Rt(S);_(I),d({propertyFilters:Oe(I)})},X=()=>{if(j==="raw"){const I=Rt(S);_(I),m("form")}else x(nt(p)),m("raw")};return t.jsxs(tt,{open:L,onOpenChange:g,children:[t.jsx(st,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(It,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(qe,{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(qe,{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(lt,{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(Ds,{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:o,onCheckedChange:I=>d({hideSystem:!!I})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(We,{options:c,defaultValue:s,onValueChange:I=>d({connectionId:I}),onSearchChange:h,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(We,{options:i,defaultValue:e,onValueChange:I=>d({virtualMcpId:I}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),u&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(We,{options:f??[],defaultValue:v,onValueChange:I=>N?.(I),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:C,onChange:I=>w(I.target.value),onBlur:()=>{C!==l&&d({tool:C})},onKeyDown:I=>{I.key==="Enter"&&C!==l&&d({tool:C})},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(et,{value:r,onValueChange:I=>d({status:I}),children:[t.jsx(Xe,{className:"w-full",children:t.jsx(Ye,{})}),t.jsxs(Ze,{children:[t.jsx(ge,{value:"all",children:"All Status"}),t.jsx(ge,{value:"success",children:"Success Only"}),t.jsx(ge,{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(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:X,children:j==="raw"?t.jsx(Ss,{size:14}):t.jsx(js,{size:14})})}),t.jsx(mt,{children:j==="raw"?"Switch to form view":"Switch to raw text"})]})]}),j==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(_s,{placeholder:`Paste property filters here:
|
|
6
6
|
thread_id=abc123
|
|
7
7
|
user~test
|
|
8
|
-
debug?`,value:S,onChange:I=>x(I.target.value),onBlur:P,onKeyDown:I=>{I.key==="Enter"&&I.metaKey&&P()},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:[p.map((I,F)=>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 ",F+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>D(F),children:t.jsx(Cs,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Qe,{placeholder:"Key (e.g., thread_id)",value:I.key,onChange:O=>k(F,{key:O.target.value}),onBlur:E,onKeyDown:O=>{O.key==="Enter"&&E()},className:"flex-1 font-mono text-sm"}),t.jsxs(et,{value:I.operator,onValueChange:O=>{const z=[...p],A=z[F];A&&(z[F]={...A,operator:O,value:O==="exists"?"":A.value},T(z),d({propertyFilters:Oe(z)}))},children:[t.jsx(Xe,{className:"w-28",children:t.jsx(Ye,{})}),t.jsx(Ze,{children:bl.map(O=>t.jsx(ge,{value:O.value,children:O.label},O.value))})]})]}),I.operator!=="exists"&&t.jsx(Qe,{placeholder:"Value",value:I.value,onChange:O=>k(F,{value:O.target.value}),onBlur:E,onKeyDown:O=>{O.key==="Enter"&&E()},className:"w-full font-mono text-sm"})]},F)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:$,children:[t.jsx(Is,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{w(""),T([]),x(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),g(!1)},children:"Clear all filters"})]})})]})}function wl(s){const e=re.c(113),{tab:l,dateRange:r,displayDateRange:o,connectionIds:a,virtualMcpIds:c,tool:i,status:n,search:d,streaming:h,hideSystem:f,activeFiltersCount:v,from:N,to:u,propertyFilters:L,onUpdateFilters:g,onTimeRangeChange:j,onStreamingToggle:m,onTabChange:C}=s,w=vt(),p=ws(),{data:T}=vs(),[S,x]=K.useState(""),M=S||void 0;let b;e[0]!==M?(b={searchTerm:M},e[0]=M,e[1]=b):b=e[1];const _=vt(b);let k;e[2]!==_?(k=_??[],e[2]=_,e[3]=k):k=e[3];let $;e[4]!==k?($=k.map(Cl),e[4]=k,e[5]=$):$=e[5];const D=$;let E;e[6]!==p?(E=p.map(Il),e[6]=p,e[7]=E):E=e[7];const P=E,{pageSize:X,streamingRefetchInterval:I}=Nt,{org:F,locator:O}=He();let z;e[8]!==F.id||e[9]!==F.slug?(z={connectionId:Ns,orgId:F.id,orgSlug:F.slug},e[8]=F.id,e[9]=F.slug,e[10]=z):z=e[10];const A=bs(z);let q;e[11]!==L?(q=Hs(L),e[11]=L,e[12]=q):q=e[12];const B=q;let U;e[13]!==f||e[14]!==F.id?(U=f?[ys.SELF(F.id)]:void 0,e[13]=f,e[14]=F.id,e[15]=U):U=e[15];const Y=U;let H;e[16]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[16]=H):H=e[16];const[G,V]=K.useState(H);let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[17]=y):y=e[17];const[R,J]=K.useState(y);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,le]=K.useState(te),[W,ne]=K.useState("all"),ce=(R.length>0?1:0)+(Q.length>0?1:0)+(W!=="all"?1:0);let $e;e[19]!==T?($e=Vt(T).map(Sl),e[19]=T,e[20]=$e):$e=e[20];const Ce=$e;let ke;e[21]!==r.startDate?(ke=r.startDate.toISOString(),e[21]=r.startDate,e[22]=ke):ke=e[22];let ie;e[23]!==r.endDate?(ie=r.endDate.toISOString(),e[23]=r.endDate,e[24]=ie):ie=e[24];const Fe=a.length===1?a[0]:void 0,je=c.length===1?c[0]:void 0,ve=i||void 0,Ne=n==="errors"?!0:n==="success"?!1:void 0;let me;e[25]!==Y||e[26]!==B||e[27]!==ke||e[28]!==ie||e[29]!==Fe||e[30]!==je||e[31]!==ve||e[32]!==Ne?(me={startDate:ke,endDate:ie,connectionId:Fe,excludeConnectionIds:Y,virtualMcpId:je,toolName:ve,isError:Ne,...B},e[25]=Y,e[26]=B,e[27]=ke,e[28]=ie,e[29]=Fe,e[30]=je,e[31]=ve,e[32]=Ne,e[33]=me):me=e[33];const be=me;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"overview",label:"Overview"},e[34]=ue):ue=e[34];let xe;e[35]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"audit",label:"Audit"},e[35]=xe):xe=e[35];let fe;e[36]===Symbol.for("react.memo_cache_sentinel")?(fe={id:"threads",label:"Chats"},e[36]=fe):fe=e[36];let pe;e[37]===Symbol.for("react.memo_cache_sentinel")?(pe=[ue,xe,fe,{id:"automations",label:"Automations"}],e[37]=pe):pe=e[37];const _e=pe;let Se;e[38]===Symbol.for("react.memo_cache_sentinel")?(Se=t.jsx(Le.Title,{children:"Monitoring"}),e[38]=Se):Se=e[38];let se;e[39]!==C?(se=Te=>C(Te),e[39]=C,e[40]=se):se=e[40];let ee;e[41]!==se||e[42]!==l?(ee=t.jsx(Kt,{tabs:_e,activeTab:l,onTabChange:se}),e[41]=se,e[42]=l,e[43]=ee):ee=e[43];let ae;e[44]!==v||e[45]!==a||e[46]!==D||e[47]!==S||e[48]!==f||e[49]!==h||e[50]!==G||e[51]!==Ce||e[52]!==m||e[53]!==g||e[54]!==L||e[55]!==n||e[56]!==l||e[57]!==i||e[58]!==c||e[59]!==P?(ae=(l==="overview"||l==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:h?"secondary":"outline",className:"gap-1.5",onClick:m,children:[h&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:"Live"}),h&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(yl,{connectionIds:a,virtualMcpIds:c,tool:i,status:n,hideSystem:f,propertyFilters:L,connectionOptions:D,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:g,connectionSearchTerm:S,onConnectionSearchChange:x,memberOptions:Ce,llmUserIds:G,onLlmUserIdsChange:V,showMemberFilter:l==="overview"})]}),e[44]=v,e[45]=a,e[46]=D,e[47]=S,e[48]=f,e[49]=h,e[50]=G,e[51]=Ce,e[52]=m,e[53]=g,e[54]=L,e[55]=n,e[56]=l,e[57]=i,e[58]=c,e[59]=P,e[60]=ae):ae=e[60];let he;e[61]!==Ce||e[62]!==l||e[63]!==ce||e[64]!==R||e[65]!==W||e[66]!==Q||e[67]!==P?(he=l==="threads"&&t.jsx(gl,{filterAgentIds:R,filterUserIds:Q,filterStatus:W,virtualMcpOptions:P,memberOptions:Ce,activeFiltersCount:ce,onUpdateFilters:Te=>{const{filterAgentIds:Ct,filterUserIds:kt,filterStatus:_t}=Te;Ct!==void 0&&J(Ct),kt!==void 0&&le(kt),_t!==void 0&&ne(_t)}}),e[61]=Ce,e[62]=l,e[63]=ce,e[64]=R,e[65]=W,e[66]=Q,e[67]=P,e[68]=he):he=e[68];let ye;e[69]!==N||e[70]!==u?(ye={from:N,to:u},e[69]=N,e[70]=u,e[71]=ye):ye=e[71];let ze;e[72]!==j||e[73]!==ye?(ze=t.jsx(Zs,{value:ye,onChange:j}),e[72]=j,e[73]=ye,e[74]=ze):ze=e[74];let Ae;e[75]!==ae||e[76]!==he||e[77]!==ze?(Ae=t.jsxs("div",{className:"flex items-center gap-2",children:[ae,he,ze]}),e[75]=ae,e[76]=he,e[77]=ze,e[78]=Ae):Ae=e[78];let Ee;e[79]!==ee||e[80]!==Ae?(Ee=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ee,Ae]}),e[79]=ee,e[80]=Ae,e[81]=Ee):Ee=e[81];let Pe;e[82]!==g||e[83]!==d||e[84]!==l?(Pe=(l==="audit"||l==="threads")&&t.jsx(os,{value:d,onChange:Te=>g({search:Te}),placeholder:l==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Te=>{Te.key==="Escape"&&(g({search:""}),Te.target.blur())},className:"w-full md:w-[375px]"}),e[82]=g,e[83]=d,e[84]=l,e[85]=Pe):Pe=e[85];let Ve;e[86]!==Ee||e[87]!==Pe?(Ve=t.jsx(Le.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[Se,Ee,Pe]})}),e[86]=Ee,e[87]=Pe,e[88]=Ve):Ve=e[88];let Ue;e[89]!==w||e[90]!==p||e[91]!==be||e[92]!==A||e[93]!==a||e[94]!==r||e[95]!==o||e[96]!==Y||e[97]!==h||e[98]!==G||e[99]!==O||e[100]!==T||e[101]!==d||e[102]!==n||e[103]!==l||e[104]!==R||e[105]!==W||e[106]!==Q||e[107]!==i||e[108]!==c?(Ue=l==="automations"?t.jsx(jl,{dateRange:r}):l==="threads"?t.jsx(us,{client:A,locator:O,membersData:T,allConnections:w,allVirtualMcps:p,dateRange:r,searchQuery:d,filterAgentIds:R,filterUserIds:Q,filterStatus:W}):l==="audit"?t.jsx(pl,{client:A,locator:O,baseParams:be,pageSize:X,isStreaming:h,streamingRefetchInterval:I,connectionIds:a,virtualMcpIds:c,tool:i,status:n,searchQuery:d,allConnections:w,allVirtualMcps:p,membersData:T}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rl,{displayDateRange:o,connectionIds:a,excludeConnectionIds:Y,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:w,isStreaming:h,streamingRefetchInterval:I,llmUserIds:G})}),e[89]=w,e[90]=p,e[91]=be,e[92]=A,e[93]=a,e[94]=r,e[95]=o,e[96]=Y,e[97]=h,e[98]=G,e[99]=O,e[100]=T,e[101]=d,e[102]=n,e[103]=l,e[104]=R,e[105]=W,e[106]=Q,e[107]=i,e[108]=c,e[109]=Ue):Ue=e[109];let at;return e[110]!==Ve||e[111]!==Ue?(at=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=at):at=e[112],at}function Sl(s){const e=s.user.name??s.user.email??s.userId,l=s.user.image??void 0;return{value:s.userId,label:e,icon:r=>{const{className:o}=r;return t.jsx(Bt,{url:l,fallback:e,shape:"circle",size:"2xs",className:de("shrink-0",o)})}}}function Il(s){const e=s.icon,l=s.title??"Super Agent";return{value:s.id??"",label:l,icon:r=>{const{className:o}=r;return t.jsx(Be,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(rt,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",o)})}}}function Cl(s){const e=s.icon,l=s.title||s.id;return{value:s.id,label:l,icon:r=>{const{className:o}=r;return t.jsx(Be,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(rt,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",o)})}}}function Ea(){const s=re.c(83),{org:e}=He(),l=yt();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/monitor"},s[0]=r):r=s[0];const o=rs(r),{tab:a,from:c,to:i,connectionId:n,virtualMcpId:d,tool:h,search:f,status:v,streaming:N,propertyFilters:u,hideSystem:L}=o,g=a===void 0?"overview":a;let j;s[1]!==n?(j=n===void 0?[]:n,s[1]=n,s[2]=j):j=s[2];const m=j;let C;s[3]!==d?(C=d===void 0?[]:d,s[3]=d,s[4]=C):C=s[4];const w=C,p=N===void 0?!0:N,T=u===void 0?"":u,S=L===void 0?!1:L;let x,M,b,_,k,$,D;if(s[5]!==m.length||s[6]!==c||s[7]!==S||s[8]!==l||s[9]!==e.slug||s[10]!==T||s[11]!==o||s[12]!==v||s[13]!==p||s[14]!==i||s[15]!==h||s[16]!==w.length){k=Bs(T);let V;s[24]!==l||s[25]!==e.slug||s[26]!==o?(V=Q=>{l({to:"/$org/settings/monitor",params:{org:e.slug},search:{...o,...Q}})},s[24]=l,s[25]=e.slug,s[26]=o,s[27]=V):V=s[27],D=V;let y;s[28]!==D?(y=Q=>{D({from:Q.from,to:Q.to})},s[28]=D,s[29]=y):y=s[29],_=y;let R,J;if(s[30]!==c||s[31]!==p||s[32]!==i){const Q=we(c),le=we(i);J=Q.date||new Date(Date.now()-18e5);const W=le.date||new Date;b={startDate:J,endDate:W},R=W,p&&i==="now"&&(R=new Date(W),R.setHours(R.getHours()+1)),s[30]=c,s[31]=p,s[32]=i,s[33]=b,s[34]=R,s[35]=J}else b=s[33],R=s[34],J=s[35];let te;s[36]!==R||s[37]!==J?(te={startDate:J,endDate:R},s[36]=R,s[37]=J,s[38]=te):te=s[38],M=te,x=0,m.length>0&&x++,w.length>0&&x++,h&&x++,v!=="all"&&x++,S&&x++,$=k.filter(kl),s[5]=m.length,s[6]=c,s[7]=S,s[8]=l,s[9]=e.slug,s[10]=T,s[11]=o,s[12]=v,s[13]=p,s[14]=i,s[15]=h,s[16]=w.length,s[17]=x,s[18]=M,s[19]=b,s[20]=_,s[21]=k,s[22]=$,s[23]=D}else x=s[17],M=s[18],b=s[19],_=s[20],k=s[21],$=s[22],D=s[23];const E=$;E.length>0&&(x=x+E.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Le.Body,{className:"!pb-3",children:t.jsx(Le.Title,{children:"Monitoring"})}),s[39]=P):P=s[39];let X;s[40]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsxs(t.Fragment,{children:[P,t.jsx(Le.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(St,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=X):X=s[40];let I;s[41]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Le.Title,{children:"Monitoring"}),s[41]=I):I=s[41];let F;s[42]===Symbol.for("react.memo_cache_sentinel")?(F=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Chats"},{id:"automations",label:"Automations"}],s[42]=F):F=s[42];let O;s[43]!==D?(O=V=>D({tab:V}),s[43]=D,s[44]=O):O=s[44];let z;s[45]!==O||s[46]!==g?(z=t.jsx(Le.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[I,t.jsx(Kt,{tabs:F,activeTab:g,onTabChange:O})]})}),s[45]=O,s[46]=g,s[47]=z):z=s[47];let A;s[48]!==g?(A=g==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):g==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(ol,{})}),s[48]=g,s[49]=A):A=s[49];let q;s[50]!==z||s[51]!==A?(q=t.jsxs(t.Fragment,{children:[z,A]}),s[50]=z,s[51]=A,s[52]=q):q=s[52];let B;s[53]!==_?(B=V=>{ft("monitoring_time_range_changed",{from:V.from,to:V.to}),_(V)},s[53]=_,s[54]=B):B=s[54];let U;s[55]!==p||s[56]!==D?(U=()=>{ft("monitoring_live_toggled",{enabled:!p}),D({streaming:!p})},s[55]=p,s[56]=D,s[57]=U):U=s[57];let Y;s[58]!==g||s[59]!==D?(Y=V=>{V!==g&&ft("monitoring_tab_changed",{from_tab:g,to_tab:V}),D({tab:V})},s[58]=g,s[59]=D,s[60]=Y):Y=s[60];let H;s[61]!==x||s[62]!==m||s[63]!==M||s[64]!==b||s[65]!==c||s[66]!==S||s[67]!==k||s[68]!==f||s[69]!==v||s[70]!==p||s[71]!==B||s[72]!==U||s[73]!==Y||s[74]!==g||s[75]!==i||s[76]!==h||s[77]!==D||s[78]!==w?(H=t.jsx(wl,{tab:g,dateRange:M,displayDateRange:b,connectionIds:m,virtualMcpIds:w,tool:h,status:v,search:f,streaming:p,hideSystem:S,activeFiltersCount:x,from:c,to:i,propertyFilters:k,onUpdateFilters:D,onTimeRangeChange:B,onStreamingToggle:U,onTabChange:Y}),s[61]=x,s[62]=m,s[63]=M,s[64]=b,s[65]=c,s[66]=S,s[67]=k,s[68]=f,s[69]=v,s[70]=p,s[71]=B,s[72]=U,s[73]=Y,s[74]=g,s[75]=i,s[76]=h,s[77]=D,s[78]=w,s[79]=H):H=s[79];let G;return s[80]!==q||s[81]!==H?(G=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Le,{children:t.jsx(as,{fallback:X,children:t.jsx(K.Suspense,{fallback:q,children:H})})})}),s[80]=q,s[81]=H,s[82]=G):G=s[82],G}function kl(s){return s.key.trim()}export{Ea as default};
|
|
8
|
+
debug?`,value:S,onChange:I=>x(I.target.value),onBlur:P,onKeyDown:I=>{I.key==="Enter"&&I.metaKey&&P()},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:[p.map((I,F)=>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 ",F+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>D(F),children:t.jsx(Cs,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Qe,{placeholder:"Key (e.g., thread_id)",value:I.key,onChange:O=>k(F,{key:O.target.value}),onBlur:E,onKeyDown:O=>{O.key==="Enter"&&E()},className:"flex-1 font-mono text-sm"}),t.jsxs(et,{value:I.operator,onValueChange:O=>{const z=[...p],A=z[F];A&&(z[F]={...A,operator:O,value:O==="exists"?"":A.value},_(z),d({propertyFilters:Oe(z)}))},children:[t.jsx(Xe,{className:"w-28",children:t.jsx(Ye,{})}),t.jsx(Ze,{children:bl.map(O=>t.jsx(ge,{value:O.value,children:O.label},O.value))})]})]}),I.operator!=="exists"&&t.jsx(Qe,{placeholder:"Value",value:I.value,onChange:O=>k(F,{value:O.target.value}),onBlur:E,onKeyDown:O=>{O.key==="Enter"&&E()},className:"w-full font-mono text-sm"})]},F)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:$,children:[t.jsx(Is,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{w(""),_([]),x(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),g(!1)},children:"Clear all filters"})]})})]})}function wl(s){const e=re.c(113),{tab:l,dateRange:r,displayDateRange:o,connectionIds:a,virtualMcpIds:c,tool:i,status:n,search:d,streaming:h,hideSystem:f,activeFiltersCount:v,from:N,to:u,propertyFilters:L,onUpdateFilters:g,onTimeRangeChange:j,onStreamingToggle:m,onTabChange:C}=s,w=vt(),p=ws(),{data:_}=vs(),[S,x]=q.useState(""),M=S||void 0;let b;e[0]!==M?(b={searchTerm:M},e[0]=M,e[1]=b):b=e[1];const T=vt(b);let k;e[2]!==T?(k=T??[],e[2]=T,e[3]=k):k=e[3];let $;e[4]!==k?($=k.map(Cl),e[4]=k,e[5]=$):$=e[5];const D=$;let E;e[6]!==p?(E=p.map(Il),e[6]=p,e[7]=E):E=e[7];const P=E,{pageSize:X,streamingRefetchInterval:I}=Nt,{org:F,locator:O}=He();let z;e[8]!==F.id||e[9]!==F.slug?(z={connectionId:Ns,orgId:F.id,orgSlug:F.slug},e[8]=F.id,e[9]=F.slug,e[10]=z):z=e[10];const A=bs(z);let K;e[11]!==L?(K=Hs(L),e[11]=L,e[12]=K):K=e[12];const B=K;let V;e[13]!==f||e[14]!==F.id?(V=f?[ys.SELF(F.id)]:void 0,e[13]=f,e[14]=F.id,e[15]=V):V=e[15];const Y=V;let H;e[16]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[16]=H):H=e[16];const[G,U]=q.useState(H);let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[17]=y):y=e[17];const[R,J]=q.useState(y);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,le]=q.useState(te),[W,ne]=q.useState("all"),ce=(R.length>0?1:0)+(Q.length>0?1:0)+(W!=="all"?1:0);let $e;e[19]!==_?($e=Ut(_).map(Sl),e[19]=_,e[20]=$e):$e=e[20];const Ce=$e;let ke;e[21]!==r.startDate?(ke=r.startDate.toISOString(),e[21]=r.startDate,e[22]=ke):ke=e[22];let ie;e[23]!==r.endDate?(ie=r.endDate.toISOString(),e[23]=r.endDate,e[24]=ie):ie=e[24];const Fe=a.length===1?a[0]:void 0,je=c.length===1?c[0]:void 0,ve=i||void 0,Ne=n==="errors"?!0:n==="success"?!1:void 0;let me;e[25]!==Y||e[26]!==B||e[27]!==ke||e[28]!==ie||e[29]!==Fe||e[30]!==je||e[31]!==ve||e[32]!==Ne?(me={startDate:ke,endDate:ie,connectionId:Fe,excludeConnectionIds:Y,virtualMcpId:je,toolName:ve,isError:Ne,...B},e[25]=Y,e[26]=B,e[27]=ke,e[28]=ie,e[29]=Fe,e[30]=je,e[31]=ve,e[32]=Ne,e[33]=me):me=e[33];const be=me;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"overview",label:"Overview"},e[34]=ue):ue=e[34];let xe;e[35]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"audit",label:"Audit"},e[35]=xe):xe=e[35];let fe;e[36]===Symbol.for("react.memo_cache_sentinel")?(fe={id:"threads",label:"Chats"},e[36]=fe):fe=e[36];let pe;e[37]===Symbol.for("react.memo_cache_sentinel")?(pe=[ue,xe,fe,{id:"automations",label:"Automations"}],e[37]=pe):pe=e[37];const Te=pe;let Se;e[38]===Symbol.for("react.memo_cache_sentinel")?(Se=t.jsx(Le.Title,{children:"Monitoring"}),e[38]=Se):Se=e[38];let se;e[39]!==C?(se=_e=>C(_e),e[39]=C,e[40]=se):se=e[40];let ee;e[41]!==se||e[42]!==l?(ee=t.jsx(qt,{tabs:Te,activeTab:l,onTabChange:se}),e[41]=se,e[42]=l,e[43]=ee):ee=e[43];let ae;e[44]!==v||e[45]!==a||e[46]!==D||e[47]!==S||e[48]!==f||e[49]!==h||e[50]!==G||e[51]!==Ce||e[52]!==m||e[53]!==g||e[54]!==L||e[55]!==n||e[56]!==l||e[57]!==i||e[58]!==c||e[59]!==P?(ae=(l==="overview"||l==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:h?"secondary":"outline",className:"gap-1.5",onClick:m,children:[h&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:"Live"}),h&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(yl,{connectionIds:a,virtualMcpIds:c,tool:i,status:n,hideSystem:f,propertyFilters:L,connectionOptions:D,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:g,connectionSearchTerm:S,onConnectionSearchChange:x,memberOptions:Ce,llmUserIds:G,onLlmUserIdsChange:U,showMemberFilter:l==="overview"})]}),e[44]=v,e[45]=a,e[46]=D,e[47]=S,e[48]=f,e[49]=h,e[50]=G,e[51]=Ce,e[52]=m,e[53]=g,e[54]=L,e[55]=n,e[56]=l,e[57]=i,e[58]=c,e[59]=P,e[60]=ae):ae=e[60];let he;e[61]!==Ce||e[62]!==l||e[63]!==ce||e[64]!==R||e[65]!==W||e[66]!==Q||e[67]!==P?(he=l==="threads"&&t.jsx(gl,{filterAgentIds:R,filterUserIds:Q,filterStatus:W,virtualMcpOptions:P,memberOptions:Ce,activeFiltersCount:ce,onUpdateFilters:_e=>{const{filterAgentIds:Ct,filterUserIds:kt,filterStatus:Tt}=_e;Ct!==void 0&&J(Ct),kt!==void 0&&le(kt),Tt!==void 0&&ne(Tt)}}),e[61]=Ce,e[62]=l,e[63]=ce,e[64]=R,e[65]=W,e[66]=Q,e[67]=P,e[68]=he):he=e[68];let ye;e[69]!==N||e[70]!==u?(ye={from:N,to:u},e[69]=N,e[70]=u,e[71]=ye):ye=e[71];let ze;e[72]!==j||e[73]!==ye?(ze=t.jsx(Zs,{value:ye,onChange:j}),e[72]=j,e[73]=ye,e[74]=ze):ze=e[74];let Ae;e[75]!==ae||e[76]!==he||e[77]!==ze?(Ae=t.jsxs("div",{className:"flex items-center gap-2",children:[ae,he,ze]}),e[75]=ae,e[76]=he,e[77]=ze,e[78]=Ae):Ae=e[78];let Ee;e[79]!==ee||e[80]!==Ae?(Ee=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ee,Ae]}),e[79]=ee,e[80]=Ae,e[81]=Ee):Ee=e[81];let Pe;e[82]!==g||e[83]!==d||e[84]!==l?(Pe=(l==="audit"||l==="threads")&&t.jsx(os,{value:d,onChange:_e=>g({search:_e}),placeholder:l==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:_e=>{_e.key==="Escape"&&(g({search:""}),_e.target.blur())},className:"w-full md:w-[375px]"}),e[82]=g,e[83]=d,e[84]=l,e[85]=Pe):Pe=e[85];let Ue;e[86]!==Ee||e[87]!==Pe?(Ue=t.jsx(Le.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[Se,Ee,Pe]})}),e[86]=Ee,e[87]=Pe,e[88]=Ue):Ue=e[88];let Ve;e[89]!==w||e[90]!==p||e[91]!==be||e[92]!==A||e[93]!==a||e[94]!==r||e[95]!==o||e[96]!==Y||e[97]!==h||e[98]!==G||e[99]!==O||e[100]!==_||e[101]!==d||e[102]!==n||e[103]!==l||e[104]!==R||e[105]!==W||e[106]!==Q||e[107]!==i||e[108]!==c?(Ve=l==="automations"?t.jsx(jl,{dateRange:r}):l==="threads"?t.jsx(us,{client:A,locator:O,membersData:_,allConnections:w,allVirtualMcps:p,dateRange:r,searchQuery:d,filterAgentIds:R,filterUserIds:Q,filterStatus:W}):l==="audit"?t.jsx(pl,{client:A,locator:O,baseParams:be,pageSize:X,isStreaming:h,streamingRefetchInterval:I,connectionIds:a,virtualMcpIds:c,tool:i,status:n,searchQuery:d,allConnections:w,allVirtualMcps:p,membersData:_}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rl,{displayDateRange:o,connectionIds:a,excludeConnectionIds:Y,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:w,isStreaming:h,streamingRefetchInterval:I,llmUserIds:G})}),e[89]=w,e[90]=p,e[91]=be,e[92]=A,e[93]=a,e[94]=r,e[95]=o,e[96]=Y,e[97]=h,e[98]=G,e[99]=O,e[100]=_,e[101]=d,e[102]=n,e[103]=l,e[104]=R,e[105]=W,e[106]=Q,e[107]=i,e[108]=c,e[109]=Ve):Ve=e[109];let at;return e[110]!==Ue||e[111]!==Ve?(at=t.jsxs(t.Fragment,{children:[Ue,Ve]}),e[110]=Ue,e[111]=Ve,e[112]=at):at=e[112],at}function Sl(s){const e=s.user.name??s.user.email??s.userId,l=s.user.image??void 0;return{value:s.userId,label:e,icon:r=>{const{className:o}=r;return t.jsx(Bt,{url:l,fallback:e,shape:"circle",size:"2xs",className:de("shrink-0",o)})}}}function Il(s){const e=s.icon,l=s.title??"Super Agent";return{value:s.id??"",label:l,icon:r=>{const{className:o}=r;return t.jsx(Be,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(rt,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",o)})}}}function Cl(s){const e=s.icon,l=s.title||s.id;return{value:s.id,label:l,icon:r=>{const{className:o}=r;return t.jsx(Be,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(rt,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",o)})}}}function Ea(){const s=re.c(83),{org:e}=He(),l=yt();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/monitor"},s[0]=r):r=s[0];const o=rs(r),{tab:a,from:c,to:i,connectionId:n,virtualMcpId:d,tool:h,search:f,status:v,streaming:N,propertyFilters:u,hideSystem:L}=o,g=a===void 0?"overview":a;let j;s[1]!==n?(j=n===void 0?[]:n,s[1]=n,s[2]=j):j=s[2];const m=j;let C;s[3]!==d?(C=d===void 0?[]:d,s[3]=d,s[4]=C):C=s[4];const w=C,p=N===void 0?!0:N,_=u===void 0?"":u,S=L===void 0?!1:L;let x,M,b,T,k,$,D;if(s[5]!==m.length||s[6]!==c||s[7]!==S||s[8]!==l||s[9]!==e.slug||s[10]!==_||s[11]!==o||s[12]!==v||s[13]!==p||s[14]!==i||s[15]!==h||s[16]!==w.length){k=Bs(_);let U;s[24]!==l||s[25]!==e.slug||s[26]!==o?(U=Q=>{l({to:"/$org/settings/monitor",params:{org:e.slug},search:{...o,...Q}})},s[24]=l,s[25]=e.slug,s[26]=o,s[27]=U):U=s[27],D=U;let y;s[28]!==D?(y=Q=>{D({from:Q.from,to:Q.to})},s[28]=D,s[29]=y):y=s[29],T=y;let R,J;if(s[30]!==c||s[31]!==p||s[32]!==i){const Q=we(c),le=we(i);J=Q.date||new Date(Date.now()-18e5);const W=le.date||new Date;b={startDate:J,endDate:W},R=W,p&&i==="now"&&(R=new Date(W),R.setHours(R.getHours()+1)),s[30]=c,s[31]=p,s[32]=i,s[33]=b,s[34]=R,s[35]=J}else b=s[33],R=s[34],J=s[35];let te;s[36]!==R||s[37]!==J?(te={startDate:J,endDate:R},s[36]=R,s[37]=J,s[38]=te):te=s[38],M=te,x=0,m.length>0&&x++,w.length>0&&x++,h&&x++,v!=="all"&&x++,S&&x++,$=k.filter(kl),s[5]=m.length,s[6]=c,s[7]=S,s[8]=l,s[9]=e.slug,s[10]=_,s[11]=o,s[12]=v,s[13]=p,s[14]=i,s[15]=h,s[16]=w.length,s[17]=x,s[18]=M,s[19]=b,s[20]=T,s[21]=k,s[22]=$,s[23]=D}else x=s[17],M=s[18],b=s[19],T=s[20],k=s[21],$=s[22],D=s[23];const E=$;E.length>0&&(x=x+E.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Le.Body,{className:"!pb-3",children:t.jsx(Le.Title,{children:"Monitoring"})}),s[39]=P):P=s[39];let X;s[40]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsxs(t.Fragment,{children:[P,t.jsx(Le.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(St,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=X):X=s[40];let I;s[41]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Le.Title,{children:"Monitoring"}),s[41]=I):I=s[41];let F;s[42]===Symbol.for("react.memo_cache_sentinel")?(F=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Chats"},{id:"automations",label:"Automations"}],s[42]=F):F=s[42];let O;s[43]!==D?(O=U=>D({tab:U}),s[43]=D,s[44]=O):O=s[44];let z;s[45]!==O||s[46]!==g?(z=t.jsx(Le.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[I,t.jsx(qt,{tabs:F,activeTab:g,onTabChange:O})]})}),s[45]=O,s[46]=g,s[47]=z):z=s[47];let A;s[48]!==g?(A=g==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):g==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(ol,{})}),s[48]=g,s[49]=A):A=s[49];let K;s[50]!==z||s[51]!==A?(K=t.jsxs(t.Fragment,{children:[z,A]}),s[50]=z,s[51]=A,s[52]=K):K=s[52];let B;s[53]!==T?(B=U=>{ft("monitoring_time_range_changed",{from:U.from,to:U.to}),T(U)},s[53]=T,s[54]=B):B=s[54];let V;s[55]!==p||s[56]!==D?(V=()=>{ft("monitoring_live_toggled",{enabled:!p}),D({streaming:!p})},s[55]=p,s[56]=D,s[57]=V):V=s[57];let Y;s[58]!==g||s[59]!==D?(Y=U=>{U!==g&&ft("monitoring_tab_changed",{from_tab:g,to_tab:U}),D({tab:U})},s[58]=g,s[59]=D,s[60]=Y):Y=s[60];let H;s[61]!==x||s[62]!==m||s[63]!==M||s[64]!==b||s[65]!==c||s[66]!==S||s[67]!==k||s[68]!==f||s[69]!==v||s[70]!==p||s[71]!==B||s[72]!==V||s[73]!==Y||s[74]!==g||s[75]!==i||s[76]!==h||s[77]!==D||s[78]!==w?(H=t.jsx(wl,{tab:g,dateRange:M,displayDateRange:b,connectionIds:m,virtualMcpIds:w,tool:h,status:v,search:f,streaming:p,hideSystem:S,activeFiltersCount:x,from:c,to:i,propertyFilters:k,onUpdateFilters:D,onTimeRangeChange:B,onStreamingToggle:V,onTabChange:Y}),s[61]=x,s[62]=m,s[63]=M,s[64]=b,s[65]=c,s[66]=S,s[67]=k,s[68]=f,s[69]=v,s[70]=p,s[71]=B,s[72]=V,s[73]=Y,s[74]=g,s[75]=i,s[76]=h,s[77]=D,s[78]=w,s[79]=H):H=s[79];let G;return s[80]!==K||s[81]!==H?(G=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Le,{children:t.jsx(as,{fallback:X,children:t.jsx(q.Suspense,{fallback:K,children:H})})})}),s[80]=K,s[81]=H,s[82]=G):G=s[82],G}function kl(s){return s.key.trim()}export{Ea as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-DmhdwAgP.js";import{r as w}from"./sidebar-DnKMI8jz.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 +1 @@
|
|
|
1
|
-
import{c as h,C as x,a as S,u as j,r as C,j as u,Y as I,N as _}from"./index-
|
|
1
|
+
import{c as h,C as x,a as S,u as j,r as C,j as u,Y as I,N as _}from"./index-DmhdwAgP.js";import{a as R}from"./use-mcp-client-DseZ3Mea.js";import{a as b}from"./hooks-DU-2h9eZ.js";import{f as k}from"./reusable-new-chat-CouMjkYR.js";import"./auth-CsHQFHV_.js";import"./decopilot-sse-pool-CEQrv8Fn.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function K(){const t=h.c(12),{org:o}=x(),r=R(o.id).id,{data:p}=S.useSession(),{threads:d,status:f}=b();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const{connect:l,siteUrl:c}=j(a),[g]=C.useState(y);if(f.kind==="loading"){let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=u.jsx(I,{}),t[1]=n):n=t[1],n}const m=k(d,r,p?.user?.id)?.id??g;let e;t[2]!==o.slug||t[3]!==m?(e={org:o.slug,taskId:m},t[2]=o.slug,t[3]=m,t[4]=e):e=t[4];let s;t[5]!==l||t[6]!==r||t[7]!==c?(s={virtualmcpid:r,connect:l,siteUrl:c},t[5]=l,t[6]=r,t[7]=c,t[8]=s):s=t[8];let i;return t[9]!==e||t[10]!==s?(i=u.jsx(_,{to:"/$org/$taskId",params:e,search:s,replace:!0}),t[9]=e,t[10]=s,t[11]=i):i=t[11],i}function y(){return crypto.randomUUID()}export{K as default};
|