decocms 4.3.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-B4WPpzHx.js → AlertCircle-BxTbR_B1.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-n7J2ORua.js → ArrowUpRight-S4NNBOkv.js} +1 -1
- package/dist/client/assets/{CheckCircle-DGqDWZvl.js → CheckCircle-BtIJRHva.js} +1 -1
- package/dist/client/assets/{ChevronDown-BzkFMF52.js → ChevronDown-Ee_3Sayw.js} +1 -1
- package/dist/client/assets/{ChevronRight-BhZIqa2P.js → ChevronRight-DCf9L0Ls.js} +1 -1
- package/dist/client/assets/{ChevronUp-CtzC0jb0.js → ChevronUp-CGE39voI.js} +1 -1
- package/dist/client/assets/{DotsVertical-DskMPw9G.js → DotsVertical-fVEXRB26.js} +1 -1
- package/dist/client/assets/{Eye-Bkw15G1G.js → Eye-fTf2jKhH.js} +1 -1
- package/dist/client/assets/{FilterLines-CTiCp3St.js → FilterLines-Ba5JOCcM.js} +1 -1
- package/dist/client/assets/{Globe01-CIvUZBh0.js → Globe01-DYSo0Sr2.js} +1 -1
- package/dist/client/assets/{Globe04-By_qGXm-.js → Globe04-3H1XgmQN.js} +1 -1
- package/dist/client/assets/{HardDrive-Da-ea-EW.js → HardDrive-JOn6Ez5n.js} +1 -1
- package/dist/client/assets/{Key01-DugFMT5_.js → Key01-DV-6LIf3.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DiQ60pSu.js → LayoutLeft-BtE5tmf6.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BMDEbMBF.js → LinkExternal01-CALVZhat.js} +1 -1
- package/dist/client/assets/{Monitor01-BFD-ivVa.js → Monitor01-CWc8cxQO.js} +1 -1
- package/dist/client/assets/{Palette-DrmZY9bB.js → Palette-Dok2NINN.js} +1 -1
- package/dist/client/assets/{Play-CiiKZLoa.js → Play-CllDczEk.js} +1 -1
- package/dist/client/assets/{Plus-hFZ_SbzL.js → Plus-B6q1KrRb.js} +1 -1
- package/dist/client/assets/{SearchLg-D4Hs4YLQ.js → SearchLg-ZiEk0E-L.js} +1 -1
- package/dist/client/assets/{SearchMd-RBoojwOu.js → SearchMd-CXYhXBwx.js} +1 -1
- package/dist/client/assets/{Settings02-CuT9JazG.js → Settings02-D7AphFkm.js} +1 -1
- package/dist/client/assets/{Shield01-D5Fc_Ylv.js → Shield01-DKJBa4Nn.js} +1 -1
- package/dist/client/assets/{Star01-BMttIRxb.js → Star01-Bf-FCZNm.js} +1 -1
- package/dist/client/assets/{Stars01-HANlppqn.js → Stars01-DlOkHfPH.js} +1 -1
- package/dist/client/assets/{Stars02-Call5O4Q.js → Stars02-BQPdDCaK.js} +1 -1
- package/dist/client/assets/{Sun-B0JI-Irq.js → Sun-BkeePoRn.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BcqnyefE.js → SwitchHorizontal01-5oVLoUdS.js} +1 -1
- package/dist/client/assets/{Tool01-DFCFgRlB.js → Tool01-CYPQsW1Y.js} +1 -1
- package/dist/client/assets/{Trash01-CGEeRKCz.js → Trash01-xnv05M2J.js} +1 -1
- package/dist/client/assets/{Upload01-V0qkIpRk.js → Upload01-Cxp7zIDh.js} +1 -1
- package/dist/client/assets/{User01-Co_ACiCO.js → User01-DuB-iQs0.js} +1 -1
- package/dist/client/assets/{Users01-B-VpMOmx.js → Users01-BkkYER_Z.js} +1 -1
- package/dist/client/assets/{Users03-DBa0-LbB.js → Users03-UgyNhO90.js} +1 -1
- package/dist/client/assets/{X-DlUiLOPC.js → X-DJbyjHqp.js} +1 -1
- package/dist/client/assets/{XCircle-BIxZfFEg.js → XCircle-DaUcrc3Z.js} +1 -1
- package/dist/client/assets/{XClose-CEJj7vhn.js → XClose-Dpj0HG8O.js} +1 -1
- package/dist/client/assets/{Zap-USVmT42t.js → Zap-3WgTvh1l.js} +1 -1
- package/dist/client/assets/{ZapSquare-qeizwUPq.js → ZapSquare-_6Gbk0W4.js} +1 -1
- package/dist/client/assets/{ZoomOut-fkR_2hFy.js → ZoomOut-sMdcQ1z1.js} +1 -1
- package/dist/client/assets/{access-gate-Dob1Rc1a.js → access-gate-D5zqAUht.js} +1 -1
- package/dist/client/assets/{add-section-modal-JApa7Z44.js → add-section-modal-C7LYK9_a.js} +1 -1
- package/dist/client/assets/agent-icon-CGghaYK_.js +1 -0
- package/dist/client/assets/agents-list-Cr4gcaIM.js +1 -0
- package/dist/client/assets/{ai-providers-boT7K-bH.js → ai-providers-DRcnzRGt.js} +1 -1
- package/dist/client/assets/{alert-ez0UE1C8.js → alert-82Lday5Z.js} +1 -1
- package/dist/client/assets/{alert-dialog-BZ8TrIVu.js → alert-dialog-BS58YIPS.js} +2 -2
- package/dist/client/assets/app-editor-C6Aqhesa.js +1 -0
- package/dist/client/assets/{auth-CNqDC7uO.js → auth-ThTV5Po4.js} +1 -1
- package/dist/client/assets/{auth-catchall-BG9GP_5W.js → auth-catchall-DZl4u1uA.js} +1 -1
- package/dist/client/assets/{auth-entry-BAXdJDhh.js → auth-entry-CbD2Yx6O.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BQs9JvYd.js → auth-split-layout-CDtLb6rM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dy2XeMqO.js → authenticate-and-persist-oauth-M7g3Ip6K.js} +1 -1
- package/dist/client/assets/{automation-list-row-DO51bU3z.js → automation-list-row-BpAVCpYu.js} +1 -1
- package/dist/client/assets/automation-runs-Ct44UxLc.js +1 -0
- package/dist/client/assets/automations-kb18v3_J.js +1 -0
- package/dist/client/assets/{avatar-Jhd31ejW.js → avatar-DlocwZ2L.js} +1 -1
- package/dist/client/assets/{badge-cxwmW2xd.js → badge-D5YEUUHD.js} +1 -1
- package/dist/client/assets/{block-document-AtpOGVAy.js → block-document-BRIyZXG2.js} +2 -2
- package/dist/client/assets/{brand-context-D-YGjyHl.js → brand-context-BsgCnvPI.js} +1 -1
- package/dist/client/assets/{buckets-ByuitLd7.js → buckets-B7WQPWC0.js} +1 -1
- package/dist/client/assets/bulk-category-panel-DNM5EmBU.js +1 -0
- package/dist/client/assets/{capability-load-error-C00HLz2q.js → capability-load-error-DT9Z3j9_.js} +1 -1
- package/dist/client/assets/{card-D3bKVB8y.js → card-Cw03QSbR.js} +1 -1
- package/dist/client/assets/category-editor-BmiPat5J.js +1 -0
- package/dist/client/assets/{chat-context-B5uEh4ay.js → chat-context-ooWv73sg.js} +4 -4
- package/dist/client/assets/{checkbox-PMXW46HN.js → checkbox-B68Qec99.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bo07c76Z.js → cli-auth-success-Ddd6u0XZ.js} +1 -1
- package/dist/client/assets/collection-detail-D6Q9VAn2.js +1 -0
- package/dist/client/assets/{collection-display-button-Cu6MzTbi.js → collection-display-button-BMNWXm85.js} +1 -1
- package/dist/client/assets/{collection-search-CN9TCItb.js → collection-search-3IpRbGNr.js} +1 -1
- package/dist/client/assets/{collection-tabs-D5o6VjHd.js → collection-tabs-DddR_OZb.js} +1 -1
- package/dist/client/assets/{command-D-t5bmXW.js → command-DwLXEYqP.js} +1 -1
- package/dist/client/assets/commerce-onboarding-Bck_AFlf.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-DchtPbuP.js → connect-desktop-dialog-CDwS1V65.js} +1 -1
- package/dist/client/assets/{connection-card-BswtsnGE.js → connection-card-DOtnovDK.js} +1 -1
- package/dist/client/assets/connection-detail-BahmY-gv.js +1 -0
- package/dist/client/assets/{connection-form-helpers-JfkHcTGO.js → connection-form-helpers-DP7j8TIB.js} +1 -1
- package/dist/client/assets/connections-CZ4QvltE.js +1 -0
- package/dist/client/assets/{context-menu-Dln5uXsN.js → context-menu-CTpu9MH_.js} +1 -1
- package/dist/client/assets/{decopilot-CfDwLIyX.js → decopilot-B32iA6AV.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DoJkdYBA.js → decopilot-sse-pool-DCtLG819.js} +1 -1
- package/dist/client/assets/{dialog-B2cGEuOv.js → dialog-dc-6JiKe.js} +1 -1
- package/dist/client/assets/{domain-settings-DNJMc9fW.js → domain-settings-DVO7PCYm.js} +1 -1
- package/dist/client/assets/{drawer-Tv6bcT7w.js → drawer-xBBvxQN0.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dw-pnYXI.js → dropdown-menu-DxGNuqoA.js} +1 -1
- package/dist/client/assets/{empty-state-D7nJB9UW.js → empty-state-BUpOZfFd.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CxK1dunT.js → extract-connection-data-qNy8FwuR.js} +1 -1
- package/dist/client/assets/file-explorer-CFShRASg.js +2 -0
- package/dist/client/assets/{file-type-icon-W_AZRfzL.js → file-type-icon-CU03wRXW.js} +1 -1
- package/dist/client/assets/{files-B0cAPQGO.js → files-DbReNsVo.js} +1 -1
- package/dist/client/assets/{form-DI8q6OtF.js → form-BCFMjlpa.js} +1 -1
- package/dist/client/assets/{general-bpWfsinD.js → general-DqokVySt.js} +1 -1
- package/dist/client/assets/{github-repo-picker-M1TBbLot.js → github-repo-picker-DmmFpG_f.js} +1 -1
- package/dist/client/assets/{hooks-DgSrpwcx.js → hooks-BPJw1hei.js} +6 -6
- package/dist/client/assets/{import-from-deco-dialog-IZXHkaJ2.js → import-from-deco-dialog-Cqmqz1ZK.js} +1 -1
- package/dist/client/assets/{index-CABmrUBB.js → index-BEMAWvDc.js} +1 -1
- package/dist/client/assets/{index-CshxsRNd.js → index-BLrDPPMI.js} +1 -1
- package/dist/client/assets/index-BcXb7VeZ.css +1 -0
- package/dist/client/assets/index-CDodpQIo.js +1 -0
- package/dist/client/assets/{index-CO_UO0dQ.js → index-CK3mNMke.js} +1 -1
- package/dist/client/assets/{index-BQIJkmZH.js → index-CLce2SDk.js} +2 -2
- package/dist/client/assets/{index-5MyNR89x.js → index-CcSfK5lN.js} +3 -3
- package/dist/client/assets/{index-Cxp4ZtBG.js → index-Ckv1trie.js} +1 -1
- package/dist/client/assets/{index-BWMRVcd2.js → index-DQFapqGr.js} +27 -27
- package/dist/client/assets/index-DqI8yCZf.js +1 -0
- package/dist/client/assets/{index-5XIJtJJp.js → index-NlBPD228.js} +1 -1
- package/dist/client/assets/{index-BgPTCVWL.js → index-R31BplOc.js} +1 -1
- package/dist/client/assets/{index-BD4HYlEX.js → index-RTYNd1V2.js} +1 -1
- package/dist/client/assets/index-akSYqf8U.js +173 -0
- package/dist/client/assets/{index-BFW_K0gJ.js → index-nRRJjntw.js} +1 -1
- package/dist/client/assets/{index-redirect-Clw5irxr.js → index-redirect-CZcY1QKs.js} +1 -1
- package/dist/client/assets/{input-D9aeO8wK.js → input-DP5SZ5ZB.js} +1 -1
- package/dist/client/assets/{integration-icon-CMGCCNyJ.js → integration-icon-DN8Vp_dc.js} +1 -1
- package/dist/client/assets/{label-Bj7qsNrz.js → label-BwKyZwbE.js} +1 -1
- package/dist/client/assets/{login-BF7DsD8r.js → login-CKE5Qo30.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DEfvhjPc.js → mcp-oauth-BwPcgk4Y.js} +1 -1
- package/dist/client/assets/{members-5GqN16xx.js → members-Dk5LMfPA.js} +1 -1
- package/dist/client/assets/{monaco-editor-B3KzPr3D.js → monaco-editor-DbRZxEyH.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-B6byJzyf.js → monitoring-stats-row-DwWeNnqf.js} +1 -1
- package/dist/client/assets/{oauth-callback-xYG2bhs8.js → oauth-callback-C17HjdP4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DGwgTWgk.js → oauth-callback-ai-provider-rgF6sNOu.js} +1 -1
- package/dist/client/assets/{onboarding-CnEfKMnB.js → onboarding-BNRfMpQ2.js} +1 -1
- package/dist/client/assets/{org-install-DfRej3K2.js → org-install-BnZbsTit.js} +1 -1
- package/dist/client/assets/{org-layout-Bc9Glt8J.js → org-layout-7GtbTFGB.js} +1 -1
- package/dist/client/assets/{organization-choice-DGTNMrAe.js → organization-choice-deKiTsSC.js} +1 -1
- package/dist/client/assets/{page-seo-form-CcZ53r1B.js → page-seo-form-DPZN4zKV.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Dqa4kKTw.js +1 -0
- package/dist/client/assets/popover-B5x5gTCp.js +1 -0
- package/dist/client/assets/post-editor-oh2IXwsc.js +1 -0
- package/dist/client/assets/{primitives-CAIbeS4G.js → primitives-dzbeBlHQ.js} +1 -1
- package/dist/client/assets/{profile-BF9HkmK_.js → profile-Bc0rxORl.js} +1 -1
- package/dist/client/assets/project-app-view-LEo1Vn4l.js +1 -0
- package/dist/client/assets/record-editor-Gj0bd3Dm.js +1 -0
- package/dist/client/assets/registry-DYhqURup.js +2 -0
- package/dist/client/assets/{registry-layout-CRS0SBoX.js → registry-layout-BQWFVx3q.js} +1 -1
- package/dist/client/assets/{require-capability-BclGG3Lq.js → require-capability-Bh5SW_Rr.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CZqB7vUr.js → required-auth-layout-DnZfZ2NE.js} +1 -1
- package/dist/client/assets/{reset-password-CKTIPX2L.js → reset-password-BOF0PLif.js} +1 -1
- package/dist/client/assets/roles-BHggaHP0.js +1 -0
- package/dist/client/assets/{scroll-area-DLqMfi_N.js → scroll-area-KBEcsrNl.js} +54 -54
- package/dist/client/assets/{search-input-BXzntIcj.js → search-input-DfY0Idtt.js} +1 -1
- package/dist/client/assets/{secrets-D5X-Z3Mv.js → secrets-D-WMYerP.js} +1 -1
- package/dist/client/assets/{sections-editor-jc7NLaYJ.js → sections-editor-D_gqV6Dc.js} +2 -2
- package/dist/client/assets/select-0LBXKeau.js +1 -0
- package/dist/client/assets/{select-model-BLeb_gwV.js → select-model-DHY-fBEi.js} +1 -1
- package/dist/client/assets/seo-editor-CPi1zeyc.js +1 -0
- package/dist/client/assets/settings-layout-D7Afx7A0.js +1 -0
- package/dist/client/assets/{settings-section-Br7JxQz6.js → settings-section-DiijSJ5F.js} +1 -1
- package/dist/client/assets/{sheet-M6dgbK60.js → sheet-Ct7wtAfe.js} +1 -1
- package/dist/client/assets/shell-controls-DU_OnqdT.js +1 -0
- package/dist/client/assets/{shell-layout-CnTaR8UN.js → shell-layout-CDjO22II.js} +1 -1
- package/dist/client/assets/shell-route-loading-CqrB-PeS.js +1 -0
- package/dist/client/assets/{sidebar-oYab2QX7.js → sidebar-s0ed1fkY.js} +1 -1
- package/dist/client/assets/{skeleton-DoPnd-4p.js → skeleton-C_Ikhywu.js} +1 -1
- package/dist/client/assets/{sortable.esm-D8GIYMew.js → sortable.esm-7lIk8nOy.js} +2 -2
- package/dist/client/assets/{sso-C9l3tEYi.js → sso-CoJgF1-W.js} +1 -1
- package/dist/client/assets/{store-DXXRJ_VG.js → store-BPq7Nqia.js} +1 -1
- package/dist/client/assets/store-registry-BnNC38bf.js +2 -0
- package/dist/client/assets/{studio-tools-4NjxmaVZ.js → studio-tools-HEHEmVw-.js} +1 -1
- package/dist/client/assets/{switch-DLNzAYS1.js → switch-D5rba96V.js} +1 -1
- package/dist/client/assets/{tab-id-BptcWVWa.js → tab-id-AX1D_RMI.js} +1 -1
- package/dist/client/assets/{table-B06cGuvx.js → table-62RfQr_D.js} +1 -1
- package/dist/client/assets/{tabs-8VxbUDVb.js → tabs-oM87nUQU.js} +1 -1
- package/dist/client/assets/{task-status-Cm29b2AK.js → task-status-CeaMIgEp.js} +1 -1
- package/dist/client/assets/{textarea-Bwn2Wdf8.js → textarea-CVXNf-WA.js} +1 -1
- package/dist/client/assets/{toggle-group-CndOAl-N.js → toggle-group-BKEhvkzp.js} +1 -1
- package/dist/client/assets/toolbar-BupXX3L-.js +1 -0
- package/dist/client/assets/toolbar-icon-button-SISLmn3t.js +1 -0
- package/dist/client/assets/{tools-list-DL7ip2gg.js → tools-list-DUfNx_di.js} +1 -1
- package/dist/client/assets/tooltip-Bmj8PlAJ.js +1 -0
- package/dist/client/assets/{types-U3TqUYrY.js → types-Op5a7f4H.js} +4 -4
- package/dist/client/assets/{use-ai-providers-D4m0Vu5Q.js → use-ai-providers-la4AIHaF.js} +1 -1
- package/dist/client/assets/{use-automations-ChKoVegP.js → use-automations-DEaRUIlF.js} +1 -1
- package/dist/client/assets/{use-capability-CQPMPR-5.js → use-capability-BHX3IXJ3.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CJO5qoT7.js → use-clock-tick-CFuWOCEr.js} +1 -1
- package/dist/client/assets/{use-collections-DAKL2YGx.js → use-collections-CrBZtgZk.js} +1 -1
- package/dist/client/assets/{use-connection-BvgL1-Da.js → use-connection-DKlrZD28.js} +1 -1
- package/dist/client/assets/{use-copy-WaepYGtr.js → use-copy-Bh4dFYsC.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-C3Y4h4CF.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-mA5Fw-09.js → use-debounced-autosave-Ygvicrk8.js} +1 -1
- package/dist/client/assets/{use-debounced-value-cQ7ZQKtl.js → use-debounced-value-2_5DMhS6.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BDkaUhLT.js → use-decopilot-events-CVwOiMhy.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B9XKLaZf.js → use-delete-connection-CTv7SwDX.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dfeoim5G.js → use-file-configs-D21Ck6kN.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-4tV6tFjB.js → use-infinite-scroll-DuPlVcYm.js} +1 -1
- package/dist/client/assets/{use-join-requests-CdAJlpjO.js → use-join-requests-CZlC6_lG.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CherrXvD.js → use-mcp-client-CWJJ80Qb.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BnOdccbh.js → use-mcp-prompts-C9VlrieU.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-w6KwNDra.js → use-mcp-tools-CXfsDocs.js} +1 -1
- package/dist/client/assets/{use-members-ge80zFlj.js → use-members-BUflZqKM.js} +1 -1
- package/dist/client/assets/{use-mobile-lIIxFH5C.js → use-mobile-Cg20Hyt3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BtVHPn7N.js → use-navigate-to-agent-Vbfee0Zl.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Ctxe3HXF.js → use-org-auth-client-C_5ald3U.js} +1 -1
- package/dist/client/assets/{use-org-fs-D-40uH2W.js → use-org-fs-BwJ8cmxH.js} +1 -1
- package/dist/client/assets/{use-org-sso-BxzKK5rO.js → use-org-sso-BSFJGRQT.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DmQYT9Pn.js → use-organization-roles-DChXn0D6.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CZfEdu0P.js → use-organization-settings-DJVuBTtS.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C_VqH6te.js → use-registry-connections-M3aYVWwj.js} +1 -1
- package/dist/client/assets/{use-secrets-Dn4coT0R.js → use-secrets-BJQohwUW.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CWHPQWBO.js → use-status-sounds-CGe3HaCo.js} +1 -1
- package/dist/client/assets/{use-view-mode--ERDyrf1.js → use-view-mode-DGxdFIYR.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C5pbd140.js → use-virtual-mcp-CHZDkVtB.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-yG_KEAOQ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CnJ1E1GC.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-CRdXyKYB.js → useSuspenseQueries-DmSeACIV.js} +1 -1
- package/dist/client/assets/variant-calendar-Cunl_q8R.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BP4LoXpd.js → view-mode-toggle-468Aaag6.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChevronLeft-B-p3uhTp.js +0 -1
- package/dist/client/assets/agent-icon-CCm6veEh.js +0 -1
- package/dist/client/assets/agents-list-CsmaOmeB.js +0 -1
- package/dist/client/assets/app-editor-D5hlOetk.js +0 -1
- package/dist/client/assets/automation-runs-CXnAhWiY.js +0 -1
- package/dist/client/assets/automations-akz_oClO.js +0 -1
- package/dist/client/assets/bulk-category-panel-Bu7vkdyV.js +0 -1
- package/dist/client/assets/category-editor-AxaHD2PX.js +0 -1
- package/dist/client/assets/collection-detail-DEEAX0DE.js +0 -1
- package/dist/client/assets/commerce-onboarding-CljjzqU2.js +0 -1
- package/dist/client/assets/connection-detail-Dt-8hGUD.js +0 -1
- package/dist/client/assets/connections-D2zRczhs.js +0 -1
- package/dist/client/assets/file-explorer-dyfhIxpy.js +0 -2
- package/dist/client/assets/index-BqKQnks_.css +0 -1
- package/dist/client/assets/index-BvxT8QID.js +0 -1
- package/dist/client/assets/index-CU_03aq0.js +0 -1
- package/dist/client/assets/index-Db0TT11B.js +0 -169
- package/dist/client/assets/page-seo-sheet-D8FULk67.js +0 -1
- package/dist/client/assets/popover-DowpnV25.js +0 -1
- package/dist/client/assets/post-editor-SVRg54TN.js +0 -1
- package/dist/client/assets/preview-dialog-CwTtT7qa.js +0 -5
- package/dist/client/assets/project-app-view-BQ4gYl-m.js +0 -1
- package/dist/client/assets/record-editor-BNOUgLnP.js +0 -1
- package/dist/client/assets/registry-Bo4vnNv4.js +0 -2
- package/dist/client/assets/roles-DTMTF-Ml.js +0 -1
- package/dist/client/assets/select-CZgnwyj0.js +0 -1
- package/dist/client/assets/seo-editor-BCj_Owpk.js +0 -1
- package/dist/client/assets/settings-layout-QQo5fqWD.js +0 -1
- package/dist/client/assets/shell-controls-CqC5zeBM.js +0 -1
- package/dist/client/assets/shell-route-loading-DFu6UBUI.js +0 -1
- package/dist/client/assets/store-registry-DuMrJjAm.js +0 -2
- package/dist/client/assets/toolbar-ClL4Dhs_.js +0 -1
- package/dist/client/assets/tooltip-DvT2WKW9.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-BSTwTG_J.js +0 -1
- package/dist/client/assets/useInfiniteQuery-_sl5B1oR.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_eC9d3ii.js +0 -1
- package/dist/client/assets/variant-calendar-Dqcgu1C1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as N,j as s,C as ut,r as A,l as W,i as ms,v as J,D as de,a as ve,F as fs,K as At,k as $t,b as Le,e as xs,u as fn,G as xn,H as pn,o as hn,s as gn,n as bn,p as jn,d as vn,B as Xe,I as Sn,J as yn,t as Te,M as Nn,P as _n,x as Cn,m as wn,y as kn,R as In,T as Tn,U as On,V as Oe,W as ps,X as An,Y as hs,Z as $n,_ as Pn,$ as zn,a0 as Dn,a1 as Mn,a2 as Rn,a3 as En,E as gs,O as Fn}from"./index-CcSfK5lN.js";import{u as Be,S as ae,a as Se,b as mt,c as ft,d as Ae,e as bs,f as js,g as Hn,h as Gn,i as Ct,j as Ln,k as Bn,l as Un}from"./sidebar-s0ed1fkY.js";import{u as Pt}from"./use-mobile-Cg20Hyt3.js";import{T as ce}from"./toolbar-icon-button-SISLmn3t.js";import{a as Fe,b as He,T as Ge,c as qt}from"./tooltip-Bmj8PlAJ.js";import{S as je}from"./skeleton-C_Ikhywu.js";import{P as xt,a as Qe,b as pt}from"./popover-B5x5gTCp.js";import{D as vs,a as Ss,b as ys}from"./drawer-xBBvxQN0.js";import{i as Ns}from"./SearchMd-CXYhXBwx.js";import{s as qn}from"./Star01-Bf-FCZNm.js";import{s as Ee}from"./Plus-B6q1KrRb.js";import{i as Wn,u as Kn,S as Vn,a as Yn}from"./use-mcp-client-CWJJ80Qb.js";import{u as _s,a as zt,b as Xn}from"./use-virtual-mcp-CHZDkVtB.js";import{u as Qn}from"./use-create-virtual-mcp-C3Y4h4CF.js";import{I as Jn,u as Zn,W as er}from"./import-from-deco-dialog-Cqmqz1ZK.js";import{A as Je,a as Wt,b as Kt,c as Cs,d as tr,i as sr,s as nr,e as rr,f as or}from"./agent-icon-CGghaYK_.js";import{G as ir,a as lr}from"./github-repo-picker-DmmFpG_f.js";import{u as ws,a as ar,b as ks,T as cr}from"./hooks-BPJw1hei.js";import{r as dr,u as ur,R as mr,a as fr,b as Is}from"./shell-layout-CDjO22II.js";import{u as xr,g as Ts,a as pr,b as hr,s as gr,c as br,r as jr,d as vr,e as Sr,f as yr,p as Nr,h as _r,i as Cr,j as wr,k as kr,l as Ir,m as Tr,n as Or,T as St,S as yt,o as Ar,q as $r,t as Os}from"./use-navigate-to-agent-Vbfee0Zl.js";import{g as Pr,u as As,A as $s,a as zr,b as Vt,K as Dr,P as Mr,s as Rr,S as Er,v as Fr,D as Hr,c as Gr,d as Lr,C as Br,e as Ur}from"./sortable.esm-7lIk8nOy.js";import{i as qr}from"./LayoutLeft-BtE5tmf6.js";import{A as wt}from"./avatar-DlocwZ2L.js";import{i as Dt}from"./ChevronUp-CGE39voI.js";import{a as Yt}from"./Eye-fTf2jKhH.js";import{n as Wr,i as Kr}from"./Globe01-DYSo0Sr2.js";import{i as Vr}from"./ZoomOut-sMdcQ1z1.js";import{i as Yr,a as Ps}from"./ZapSquare-_6Gbk0W4.js";import{i as zs}from"./Monitor01-CWc8cxQO.js";import{n as Xr,a as Qr}from"./Sun-BkeePoRn.js";import{a as tt,b as Jr,i as Zr}from"./Settings02-D7AphFkm.js";import{i as eo}from"./Shield01-DKJBa4Nn.js";import{a as to}from"./Users03-UgyNhO90.js";import{s as Mt}from"./XClose-Dpj0HG8O.js";import{A as so,a as no,b as ro,c as oo,d as io,e as lo,f as ao}from"./alert-dialog-BS58YIPS.js";import{F as co,a as uo,b as mo,c as fo,d as xo,f as po,e as ho}from"./form-BCFMjlpa.js";import{I as go}from"./input-DP5SZ5ZB.js";import{S as bo,C as jo}from"./chat-context-ooWv73sg.js";import"./index-NlBPD228.js";import{n as Rt}from"./Stars02-BQPdDCaK.js";import{u as vo,v as So,C as yo}from"./connect-desktop-dialog-CDwS1V65.js";import{u as No,a as _o}from"./use-join-requests-CZlC6_lG.js";import{i as Et}from"./ChevronRight-DCf9L0Ls.js";import{i as Co}from"./FilterLines-Ba5JOCcM.js";import{S as wo,a as ko,b as Io,c as To,d as Oo}from"./select-0LBXKeau.js";import{u as Ao,S as Xt,M as $o}from"./shell-controls-DU_OnqdT.js";import{c as Po,a as zo,b as Do,d as Mo,e as Ro}from"./dialog-dc-6JiKe.js";import{C as Eo,a as Fo,b as Ho,c as Go,d as Lo}from"./command-DwLXEYqP.js";import{u as Ds}from"./studio-tools-HEHEmVw-.js";import{i as Bo}from"./Zap-3WgTvh1l.js";import{u as Uo}from"./use-org-auth-client-C_5ald3U.js";import{C as nt,a as Qt,b as Ms,c as Rs,d as Es}from"./context-menu-CTpu9MH_.js";import{T as Ft,S as qo}from"./shell-route-loading-CqrB-PeS.js";import{t as Fs}from"./ChevronDown-Ee_3Sayw.js";import{S as Wo}from"./task-status-CeaMIgEp.js";import{T as Ko,a as Vo,b as Jt,c as Zt}from"./tabs-oM87nUQU.js";import{T as ie}from"./toolbar-BupXX3L-.js";import"./sheet-Ct7wtAfe.js";import"./X-DJbyjHqp.js";import"./auth-ThTV5Po4.js";import"./use-collections-CrBZtgZk.js";import"./use-connection-DKlrZD28.js";import"./github-installations-DzN1UQ4x.js";import"./collection-search-3IpRbGNr.js";import"./AlertCircle-BxTbR_B1.js";import"./Tool01-CYPQsW1Y.js";import"./SwitchHorizontal01-5oVLoUdS.js";import"./XCircle-DaUcrc3Z.js";import"./ArrowUpRight-S4NNBOkv.js";import"./CheckCircle-BtIJRHva.js";import"./DotsVertical-fVEXRB26.js";import"./Globe04-3H1XgmQN.js";import"./HardDrive-JOn6Ez5n.js";import"./Key01-DV-6LIf3.js";import"./LinkExternal01-CALVZhat.js";import"./Palette-Dok2NINN.js";import"./Play-CllDczEk.js";import"./SearchLg-ZiEk0E-L.js";import"./Stars01-DlOkHfPH.js";import"./Trash01-xnv05M2J.js";import"./Upload01-Cxp7zIDh.js";import"./User01-DuB-iQs0.js";import"./Users01-BkkYER_Z.js";import"./checkbox-B68Qec99.js";import"./use-debounced-value-2_5DMhS6.js";import"./authenticate-and-persist-oauth-M7g3Ip6K.js";import"./mcp-oauth-BwPcgk4Y.js";import"./use-mcp-tools-CXfsDocs.js";import"./extract-connection-data-qNy8FwuR.js";import"./decopilot-sse-pool-DCtLG819.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-DnZfZ2NE.js";import"./tab-id-AX1D_RMI.js";import"./use-organization-settings-DJVuBTtS.js";import"./use-org-sso-BSFJGRQT.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DOtnovDK.js";import"./use-registry-connections-M3aYVWwj.js";import"./useInfiniteQuery-yG_KEAOQ.js";import"./use-infinite-scroll-DuPlVcYm.js";import"./card-Cw03QSbR.js";import"./integration-icon-DN8Vp_dc.js";import"./collection-tabs-DddR_OZb.js";import"./badge-D5YEUUHD.js";import"./textarea-CVXNf-WA.js";import"./connection-form-helpers-DP7j8TIB.js";import"./useSuspenseInfiniteQuery-CnJ1E1GC.js";import"./use-ai-providers-la4AIHaF.js";import"./label-BwKyZwbE.js";import"./use-decopilot-events-CVwOiMhy.js";import"./use-capability-BHX3IXJ3.js";import"./index-RTYNd1V2.js";import"./use-clock-tick-CFuWOCEr.js";import"./differenceInSeconds-NQ4PDo0z.js";function Yo(t){const e=N.c(5),{onPointerDown:n,onDoubleClick:r}=t,{state:o,isMobile:i}=Be();if(i||o==="collapsed")return null;let l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={left:"var(--sidebar-width)"},a=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[0]=l,e[1]=a):(l=e[0],a=e[1]);let c;return e[2]!==r||e[3]!==n?(c=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:r,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:l,children:a}),e[2]=r,e[3]=n,e[4]=c):c=e[4],c}const Ht=240,Xo=400,Qo="sidebar.width";function et(t){return Math.max(Ht,Math.min(Xo,t))}function Jo(){const t=N.c(11),[e,n]=ut(Qo,Zo),r=A.useRef(null);let o;t[0]!==n||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=et(e),h=r.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of x)b.style.transition="none";const p=b=>{const j=et(f+(b.clientX-m));h?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=et(f+(b.clientX-m));n(j);for(const S of x)S.style.transition="";window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",p),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let l;t[3]!==n?(l=()=>{n(Ht)},t[3]=n,t[4]=l):l=t[4];const a=l;let c;t[5]!==e?(c=et(e),t[5]=e,t[6]=c):c=t[6];let d;return t[7]!==i||t[8]!==a||t[9]!==c?(d={width:c,wrapperRef:r,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=c,t[10]=d):d=t[10],d}function Zo(t){return typeof t=="number"?et(t):Ht}function ei(t){const e=N.c(21),{value:n,onChange:r,placeholder:o,onKeyDown:i,className:l,isSearching:a,disabled:c}=t,d=o===void 0?"Search...":o;let u;e[0]!==l?(u=W("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=u):u=e[1];const m=c?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==m?(f=W("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(ms,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(Ns,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let x;e[6]!==r?(x=j=>r(j.target.value),e[6]=r,e[7]=x):x=e[7];let p;e[8]!==c||e[9]!==i||e[10]!==d||e[11]!==x||e[12]!==n?(p=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:i,placeholder:d,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=i,e[10]=d,e[11]=x,e[12]=n,e[13]=p):p=e[13];let g;e[14]!==f||e[15]!==h||e[16]!==p?(g=s.jsxs("label",{className:f,children:[h,p]}),e[14]=f,e[15]=h,e[16]=p,e[17]=g):g=e[17];let b;return e[18]!==u||e[19]!==g?(b=s.jsx("div",{className:u,children:g}),e[18]=u,e[19]=g,e[20]=b):b=e[20],b}const ti="Select an existing agent";function si(t){const e=N.c(5),{children:n}=t;let r;e[0]!==n?(r=s.jsx(Fe,{asChild:!0,children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(He,{side:"right",sideOffset:8,children:ti}),e[2]=o):o=e[2];let i;return e[3]!==r?(i=s.jsxs(Ge,{defaultOpen:!0,delayDuration:0,children:[r,o]}),e[3]=r,e[4]=i):i=e[4],i}function ni(){const t=N.c(5),{enableDecoImport:e}=fs(),{data:n}=ve.useSession();let r;t[0]!==n?.user?.email?(r=At.decoProfile(n?.user?.email),t[0]=n?.user?.email,t[1]=r):r=t[1];const o=!!e&&!!n?.user?.email;let i;t[2]!==r||t[3]!==o?(i={queryKey:r,queryFn:ri,enabled:o,staleTime:3e5},t[2]=r,t[3]=o,t[4]=i):i=t[4];const{data:l}=$t(i);return l?.isDecoUser??!1}async function ri(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function oi(t){const e=Le(),{create:n}=ws(),{locator:r}=de(),o=xs({strict:!1}),i=fn({strict:!1});return async l=>{const a=crypto.randomUUID(),c=l===i.virtualmcpid?dr(t,r,o.taskId??""):null;try{await n({id:a,virtual_mcp_id:l,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:l}})}}function ii(t){const e=N.c(9),{agent:n,onClick:r}=t;let o;e[0]!==n.icon||e[1]!==n.title?(o=s.jsx(Je,{icon:n.icon,name:n.title,size:"md",className:"transition-transform group-hover:scale-105"}),e[0]=n.icon,e[1]=n.title,e[2]=o):o=e[2];let i;e[3]!==n.title?(i=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:n.title}),e[3]=n.title,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==o||e[7]!==i?(l=s.jsxs("button",{type:"button",onClick:r,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[o,i]}),e[5]=r,e[6]=o,e[7]=i,e[8]=l):l=e[8],l}function li(t){const e=N.c(56),{onClose:n,onOpenImportDeco:r,onOpenGithubImport:o}=t,[i,l]=A.useState(""),a=_s(),c=a??[],{org:d}=de(),{data:u}=ve.useSession(),m=u?.user?.id??"anon",f=Ts(a),h=pr();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={navigateOnCreate:!0},e[0]=x):x=e[0];const{createVirtualMCP:p,isCreating:g}=Qn(x),{createFromTemplate:b,isCreating:j}=Zn(),S=ni(),y=oi(d.slug),C=Pr(a),w=i.toLowerCase(),_=c.filter(ai).filter(ee=>!C.has(ee.id)).filter(ee=>!i||ee.title.toLowerCase().includes(w)),I=ee=>{hr({orgId:d.id,userId:m},ee.id,f),h(),n(),l(""),y(ee.id)},O="flex flex-col max-h-[min(640px,80dvh)]";let T;e[1]!==i?(T=s.jsx(ei,{value:i,onChange:l,placeholder:"Search agents..."}),e[1]=i,e[2]=T):T=e[2];const z="overflow-y-auto flex-1 min-h-0 px-3 pb-3";let $;e[3]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx("div",{className:"px-1 pt-3 pb-2",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agents"})}),e[3]=$):$=e[3];const k="grid grid-cols-3 gap-1";let R;e[4]!==p||e[5]!==n?(R=async()=>{J("agent_create_new_clicked",{source:"browse_popover"}),await p(),n()},e[4]=p,e[5]=n,e[6]=R):R=e[6];let L,H;e[7]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Ee,{size:16,className:"text-muted-foreground"})}),H=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Create new"}),e[7]=L,e[8]=H):(L=e[7],H=e[8]);let M;e[9]!==g||e[10]!==R?(M=s.jsxs("button",{type:"button",disabled:g,onClick:R,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[L,H]}),e[9]=g,e[10]=R,e[11]=M):M=e[11];let E;e[12]!==b||e[13]!==n?(E=async()=>{J("agent_create_clicked",{source:"browse_popover",method:"website"}),await b(er),n()},e[12]=b,e[13]=n,e[14]=E):E=e[14];let D,q;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(qn,{className:"size-5 text-muted-foreground"})}),q=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Start Website"}),e[15]=D,e[16]=q):(D=e[15],q=e[16]);let B;e[17]!==j||e[18]!==E?(B=s.jsxs("button",{type:"button",disabled:j,onClick:E,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[D,q]}),e[17]=j,e[18]=E,e[19]=B):B=e[19];let K;e[20]!==n||e[21]!==o?(K=()=>{J("agent_import_clicked",{source:"github"}),o(),n()},e[20]=n,e[21]=o,e[22]=K):K=e[22];let G,Y;e[23]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(lr,{className:"size-5 text-muted-foreground"})}),Y=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import GitHub"}),e[23]=G,e[24]=Y):(G=e[23],Y=e[24]);let U;e[25]!==K?(U=s.jsxs("button",{type:"button",onClick:K,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[G,Y]}),e[25]=K,e[26]=U):U=e[26];let X;e[27]!==S||e[28]!==n||e[29]!==r?(X=S&&s.jsxs("button",{type:"button",onClick:()=>{J("agent_import_clicked",{source:"deco"}),r(),n()},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"",className:"size-5 object-contain"})}),s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import deco.cx"})]}),e[27]=S,e[28]=n,e[29]=r,e[30]=X):X=e[30];const se=_.map(ee=>s.jsx(ii,{agent:ee,onClick:()=>I(ee)},ee.id));let Q;e[31]!==M||e[32]!==B||e[33]!==U||e[34]!==X||e[35]!==se?(Q=s.jsxs("div",{className:k,children:[M,B,U,X,se]}),e[31]=M,e[32]=B,e[33]=U,e[34]=X,e[35]=se,e[36]=Q):Q=e[36];let te;e[37]!==g||e[38]!==i||e[39]!==_.length?(te=_.length===0&&!g&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[37]=g,e[38]=i,e[39]=_.length,e[40]=te):te=e[40];let V;e[41]!==Q||e[42]!==te||e[43]!==$?(V=s.jsxs("div",{className:z,children:[$,Q,te]}),e[41]=Q,e[42]=te,e[43]=$,e[44]=V):V=e[44];let Z;e[45]!==d.slug?(Z={org:d.slug},e[45]=d.slug,e[46]=Z):Z=e[46];let re;e[47]!==n?(re=()=>n(),e[47]=n,e[48]=re):re=e[48];let ne;e[49]!==Z||e[50]!==re?(ne=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(xn,{to:"/$org/settings/agents",params:Z,onClick:re,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[49]=Z,e[50]=re,e[51]=ne):ne=e[51];let oe;return e[52]!==V||e[53]!==ne||e[54]!==T?(oe=s.jsxs("div",{className:O,children:[T,V,ne]}),e[52]=V,e[53]=ne,e[54]=T,e[55]=oe):oe=e[55],oe}function ai(t){return!Wn(t.id)}function Hs(t){const e=N.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:r}=n,o=r===void 0?!1:r,[i,l]=A.useState(!1),[a,c]=A.useState(!1),[d,u]=A.useState(!1),m=Pt(),{setOpenMobile:f}=Be(),h=xr(),x=h?"border border-border":void 0;let p;e[2]!==h?(p=O=>h?s.jsx(si,{children:O}):O,e[2]=h,e[3]=p):p=e[3];const g=p;let b;e[4]!==m||e[5]!==f?(b=()=>{l(!1),m&&f(!1)},e[4]=m,e[5]=f,e[6]=b):b=e[6];const j=b;let S;e[7]!==j||e[8]!==i?(S=i&&s.jsx(A.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(je,{className:"h-4 w-24"})}),children:s.jsx(li,{onClose:j,onOpenImportDeco:()=>c(!0),onOpenGithubImport:()=>{u(!0),j()}})}),e[7]=j,e[8]=i,e[9]=S):S=e[9];const y=S;let C;e[10]!==o||e[11]!==x||e[12]!==h||e[13]!==m||e[14]!==i||e[15]!==y||e[16]!==g?(C=m?s.jsxs(s.Fragment,{children:[o?g(s.jsx(ce,{"aria-label":"Browse agents",className:W(x),onClick:()=>{J("agent_browser_opened",{surface:"mobile_drawer"}),l(!0)},children:s.jsx(Ee,{className:"size-4"})})):s.jsx(ae,{children:g(s.jsxs(Se,{tooltip:h?void 0:"Browse agents",className:W(x),onClick:()=>{J("agent_browser_opened",{surface:"mobile_drawer"}),l(!0)},children:[s.jsx(Ee,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(vs,{open:i,onOpenChange:l,direction:"bottom",children:s.jsxs(Ss,{className:"max-h-[85dvh] p-0",children:[s.jsx(ys,{className:"sr-only",children:"Browse agents"}),y]})})]}):s.jsxs(xt,{open:i,onOpenChange:O=>{O&&!i&&J("agent_browser_opened",{surface:"desktop_popover"}),l(O)},children:[o?g(s.jsx(Qe,{asChild:!0,children:s.jsx(ce,{"aria-label":"Browse agents",className:W(x),children:s.jsx(Ee,{className:"size-4"})})})):s.jsx(ae,{children:g(s.jsx(Qe,{asChild:!0,children:s.jsxs(Se,{tooltip:h?void 0:"Browse agents",className:W(x),children:[s.jsx(Ee,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(pt,{className:"w-[380px] p-0 overflow-hidden",side:"right",align:"start",children:y})]}),e[10]=o,e[11]=x,e[12]=h,e[13]=m,e[14]=i,e[15]=y,e[16]=g,e[17]=C):C=e[17];let w;e[18]!==a?(w=s.jsx(Jn,{open:a,onOpenChange:c}),e[18]=a,e[19]=w):w=e[19];let _;e[20]!==d?(_=s.jsx(ir,{open:d,onOpenChange:u}),e[20]=d,e[21]=_):_=e[21];let I;return e[22]!==C||e[23]!==w||e[24]!==_?(I=s.jsxs(s.Fragment,{children:[C,w,_]}),e[22]=C,e[23]=w,e[24]=_,e[25]=I):I=e[25],I}function Gs(){const t=N.c(3);de();const{state:e,isMobile:n}=Be(),r=!n&&e==="collapsed";let o;if(t[0]!==r){if(o=[],r){let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i={type:"custom",key:"new-task",content:s.jsx(mt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ft,{children:s.jsx(Ae,{className:"gap-1.5",children:s.jsx(Hs,{})})})})},t[2]=i):i=t[2],o.push(i)}t[0]=r,t[1]=o}else o=t[1];return o}function Ls(t){const e=N.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=r):r=e[0];let o;return e[1]!==n?(o=s.jsxs(mt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[r,s.jsx(ft,{children:s.jsx(Ae,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function Bs(t){const e=N.c(18),{item:n}=t,{isMobile:r,setOpenMobile:o}=Be();let i;e[0]!==r||e[1]!==n||e[2]!==o?(i=()=>{J("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:r}),n.onClick?.(),r&&o(!1)},e[0]=r,e[1]=n,e[2]=o,e[3]=i):i=e[3];const l=i,a=n.key,c=n.isActive&&"z-10";let d;e[4]!==c?(d=W(c),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==l||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(Se,{onClick:l,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=l,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==d||e[16]!==m?(f=s.jsx(ae,{className:d,children:m},a),e[14]=n.key,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function ci(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(bs,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(ui),e[2]=n.group.items,e[3]=i):i=e[3];let l;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(l=s.jsx(Ls,{label:r,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=l):l=e[7],l}case"items":{let r;e[8]!==n.items?(r=n.items.map(di),e[8]=n.items,e[9]=r):r=e[9];let o;return e[10]!==r?(o=s.jsx(mt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ft,{children:s.jsx(Ae,{className:"gap-1.5",children:r})})}),e[10]=r,e[11]=o):o=e[11],o}case"custom":return n.content}}function di(t){return s.jsx(Bs,{item:t},t.key)}function ui(t){return s.jsx(Bs,{item:t},t.key)}function mi(t){const e=N.c(14),{sections:n,footer:r,additionalContent:o,variant:i,contentClassName:l}=t,a=i===void 0?"sidebar":i;let c;e[0]!==l?(c=W("flex flex-col flex-1 px-2 py-2 gap-0.5",l),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==n?(d=n.map(fi),e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o?(u=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[4]=o,e[5]=u):u=e[5];let m;e[6]!==c||e[7]!==d||e[8]!==u?(m=s.jsxs(js,{className:c,children:[d,u]}),e[6]=c,e[7]=d,e[8]=u,e[9]=m):m=e[9];let f;return e[10]!==r||e[11]!==m||e[12]!==a?(f=s.jsxs(Hn,{variant:a,children:[m,r]}),e[10]=r,e[11]=m,e[12]=a,e[13]=f):f=e[13],f}function fi(t,e){return s.jsx(ci,{section:t},e)}function Us(t){const e=N.c(2);let n;return e[0]!==t?(n=s.jsx(mi,{...t}),e[0]=t,e[1]=n):n=e[1],n}Us.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(je,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function xi(t){const e=N.c(16),{onToggle:n,className:r}=t,i=fs().logo??pn,l=typeof i=="string"?i:i.light,a=typeof i=="string"?i:i.dark;let c;e[0]!==r?(c=W("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==l?(d=s.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=l,e[3]=d):d=e[3];let u;e[4]!==a?(u=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=u):u=e[5];let m;e[6]!==d||e[7]!==u?(m=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[d,u]})}),e[6]=d,e[7]=u,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(qr,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(ce,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let x;return e[12]!==c||e[13]!==m||e[14]!==h?(x=s.jsxs(Gn,{className:c,children:[m,h]}),e[12]=c,e[13]=m,e[14]=h,e[15]=x):x=e[15],x}function es(t){const e=N.c(18),{item:n,onClose:r}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=W(o),e[0]=o,e[1]=i):i=e[1];let l;e[2]!==n||e[3]!==r?(l=()=>{n.onClick?.(),r()},e[2]=n,e[3]=r,e[4]=l):l=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let c;e[7]!==n.label?(c=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=c):c=e[8];let d;e[9]!==n.isActive||e[10]!==n.label||e[11]!==l||e[12]!==a||e[13]!==c?(d=s.jsxs(Se,{onClick:l,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,c]}),e[9]=n.isActive,e[10]=n.label,e[11]=l,e[12]=a,e[13]=c,e[14]=d):d=e[14];let u;return e[15]!==i||e[16]!==d?(u=s.jsx(ae,{className:i,children:d}),e[15]=i,e[16]=d,e[17]=u):u=e[17],u}function pi(t){const e=N.c(18),{section:n,onClose:r}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(bs,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let l;if(e[2]!==r||e[3]!==n.group.items){let c;e[5]!==r?(c=d=>s.jsx(es,{item:d,onClose:r},d.key),e[5]=r,e[6]=c):c=e[6],l=n.group.items.map(c),e[2]=r,e[3]=n.group.items,e[4]=l}else l=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==l?(a=s.jsx(Ls,{label:o,defaultExpanded:i,children:l}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=l,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==r||e[12]!==n.items){let l;e[14]!==r?(l=a=>s.jsx(es,{item:a,onClose:r},a.key),e[14]=r,e[15]=l):l=e[15],o=n.items.map(l),e[11]=r,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(mt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ft,{children:s.jsx(Ae,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function hi(t){const e=N.c(17),{sections:n,onClose:r,footer:o,additionalContent:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=l):l=e[0];let a;e[1]!==r?(a=s.jsx(A.Suspense,{fallback:l,children:s.jsx(xi,{onToggle:r})}),e[1]=r,e[2]=a):a=e[2];let c;if(e[3]!==r||e[4]!==n){let f;e[6]!==r?(f=(h,x)=>s.jsx(pi,{section:h,onClose:r},x),e[6]=r,e[7]=f):f=e[7],c=n.map(f),e[3]=r,e[4]=n,e[5]=c}else c=e[5];let d;e[8]!==i?(d=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[8]=i,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=s.jsxs(js,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let m;return e[13]!==o||e[14]!==a||e[15]!==u?(m=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,u,o]}),e[13]=o,e[14]=a,e[15]=u,e[16]=m):m=e[16],m}function qs(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const gi=hn({name:gn().min(2,"Organization name is required")});function bi(t){const e=N.c(41),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={resolver:bn(gi),defaultValues:{name:""}},e[0]=o):o=e[0];const i=jn(o);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:vi,onSuccess:ji},e[1]=l):l=e[1];const a=vn(l),c=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(ro,{children:[s.jsx(oo,{children:"Create a new organization"}),s.jsx(io,{children:"Set up a new organization to collaborate with others."})]}),e[2]=d):d=e[2];let u;if(e[3]!==a||e[4]!==i){let _;e[6]!==a?(_=I=>a.mutateAsync(I),e[6]=a,e[7]=_):_=e[7],u=i.handleSubmit(_),e[3]=a,e[4]=i,e[5]=u}else u=e[5];let m;e[8]!==i.formState.isSubmitting?(m=_=>{const{field:I}=_;return s.jsxs(mo,{children:[s.jsx(fo,{children:"Organization Name"}),s.jsx(xo,{children:s.jsx(go,{...I,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(po,{children:"The name of your company or organization"}),I.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",qs(I.value)]})]}),s.jsx(ho,{})]})},e[8]=i.formState.isSubmitting,e[9]=m):m=e[9];let f;e[10]!==i.control||e[11]!==m?(f=s.jsx(co,{control:i.control,name:"name",render:m}),e[10]=i.control,e[11]=m,e[12]=f):f=e[12];let h;e[13]!==c?(h=c&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:c}),e[13]=c,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==i?(x=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=x):x=e[17];let p;e[18]!==i.formState.isSubmitting||e[19]!==x?(p=s.jsx(so,{disabled:i.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=x,e[20]=p):p=e[20];const g=!i.formState.isValid||i.formState.isSubmitting;let b;e[21]!==i.formState.isSubmitting?(b=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(bo,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==g||e[24]!==b?(j=s.jsx(Xe,{type:"submit",variant:"default",disabled:g,children:b}),e[23]=g,e[24]=b,e[25]=j):j=e[25];let S;e[26]!==j||e[27]!==p?(S=s.jsxs(lo,{children:[p,j]}),e[26]=j,e[27]=p,e[28]=S):S=e[28];let y;e[29]!==S||e[30]!==u||e[31]!==f||e[32]!==h?(y=s.jsxs("form",{className:"space-y-6",onSubmit:u,autoComplete:"off",children:[f,h,S]}),e[29]=S,e[30]=u,e[31]=f,e[32]=h,e[33]=y):y=e[33];let C;e[34]!==i||e[35]!==y?(C=s.jsxs(no,{children:[d,s.jsx(uo,{...i,children:y})]}),e[34]=i,e[35]=y,e[36]=C):C=e[36];let w;return e[37]!==r||e[38]!==n||e[39]!==C?(w=s.jsx(ao,{open:n,onOpenChange:r,children:C}),e[37]=r,e[38]=n,e[39]=C,e[40]=w):w=e[40],w}function ji(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function vi(t){const e=qs(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await ve.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const r=n?.data?.slug??e;if(!r)throw new Error("Failed to create organization");return{orgSlug:r}}function kt(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function Si(t){const e=N.c(13),{org:n,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",l=o==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=W(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==n.logo||e[3]!==n.name?(c=n.logo?void 0:kt(n.name),e[2]=n.logo,e[3]=n.name,e[4]=c):c=e[4];let d;e[5]!==n.logo||e[6]!==n.name||e[7]!==l?(d=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:W("font-semibold leading-none",l),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=l,e[8]=d):d=e[8];let u;return e[9]!==a||e[10]!==c||e[11]!==d?(u=s.jsx("div",{className:a,style:c,children:d}),e[9]=a,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function rt(t){const e=N.c(22),{item:n,onClose:r}=t;if(n.href){const c=n.external?"_blank":void 0,d=n.external?"noopener noreferrer":void 0;let u;e[0]!==n.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=u):u=e[1];let m;e[2]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=m):m=e[3];let f;return e[4]!==n.href||e[5]!==r||e[6]!==c||e[7]!==d||e[8]!==u||e[9]!==m?(f=s.jsxs("a",{href:n.href,target:c,rel:d,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",onClick:r,children:[u,m]}),e[4]=n.href,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=m,e[10]=f):f=e[10],f}let o;e[11]!==n||e[12]!==r?(o=()=>{n.onClick?.(),r()},e[11]=n,e[12]=r,e[13]=o):o=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=e[15];let l;e[16]!==n.label?(l=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=l):l=e[17];let a;return e[18]!==o||e[19]!==i||e[20]!==l?(a=s.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",children:[i,l]}),e[18]=o,e[19]=i,e[20]=l,e[21]=a):a=e[21],a}function ts(t){const e=N.c(31),{orgParam:n,onSelectOrg:r,onCreateOrg:o}=t,{data:i}=Cn();let l;e[0]!==n?(l=(k,R)=>k.slug===n?-1:R.slug===n?1:k.name.localeCompare(R.name),e[0]=n,e[1]=l):l=e[1];const a=[...i??[]].sort(l),[c,d]=A.useState(!1),[u,m]=A.useState(""),f=u.toLowerCase(),h=f?a.filter(k=>k.name.toLowerCase().includes(f)||k.slug.toLowerCase().includes(f)):a;let x;e[2]!==c?(x=function(){c&&m(""),d(yi)},e[2]=c,e[3]=x):x=e[3];const p=x;let g;e[4]!==u||e[5]!==c||e[6]!==p?(g=c?s.jsx("input",{autoFocus:!0,type:"text",value:u,onChange:k=>m(k.target.value),onKeyDown:k=>k.key==="Escape"&&p(),placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}):s.jsx("span",{className:"text-sm font-medium text-muted-foreground/60",children:"Your Organizations"}),e[4]=u,e[5]=c,e[6]=p,e[7]=g):g=e[7];let b;e[8]!==c?(b=c?s.jsx(Mt,{size:16}):s.jsx(Ns,{size:16}),e[8]=c,e[9]=b):b=e[9];let j;e[10]!==b||e[11]!==p?(j=s.jsx("button",{type:"button",onClick:p,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:b}),e[10]=b,e[11]=p,e[12]=j):j=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ee,{size:16}),e[13]=S):S=e[13];let y;e[14]!==o?(y=s.jsx("button",{type:"button",onClick:o,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:S}),e[14]=o,e[15]=y):y=e[15];let C;e[16]!==j||e[17]!==y?(C=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j,y]}),e[16]=j,e[17]=y,e[18]=C):C=e[18];let w;e[19]!==g||e[20]!==C?(w=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[g,C]}),e[19]=g,e[20]=C,e[21]=w):w=e[21];const _="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",I=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:u?`No organizations match "${u}"`:"No organizations available"});let O;e[22]!==r||e[23]!==n?(O=k=>s.jsxs("button",{type:"button",onClick:()=>r(k.slug),className:W("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(Si,{org:k,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===n&&s.jsx(Dt,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[22]=r,e[23]=n,e[24]=O):O=e[24];const T=h.map(O);let z;e[25]!==I||e[26]!==T?(z=s.jsxs("div",{className:_,children:[I,T]}),e[25]=I,e[26]=T,e[27]=z):z=e[27];let $;return e[28]!==z||e[29]!==w?($=s.jsxs(s.Fragment,{children:[w,z]}),e[28]=z,e[29]=w,e[30]=$):$=e[30],$}function yi(t){return!t}function ss(t){const e=N.c(142),{user:n,userImage:r,menuItems:o,signOutItem:i,themeOptions:l,preferences:a,setPreferences:c,orgParam:d,onSelectOrg:u,onCreateOrg:m,close:f,isMobile:h,open:x}=t;if(h){const V=n?.name??"U";let Z;e[0]!==V||e[1]!==r?(Z=s.jsx(wt,{url:r,fallback:V,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=V,e[1]=r,e[2]=Z):Z=e[2];const re=n?.name??"User";let ne;e[3]!==re?(ne=s.jsx("p",{className:"text-sm font-medium truncate",children:re}),e[3]=re,e[4]=ne):ne=e[4];const oe=n?.email;let ee;e[5]!==oe?(ee=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:oe}),e[5]=oe,e[6]=ee):ee=e[6];let $e;e[7]!==ne||e[8]!==ee?($e=s.jsxs("div",{className:"flex-1 min-w-0",children:[ne,ee]}),e[7]=ne,e[8]=ee,e[9]=$e):$e=e[9];let le;e[10]!==n?(le=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(wi)},e[10]=n,e[11]=le):le=e[11];let ye;e[12]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Yt,{size:14}),e[12]=ye):ye=e[12];let fe;e[13]!==le?(fe=s.jsx(Fe,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:le,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:ye})}),e[13]=le,e[14]=fe):fe=e[14];let qe;e[15]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx(He,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=qe):qe=e[15];let Pe;e[16]!==fe?(Pe=s.jsx(qt,{delayDuration:300,children:s.jsxs(Ge,{children:[fe,qe]})}),e[16]=fe,e[17]=Pe):Pe=e[17];let xe;e[18]!==Pe||e[19]!==Z||e[20]!==$e?(xe=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[Z,$e,Pe]}),e[18]=Pe,e[19]=Z,e[20]=$e,e[21]=xe):xe=e[21];const pe=String(x);let he;e[22]!==m||e[23]!==u||e[24]!==d||e[25]!==pe?(he=s.jsx("div",{className:"border-b border-border pb-2",children:s.jsx(ts,{orgParam:d,onSelectOrg:u,onCreateOrg:m},pe)}),e[22]=m,e[23]=u,e[24]=d,e[25]=pe,e[26]=he):he=e[26];let me;if(e[27]!==f||e[28]!==o){let ue;e[30]!==f?(ue=Ve=>s.jsx(rt,{item:Ve,onClose:f},Ve.key),e[30]=f,e[31]=ue):ue=e[31],me=o.map(ue),e[27]=f,e[28]=o,e[29]=me}else me=e[29];let ge;e[32]!==f||e[33]!==i?(ge=s.jsx(rt,{item:i,onClose:f}),e[32]=f,e[33]=i,e[34]=ge):ge=e[34];let ze;e[35]!==me||e[36]!==ge?(ze=s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[me,ge]}),e[35]=me,e[36]=ge,e[37]=ze):ze=e[37];let De;e[38]!==he||e[39]!==ze?(De=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[he,ze]}),e[38]=he,e[39]=ze,e[40]=De):De=e[40];let Ne;if(e[41]!==a.theme||e[42]!==c||e[43]!==l){let ue;e[45]!==a.theme||e[46]!==c?(ue=Ve=>{const{value:Ye,icon:Ut,label:vt}=Ve;return s.jsx("button",{type:"button","aria-label":vt,onClick:()=>c(st=>({...st,theme:Ye})),className:W("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Ye?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Ut},Ye)},e[45]=a.theme,e[46]=c,e[47]=ue):ue=e[47],Ne=l.map(ue),e[41]=a.theme,e[42]=c,e[43]=l,e[44]=Ne}else Ne=e[44];let be;e[48]!==Ne?(be=s.jsx("div",{className:"flex items-center gap-0.5",children:Ne}),e[48]=Ne,e[49]=be):be=e[49];const Ue=a.enableSounds?"Disable sounds":"Enable sounds";let _e;e[50]!==c?(_e=()=>c(Ci),e[50]=c,e[51]=_e):_e=e[51];const Ze=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Me;e[52]!==Ze?(Me=W("size-8 rounded-md flex items-center justify-center transition-colors",Ze),e[52]=Ze,e[53]=Me):Me=e[53];let Ce;e[54]!==a.enableSounds?(Ce=a.enableSounds?s.jsx(Wt,{size:14}):s.jsx(Kt,{size:14}),e[54]=a.enableSounds,e[55]=Ce):Ce=e[55];let we;e[56]!==Ue||e[57]!==_e||e[58]!==Me||e[59]!==Ce?(we=s.jsx("button",{type:"button","aria-label":Ue,onClick:_e,className:Me,children:Ce}),e[56]=Ue,e[57]=_e,e[58]=Me,e[59]=Ce,e[60]=we):we=e[60];let We;e[61]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.5.0"]}),e[61]=We):We=e[61];let ke;e[62]!==we?(ke=s.jsxs("div",{className:"flex items-center gap-2",children:[we,We]}),e[62]=we,e[63]=ke):ke=e[63];let Ie;e[64]!==be||e[65]!==ke?(Ie=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[be,ke]}),e[64]=be,e[65]=ke,e[66]=Ie):Ie=e[66];let Ke;return e[67]!==xe||e[68]!==De||e[69]!==Ie?(Ke=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[xe,De,Ie]}),e[67]=xe,e[68]=De,e[69]=Ie,e[70]=Ke):Ke=e[70],Ke}const p=n?.name??"U";let g;e[71]!==p||e[72]!==r?(g=s.jsx(wt,{url:r,fallback:p,shape:"circle",size:"sm",className:"shrink-0"}),e[71]=p,e[72]=r,e[73]=g):g=e[73];const b=n?.name??"User";let j;e[74]!==b?(j=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[74]=b,e[75]=j):j=e[75];const S=n?.email;let y;e[76]!==S?(y=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:S}),e[76]=S,e[77]=y):y=e[77];let C;e[78]!==j||e[79]!==y?(C=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,y]}),e[78]=j,e[79]=y,e[80]=C):C=e[80];let w;e[81]!==n?(w=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(_i)},e[81]=n,e[82]=w):w=e[82];let _;e[83]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Yt,{size:14}),e[83]=_):_=e[83];let I;e[84]!==w?(I=s.jsx(Fe,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:w,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[84]=w,e[85]=I):I=e[85];let O;e[86]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(He,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[86]=O):O=e[86];let T;e[87]!==I?(T=s.jsx(qt,{delayDuration:300,children:s.jsxs(Ge,{children:[I,O]})}),e[87]=I,e[88]=T):T=e[88];let z;e[89]!==T||e[90]!==g||e[91]!==C?(z=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[g,C,T]}),e[89]=T,e[90]=g,e[91]=C,e[92]=z):z=e[92];let $;if(e[93]!==f||e[94]!==o){let V;e[96]!==f?(V=Z=>s.jsx(rt,{item:Z,onClose:f},Z.key),e[96]=f,e[97]=V):V=e[97],$=o.map(V),e[93]=f,e[94]=o,e[95]=$}else $=e[95];let k;e[98]!==f||e[99]!==i?(k=s.jsx(rt,{item:i,onClose:f}),e[98]=f,e[99]=i,e[100]=k):k=e[100];let R;e[101]!==$||e[102]!==k?(R=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[$,k]}),e[101]=$,e[102]=k,e[103]=R):R=e[103];let L;if(e[104]!==a.theme||e[105]!==c||e[106]!==l){let V;e[108]!==a.theme||e[109]!==c?(V=Z=>{const{value:re,icon:ne,label:oe}=Z;return s.jsx("button",{type:"button","aria-label":oe,onClick:()=>c(ee=>({...ee,theme:re})),className:W("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===re?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ne},re)},e[108]=a.theme,e[109]=c,e[110]=V):V=e[110],L=l.map(V),e[104]=a.theme,e[105]=c,e[106]=l,e[107]=L}else L=e[107];let H;e[111]!==L?(H=s.jsx("div",{className:"flex items-center gap-0.5",children:L}),e[111]=L,e[112]=H):H=e[112];const M=a.enableSounds?"Disable sounds":"Enable sounds";let E;e[113]!==c?(E=()=>c(Ni),e[113]=c,e[114]=E):E=e[114];const D=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let q;e[115]!==D?(q=W("size-7 rounded-md flex items-center justify-center transition-colors",D),e[115]=D,e[116]=q):q=e[116];let B;e[117]!==a.enableSounds?(B=a.enableSounds?s.jsx(Wt,{size:14}):s.jsx(Kt,{size:14}),e[117]=a.enableSounds,e[118]=B):B=e[118];let K;e[119]!==M||e[120]!==E||e[121]!==q||e[122]!==B?(K=s.jsx("button",{type:"button","aria-label":M,onClick:E,className:q,children:B}),e[119]=M,e[120]=E,e[121]=q,e[122]=B,e[123]=K):K=e[123];let G;e[124]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.5.0"]}),e[124]=G):G=e[124];let Y;e[125]!==K?(Y=s.jsxs("div",{className:"flex items-center gap-2",children:[K,G]}),e[125]=K,e[126]=Y):Y=e[126];let U;e[127]!==H||e[128]!==Y?(U=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[H,Y]}),e[127]=H,e[128]=Y,e[129]=U):U=e[129];let X;e[130]!==z||e[131]!==R||e[132]!==U?(X=s.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-border bg-sidebar/75",children:[z,R,U]}),e[130]=z,e[131]=R,e[132]=U,e[133]=X):X=e[133];const se=String(x);let Q;e[134]!==m||e[135]!==u||e[136]!==d||e[137]!==se?(Q=s.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:s.jsx(ts,{orgParam:d,onSelectOrg:u,onCreateOrg:m},se)}),e[134]=m,e[135]=u,e[136]=d,e[137]=se,e[138]=Q):Q=e[138];let te;return e[139]!==X||e[140]!==Q?(te=s.jsxs("div",{className:"flex min-h-[380px] w-full overflow-hidden",children:[X,Q]}),e[139]=X,e[140]=Q,e[141]=te):te=e[141],te}function Ni(t){return{...t,enableSounds:!t.enableSounds}}function _i(){Te.success("User ID copied")}function Ci(t){return{...t,enableSounds:!t.enableSounds}}function wi(){Te.success("User ID copied")}function It(){const t=N.c(44),{data:e}=ve.useSession(),{org:n}=de(),r=Le();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org",shouldThrow:!1},t[0]=o):o=t[0];const l=Sn(o)?.params.org,[a,c]=yn(),d=Pt(),[u,m]=A.useState(!1),[f,h]=A.useState(!1),x=e?.user,p=x?.image;let g;t[1]!==r?(g=X=>{m(!1),r({to:"/$org",params:{org:X}})},t[1]=r,t[2]=g):g=t[2];const b=g;let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(!1),t[3]=j):j=t[3];const S=j;let y;t[4]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(tt,{size:16}),t[4]=y):y=t[4];let C;t[5]!==r||t[6]!==l?(C={key:"preferences",label:"Preferences",icon:y,onClick:()=>{r({to:"/$org/settings/profile",params:{org:l??""}})}},t[5]=r,t[6]=l,t[7]=C):C=t[7];let w;t[8]!==n||t[9]!==r?(w=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Wr,{size:16}),onClick:()=>{r({to:"/$org/install",params:{org:n.slug}})}}]:[],t[8]=n,t[9]=r,t[10]=w):w=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={key:"terms",label:"Terms of Use",icon:s.jsx(Vr,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[11]=_):_=t[11];let I;t[12]===Symbol.for("react.memo_cache_sentinel")?(I={key:"privacy",label:"Privacy Policy",icon:s.jsx(eo,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[12]=I):I=t[12];let O;t[13]===Symbol.for("react.memo_cache_sentinel")?(O={key:"github",label:"decocms/studio",icon:s.jsx(Nn,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[13]=O):O=t[13];let T;t[14]===Symbol.for("react.memo_cache_sentinel")?(T={key:"community",label:"Community",icon:s.jsx(to,{size:16}),href:"https://decocms.com/discord",external:!0},t[14]=T):T=t[14];let z;t[15]===Symbol.for("react.memo_cache_sentinel")?(z={key:"homepage",label:"Homepage",icon:s.jsx(Kr,{size:16}),href:"https://decocms.com",external:!0},t[15]=z):z=t[15];let $;t[16]!==C||t[17]!==w?($=[C,...w,_,I,O,T,z],t[16]=C,t[17]=w,t[18]=$):$=t[18];const k=$;let R;t[19]===Symbol.for("react.memo_cache_sentinel")?(R={key:"logout",label:"Sign out",icon:s.jsx(Yr,{size:16}),onClick:Ii},t[19]=R):R=t[19];const L=R;let H;t[20]===Symbol.for("react.memo_cache_sentinel")?(H={value:"light",icon:s.jsx(Xr,{size:14}),label:"Light theme"},t[20]=H):H=t[20];let M;t[21]===Symbol.for("react.memo_cache_sentinel")?(M={value:"dark",icon:s.jsx(Qr,{size:14}),label:"Dark theme"},t[21]=M):M=t[21];let E;t[22]===Symbol.for("react.memo_cache_sentinel")?(E=[H,M,{value:"system",icon:s.jsx(zs,{size:14}),label:"System theme"}],t[22]=E):E=t[22];const D=E;let q;t[23]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{m(!1),h(!0)},t[23]=q):q=t[23];let B;t[24]!==b||t[25]!==d||t[26]!==k||t[27]!==u||t[28]!==l||t[29]!==a||t[30]!==c||t[31]!==x||t[32]!==p?(B={user:x,userImage:p,menuItems:k,signOutItem:L,themeOptions:D,preferences:a,setPreferences:c,orgParam:l,onSelectOrg:b,onCreateOrg:q,close:S,isMobile:d,open:u},t[24]=b,t[25]=d,t[26]=k,t[27]=u,t[28]=l,t[29]=a,t[30]=c,t[31]=x,t[32]=p,t[33]=B):B=t[33];const K=B;let G;t[34]!==n||t[35]!==d||t[36]!==u||t[37]!==K?(G=d?s.jsxs(vs,{open:u,onOpenChange:m,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>m(!0),className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("div",{className:"shrink-0 size-5 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:kt(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[8px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]}),s.jsxs(Ss,{className:"h-[80dvh] p-0",children:[s.jsx(ys,{className:"sr-only",children:"Account"}),s.jsx(ss,{...K})]})]}):s.jsxs(xt,{open:u,onOpenChange:m,children:[s.jsx(Qe,{asChild:!0,children:s.jsxs(Se,{tooltip:n?.name??"Account",className:"rounded-md",children:[s.jsx("div",{className:"shrink-0 size-6 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:kt(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[9px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]})}),s.jsx(pt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[520px] p-0 flex max-h-[520px]",onCloseAutoFocus:ki,children:s.jsx(ss,{...K})})]}),t[34]=n,t[35]=d,t[36]=u,t[37]=K,t[38]=G):G=t[38];let Y;t[39]!==f?(Y=s.jsx(bi,{open:f,onOpenChange:h}),t[39]=f,t[40]=Y):Y=t[40];let U;return t[41]!==G||t[42]!==Y?(U=s.jsxs(s.Fragment,{children:[G,Y]}),t[41]=G,t[42]=Y,t[43]=U):U=t[43],U}function ki(t){return t.preventDefault()}function Ii(){J("signed_out",{source:"account_popover"}),_n(),ve.signOut()}function Tt(){const t=N.c(22),e=vo(),[n,r]=A.useState(!1);let o;if(t[0]!==e.capabilities||t[1]!==e.hostname||t[2]!==e.machineId||t[3]!==e.online){const p=So(e.capabilities);o=e.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:e.hostname??e.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:p.length>0?`Available: ${p.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),t[0]=e.capabilities,t[1]=e.hostname,t[2]=e.machineId,t[3]=e.online,t[4]=o}else o=t[4];const i=o;let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=()=>r(!0),t[5]=l):l=t[5];const a=e.online?"Desktop linked":"Connect your desktop";let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(zs,{size:16}),t[6]=c):c=t[6];let d;t[7]!==e.online?(d=e.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),t[7]=e.online,t[8]=d):d=t[8];let u;t[9]!==a||t[10]!==d?(u=s.jsx(Fe,{asChild:!0,children:s.jsxs(ce,{onClick:l,"aria-label":a,children:[c,d]})}),t[9]=a,t[10]=d,t[11]=u):u=t[11];let m;t[12]!==i?(m=s.jsx(He,{side:"bottom",children:i}),t[12]=i,t[13]=m):m=t[13];let f;t[14]!==u||t[15]!==m?(f=s.jsxs(Ge,{children:[u,m]}),t[14]=u,t[15]=m,t[16]=f):f=t[16];let h;t[17]!==n?(h=s.jsx(yo,{open:n,onOpenChange:r}),t[17]=n,t[18]=h):h=t[18];let x;return t[19]!==f||t[20]!==h?(x=s.jsxs(s.Fragment,{children:[f,h]}),t[19]=f,t[20]=h,t[21]=x):x=t[21],x}function Ti({invitation:t}){const[e,n]=A.useState(!1),[r,o]=A.useState(!1),i=wn(),l=async()=>{n(!0);try{const d=await ve.organization.acceptInvitation({invitationId:t.id});if(d.error){Te.error(d.error.message),n(!1);return}}catch{Te.error("Failed to accept invitation"),n(!1);return}Te.success("Invitation accepted!"),kn();let c;try{c=(await ve.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{o(!0);try{const c=await ve.organization.rejectInvitation({invitationId:t.id});c.error?(Te.error(c.error.message),o(!1)):(Te.success("Invitation declined"),i.invalidateQueries())}catch{Te.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Xe,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:l,disabled:e||r,"aria-label":"Accept invitation",children:s.jsx(Dt,{size:14})}),s.jsx(Xe,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||r,"aria-label":"Decline invitation",children:s.jsx(Mt,{size:14})})]})]})}function Oi(t){const e=N.c(29),{request:n}=t,{approve:r,deny:o}=No(),i=r.isPending||o.isPending,l=n.user?.name??n.user?.email??n.userId,a=n.user?.image??void 0;let c;e[0]!==l?(c=l.charAt(0).toUpperCase(),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==a||e[3]!==c?(d=s.jsx(wt,{url:a,fallback:c,shape:"circle",size:"sm"}),e[2]=a,e[3]=c,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Requested to join"}),e[5]=u):u=e[5];let m;e[6]!==l?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[u,s.jsx("p",{className:"text-sm font-medium truncate",children:l})]}),e[6]=l,e[7]=m):m=e[7];let f;e[8]!==r||e[9]!==n.id?(f=()=>r.mutate(n.id),e[8]=r,e[9]=n.id,e[10]=f):f=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Dt,{size:14}),e[11]=h):h=e[11];let x;e[12]!==i||e[13]!==f?(x=s.jsx(Xe,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:f,disabled:i,"aria-label":"Approve join request",children:h}),e[12]=i,e[13]=f,e[14]=x):x=e[14];let p;e[15]!==o||e[16]!==n.id?(p=()=>o.mutate(n.id),e[15]=o,e[16]=n.id,e[17]=p):p=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Mt,{size:14}),e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==p?(b=s.jsx(Xe,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:p,disabled:i,"aria-label":"Deny join request",children:g}),e[19]=i,e[20]=p,e[21]=b):b=e[21];let j;e[22]!==b||e[23]!==x?(j=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[x,b]}),e[22]=b,e[23]=x,e[24]=j):j=e[24];let S;return e[25]!==j||e[26]!==d||e[27]!==m?(S=s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[d,m,j]}),e[25]=j,e[26]=d,e[27]=m,e[28]=S):S=e[28],S}function Ai(t){const e=N.c(14),{release:n,isSeen:r,onSelect:o}=t;let i;e[0]!==r?(i=!r&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==n.eyebrow?(l=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=l):l=e[3];let a;e[4]!==n.title?(a=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let c;e[6]!==l||e[7]!==a?(c=s.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[6]=l,e[7]=a,e[8]=c):c=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Et,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==i||e[12]!==c?(u=s.jsxs("button",{type:"button",onClick:o,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,c,d]}),e[10]=o,e[11]=i,e[12]=c,e[13]=u):u=e[13],u}function $i(){const t=A.useContext(In),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date)}function Ws(){const t=N.c(11),{isSeen:e,markSeen:n,unseenCount:r}=ur(),o=$i(),i=_o();let l;if(t[0]!==e||t[1]!==o||t[2]!==i){const d=[...i].sort(Ri).map(Mi),u=[...o].sort(Di).map(zi);let m;t[4]!==e?(m=h=>({type:"release",release:h,isSeen:e(h.id)}),t[4]=e,t[5]=m):m=t[5];const f=[...mr].sort(Pi).map(m);l=[...d,...u,...f],t[0]=e,t[1]=o,t[2]=i,t[3]=l}else l=t[3];const a=r+o.length+i.length;let c;return t[6]!==n||t[7]!==o||t[8]!==l||t[9]!==a?(c={items:l,pendingInvitations:o,redDotCount:a,markReleaseSeen:n},t[6]=n,t[7]=o,t[8]=l,t[9]=a,t[10]=c):c=t[10],c}function Pi(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function zi(t){return{type:"invitation",invitation:t}}function Di(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}function Mi(t){return{type:"join-request",request:t}}function Ri(t,e){return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}class Ks extends A.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Vs(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Ei(){const t=N.c(17),e=Le(),{org:n}=de(),{hasDecoKey:r,balanceDollars:o}=As();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let l;t[2]!==o?(l=W(o!=null&&Vs(o)),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Cs,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=s.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==l||t[14]!==a||t[15]!==u?(m=s.jsx(Ae,{children:s.jsx(ae,{children:s.jsxs(Se,{tooltip:i,className:l,onClick:a,children:[c,u]})})}),t[12]=i,t[13]=l,t[14]=a,t[15]=u,t[16]=m):m=t[16],m}function Fi(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ks,{children:s.jsx(A.Suspense,{fallback:null,children:s.jsx(Ei,{})})}),t[0]=e):e=t[0],e}function Hi(){const t=N.c(17),e=Le(),{org:n}=de(),{hasDecoKey:r,balanceDollars:o}=As();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];const l=i;let a;t[2]!==e||t[3]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[2]=e,t[3]=n.slug,t[4]=a):a=t[4];let c;t[5]!==o?(c=W(o!=null&&Vs(o)),t[5]=o,t[6]=c):c=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Cs,{className:"size-4"}),t[7]=d):d=t[7];let u;t[8]!==a||t[9]!==c||t[10]!==l?(u=s.jsx(Fe,{asChild:!0,children:s.jsx(ce,{"aria-label":l,onClick:a,className:c,children:d})}),t[8]=a,t[9]=c,t[10]=l,t[11]=u):u=t[11];let m;t[12]!==l?(m=s.jsx(He,{side:"top",children:l}),t[12]=l,t[13]=m):m=t[13];let f;return t[14]!==u||t[15]!==m?(f=s.jsxs(Ge,{delayDuration:300,children:[u,m]}),t[14]=u,t[15]=m,t[16]=f):f=t[16],f}function Gi(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ks,{children:s.jsx(A.Suspense,{fallback:null,children:s.jsx(Hi,{})})}),t[0]=e):e=t[0],e}function Ys(t){const e=N.c(15),{children:n}=t,{items:r,markReleaseSeen:o}=Ws(),[i,l]=A.useState(null);let a;if(e[0]!==r||e[1]!==i){let p;e[3]!==i?(p=g=>g.type==="release"&&g.release.id===i,e[3]=i,e[4]=p):p=e[4],a=r.find(p),e[0]=r,e[1]=i,e[2]=a}else a=e[2];const c=a,d=c?.type==="release"?c.release:null;let u;e[5]!==o?(u=p=>{l(p),o(p)},e[5]=o,e[6]=u):u=e[6];const m=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=p=>{p||l(null)},e[7]=f):f=e[7];let h;e[8]!==m||e[9]!==r||e[10]!==d?(h=s.jsx(pt,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx(Xe,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>l(null),children:s.jsx(Jr,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:d.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(fr,{release:d})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Rt,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations, join requests, and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:r.map(p=>p.type==="join-request"?s.jsx(Oi,{request:p.request},`req-${p.request.id}`):p.type==="invitation"?s.jsx(Ti,{invitation:p.invitation},`inv-${p.invitation.id}`):s.jsx(Ai,{release:p.release,isSeen:p.isSeen,onSelect:()=>m(p.release.id)},`rel-${p.release.id}`))})]})}),e[8]=m,e[9]=r,e[10]=d,e[11]=h):h=e[11];let x;return e[12]!==n||e[13]!==h?(x=s.jsxs(xt,{onOpenChange:f,children:[n,h]}),e[12]=n,e[13]=h,e[14]=x):x=e[14],x}function Xs(){const{redDotCount:t}=Ws();return t>0}function Li(){const t=N.c(6),e=Xs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Rt,{}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{children:"Inbox"}),t[3]=o):o=t[3];let i;return t[4]!==r?(i=s.jsx(Ys,{children:s.jsx(Qe,{asChild:!0,children:s.jsxs(Se,{tooltip:"Inbox",className:"relative",children:[n,r,o]})})}),t[4]=r,t[5]=i):i=t[5],i}function Bi(){const t=N.c(8),e=Xs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Rt,{className:"size-4"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]!==r?(o=s.jsx(Qe,{asChild:!0,children:s.jsx(Fe,{asChild:!0,children:s.jsxs(ce,{"aria-label":"Inbox",children:[n,r]})})}),t[3]=r,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(He,{side:"top",children:"Inbox"}),t[5]=i):i=t[5];let l;return t[6]!==o?(l=s.jsx(Ys,{children:s.jsxs(Ge,{delayDuration:300,children:[o,i]})}),t[6]=o,t[7]=l):l=t[7],l}function Ui(){const t=N.c(3),[e,n]=A.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Se,{tooltip:"Connections",onClick:()=>{J("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:[s.jsx(Ps,{}),s.jsx("span",{children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx($s,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function qi(){const t=N.c(3),[e,n]=A.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Ge,{delayDuration:300,children:[s.jsx(Fe,{asChild:!0,children:s.jsx(ce,{"aria-label":"Connections",onClick:()=>{J("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:s.jsx(Ps,{className:"size-4"})})}),s.jsx(He,{side:"top",children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx($s,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function Wi(){const t=N.c(7),e=Le(),{org:n}=de();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(tt,{}),i=s.jsx("span",{children:"Settings"}),t[3]=o,t[4]=i):(o=t[3],i=t[4]);let l;return t[5]!==r?(l=s.jsxs(Se,{tooltip:"Settings",onClick:r,children:[o,i]}),t[5]=r,t[6]=l):l=t[6],l}function Ki(){const t=N.c(9),e=Le(),{org:n}=de();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(tt,{className:"size-4"}),t[3]=o):o=t[3];let i;t[4]!==r?(i=s.jsx(Fe,{asChild:!0,children:s.jsx(ce,{"aria-label":"Settings",onClick:r,children:o})}),t[4]=r,t[5]=i):i=t[5];let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(He,{side:"top",children:"Settings"}),t[6]=l):l=t[6];let a;return t[7]!==i?(a=s.jsxs(Ge,{delayDuration:300,children:[i,l]}),t[7]=i,t[8]=a):a=t[8],a}function Vi(){const t=N.c(7),{state:e}=Be();if(e==="collapsed"){let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Fi,{}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ae,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(Tt,{})})}),t[1]=i):i=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ae,{children:s.jsx(Ui,{})}),t[2]=l):l=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ae,{children:s.jsx(Li,{})}),t[3]=a):a=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ae,{children:s.jsx(Wi,{})}),t[4]=c):c=t[4];let d;return t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(Ct,{className:"px-2 pb-3 gap-1",children:[o,s.jsxs(Ae,{children:[i,l,a,c,s.jsx(ae,{children:s.jsx(It,{})})]})]}),t[5]=d):d=t[5],d}let r;return t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ct,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ae,{children:s.jsx(ae,{children:s.jsx(It,{})})})}),s.jsx(Ki,{}),s.jsx(Bi,{}),s.jsx(Tt,{}),s.jsx(qi,{}),s.jsx(Gi,{})]})}),t[6]=r):r=t[6],r}function Yi(){const t=N.c(8),e=Le(),{org:n}=de(),{setOpenMobile:r}=Be();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ae,{children:s.jsx(ae,{children:s.jsx(It,{})})})}),t[0]=o):o=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==r?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),r(!1)},t[1]=e,t[2]=n.slug,t[3]=r,t[4]=i):i=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(tt,{className:"size-4"}),t[5]=l):l=t[5];let a;return t[6]!==i?(a=s.jsx(Ct,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[o,s.jsx(ce,{"aria-label":"Settings",onClick:i,children:l})]})}),t[6]=i,t[7]=a):a=t[7],a}function ot(t){const e=N.c(15),{className:n,wrapperClassName:r,children:o}=t,[i,l]=A.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&l(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const c=a;let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=b=>{const j=b.currentTarget;l(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=d):d=e[1];const u=d;let m;e[2]!==r?(m=W("relative",r),e[2]=r,e[3]=m):m=e[3];let f;e[4]!==o||e[5]!==n?(f=s.jsx("div",{ref:c,onScroll:u,className:n,children:o}),e[4]=o,e[5]=n,e[6]=f):f=e[6];const h=i?"opacity-100":"opacity-0";let x;e[7]!==h?(x=W("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=x):x=e[8];let p;e[9]!==x?(p=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=p):p=e[10];let g;return e[11]!==m||e[12]!==f||e[13]!==p?(g=s.jsxs("div",{className:m,children:[f,p]}),e[11]=m,e[12]=f,e[13]=p,e[14]=g):g=e[14],g}function Xi(t){const e=N.c(8),{virtualMcpId:n,size:r,showAutomationBadge:o}=t,i=r===void 0?"sm":r;let l;e[0]!==i||e[1]!==n?(l=n?s.jsx(Qi,{virtualMcpId:n,size:i}):s.jsx(Je,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=l):l=e[2];let a;e[3]!==o?(a=o&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(Bo,{size:10,className:"text-white"})}),e[3]=o,e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==a?(c=s.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=c):c=e[7],c}function Qi(t){const e=N.c(6),{virtualMcpId:n,size:r}=t,o=zt(n);if(!o){let a;return e[0]!==r?(a=s.jsx(Je,{icon:null,name:"?",size:r}),e[0]=r,e[1]=a):a=e[1],a}const i=o.icon??null;let l;return e[2]!==o.title||e[3]!==r||e[4]!==i?(l=s.jsx(Je,{icon:i,name:o.title,size:r}),e[2]=o.title,e[3]=r,e[4]=i,e[5]=l):l=e[5],l}function ns(t){const e=N.c(36),{open:n,onOpenChange:r}=t,[o,i]=A.useState(""),{org:l}=de(),{setTaskId:a}=Is(),c=Ds();let d,u,m;e[0]!==l.id||e[1]!==o?(m=o.trim(),u=$t,d=At.globalSearch(l.id,m),e[0]=l.id,e[1]=o,e[2]=d,e[3]=u,e[4]=m):(d=e[2],u=e[3],m=e[4]);const f=n&&m.length>0;let h;e[5]!==c||e[6]!==m?(h=async()=>await c.call("GLOBAL_SEARCH",{query:m,limit:20}),e[5]=c,e[6]=m,e[7]=h):h=e[7];let x;e[8]!==d||e[9]!==f||e[10]!==h?(x={queryKey:d,enabled:f,queryFn:h,staleTime:1e4},e[8]=d,e[9]=f,e[10]=h,e[11]=x):x=e[11];const{data:p,isFetching:g}=u(x);let b;e[12]!==p?.items?(b=p?.items??[],e[12]=p?.items,e[13]=b):b=e[13];const j=b;let S;e[14]!==r?(S=k=>{k||i(""),r(k)},e[14]=r,e[15]=S):S=e[15];const y=S;let C;e[16]!==y||e[17]!==a?(C=k=>{y(!1),a(k.id,k.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=C):C=e[18];const w=C;let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(Po,{className:"sr-only",children:[s.jsx(zo,{children:"Search"}),s.jsx(Do,{children:"Search across your organization's resources."})]}),e[19]=_):_=e[19];let I;e[20]!==o?(I=s.jsx(Ho,{value:o,onValueChange:i,placeholder:"Search..."}),e[20]=o,e[21]=I):I=e[21];let O;e[22]!==w||e[23]!==g||e[24]!==j||e[25]!==m?(O=m?g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Eo,{children:"No results."}):j.map(k=>k.type==="thread"?s.jsxs(Fo,{value:`thread:${k.id}:${k.title}`,onSelect:()=>w(k),className:"gap-2.5",children:[s.jsx(Xi,{virtualMcpId:k.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:k.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(k.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${k.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=w,e[23]=g,e[24]=j,e[25]=m,e[26]=O):O=e[26];let T;e[27]!==O?(T=s.jsx(Go,{children:O}),e[27]=O,e[28]=T):T=e[28];let z;e[29]!==I||e[30]!==T?(z=s.jsxs(Mo,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[_,s.jsxs(Lo,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[I,T]})]}),e[29]=I,e[30]=T,e[31]=z):z=e[31];let $;return e[32]!==y||e[33]!==n||e[34]!==z?($=s.jsx(Ro,{open:n,onOpenChange:y,children:z}),e[32]=y,e[33]=n,e[34]=z,e[35]=$):$=e[35],$}function Ji(t){return t==="owner"||t==="admin"}function Zi(){const t=N.c(11),{locator:e}=de(),n=Uo(),{data:r}=ve.useSession(),o=r?.user?.id;let i;t[0]!==e?(i=At.members(e),t[0]=e,t[1]=i):i=t[1];let l;t[2]!==n?(l=()=>n.organization.listMembers(),t[2]=n,t[3]=l):l=t[3];const a=!!o;let c;t[4]!==i||t[5]!==l||t[6]!==a?(c={queryKey:i,queryFn:l,enabled:a,staleTime:6e4},t[4]=i,t[5]=l,t[6]=a,t[7]=c):c=t[7];const{data:d}=$t(c);let u;if(t[8]!==d?.data?.members||t[9]!==o){const f=(d?.data?.members??[]).find(h=>h.userId===o)?.role;u=Ji(f??void 0),t[8]=d?.data?.members,t[9]=o,t[10]=u}else u=t[10];return u}var Nt,ht="HoverCard",[Qs]=An(ht,[ps]),gt=ps(),[el,bt]=Qs(ht),Js=t=>{const{__scopeHoverCard:e,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:l=700,closeDelay:a=300}=t,c=gt(e),d=A.useRef(0),u=A.useRef(0),m=A.useRef(!1),f=A.useRef(!1),[h,x]=Rn({prop:r,defaultProp:o??!1,onChange:i,caller:ht}),p=A.useCallback(()=>{clearTimeout(u.current),d.current=window.setTimeout(()=>x(!0),l)},[l,x]),g=A.useCallback(()=>{clearTimeout(d.current),!m.current&&!f.current&&(u.current=window.setTimeout(()=>x(!1),a))},[a,x]),b=A.useCallback(()=>x(!1),[x]);return A.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(u.current)},[]),s.jsx(el,{scope:e,open:h,onOpenChange:x,onOpen:p,onClose:g,onDismiss:b,hasSelectionRef:m,isPointerDownOnContentRef:f,children:s.jsx(En,{...c,children:n})})};Js.displayName=ht;var Zs="HoverCardTrigger",en=A.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,o=bt(Zs,n),i=gt(n);return s.jsx(Tn,{asChild:!0,...i,children:s.jsx(On.a,{"data-state":o.open?"open":"closed",...r,ref:e,onPointerEnter:Oe(t.onPointerEnter,ct(o.onOpen)),onPointerLeave:Oe(t.onPointerLeave,ct(o.onClose)),onFocus:Oe(t.onFocus,o.onOpen),onBlur:Oe(t.onBlur,o.onClose),onTouchStart:Oe(t.onTouchStart,l=>l.preventDefault())})})});en.displayName=Zs;var Gt="HoverCardPortal",[tl,sl]=Qs(Gt,{forceMount:void 0}),tn=t=>{const{__scopeHoverCard:e,forceMount:n,children:r,container:o}=t,i=bt(Gt,e);return s.jsx(tl,{scope:e,forceMount:n,children:s.jsx(hs,{present:n||i.open,children:s.jsx(Mn,{asChild:!0,container:o,children:r})})})};tn.displayName=Gt;var at="HoverCardContent",sn=A.forwardRef((t,e)=>{const n=sl(at,t.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=t,i=bt(at,t.__scopeHoverCard);return s.jsx(hs,{present:r||i.open,children:s.jsx(nl,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Oe(t.onPointerEnter,ct(i.onOpen)),onPointerLeave:Oe(t.onPointerLeave,ct(i.onClose)),ref:e})})});sn.displayName=at;var nl=A.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,...a}=t,c=bt(at,n),d=gt(n),u=A.useRef(null),m=$n(e,u),[f,h]=A.useState(!1);return A.useEffect(()=>{if(f){const x=document.body;return Nt=x.style.userSelect||x.style.webkitUserSelect,x.style.userSelect="none",x.style.webkitUserSelect="none",()=>{x.style.userSelect=Nt,x.style.webkitUserSelect=Nt}}},[f]),A.useEffect(()=>{if(u.current){const x=()=>{h(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",x),()=>{document.removeEventListener("pointerup",x),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),A.useEffect(()=>{u.current&&il(u.current).forEach(p=>p.setAttribute("tabindex","-1"))}),s.jsx(Pn,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Oe(i,x=>{x.preventDefault()}),onDismiss:c.onDismiss,children:s.jsx(zn,{...d,...a,onPointerDown:Oe(a.onPointerDown,x=>{x.currentTarget.contains(x.target)&&h(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:m,style:{...a.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),rl="HoverCardArrow",ol=A.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,o=gt(n);return s.jsx(Dn,{...o,...r,ref:e})});ol.displayName=rl;function ct(t){return e=>e.pointerType==="touch"?void 0:t()}function il(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var ll=Js,al=en,cl=tn,dl=sn;function ul(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(ll,{"data-slot":"hover-card",...n}),e[2]=n,e[3]=r):r=e[3],r}function ml(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(al,{"data-slot":"hover-card-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function fl(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,align:o,sideOffset:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const l=o===void 0?"center":o,a=i===void 0?4:i;let c;e[5]!==n?(c=W("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==r||e[9]!==a||e[10]!==c?(d=s.jsx(cl,{"data-slot":"hover-card-portal",children:s.jsx(dl,{"data-slot":"hover-card-content",align:l,sideOffset:a,className:c,...r})}),e[7]=l,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function nn(t){const e=N.c(26),{virtualMcpId:n,isOrgPinned:r,canManageOrgPin:o,onNewTaskInGroup:i,onShowSettings:l,onToggleOrgPin:a,onHideGroup:c}=t;let d;e[0]!==i||e[1]!==n?(d=()=>i(n),e[0]=i,e[1]=n,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ee,{size:14,className:"mr-2"}),e[3]=u):u=e[3];let m;e[4]!==d?(m=s.jsxs(nt,{onSelect:d,children:[u,"New task"]}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==l||e[7]!==n?(f=()=>l(n),e[6]=l,e[7]=n,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(tt,{size:14,className:"mr-2"}),e[9]=h):h=e[9];let x;e[10]!==f?(x=s.jsxs(nt,{onSelect:f,children:[h,"Settings"]}),e[10]=f,e[11]=x):x=e[11];let p;e[12]!==o||e[13]!==r||e[14]!==a||e[15]!==n?(p=o&&s.jsxs(s.Fragment,{children:[s.jsx(Qt,{}),s.jsxs(nt,{onSelect:()=>a(n,!r),children:[s.jsx(tr,{size:14,className:"mr-2"}),r?"Unpin for all members":"Pin for all members"]})]}),e[12]=o,e[13]=r,e[14]=a,e[15]=n,e[16]=p):p=e[16];let g;e[17]!==r||e[18]!==c||e[19]!==n?(g=!r&&s.jsxs(s.Fragment,{children:[s.jsx(Qt,{}),s.jsxs(nt,{onSelect:()=>c(n),children:[s.jsx(Zr,{size:14,className:"mr-2"}),"Hide"]})]}),e[17]=r,e[18]=c,e[19]=n,e[20]=g):g=e[20];let b;return e[21]!==m||e[22]!==x||e[23]!==p||e[24]!==g?(b=s.jsxs(s.Fragment,{children:[m,x,p,g]}),e[21]=m,e[22]=x,e[23]=p,e[24]=g,e[25]=b):b=e[25],b}function Lt(t){const e=N.c(12),{onClick:n,isFetching:r,indented:o}=t,i=o?"-ml-4 pl-6 pr-2":"px-2";let l;e[0]!==i?(l=W("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",i,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[0]=i,e[1]=l):l=e[1];let a;e[2]!==r?(a=r&&s.jsx(ms,{size:14,className:"animate-spin"}),e[2]=r,e[3]=a):a=e[3];const c=r?"Loading…":"Show more";let d;e[4]!==c?(d=s.jsx("span",{children:c}),e[4]=c,e[5]=d):d=e[5];let u;return e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==a||e[10]!==d?(u=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:r,className:l,children:[a,d]}),e[6]=r,e[7]=n,e[8]=l,e[9]=a,e[10]=d,e[11]=u):u=e[11],u}function xl(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function pl(t){return t.member==="mine"&&!t.currentUserId}const rn=4;let lt=0;const Ot=[];function hl(){for(;lt<rn&&Ot.length>0;){const t=Ot.shift();t&&t()}}function on(t){return new Promise((e,n)=>{const r=()=>{lt++,t().then(e,n).finally(()=>{lt--,hl()})};lt<rn?r():Ot.push(r)})}const jt=10;function rs(t,e,n,r,o){const i={hidden:!1};t==="agent"&&(i.virtual_mcp_id=e),r.member==="mine"&&r.currentUserId&&(i.created_by=r.currentUserId),r.type==="automation"&&(i.has_trigger=!0),r.type==="manual"&&(i.has_trigger=!1);const l={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return t==="status"&&(l.status=e),l}function gl(t,e,n,r){let o=0;for(const i of t)Bt(i,e,n,r)&&o++;return o}function _t(t,e,n,r){return gl(t,e,n,r)}function bl(t,e,n){const r=new Map;for(const o of t){const i=o.virtual_mcp_id;i&&Bt(o,e,i,n)&&r.set(i,(r.get(i)??0)+1)}return r}function jl(t,e){return!!(t>=jt||t===0&&e)}function os(t,e){return t<e}function vl(t,e){return e===!1?!1:e===!0?!0:t}function Bt(t,e,n,r){return!(t.hidden||e==="agent"&&t.virtual_mcp_id!==n||e==="status"&&(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const dt=new Map,it=new Map;function Sl(t,e){return e?t>=jt?!0:null:!1}function is(t){return dt.get(t)}function yl(t,e){dt.set(t,e)}function Nl(t,e,n){const r=dt.get(t);if(r!==void 0){n(r);return}let o=it.get(t);o||(o=on(e).then(i=>(dt.set(t,i),it.delete(t),i)).catch(()=>(it.delete(t),Promise.reject(new Error("group probe failed")))),it.set(t,o)),o.then(n,()=>n(!1))}function ls(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===jt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function _l(t,e,n,r,o){let i=0;for(const l of t)e.has(l.id)||Bt(l,n,r,o)&&i++;return i}function ln(t,e,n,r){const o=N.c(8),{org:i}=de(),l=xl(i.id,t,e,n);let a;o[0]!==n?(a=pl(n),o[0]=n,o[1]=a):a=o[1];const c=a,[d,u]=A.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});d.identity!==l&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const m=ar(),{threads:f,hasMore:h}=ks(),x=r??_t(f,t,e,n),p=jl(x,h),g=Sl(x,h),b=Ds();if(d.identity===l&&d.serverHasMore===null){const _=g??is(l);_!==void 0&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:d.probeSubscribedIdentity,serverHasMore:_})}!c&&d.identity===l&&d.serverHasMore===null&&g===null&&is(l)===void 0&&d.probeSubscribedIdentity!==l&&(u(_=>_.identity===l?{..._,isProbing:!0,probeSubscribedIdentity:l}:_),Nl(l,async()=>{const _=rs(t,e,0,n,1),I=await b.call("COLLECTION_THREADS_LIST",_),{totalCount:O}=ls(I),T=_t(m.threads.get(),t,e,n);return O===void 0?!1:os(T,O)},_=>{u(I=>I.identity!==l?I:{...I,isProbing:!1,serverHasMore:_})}));const S=async function(){if(d.isFetching||d.isProbing||c)return;const I=l;u(O=>O.identity===I?{...O,isFetching:!0}:O);try{const O=_t(f,t,e,n),T=rs(t,e,O,n,jt),z=await on(()=>b.call("COLLECTION_THREADS_LIST",T)),{items:$,hasMore:k,totalCount:R}=ls(z),L=new Set(f.map(Cl)),H=_l($,L,t,e,n),M=O;m.mergeThreads($),u(E=>{if(E.identity!==I)return E;let D;return R!==void 0?D=os(M+H,R):D=$.length===0||H===0?!1:k,yl(I,D),{...E,isFetching:!1,serverHasMore:D}})}catch(O){const T=O,z=T instanceof Error?T.message:String(T);Te.error(`Could not load more tasks: ${z}`),u($=>$.identity===I?{...$,isFetching:!1}:$)}},y=d.isFetching||d.isProbing,C=!c&&!y&&vl(p,d.serverHasMore);let w;return o[2]!==y||o[3]!==S||o[4]!==C||o[5]!==d.isProbing||o[6]!==d.serverHasMore?(w={hasMore:C,isFetching:y,isProbing:d.isProbing,serverHasMore:d.serverHasMore,loadMore:S},o[2]=y,o[3]=S,o[4]=C,o[5]=d.isProbing,o[6]=d.serverHasMore,o[7]=w):w=o[7],w}function Cl(t){return t.id}function an(t){const e=N.c(61),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,onSelectTask:l,onArchiveTask:a,onNewTaskInGroup:c,onShowSettings:d,onHideGroup:u,isOrgPinned:m,canManageOrgPin:f,onToggleOrgPin:h,sortable:x,groupVisibleCount:p}=t,g=m===void 0?!1:m,b=f===void 0?!1:f,j=zt(n),S=r[0];let y;e[0]!==S||e[1]!==c||e[2]!==l||e[3]!==n?(y=()=>{S?l(S):c(n)},e[0]=S,e[1]=c,e[2]=l,e[3]=n,e[4]=y):y=e[4];const C=y,w=x?.isDragging?!1:void 0;let _;e[5]!==x?.isDragging||e[6]!==n?(_=V=>{x?.isDragging||V&&J("sidebar_group_hover_popover_opened",{virtual_mcp_id:n})},e[5]=x?.isDragging,e[6]=n,e[7]=_):_=e[7];const I=!!(S&&o&&S.id===o),O=x?"Drag to reorder":void 0;let T;e[8]!==x?(T=x?{...x.attributes,...x.listeners}:{},e[8]=x,e[9]=T):T=e[9];const z=x&&"cursor-pointer active:cursor-grabbing touch-none",$=x?.isDragging&&"cursor-grabbing";let k;e[10]!==$||e[11]!==z?(k=W("group-data-[state=collapsed]/sidebar:!size-10 group-data-[state=collapsed]/sidebar:!max-w-none group-data-[state=collapsed]/sidebar:!overflow-visible group-data-[state=collapsed]/sidebar:[&_svg]:opacity-100",z,$),e[10]=$,e[11]=z,e[12]=k):k=e[12];const R=j?.icon??null,L=j?.title??"?";let H;e[13]!==R||e[14]!==L?(H=s.jsx(Je,{icon:R,name:L,size:"sm+",className:"rounded-lg"}),e[13]=R,e[14]=L,e[15]=H):H=e[15];let M;e[16]!==C||e[17]!==k||e[18]!==H||e[19]!==I||e[20]!==O||e[21]!==T?(M=s.jsx(ae,{children:s.jsx(Ms,{asChild:!0,children:s.jsx(ml,{asChild:!0,children:s.jsx(Se,{onClick:C,isActive:I,title:O,...T,className:k,children:H})})})}),e[16]=C,e[17]=k,e[18]=H,e[19]=I,e[20]=O,e[21]=T,e[22]=M):M=e[22];const E=h??wl;let D;e[23]!==b||e[24]!==g||e[25]!==u||e[26]!==c||e[27]!==d||e[28]!==E||e[29]!==n?(D=s.jsx(Rs,{className:"w-56",children:s.jsx(nn,{virtualMcpId:n,isOrgPinned:g,canManageOrgPin:b,onNewTaskInGroup:c,onShowSettings:d,onToggleOrgPin:E,onHideGroup:u})}),e[23]=b,e[24]=g,e[25]=u,e[26]=c,e[27]=d,e[28]=E,e[29]=n,e[30]=D):D=e[30];let q;e[31]!==M||e[32]!==D?(q=s.jsxs(Es,{children:[M,D]}),e[31]=M,e[32]=D,e[33]=q):q=e[33];const B=j?.title??"Agent";let K;e[34]!==B?(K=s.jsx("span",{className:"truncate",children:B}),e[34]=B,e[35]=K):K=e[35];let G;e[36]!==c||e[37]!==n?(G=()=>c(n),e[36]=c,e[37]=n,e[38]=G):G=e[38];let Y;e[39]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Ee,{size:14}),e[39]=Y):Y=e[39];let U;e[40]!==G?(U=s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:G,className:"flex size-6 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground",children:Y}),e[40]=G,e[41]=U):U=e[41];let X;e[42]!==K||e[43]!==U?(X=s.jsxs("div",{className:"flex items-center justify-between px-1 pb-1 text-xs font-medium",children:[K,U]}),e[42]=K,e[43]=U,e[44]=X):X=e[44];let se;e[45]!==o||e[46]!==i||e[47]!==p||e[48]!==a||e[49]!==l||e[50]!==r||e[51]!==n?(se=s.jsx(kl,{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:p,onSelectTask:l,onArchiveTask:a}),e[45]=o,e[46]=i,e[47]=p,e[48]=a,e[49]=l,e[50]=r,e[51]=n,e[52]=se):se=e[52];let Q;e[53]!==X||e[54]!==se?(Q=s.jsxs(fl,{side:"right",align:"start",sideOffset:8,className:"w-72 p-2",children:[X,se]}),e[53]=X,e[54]=se,e[55]=Q):Q=e[55];let te;return e[56]!==q||e[57]!==Q||e[58]!==w||e[59]!==_?(te=s.jsxs(ul,{open:w,openDelay:120,closeDelay:150,onOpenChange:_,children:[q,Q]}),e[56]=q,e[57]=Q,e[58]=w,e[59]=_,e[60]=te):te=e[60],te}function wl(){}function kl(t){const e=N.c(6),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:l,onSelectTask:a,onArchiveTask:c}=t,d=ln("agent",n,i,l);let u;return e[0]!==o||e[1]!==c||e[2]!==a||e[3]!==d||e[4]!==r?(u=s.jsx("div",{className:"flex flex-col gap-0.5 max-h-[60vh] overflow-y-auto",children:r.length===0&&!d.hasMore&&!d.isFetching?s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No tasks yet"}):s.jsxs(s.Fragment,{children:[r.map(m=>s.jsx(Ft,{task:m,isActive:o===m.id,onClick:()=>a(m),onArchive:()=>c(m),showAutomationBadge:!!m.trigger_id},m.id)),(d.hasMore||d.isFetching)&&s.jsx(Lt,{onClick:()=>{d.loadMore()},isFetching:d.isFetching})]})}),e[0]=o,e[1]=c,e[2]=a,e[3]=d,e[4]=r,e[5]=u):u=e[5],u}function Il(t,e,n,r,o,i,l){const a=N.c(18),c=l===void 0?"expanded":l;let d;a[0]===Symbol.for("react.memo_cache_sentinel")?(d={activationConstraint:{distance:8}},a[0]=d):d=a[0];let u;a[1]===Symbol.for("react.memo_cache_sentinel")?(u={coordinateGetter:Rr},a[1]=u):u=a[1];const m=zr(Vt(Mr,d),Vt(Dr,u));let f;a[2]!==r||a[3]!==o||a[4]!==e||a[5]!==t?(f=gr(t,e,r,o),a[2]=r,a[3]=o,a[4]=e,a[5]=t,a[6]=f):f=a[6];const h=f;let x;a[7]!==i||a[8]!==n||a[9]!==o||a[10]!==e||a[11]!==h||a[12]!==c?(x=b=>{const{active:j,over:S}=b;if(!S||j.id===S.id)return;const y=String(j.id),C=String(S.id);if(!br(y,C,o))return;const w=jr(h,y,C),_=vr(e,n,o,w);e==="org"?Sr(n.orgId,_):yr(n,_),J("sidebar_group_reordered",{virtual_mcp_id:y,over_virtual_mcp_id:C,surface:c,section:e}),i()},a[7]=i,a[8]=n,a[9]=o,a[10]=e,a[11]=h,a[12]=c,a[13]=x):x=a[13];const p=x;let g;return a[14]!==p||a[15]!==m||a[16]!==h?(g={sensors:m,sortableIds:h,handleDragEnd:p},a[14]=p,a[15]=m,a[16]=h,a[17]=g):g=a[17],g}function Tl(t){const e=N.c(2),{collapsed:n}=t;if(n===void 0?!1:n){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"mx-auto my-1 h-px w-6 shrink-0 bg-border"}),e[0]=i):i=e[0],i}let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"my-1.5 h-px w-full shrink-0 bg-border"}),e[1]=o):o=e[1],o}function Ol(t){const e=N.c(12),{id:n,children:r}=t;let o;e[0]!==n?(o={id:n},e[0]=n,e[1]=o):o=e[1];const{attributes:i,listeners:l,setNodeRef:a,transform:c,transition:d,isDragging:u}=Lr(o);let m;if(e[2]!==i||e[3]!==r||e[4]!==u||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==d){const h={transform:Br.Transform.toString(c),transition:d,zIndex:u?100:void 0};m=r({setNodeRef:a,style:h,isDragging:u,attributes:i,listeners:l}),e[2]=i,e[3]=r,e[4]=u,e[5]=l,e[6]=a,e[7]=c,e[8]=d,e[9]=m}else m=e[9];let f;return e[10]!==m?(f=s.jsx(s.Fragment,{children:m}),e[10]=m,e[11]=f):f=e[11],f}function as(t){const e=N.c(18),{section:n,groups:r,orderScope:o,decopilotId:i,orgPinnedIds:l,onReorder:a,surface:c,renderGroup:d,renderSortable:u,renderFixed:m}=t,{sensors:f,sortableIds:h,handleDragEnd:x}=Il(r,n,o,i,l,a,c);if(r.length===0)return null;const p=h;let g;if(e[0]!==r||e[1]!==m||e[2]!==d||e[3]!==u||e[4]!==h){let S;e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==h?(S=y=>{const C=d(y);return h.includes(y.virtualMcpId)?s.jsx(Ol,{id:y.virtualMcpId,children:w=>{const{setNodeRef:_,style:I,isDragging:O,attributes:T,listeners:z}=w;return s.jsx("div",{ref:_,style:I,className:W(O&&"opacity-50"),children:u(C,{attributes:T,listeners:z,isDragging:O})})}},y.virtualMcpId):s.jsx("div",{children:m(C)},y.virtualMcpId)},e[6]=m,e[7]=d,e[8]=u,e[9]=h,e[10]=S):S=e[10],g=r.map(S),e[0]=r,e[1]=m,e[2]=d,e[3]=u,e[4]=h,e[5]=g}else g=e[5];let b;e[11]!==p||e[12]!==g?(b=s.jsx(Er,{items:p,strategy:Fr,children:g}),e[11]=p,e[12]=g,e[13]=b):b=e[13];let j;return e[14]!==x||e[15]!==f||e[16]!==b?(j=s.jsx(Hr,{sensors:f,collisionDetection:Gr,onDragEnd:x,children:b}),e[14]=x,e[15]=f,e[16]=b,e[17]=j):j=e[17],j}function cn(t){const e=N.c(23),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:a,collapsedSeparator:c,renderGroup:d,renderSortable:u,renderFixed:m}=t;let f;if(e[0]!==c||e[1]!==o||e[2]!==n||e[3]!==l||e[4]!==r||e[5]!==i||e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==a){const{decopilot:h,orgPinned:x,user:p,toolCallRuns:g}=Nr(n,o,i),b=x.length>0&&p.length>0;let j;e[11]!==o||e[12]!==l||e[13]!==r||e[14]!==i||e[15]!==m||e[16]!==d||e[17]!==u||e[18]!==a?(j={orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:a,renderGroup:d,renderSortable:u,renderFixed:m},e[11]=o,e[12]=l,e[13]=r,e[14]=i,e[15]=m,e[16]=d,e[17]=u,e[18]=a,e[19]=j):j=e[19];const S=j;let y;e[20]!==c||e[21]!==b?(y=b&&s.jsx(Tl,{collapsed:c}),e[20]=c,e[21]=b,e[22]=y):y=e[22],f=s.jsxs(s.Fragment,{children:[h&&m(d(h)),s.jsx(as,{section:"org",groups:x,...S}),y,s.jsx(as,{section:"user",groups:p,...S}),g&&m(d(g))]}),e[0]=c,e[1]=o,e[2]=n,e[3]=l,e[4]=r,e[5]=i,e[6]=m,e[7]=d,e[8]=u,e[9]=a,e[10]=f}else f=e[10];return f}function Al(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,renderGroup:a}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==i||e[5]!==a?(c=s.jsx(cn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:"collapsed_rail",collapsedSeparator:!0,renderGroup:a,renderFixed:Pl,renderSortable:$l}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function $l(t,e){return s.jsx(an,{...t,sortable:{attributes:e.attributes,listeners:e.listeners,isDragging:e.isDragging}},t.virtualMcpId)}function Pl(t){return s.jsx(an,{...t},t.virtualMcpId)}function dn(t){const e=N.c(41),{virtualMcpId:n,isActive:r,threadCount:o,onOpen:i,onNewTask:l,onShowSettings:a,onHideGroup:c,isOrgPinned:d,canManageOrgPin:u,onToggleOrgPin:m,sortable:f}=t,h=d===void 0?!1:d,x=u===void 0?!1:u,p=zt(n),g=f?.isDragging??!1,b=p?.title??"Agent";let j;e[0]!==f?(j=f?{...f.attributes,...f.listeners}:{},e[0]=f,e[1]=j):j=e[1];let S;e[2]!==i||e[3]!==n?(S=()=>i(n),e[2]=i,e[3]=n,e[4]=S):S=e[4];let y;e[5]!==i||e[6]!==f?.listeners||e[7]!==n?(y=D=>{f?.listeners?.onKeyDown?.(D),!D.defaultPrevented&&D.target===D.currentTarget&&D.key==="Enter"&&(D.preventDefault(),i(n))},e[5]=i,e[6]=f?.listeners,e[7]=n,e[8]=y):y=e[8];const C=f&&"touch-none active:cursor-grabbing",w=r?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/60",_=g&&"shadow-md bg-accent/40 cursor-grabbing";let I;e[9]!==C||e[10]!==w||e[11]!==_?(I=W("group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium transition-colors","cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",C,w,_),e[9]=C,e[10]=w,e[11]=_,e[12]=I):I=e[12];const O=p?.icon??null;let T;e[13]!==O||e[14]!==b?(T=s.jsx(Je,{icon:O,name:b,size:"2xs"}),e[13]=O,e[14]=b,e[15]=T):T=e[15];let z;e[16]!==b?(z=s.jsx("span",{className:"flex-1 truncate",children:b}),e[16]=b,e[17]=z):z=e[17];let $;e[18]!==o?($=typeof o=="number"&&o>0&&s.jsx("span",{className:"shrink-0 size-7 flex items-center justify-center text-xs text-muted-foreground tabular-nums",children:o}),e[18]=o,e[19]=$):$=e[19];let k;e[20]!==T||e[21]!==z||e[22]!==$||e[23]!==j||e[24]!==S||e[25]!==y||e[26]!==I?(k=s.jsxs("div",{...j,role:"button",tabIndex:0,onClick:S,onKeyDown:y,className:I,children:[T,z,$]}),e[20]=T,e[21]=z,e[22]=$,e[23]=j,e[24]=S,e[25]=y,e[26]=I,e[27]=k):k=e[27];const R=k;let L;e[28]!==R?(L=s.jsx(Ms,{asChild:!0,children:R}),e[28]=R,e[29]=L):L=e[29];const H=m??zl;let M;e[30]!==x||e[31]!==h||e[32]!==c||e[33]!==l||e[34]!==a||e[35]!==H||e[36]!==n?(M=s.jsx(Rs,{className:"w-56",children:s.jsx(nn,{virtualMcpId:n,isOrgPinned:h,canManageOrgPin:x,onNewTaskInGroup:l,onShowSettings:a,onToggleOrgPin:H,onHideGroup:c})}),e[30]=x,e[31]=h,e[32]=c,e[33]=l,e[34]=a,e[35]=H,e[36]=n,e[37]=M):M=e[37];let E;return e[38]!==L||e[39]!==M?(E=s.jsxs(Es,{children:[L,M]}),e[38]=L,e[39]=M,e[40]=E):E=e[40],E}function zl(){}function cs(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,renderGroup:a}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==i||e[5]!==a?(c=s.jsx(cn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:"expanded",renderGroup:a,renderFixed:Ml,renderSortable:Dl}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function Dl(t,e){return s.jsx(dn,{...t,sortable:e},t.virtualMcpId)}function Ml(t){return s.jsx(dn,{...t},t.virtualMcpId)}const Rl="sidebar.group.expanded.";function El(t,e){const n=N.c(3),[r,o]=ut(`${Rl}${t}`,e);let i;return n[0]!==r||n[1]!==o?(i=[r,o],n[0]=r,n[1]=o,n[2]=i):i=n[2],i}function Fl(t){const e=N.c(18),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:m,serverHasMore:f}=ln("status",n,a),[h,x]=A.useState(!1);!h&&r.length===0&&f===!0&&!c&&!d&&(x(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==o||e[1]!==a||e[2]!==l||e[3]!==i||e[4]!==r){let j;e[6]!==o||e[7]!==a||e[8]!==l||e[9]!==i?(j=S=>s.jsx(Ft,{task:S,isActive:o===S.id,onClick:()=>i(S),onArchive:S.created_by===a.currentUserId?()=>l(S):void 0,showAutomationBadge:!!S.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},S.id),e[6]=o,e[7]=a,e[8]=l,e[9]=i,e[10]=j):j=e[10],p=r.map(j),e[0]=o,e[1]=a,e[2]=l,e[3]=i,e[4]=r,e[5]=p}else p=e[5];let g;e[11]!==m||e[12]!==c||e[13]!==u?(g=(m||c)&&s.jsx(Lt,{onClick:()=>{u()},isFetching:c,indented:!0}),e[11]=m,e[12]=c,e[13]=u,e[14]=g):g=e[14];let b;return e[15]!==p||e[16]!==g?(b=s.jsxs(s.Fragment,{children:[p,g]}),e[15]=p,e[16]=g,e[17]=b):b=e[17],b}function Hl(t){const e=N.c(35),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a}=t,c=Wo[n],d=c.icon,[u,m]=El(`status-${n}`,!1);let f;e[0]!==u||e[1]!==m?(f=function(){m(!u)},e[0]=u,e[1]=m,e[2]=f):f=e[2];const h=f;let x;e[3]!==h?(x=_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),h())},e[3]=h,e[4]=x):x=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let g;e[8]!==u?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(Fs,{size:14}):s.jsx(Et,{size:14})}),e[8]=u,e[9]=g):g=e[9];let b;e[10]!==p||e[11]!==g?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,g]}),e[10]=p,e[11]=g,e[12]=b):b=e[12];let j;e[13]!==c.label?(j=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=j):j=e[14];let S;e[15]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[15]=r.length,e[16]=S):S=e[16];let y;e[17]!==u||e[18]!==h||e[19]!==x||e[20]!==b||e[21]!==j||e[22]!==S?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:h,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,j,S]}),e[17]=u,e[18]=h,e[19]=x,e[20]=b,e[21]=j,e[22]=S,e[23]=y):y=e[23];let C;e[24]!==o||e[25]!==u||e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==n||e[30]!==r?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Fl,{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a})}),e[24]=o,e[25]=u,e[26]=a,e[27]=l,e[28]=i,e[29]=n,e[30]=r,e[31]=C):C=e[31];let w;return e[32]!==y||e[33]!==C?(w=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,C]}),e[32]=y,e[33]=C,e[34]=w):w=e[34],w}function ds(t){const e=N.c(31),{threads:n,groupBy:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a,hasMore:c,isFetchingMore:d,onLoadMore:u}=t;if(r==="status"){let x;if(e[0]!==o||e[1]!==a||e[2]!==l||e[3]!==i||e[4]!==n){let g;e[6]!==o||e[7]!==a||e[8]!==l||e[9]!==i?(g=b=>s.jsx(Hl,{status:b.status,threads:b.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a},b.status),e[6]=o,e[7]=a,e[8]=l,e[9]=i,e[10]=g):g=e[10],x=_r(n).map(g),e[0]=o,e[1]=a,e[2]=l,e[3]=i,e[4]=n,e[5]=x}else x=e[5];let p;return e[11]!==x?(p=s.jsx(s.Fragment,{children:x}),e[11]=x,e[12]=p):p=e[12],p}let m;if(e[13]!==o||e[14]!==a||e[15]!==l||e[16]!==i||e[17]!==n){let x;e[19]!==o||e[20]!==a||e[21]!==l||e[22]!==i?(x=p=>s.jsx(Ft,{task:p,isActive:o===p.id,onClick:()=>i(p),onArchive:p.created_by===a.currentUserId?()=>l(p):void 0,showAutomationBadge:!!p.trigger_id,showAgentIcon:!0},p.id),e[19]=o,e[20]=a,e[21]=l,e[22]=i,e[23]=x):x=e[23],m=n.map(x),e[13]=o,e[14]=a,e[15]=l,e[16]=i,e[17]=n,e[18]=m}else m=e[18];let f;e[24]!==c||e[25]!==d||e[26]!==u?(f=(c||d)&&s.jsx(Lt,{onClick:u,isFetching:d}),e[24]=c,e[25]=d,e[26]=u,e[27]=f):f=e[27];let h;return e[28]!==m||e[29]!==f?(h=s.jsxs(s.Fragment,{children:[m,f]}),e[28]=m,e[29]=f,e[30]=h):h=e[30],h}function Gl(t){const e=N.c(19),{label:n,open:r,onToggle:o,count:i,action:l,actionSlot:a,controlsId:c}=t;let d;e[0]!==r?(d=r?s.jsx(Fs,{size:12,className:"shrink-0"}):s.jsx(Et,{size:12,className:"shrink-0"}),e[0]=r,e[1]=d):d=e[1];let u;e[2]!==n?(u=s.jsx("span",{className:"truncate",children:n}),e[2]=n,e[3]=u):u=e[3];let m;e[4]!==i?(m=typeof i=="number"&&i>0&&s.jsx("span",{className:"tabular-nums text-muted-foreground/60",children:i}),e[4]=i,e[5]=m):m=e[5];let f;e[6]!==c||e[7]!==o||e[8]!==r||e[9]!==d||e[10]!==u||e[11]!==m?(f=s.jsxs("button",{type:"button","aria-expanded":r,"aria-controls":c,onClick:o,className:"flex flex-1 min-w-0 items-center gap-1 text-sm font-medium text-muted-foreground/80 hover:text-foreground transition-colors focus-visible:outline-none",children:[d,u,m]}),e[6]=c,e[7]=o,e[8]=r,e[9]=d,e[10]=u,e[11]=m,e[12]=f):f=e[12];let h;e[13]!==l?(h=l&&s.jsxs("button",{type:"button",onClick:l.onClick,className:"shrink-0 flex items-center gap-0.5 text-sm font-medium text-muted-foreground/60 hover:text-foreground opacity-0 group-hover/section:opacity-100 focus-visible:opacity-100 transition-opacity focus-visible:outline-none",children:[l.label,l.icon]}),e[13]=l,e[14]=h):h=e[14];let x;return e[15]!==a||e[16]!==f||e[17]!==h?(x=s.jsxs("div",{className:"group/section flex items-center gap-1 px-2 pt-1 pb-0.5",children:[f,h,a]}),e[15]=a,e[16]=f,e[17]=h,e[18]=x):x=e[18],x}function Ll(t,e,n,r){return[t.orgId,t.userId,r,n.slice().sort().join(","),e.map(o=>o.virtualMcpId).sort().join(",")].join("|")}function Bl(t,e,n,r,o){const i=N.c(5),l=Ll(t,e,r,o),[a,c]=A.useState("");a!==l&&(Cr(t,e,n,r),c(l));let d;return i[0]!==n||i[1]!==r||i[2]!==t||i[3]!==e?(d=wr(t,e,n,r),i[0]=n,i[1]=r,i[2]=t,i[3]=e,i[4]=d):d=i[4],d}const us={all:"All tasks",manual:"Chats",automation:"Automation"};function un({onNavigate:t}={}){const{data:e}=ve.useSession(),n=e?.user?.id,r=n??"anon",{org:o}=de(),i=Kn({connectionId:Vn,orgId:o.id,orgSlug:o.slug}),l=Yn(o.id).id,a=_s(),{liveToDev:c,devToLive:d}=Ur(a),u=Ts(a),m=Zi(),f=Xn(),[h,x]=A.useState({}),p=new Set(u),g={},b=[];for(const[v,P]of Object.entries(h))p.has(v)!==P?g[v]=P:b.push(v);b.length>0&&x(v=>{const P={...v};for(const F of b)delete P[F];return P});const j=(()=>{const v=new Set(u);for(const[P,F]of Object.entries(g))F?v.add(P):v.delete(P);return[...v]})(),S=new Set(j),{threads:y,hasMore:C,isFetchingMore:w,fetchNextPage:_}=ks(),I=y.filter(v=>!v.hidden),{hide:O}=ws(),T=Le(),z=kr(),{setTaskId:$,createNewTask:k}=Is(),R=xs({strict:!1}),L=Ao({select:v=>v.location.pathname}),H=L===`/${o.slug}`||L===`/${o.slug}/`,M=R.taskId??null,E=y.find(v=>v.id===M)?.virtual_mcp_id??null,D=()=>{t?.()},q=[...I].sort((v,P)=>(P.updated_at??"").localeCompare(v.updated_at??"")),[B,K]=A.useState("all"),[G,Y]=A.useState("flat"),[U,X]=A.useState(!0),[se,Q]=ut("sidebar-threads-scope-all",!1),[te,V]=A.useState(!1),[Z,re]=A.useState(!1),[ne,oe]=A.useState(0),ee=Ir(),$e=ne+ee,le={orgId:o.id,userId:r},ye={type:B,member:"mine",currentUserId:n??null},fe=bl(q,"agent",ye),qe=Bl(le,Tr(Or(q,l),d),l,j,$e),Pe=new Set(a.map(v=>v.id).filter(v=>!!v)),xe=qe.filter(v=>v.virtualMcpId===l||v.virtualMcpId===St||Pe.has(v.virtualMcpId)),pe=xe.filter(v=>v.virtualMcpId!==St),he=v=>n?v.filter(P=>P.created_by===n):[],me=v=>B==="automation"?v.filter(P=>!!P.trigger_id):B==="manual"?v.filter(P=>!P.trigger_id):v,ge=he(q),ze=me(ge),De=me(q),Ne=se?De:ze,be=v=>{if(n&&v.created_by&&v.created_by!==n)return;const P=v.id===M;if(O(v.id),!P)return;const F=ge.find(Re=>Re.id!==v.id&&Re.virtual_mcp_id===v.virtual_mcp_id);D(),F?$(F.id,F.virtual_mcp_id):T({to:"/$org",params:{org:o.slug}})},Ue=v=>{D(),$(v.id,v.virtual_mcp_id)},_e=v=>{J("sidebar_group_new_clicked",{virtual_mcp_id:v}),D(),k(v)},Ze=async()=>{const v=E??l;J("sidebar_new_thread_clicked",{virtual_mcp_id:v});const P=ge.find(F=>F.virtual_mcp_id===v&&F.title==="New chat");if(P){let F=!1;try{const Re=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:P.id,limit:1,offset:0}});F=((Re.structuredContent??Re).items?.length??0)===0}catch{}if(F){D(),$(P.id,v);return}}D(),k(v)},Me=v=>{if(v===l){D(),T({to:"/$org",params:{org:o.slug}});return}J("sidebar_agent_opened",{virtual_mcp_id:v}),D(),z(v)},Ce=v=>{J("sidebar_group_settings_clicked",{virtual_mcp_id:v}),D(),z(v,{search:{main:"instructions"}})},we=v=>{if(S.has(v))return;J("sidebar_group_hide_clicked",{virtual_mcp_id:v});const P=xe.find(F=>F.virtualMcpId===v);if(P)for(const F of P.threads)O(F.id);Ar(le,v,j),oe(F=>F+1)},We=async(v,P)=>{if(m&&g[v]===void 0){J("sidebar_group_org_pin_toggled",{virtual_mcp_id:v,pinned:P}),x(F=>({...F,[v]:P}));try{await f.update.mutateAsync({id:v,data:{pinned:P}})}catch{$r(le,v,!P),x(F=>{const Re={...F};return delete Re[v],Re})}}},ke=v=>{const P=v===l||v===St;return{isOrgPinned:P||S.has(v),canManageOrgPin:P?!1:m,onToggleOrgPin:P?void 0:We}},Ie=v=>({virtualMcpId:v.virtualMcpId,isActive:v.virtualMcpId===l?H:E===v.virtualMcpId,threadCount:fe.get(v.virtualMcpId)??0,onOpen:Me,onNewTask:_e,onShowSettings:Ce,onHideGroup:we,...ke(v.virtualMcpId)}),Ke=v=>{const P=me(he(v.threads)),F=c.get(v.virtualMcpId)??null;return{virtualMcpId:v.virtualMcpId,threads:P,devPartnerId:F,devGroupVisibleCount:F?fe.get(F)??0:0,activeTaskId:M,filters:ye,groupVisibleCount:fe.get(v.virtualMcpId)??0,onSelectTask:Ue,onArchiveTask:be,onNewTaskInGroup:_e,onShowSettings:Ce,onHideGroup:we,...ke(v.virtualMcpId)}},ue=B!=="all",{state:Ve,isMobile:Ye}=Be();if(Ve==="collapsed"&&!Ye){const v=xe.filter(P=>{const F=me(he(P.threads));return!(ue&&F.length===0)});return s.jsxs(s.Fragment,{children:[s.jsx(yt,{value:pe.length===0}),s.jsx(Ae,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:s.jsx(Al,{groups:v,orderScope:le,decopilotId:l,orgPinnedIds:j,onReorder:()=>oe(P=>P+1),renderGroup:P=>Ke(P)})})]})}const vt=s.jsx("button",{type:"button",onClick:()=>Q(v=>!v),className:"text-xs text-muted-foreground hover:text-foreground transition-colors px-1.5 py-0.5 rounded hover:bg-muted",children:se?"All":"Mine"}),st=v=>s.jsxs("div",{className:W("shrink-0 px-1 flex items-center justify-between",v?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(ce,{"aria-label":"Search threads",onClick:()=>{J("tasks_panel_search_opened"),re(!0),V(!0)},children:s.jsx(sr,{size:16})}),s.jsx(ce,{"aria-label":G==="flat"?"Group by status":"Show as flat list",title:G==="flat"?"Flat list":"Grouped by status",onClick:()=>{const P=G==="flat"?"status":"flat";J("tasks_panel_group_by_changed",{to_value:P}),Y(P)},children:G==="flat"?s.jsx(nr,{size:16}):s.jsx(rr,{size:16})}),!v&&s.jsxs(xt,{children:[s.jsx(Qe,{asChild:!0,children:s.jsxs(ce,{"aria-label":"Filter tasks",children:[s.jsx(Co,{size:16}),ue&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 ring-1 ring-sidebar pointer-events-none"})]})}),s.jsx(pt,{align:"start",sideOffset:8,collisionPadding:16,className:"w-72 p-3",children:s.jsx("div",{className:"flex flex-col gap-2",children:s.jsx(Ul,{label:"Type",children:s.jsxs(wo,{value:B,onValueChange:P=>{const F=P;F!==B&&J("tasks_panel_filter_changed",{to_value:F}),K(F)},children:[s.jsx(ko,{size:"sm",className:"w-full",children:s.jsx(Io,{})}),s.jsx(To,{children:Object.keys(us).map(P=>s.jsx(Oo,{value:P,children:us[P]},P))})]})})})})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[vt,s.jsx(ce,{"aria-label":"New thread",title:"New thread",onClick:()=>{Ze()},children:s.jsx(or,{size:16})})]})]});return Ye?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s.jsx(yt,{value:pe.length===0}),st(!0),s.jsxs(Ko,{defaultValue:"threads",variant:"pill",className:"flex flex-col flex-1 min-h-0 gap-0",children:[s.jsxs(Vo,{variant:"pill",className:"shrink-0 mx-1 mb-2 w-[calc(100%-0.5rem)]",children:[s.jsx(Jt,{variant:"pill",value:"threads",children:"Threads"}),s.jsx(Jt,{variant:"pill",value:"agents",children:"Agents"})]}),s.jsx(Zt,{value:"threads",className:"flex-1 min-h-0 mt-1 flex flex-col",children:s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(ds,{threads:Ne,groupBy:G,activeTaskId:M,onSelectTask:Ue,onArchiveTask:be,filters:ye,hasMore:C,isFetchingMore:w,onLoadMore:()=>{_()}})})}),s.jsx(Zt,{value:"agents",className:"flex-1 min-h-0 mt-1 flex flex-col",children:s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(cs,{groups:pe,orderScope:le,decopilotId:l,orgPinnedIds:j,onReorder:()=>oe(v=>v+1),renderGroup:Ie})})})]}),Z&&s.jsx(ns,{open:te,onOpenChange:V})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s.jsx(yt,{value:pe.length===0}),st(!1),s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:[s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(ds,{threads:Ne,groupBy:G,activeTaskId:M,onSelectTask:Ue,onArchiveTask:be,filters:ye,hasMore:C,isFetchingMore:w,onLoadMore:()=>{_()}})}),s.jsx("div",{className:"shrink-0 mx-2 my-2 border-b"}),s.jsxs("div",{className:"shrink-0",children:[s.jsx(Gl,{label:"Agents",open:U,onToggle:()=>X(v=>!v),count:pe.length,controlsId:"sidebar-section-agents",actionSlot:s.jsx(Hs,{compact:!0})}),s.jsx("div",{id:"sidebar-section-agents","aria-hidden":!U,className:"grid transition-[grid-template-rows] duration-200 ease-out",style:{gridTemplateRows:U?"1fr":"0fr"},children:s.jsx("div",{className:"overflow-hidden",children:s.jsx(ot,{className:"flex flex-col gap-0.5 max-h-[35vh] overflow-y-auto overscroll-contain",children:s.jsx(cs,{groups:pe,orderScope:le,decopilotId:l,orgPinnedIds:j,onReorder:()=>oe(v=>v+1),renderGroup:Ie})})})})]})]}),Z&&s.jsx(ns,{open:te,onOpenChange:V})]})}function Ul(t){const e=N.c(7),{label:n,children:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let i;e[2]!==r?(i=s.jsx("div",{className:"w-36 shrink-0",children:r}),e[2]=r,e[3]=i):i=e[3];let l;return e[4]!==o||e[5]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,i]}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}const ql=5,Wl=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function mn(){const t=N.c(3),{state:e}=Be();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:ql}).map(Yl)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(je,{className:"size-6 rounded-md"}),s.jsx(je,{className:"size-6 rounded-md"}),s.jsx(je,{className:"size-6 rounded-md"})]}),s.jsx(je,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Wl.map(Kl)})]}),t[2]=r):r=t[2],r}function Kl(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(je,{className:"size-5 rounded-full shrink-0"}),s.jsx(je,{className:W("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(Vl)})]},e)}function Vl(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(je,{className:"h-3 flex-1 rounded-sm"})},e)}function Yl(t,e){return s.jsx(je,{className:"size-10 rounded-lg mx-auto"},e)}function Xl(){const t=N.c(4),e=Gs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Vi,{}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(gs,{children:s.jsx(A.Suspense,{fallback:s.jsx(mn,{}),children:s.jsx(un,{})})}),t[1]=r):r=t[1];let o;return t[2]!==e?(o=s.jsx(Os,{children:s.jsx(Us,{sections:e,footer:n,additionalContent:r})}),t[2]=e,t[3]=o):o=t[3],o}function Ql(t){const e=N.c(8),{onClose:n}=t,r=Gs();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Yi,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(mn,{}),e[1]=i):i=e[1];let l;e[2]!==n?(l=s.jsx(gs,{children:s.jsx(A.Suspense,{fallback:i,children:s.jsx(un,{onNavigate:n})})}),e[2]=n,e[3]=l):l=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==l?(a=s.jsx(Os,{children:s.jsx(hi,{sections:r,onClose:n,footer:o,additionalContent:l})}),e[4]=n,e[5]=r,e[6]=l,e[7]=a):a=e[7],a}const Jl="sidebar.open";function Zl(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(qo,{}),t[0]=e):e=t[0],e}function cd(){const t=N.c(24),e=Pt(),[n,r]=ut(Jl,!1),{width:o,wrapperRef:i,onStartResize:l,resetWidth:a}=Jo();let c;t[0]!==e?(c=e?s.jsxs(ie.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto_auto] items-center gap-2",children:[s.jsx(ie.LogoLink,{}),s.jsx(Xt,{}),s.jsx(Tt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ie.TogglesSlot,{}),s.jsx(ie.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(ie.CenterSlot,{}),s.jsx(ie.RightSlot,{})]}):s.jsxs(ie.Header,{children:[s.jsxs(ie.LeftColumn,{children:[s.jsx(ie.LogoLink,{}),s.jsx(Xt,{}),s.jsx(ie.TogglesSlot,{})]}),s.jsx(ie.CenterSlot,{}),s.jsxs(ie.RightColumn,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:s.jsx(ie.TabsSlot,{})}),s.jsx(ie.RightSlot,{})]})]}),t[0]=e,t[1]=c):c=t[1];const d=`${o}px`;let u;t[2]!==d?(u={"--sidebar-width":d,"--sidebar-width-icon":"3.5rem"},t[2]=d,t[3]=u):u=t[3];const m=u;let f;t[4]!==e||t[5]!==l||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Xl,{}),s.jsx(Yo,{onPointerDown:l,onDoubleClick:a})]}),t[4]=e,t[5]=l,t[6]=a,t[7]=f):f=t[7];let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h={background:"transparent",containerType:"inline-size"},t[8]=h):h=t[8];let x;t[9]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ln,{className:"flex flex-col",style:h,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(A.Suspense,{fallback:s.jsx(Zl,{}),children:s.jsx(Fn,{})})})})}),t[9]=x):x=t[9];let p;t[10]!==m||t[11]!==f||t[12]!==i?(p=s.jsxs(Bn,{ref:i,className:"flex-1 bg-sidebar relative min-h-0",style:m,children:[f,x]}),t[10]=m,t[11]=f,t[12]=i,t[13]=p):p=t[13];let g;t[14]!==e?(g=e&&s.jsx($o,{renderSidebar:ea}),t[14]=e,t[15]=g):g=t[15];let b;t[16]!==c||t[17]!==p||t[18]!==g?(b=s.jsx(jo,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,p,g]})}),t[16]=c,t[17]=p,t[18]=g,t[19]=b):b=t[19];let j;return t[20]!==r||t[21]!==n||t[22]!==b?(j=s.jsx(cr,{children:s.jsx(ie.Provider,{children:s.jsx(Un,{open:n,onOpenChange:r,children:b})})}),t[20]=r,t[21]=n,t[22]=b,t[23]=j):j=t[23],j}function ea(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Ql,{onClose:e})})})}export{cd as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bz as _}from"./index-CcSfK5lN.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{c as le,r as K,b as yt,D as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,
|
|
1
|
+
import{c as le,r as K,b as yt,D as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,a6 as rs,u as ls,v as xt,E as os}from"./index-CcSfK5lN.js";import{S as as}from"./search-input-DfY0Idtt.js";import{P as De}from"./index-BLrDPPMI.js";import{E as St}from"./empty-state-BUpOZfFd.js";import{R as ns}from"./require-capability-Bh5SW_Rr.js";import{K as Tt,S as is}from"./scroll-area-KBEcsrNl.js";import{u as vt}from"./use-connection-DKlrZD28.js";import{g as Pt}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-D5YEUUHD.js";import{P as ct,a as dt,b as mt}from"./popover-B5x5gTCp.js";import{T as Ze,a as et,b as tt}from"./tooltip-Bmj8PlAJ.js";import{i as ft,n as cs}from"./ChevronUp-CGE39voI.js";import{a as Xe}from"./Eye-fTf2jKhH.js";import{n as Mt}from"./Globe01-DYSo0Sr2.js";import{i as At}from"./FilterLines-Ba5JOCcM.js";import{i as ds}from"./Key01-DV-6LIf3.js";import{i as ms}from"./Play-CllDczEk.js";import{aq as us,X as xs,L as fs}from"./agent-icon-CGghaYK_.js";import{M as _t}from"./monaco-editor-DbRZxEyH.js";import{u as ps}from"./use-members-BUflZqKM.js";import{S as hs,u as gs,W as js}from"./use-mcp-client-CWJJ80Qb.js";import{u as vs}from"./use-virtual-mcp-CHZDkVtB.js";import{n as Qe}from"./XCircle-DaUcrc3Z.js";import{c as Ns}from"./SwitchHorizontal01-5oVLoUdS.js";import{s as bs}from"./Plus-B6q1KrRb.js";import{s as ys}from"./Trash01-xnv05M2J.js";import{I as Ge}from"./input-DP5SZ5ZB.js";import{C as ws,g as Ss,b as Dt,f as st,a as Vt,c as pt,d as Is,e as Lt,h as Ut,A as Cs,T as ks,i as Ts,M as ht}from"./automation-runs-Ct44UxLc.js";import{a as lt,b as ot,c as at,d as $e,S as nt}from"./select-0LBXKeau.js";import{t as Kt}from"./ChevronDown-Ee_3Sayw.js";import{s as Ms}from"./Stars02-BQPdDCaK.js";import{T as _s}from"./textarea-CVXNf-WA.js";import{C as qt}from"./collection-tabs-DddR_OZb.js";import{S as Ds}from"./switch-D5rba96V.js";import{L as Ls}from"./label-BwKyZwbE.js";import{I as qe}from"./integration-icon-DN8Vp_dc.js";import{A as Bt}from"./avatar-DlocwZ2L.js";import{A as Fs,a as Rs,b as $s}from"./alert-82Lday5Z.js";import{C as Ht}from"./card-Cw03QSbR.js";import{K as Me}from"./monitoring-stats-row-DwWeNnqf.js";import{u as Jt}from"./studio-tools-HEHEmVw-.js";import{u as zs}from"./useSuspenseInfiniteQuery-CnJ1E1GC.js";import{b as Os,S as Es,c as Ps,d as As}from"./sheet-Ct7wtAfe.js";import{T as Fe,a as ut,b as Gt,c as Qt,d as Wt,e as ae}from"./table-62RfQr_D.js";import{u as Vs}from"./use-infinite-scroll-DuPlVcYm.js";import{c as Us,b as Ks}from"./use-automations-DEaRUIlF.js";import"./SearchMd-CXYhXBwx.js";import"./sidebar-s0ed1fkY.js";import"./LayoutLeft-BtE5tmf6.js";import"./use-mobile-Cg20Hyt3.js";import"./use-capability-BHX3IXJ3.js";import"./access-gate-D5zqAUht.js";import"./capability-load-error-DT9Z3j9_.js";import"./Stars01-DlOkHfPH.js";import"./ChevronRight-DCf9L0Ls.js";import"./use-clock-tick-CFuWOCEr.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bh4dFYsC.js";import"./file-type-icon-CU03wRXW.js";import"./dialog-dc-6JiKe.js";import"./X-DJbyjHqp.js";import"./ZoomOut-sMdcQ1z1.js";import"./tab-id-AX1D_RMI.js";import"./content-blocks-o63cs2vh.js";import"./types-Op5a7f4H.js";import"./chat-context-ooWv73sg.js";import"./hooks-BPJw1hei.js";import"./decopilot-sse-pool-DCtLG819.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-la4AIHaF.js";import"./use-decopilot-events-CVwOiMhy.js";import"./use-organization-settings-DJVuBTtS.js";import"./AlertCircle-BxTbR_B1.js";import"./Star01-Bf-FCZNm.js";import"./XClose-Dpj0HG8O.js";import"./ZapSquare-_6Gbk0W4.js";import"./Tool01-CYPQsW1Y.js";import"./Monitor01-CWc8cxQO.js";import"./Upload01-Cxp7zIDh.js";import"./shell-layout-CDjO22II.js";import"./Users03-UgyNhO90.js";import"./SearchLg-ZiEk0E-L.js";import"./CheckCircle-BtIJRHva.js";import"./Zap-3WgTvh1l.js";import"./required-auth-layout-DnZfZ2NE.js";import"./use-org-sso-BSFJGRQT.js";import"./LinkExternal01-CALVZhat.js";import"./ArrowUpRight-S4NNBOkv.js";import"./Palette-Dok2NINN.js";import"./use-navigate-to-agent-Vbfee0Zl.js";import"./use-mcp-prompts-C9VlrieU.js";import"./form-BCFMjlpa.js";import"./use-collections-CrBZtgZk.js";import"./Settings02-D7AphFkm.js";import"./DotsVertical-fVEXRB26.js";import"./Globe04-3H1XgmQN.js";import"./HardDrive-JOn6Ez5n.js";import"./Sun-BkeePoRn.js";import"./Shield01-DKJBa4Nn.js";import"./User01-DuB-iQs0.js";import"./Users01-BkkYER_Z.js";import"./index-R31BplOc.js";import"./use-org-auth-client-C_5ald3U.js";import"./auth-ThTV5Po4.js";import"./useInfiniteQuery-yG_KEAOQ.js";import"./task-status-CeaMIgEp.js";import"./checkbox-B68Qec99.js";import"./command-DwLXEYqP.js";import"./index-RTYNd1V2.js";import"./index-CK3mNMke.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Ft(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...l]=e.split("=");return{key:r||"",operator:"eq",value:l.join("=")}}if(e.includes("~")){const[r,...l]=e.split("~");return{key:r||"",operator:"contains",value:l.join("~")}}if(e.includes("@")){const[r,...l]=e.split("@");return{key:r||"",operator:"in",value:l.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},l=[],a={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(r[o.key]=`%${o.value}%`);break;case"exists":l.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:l.length>0?l:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
|
|
4
4
|
|
|
5
5
|
... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:r}}function Hs(s){const e=le.c(117),{log:r}=s,[l,a]=K.useState(!1),[o,c]=K.useState(!1),i=yt(),{org:n}=Be(),d=vt(),f=Rt(r.input),p=Rt(r.output),v=Js;let b;e[0]!==r.input||e[1]!==r.output?(b=async se=>{const ee=v(se==="input"?r.input:r.output);try{await navigator.clipboard.writeText(ee),se==="input"?(a(!0),setTimeout(()=>a(!1),2e3)):(c(!0),setTimeout(()=>c(!1),2e3))}catch{Se.error("Failed to copy to clipboard")}},e[0]=r.input,e[1]=r.output,e[2]=b):b=e[2];const u=b;let R;e[3]!==r.id||e[4]!==r.input||e[5]!==r.output||e[6]!==r.toolName?(R=se=>{const ee=v(se==="input"?r.input:r.output),oe=new Blob([ee],{type:"application/json"}),he=URL.createObjectURL(oe),be=document.createElement("a");be.href=he,be.download=`${r.toolName}-${se}-${r.id}.json`,be.click(),URL.revokeObjectURL(he)},e[3]=r.id,e[4]=r.input,e[5]=r.output,e[6]=r.toolName,e[7]=R):R=e[7];const h=R;let j;e[8]!==d||e[9]!==r.connectionId||e[10]!==r.input||e[11]!==r.toolName||e[12]!==i||e[13]!==n?(j=()=>{const se=d.find(oe=>oe.id===r.connectionId);if(!se){Se.error("Could not find the connection for this tool call");return}const ee=crypto.randomUUID();sessionStorage.setItem(`replay-${ee}`,JSON.stringify(r.input)),i({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:n.slug,appSlug:Pt(se),collectionName:"tools",itemId:encodeURIComponent(r.toolName)},search:{replayId:ee}})},e[8]=d,e[9]=r.connectionId,e[10]=r.input,e[11]=r.toolName,e[12]=i,e[13]=n,e[14]=j):j=e[14];const m=j,[C,S]=K.useState(!1);let g;e[15]!==r.requestId?(g=async()=>{try{await navigator.clipboard.writeText(r.requestId),S(!0),setTimeout(()=>S(!1),2e3)}catch{Se.error("Failed to copy to clipboard")}},e[15]=r.requestId,e[16]=g):g=e[16];const _=g;let I;e[17]!==r.timestamp?(I=new Date(r.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[17]=r.timestamp,e[18]=I):I=e[18];const x=I,F="text-sm px-5 md:px-6 py-5 space-y-5";let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[19]=w):w=e[19];let D;e[20]!==x?(D=t.jsxs("div",{children:[w,t.jsx("div",{className:"text-sm text-foreground",children:x})]}),e[20]=x,e[21]=D):D=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 O;e[23]!==r.durationMs?(O=t.jsxs("div",{children:[k,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[r.durationMs,"ms"]})]}),e[23]=r.durationMs,e[24]=O):O=e[24];let $;e[25]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[25]=$):$=e[25];let J;e[26]!==r.userName?(J=t.jsxs("div",{children:[$,t.jsx("div",{className:"text-sm text-foreground",children:r.userName})]}),e[26]=r.userName,e[27]=J):J=e[27];let P;e[28]!==r.virtualMcpName?(P=r.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsx("div",{className:"text-sm text-foreground",children:r.virtualMcpName})]}),e[28]=r.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 y;e[31]!==r.requestId?(y=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:r.requestId}),e[31]=r.requestId,e[32]=y):y=e[32];let T;e[33]!==C?(T=C?t.jsx(ft,{size:12}):t.jsx(Xe,{size:12}),e[33]=C,e[34]=T):T=e[34];let L;e[35]!==_||e[36]!==T?(L=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:T}),e[35]=_,e[36]=T,e[37]=L):L=e[37];let z;e[38]!==y||e[39]!==L?(z=t.jsxs("div",{children:[X,t.jsxs("div",{className:"flex items-center gap-1",children:[y,L]})]}),e[38]=y,e[39]=L,e[40]=z):z=e[40];let E;e[41]!==r.userAgent?(E=r.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:r.userAgent})]}),e[41]=r.userAgent,e[42]=E):E=e[42];let U;e[43]!==r.properties||e[44]!==i||e[45]!==n?(U=r.properties&&Object.keys(r.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:"Properties"}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(r.properties).map(se=>{const[ee,oe]=se;return t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsxs(rt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[ee,"=",oe]})}),t.jsx(mt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const he={key:ee,operator:"eq",value:oe};i({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Re([he])}})},children:[t.jsx(At,{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}=${oe}`),Se.success("Copied filter to clipboard")}catch{Se.error("Failed to copy to clipboard")}},children:[t.jsx(Xe,{size:14,className:"mr-2"}),"Copy filter"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(ee),Se.success("Copied key to clipboard")}catch{Se.error("Failed to copy to clipboard")}},children:[t.jsx(ds,{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(oe),Se.success("Copied value to clipboard")}catch{Se.error("Failed to copy to clipboard")}},children:[t.jsx(us,{size:14,className:"mr-2"}),"Copy value"]})]})})]},ee)})})]}),e[43]=r.properties,e[44]=i,e[45]=n,e[46]=U):U=e[46];let q;e[47]!==O||e[48]!==J||e[49]!==P||e[50]!==z||e[51]!==E||e[52]!==U||e[53]!==D?(q=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[D,O,J,P,z,E,U]}),e[47]=O,e[48]=J,e[49]=P,e[50]=z,e[51]=E,e[52]=U,e[53]=D,e[54]=q):q=e[54];let V;e[55]!==r.errorMessage?(V=r.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:"Error"}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:r.errorMessage})]}),e[55]=r.errorMessage,e[56]=V):V=e[56];const Y="space-y-4";let B;e[57]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[57]=B):B=e[57];const G=f.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Tt(f.originalSize)," - truncated)"]});let A;e[58]!==G?(A=t.jsxs("div",{className:"flex items-center gap-2",children:[B,G]}),e[58]=G,e[59]=A):A=e[59];let N;e[60]!==m||e[61]!==r.input?(N=r.input&&t.jsxs(Ze,{children:[t.jsx(et,{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(ms,{size:14})})}),t.jsx(tt,{children:"Replay tool call"})]}),e[60]=m,e[61]=r.input,e[62]=N):N=e[62];let M;e[63]!==h||e[64]!==f?(M=f.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>h("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full input"})]}),e[63]=h,e[64]=f,e[65]=M):M=e[65];let H;e[66]!==u?(H=()=>u("input"),e[66]=u,e[67]=H):H=e[67];let te;e[68]!==l?(te=l?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[68]=l,e[69]=te):te=e[69];let Q;e[70]!==H||e[71]!==te?(Q=t.jsx(Z,{size:"icon",variant:"ghost",onClick:H,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:te}),e[70]=H,e[71]=te,e[72]=Q):Q=e[72];let re;e[73]!==N||e[74]!==M||e[75]!==Q?(re=t.jsxs("div",{className:"flex items-center gap-1",children:[N,M,Q]}),e[73]=N,e[74]=M,e[75]=Q,e[76]=re):re=e[76];let W;e[77]!==A||e[78]!==re?(W=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[A,re]}),e[77]=A,e[78]=re,e[79]=W):W=e[79];let ne;e[80]!==f?(ne=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:f.content,language:"json",height:"100%",readOnly:!0})}),e[80]=f,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 ze="rounded-lg overflow-hidden border border-border",Ie="flex items-center justify-between p-1 pl-4 border-b border-border",Ce="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 Le=p.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Tt(p.originalSize)," - truncated)"]});let ge;e[86]!==ie||e[87]!==Le?(ge=t.jsxs("div",{className:Ce,children:[ie,Le]}),e[86]=ie,e[87]=Le,e[88]=ge):ge=e[88];let je;e[89]!==h||e[90]!==p.isTruncated?(je=p.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>h("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full output"})]}),e[89]=h,e[90]=p.isTruncated,e[91]=je):je=e[91];let ve;e[92]!==u?(ve=()=>u("output"),e[92]=u,e[93]=ve):ve=e[93];let me;e[94]!==o?(me=o?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[94]=o,e[95]=me):me=e[95];let Ne;e[96]!==ve||e[97]!==me?(Ne=t.jsx(Z,{size:"icon",variant:"ghost",onClick:ve,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:me}),e[96]=ve,e[97]=me,e[98]=Ne):Ne=e[98];let ue;e[99]!==je||e[100]!==Ne?(ue=t.jsxs("div",{className:"flex items-center gap-1",children:[je,Ne]}),e[99]=je,e[100]=Ne,e[101]=ue):ue=e[101];let xe;e[102]!==ge||e[103]!==ue?(xe=t.jsxs("div",{className:Ie,children:[ge,ue]}),e[102]=ge,e[103]=ue,e[104]=xe):xe=e[104];let fe;e[105]!==p.content?(fe=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:p.content,language:"json",height:"100%",readOnly:!0})}),e[105]=p.content,e[106]=fe):fe=e[106];let pe;e[107]!==xe||e[108]!==fe?(pe=t.jsx("div",{children:t.jsxs("div",{className:ze,children:[xe,fe]})}),e[107]=xe,e[108]=fe,e[109]=pe):pe=e[109];let ke;e[110]!==ce||e[111]!==pe?(ke=t.jsxs("div",{className:Y,children:[ce,pe]}),e[110]=ce,e[111]=pe,e[112]=ke):ke=e[112];let we;return e[113]!==q||e[114]!==V||e[115]!==ke?(we=t.jsxs("div",{className:F,children:[q,V,ke]}),e[113]=q,e[114]=V,e[115]=ke,e[116]=we):we=e[116],we}function Js(s){return JSON.stringify(s,null,2)}const Xt=/^now(?:-(\d+)([mhdwM]))?$/,Gs={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 r=e.match(Xt);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,a=r[2]||null;return{isNow:!0,offset:l,unit:a}}function ye(s){const e=s.trim(),r=new Date(e);if(!Number.isNaN(r.getTime())&&e.includes("-"))return{valid:!0,date:r};const l=Yt(e);if(!l)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const a=new Date,o=new Date(a);if(l.offset===0||!l.unit)return{valid:!0,date:o};switch(l.unit){case"m":o.setMinutes(o.getMinutes()-l.offset);break;case"h":o.setHours(o.getHours()-l.offset);break;case"d":o.setDate(o.getDate()-l.offset);break;case"w":o.setDate(o.getDate()-l.offset*7);break;case"M":o.setMonth(o.getMonth()-l.offset);break}return{valid:!0,date:o}}function Qs(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Zt(s){const e=s.trim();return Xt.test(e)}function $t(s){const e=s.trim();if(e==="now")return"Now";const r=Yt(e);if(!r||!r.unit){const o=ye(e);return o.valid&&o.date?Qs(o.date):e}const l=Gs[r.unit],a=r.offset!==1?"s":"";return`${r.offset} ${l}${a} ago`}const 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 Ws(s,e){const r=es.find(l=>l.from===s&&l.to===e);return r?r.label:`${$t(s)} to ${$t(e)}`}function Je(s){const e=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),a=String(s.getHours()).padStart(2,"0"),o=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${e}-${r}-${l} ${a}:${o}:${c}`}function Xs(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,r,l,a,o,c,i]=e,n=new Date(Number(r),Number(l)-1,Number(a),Number(o),Number(c),Number(i));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Zt(s))return s;const e=ye(s);return e.valid&&e.date?Je(e.date):s}function zt({value:s,onChange:e,placeholder:r="now or now-2d",className:l,disabled:a,error:o}){const[c,i]=K.useState(!1),[n,d]=K.useState(()=>gt(s)),[f,p]=K.useState(),[v,b]=K.useState(!1),u=K.useRef(s);u.current!==s&&(u.current=s,v||d(gt(s)));const R=x=>{const F=x.target.value;d(F),p(void 0)},h=()=>{b(!0)},j=()=>{b(!1);const x=n.trim();if(Zt(x)){p(void 0),e(x);return}const F=Xs(x);if(F){p(void 0),e(F.toISOString()),d(Je(F));return}const w=ye(x);if(w.valid&&w.date){p(void 0),e(x),d(Je(w.date));return}d(gt(s)),p(void 0)},m=x=>{if(x){const w=ye(s).date||new Date;x.setHours(w.getHours()),x.setMinutes(w.getMinutes()),x.setSeconds(0),x.setMilliseconds(0);const D=x.toISOString();d(Je(x)),e(D),p(void 0)}i(!1)},C=x=>{const[F,w]=x.target.value.split(":").map(Number),k=ye(s).date||new Date;k.setHours(F||0),k.setMinutes(w||0),k.setSeconds(0),k.setMilliseconds(0);const O=k.toISOString();d(Je(k)),e(O)},S=ye(s),g=S.valid?S.date:new Date,_=g?`${String(g.getHours()).padStart(2,"0")}:${String(g.getMinutes()).padStart(2,"0")}`:"",I=o||f;return t.jsxs("div",{className:de("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ge,{value:n,onChange:R,onFocus:h,onBlur:j,placeholder:r,disabled:a,className:de("text-sm h-8",I&&"border-destructive focus-visible:ring-destructive")}),I&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:I})]}),t.jsxs(ct,{open:c,onOpenChange:i,children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:a,children:t.jsx(xs,{className:"h-4 w-4"})})}),t.jsxs(mt,{className:"w-auto p-0",align:"end",children:[t.jsx(ws,{mode:"single",selected:g||void 0,onSelect:m,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ge,{type:"time",value:_,onChange:C,className:"text-sm h-8"})]})]})]})]})}function Ys({value:s,onChange:e,className:r,disabled:l,quickRanges:a=es}){const[o,c]=K.useState(!1),[i,n]=K.useState(s.from),[d,f]=K.useState(s.to),[p,v]=K.useState(null),b=K.useRef({from:s.from,to:s.to});(b.current.from!==s.from||b.current.to!==s.to)&&(b.current={from:s.from,to:s.to},n(s.from),f(s.to));const u=m=>{b.current={from:m.from,to:m.to},n(m.from),f(m.to),c(!1),e({from:m.from,to:m.to})},R=()=>{const m=ye(i),C=ye(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)},h=m=>s.from===m.from&&s.to===m.to,j=Ws(s.from,s.to);return t.jsxs(ct,{open:o,onOpenChange:c,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:de("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Ms,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:j})]}),t.jsx(Kt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(mt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:m=>m.preventDefault(),style:o?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:"Absolute time range"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"From"}),t.jsx(zt,{value:i,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"To"}),t.jsx(zt,{value:d,onChange:f,placeholder:"now"})]}),p&&t.jsx("p",{className:"text-xs text-destructive",children:p}),t.jsx(Z,{onClick:R,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:a.map(m=>{const C=h(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 Zs(s,e){const r=le.c(12),{org:l}=Be(),a=Jt();let o,c,i;r[0]!==l.id||r[1]!==s?(i={...s,excludeConnectionIds:[ts,...s.excludeConnectionIds??[]]},c=wt,o=it.monitoringStatsToolCalls(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=c,r[4]=i):(o=r[2],c=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ss(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let d;return r[8]!==e||r[9]!==o||r[10]!==n?(d={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=d):d=r[11],c(d)}function er(s,e){const r=le.c(12),{org:l}=Be(),a=Jt();let o,c,i;r[0]!==l.id||r[1]!==s?(i={...s,connectionIds:[ts],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},c=wt,o=it.monitoringStatsLlm(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=c,r[4]=i):(o=r[2],c=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ss(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let d;return r[8]!==e||r[9]!==o||r[10]!==n?(d={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=d):d=r[11],c(d)}function _e(s){const e=le.c(20),{title:r,value:l,action:a,children:o,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]!==r?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:r}),e[2]=r,e[3]=n):n=e[3];let d;e[4]!==l?(d=t.jsx("span",{className:"text-4xl font-normal",children:l}),e[4]=l,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==d?(f=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]=f):f=e[8];let p;e[9]!==a?(p=a&&t.jsx("div",{className:"shrink-0",children:a}),e[9]=a,e[10]=p):p=e[10];let v;e[11]!==f||e[12]!==p?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[f,p]}),e[11]=f,e[12]=p,e[13]=v):v=e[13];let b;e[14]!==o?(b=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=b):b=e[15];let u;return e[16]!==i||e[17]!==v||e[18]!==b?(u=t.jsxs(Ht,{className:i,children:[v,b]}),e[16]=i,e[17]=v,e[18]=b,e[19]=u):u=e[19],u}function jt(s){const e=le.c(14),{metrics:r,connections:l,mode:a,total:o}=s,{org:c}=Be(),i=yt();let n,d,f;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==i||e[4]!==c||e[5]!==o){f=Symbol.for("react.early_return_sentinel");e:{const v=l??[],b=new Map(r.map(sr));let u;e[9]!==a?(u=(h,j)=>{const m=Lt(h.metric,a);return Lt(j.metric,a)-m},e[9]=a,e[10]=u):u=e[10];const R=v.map(h=>({connection:h,metric:b.get(h.id)})).filter(tr).sort(u).slice(0,4);if(R.length===0){f=null;break e}n="flex flex-col",d=R.map((h,j)=>{const{connection:m,metric:C}=h,S=o>0?(C.calls/o*100).toFixed(1):"0.0",g=a==="errors"?`${C.errorRate.toFixed(1)}%`:`${S}%`,_=j===R.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:Pt(m)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:m.icon,name:m.title,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:m.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:g}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:Is(C,a)})]})]},m.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=i,e[4]=c,e[5]=o,e[6]=n,e[7]=d,e[8]=f}else n=e[6],d=e[7],f=e[8];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;return e[11]!==n||e[12]!==d?(p=t.jsx("div",{className:n,children:d}),e[11]=n,e[12]=d,e[13]=p):p=e[13],p}function tr(s){return s.metric}function sr(s){return[s.connectionId,s]}const Ot=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Et(s){let e=0;for(let r=0;r<s.length;r++)e=e*31+s.charCodeAt(r)>>>0;return Ot[e%Ot.length]}function He(s){const e=le.c(21),{models:r,mode:l}=s,a=l===void 0?"calls":l;if(r.length===0)return null;let o;e[0]!==a?(o=u=>a==="tokens"?(u.inputTokens??0)+(u.outputTokens??0):a==="cost"?u.costUsd??0:u.calls,e[0]=a,e[1]=o):o=e[1];const c=o;let i;e[2]!==a?(i=u=>a==="cost"?Vt(u):a==="tokens"?st(u):u.toLocaleString(),e[2]=a,e[3]=i):i=e[3];const n=i;let d;e[4]!==c?(d=(u,R)=>u+c(R),e[4]=c,e[5]=d):d=e[5];const f=r.reduce(d,0);let p,v;if(e[6]!==n||e[7]!==r||e[8]!==f||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 R=[...r].sort(u).slice(0,4);p="flex flex-col";let h;e[14]!==n||e[15]!==f||e[16]!==c?(h=(j,m,C)=>{const S=c(j),g=f>0?(S/f*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(Qe,{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:[g,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(S)})]})]},j.toolName)},e[14]=n,e[15]=f,e[16]=c,e[17]=h):h=e[17],v=R.map(h),e[6]=n,e[7]=r,e[8]=f,e[9]=c,e[10]=p,e[11]=v}else p=e[10],v=e[11];let b;return e[18]!==p||e[19]!==v?(b=t.jsx("div",{className:p,children:v}),e[18]=p,e[19]=v,e[20]=b):b=e[20],b}function rr(s){const e=le.c(48),{displayDateRange:r,connectionIds:l,excludeConnectionIds:a,toolName:o,status:c,connections:i,isStreaming:n,streamingRefetchInterval:d,llmUserIds:f}=s,p=Ss(r),v=n?d:!1;let b;e[0]!==v?(b={refetchInterval:v},e[0]=v,e[1]=b):b=e[1];const{data:u,isError:R}=Zs({interval:p,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),connectionIds:l.length>0?l:void 0,excludeConnectionIds:a,toolNames:o?[o]:void 0,status:c},b);let h;e[2]!==v?(h={refetchInterval:v},e[2]=v,e[3]=h):h=e[3];const{data:j,isError:m}=er({interval:p,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),userIds:f?.length?f:void 0},h),C=R||m,S=u?{totalCalls:u.totalCalls,totalErrors:u.totalErrors,avgDurationMs:u.avgDurationMs,p95DurationMs:u.p95DurationMs,data:Dt(u.timeseries,r,p)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},g=j?{totalCalls:j.totalCalls,totalErrors:j.totalErrors,avgDurationMs:j.avgDurationMs,p95DurationMs:j.p95DurationMs,data:Dt(j.timeseries,r,p)}:{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 I=_,x=j?.totalInputTokens??0,F=j?.totalOutputTokens??0,w=j?.totalTokens??0,D=j?.totalCostUsd??0;let k;e[6]!==u?.connectionBreakdown?(k=u?.connectionBreakdown??[],e[6]=u?.connectionBreakdown,e[7]=k):k=e[7];const O=k,[$,J]=K.useState("avg");let P;e[8]!==C?(P=C&&t.jsxs(Fs,{variant:"destructive",children:[t.jsx(rs,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Rs,{children:"Failed to load monitoring data"}),t.jsx($s,{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=>J(ce),e[10]=X):X=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(lt,{className:"w-[120px]",children:t.jsx(ot,{})}),e[11]=y):y=e[11];let T;e[12]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsxs(at,{children:[t.jsx($e,{value:"avg",children:"Avg"}),t.jsx($e,{value:"p95",children:"P95"})]}),e[12]=T):T=e[12];let L;e[13]!==$?(L=t.jsxs(nt,{value:$,onValueChange:X,children:[y,T]}),e[13]=$,e[14]=L):L=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 E;e[16]!==I?(E=t.jsx(He,{models:I,mode:"calls"}),e[16]=I,e[17]=E):E=e[17];let U;e[18]!==w?(U=st(w),e[18]=w,e[19]=U):U=e[19];let q;e[20]!==x?(q=st(x),e[20]=x,e[21]=q):q=e[21];let V;e[22]!==F?(V=st(F),e[22]=F,e[23]=V):V=e[23];let Y;e[24]!==q||e[25]!==V?(Y=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[q," in ·"," ",V," out"]}),e[24]=q,e[25]=V,e[26]=Y):Y=e[26];let B;e[27]!==I?(B=t.jsx(He,{models:I,mode:"tokens"}),e[27]=I,e[28]=B):B=e[28];let G;e[29]!==D?(G=D>0?Vt(D):"—",e[29]=D,e[30]=G):G=e[30];let A;e[31]!==D?(A=D===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=D,e[32]=A):A=e[32];let N;e[33]!==I||e[34]!==D?(N=D>0?t.jsx(He,{models:I,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:"Cost is reported only for the deco AI Gateway and OpenRouter providers."}),e[33]=I,e[34]=D,e[35]=N):N=e[35];let M;e[36]!==I?(M=t.jsx(He,{models:I,mode:"calls"}),e[36]=I,e[37]=M):M=e[37];const H=_e,te="AI Errors",Q=g.totalErrors.toLocaleString();let re;e[38]!==g.data?(re=t.jsx(Me,{data:g.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]"}),e[38]=g.data,e[39]=re):re=e[39];let W;e[40]!==I||e[41]!==g.totalErrors?(W=g.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No AI errors in this period"}):t.jsx(He,{models:I,mode:"calls"}),e[40]=I,e[41]=g.totalErrors,e[42]=W):W=e[42];let ne;return e[43]!==H||e[44]!==Q||e[45]!==re||e[46]!==W?(ne=t.jsxs(H,{title:te,value:Q,children:[re,W]}),e[43]=H,e[44]=Q,e[45]=re,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(_e,{title:"Tool Calls",value:S.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:S.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area"}),t.jsx(jt,{metrics:O,connections:i,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(_e,{title:"Latency",value:pt($==="avg"?S.avgDurationMs:S.p95DurationMs),action:L,children:[t.jsx(Me,{data:S.data,dataKey:$,colorNum:4,chartHeight:"h-[120px] md:h-[180px]"}),t.jsx(jt,{metrics:O,connections:i,mode:"latency",total:S.totalCalls})]}),t.jsxs(_e,{title:"Errors",value:S.totalErrors.toLocaleString(),children:[t.jsx(Me,{data:S.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]"}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No errors in this period"}):t.jsx(jt,{metrics:O,connections:i,mode:"errors",total:S.totalErrors})]})]}),z,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(_e,{title:"AI Calls",value:g.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:g.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]"}),E]}),t.jsxs(_e,{title:"Tokens",value:U,action:Y,children:[t.jsx(Me,{data:g.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]"}),B]}),t.jsxs(_e,{title:"Cost",value:G,action:A,children:[t.jsx(Me,{data:g.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]"}),N]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(_e,{title:"AI Latency",value:pt(g.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(g.p95DurationMs)]}),children:[t.jsx(Me,{data:g.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]"}),M]}),ne]})]})}function Ke(s){const e=le.c(8),{className:r}=s;let l;e[0]!==r?(l=de("pt-4 px-4 pb-6 gap-8",r),e[0]=r,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=Array.from({length:4}).map(lr),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:[o,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]!==l?(n=t.jsxs(Ht,{className:l,children:[a,i]}),e[6]=l,e[7]=n):n=e[7],n}function lr(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 or(){const s=le.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let r,l;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),l=t.jsx("div",{className:"border-t border-border"}),s[1]=r,s[2]=l):(r=s[1],l=s[2]);let a;return s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,r,l,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{}),t.jsx(Ke,{})]})]}),s[3]=a):a=s[3],a}function ar(s){const e=le.c(46),{log:r,connection:l,virtualMcpName:a,virtualMcpIcon:o,onClick:c,lastLogRef:i}=s;let n,d;if(e[0]!==r.timestamp){const $=new Date(r.timestamp);n=$.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=$.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=n,e[2]=d}else n=e[1],d=e[2];const f=d,p=l?.icon||null,v=l?.title??r.connectionId;let b;e[3]!==p||e[4]!==v?(b=t.jsx(Fe,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(qe,{icon:p,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=p,e[4]=v,e[5]=b):b=e[5];let u;e[6]!==r.toolName?(u=t.jsx("div",{className:"font-medium text-foreground truncate block",children:r.toolName}),e[6]=r.toolName,e[7]=u):u=e[7];const R=l?.title??r.connectionId;let h;e[8]!==R?(h=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:R}),e[8]=R,e[9]=h):h=e[9];let j;e[10]!==u||e[11]!==h?(j=t.jsxs(Fe,{className:"min-w-0 pr-2 md:pr-4",children:[u,h]}),e[10]=u,e[11]=h,e[12]=j):j=e[12];let m;e[13]!==o||e[14]!==a?(m=t.jsx(Fe,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:a?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:o,name:a,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:a})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=a,e[15]=m):m=e[15];let C;e[16]!==r.userImage||e[17]!==r.userName?(C=t.jsx(Bt,{url:r.userImage,fallback:r.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=r.userImage,e[17]=r.userName,e[18]=C):C=e[18];let S;e[19]!==r.userName?(S=t.jsx("span",{className:"truncate",children:r.userName}),e[19]=r.userName,e[20]=S):S=e[20];let g;e[21]!==C||e[22]!==S?(g=t.jsx(Fe,{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,S]})}),e[21]=C,e[22]=S,e[23]=g):g=e[23];let _;e[24]!==n?(_=t.jsx("div",{children:n}),e[24]=n,e[25]=_):_=e[25];let I;e[26]!==f?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:f}),e[26]=f,e[27]=I):I=e[27];let x;e[28]!==_||e[29]!==I?(x=t.jsxs(Fe,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[_,I]}),e[28]=_,e[29]=I,e[30]=x):x=e[30];let F;e[31]!==r.durationMs?(F=t.jsxs(Fe,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[r.durationMs,"ms"]}),e[31]=r.durationMs,e[32]=F):F=e[32];const w=r.isError?"destructive":"success",D=r.isError?"Error":"OK";let k;e[33]!==w||e[34]!==D?(k=t.jsx(Fe,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(rt,{variant:w,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:D})})}),e[33]=w,e[34]=D,e[35]=k):k=e[35];let O;return e[36]!==i||e[37]!==c||e[38]!==g||e[39]!==x||e[40]!==F||e[41]!==k||e[42]!==b||e[43]!==j||e[44]!==m?(O=t.jsxs(ut,{ref:i,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:c,children:[b,j,m,g,x,F,k]}),e[36]=i,e[37]=c,e[38]=g,e[39]=x,e[40]=F,e[41]=k,e[42]=b,e[43]=j,e[44]=m,e[45]=O):O=e[45],O}function nr(s){const e=le.c(26),{connectionIds:r,virtualMcpIds:l,tool:a,status:o,search:c,logs:i,hasMore:n,onLoadMore:d,isLoadingMore:f,connections:p,virtualMcps:v,membersData:b,client:u}=s,R=p??[],h=v??[],[j,m]=K.useState(null),C=Vs(d,n,f),S=Ut(b),g=new Map(S.map(mr)),_=new Map(h.map(dr));let x=i.map(N=>{const M=g.get(N.userId??""),H=N.virtualMcpId?_.get(N.virtualMcpId):null;return{...N,userName:M?.name??N.userId??"Unknown",userImage:M?.image??void 0,virtualMcpName:H?.title??null,virtualMcpIcon:H?.icon??null}});if(r.length>1){let N;e[0]!==r?(N=M=>r.includes(M.connectionId),e[0]=r,e[1]=N):N=e[1],x=x.filter(N)}if(l.length>1){let N;e[2]!==l?(N=M=>M.virtualMcpId&&l.includes(M.virtualMcpId),e[2]=l,e[3]=N):N=e[3],x=x.filter(N)}const F=new Map(R.map(cr));if(c){const N=c.toLowerCase();x=x.filter(M=>M.toolName.toLowerCase().includes(N)||(F.get(M.connectionId)?.title??M.connectionId).toLowerCase().includes(N)||M.errorMessage?.toLowerCase().includes(N))}const w=j!==null?x[j]??null:null,D=wt({queryKey:it.monitoringLogDetail(w?.id??""),queryFn:async()=>{if(!u)throw new Error("MCP client is not available");const N=await u.callTool({name:"MONITORING_LOG_GET",arguments:{id:w.id}});return N.structuredContent??N},enabled:w!==null}),k=D.data?.log,O=w&&k?{...w,input:k.input,output:k.output}:w;if(x.length===0){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=N):N=e[4];const M=c||r.length>0||l.length>0||a||o!=="all"?"No logs match your filters":"No logs found in this time range";let H;return e[5]!==M?(H=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(St,{image:N,title:"No logs found",description:M})}),e[5]=M,e[6]=H):H=e[6],H}const $="flex-1 flex flex-col min-w-0",J="flex-1 min-w-0 pt-1",P="min-w-[600px] md:min-w-0",X=Qt,y="w-full border-collapse";let T;e[7]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(ae,{className:"w-5"}),t.jsx(ae,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),t.jsx(ae,{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(ae,{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(ae,{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(ae,{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(ae,{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]=T):T=e[7];const L=Gt,z=x.map((N,M)=>t.jsx(ar,{log:N,connection:F.get(N.connectionId),virtualMcpName:N.virtualMcpName??"",virtualMcpIcon:N.virtualMcpIcon,onClick:()=>m(M),lastLogRef:M===x.length-1?C:void 0},N.id));let E;e[8]!==L||e[9]!==z?(E=t.jsx(L,{children:z}),e[8]=L,e[9]=z,e[10]=E):E=e[10];let U;e[11]!==X||e[12]!==T||e[13]!==E?(U=t.jsx("div",{className:J,children:t.jsx("div",{className:P,children:t.jsxs(X,{className:y,children:[T,E]})})}),e[11]=X,e[12]=T,e[13]=E,e[14]=U):U=e[14];const q=j!==null;let V;e[15]!==m?(V=N=>{N||m(null)},e[15]=m,e[16]=V):V=e[16];const Y=w&&j!==null&&t.jsxs(t.Fragment,{children:[t.jsx(Os,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(qe,{icon:F.get(w.connectionId)?.icon||null,name:F.get(w.connectionId)?.title??w.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Es,{className:"text-sm leading-snug truncate",children:w.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:F.get(w.connectionId)?.title??w.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(ir),disabled:j===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(cs,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(N=>N!==null&&N<x.length-1?N+1:N),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:D.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"})}):D.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:()=>D.refetch(),children:"Retry"})]}):t.jsx(Hs,{log:O})})]});let B;e[17]!==Y?(B=t.jsx(Ps,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:Y}),e[17]=Y,e[18]=B):B=e[18];let G;e[19]!==V||e[20]!==B||e[21]!==q?(G=t.jsx(As,{open:q,onOpenChange:V,children:B}),e[19]=V,e[20]=B,e[21]=q,e[22]=G):G=e[22];let A;return e[23]!==G||e[24]!==U?(A=t.jsxs("div",{className:$,children:[U,G]}),e[23]=G,e[24]=U,e[25]=A):A=e[25],A}function ir(s){return s!==null&&s>0?s-1:s}function cr(s){return[s.id,s]}function dr(s){return[s.id,s]}function mr(s){return[s.userId,s.user]}function ur(){const s=le.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ae,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ae,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=r):r=s[1];let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ae,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=l):l=s[2];let a;s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(ae,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=a):a=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(ae,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=o):o=s[4];let c;s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ae,{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(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,r,l,a,o,c,t.jsx(ae,{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(xr)})]})})}),s[7]=n):n=s[7],n}function xr(s,e){return t.jsxs(ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const bt=Object.assign(nr,{Skeleton:ur});function fr(s){const e=le.c(34),{client:r,locator:l,baseParams:a,pageSize:o,isStreaming:c,streamingRefetchInterval:i,connectionIds:n,virtualMcpIds:d,tool:f,status:p,searchQuery:v,allConnections:b,allVirtualMcps:u,membersData:R}=s;let h;e[0]!==a||e[1]!==l?(h=it.monitoringLogsInfinite(l,JSON.stringify(a)),e[0]=a,e[1]=l,e[2]=h):h=e[2];let j;e[3]!==a||e[4]!==r||e[5]!==o?(j=async J=>{const{pageParam:P}=J,X=P===void 0?0:P;if(!r)throw new Error("MCP client is not available");const y=await r.callTool({name:"MONITORING_LOGS_LIST",arguments:{...a,limit:o,offset:X}});return y.structuredContent??y},e[3]=a,e[4]=r,e[5]=o,e[6]=j):j=e[6];let m;e[7]!==o?(m=(J,P)=>{if(!((J?.logs?.length??0)<o))return P.length*o},e[7]=o,e[8]=m):m=e[8];const C=c?i:!1;let S;e[9]!==h||e[10]!==j||e[11]!==m||e[12]!==C?(S={queryKey:h,queryFn:j,initialPageParam:0,getNextPageParam:m,staleTime:0,refetchInterval:C},e[9]=h,e[10]=j,e[11]=m,e[12]=C,e[13]=S):S=e[13];const{data:g,fetchNextPage:_,hasNextPage:I,isFetchingNextPage:x}=zs(S);let F;e[14]!==g.pages?(F=g.pages.flatMap(pr),e[14]=g.pages,e[15]=F):F=e[15];const w=F;let D;e[16]!==_||e[17]!==I||e[18]!==x?(D=()=>{I&&!x&&_()},e[16]=_,e[17]=I,e[18]=x,e[19]=D):D=e[19];const k=D,O=I??!1;let $;return e[20]!==b||e[21]!==u||e[22]!==r||e[23]!==n||e[24]!==k||e[25]!==x||e[26]!==R||e[27]!==w||e[28]!==v||e[29]!==p||e[30]!==O||e[31]!==f||e[32]!==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:f,status:p,search:v,logs:w,hasMore:O,onLoadMore:k,isLoadingMore:x,connections:b,virtualMcps:u,membersData:R,client:r})})})}),e[20]=b,e[21]=u,e[22]=r,e[23]=n,e[24]=k,e[25]=x,e[26]=R,e[27]=w,e[28]=v,e[29]=p,e[30]=O,e[31]=f,e[32]=d,e[33]=$):$=e[33],$}function pr(s){return s.logs??[]}function hr(s){const e=le.c(15),{dateRange:r}=s,{data:l,isLoading:a}=Us(void 0);let o;e[0]!==l?(o=l===void 0?[]:l,e[0]=l,e[1]=o):o=e[1];const c=o,[i,n]=K.useState(null),d=i??c[0]?.id??null,{data:f}=Ks(d??"");let p;e[2]!==r.startDate?(p=r.startDate.toISOString(),e[2]=r.startDate,e[3]=p):p=e[3];let v;e[4]!==r.endDate?(v=r.endDate.toISOString(),e[4]=r.endDate,e[5]=v):v=e[5];let b;e[6]!==p||e[7]!==v?(b={startDate:p,endDate:v},e[6]=p,e[7]=v,e[8]=b):b=e[8];const u=b;let R;return e[9]!==f||e[10]!==c||e[11]!==d||e[12]!==a||e[13]!==u?(R=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:a?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):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(nt,{value:d??"",onValueChange:h=>n(h),children:[t.jsx(lt,{className:"w-72",children:t.jsx(ot,{placeholder:"Select an automation…"})}),t.jsx(at,{children:c.map(jr)})]})}),f?t.jsx(Cs,{automationId:f.id,triggerIds:f.triggers.map(gr),range:u}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=f,e[10]=c,e[11]=d,e[12]=a,e[13]=u,e[14]=R):R=e[14],R}function gr(s){return s.id}function jr(s){return t.jsx($e,{value:s.id,children:s.name},s.id)}const vr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Nr({connectionIds:s,virtualMcpIds:e,tool:r,status:l,hideSystem:a,propertyFilters:o,connectionOptions:c,virtualMcpOptions:i,activeFiltersCount:n,onUpdateFilters:d,onConnectionSearchChange:f,memberOptions:p,llmUserIds:v=[],onLlmUserIdsChange:b,showMemberFilter:u}){const[R,h]=K.useState(!1),[j,m]=K.useState("form"),[C,S]=K.useState(r),[g,_]=K.useState(o),[I,x]=K.useState(Ye(o)),F=K.useRef(r),w=K.useRef(Re(o));F.current!==r&&(F.current=r,C!==r&&S(r));const D=Re(o);w.current!==D&&(w.current=D,_(o),x(Ye(o)));const k=(y,T)=>{const L=[...g],z=L[y];z&&(L[y]={key:T.key??z.key,operator:T.operator??z.operator,value:T.value??z.value},_(L))},O=()=>{_([...g,{key:"",operator:"eq",value:""}])},$=y=>{const T=g.filter((L,z)=>z!==y);_(T),x(Ye(T)),d({propertyFilters:Re(T)})},J=()=>{d({propertyFilters:Re(g)})},P=()=>{const y=Ft(I);_(y),d({propertyFilters:Re(y)})},X=()=>{if(j==="raw"){const y=Ft(I);_(y),m("form")}else x(Ye(g)),m("raw")};return t.jsxs(ct,{open:R,onOpenChange:h,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(At,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:n}),t.jsx(rt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:n})]})]})}),t.jsx(mt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(Ls,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),t.jsx(Ds,{id:"hide-system-calls",checked:a,onCheckedChange:y=>d({hideSystem:!!y})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(ht,{options:c,defaultValue:s,onValueChange:y=>d({connectionId:y}),onSearchChange:f,placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),t.jsx(ht,{options:i,defaultValue:e,onValueChange:y=>d({virtualMcpId:y}),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(ht,{options:p??[],defaultValue:v,onValueChange:y=>b?.(y),placeholder:"All members",variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Filters AI usage (calls, tokens, cost) only."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),t.jsx(Ge,{id:"filter-tool",placeholder:"Filter by tool...",value:C,onChange:y=>S(y.target.value),onBlur:()=>{C!==r&&d({tool:C})},onKeyDown:y=>{y.key==="Enter"&&C!==r&&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(nt,{value:l,onValueChange:y=>d({status:y}),children:[t.jsx(lt,{className:"w-full",children:t.jsx(ot,{})}),t.jsxs(at,{children:[t.jsx($e,{value:"all",children:"All Status"}),t.jsx($e,{value:"success",children:"Success Only"}),t.jsx($e,{value:"errors",children:"Errors Only"})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:X,children:j==="raw"?t.jsx(Ns,{size:14}):t.jsx(fs,{size:14})})}),t.jsx(tt,{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:I,onChange:y=>x(y.target.value),onBlur:P,onKeyDown:y=>{y.key==="Enter"&&y.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:[g.map((y,T)=>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 ",T+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>$(T),children:t.jsx(ys,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:y.key,onChange:L=>k(T,{key:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:y.operator,onValueChange:L=>{const z=[...g],E=z[T];E&&(z[T]={...E,operator:L,value:L==="exists"?"":E.value},_(z),d({propertyFilters:Re(z)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:vr.map(L=>t.jsx($e,{value:L.value,children:L.label},L.value))})]})]}),y.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:y.value,onChange:L=>k(T,{value:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"w-full font-mono text-sm"})]},T)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:O,children:[t.jsx(bs,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),_([]),x(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),h(!1)},children:"Clear all filters"})]})})]})}function br(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:c,tool:i,status:n,search:d,streaming:f,hideSystem:p,activeFiltersCount:v,from:b,to:u,propertyFilters:R,onUpdateFilters:h,onTimeRangeChange:j,onStreamingToggle:m,onTabChange:C}=s,S=vt(),g=vs(),{data:_}=ps(),[I,x]=K.useState(""),F=I||void 0;let w;e[0]!==F?(w={searchTerm:F},e[0]=F,e[1]=w):w=e[1];const D=vt(w);let k;e[2]!==D?(k=D??[],e[2]=D,e[3]=k):k=e[3];let O;e[4]!==k?(O=k.map(Sr),e[4]=k,e[5]=O):O=e[5];const $=O;let J;e[6]!==g?(J=g.map(wr),e[6]=g,e[7]=J):J=e[7];const P=J,{pageSize:X,streamingRefetchInterval:y}=Nt,{org:T,locator:L}=Be();let z;e[8]!==T.id||e[9]!==T.slug?(z={connectionId:hs,orgId:T.id,orgSlug:T.slug},e[8]=T.id,e[9]=T.slug,e[10]=z):z=e[10];const E=gs(z);let U;e[11]!==R?(U=Bs(R),e[11]=R,e[12]=U):U=e[12];const q=U;let V;e[13]!==p||e[14]!==T.id?(V=p?[js.SELF(T.id)]:void 0,e[13]=p,e[14]=T.id,e[15]=V):V=e[15];const Y=V;let B;e[16]===Symbol.for("react.memo_cache_sentinel")?(B=[],e[16]=B):B=e[16];const[G,A]=K.useState(B);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[M,H]=K.useState(N);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,re]=K.useState(te),[W,ne]=K.useState("all"),ce=(M.length>0?1:0)+(Q.length>0?1:0)+(W!=="all"?1:0);let ze;e[19]!==_?(ze=Ut(_).map(yr),e[19]=_,e[20]=ze):ze=e[20];const Ie=ze;let Ce;e[21]!==l.startDate?(Ce=l.startDate.toISOString(),e[21]=l.startDate,e[22]=Ce):Ce=e[22];let ie;e[23]!==l.endDate?(ie=l.endDate.toISOString(),e[23]=l.endDate,e[24]=ie):ie=e[24];const Le=o.length===1?o[0]:void 0,ge=c.length===1?c[0]:void 0,je=i||void 0,ve=n==="errors"?!0:n==="success"?!1:void 0;let me;e[25]!==Y||e[26]!==q||e[27]!==Ce||e[28]!==ie||e[29]!==Le||e[30]!==ge||e[31]!==je||e[32]!==ve?(me={startDate:Ce,endDate:ie,connectionId:Le,excludeConnectionIds:Y,virtualMcpId:ge,toolName:je,isError:ve,...q},e[25]=Y,e[26]=q,e[27]=Ce,e[28]=ie,e[29]=Le,e[30]=ge,e[31]=je,e[32]=ve,e[33]=me):me=e[33];const Ne=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:"Threads"},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 ke=pe;let we;e[38]===Symbol.for("react.memo_cache_sentinel")?(we=t.jsx(De.Title,{children:"Monitoring"}),e[38]=we):we=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]!==r?(ee=t.jsx(qt,{tabs:ke,activeTab:r,onTabChange:se}),e[41]=se,e[42]=r,e[43]=ee):ee=e[43];let oe;e[44]!==v||e[45]!==o||e[46]!==$||e[47]!==I||e[48]!==p||e[49]!==f||e[50]!==G||e[51]!==Ie||e[52]!==m||e[53]!==h||e[54]!==R||e[55]!==n||e[56]!==r||e[57]!==i||e[58]!==c||e[59]!==P?(oe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:f?"secondary":"outline",className:"gap-1.5",onClick:m,children:[f&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),f&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Nr,{connectionIds:o,virtualMcpIds:c,tool:i,status:n,hideSystem:p,propertyFilters:R,connectionOptions:$,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:h,connectionSearchTerm:I,onConnectionSearchChange:x,memberOptions:Ie,llmUserIds:G,onLlmUserIdsChange:A,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=$,e[47]=I,e[48]=p,e[49]=f,e[50]=G,e[51]=Ie,e[52]=m,e[53]=h,e[54]=R,e[55]=n,e[56]=r,e[57]=i,e[58]=c,e[59]=P,e[60]=oe):oe=e[60];let he;e[61]!==Ie||e[62]!==r||e[63]!==ce||e[64]!==M||e[65]!==W||e[66]!==Q||e[67]!==P?(he=r==="threads"&&t.jsx(ks,{filterAgentIds:M,filterUserIds:Q,filterStatus:W,virtualMcpOptions:P,memberOptions:Ie,activeFiltersCount:ce,onUpdateFilters:Te=>{const{filterAgentIds:It,filterUserIds:Ct,filterStatus:kt}=Te;It!==void 0&&H(It),Ct!==void 0&&re(Ct),kt!==void 0&&ne(kt)}}),e[61]=Ie,e[62]=r,e[63]=ce,e[64]=M,e[65]=W,e[66]=Q,e[67]=P,e[68]=he):he=e[68];let be;e[69]!==b||e[70]!==u?(be={from:b,to:u},e[69]=b,e[70]=u,e[71]=be):be=e[71];let Oe;e[72]!==j||e[73]!==be?(Oe=t.jsx(Ys,{value:be,onChange:j}),e[72]=j,e[73]=be,e[74]=Oe):Oe=e[74];let Ee;e[75]!==oe||e[76]!==he||e[77]!==Oe?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[oe,he,Oe]}),e[75]=oe,e[76]=he,e[77]=Oe,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ee||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ee,Ee]}),e[79]=ee,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==h||e[83]!==d||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(as,{value:d,onChange:Te=>h({search:Te}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Te=>{Te.key==="Escape"&&(h({search:""}),Te.target.blur())},className:"w-full md:w-[375px]"}),e[82]=h,e[83]=d,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(De.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[we,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==g||e[91]!==Ne||e[92]!==E||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==Y||e[97]!==f||e[98]!==G||e[99]!==L||e[100]!==_||e[101]!==d||e[102]!==n||e[103]!==r||e[104]!==M||e[105]!==W||e[106]!==Q||e[107]!==i||e[108]!==c?(Ue=r==="automations"?t.jsx(hr,{dateRange:l}):r==="threads"?t.jsx(Ts,{client:E,locator:L,membersData:_,allConnections:S,allVirtualMcps:g,dateRange:l,searchQuery:d,filterAgentIds:M,filterUserIds:Q,filterStatus:W}):r==="audit"?t.jsx(fr,{client:E,locator:L,baseParams:Ne,pageSize:X,isStreaming:f,streamingRefetchInterval:y,connectionIds:o,virtualMcpIds:c,tool:i,status:n,searchQuery:d,allConnections:S,allVirtualMcps:g,membersData:_}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:Y,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:f,streamingRefetchInterval:y,llmUserIds:G})}),e[89]=S,e[90]=g,e[91]=Ne,e[92]=E,e[93]=o,e[94]=l,e[95]=a,e[96]=Y,e[97]=f,e[98]=G,e[99]=L,e[100]=_,e[101]=d,e[102]=n,e[103]=r,e[104]=M,e[105]=W,e[106]=Q,e[107]=i,e[108]=c,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function yr(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(Bt,{url:r,fallback:e,shape:"circle",size:"2xs",className:de("shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Sr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Do(){const s=le.c(83),{org:e}=Be(),r=yt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=ls(l),{tab:o,from:c,to:i,connectionId:n,virtualMcpId:d,tool:f,search:p,status:v,streaming:b,propertyFilters:u,hideSystem:R}=a,h=o===void 0?"overview":o;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 S=C,g=b===void 0?!0:b,_=u===void 0?"":u,I=R===void 0?!1:R;let x,F,w,D,k,O,$;if(s[5]!==m.length||s[6]!==c||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==_||s[11]!==a||s[12]!==v||s[13]!==g||s[14]!==i||s[15]!==f||s[16]!==S.length){k=qs(_);let A;s[24]!==r||s[25]!==e.slug||s[26]!==a?(A=Q=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...Q}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=A):A=s[27],$=A;let N;s[28]!==$?(N=Q=>{$({from:Q.from,to:Q.to})},s[28]=$,s[29]=N):N=s[29],D=N;let M,H;if(s[30]!==c||s[31]!==g||s[32]!==i){const Q=ye(c),re=ye(i);H=Q.date||new Date(Date.now()-18e5);const W=re.date||new Date;w={startDate:H,endDate:W},M=W,g&&i==="now"&&(M=new Date(W),M.setHours(M.getHours()+1)),s[30]=c,s[31]=g,s[32]=i,s[33]=w,s[34]=M,s[35]=H}else w=s[33],M=s[34],H=s[35];let te;s[36]!==M||s[37]!==H?(te={startDate:H,endDate:M},s[36]=M,s[37]=H,s[38]=te):te=s[38],F=te,x=0,m.length>0&&x++,S.length>0&&x++,f&&x++,v!=="all"&&x++,I&&x++,O=k.filter(Ir),s[5]=m.length,s[6]=c,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=_,s[11]=a,s[12]=v,s[13]=g,s[14]=i,s[15]=f,s[16]=S.length,s[17]=x,s[18]=F,s[19]=w,s[20]=D,s[21]=k,s[22]=O,s[23]=$}else x=s[17],F=s[18],w=s[19],D=s[20],k=s[21],O=s[22],$=s[23];const J=O;J.length>0&&(x=x+J.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(De.Body,{className:"!pb-3",children:t.jsx(De.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(De.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 y;s[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(De.Title,{children:"Monitoring"}),s[41]=y):y=s[41];let T;s[42]===Symbol.for("react.memo_cache_sentinel")?(T=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=T):T=s[42];let L;s[43]!==$?(L=A=>$({tab:A}),s[43]=$,s[44]=L):L=s[44];let z;s[45]!==L||s[46]!==h?(z=t.jsx(De.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[y,t.jsx(qt,{tabs:T,activeTab:h,onTabChange:L})]})}),s[45]=L,s[46]=h,s[47]=z):z=s[47];let E;s[48]!==h?(E=h==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):h==="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(or,{})}),s[48]=h,s[49]=E):E=s[49];let U;s[50]!==z||s[51]!==E?(U=t.jsxs(t.Fragment,{children:[z,E]}),s[50]=z,s[51]=E,s[52]=U):U=s[52];let q;s[53]!==D?(q=A=>{xt("monitoring_time_range_changed",{from:A.from,to:A.to}),D(A)},s[53]=D,s[54]=q):q=s[54];let V;s[55]!==g||s[56]!==$?(V=()=>{xt("monitoring_live_toggled",{enabled:!g}),$({streaming:!g})},s[55]=g,s[56]=$,s[57]=V):V=s[57];let Y;s[58]!==h||s[59]!==$?(Y=A=>{A!==h&&xt("monitoring_tab_changed",{from_tab:h,to_tab:A}),$({tab:A})},s[58]=h,s[59]=$,s[60]=Y):Y=s[60];let B;s[61]!==x||s[62]!==m||s[63]!==F||s[64]!==w||s[65]!==c||s[66]!==I||s[67]!==k||s[68]!==p||s[69]!==v||s[70]!==g||s[71]!==q||s[72]!==V||s[73]!==Y||s[74]!==h||s[75]!==i||s[76]!==f||s[77]!==$||s[78]!==S?(B=t.jsx(br,{tab:h,dateRange:F,displayDateRange:w,connectionIds:m,virtualMcpIds:S,tool:f,status:v,search:p,streaming:g,hideSystem:I,activeFiltersCount:x,from:c,to:i,propertyFilters:k,onUpdateFilters:$,onTimeRangeChange:q,onStreamingToggle:V,onTabChange:Y}),s[61]=x,s[62]=m,s[63]=F,s[64]=w,s[65]=c,s[66]=I,s[67]=k,s[68]=p,s[69]=v,s[70]=g,s[71]=q,s[72]=V,s[73]=Y,s[74]=h,s[75]=i,s[76]=f,s[77]=$,s[78]=S,s[79]=B):B=s[79];let G;return s[80]!==U||s[81]!==B?(G=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(De,{children:t.jsx(os,{fallback:X,children:t.jsx(K.Suspense,{fallback:U,children:B})})})}),s[80]=U,s[81]=B,s[82]=G):G=s[82],G}function Ir(s){return s.key.trim()}export{Do as default};
|
|
8
|
+
debug?`,value:I,onChange:y=>x(y.target.value),onBlur:P,onKeyDown:y=>{y.key==="Enter"&&y.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:[g.map((y,T)=>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 ",T+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>$(T),children:t.jsx(ys,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:y.key,onChange:L=>k(T,{key:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:y.operator,onValueChange:L=>{const z=[...g],E=z[T];E&&(z[T]={...E,operator:L,value:L==="exists"?"":E.value},_(z),d({propertyFilters:Re(z)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:vr.map(L=>t.jsx($e,{value:L.value,children:L.label},L.value))})]})]}),y.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:y.value,onChange:L=>k(T,{value:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"w-full font-mono text-sm"})]},T)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:O,children:[t.jsx(bs,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),_([]),x(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),h(!1)},children:"Clear all filters"})]})})]})}function br(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:c,tool:i,status:n,search:d,streaming:f,hideSystem:p,activeFiltersCount:v,from:b,to:u,propertyFilters:R,onUpdateFilters:h,onTimeRangeChange:j,onStreamingToggle:m,onTabChange:C}=s,S=vt(),g=vs(),{data:_}=ps(),[I,x]=K.useState(""),F=I||void 0;let w;e[0]!==F?(w={searchTerm:F},e[0]=F,e[1]=w):w=e[1];const D=vt(w);let k;e[2]!==D?(k=D??[],e[2]=D,e[3]=k):k=e[3];let O;e[4]!==k?(O=k.map(Sr),e[4]=k,e[5]=O):O=e[5];const $=O;let J;e[6]!==g?(J=g.map(wr),e[6]=g,e[7]=J):J=e[7];const P=J,{pageSize:X,streamingRefetchInterval:y}=Nt,{org:T,locator:L}=Be();let z;e[8]!==T.id||e[9]!==T.slug?(z={connectionId:hs,orgId:T.id,orgSlug:T.slug},e[8]=T.id,e[9]=T.slug,e[10]=z):z=e[10];const E=gs(z);let U;e[11]!==R?(U=Bs(R),e[11]=R,e[12]=U):U=e[12];const q=U;let V;e[13]!==p||e[14]!==T.id?(V=p?[js.SELF(T.id)]:void 0,e[13]=p,e[14]=T.id,e[15]=V):V=e[15];const Y=V;let B;e[16]===Symbol.for("react.memo_cache_sentinel")?(B=[],e[16]=B):B=e[16];const[G,A]=K.useState(B);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[M,H]=K.useState(N);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,re]=K.useState(te),[W,ne]=K.useState("all"),ce=(M.length>0?1:0)+(Q.length>0?1:0)+(W!=="all"?1:0);let ze;e[19]!==_?(ze=Ut(_).map(yr),e[19]=_,e[20]=ze):ze=e[20];const Ie=ze;let Ce;e[21]!==l.startDate?(Ce=l.startDate.toISOString(),e[21]=l.startDate,e[22]=Ce):Ce=e[22];let ie;e[23]!==l.endDate?(ie=l.endDate.toISOString(),e[23]=l.endDate,e[24]=ie):ie=e[24];const Le=o.length===1?o[0]:void 0,ge=c.length===1?c[0]:void 0,je=i||void 0,ve=n==="errors"?!0:n==="success"?!1:void 0;let me;e[25]!==Y||e[26]!==q||e[27]!==Ce||e[28]!==ie||e[29]!==Le||e[30]!==ge||e[31]!==je||e[32]!==ve?(me={startDate:Ce,endDate:ie,connectionId:Le,excludeConnectionIds:Y,virtualMcpId:ge,toolName:je,isError:ve,...q},e[25]=Y,e[26]=q,e[27]=Ce,e[28]=ie,e[29]=Le,e[30]=ge,e[31]=je,e[32]=ve,e[33]=me):me=e[33];const Ne=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:"Threads"},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 ke=pe;let we;e[38]===Symbol.for("react.memo_cache_sentinel")?(we=t.jsx(De.Title,{children:"Monitoring"}),e[38]=we):we=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]!==r?(ee=t.jsx(qt,{tabs:ke,activeTab:r,onTabChange:se}),e[41]=se,e[42]=r,e[43]=ee):ee=e[43];let oe;e[44]!==v||e[45]!==o||e[46]!==$||e[47]!==I||e[48]!==p||e[49]!==f||e[50]!==G||e[51]!==Ie||e[52]!==m||e[53]!==h||e[54]!==R||e[55]!==n||e[56]!==r||e[57]!==i||e[58]!==c||e[59]!==P?(oe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:f?"secondary":"outline",className:"gap-1.5",onClick:m,children:[f&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),f&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Nr,{connectionIds:o,virtualMcpIds:c,tool:i,status:n,hideSystem:p,propertyFilters:R,connectionOptions:$,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:h,connectionSearchTerm:I,onConnectionSearchChange:x,memberOptions:Ie,llmUserIds:G,onLlmUserIdsChange:A,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=$,e[47]=I,e[48]=p,e[49]=f,e[50]=G,e[51]=Ie,e[52]=m,e[53]=h,e[54]=R,e[55]=n,e[56]=r,e[57]=i,e[58]=c,e[59]=P,e[60]=oe):oe=e[60];let he;e[61]!==Ie||e[62]!==r||e[63]!==ce||e[64]!==M||e[65]!==W||e[66]!==Q||e[67]!==P?(he=r==="threads"&&t.jsx(ks,{filterAgentIds:M,filterUserIds:Q,filterStatus:W,virtualMcpOptions:P,memberOptions:Ie,activeFiltersCount:ce,onUpdateFilters:Te=>{const{filterAgentIds:It,filterUserIds:Ct,filterStatus:kt}=Te;It!==void 0&&H(It),Ct!==void 0&&re(Ct),kt!==void 0&&ne(kt)}}),e[61]=Ie,e[62]=r,e[63]=ce,e[64]=M,e[65]=W,e[66]=Q,e[67]=P,e[68]=he):he=e[68];let be;e[69]!==b||e[70]!==u?(be={from:b,to:u},e[69]=b,e[70]=u,e[71]=be):be=e[71];let Oe;e[72]!==j||e[73]!==be?(Oe=t.jsx(Ys,{value:be,onChange:j}),e[72]=j,e[73]=be,e[74]=Oe):Oe=e[74];let Ee;e[75]!==oe||e[76]!==he||e[77]!==Oe?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[oe,he,Oe]}),e[75]=oe,e[76]=he,e[77]=Oe,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ee||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ee,Ee]}),e[79]=ee,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==h||e[83]!==d||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(as,{value:d,onChange:Te=>h({search:Te}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Te=>{Te.key==="Escape"&&(h({search:""}),Te.target.blur())},className:"w-full md:w-[375px]"}),e[82]=h,e[83]=d,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(De.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[we,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==g||e[91]!==Ne||e[92]!==E||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==Y||e[97]!==f||e[98]!==G||e[99]!==L||e[100]!==_||e[101]!==d||e[102]!==n||e[103]!==r||e[104]!==M||e[105]!==W||e[106]!==Q||e[107]!==i||e[108]!==c?(Ue=r==="automations"?t.jsx(hr,{dateRange:l}):r==="threads"?t.jsx(Ts,{client:E,locator:L,membersData:_,allConnections:S,allVirtualMcps:g,dateRange:l,searchQuery:d,filterAgentIds:M,filterUserIds:Q,filterStatus:W}):r==="audit"?t.jsx(fr,{client:E,locator:L,baseParams:Ne,pageSize:X,isStreaming:f,streamingRefetchInterval:y,connectionIds:o,virtualMcpIds:c,tool:i,status:n,searchQuery:d,allConnections:S,allVirtualMcps:g,membersData:_}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:Y,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:f,streamingRefetchInterval:y,llmUserIds:G})}),e[89]=S,e[90]=g,e[91]=Ne,e[92]=E,e[93]=o,e[94]=l,e[95]=a,e[96]=Y,e[97]=f,e[98]=G,e[99]=L,e[100]=_,e[101]=d,e[102]=n,e[103]=r,e[104]=M,e[105]=W,e[106]=Q,e[107]=i,e[108]=c,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function yr(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(Bt,{url:r,fallback:e,shape:"circle",size:"2xs",className:de("shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Sr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function _o(){const s=le.c(83),{org:e}=Be(),r=yt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=ls(l),{tab:o,from:c,to:i,connectionId:n,virtualMcpId:d,tool:f,search:p,status:v,streaming:b,propertyFilters:u,hideSystem:R}=a,h=o===void 0?"overview":o;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 S=C,g=b===void 0?!0:b,_=u===void 0?"":u,I=R===void 0?!1:R;let x,F,w,D,k,O,$;if(s[5]!==m.length||s[6]!==c||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==_||s[11]!==a||s[12]!==v||s[13]!==g||s[14]!==i||s[15]!==f||s[16]!==S.length){k=qs(_);let A;s[24]!==r||s[25]!==e.slug||s[26]!==a?(A=Q=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...Q}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=A):A=s[27],$=A;let N;s[28]!==$?(N=Q=>{$({from:Q.from,to:Q.to})},s[28]=$,s[29]=N):N=s[29],D=N;let M,H;if(s[30]!==c||s[31]!==g||s[32]!==i){const Q=ye(c),re=ye(i);H=Q.date||new Date(Date.now()-18e5);const W=re.date||new Date;w={startDate:H,endDate:W},M=W,g&&i==="now"&&(M=new Date(W),M.setHours(M.getHours()+1)),s[30]=c,s[31]=g,s[32]=i,s[33]=w,s[34]=M,s[35]=H}else w=s[33],M=s[34],H=s[35];let te;s[36]!==M||s[37]!==H?(te={startDate:H,endDate:M},s[36]=M,s[37]=H,s[38]=te):te=s[38],F=te,x=0,m.length>0&&x++,S.length>0&&x++,f&&x++,v!=="all"&&x++,I&&x++,O=k.filter(Ir),s[5]=m.length,s[6]=c,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=_,s[11]=a,s[12]=v,s[13]=g,s[14]=i,s[15]=f,s[16]=S.length,s[17]=x,s[18]=F,s[19]=w,s[20]=D,s[21]=k,s[22]=O,s[23]=$}else x=s[17],F=s[18],w=s[19],D=s[20],k=s[21],O=s[22],$=s[23];const J=O;J.length>0&&(x=x+J.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(De.Body,{className:"!pb-3",children:t.jsx(De.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(De.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 y;s[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(De.Title,{children:"Monitoring"}),s[41]=y):y=s[41];let T;s[42]===Symbol.for("react.memo_cache_sentinel")?(T=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=T):T=s[42];let L;s[43]!==$?(L=A=>$({tab:A}),s[43]=$,s[44]=L):L=s[44];let z;s[45]!==L||s[46]!==h?(z=t.jsx(De.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[y,t.jsx(qt,{tabs:T,activeTab:h,onTabChange:L})]})}),s[45]=L,s[46]=h,s[47]=z):z=s[47];let E;s[48]!==h?(E=h==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):h==="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(or,{})}),s[48]=h,s[49]=E):E=s[49];let U;s[50]!==z||s[51]!==E?(U=t.jsxs(t.Fragment,{children:[z,E]}),s[50]=z,s[51]=E,s[52]=U):U=s[52];let q;s[53]!==D?(q=A=>{xt("monitoring_time_range_changed",{from:A.from,to:A.to}),D(A)},s[53]=D,s[54]=q):q=s[54];let V;s[55]!==g||s[56]!==$?(V=()=>{xt("monitoring_live_toggled",{enabled:!g}),$({streaming:!g})},s[55]=g,s[56]=$,s[57]=V):V=s[57];let Y;s[58]!==h||s[59]!==$?(Y=A=>{A!==h&&xt("monitoring_tab_changed",{from_tab:h,to_tab:A}),$({tab:A})},s[58]=h,s[59]=$,s[60]=Y):Y=s[60];let B;s[61]!==x||s[62]!==m||s[63]!==F||s[64]!==w||s[65]!==c||s[66]!==I||s[67]!==k||s[68]!==p||s[69]!==v||s[70]!==g||s[71]!==q||s[72]!==V||s[73]!==Y||s[74]!==h||s[75]!==i||s[76]!==f||s[77]!==$||s[78]!==S?(B=t.jsx(br,{tab:h,dateRange:F,displayDateRange:w,connectionIds:m,virtualMcpIds:S,tool:f,status:v,search:p,streaming:g,hideSystem:I,activeFiltersCount:x,from:c,to:i,propertyFilters:k,onUpdateFilters:$,onTimeRangeChange:q,onStreamingToggle:V,onTabChange:Y}),s[61]=x,s[62]=m,s[63]=F,s[64]=w,s[65]=c,s[66]=I,s[67]=k,s[68]=p,s[69]=v,s[70]=g,s[71]=q,s[72]=V,s[73]=Y,s[74]=h,s[75]=i,s[76]=f,s[77]=$,s[78]=S,s[79]=B):B=s[79];let G;return s[80]!==U||s[81]!==B?(G=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(De,{children:t.jsx(os,{fallback:X,children:t.jsx(K.Suspense,{fallback:U,children:B})})})}),s[80]=U,s[81]=B,s[82]=G):G=s[82],G}function Ir(s){return s.key.trim()}export{_o as default};
|