decocms 4.594.1 → 4.596.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-CngNmW3n.js → AlertCircle-AllCHsc-.js} +1 -1
- package/dist/client/assets/{AreaChart-w2QCUzTm.js → AreaChart-C6w_b9ET.js} +1 -1
- package/dist/client/assets/{ArrowLeft-7wIIyF4Y.js → ArrowLeft-CRw3W_qh.js} +1 -1
- package/dist/client/assets/{ArrowRight-Dyuh-rXZ.js → ArrowRight-DSFHA030.js} +1 -1
- package/dist/client/assets/{ArrowUp-C9hRfWJJ.js → ArrowUp-D_GhkPcm.js} +1 -1
- package/dist/client/assets/{BookOpen01-Bov9QL4X.js → BookOpen01-lNQqqERm.js} +1 -1
- package/dist/client/assets/{CartesianChart-DZFTbe0Q.js → CartesianChart-DPVXkgL4.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BJA3WMzp.js → CategoricalChart-DRsmm3_a.js} +1 -1
- package/dist/client/assets/{CheckCircle-C0mDI2jO.js → CheckCircle-D_eJlHYl.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cz82ih9S.js → ChevronDown-C0tAiNqc.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-B_wf9OPd.js → ChevronSelectorVertical-oMR2kCqB.js} +1 -1
- package/dist/client/assets/{ChevronUp-CLsy4_cr.js → ChevronUp-CLxsyktD.js} +1 -1
- package/dist/client/assets/{CreditCard01-C7XdJQOf.js → CreditCard01-DfogeJXR.js} +1 -1
- package/dist/client/assets/{Eye-BoMcImel.js → Eye-IB81hGdK.js} +1 -1
- package/dist/client/assets/{File02-BmbcQ1JX.js → File02-C5RfRHg9.js} +1 -1
- package/dist/client/assets/{Fingerprint04-CeWGcIpe.js → Fingerprint04-d20CepTC.js} +1 -1
- package/dist/client/assets/{Globe04-_51WnfFJ.js → Globe04-Cffx8Biv.js} +1 -1
- package/dist/client/assets/{Image01-nL5rafgN.js → Image01-C3Wojgfs.js} +1 -1
- package/dist/client/assets/{Key01-DPEcpDw6.js → Key01-UGh5N-kc.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DFrTynS3.js → LayoutLeft-DtDmaSrQ.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BPaKcMJ1.js → LinkBroken01-CG6bLE37.js} +1 -1
- package/dist/client/assets/{MessageCircle01-DEwhGd-N.js → MessageCircle01-MLX2eDnv.js} +1 -1
- package/dist/client/assets/{Minus-CZtTY14n.js → Minus-DUjfsLQY.js} +1 -1
- package/dist/client/assets/{Monitor01-Dzk9r8YI.js → Monitor01-DKJLays1.js} +1 -1
- package/dist/client/assets/{Play-BNkIfSsq.js → Play-BkcMWNbk.js} +1 -1
- package/dist/client/assets/{Plus-WQeLSh07.js → Plus-D84NDH53.js} +1 -1
- package/dist/client/assets/{ReferenceLine-Kl_nxn9t.js → ReferenceLine-qG6ZRY0w.js} +1 -1
- package/dist/client/assets/{SearchMd-CrM5HGUz.js → SearchMd-lt6LFgc6.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Dvi8noNw.js → ShoppingBag01-BswoJp3c.js} +1 -1
- package/dist/client/assets/{Sun-BUSaNVU-.js → Sun-C0_F0NYL.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-HaaMuIs0.js → SwitchHorizontal01-DX564T5r.js} +1 -1
- package/dist/client/assets/{Tool01-9Nk8XcOI.js → Tool01-C5c4fHOY.js} +1 -1
- package/dist/client/assets/{Tooltip--i_yceGL.js → Tooltip-C4Wh1SAv.js} +1 -1
- package/dist/client/assets/{Trash01-By8obgKt.js → Trash01-CFKOdFdJ.js} +1 -1
- package/dist/client/assets/{TrendUp01-D-BYwryf.js → TrendUp01-Me2ucQTV.js} +1 -1
- package/dist/client/assets/{Upload01-BPnZnmHF.js → Upload01-A4xsFQc7.js} +1 -1
- package/dist/client/assets/{UserCheck01-CuByTN5F.js → UserCheck01-CLDfWEEJ.js} +1 -1
- package/dist/client/assets/{UserSquare-T90Jaoc-.js → UserSquare-bg0CCGVi.js} +1 -1
- package/dist/client/assets/{Users01-D1-vaLa3.js → Users01-CCleMxbO.js} +1 -1
- package/dist/client/assets/{XClose-Bomoew3H.js → XClose-DNnGTtOa.js} +1 -1
- package/dist/client/assets/{Zap-lo-lOcPp.js → Zap-DS2xaVCg.js} +1 -1
- package/dist/client/assets/{access-gate-D9gT0mCZ.js → access-gate-52qvSzpx.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Bn6L9Ywx.js → add-connection-dialog-D3rS-xq2.js} +1 -1
- package/dist/client/assets/agent-app-CEj8SI4b.js +1 -0
- package/dist/client/assets/{agent-assets-BLuZ1J0l.js → agent-assets-CLgcJh-a.js} +1 -1
- package/dist/client/assets/{agent-automation-C0jF6GoO.js → agent-automation-Asj6Mdk8.js} +1 -1
- package/dist/client/assets/{agent-automations-CIknlYgn.js → agent-automations-DpoiR-xj.js} +1 -1
- package/dist/client/assets/{agent-blog-Dz0ZGfFq.js → agent-blog-D5adgi1l.js} +2 -2
- package/dist/client/assets/{agent-blog-post-r0FRVJ6G.js → agent-blog-post-DD7TPgaA.js} +2 -2
- package/dist/client/assets/{agent-calendar-eiAtEeXX.js → agent-calendar-p4pBUNRv.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DWZ6HVp_.js → agent-capabilities-DX42M_HX.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-tGjfqQgF.js → agent-connect-sources-BuuNPgeS.js} +1 -1
- package/dist/client/assets/agent-deck-Dtfd3CpA.js +1 -0
- package/dist/client/assets/{agent-e2e-ba5rV3St.js → agent-e2e-CrXJS3S8.js} +1 -1
- package/dist/client/assets/agent-experiments-BdbuSony.js +1 -0
- package/dist/client/assets/agent-file-DyBlPMUW.js +1 -0
- package/dist/client/assets/{agent-hosting-D6vOkjJV.js → agent-hosting-DJ4qshnA.js} +1 -1
- package/dist/client/assets/{agent-icon-zvo6Zsex.js → agent-icon-m6DF-jGw.js} +1 -1
- package/dist/client/assets/agent-library-CfpThBWc.js +1 -0
- package/dist/client/assets/agent-library-file-CUOBgwAH.js +1 -0
- package/dist/client/assets/agent-overview-D-zPptb2.js +1 -0
- package/dist/client/assets/{agent-releases-CjP_903O.js → agent-releases-C0fErCE1.js} +1 -1
- package/dist/client/assets/agent-settings-CdKoAPBN.js +1 -0
- package/dist/client/assets/{agent-site-editor-CRCOwi7y.js → agent-site-editor-B4mZ_3uO.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-l_JomA6X.js +2 -0
- package/dist/client/assets/agent-site-editor-content-349ebUkh.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-86h2RYbj.js +1 -0
- package/dist/client/assets/agent-view-BNcVDHOV.js +1 -0
- package/dist/client/assets/{agent-view-guard-DupPwYUR.js → agent-view-guard-1CRBHJVM.js} +1 -1
- package/dist/client/assets/{ai-providers-P9lSOFin.js → ai-providers-DxMPTF-k.js} +1 -1
- package/dist/client/assets/{alert-QfzOpdUg.js → alert-Dt-QBVYu.js} +1 -1
- package/dist/client/assets/{analytics-sections-at8BigEj.js → analytics-sections-CULzJT-Z.js} +1 -1
- package/dist/client/assets/api-keys-D9RiubWH.js +1 -0
- package/dist/client/assets/{api-keys-yj-YvHdL.js → api-keys-DRuBz837.js} +1 -1
- package/dist/client/assets/{app-editor-CALR-Eh0.js → app-editor-hPksTJHj.js} +1 -1
- package/dist/client/assets/{asset-utils-BDYUvtkF.js → asset-utils-Wh7PCoXS.js} +1 -1
- package/dist/client/assets/{auth--2gxCib9.js → auth-DTCWUZG7.js} +1 -1
- package/dist/client/assets/{auth-catchall-BwHg1hCN.js → auth-catchall-DpL2hlxq.js} +1 -1
- package/dist/client/assets/{auth-entry-8MjIvWkA.js → auth-entry-Df1KBDSc.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DP2m0wm-.js → auth-split-layout-CY_uRTFl.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-GGQFCWKI.js → authenticate-and-persist-oauth-CxIxVe3C.js} +1 -1
- package/dist/client/assets/{automation-list-row-BJoBOS8m.js → automation-list-row-CtlM_d9l.js} +1 -1
- package/dist/client/assets/{automation-runs-ComF4nUM.js → automation-runs-CUFatpqX.js} +1 -1
- package/dist/client/assets/{automations-C5fxNUIr.js → automations-DJcRHo1X.js} +1 -1
- package/dist/client/assets/{badge-Di6qp_17.js → badge-BMdL2EZN.js} +1 -1
- package/dist/client/assets/{block-document-D7KablrH.js → block-document-xUve5SNT.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-JYcUL0TS.js → blocks-preview-workspace-context-DF85bSj9.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-D8VyxdkW.js → blocks-tab-states-Cw0RWK3h.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DwcMPB8a.js → blog-preview-url-Cxts0MFJ.js} +1 -1
- package/dist/client/assets/{blog-schema-Dhm1FJA9.js → blog-schema-7GeVkqmc.js} +1 -1
- package/dist/client/assets/{blog-source-gate-B93Jk1n3.js → blog-source-gate-DHJ3KgAL.js} +1 -1
- package/dist/client/assets/{blog-view-gate-BDjHkxlS.js → blog-view-gate-D2wthXO5.js} +1 -1
- package/dist/client/assets/{buckets-DAeP-NAt.js → buckets-Budfl0cb.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-WLZ-Q0Fx.js → build-improve-prompt-doc-CvGA95vT.js} +1 -1
- package/dist/client/assets/{calendar-CqkLsAo9.js → calendar-CWY9RcGt.js} +1 -1
- package/dist/client/assets/{capability-load-error-j4JpxktV.js → capability-load-error-Cpo9EAh2.js} +1 -1
- package/dist/client/assets/{category-editor-BblvA1zP.js → category-editor-Djma6ffb.js} +1 -1
- package/dist/client/assets/{category-tree-DSsAlLjn.js → category-tree-CwYyvh-H.js} +1 -1
- package/dist/client/assets/{chart-BZy9kWyI.js → chart-J7juGn_W.js} +1 -1
- package/dist/client/assets/{chat-context-CxkYg5uT.js → chat-context-BW-slB_k.js} +1 -1
- package/dist/client/assets/{chat-draft-DzaoNZT_.js → chat-draft-D3TYZAMx.js} +1 -1
- package/dist/client/assets/{checkbox-C-dWRGEo.js → checkbox-DyPy5TYa.js} +1 -1
- package/dist/client/assets/{choose-editor-DS4c61th.js → choose-editor-Bxibi_V8.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DV77yJjs.js → cli-auth-success-BZdMcx2v.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-DaqJeGro.js → cms-settings-editor-CEMWX5NG.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-5dkWWhlw.js → cms-store-drafts-D_M6m3uA.js} +1 -1
- package/dist/client/assets/{collapsible-BSD-rIyq.js → collapsible-RVJX7MiV.js} +1 -1
- package/dist/client/assets/{collection-detail-wkxjhC55.js → collection-detail-Du67mRiO.js} +1 -1
- package/dist/client/assets/{collection-display-button-JBmYQ-27.js → collection-display-button-BNBHMUXK.js} +1 -1
- package/dist/client/assets/{collection-search-BpNjeFlC.js → collection-search-0Y7SoOe-.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BmrrNnjL.js → collection-table-wrapper-Cuy0AVX7.js} +1 -1
- package/dist/client/assets/{collection-tabs-CmuugrOY.js → collection-tabs-CaUB-XIg.js} +1 -1
- package/dist/client/assets/{combobox-D_fSr7_C.js → combobox-BU7hsWmk.js} +1 -1
- package/dist/client/assets/{command-CwP4XJhp.js → command-D0_H05ec.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CG0lncr5.js → companion-mcps-section-BzJEcjRJ.js} +1 -1
- package/dist/client/assets/{config-4NBdyaeh.js → config-XJHmvtsd.js} +1 -1
- package/dist/client/assets/{connect-ChCcHtpb.js → connect-CC6AcPLN.js} +1 -1
- package/dist/client/assets/{connect-key-CJ6TvBP8.js → connect-key-BpMVre0r.js} +1 -1
- package/dist/client/assets/{connect-layout-DTpwfpPI.js → connect-layout-BNX1pnZc.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-_ChBZ2Vd.js → connect-source-dialog-BhW7w8Tz.js} +1 -1
- package/dist/client/assets/{connection-card-CxiJ1Nzx.js → connection-card-h1GpQqz7.js} +1 -1
- package/dist/client/assets/{connection-detail-CYCmhAUL.js → connection-detail-w5Ybk1Ow.js} +1 -1
- package/dist/client/assets/{connection-DezKWiQc.js → connection-e0YK2xiz.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-UXeTmEmu.js → connection-form-helpers-ee1lsDjo.js} +1 -1
- package/dist/client/assets/{connection-slug-DWaKdRBx.js → connection-slug-pVnJQqDL.js} +1 -1
- package/dist/client/assets/{connections-Bc9bEkOC.js → connections-ClU5q4ro.js} +1 -1
- package/dist/client/assets/{content-tab-ChWZ09d_.js → content-tab-BbCE8gow.js} +3 -3
- package/dist/client/assets/{context-1XEBvNOV.js → context-BE0varMc.js} +1 -1
- package/dist/client/assets/{context-menu-haKBWhFK.js → context-menu-sx0q9-17.js} +1 -1
- package/dist/client/assets/{context-shell-DApzBqkB.js → context-shell-D7PccH2n.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-BXvqxw2I.js → create-organization-dialog-BcfxwKOk.js} +1 -1
- package/dist/client/assets/{daily-pulse-Dpm7YKyw.js → daily-pulse-BQDk63PY.js} +1 -1
- package/dist/client/assets/{delete-copy-L_pixdww.js → delete-copy-UCaGT3P5.js} +1 -1
- package/dist/client/assets/{device-hint-DfNddHqx.js → device-hint-Dzp4aTKL.js} +1 -1
- package/dist/client/assets/{discover-CDF3_FOL.js → discover-BulaXBT4.js} +1 -1
- package/dist/client/assets/{domain-settings-SR0-GydA.js → domain-settings-k3Y2Q4CL.js} +1 -1
- package/dist/client/assets/{drawer-CmJXwXhP.js → drawer-cDJNr0UL.js} +1 -1
- package/dist/client/assets/{editor-stZYyxdg.js → editor-D_TP8Zgm.js} +1 -1
- package/dist/client/assets/{editor-classes-C_k7lpha.js → editor-classes-0NCpfosP.js} +1 -1
- package/dist/client/assets/{empty-state-DlNabApi.js → empty-state-BQLWtNQT.js} +1 -1
- package/dist/client/assets/{empty-state-BP4JRDLR.js → empty-state-Oh19ZuqH.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DZp7Pnbi.js → experiments-tab-choice-Bo6k5V9E.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CzqnFJl9.js → extract-connection-data-Dcybc2XD.js} +1 -1
- package/dist/client/assets/{feature-gate-C_eiJnqB.js → feature-gate-VZsia_Hs.js} +1 -1
- package/dist/client/assets/{feature-paywall-CBOn7yV2.js → feature-paywall-DR7Clo4c.js} +1 -1
- package/dist/client/assets/{file-explorer-BrZ-CG01.js → file-explorer-81aDQUj9.js} +1 -1
- package/dist/client/assets/{file-preview-PTP8hmPn.js → file-preview-X_NFkOVD.js} +1 -1
- package/dist/client/assets/{file-share-button-BegoNidK.js → file-share-button-DOAhwfe0.js} +1 -1
- package/dist/client/assets/{file-type-icon-M87xyG0K.js → file-type-icon-DR-V5GzT.js} +1 -1
- package/dist/client/assets/{folder-icon-Dcx7O7hC.js → folder-icon-BEMnD9Mo.js} +1 -1
- package/dist/client/assets/{form-CJTkS9yd.js → form-C_3vsTjd.js} +1 -1
- package/dist/client/assets/{frame-navigation-BZ8W_2dq.js → frame-navigation-B6xzv3L_.js} +1 -1
- package/dist/client/assets/{gateway-client-zPU6BhGI.js → gateway-client-CwKPU6S4.js} +1 -1
- package/dist/client/assets/{general-CvWpV1rC.js → general-BfGOnQz-.js} +1 -1
- package/dist/client/assets/{github-icon-D3IlXxDN.js → github-icon-mqy7WjXH.js} +1 -1
- package/dist/client/assets/{held-block-view-CEue5DyE.js → held-block-view-8Ktr6QKV.js} +1 -1
- package/dist/client/assets/{home-CBhOYnUz.js → home-CoqulptE.js} +1 -1
- package/dist/client/assets/{home-overview-nMDmkNSh.js → home-overview-Cqkq8Gda.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-CC64pDxA.js → hosted-reconcile-BfDZiVDB.js} +1 -1
- package/dist/client/assets/{icon-button-C9InOUgM.js → icon-button-BZNuDXN_.js} +1 -1
- package/dist/client/assets/{index-mb-jxjEy.js → index-6k36ehsW.js} +6 -6
- package/dist/client/assets/{index-g0fJQ3Ik.js → index-BNMtwLGo.js} +1 -1
- package/dist/client/assets/{index-Dy0Aphio.js → index-BOcJIVCK.js} +1 -1
- package/dist/client/assets/{index-Cdf0nHrK.js → index-BZvJPANC.js} +1 -1
- package/dist/client/assets/{index-B6vsr4i3.js → index-C4RiD3F4.js} +1 -1
- package/dist/client/assets/{index-BIBRRoOW.js → index-CGp5e78v.js} +1 -1
- package/dist/client/assets/{index-C-bUN66r.js → index-CHcZo0sN.js} +1 -1
- package/dist/client/assets/{index-B8ZkvDME.js → index-CbxeeWwk.js} +1 -1
- package/dist/client/assets/{index-D2FJssDQ.js → index-Ccjzy_Yg.js} +1 -1
- package/dist/client/assets/{index-CY-w4kYr.js → index-DYr4DM-_.js} +1 -1
- package/dist/client/assets/{index-kPKwu4SB.js → index-DbcKAUw4.js} +1 -1
- package/dist/client/assets/index-NYmpejop.js +5 -0
- package/dist/client/assets/{index-CyK1A-PV.js → index-Pt2Dg3Hd.js} +1 -1
- package/dist/client/assets/{index-OaQ5Wven.js → index-WlTKCESy.js} +1 -1
- package/dist/client/assets/{index-hl8iFWLs.js → index-_N6kCtM_.js} +1 -1
- package/dist/client/assets/{index-CnFOA69K.js → index-gxh0eyFF.js} +1 -1
- package/dist/client/assets/{index-redirect-Cc2j63PQ.js → index-redirect-BKO9Og1V.js} +1 -1
- package/dist/client/assets/{index-BPvzZzln.js → index-unMd35fT.js} +1 -1
- package/dist/client/assets/index-yFD0_BNc.css +1 -0
- package/dist/client/assets/{infiniteQueryObserver-Dfcni9SV.js → infiniteQueryObserver-BU4GB00s.js} +1 -1
- package/dist/client/assets/{infra-billing-BYZXmRJD.js → infra-billing-Dp0t1IaK.js} +1 -1
- package/dist/client/assets/{input-BUC-cGry.js → input-CH4Gjy3Z.js} +3 -3
- package/dist/client/assets/{input-DjfzIqsk.js → input-DAb55cm0.js} +1 -1
- package/dist/client/assets/{integration-icon-DRbGJhQo.js → integration-icon-CThPNDLT.js} +1 -1
- package/dist/client/assets/{item-actions-CDU7n7Cr.js → item-actions-Cd5OpKeM.js} +1 -1
- package/dist/client/assets/{jira-icon-DdgjDC_T.js → jira-icon-C-P_hNAy.js} +1 -1
- package/dist/client/assets/{label-DFYaZzfV.js → label-B05fQV9w.js} +1 -1
- package/dist/client/assets/{layout-C1ShA0A2.js → layout-D62GW4Xy.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-C0rLwEhl.js → legacy-admin-welcome-dialog-BOk_1MDr.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-0KD5AZ-a.js → legacy-agents-deep-CwnshL_u.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DsJJQAHz.js → legacy-main-redirect-B9wSse7w.js} +1 -1
- package/dist/client/assets/library-CE-7zswq.js +1 -0
- package/dist/client/assets/{library-tab-BttdbOwT.js → library-tab-6C3BHzqG.js} +1 -1
- package/dist/client/assets/{login-DkrQRBM-.js → login-De-omavu.js} +1 -1
- package/dist/client/assets/{markdown-B-EQMrBl.js → markdown-B2-eb-Eh.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-B8_THT37.js → mcp-app-renderer-Bj6Yqj6W.js} +1 -1
- package/dist/client/assets/{mcp-oauth-_iPR8QjI.js → mcp-oauth-CBgv_I8z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cya-fh0P.js → mcp-oauth-DsdWz5k5.js} +1 -1
- package/dist/client/assets/{members-BVOPoO_W.js → members-ai18MRiF.js} +1 -1
- package/dist/client/assets/{memory-C23hLBrZ.js → memory-lLPqtjY5.js} +1 -1
- package/dist/client/assets/{mock-board-BcZu24PK.js → mock-board-DUqjanpY.js} +3 -3
- package/dist/client/assets/{monaco-editor-DttATUsj.js → monaco-editor-C4oSGu0z.js} +1 -1
- package/dist/client/assets/monitoring-DHvjzxYU.js +2 -0
- package/dist/client/assets/{monitoring-stats-row-CRxmylqh.js → monitoring-stats-row-C3be9geZ.js} +1 -1
- package/dist/client/assets/{multi-select-CSOG3KaA.js → multi-select-UQ5zKqaL.js} +1 -1
- package/dist/client/assets/{mustache-clchl4ci.js → mustache-zZXkHC_L.js} +1 -1
- package/dist/client/assets/{named-rule-step-C-_N0SXT.js → named-rule-step-CrcD_duq.js} +1 -1
- package/dist/client/assets/{named-rule-view-DrUf_Aau.js → named-rule-view--duBjHJb.js} +1 -1
- package/dist/client/assets/{new-project-dialog-KtG8l1yi.js → new-project-dialog-C8GsS3yA.js} +1 -1
- package/dist/client/assets/{new-project-store-DDZH8miu.js → new-project-store-DIzzNFh1.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DCheihxt.js → oauth-callback-ai-provider-B-5nafY2.js} +1 -1
- package/dist/client/assets/{oauth-callback-B-J4rjBS.js → oauth-callback-oqd3bXUP.js} +1 -1
- package/dist/client/assets/{oauth-consent-P6jhSz87.js → oauth-consent-K2APicmR.js} +1 -1
- package/dist/client/assets/{onboarding-BoQQb_DJ.js → onboarding-o9kHZxKA.js} +1 -1
- package/dist/client/assets/{openai-conversation-BRIcN7ns.js → openai-conversation-BZLoClec.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BhBXjk9R.js → optimistic-project-sidebar-views-pk8rg5oK.js} +1 -1
- package/dist/client/assets/order-monitor-day-wSsYm9_l.js +1 -0
- package/dist/client/assets/{organization-choice-NHrCNKHD.js → organization-choice-BUBhZfiC.js} +1 -1
- package/dist/client/assets/{orgs-oDKfi1NH.js → orgs-DB1GWwYI.js} +1 -1
- package/dist/client/assets/{own-accounts-section-DfQklfiL.js → own-accounts-section-DPjhNkN7.js} +1 -1
- package/dist/client/assets/{pair-CI1Rts6X.js → pair-D_71JV_h.js} +1 -1
- package/dist/client/assets/{parse-sections-Cv7KSMgB.js → parse-sections-Ck3UjwM8.js} +2 -2
- package/dist/client/assets/{plan-DhBEXV7d.js → plan-ClnTFbh5.js} +1 -1
- package/dist/client/assets/{plan-ladder-Dn1mCpkd.js → plan-ladder-C-nHzfvE.js} +1 -1
- package/dist/client/assets/{plan-usage-card-CoidaM8B.js → plan-usage-card-DX0TEH1I.js} +1 -1
- package/dist/client/assets/{popover-D73VbCM5.js → popover-CH9oXjqN.js} +1 -1
- package/dist/client/assets/{post-calendar-bB_dTysf.js → post-calendar-Nt_O_Z94.js} +1 -1
- package/dist/client/assets/{post-editor-DJgKYRYW.js → post-editor-TZTGdKmL.js} +1 -1
- package/dist/client/assets/{preview-content-g2WEpueQ.js → preview-content-C_30wxn1.js} +1 -1
- package/dist/client/assets/{preview-dialog-DEGn7q2O.js → preview-dialog-C2Vuh1sp.js} +1 -1
- package/dist/client/assets/{preview-panel-BWh6T2ND.js → preview-panel-S5oFn61k.js} +1 -1
- package/dist/client/assets/{preview-tab-BFrQickY.js → preview-tab-ClSpAkmV.js} +3 -3
- package/dist/client/assets/{primitives-BHTaKbue.js → primitives-CrCuT0LR.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-B1FnNY41.js → product-picker-dialog-mmy97YMY.js} +1 -1
- package/dist/client/assets/{profile-KHrko28l.js → profile-dIGLO0tj.js} +1 -1
- package/dist/client/assets/{project-app-view-CEsZ7pyQ.js → project-app-view-CL2brGAW.js} +1 -1
- package/dist/client/assets/{project-apps-BFfwYw5p.js → project-apps-BPLYxsdb.js} +1 -1
- package/dist/client/assets/{project-icon-Bl4IAncl.js → project-icon-BwoqBozX.js} +1 -1
- package/dist/client/assets/{project-index-DyqPLhTf.js → project-index-Cb0knzOx.js} +1 -1
- package/dist/client/assets/project-reports-Es3eodEf.js +1 -0
- package/dist/client/assets/project-tasks-BObhyp-g.js +1 -0
- package/dist/client/assets/{projects-D4oIfDMZ.js → projects-AVd6wnYc.js} +1 -1
- package/dist/client/assets/{projects-empty-state-PFeDurZg.js → projects-empty-state-C7JwlwFZ.js} +1 -1
- package/dist/client/assets/{prompts-TmqmoJme.js → prompts-CYDVxedF.js} +1 -1
- package/dist/client/assets/record-editor-C24399Kq.js +1 -0
- package/dist/client/assets/{redirect-editor-BlBcxP_z.js → redirect-editor-Buclfl6T.js} +1 -1
- package/dist/client/assets/{reports-DxGhEr3Y.js → reports-D5WruuUL.js} +1 -1
- package/dist/client/assets/reports-DwRlsCV2.js +1 -0
- package/dist/client/assets/{reports-onboarding-CM7YPxA7.js → reports-onboarding-CFJe1Yh6.js} +1 -1
- package/dist/client/assets/{reports-tab-DLrLzkx3.js → reports-tab-BEIeHpqv.js} +2 -2
- package/dist/client/assets/repositories-BCW1MaJF.js +1 -0
- package/dist/client/assets/{repositories-67wiZj2r.js → repositories-DWThiX2p.js} +1 -1
- package/dist/client/assets/{repository-binding-w-FCDYuS.js → repository-binding--4TzKXBA.js} +1 -1
- package/dist/client/assets/{repository-picker-DF0-TGsg.js → repository-picker-v7iVCEUT.js} +1 -1
- package/dist/client/assets/{require-capability-7Xn2Fb3C.js → require-capability-CAcEc9hc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B1owCwtw.js → required-auth-layout-B8y_MNr7.js} +1 -1
- package/dist/client/assets/{reset-password-BvZRYC01.js → reset-password-ClGMHHI7.js} +1 -1
- package/dist/client/assets/{resizable-CJbr1Nyi.js → resizable-COGor2Ly.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-3aZJM1BR.js → resolve-tab-icon-kXOqF-K7.js} +1 -1
- package/dist/client/assets/{review-settings-CISstknV.js → review-settings-BvN5yP9q.js} +1 -1
- package/dist/client/assets/{role-color-CW1lGNZj.js → role-color-BqI6S_sH.js} +1 -1
- package/dist/client/assets/roles-DiINUuVU.js +1 -0
- package/dist/client/assets/{route-CPaIZZ88.js → route-BZ58rj3h.js} +1 -1
- package/dist/client/assets/{route-CT0-z-8-.js → route-Do9iV-Fa.js} +1 -1
- package/dist/client/assets/route-DvsPl2dV.js +1 -0
- package/dist/client/assets/{route-page-header-CRzmHOKm.js → route-page-header-ZxjL9WRx.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-1xYJwdHB.js → sandbox-git-api-BySMpBzA.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CxRkhFod.js → sandbox-lifecycle-context-D7Mo6SMT.js} +1 -1
- package/dist/client/assets/{save-status-Csuo4rYY.js → save-status-DUiju85M.js} +1 -1
- package/dist/client/assets/{schema-BluyjH2z.js → schema-DcMtzh-L.js} +1 -1
- package/dist/client/assets/{schema-DU3GC-Ez.js → schema-DzB5MtLQ.js} +1 -1
- package/dist/client/assets/{scroll-area-D9mVov2B.js → scroll-area-CT5pMPAI.js} +1 -1
- package/dist/client/assets/{search-input-D-gp-h4P.js → search-input-B5JIa11y.js} +1 -1
- package/dist/client/assets/{search-toggle-C1j-Ki1u.js → search-toggle-B8OLzvCM.js} +1 -1
- package/dist/client/assets/{secret-picker-BoQX39kK.js → secret-picker-DQnzetrk.js} +1 -1
- package/dist/client/assets/{secrets-BZwPjTxC.js → secrets-CohVPhQA.js} +1 -1
- package/dist/client/assets/{section-array-field-4siTAXTX.js → section-array-field-BmxRdqC1.js} +1 -1
- package/dist/client/assets/{sections-Cwqt7k6K.js → sections-4E-Bc25K.js} +1 -1
- package/dist/client/assets/{sections-editor-B2wYNbjz.js → sections-editor-DdYFn1-8.js} +1 -1
- package/dist/client/assets/{select-DnlDCB9E.js → select-BzOd4QV1.js} +1 -1
- package/dist/client/assets/{select-model-Cm1Kbu8h.js → select-model-9pBB2Ftb.js} +1 -1
- package/dist/client/assets/{seo-editor-DbLTH9Vw.js → seo-editor-D0KLiDO0.js} +1 -1
- package/dist/client/assets/{separator-DsSANYB0.js → separator-DpCH28os.js} +1 -1
- package/dist/client/assets/{session-runtime-D2GKulko.js → session-runtime-fnzDQ8ba.js} +1 -1
- package/dist/client/assets/settings-tab-C7l6cj8f.js +1 -0
- package/dist/client/assets/{sheet-Ctckoytn.js → sheet-D0InrjqO.js} +1 -1
- package/dist/client/assets/{shell-layout-BS_Y65pV.js → shell-layout-D8-R0sqM.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BZf0yVqo.js → site-draft-actions-tjwxcrrz.js} +1 -1
- package/dist/client/assets/{site-draft-view-NypTEK1x.js → site-draft-view-DY3MROcG.js} +1 -1
- package/dist/client/assets/site-editor-TTvFFMn0.js +1 -0
- package/dist/client/assets/{site-editor-toast-DfzFv4iY.js → site-editor-toast-BfB5E3lf.js} +1 -1
- package/dist/client/assets/{skills-2_Ugx28k.js → skills-BgqMrKh3.js} +1 -1
- package/dist/client/assets/{slider-Bqy5W8RM.js → slider-CiWmLveF.js} +1 -1
- package/dist/client/assets/{sortable.esm-Cl-YQgc8.js → sortable.esm-BnSJzMhQ.js} +1 -1
- package/dist/client/assets/{sso-CdbJh-Eu.js → sso-C44FERRz.js} +1 -1
- package/dist/client/assets/{suggestion-BoV2NIg6.js → suggestion-Bnw1hfqZ.js} +1 -1
- package/dist/client/assets/{super-agent-icon-CDA5EiNS.js → super-agent-icon-C6LdYrGo.js} +1 -1
- package/dist/client/assets/{switch--3C-A5oU.js → switch-C9KE8PCO.js} +1 -1
- package/dist/client/assets/{synced-repos-BpiKoBMD.js → synced-repos-CZPSEENY.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CEoTzCNL.js → tab-icon-glyph-CWJ_EMCz.js} +1 -1
- package/dist/client/assets/{table-Cy5fo0ER.js → table-BabWDHl3.js} +1 -1
- package/dist/client/assets/{tabs-DJ6SkMve.js → tabs-CLDwlIBj.js} +1 -1
- package/dist/client/assets/{task-board-CShHcm1L.js → task-board-D-EY7IDb.js} +1 -1
- package/dist/client/assets/{task-key-BP2--GY6.js → task-key-Bf-5jxEO.js} +1 -1
- package/dist/client/assets/{task-route-BDNP9yC7.js → task-route-C5TECNuR.js} +1 -1
- package/dist/client/assets/{task-status-GPS8HLw1.js → task-status-GtZc7DUE.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DPlKE9oq.js → taskboard-analytics-Bgm_SXDy.js} +1 -1
- package/dist/client/assets/tasks-C_2YCqC5.js +1 -0
- package/dist/client/assets/{tasks-DQ5zrDt3.js → tasks-fCd-XF0B.js} +1 -1
- package/dist/client/assets/{textarea-BCGFjA5F.js → textarea-zXJwvg1C.js} +1 -1
- package/dist/client/assets/{thread-analytics-B5IqH-5A.js → thread-analytics-CToiKm9y.js} +1 -1
- package/dist/client/assets/{thread-button-Dw70OEJl.js → thread-button-D0_qm01C.js} +1 -1
- package/dist/client/assets/{thread-intent-BQWCtBA_.js → thread-intent-HcaWskQl.js} +1 -1
- package/dist/client/assets/{thread-route-DRsKlO-E.js → thread-route-DISRw9NA.js} +1 -1
- package/dist/client/assets/{thread-route-Dix8r-rB.js → thread-route-DkHlrR6F.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-iwOtv26B.js → thread-sheet-body-BwoNg8G-.js} +1 -1
- package/dist/client/assets/{time-range-picker-CUAzqD4s.js → time-range-picker-BJLph571.js} +1 -1
- package/dist/client/assets/{toggle-group-jkikwCcL.js → toggle-group--KiJldtG.js} +1 -1
- package/dist/client/assets/{tool-set-selector-Clh56c6v.js → tool-set-selector-DigSDBNa.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DcIFSTOI.js → toolbar-icon-button-Cl7Yg4qZ.js} +1 -1
- package/dist/client/assets/{tooltip-DCzbfwd7.js → tooltip-CpNT29Lg.js} +1 -1
- package/dist/client/assets/{tooltipContext-2wUW4UR-.js → tooltipContext-HwIIkoOx.js} +1 -1
- package/dist/client/assets/{track-D4IkVAbh.js → track-CnwyZ_-v.js} +1 -1
- package/dist/client/assets/{types-BQYXFpO6.js → types-U1xib9QI.js} +1 -1
- package/dist/client/assets/{url-slug-E3otz4_J.js → url-slug-o-5lOvNU.js} +1 -1
- package/dist/client/assets/{usage-stats-CiB8uQLm.js → usage-stats-BpSzWrpu.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CTbi7eSd.js → use-ai-providers-CL55euJG.js} +1 -1
- package/dist/client/assets/{use-api-keys-CuxnpyDB.js → use-api-keys-DJl2frpX.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BroFciug.js → use-apply-named-rule-Sto1nxzx.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-CT64oCbR.js +1 -0
- package/dist/client/assets/{use-automations-BdniAcmH.js → use-automations-DC0esRjE.js} +1 -1
- package/dist/client/assets/{use-autosave-C9MsBAi1.js → use-autosave-C-v37PG8.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-CHvN3d67.js +1 -0
- package/dist/client/assets/use-blog-view-CVo7QYbd.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-77HNlix_.js → use-chat-layout-state-DuyGxNZ8.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DGO40mZ2.js → use-cms-publish-actions-Cef_LTMV.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BkEQhdBC.js → use-connect-companion-BaxDHT_c.js} +1 -1
- package/dist/client/assets/{use-connection-DxwzNo03.js → use-connection-BrUoHInG.js} +1 -1
- package/dist/client/assets/{use-content-sync-C9H2kDwl.js → use-content-sync-C-N3pUjd.js} +1 -1
- package/dist/client/assets/{use-copy-DSNmvH9L.js → use-copy-BosHh8hs.js} +1 -1
- package/dist/client/assets/{use-current-view-DvszbK0Z.js → use-current-view-CQkQuEPS.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BSsydU_s.js → use-date-fns-locale-CL5KHXt3.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D6iRm-Vv.js → use-debounced-autosave-Dd0HvZCV.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CAOKwJaL.js → use-debounced-value-D92V-nO1.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DnZKzVHP.js → use-deco-credits-BbacUwGD.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BhcT5RAV.js → use-decopilot-events-CXr5p6cn.js} +1 -1
- package/dist/client/assets/{use-delete-block-Bd0Db3-p.js → use-delete-block-CcnRhYow.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BMDl_PP-.js → use-delete-connection-C5CW1TMU.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DCWHLNad.js → use-deployment-admin-CrPYh0iy.js} +1 -1
- package/dist/client/assets/{use-entitlements-CzwT7L5B.js → use-entitlements-CtKDjSCc.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DbEjmD3f.js → use-fast-preview-draft-url-oDvx6qNG.js} +1 -1
- package/dist/client/assets/{use-file-configs-yKe4yLHn.js → use-file-configs-d8oveZti.js} +1 -1
- package/dist/client/assets/{use-id-selection-DmcvY3GI.js → use-id-selection-YDCUJkW7.js} +1 -1
- package/dist/client/assets/{use-in-settings-BTBVzmbg.js → use-in-settings-CSXNVGfX.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BOy7gIMv.js → use-inbox-feed-BmDqTf6H.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DnhPBPks.js → use-infinite-scroll-Bk9vcUF2.js} +1 -1
- package/dist/client/assets/{use-join-requests-C0zVtdAh.js → use-join-requests-C1GX0oi8.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BCg6GLFm.js → use-main-panel-tabs-D6PrQKj_.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BZRJODR4.js → use-mcp-auth-status-BXEHX9A9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-4k5JKqzF.js → use-mcp-client-Dn7GJEfR.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-pJuJ9yii.js → use-mcp-prompts-BMSkxk3j.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dh4scI4V.js → use-mcp-tools-BNwnVHgE.js} +1 -1
- package/dist/client/assets/{use-mobile-CBwmaBFU.js → use-mobile-Bwg13Khk.js} +1 -1
- package/dist/client/assets/{use-move-blocks-D8MFSTf7.js → use-move-blocks-sK7PvIYV.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-H87rWFYJ.js → use-navigate-to-agent-CzSAlpxn.js} +1 -1
- package/dist/client/assets/{use-never-published-Db-SviVk.js → use-never-published-DAOoxMmV.js} +1 -1
- package/dist/client/assets/{use-org-fs-CbXrwKDd.js → use-org-fs-ISEYfoeP.js} +1 -1
- package/dist/client/assets/{use-org-notice-BLDWm2ef.js → use-org-notice-BTIpWL_p.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BLfbsB0Y.js → use-org-repo-syncs-BPpDk25r.js} +1 -1
- package/dist/client/assets/{use-org-sso-Cfy5SkJ5.js → use-org-sso-BZklGZ0G.js} +1 -1
- package/dist/client/assets/{use-organization-settings-UrGbnM2k.js → use-organization-settings-CYN_vYgA.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-B5u6ws6M.js → use-panel-navigate-BAJB306G.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-Cww1Huve.js → use-project-native-view-presence-D1vQT4ZH.js} +1 -1
- package/dist/client/assets/{use-project-scope-Dydp2D08.js → use-project-scope-DVgj2Lmp.js} +1 -1
- package/dist/client/assets/{use-recent-apps-B6ojF6fA.js → use-recent-apps-DV9D4KSi.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-EfyKTU1j.js → use-reports-diagnostic-CxJVNJu1.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DEHux0gs.js → use-sandbox-events-BqtbFabs.js} +1 -1
- package/dist/client/assets/{use-secrets-G3Yo5eAI.js → use-secrets-BZGVO7wb.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C2ASOAPw.js → use-section-preview-base-_QoALJol.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DgMGLJyh.js → use-sidebar-collapsed-UNm7xHPV.js} +1 -1
- package/dist/client/assets/{use-tags-laGjgQqt.js → use-tags-DHI_FfeM.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Ct6FAXeB.js → use-task-board-analytics-BWCmk6Id.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BbVn1nYd.js → use-task-board-item-prs-CNeKRqLE.js} +1 -1
- package/dist/client/assets/{use-task-board-items-B_EMxvU9.js → use-task-board-items-VCVSuTG_.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CE2PVOHH.js → use-task-board-prompts-Cym2n16B.js} +1 -1
- package/dist/client/assets/{use-task-metadata-L0GKyc-x.js → use-task-metadata-DF5Dujx5.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-B9502nWa.js → use-thread-outputs-y7iH8wUp.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CZT4hOaN.js → use-view-draft-kind-CofWB4b8.js} +1 -1
- package/dist/client/assets/{use-voice-input-Nzha8Za1.js → use-voice-input-DuTeTois.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-AR0nCC2r.js +1 -0
- package/dist/client/assets/{useQueries-CQ0xJF7W.js → useQueries-D5FTElAG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CcdFZ__h.js +1 -0
- package/dist/client/assets/{users-C_-sgV42.js → users-9DnwrQDD.js} +1 -1
- package/dist/client/assets/{utils-pe9cqItP.js → utils-B6aCtHUu.js} +1 -1
- package/dist/client/assets/{variant-calendar-d5m67-k3.js → variant-calendar-BnXhZ8PW.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DoPQRIHU.js → variant-matcher-override-BH-xFtlD.js} +1 -1
- package/dist/client/assets/{view-header-B0xV_oWh.js → view-header-mqw-cAVS.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DN6fu9Nf.js → virtual-mcp-sCTq7xTd.js} +1 -1
- package/dist/client/assets/watch-sse-pool-cOL-0uUN.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/migrate-dbos.js +2 -2
- package/dist/server/migrate.js +211 -211
- package/dist/server/server.js +841 -845
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BBl0rE0n.js +0 -1
- package/dist/client/assets/agent-deck-Bhm8TGFo.js +0 -1
- package/dist/client/assets/agent-experiments-D8dPEPBA.js +0 -1
- package/dist/client/assets/agent-file-n_x6LXzO.js +0 -1
- package/dist/client/assets/agent-library-BM2Fah9h.js +0 -1
- package/dist/client/assets/agent-library-file-BO40iakQ.js +0 -1
- package/dist/client/assets/agent-overview-CJRKK7hh.js +0 -1
- package/dist/client/assets/agent-settings-CE2XV9z9.js +0 -1
- package/dist/client/assets/agent-site-editor-code-1w7lcxGQ.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BU4N-bBf.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-D9XYlGea.js +0 -1
- package/dist/client/assets/agent-view-B4jYgL5h.js +0 -1
- package/dist/client/assets/api-keys-BoLbPekZ.js +0 -1
- package/dist/client/assets/index-CFbcObvG.css +0 -1
- package/dist/client/assets/index-CiG92g6c.js +0 -5
- package/dist/client/assets/library-DKYFm9Uv.js +0 -1
- package/dist/client/assets/monitoring-CLDBgSzo.js +0 -2
- package/dist/client/assets/order-monitor-day-DEr2FQ1w.js +0 -1
- package/dist/client/assets/project-reports-Bo9Tf1zF.js +0 -1
- package/dist/client/assets/project-tasks-t-YvuQ_q.js +0 -1
- package/dist/client/assets/record-editor-WmiU2d6T.js +0 -1
- package/dist/client/assets/reports-Cb0Mwz-u.js +0 -1
- package/dist/client/assets/repositories-CDNeFlHK.js +0 -1
- package/dist/client/assets/roles-D7rYnEMh.js +0 -1
- package/dist/client/assets/route-CFBPrBcw.js +0 -1
- package/dist/client/assets/settings-tab-CSzHYez6.js +0 -1
- package/dist/client/assets/site-editor-BbPLQWC_.js +0 -1
- package/dist/client/assets/tasks-Coh8-0jv.js +0 -1
- package/dist/client/assets/use-ask-in-chat-vlpFfAp7.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BloQ91Xb.js +0 -1
- package/dist/client/assets/use-blog-view-Bi3aoju6.js +0 -1
- package/dist/client/assets/useInfiniteQuery-FxnnBp9W.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CtWAJlQZ.js +0 -1
- package/dist/client/assets/watch-sse-pool-7J-tc7Ge.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as H,t as U,a9 as S,C as Z,aa as X,f as R,ab as J,ac as Q,o as z}from"./usage-stats-CiB8uQLm.js";import{gA as C,hk as M,gz as P,hl as x,hm as L,hn as V,ho as K,hp as _,gC as A,eT as N,r as p,ca as $}from"./index-mb-jxjEy.js";import{C as k}from"./index-B6vsr4i3.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
1
|
+
import{A as H,t as U,a9 as S,C as Z,aa as X,f as R,ab as J,ac as Q,o as z}from"./usage-stats-BpSzWrpu.js";import{gA as C,hk as M,gz as P,hl as x,hm as L,hn as V,ho as K,hp as _,gC as A,eT as N,r as p,ca as $}from"./index-6k36ehsW.js";import{C as k}from"./index-C4RiD3F4.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as t,c6 as o}from"./index-
|
|
1
|
+
import{r as i,j as t,c6 as o}from"./index-6k36ehsW.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c0 as L,c1 as B,j as c,g0 as q,c6 as y,c4 as b,f$ as K,c7 as E,g1 as _,e1 as T,ck as k,cd as U,co as V}from"./index-
|
|
1
|
+
import{r as s,c0 as L,c1 as B,j as c,g0 as q,c6 as y,c4 as b,f$ as K,c7 as E,g1 as _,e1 as T,ck as k,cd as U,co as V}from"./index-6k36ehsW.js";var I="Radio",[z,w]=k(I),[H,W]=z(I),P=s.forwardRef((t,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=b(d,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:a,children:[c.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&c.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});P.displayName=I;var g="RadioIndicator",G=s.forwardRef((t,d)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(g,o);return c.jsx(T,{present:n||r.checked,children:c.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});G.displayName=g;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:d,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=b(a,r),f=U(o),R=V(d);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[$]=k(C,[_,w]),j=_(),N=w(),[J,Q]=$(C),D=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return c.jsx(J,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:c.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Q(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=b(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{Y.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:c.jsx(P,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var Z="RadioGroupIndicator",F=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return c.jsx(G,{...e,...n,ref:d})});F.displayName=Z;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as j,r as _,j as f,m as B,aY as at,t as se,b5 as Oe,a6 as ot,hj as lt,i as ct,K as ut,ca as ht,h as De,o as pt}from"./index-mb-jxjEy.js";import{u as dt,t as Be,f as ue,A as ft,v as gt,Y as P,Z as mt,_ as kt,H as xt,I as D,$ as ve,a0 as bt,e as wt,a1 as Se,a2 as yt,a3 as G,N as Fe,a4 as he,c as qe,a5 as pe,a6 as Tt,a7 as vt,s as St,a8 as Mt,a as Et,E as At}from"./usage-stats-CiB8uQLm.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-C_k7lpha.js";import{a as Ct,e as Ue,s as It,S as Lt}from"./suggestion-BoV2NIg6.js";import{B as zt}from"./index-C-bUN66r.js";import{aE as Pt,ai as jt,aj as Nt,al as Ht,K as Ot,aY as Dt,aJ as Bt}from"./agent-icon-zvo6Zsex.js";import{i as Ft}from"./SwitchHorizontal01-HaaMuIs0.js";import{s as qt}from"./Trash01-By8obgKt.js";import{k as Ut,a as Zt}from"./use-org-fs-CbXrwKDd.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Yt}from"./markdown-B-EQMrBl.js";import{s as Jt,T as en}from"./index-B6vsr4i3.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-CwP4XJhp.js";import{I as an}from"./icon-button-C9InOUgM.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),In={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},Ln={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{c as $,b as j,r as _,j as f,m as B,aY as at,t as se,b5 as Oe,a6 as ot,hj as lt,i as ct,K as ut,ca as ht,h as De,o as pt}from"./index-6k36ehsW.js";import{u as dt,t as Be,f as ue,A as ft,v as gt,Y as P,Z as mt,_ as kt,H as xt,I as D,$ as ve,a0 as bt,e as wt,a1 as Se,a2 as yt,a3 as G,N as Fe,a4 as he,c as qe,a5 as pe,a6 as Tt,a7 as vt,s as St,a8 as Mt,a as Et,E as At}from"./usage-stats-BpSzWrpu.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-0NCpfosP.js";import{a as Ct,e as Ue,s as It,S as Lt}from"./suggestion-Bnw1hfqZ.js";import{B as zt}from"./index-CHcZo0sN.js";import{aE as Pt,ai as jt,aj as Nt,al as Ht,K as Ot,aY as Dt,aJ as Bt}from"./agent-icon-m6DF-jGw.js";import{i as Ft}from"./SwitchHorizontal01-DX564T5r.js";import{s as qt}from"./Trash01-CFKOdFdJ.js";import{k as Ut,a as Zt}from"./use-org-fs-ISEYfoeP.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Yt}from"./markdown-B2-eb-Eh.js";import{s as Jt,T as en}from"./index-C4RiD3F4.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-D0_H05ec.js";import{I as an}from"./icon-button-BZNuDXN_.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),In={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},Ln={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Xe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ye=/^( {2,}|\\)\n(?!\s*$)/,jn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,te=/[\s\p{P}\p{S}]/u,be=/[^\s\p{P}\p{S}]/u,Nn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,te).getRegex(),Je=/(?!~)[\p{P}\p{S}]/u,Hn=/(?!~)[\s\p{P}\p{S}]/u,On=/(?:[^\s\p{P}\p{S}]|~)/u,Dn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),et=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bn=S(et,"u").replace(/punct/g,F).getRegex(),Fn=S(et,"u").replace(/punct/g,Je).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qn=S(tt,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Un=S(tt,"gu").replace(/notPunctSpace/g,On).replace(/punctSpace/g,Hn).replace(/punct/g,Je).getRegex(),Zn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Gn=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),Kn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Wn=S(Kn,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Qn=S(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),Xn=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Vn=S(ke).replace("(?:-->|$)","-->").getRegex(),Yn=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Jn=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nt=S(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",me).getRegex(),rt=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",me).getRegex(),er=S("reflink|nolink(?!\\()","g").replace("reflink",nt).replace("nolink",rt).getRegex(),_e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,we={_backpedal:N,anyPunctuation:Qn,autolink:Xn,blockSkip:Dn,br:Ye,code:Pn,del:N,delLDelim:N,delRDelim:N,emStrongLDelim:Bn,emStrongRDelimAst:qn,emStrongRDelimUnd:Zn,escape:zn,link:Jn,nolink:rt,punctuation:Nn,reflink:nt,reflinkSearch:er,tag:Yn,text:jn,url:N},tr={...we,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},ae={...we,emStrongRDelimAst:Un,emStrongLDelim:Fn,delLDelim:Gn,delRDelim:Wn,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_e).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_e).getRegex()},nr={...ae,br:S(Ye).replace("{2,}","*").getRegex(),text:S(ae.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:xe,gfm:In,pedantic:Ln},q={normal:we,gfm:ae,breaks:nr,pedantic:tr},rr={"&":"&","<":"<",">":">",'"':""","'":"'"},$e=t=>rr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,$e)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,$e);return t}function Ce(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Ie(t,e){let n=t.replace(R.findPipe,(a,i,l)=>{let o=!1,h=i;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),s=n.split(R.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(R.slashPipe,"|");return s}function U(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function sr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function ir(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let a=4-n%4;s+=" ".repeat(a),n+=a}else s+=r,n++;return s}function Le(t,e,n,s,r){let a=e.href,i=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function ar(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
3
3
|
`).map(a=>{let i=a.match(n.other.beginningSpace);if(i===null)return a;let[l]=i;return l.length>=r.length?a.slice(r.length):a}).join(`
|
|
4
4
|
`)}var Y=class{options;rules;lexer;constructor(t){this.options=t||O}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:U(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,c1 as ce,j as p,c7 as _,c6 as T,c4 as C,cc as le,c0 as de,co as ue,ck as fe,cd as me}from"./index-
|
|
1
|
+
import{r as l,c1 as ce,j as p,c7 as _,c6 as T,c4 as C,cc as le,c0 as de,co as ue,ck as fe,cd as me}from"./index-6k36ehsW.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{c as ue,r as xe,d as ns,a6 as ht,b as _e,j as t,B as je,t as dt,aY as Yt,am as as,K as bt,i as Et,a7 as As,m as ot,gG as _s,o as cs,h as Us,e0 as Ks,ad as Vs,u as qs,n as _t,E as Wt,R as Hs,dW as Bs,hf as Js,T as Gs,W as Qs,I as Xt}from"./index-6k36ehsW.js";import{S as Ys}from"./search-input-B5JIa11y.js";import{E as Ht}from"./empty-state-BQLWtNQT.js";import{R as Ws}from"./require-capability-CAcEc9hc.js";import{f as js}from"./pair-D_71JV_h.js";import{b as ts}from"./use-connection-BrUoHInG.js";import{g as Ps}from"./connection-slug-pVnJQqDL.js";import{B as Lt}from"./badge-BMdL2EZN.js";import{P as ds,a as ms,b as us}from"./popover-CH9oXjqN.js";import{c as Pt,T as Dt,a as Rt,b as Xs}from"./tooltip-CpNT29Lg.js";import{z as fs,e as Kt,bw as Zs,av as Ns,K as el}from"./agent-icon-m6DF-jGw.js";import{i as tl}from"./Key01-UGh5N-kc.js";import{i as sl}from"./Play-BkcMWNbk.js";import{MonacoCodeEditor as bs}from"./monaco-editor-C4oSGu0z.js";import{u as ll}from"./use-mcp-client-Dn7GJEfR.js";import{u as rl}from"./repository-binding--4TzKXBA.js";import{n as Ot}from"./LinkBroken01-CG6bLE37.js";import{c as il}from"./SwitchHorizontal01-DX564T5r.js";import{s as ol}from"./Plus-D84NDH53.js";import{s as nl}from"./Trash01-CFKOdFdJ.js";import{M as $t}from"./multi-select-UQ5zKqaL.js";import{b as yt,a as wt,c as $e,d as St,S as It}from"./select-BzOd4QV1.js";import{e as ys,T as al}from"./time-range-picker-BJLph571.js";import{T as cl}from"./textarea-zXJwvg1C.js";import{C as Ds}from"./collection-tabs-CaUB-XIg.js";import{S as dl}from"./switch-C9KE8PCO.js";import{L as ml}from"./label-B05fQV9w.js";import{I as Ct}from"./integration-icon-CThPNDLT.js";import{A as ul,a as fl,b as xl}from"./alert-Dt-QBVYu.js";import{K as gt}from"./monitoring-stats-row-C3be9geZ.js";import{b as Bt}from"./use-entitlements-CtKDjSCc.js";import{g as pl,b as ws,f as Nt,c as Zt,d as gl,e as Ss,a as xs,h as hl,i as ps,T as vl,j as jl,r as Nl,k as bl}from"./thread-sheet-body-BwoNg8G-.js";import{u as yl}from"./useSuspenseInfiniteQuery-CcdFZ__h.js";import{c as wl,S as Sl,b as Rs,a as Ls}from"./sheet-D0InrjqO.js";import{c as De,b as vt,d as Jt,e as Gt,T as he,a as Qt}from"./table-BabWDHl3.js";import{t as ss}from"./ChevronDown-C0tAiNqc.js";import{n as ls}from"./ChevronUp-CLxsyktD.js";import{u as Os}from"./use-id-selection-YDCUJkW7.js";import{u as Fs}from"./use-infinite-scroll-Bk9vcUF2.js";import{u as Il}from"./useInfiniteQuery-AR0nCC2r.js";import{g as Cl}from"./task-status-GtZc7DUE.js";import{u as Tl,d as kl}from"./use-automations-DC0esRjE.js";import{A as Ml}from"./automation-runs-CUFatpqX.js";import{i as _l}from"./ArrowLeft-CRw3W_qh.js";import{E as Is}from"./empty-state-Oh19ZuqH.js";import{O as zs}from"./watch-sse-pool-cOL-0uUN.js";import{b as Pl,r as Dl,O as Rl,e as Ll}from"./order-monitor-day-wSsYm9_l.js";import{F as Ol}from"./feature-gate-VZsia_Hs.js";import"./SearchMd-lt6LFgc6.js";import"./access-gate-52qvSzpx.js";import"./capability-load-error-Cpo9EAh2.js";import"./Tool01-C5c4fHOY.js";import"./ArrowRight-DSFHA030.js";import"./collapsible-RVJX7MiV.js";import"./use-copy-BosHh8hs.js";import"./usage-stats-BpSzWrpu.js";import"./utils-CVEq3hMx.js";import"./markdown-B2-eb-Eh.js";import"./chat-context-BW-slB_k.js";import"./use-panel-navigate-BAJB306G.js";import"./thread-route-DISRw9NA.js";import"./use-project-scope-DVgj2Lmp.js";import"./use-view-draft-kind-CofWB4b8.js";import"./use-blog-view-CVo7QYbd.js";import"./use-organization-settings-CYN_vYgA.js";import"./schema-DcMtzh-L.js";import"./task-board-D-EY7IDb.js";import"./thread-intent-HcaWskQl.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-fnzDQ8ba.js";import"./use-ai-providers-CL55euJG.js";import"./use-current-view-CQkQuEPS.js";import"./use-in-settings-CSXNVGfX.js";import"./use-decopilot-events-CXr5p6cn.js";import"./use-mobile-Bwg13Khk.js";import"./File02-C5RfRHg9.js";import"./gateway-client-CwKPU6S4.js";import"./form-C_3vsTjd.js";import"./UserCheck01-CLDfWEEJ.js";import"./task-key-Bf-5jxEO.js";import"./use-task-board-items-VCVSuTG_.js";import"./config-XJHmvtsd.js";import"./AlertCircle-AllCHsc-.js";import"./CheckCircle-D_eJlHYl.js";import"./Eye-IB81hGdK.js";import"./task-route-C5TECNuR.js";import"./project-index-Cb0knzOx.js";import"./TrendUp01-Me2ucQTV.js";import"./shell-layout-D8-R0sqM.js";import"./Globe04-Cffx8Biv.js";import"./UserSquare-bg0CCGVi.js";import"./use-deployment-admin-CrPYh0iy.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-DNnGTtOa.js";import"./use-org-notice-BTIpWL_p.js";import"./Monitor01-DKJLays1.js";import"./Zap-DS2xaVCg.js";import"./command-D0_H05ec.js";import"./index-BOcJIVCK.js";import"./project-icon-BwoqBozX.js";import"./use-navigate-to-agent-CzSAlpxn.js";import"./use-debounced-value-D92V-nO1.js";import"./new-project-dialog-C8GsS3yA.js";import"./repository-picker-v7iVCEUT.js";import"./github-icon-mqy7WjXH.js";import"./collection-search-0Y7SoOe-.js";import"./BookOpen01-lNQqqERm.js";import"./ShoppingBag01-BswoJp3c.js";import"./new-project-store-DIzzNFh1.js";import"./legacy-admin-welcome-dialog-BOk_1MDr.js";import"./drawer-cDJNr0UL.js";import"./required-auth-layout-B8y_MNr7.js";import"./use-org-sso-BZklGZ0G.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bj6Yqj6W.js";import"./types-U1xib9QI.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-C3Wojgfs.js";import"./use-mcp-prompts-BMSkxk3j.js";import"./use-thread-outputs-y7iH8wUp.js";import"./file-type-icon-DR-V5GzT.js";import"./index-CbxeeWwk.js";import"./ArrowUp-D_GhkPcm.js";import"./ChevronSelectorVertical-oMR2kCqB.js";import"./CreditCard01-DfogeJXR.js";import"./MessageCircle01-MLX2eDnv.js";import"./Fingerprint04-d20CepTC.js";import"./LayoutLeft-DtDmaSrQ.js";import"./Minus-DUjfsLQY.js";import"./Sun-C0_F0NYL.js";import"./Upload01-A4xsFQc7.js";import"./Users01-CCleMxbO.js";import"./editor-D_TP8Zgm.js";import"./auth-DTCWUZG7.js";import"./checkbox-DyPy5TYa.js";import"./index-BdQq_4o_.js";import"./scroll-area-CT5pMPAI.js";import"./calendar-CWY9RcGt.js";import"./chart-J7juGn_W.js";import"./CategoricalChart-DRsmm3_a.js";import"./index-WlTKCESy.js";import"./tooltipContext-HwIIkoOx.js";import"./CartesianChart-DPVXkgL4.js";import"./AreaChart-C6w_b9ET.js";import"./infiniteQueryObserver-BU4GB00s.js";import"./useQueries-D5FTElAG.js";import"./ReferenceLine-qG6ZRY0w.js";import"./feature-paywall-DR7Clo4c.js";import"./plan-ladder-C-nHzfvE.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Fl=["eq","contains","exists","in"];function zl(s){return Fl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function $l(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),o=l?decodeURIComponent(l):"";if(o.trim())return{key:o,operator:i&&zl(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(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
|
+
`)}function Cs(s){return s.trim()?s.split(`
|
|
3
|
+
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function El(s){const e={},l={},i=[],m={};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&&(l[o.key]=`%${o.value}%`);break;case"exists":i.push(o.key);break;case"in":o.value&&(m[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
|
|
4
|
+
|
|
5
|
+
... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:i}}function Al(s){const e=ue.c(167),{log:l}=s,[i,m]=xe.useState(!1),[o,u]=xe.useState(!1),d=ns(),{org:c}=ht(),r=_e(),g=ts(),h=Ts(l.input),f=Ts(l.output),n=Ul;let w;e[0]!==l.input||e[1]!==l.output||e[2]!==r?(w=async ge=>{const pe=n(ge==="input"?l.input:l.output);try{await navigator.clipboard.writeText(pe),ge==="input"?(m(!0),setTimeout(()=>m(!1),2e3)):(u(!0),setTimeout(()=>u(!1),2e3))}catch{dt.error(r("monitoring.types.failedToCopy"))}},e[0]=l.input,e[1]=l.output,e[2]=r,e[3]=w):w=e[3];const a=w;let T;e[4]!==l.id||e[5]!==l.input||e[6]!==l.output||e[7]!==l.toolName?(T=ge=>{const pe=n(ge==="input"?l.input:l.output),ye=new Blob([pe],{type:"application/json"}),Pe=URL.createObjectURL(ye),Me=document.createElement("a");Me.href=Pe,Me.download=`${l.toolName}-${ge}-${l.id}.json`,Me.click(),URL.revokeObjectURL(Pe)},e[4]=l.id,e[5]=l.input,e[6]=l.output,e[7]=l.toolName,e[8]=T):T=e[8];const j=T;let y;e[9]!==g||e[10]!==l.connectionId||e[11]!==l.input||e[12]!==l.toolName||e[13]!==d||e[14]!==c||e[15]!==r?(y=()=>{const ge=g.find(ye=>ye.id===l.connectionId);if(!ge){dt.error(r("monitoring.types.connectionNotFound"));return}const pe=crypto.randomUUID();sessionStorage.setItem(`replay-${pe}`,JSON.stringify(l.input)),d({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:c.slug,appSlug:Ps(ge),collectionName:"tools",itemId:encodeURIComponent(l.toolName)},search:{replayId:pe}})},e[9]=g,e[10]=l.connectionId,e[11]=l.input,e[12]=l.toolName,e[13]=d,e[14]=c,e[15]=r,e[16]=y):y=e[16];const v=y,[p,M]=xe.useState(!1);let x;e[17]!==l.requestId||e[18]!==r?(x=async()=>{try{await navigator.clipboard.writeText(l.requestId),M(!0),setTimeout(()=>M(!1),2e3)}catch{dt.error(r("monitoring.types.failedToCopy"))}},e[17]=l.requestId,e[18]=r,e[19]=x):x=e[19];const S=x;let I;e[20]!==l.timestamp?(I=new Date(l.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[20]=l.timestamp,e[21]=I):I=e[21];const b=I,C="text-sm px-5 md:px-6 py-5 space-y-5";let _;e[22]!==r?(_=r("monitoring.types.timestamp"),e[22]=r,e[23]=_):_=e[23];let P;e[24]!==_?(P=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:_}),e[24]=_,e[25]=P):P=e[25];let k;e[26]!==b?(k=t.jsx("div",{className:"text-sm text-foreground",children:b}),e[26]=b,e[27]=k):k=e[27];let D;e[28]!==P||e[29]!==k?(D=t.jsxs("div",{children:[P,k]}),e[28]=P,e[29]=k,e[30]=D):D=e[30];let L;e[31]!==r?(L=r("monitoring.types.duration"),e[31]=r,e[32]=L):L=e[32];let U;e[33]!==L?(U=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[33]=L,e[34]=U):U=e[34];let J;e[35]!==l.durationMs?(J=t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[l.durationMs,"ms"]}),e[35]=l.durationMs,e[36]=J):J=e[36];let Q;e[37]!==U||e[38]!==J?(Q=t.jsxs("div",{children:[U,J]}),e[37]=U,e[38]=J,e[39]=Q):Q=e[39];let N;e[40]!==r?(N=r("monitoring.types.user"),e[40]=r,e[41]=N):N=e[41];let O;e[42]!==N?(O=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:N}),e[42]=N,e[43]=O):O=e[43];let F;e[44]!==l.userName?(F=t.jsx("div",{className:"text-sm text-foreground",children:l.userName}),e[44]=l.userName,e[45]=F):F=e[45];let q;e[46]!==O||e[47]!==F?(q=t.jsxs("div",{children:[O,F]}),e[46]=O,e[47]=F,e[48]=q):q=e[48];let $;e[49]!==l.virtualMcpName||e[50]!==r?($=l.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.agent")}),t.jsx("div",{className:"text-sm text-foreground",children:l.virtualMcpName})]}),e[49]=l.virtualMcpName,e[50]=r,e[51]=$):$=e[51];let W;e[52]!==r?(W=r("monitoring.types.requestId"),e[52]=r,e[53]=W):W=e[53];let K;e[54]!==W?(K=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:W}),e[54]=W,e[55]=K):K=e[55];let B;e[56]!==l.requestId?(B=t.jsx("code",{className:"font-mono text-foreground text-2xs",children:l.requestId}),e[56]=l.requestId,e[57]=B):B=e[57];let V;e[58]!==r?(V=r("monitoring.types.copyRequestId"),e[58]=r,e[59]=V):V=e[59];let Y;e[60]!==p?(Y=p?t.jsx(Yt,{size:12}):t.jsx(Kt,{size:12}),e[60]=p,e[61]=Y):Y=e[61];let R;e[62]!==S||e[63]!==V||e[64]!==Y?(R=t.jsx(je,{size:"icon",variant:"ghost",onClick:S,"aria-label":V,className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:Y}),e[62]=S,e[63]=V,e[64]=Y,e[65]=R):R=e[65];let E;e[66]!==B||e[67]!==R?(E=t.jsxs("div",{className:"flex items-center gap-1",children:[B,R]}),e[66]=B,e[67]=R,e[68]=E):E=e[68];let H;e[69]!==K||e[70]!==E?(H=t.jsxs("div",{children:[K,E]}),e[69]=K,e[70]=E,e[71]=H):H=e[71];let A;e[72]!==l.userAgent||e[73]!==r?(A=l.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.client")}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:l.userAgent})]}),e[72]=l.userAgent,e[73]=r,e[74]=A):A=e[74];let Z;e[75]!==l.properties||e[76]!==d||e[77]!==c||e[78]!==r?(Z=l.properties&&Object.keys(l.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:r("monitoring.types.properties")}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(l.properties).map(ge=>{const[pe,ye]=ge;return t.jsxs(ds,{children:[t.jsx(ms,{asChild:!0,children:t.jsxs(Lt,{variant:"secondary",className:"font-mono cursor-pointer hover:bg-secondary-hover",children:[pe,"=",ye]})}),t.jsx(us,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(je,{variant:"menu",className:"text-xs",onClick:()=>{const Pe={key:pe,operator:"eq",value:ye};d({to:"/$org/settings/monitor",params:{org:c.slug},search:{tab:"overview",propertyFilters:jt([Pe])}})},children:[t.jsx(fs,{size:14,className:"mr-2"}),r("monitoring.types.filterByProperty")]}),t.jsxs(je,{variant:"menu",className:"text-xs",onClick:async()=>{try{await navigator.clipboard.writeText(`${pe}=${ye}`),dt.success(r("monitoring.types.copiedFilter"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Kt,{size:14,className:"mr-2"}),r("monitoring.types.copyFilter")]}),t.jsxs(je,{variant:"menu",className:"text-xs",onClick:async()=>{try{await navigator.clipboard.writeText(pe),dt.success(r("monitoring.types.copiedKey"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(tl,{size:14,className:"mr-2"}),r("monitoring.types.copyKey")]}),t.jsxs(je,{variant:"menu",className:"text-xs",onClick:async()=>{try{await navigator.clipboard.writeText(ye),dt.success(r("monitoring.types.copiedValue"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Zs,{size:14,className:"mr-2"}),r("monitoring.types.copyValue")]})]})})]},pe)})})]}),e[75]=l.properties,e[76]=d,e[77]=c,e[78]=r,e[79]=Z):Z=e[79];let ee;e[80]!==D||e[81]!==Q||e[82]!==q||e[83]!==$||e[84]!==H||e[85]!==A||e[86]!==Z?(ee=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[D,Q,q,$,H,A,Z]}),e[80]=D,e[81]=Q,e[82]=q,e[83]=$,e[84]=H,e[85]=A,e[86]=Z,e[87]=ee):ee=e[87];let G;e[88]!==l.errorMessage||e[89]!==r?(G=l.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:r("monitoring.types.error")}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:l.errorMessage})]}),e[88]=l.errorMessage,e[89]=r,e[90]=G):G=e[90];const de="space-y-4";let re;e[91]!==r?(re=r("monitoring.types.input"),e[91]=r,e[92]=re):re=e[92];let ie;e[93]!==re?(ie=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:re}),e[93]=re,e[94]=ie):ie=e[94];const me=h.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",js(h.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let te;e[95]!==ie||e[96]!==me?(te=t.jsxs("div",{className:"flex items-center gap-2",children:[ie,me]}),e[95]=ie,e[96]=me,e[97]=te):te=e[97];let oe;e[98]!==v||e[99]!==l.input||e[100]!==r?(oe=l.input&&t.jsxs(Pt,{children:[t.jsx(Dt,{asChild:!0,children:t.jsx(je,{size:"icon",variant:"ghost",onClick:v,"aria-label":r("monitoring.types.replayToolCall"),className:"text-muted-foreground hover:text-foreground",children:t.jsx(sl,{size:14})})}),t.jsx(Rt,{children:r("monitoring.types.replayToolCall")})]}),e[98]=v,e[99]=l.input,e[100]=r,e[101]=oe):oe=e[101];let se;e[102]!==j||e[103]!==h||e[104]!==r?(se=h.isTruncated&&t.jsxs(Pt,{children:[t.jsx(Dt,{asChild:!0,children:t.jsx(je,{size:"icon",variant:"ghost",onClick:()=>j("input"),"aria-label":r("monitoring.types.downloadFullInput"),className:"text-muted-foreground hover:text-foreground",children:t.jsx(Ns,{size:14})})}),t.jsx(Rt,{children:r("monitoring.types.downloadFullInput")})]}),e[102]=j,e[103]=h,e[104]=r,e[105]=se):se=e[105];let X;e[106]!==a?(X=()=>a("input"),e[106]=a,e[107]=X):X=e[107];let ne;e[108]!==r?(ne=r("monitoring.types.copyInput"),e[108]=r,e[109]=ne):ne=e[109];let ae;e[110]!==i?(ae=i?t.jsx(Yt,{size:14}):t.jsx(Kt,{size:14}),e[110]=i,e[111]=ae):ae=e[111];let ce;e[112]!==X||e[113]!==ne||e[114]!==ae?(ce=t.jsx(je,{size:"icon",variant:"ghost",onClick:X,"aria-label":ne,className:"text-muted-foreground hover:text-foreground",children:ae}),e[112]=X,e[113]=ne,e[114]=ae,e[115]=ce):ce=e[115];let z;e[116]!==oe||e[117]!==se||e[118]!==ce?(z=t.jsxs("div",{className:"flex items-center gap-1",children:[oe,se,ce]}),e[116]=oe,e[117]=se,e[118]=ce,e[119]=z):z=e[119];let le;e[120]!==te||e[121]!==z?(le=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[te,z]}),e[120]=te,e[121]=z,e[122]=le):le=e[122];let fe;e[123]!==h?(fe=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(bs,{code:h.content,language:"json",height:"100%",readOnly:!0})}),e[123]=h,e[124]=fe):fe=e[124];let ve;e[125]!==le||e[126]!==fe?(ve=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[le,fe]})}),e[125]=le,e[126]=fe,e[127]=ve):ve=e[127];const Ge="rounded-lg overflow-hidden border border-border",Qe="flex items-center justify-between p-1 pl-4 border-b border-border",Ee="flex items-center gap-2";let Re;e[128]!==r?(Re=r("monitoring.types.output"),e[128]=r,e[129]=Re):Re=e[129];let Le;e[130]!==Re?(Le=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:Re}),e[130]=Re,e[131]=Le):Le=e[131];const Oe=f.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",js(f.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let we;e[132]!==Le||e[133]!==Oe?(we=t.jsxs("div",{className:Ee,children:[Le,Oe]}),e[132]=Le,e[133]=Oe,e[134]=we):we=e[134];let Fe;e[135]!==j||e[136]!==f.isTruncated||e[137]!==r?(Fe=f.isTruncated&&t.jsxs(Pt,{children:[t.jsx(Dt,{asChild:!0,children:t.jsx(je,{size:"icon",variant:"ghost",onClick:()=>j("output"),"aria-label":r("monitoring.types.downloadFullOutput"),className:"text-muted-foreground hover:text-foreground",children:t.jsx(Ns,{size:14})})}),t.jsx(Rt,{children:r("monitoring.types.downloadFullOutput")})]}),e[135]=j,e[136]=f.isTruncated,e[137]=r,e[138]=Fe):Fe=e[138];let Ye;e[139]!==a?(Ye=()=>a("output"),e[139]=a,e[140]=Ye):Ye=e[140];let Se;e[141]!==r?(Se=r("monitoring.types.copyOutput"),e[141]=r,e[142]=Se):Se=e[142];let Ie;e[143]!==o?(Ie=o?t.jsx(Yt,{size:14}):t.jsx(Kt,{size:14}),e[143]=o,e[144]=Ie):Ie=e[144];let Ne;e[145]!==Ye||e[146]!==Se||e[147]!==Ie?(Ne=t.jsx(je,{size:"icon",variant:"ghost",onClick:Ye,"aria-label":Se,className:"text-muted-foreground hover:text-foreground",children:Ie}),e[145]=Ye,e[146]=Se,e[147]=Ie,e[148]=Ne):Ne=e[148];let be;e[149]!==Fe||e[150]!==Ne?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[Fe,Ne]}),e[149]=Fe,e[150]=Ne,e[151]=be):be=e[151];let Ce;e[152]!==we||e[153]!==be?(Ce=t.jsxs("div",{className:Qe,children:[we,be]}),e[152]=we,e[153]=be,e[154]=Ce):Ce=e[154];let Te;e[155]!==f.content?(Te=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(bs,{code:f.content,language:"json",height:"100%",readOnly:!0})}),e[155]=f.content,e[156]=Te):Te=e[156];let ke;e[157]!==Ce||e[158]!==Te?(ke=t.jsx("div",{children:t.jsxs("div",{className:Ge,children:[Ce,Te]})}),e[157]=Ce,e[158]=Te,e[159]=ke):ke=e[159];let ze;e[160]!==ve||e[161]!==ke?(ze=t.jsxs("div",{className:de,children:[ve,ke]}),e[160]=ve,e[161]=ke,e[162]=ze):ze=e[162];let Ae;return e[163]!==ee||e[164]!==G||e[165]!==ze?(Ae=t.jsxs("div",{className:C,children:[ee,G,ze]}),e[163]=ee,e[164]=G,e[165]=ze,e[166]=Ae):Ae=e[166],Ae}function Ul(s){return JSON.stringify(s,null,2)}const $s="decopilot";async function Es(s,e){return await s.call("MONITORING_STATS",e)}function Kl(s,e){const l=ue.c(12),{org:i}=ht(),m=as();let o,u,d;l[0]!==i.id||l[1]!==s?(d={...s,excludeConnectionIds:[$s,...s.excludeConnectionIds??[]]},u=Et,o=bt.monitoringStatsToolCalls(i.id,JSON.stringify(d)),l[0]=i.id,l[1]=s,l[2]=o,l[3]=u,l[4]=d):(o=l[2],u=l[3],d=l[4]);let c;l[5]!==m||l[6]!==d?(c=()=>Es(m,d),l[5]=m,l[6]=d,l[7]=c):c=l[7];let r;return l[8]!==e||l[9]!==o||l[10]!==c?(r={queryKey:o,queryFn:c,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=o,l[10]=c,l[11]=r):r=l[11],u(r)}function Vl(s,e){const l=ue.c(12),{org:i}=ht(),m=as();let o,u,d;l[0]!==i.id||l[1]!==s?(d={...s,connectionIds:[$s],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},u=Et,o=bt.monitoringStatsLlm(i.id,JSON.stringify(d)),l[0]=i.id,l[1]=s,l[2]=o,l[3]=u,l[4]=d):(o=l[2],u=l[3],d=l[4]);let c;l[5]!==m||l[6]!==d?(c=()=>Es(m,d),l[5]=m,l[6]=d,l[7]=c):c=l[7];let r;return l[8]!==e||l[9]!==o||l[10]!==c?(r={queryKey:o,queryFn:c,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=o,l[10]=c,l[11]=r):r=l[11],u(r)}function ql(s,e){const l=ue.c(13),{org:i}=ht(),m=as(),o=s.virtualMcpIds?.length?s.virtualMcpIds:void 0;let u,d,c;l[0]!==i.id||l[1]!==s||l[2]!==o?(c={...s,virtualMcpIds:o},d=Et,u=bt.monitoringHeatmap(i.id,JSON.stringify(c)),l[0]=i.id,l[1]=s,l[2]=o,l[3]=u,l[4]=d,l[5]=c):(u=l[3],d=l[4],c=l[5]);let r;l[6]!==m||l[7]!==c?(r=async()=>await m.call("MONITORING_HEATMAP",c),l[6]=m,l[7]=c,l[8]=r):r=l[8];let g;return l[9]!==e||l[10]!==u||l[11]!==r?(g={queryKey:u,queryFn:r,staleTime:3e4,retry:!1,...e},l[9]=e,l[10]=u,l[11]=r,l[12]=g):g=l[12],d(g)}function mt(s){const e=ue.c(20),{title:l,value:i,action:m,children:o,className:u}=s;let d;e[0]!==u?(d=ot("pt-4 px-4 pb-6 gap-8",u),e[0]=u,e[1]=d):d=e[1];let c;e[2]!==l?(c=t.jsx("span",{className:"text-sm text-foreground/70",children:l}),e[2]=l,e[3]=c):c=e[3];let r;e[4]!==i?(r=t.jsx("span",{className:"text-4xl font-normal",children:i}),e[4]=i,e[5]=r):r=e[5];let g;e[6]!==c||e[7]!==r?(g=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[c,r]}),e[6]=c,e[7]=r,e[8]=g):g=e[8];let h;e[9]!==m?(h=m&&t.jsx("div",{className:"shrink-0",children:m}),e[9]=m,e[10]=h):h=e[10];let f;e[11]!==g||e[12]!==h?(f=t.jsxs("div",{className:"flex items-start justify-between",children:[g,h]}),e[11]=g,e[12]=h,e[13]=f):f=e[13];let n;e[14]!==o?(n=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=n):n=e[15];let w;return e[16]!==d||e[17]!==f||e[18]!==n?(w=t.jsxs(_s,{className:d,children:[f,n]}),e[16]=d,e[17]=f,e[18]=n,e[19]=w):w=e[19],w}function es(s){const e=ue.c(14),{metrics:l,connections:i,mode:m,total:o}=s,{org:u}=ht(),d=ns();let c,r,g;if(e[0]!==i||e[1]!==l||e[2]!==m||e[3]!==d||e[4]!==u||e[5]!==o){g=Symbol.for("react.early_return_sentinel");e:{const f=i??[],n=new Map(l.map(Bl));let w;e[9]!==m?(w=(T,j)=>{const y=Ss(T.metric,m);return Ss(j.metric,m)-y},e[9]=m,e[10]=w):w=e[10];const a=f.map(T=>({connection:T,metric:n.get(T.id)})).filter(Hl).sort(w).slice(0,4);if(a.length===0){g=null;break e}c="flex flex-col",r=a.map((T,j)=>{const{connection:y,metric:v}=T,p=o>0?(v.calls/o*100).toFixed(1):"0.0",M=m==="errors"?`${v.errorRate.toFixed(1)}%`:`${p}%`,x=j===a.length-1;return t.jsxs("div",{className:ot("flex items-center h-10 px-3 cursor-pointer hover:bg-accent transition-colors",!x&&"border-b border-border/50"),onClick:()=>d({to:"/$org/settings/connections/$appSlug",params:{org:u.slug,appSlug:Ps(y)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(Ct,{icon:y.icon,name:y.title,size:"xs",fallbackIcon:t.jsx(Ot,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:y.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:M}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:gl(v,m)})]})]},y.id)})}e[0]=i,e[1]=l,e[2]=m,e[3]=d,e[4]=u,e[5]=o,e[6]=c,e[7]=r,e[8]=g}else c=e[6],r=e[7],g=e[8];if(g!==Symbol.for("react.early_return_sentinel"))return g;let h;return e[11]!==c||e[12]!==r?(h=t.jsx("div",{className:c,children:r}),e[11]=c,e[12]=r,e[13]=h):h=e[13],h}function Hl(s){return s.metric}function Bl(s){return[s.connectionId,s]}const ks=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Ms(s){let e=0;for(let l=0;l<s.length;l++)e=e*31+s.charCodeAt(l)>>>0;return ks[e%ks.length]}function zt(s){const e=ue.c(21),{models:l,mode:i}=s,m=i===void 0?"calls":i;if(!Bt()||l.length===0)return null;let u;e[0]!==m?(u=a=>m==="tokens"?(a.inputTokens??0)+(a.outputTokens??0):m==="cost"?a.costUsd??0:a.calls,e[0]=m,e[1]=u):u=e[1];const d=u;let c;e[2]!==m?(c=a=>m==="cost"?xs(a):m==="tokens"?Nt(a):a.toLocaleString(),e[2]=m,e[3]=c):c=e[3];const r=c;let g;e[4]!==d?(g=(a,T)=>a+d(T),e[4]=d,e[5]=g):g=e[5];const h=l.reduce(g,0);let f,n;if(e[6]!==r||e[7]!==l||e[8]!==h||e[9]!==d){let a;e[12]!==d?(a=(y,v)=>d(v)-d(y),e[12]=d,e[13]=a):a=e[13];const T=[...l].sort(a).slice(0,4);f="flex flex-col";let j;e[14]!==r||e[15]!==h||e[16]!==d?(j=(y,v,p)=>{const M=d(y),x=h>0?(M/h*100).toFixed(1):"0.0",S=v===p.length-1;return t.jsxs("div",{className:ot("flex items-center h-10 px-3",!S&&"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, ${Ms(y.toolName)} 18%, transparent)`},children:t.jsx(Ot,{size:14,style:{color:Ms(y.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:y.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:[x,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:r(M)})]})]},y.toolName)},e[14]=r,e[15]=h,e[16]=d,e[17]=j):j=e[17],n=T.map(j),e[6]=r,e[7]=l,e[8]=h,e[9]=d,e[10]=f,e[11]=n}else f=e[10],n=e[11];let w;return e[18]!==f||e[19]!==n?(w=t.jsx("div",{className:f,children:n}),e[18]=f,e[19]=n,e[20]=w):w=e[20],w}const Jl=12,Gl=8;function Ql(s,e){if(s===0)return"bg-muted-foreground/10";const l=e>0?s/e:0;return l<=.15?"bg-success/25":l<=.4?"bg-success/45":l<=.7?"bg-success/70":"bg-success"}function Yl(s){const e=ue.c(35),{cells:l,virtualMcps:i,metric:m}=s,o=_e();if(l.length===0){let j;e[0]!==o?(j=o("orgs.overview.noHeatmapData"),e[0]=o,e[1]=j):j=e[1];let y;return e[2]!==j?(y=t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:j}),e[2]=j,e[3]=y):y=e[3],y}let u,d,c,r,g,h,f,n;if(e[4]!==l||e[5]!==m||e[6]!==o||e[7]!==i){const{topTools:j,topAgentIds:y,cellMap:v,maxValue:p}=hl(l,m,Jl,Gl);let M;e[16]!==o||e[17]!==i?(M=I=>I===""?o("orgs.overview.noAgent"):i.find(b=>b.id===I)?.title??I,e[16]=o,e[17]=i,e[18]=M):M=e[18];const x=M;u=Xs,n=0,f="overflow-x-auto",d="grid gap-1 min-w-max";const S=`140px repeat(${j.length}, 28px)`;e[19]!==S?(c={gridTemplateColumns:S},e[19]=S,e[20]=c):c=e[20],e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{}),e[21]=r):r=e[21],g=j.map(Wl),h=y.map(I=>t.jsxs(xe.Fragment,{children:[t.jsx("div",{className:"text-xs text-muted-foreground truncate flex items-center pr-2",title:x(I),children:x(I)}),j.map(b=>{const C=v.get(`${I}::${b}`),_=C?.[m]??0;return t.jsxs(Pt,{children:[t.jsx(Dt,{asChild:!0,children:t.jsx("div",{className:ot("aspect-square rounded-[2px]",Ql(_,p))})}),t.jsx(Rt,{children:o("orgs.overview.heatmapCellTooltip",{agent:x(I),tool:b,calls:C?.calls??0,errors:C?.errors??0,outputSize:Nt(C?.outputSize??0)})})]},b)})]},I||"none")),e[4]=l,e[5]=m,e[6]=o,e[7]=i,e[8]=u,e[9]=d,e[10]=c,e[11]=r,e[12]=g,e[13]=h,e[14]=f,e[15]=n}else u=e[8],d=e[9],c=e[10],r=e[11],g=e[12],h=e[13],f=e[14],n=e[15];let w;e[22]!==d||e[23]!==c||e[24]!==r||e[25]!==g||e[26]!==h?(w=t.jsxs("div",{className:d,style:c,children:[r,g,h]}),e[22]=d,e[23]=c,e[24]=r,e[25]=g,e[26]=h,e[27]=w):w=e[27];let a;e[28]!==f||e[29]!==w?(a=t.jsx("div",{className:f,children:w}),e[28]=f,e[29]=w,e[30]=a):a=e[30];let T;return e[31]!==u||e[32]!==n||e[33]!==a?(T=t.jsx(u,{delayDuration:n,children:a}),e[31]=u,e[32]=n,e[33]=a,e[34]=T):T=e[34],T}function Wl(s){return t.jsxs(Pt,{children:[t.jsx(Dt,{asChild:!0,children:t.jsx("div",{className:"h-[80px] flex items-end justify-center pb-1 text-2xs text-muted-foreground overflow-hidden [writing-mode:vertical-rl]",children:s})}),t.jsx(Rt,{children:s})]},s)}function Xl(s){const e=ue.c(143),{displayDateRange:l,connectionIds:i,excludeConnectionIds:m,toolName:o,status:u,connections:d,isStreaming:c,streamingRefetchInterval:r,llmUserIds:g,virtualMcpIds:h,virtualMcps:f}=s,n=_e(),w=pl(l),a=c?r:!1;let T;e[0]!==a?(T={refetchInterval:a},e[0]=a,e[1]=T):T=e[1];const{data:j,isError:y}=Kl({interval:w,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),connectionIds:i.length>0?i:void 0,excludeConnectionIds:m,toolNames:o?[o]:void 0,status:u},T);let v;e[2]!==a?(v={refetchInterval:a},e[2]=a,e[3]=v):v=e[3];const{data:p,isError:M}=Vl({interval:w,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),userIds:g?.length?g:void 0},v);let x;e[4]!==l.startDate?(x=l.startDate.toISOString(),e[4]=l.startDate,e[5]=x):x=e[5];let S;e[6]!==l.endDate?(S=l.endDate.toISOString(),e[6]=l.endDate,e[7]=S):S=e[7];let I;e[8]!==m||e[9]!==x||e[10]!==S||e[11]!==h?(I={startDate:x,endDate:S,virtualMcpIds:h,excludeConnectionIds:m},e[8]=m,e[9]=x,e[10]=S,e[11]=h,e[12]=I):I=e[12];let b;e[13]!==a?(b={refetchInterval:a},e[13]=a,e[14]=b):b=e[14];const{data:C}=ql(I,b),_=y||M,P=j?{totalCalls:j.totalCalls,totalErrors:j.totalErrors,avgDurationMs:j.avgDurationMs,p95DurationMs:j.p95DurationMs,data:ws(j.timeseries,l,w)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},k=p?{totalCalls:p.totalCalls,totalErrors:p.totalErrors,avgDurationMs:p.avgDurationMs,p95DurationMs:p.p95DurationMs,data:ws(p.timeseries,l,w)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let D;e[15]!==p?.topTools?(D=p?.topTools??[],e[15]=p?.topTools,e[16]=D):D=e[16];const L=D,U=p?.totalInputTokens??0,J=p?.totalOutputTokens??0,Q=p?.totalTokens??0,N=p?.totalCostUsd??0,O=Bt();let F;e[17]!==j?.connectionBreakdown?(F=j?.connectionBreakdown??[],e[17]=j?.connectionBreakdown,e[18]=F):F=e[18];const q=F,[$,W]=xe.useState("avg"),[K,B]=xe.useState("calls");let V;e[19]!==_||e[20]!==n?(V=_&&t.jsxs(ul,{variant:"destructive",children:[t.jsx(As,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(fl,{children:n("orgs.overview.failedToLoadTitle")}),t.jsx(xl,{children:n("orgs.overview.failedToLoadDescription")})]})]}),e[19]=_,e[20]=n,e[21]=V):V=e[21];let Y;e[22]!==n?(Y=n("orgs.overview.toolCalls"),e[22]=n,e[23]=Y):Y=e[23];const R=P.totalCalls.toLocaleString(),E=P.data;let H;e[24]!==n?(H=n("orgs.overview.toolCallsAriaLabel"),e[24]=n,e[25]=H):H=e[25];let A;e[26]!==n?(A=n("orgs.overview.toolCallHeatmap"),e[26]=n,e[27]=A):A=e[27];let Z;e[28]!==K||e[29]!==C?.cells?(Z=K==="calls"?(C?.cells??[]).reduce(er,0).toLocaleString():Nt((C?.cells??[]).reduce(Zl,0)),e[28]=K,e[29]=C?.cells,e[30]=Z):Z=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=ct=>B(ct),e[31]=ee):ee=e[31];let G;e[32]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(yt,{variant:"pill",size:"sm",className:"w-[140px]",children:t.jsx(wt,{})}),e[32]=G):G=e[32];let de;e[33]!==n?(de=n("orgs.overview.heatmapMetricCalls"),e[33]=n,e[34]=de):de=e[34];let re;e[35]!==de?(re=t.jsx($e,{value:"calls",children:de}),e[35]=de,e[36]=re):re=e[36];let ie;e[37]!==n?(ie=n("orgs.overview.heatmapMetricOutputSize"),e[37]=n,e[38]=ie):ie=e[38];let me;e[39]!==ie?(me=t.jsx($e,{value:"outputSize",children:ie}),e[39]=ie,e[40]=me):me=e[40];let te;e[41]!==re||e[42]!==me?(te=t.jsxs(St,{children:[re,me]}),e[41]=re,e[42]=me,e[43]=te):te=e[43];let oe;e[44]!==K||e[45]!==te?(oe=t.jsxs(It,{value:K,onValueChange:ee,children:[G,te]}),e[44]=K,e[45]=te,e[46]=oe):oe=e[46];let se;e[47]!==C?.cells?(se=C?.cells??[],e[47]=C?.cells,e[48]=se):se=e[48];let X;e[49]!==K||e[50]!==se||e[51]!==f?(X=t.jsx(Yl,{cells:se,virtualMcps:f,metric:K}),e[49]=K,e[50]=se,e[51]=f,e[52]=X):X=e[52];let ne;e[53]!==A||e[54]!==Z||e[55]!==oe||e[56]!==X?(ne=t.jsx(mt,{title:A,value:Z,action:oe,children:X}),e[53]=A,e[54]=Z,e[55]=oe,e[56]=X,e[57]=ne):ne=e[57];let ae;e[58]!==n?(ae=n("orgs.overview.latency"),e[58]=n,e[59]=ae):ae=e[59];const ce=Zt($==="avg"?P.avgDurationMs:P.p95DurationMs);let z;e[60]===Symbol.for("react.memo_cache_sentinel")?(z=ct=>W(ct),e[60]=z):z=e[60];let le;e[61]===Symbol.for("react.memo_cache_sentinel")?(le=t.jsx(yt,{variant:"pill",size:"sm",className:"w-[120px]",children:t.jsx(wt,{})}),e[61]=le):le=e[61];let fe;e[62]!==n?(fe=n("orgs.overview.latencyAvg"),e[62]=n,e[63]=fe):fe=e[63];let ve;e[64]!==fe?(ve=t.jsx($e,{value:"avg",children:fe}),e[64]=fe,e[65]=ve):ve=e[65];let Ge;e[66]!==n?(Ge=n("orgs.overview.latencyP95"),e[66]=n,e[67]=Ge):Ge=e[67];let Qe;e[68]!==Ge?(Qe=t.jsx($e,{value:"p95",children:Ge}),e[68]=Ge,e[69]=Qe):Qe=e[69];let Ee;e[70]!==ve||e[71]!==Qe?(Ee=t.jsxs(St,{children:[ve,Qe]}),e[70]=ve,e[71]=Qe,e[72]=Ee):Ee=e[72];let Re;e[73]!==$||e[74]!==Ee?(Re=t.jsxs(It,{value:$,onValueChange:z,children:[le,Ee]}),e[73]=$,e[74]=Ee,e[75]=Re):Re=e[75];const Le=P.data;let Oe;e[76]!==$||e[77]!==n?(Oe=n("orgs.overview.latencyAriaLabel",{type:$==="avg"?n("orgs.overview.average"):"P95"}),e[76]=$,e[77]=n,e[78]=Oe):Oe=e[78];let we;e[79]!==n?(we=n("orgs.overview.errors"),e[79]=n,e[80]=we):we=e[80];const Fe=P.totalErrors.toLocaleString(),Ye=P.data;let Se;e[81]!==n?(Se=n("orgs.overview.errorsAriaLabel"),e[81]=n,e[82]=Se):Se=e[82];let Ie;e[83]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[83]=Ie):Ie=e[83];let Ne;e[84]!==n?(Ne=n("orgs.overview.aiUsage"),e[84]=n,e[85]=Ne):Ne=e[85];let be;e[86]!==Ne?(be=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:Ne}),e[86]=Ne,e[87]=be):be=e[87];let Ce;e[88]===Symbol.for("react.memo_cache_sentinel")?(Ce=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[88]=Ce):Ce=e[88];let Te;e[89]!==be?(Te=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[Ie,be,Ce]}),e[89]=be,e[90]=Te):Te=e[90];let ke;e[91]!==n?(ke=n("orgs.overview.aiCalls"),e[91]=n,e[92]=ke):ke=e[92];const ze=k.totalCalls.toLocaleString(),Ae=k.data;let ge;e[93]!==n?(ge=n("orgs.overview.aiCallsAriaLabel"),e[93]=n,e[94]=ge):ge=e[94];let pe;e[95]!==L?(pe=t.jsx(zt,{models:L,mode:"calls"}),e[95]=L,e[96]=pe):pe=e[96];let ye;e[97]!==n?(ye=n("orgs.overview.tokens"),e[97]=n,e[98]=ye):ye=e[98];let Pe;e[99]!==Q?(Pe=Nt(Q),e[99]=Q,e[100]=Pe):Pe=e[100];let Me;e[101]!==U?(Me=Nt(U),e[101]=U,e[102]=Me):Me=e[102];let Ue;e[103]!==n?(Ue=n("orgs.overview.tokensIn"),e[103]=n,e[104]=Ue):Ue=e[104];let Ke;e[105]!==J?(Ke=Nt(J),e[105]=J,e[106]=Ke):Ke=e[106];let Ve;e[107]!==n?(Ve=n("orgs.overview.tokensOut"),e[107]=n,e[108]=Ve):Ve=e[108];let We;e[109]!==Me||e[110]!==Ue||e[111]!==Ke||e[112]!==Ve?(We=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[Me," ",Ue," ·"," ",Ke," ",Ve]}),e[109]=Me,e[110]=Ue,e[111]=Ke,e[112]=Ve,e[113]=We):We=e[113];const ut=k.data;let Xe;e[114]!==n?(Xe=n("orgs.overview.tokensAriaLabel"),e[114]=n,e[115]=Xe):Xe=e[115];let Ze;e[116]!==L?(Ze=t.jsx(zt,{models:L,mode:"tokens"}),e[116]=L,e[117]=Ze):Ze=e[117];let et;e[118]!==n?(et=n("orgs.overview.aiLatency"),e[118]=n,e[119]=et):et=e[119];const ft=Zt(k.avgDurationMs);let tt;e[120]!==n?(tt=n("orgs.overview.p95Prefix"),e[120]=n,e[121]=tt):tt=e[121];const xt=k.data;let st;e[122]!==n?(st=n("orgs.overview.aiLatencyAriaLabel"),e[122]=n,e[123]=st):st=e[123];let lt;e[124]!==L?(lt=t.jsx(zt,{models:L,mode:"calls"}),e[124]=L,e[125]=lt):lt=e[125];const nt=mt;let qe;e[126]!==n?(qe=n("orgs.overview.aiErrors"),e[126]=n,e[127]=qe):qe=e[127];const at=k.totalErrors.toLocaleString(),pt=k.data;let He;e[128]!==n?(He=n("orgs.overview.aiErrorsAriaLabel"),e[128]=n,e[129]=He):He=e[129];let Be;e[130]!==k.data||e[131]!==He?(Be=t.jsx(gt,{data:pt,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:He}),e[130]=k.data,e[131]=He,e[132]=Be):Be=e[132];let Je;e[133]!==L||e[134]!==k.totalErrors||e[135]!==n?(Je=k.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:n("orgs.overview.noAiErrors")}):t.jsx(zt,{models:L,mode:"calls"}),e[133]=L,e[134]=k.totalErrors,e[135]=n,e[136]=Je):Je=e[136];let rt;return e[137]!==nt||e[138]!==qe||e[139]!==at||e[140]!==Be||e[141]!==Je?(rt=t.jsxs(nt,{title:qe,value:at,children:[Be,Je]}),e[137]=nt,e[138]=qe,e[139]=at,e[140]=Be,e[141]=Je,e[142]=rt):rt=e[142],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-8 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[V,t.jsxs(mt,{title:Y,value:R,children:[t.jsx(gt,{data:E,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:H}),t.jsx(es,{metrics:q,connections:d,mode:"requests",total:P.totalCalls})]}),ne,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:ae,value:ce,action:Re,children:[t.jsx(gt,{data:Le,dataKey:$,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Oe}),t.jsx(es,{metrics:q,connections:d,mode:"latency",total:P.totalCalls})]}),t.jsxs(mt,{title:we,value:Fe,children:[t.jsx(gt,{data:Ye,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Se}),P.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:n("orgs.overview.noErrors")}):t.jsx(es,{metrics:q,connections:d,mode:"errors",total:P.totalErrors})]})]}),Te,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(mt,{title:ke,value:ze,children:[t.jsx(gt,{data:Ae,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:ge}),pe]}),t.jsxs(mt,{title:ye,value:Pe,action:We,children:[t.jsx(gt,{data:ut,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Xe}),Ze]}),O?t.jsxs(mt,{title:n("orgs.overview.cost"),value:N>0?xs(N):"—",action:N===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:n("orgs.overview.noCostData")}):void 0,children:[t.jsx(gt,{data:k.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:n("orgs.overview.costAriaLabel")}),N>0?t.jsx(zt,{models:L,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:n("orgs.overview.costProvidersNotice")})]}):null]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:et,value:ft,action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:[tt,Zt(k.p95DurationMs)]}),children:[t.jsx(gt,{data:xt,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:st}),lt]}),rt]})]})}function Zl(s,e){return s+e.outputSize}function er(s,e){return s+e.calls}function Mt(s){const e=ue.c(8),{className:l}=s;let i;e[0]!==l?(i=ot("pt-4 px-4 pb-6 gap-8",l),e[0]=l,e[1]=i):i=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=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]=m):m=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 u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=Array.from({length:4}).map(tr),e[4]=u):u=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsxs("div",{className:"flex flex-col gap-6",children:[o,t.jsxs("div",{className:"flex flex-col",children:[u,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]=d):d=e[5];let c;return e[6]!==i?(c=t.jsxs(_s,{className:i,children:[m,d]}),e[6]=i,e[7]=c):c=e[7],c}function tr(s,e){return t.jsxs("div",{className:ot("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 sr(){const s=ue.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Mt,{}),s[0]=e):e=s[0];let l,i;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Mt,{}),t.jsx(Mt,{})]}),i=t.jsx("div",{className:"border-t border-border"}),s[1]=l,s[2]=i):(l=s[1],i=s[2]);let m;return s[3]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-8 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,l,i,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Mt,{}),t.jsx(Mt,{}),t.jsx(Mt,{})]})]}),s[3]=m):m=s[3],m}function lr(s){const e=ue.c(49),{log:l,connection:i,virtualMcpName:m,virtualMcpIcon:o,onClick:u,lastLogRef:d}=s,c=_e();let r,g;if(e[0]!==l.timestamp){const L=new Date(l.timestamp);r=L.toLocaleDateString("en-US",{month:"short",day:"numeric"}),g=L.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=l.timestamp,e[1]=r,e[2]=g}else r=e[1],g=e[2];const h=g,f=i?.icon||null,n=i?.title??l.connectionId;let w;e[3]!==f||e[4]!==n?(w=t.jsx(De,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(Ct,{icon:f,name:n,size:"xs",className:"shadow-edge"})})}),e[3]=f,e[4]=n,e[5]=w):w=e[5];let a;e[6]!==l.toolName?(a=t.jsx("div",{className:"font-medium text-foreground truncate block",children:l.toolName}),e[6]=l.toolName,e[7]=a):a=e[7];const T=i?.title??l.connectionId;let j;e[8]!==T?(j=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:T}),e[8]=T,e[9]=j):j=e[9];let y;e[10]!==a||e[11]!==j?(y=t.jsxs(De,{className:"min-w-0 pr-2 md:pr-4",children:[a,j]}),e[10]=a,e[11]=j,e[12]=y):y=e[12];let v;e[13]!==o||e[14]!==m?(v=t.jsx(De,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:m?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(Ct,{icon:o,name:m,size:"xs",fallbackIcon:t.jsx(Ot,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:m})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=m,e[15]=v):v=e[15];let p;e[16]!==l.userImage||e[17]!==l.userName?(p=t.jsx(cs,{url:l.userImage,fallback:l.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=l.userImage,e[17]=l.userName,e[18]=p):p=e[18];let M;e[19]!==l.userName?(M=t.jsx("span",{className:"truncate",children:l.userName}),e[19]=l.userName,e[20]=M):M=e[20];let x;e[21]!==p||e[22]!==M?(x=t.jsx(De,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p,M]})}),e[21]=p,e[22]=M,e[23]=x):x=e[23];let S;e[24]!==r?(S=t.jsx("div",{children:r}),e[24]=r,e[25]=S):S=e[25];let I;e[26]!==h?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:h}),e[26]=h,e[27]=I):I=e[27];let b;e[28]!==S||e[29]!==I?(b=t.jsxs(De,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[S,I]}),e[28]=S,e[29]=I,e[30]=b):b=e[30];let C;e[31]!==l.durationMs?(C=t.jsxs(De,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[l.durationMs,"ms"]}),e[31]=l.durationMs,e[32]=C):C=e[32];const _=l.isError?"destructive":"success";let P;e[33]!==l.isError||e[34]!==c?(P=l.isError?c("monitoring.logRow.statusError"):c("monitoring.logRow.statusOk"),e[33]=l.isError,e[34]=c,e[35]=P):P=e[35];let k;e[36]!==_||e[37]!==P?(k=t.jsx(De,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(Lt,{variant:_,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:P})})}),e[36]=_,e[37]=P,e[38]=k):k=e[38];let D;return e[39]!==d||e[40]!==u||e[41]!==x||e[42]!==b||e[43]!==C||e[44]!==k||e[45]!==w||e[46]!==y||e[47]!==v?(D=t.jsxs(vt,{ref:d,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-accent border-b-0",onClick:u,children:[w,y,v,x,b,C,k]}),e[39]=d,e[40]=u,e[41]=x,e[42]=b,e[43]=C,e[44]=k,e[45]=w,e[46]=y,e[47]=v,e[48]=D):D=e[48],D}function rr(s){const e=ue.c(79),{connectionIds:l,virtualMcpIds:i,tool:m,status:o,search:u,logs:d,hasMore:c,onLoadMore:r,isLoadingMore:g,connections:h,virtualMcps:f,membersData:n,client:w}=s,a=_e(),T=h??[],j=f??[],y=Fs(r,c,g),v=ps(n),p=new Map(v.map(nr)),M=new Map(j.map(or));let S=d.map(z=>{const le=p.get(z.userId??""),fe=z.virtualMcpId?M.get(z.virtualMcpId):null;return{...z,userName:le?.name??z.userId??"Unknown",userImage:le?.image??void 0,virtualMcpName:fe?.title??null,virtualMcpIcon:fe?.icon??null}});if(l.length>1){let z;e[0]!==l?(z=le=>l.includes(le.connectionId),e[0]=l,e[1]=z):z=e[1],S=S.filter(z)}if(i.length>1){let z;e[2]!==i?(z=le=>le.virtualMcpId&&i.includes(le.virtualMcpId),e[2]=i,e[3]=z):z=e[3],S=S.filter(z)}const I=new Map(T.map(ir));if(u){const z=u.toLowerCase();S=S.filter(le=>le.toolName.toLowerCase().includes(z)||(I.get(le.connectionId)?.title??le.connectionId).toLowerCase().includes(z)||le.errorMessage?.toLowerCase().includes(z))}const b=Os(S),C=b.selected;let _;e[4]!==C?.id?(_=bt.monitoringLogDetail(C?.id??""),e[4]=C?.id,e[5]=_):_=e[5];let P;e[6]!==w||e[7]!==C?(P=async()=>{if(!w)throw new Error("MCP client is not available");const z=await w.callTool({name:"MONITORING_LOG_GET",arguments:{id:C.id}});return z.structuredContent??z},e[6]=w,e[7]=C,e[8]=P):P=e[8];const k=C!==null;let D;e[9]!==_||e[10]!==P||e[11]!==k?(D={queryKey:_,queryFn:P,enabled:k},e[9]=_,e[10]=P,e[11]=k,e[12]=D):D=e[12];const L=Et(D),U=L.data?.log;let J;e[13]!==U||e[14]!==C?(J=C&&U?{...C,input:U.input,output:U.output}:C,e[13]=U,e[14]=C,e[15]=J):J=e[15];const Q=J;if(S.length===0){let z;e[16]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[16]=z):z=e[16];let le;e[17]!==a?(le=a("orgs.audit.noLogsFound"),e[17]=a,e[18]=le):le=e[18];let fe;e[19]!==l.length||e[20]!==u||e[21]!==o||e[22]!==a||e[23]!==m||e[24]!==i.length?(fe=u||l.length>0||i.length>0||m||o!=="all"?a("orgs.audit.noLogsMatchFilters"):a("orgs.audit.noLogsInTimeRange"),e[19]=l.length,e[20]=u,e[21]=o,e[22]=a,e[23]=m,e[24]=i.length,e[25]=fe):fe=e[25];let ve;return e[26]!==le||e[27]!==fe?(ve=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ht,{image:z,title:le,description:fe})}),e[26]=le,e[27]=fe,e[28]=ve):ve=e[28],ve}const N="flex-1 flex flex-col min-w-0",O="flex-1 min-w-0 pt-1",F="min-w-[600px] md:min-w-0",q=Gt,$="w-full border-collapse";let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(he,{className:"w-5"}),e[29]=W):W=e[29];let K;e[30]!==a?(K=a("orgs.audit.toolConnection"),e[30]=a,e[31]=K):K=e[31];let B;e[32]!==K?(B=t.jsx(he,{className:"pr-2 md:pr-4 font-normal text-meta",children:K}),e[32]=K,e[33]=B):B=e[33];let V;e[34]!==a?(V=a("orgs.audit.agent"),e[34]=a,e[35]=V):V=e[35];let Y;e[36]!==V?(Y=t.jsx(he,{className:"w-36 md:w-44 px-2 md:px-3 font-normal text-meta",children:V}),e[36]=V,e[37]=Y):Y=e[37];let R;e[38]!==a?(R=a("orgs.audit.user"),e[38]=a,e[39]=R):R=e[39];let E;e[40]!==R?(E=t.jsx(he,{className:"w-28 md:w-36 px-2 md:px-3 font-normal text-meta",children:R}),e[40]=R,e[41]=E):E=e[41];let H;e[42]!==a?(H=a("orgs.audit.date"),e[42]=a,e[43]=H):H=e[43];let A;e[44]!==H?(A=t.jsx(he,{className:"w-32 md:w-40 px-2 md:px-3 font-normal text-meta",children:H}),e[44]=H,e[45]=A):A=e[45];let Z;e[46]!==a?(Z=a("orgs.audit.latency"),e[46]=a,e[47]=Z):Z=e[47];let ee;e[48]!==Z?(ee=t.jsx(he,{className:"w-16 md:w-20 px-2 md:px-3 font-normal text-meta",children:Z}),e[48]=Z,e[49]=ee):ee=e[49];let G;e[50]!==a?(G=a("orgs.audit.status"),e[50]=a,e[51]=G):G=e[51];let de;e[52]!==G?(de=t.jsx(he,{className:"w-16 md:w-24 px-2 md:px-3 font-normal text-meta text-right pr-3 md:pr-5",children:G}),e[52]=G,e[53]=de):de=e[53];let re;e[54]!==B||e[55]!==Y||e[56]!==E||e[57]!==A||e[58]!==ee||e[59]!==de?(re=t.jsx(Qt,{className:"border-b-0 z-20",children:t.jsxs(vt,{className:"h-9 hover:bg-transparent border-b border-border",children:[W,B,Y,E,A,ee,de]})}),e[54]=B,e[55]=Y,e[56]=E,e[57]=A,e[58]=ee,e[59]=de,e[60]=re):re=e[60];const ie=Jt,me=S.map((z,le)=>t.jsx(lr,{log:z,connection:I.get(z.connectionId),virtualMcpName:z.virtualMcpName??"",virtualMcpIcon:z.virtualMcpIcon,onClick:()=>b.select(z.id),lastLogRef:le===S.length-1?y:void 0},z.id));let te;e[61]!==ie||e[62]!==me?(te=t.jsx(ie,{children:me}),e[61]=ie,e[62]=me,e[63]=te):te=e[63];let oe;e[64]!==q||e[65]!==re||e[66]!==te?(oe=t.jsx("div",{className:O,children:t.jsx("div",{className:F,children:t.jsxs(q,{className:$,children:[re,te]})})}),e[64]=q,e[65]=re,e[66]=te,e[67]=oe):oe=e[67];let se;e[68]!==b?(se=z=>{z||b.close()},e[68]=b,e[69]=se):se=e[69];const X=C&&t.jsxs(t.Fragment,{children:[t.jsx(wl,{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(Ct,{icon:I.get(C.connectionId)?.icon||null,name:I.get(C.connectionId)?.title??C.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Sl,{className:"text-sm leading-snug truncate",children:C.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:I.get(C.connectionId)?.title??C.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(je,{size:"icon-sm",variant:"ghost",onClick:b.prev,disabled:b.index===0,className:"text-muted-foreground","aria-label":a("orgs.audit.previousEntry"),children:t.jsx(ls,{size:14})}),t.jsx(je,{size:"icon-sm",variant:"ghost",onClick:b.next,disabled:b.index===S.length-1,className:"text-muted-foreground","aria-label":a("orgs.audit.nextEntry"),children:t.jsx(ss,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:L.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx(Us,{className:"size-5 text-muted-foreground"})}):L.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:a("orgs.audit.failedLoadLogDetails")}),t.jsx(je,{variant:"outline",size:"sm",onClick:()=>L.refetch(),children:a("orgs.audit.retry")})]}):t.jsx(Al,{log:Q})})]});let ne;e[70]!==X?(ne=t.jsx(Ls,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:X}),e[70]=X,e[71]=ne):ne=e[71];let ae;e[72]!==b.isOpen||e[73]!==se||e[74]!==ne?(ae=t.jsx(Rs,{open:b.isOpen,onOpenChange:se,children:ne}),e[72]=b.isOpen,e[73]=se,e[74]=ne,e[75]=ae):ae=e[75];let ce;return e[76]!==oe||e[77]!==ae?(ce=t.jsxs("div",{className:N,children:[oe,ae]}),e[76]=oe,e[77]=ae,e[78]=ce):ce=e[78],ce}function ir(s){return[s.id,s]}function or(s){return[s.id,s]}function nr(s){return[s.userId,s.user]}function ar(){const s=ue.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(he,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(he,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=l):l=s[1];let i;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(he,{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]=i):i=s[2];let m;s[3]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{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]=m):m=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{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 u;s[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(he,{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]=u):u=s[5];let d;s[6]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Qt,{className:"border-b-0 z-20",children:t.jsxs(vt,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,l,i,m,o,u,t.jsx(he,{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]=d):d=s[6];let c;return s[7]===Symbol.for("react.memo_cache_sentinel")?(c=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-8 flex flex-col flex-1 min-h-0",children:t.jsxs(Gt,{className:"w-full border-collapse",children:[d,t.jsx(Jt,{children:Array.from({length:8}).map(cr)})]})})}),s[7]=c):c=s[7],c}function cr(s,e){return t.jsxs(vt,{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 qt=Object.assign(rr,{Skeleton:ar});function dr(s){const e=ue.c(34),{client:l,locator:i,baseParams:m,pageSize:o,isStreaming:u,streamingRefetchInterval:d,connectionIds:c,virtualMcpIds:r,tool:g,status:h,searchQuery:f,allConnections:n,allVirtualMcps:w,membersData:a}=s;let T;e[0]!==m||e[1]!==i?(T=bt.monitoringLogsInfinite(i,JSON.stringify(m)),e[0]=m,e[1]=i,e[2]=T):T=e[2];let j;e[3]!==m||e[4]!==l||e[5]!==o?(j=async L=>{const{pageParam:U}=L,J=U===void 0?0:U;if(!l)throw new Error("MCP client is not available");const Q=await l.callTool({name:"MONITORING_LOGS_LIST",arguments:{...m,limit:o,offset:J}});return Q.structuredContent??Q},e[3]=m,e[4]=l,e[5]=o,e[6]=j):j=e[6];let y;e[7]!==o?(y=(L,U)=>{if(!((L?.logs?.length??0)<o))return U.length*o},e[7]=o,e[8]=y):y=e[8];const v=u?d:!1;let p;e[9]!==T||e[10]!==j||e[11]!==y||e[12]!==v?(p={queryKey:T,queryFn:j,initialPageParam:0,getNextPageParam:y,staleTime:0,refetchInterval:v},e[9]=T,e[10]=j,e[11]=y,e[12]=v,e[13]=p):p=e[13];const{data:M,fetchNextPage:x,hasNextPage:S,isFetchingNextPage:I}=yl(p);let b;e[14]!==M.pages?(b=M.pages.flatMap(mr),e[14]=M.pages,e[15]=b):b=e[15];const C=b;let _;e[16]!==x||e[17]!==S||e[18]!==I?(_=()=>{S&&!I&&x()},e[16]=x,e[17]=S,e[18]=I,e[19]=_):_=e[19];const P=_,k=S??!1;let D;return e[20]!==n||e[21]!==w||e[22]!==l||e[23]!==c||e[24]!==P||e[25]!==I||e[26]!==a||e[27]!==C||e[28]!==f||e[29]!==h||e[30]!==k||e[31]!==g||e[32]!==r?(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-8 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(qt,{connectionIds:c,virtualMcpIds:r,tool:g,status:h,search:f,logs:C,hasMore:k,onLoadMore:P,isLoadingMore:I,connections:n,virtualMcps:w,membersData:a,client:l})})})}),e[20]=n,e[21]=w,e[22]=l,e[23]=c,e[24]=P,e[25]=I,e[26]=a,e[27]=C,e[28]=f,e[29]=h,e[30]=k,e[31]=g,e[32]=r,e[33]=D):D=e[33],D}function mr(s){return s.logs??[]}function ur(s){const e=ue.c(95),{thread:l,usage:i,members:m,connections:o,virtualMcps:u,onClick:d,lastRowRef:c}=s,r=_e(),g=Bt();let h,f;if(e[0]!==o||e[1]!==l||e[2]!==u){const R=jl(l);h=Nl(R,u,o,"—"),f=bl(R,u,o),e[0]=o,e[1]=l,e[2]=u,e[3]=h,e[4]=f}else h=e[3],f=e[4];const n=f;let w;if(e[5]!==m||e[6]!==l.created_by){const R=ps(m);let E;e[8]!==l.created_by?(E=H=>H.userId===l.created_by,e[8]=l.created_by,e[9]=E):E=e[9],w=R.find(E),e[5]=m,e[6]=l.created_by,e[7]=w}else w=e[7];const a=w;let T;e[10]!==a?.user.email||e[11]!==a?.user.name||e[12]!==l.created_by?(T=a?.user.name??a?.user.email??l.created_by?.substring(0,8)??"—",e[10]=a?.user.email,e[11]=a?.user.name,e[12]=l.created_by,e[13]=T):T=e[13];const j=T,y=a?.user.image??void 0;let v,p;if(e[14]!==l.created_at){const R=new Date(l.created_at);v=R.toLocaleDateString("en-US",{month:"short",day:"numeric"}),p=R.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),e[14]=l.created_at,e[15]=v,e[16]=p}else v=e[15],p=e[16];const M=p;let x,S,I,b,C,_,P,k,D,L,U,J,Q;if(e[17]!==n||e[18]!==h||e[19]!==c||e[20]!==d||e[21]!==r||e[22]!==l.status||e[23]!==l.title||e[24]!==y||e[25]!==j){const R=Cl(l.status),E=R.icon;S=vt,I=c,b="h-14 md:h-16 cursor-pointer hover:bg-accent transition-colors border-b-0",C=d,e[39]!==l.title?(_=t.jsx(De,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:t.jsx("div",{className:"font-medium text-foreground truncate",children:l.title})}),e[39]=l.title,e[40]=_):_=e[40];let H;e[41]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ot,{}),e[41]=H):H=e[41];let A;e[42]!==n||e[43]!==h?(A=t.jsx(Ct,{icon:n,name:h,size:"xs",fallbackIcon:H,className:"shrink-0 size-5! min-w-5! rounded-md"}),e[42]=n,e[43]=h,e[44]=A):A=e[44];let Z;e[45]!==h?(Z=t.jsx("span",{className:"truncate",children:h}),e[45]=h,e[46]=Z):Z=e[46],e[47]!==A||e[48]!==Z?(P=t.jsx(De,{className:"w-36 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[A,Z]})}),e[47]=A,e[48]=Z,e[49]=P):P=e[49];let ee;e[50]!==y||e[51]!==j?(ee=t.jsx(cs,{url:y,fallback:j,shape:"circle",size:"2xs",className:"shrink-0"}),e[50]=y,e[51]=j,e[52]=ee):ee=e[52];let G;e[53]!==j?(G=t.jsx("span",{className:"truncate",children:j}),e[53]=j,e[54]=G):G=e[54],e[55]!==ee||e[56]!==G?(k=t.jsx(De,{className:"w-28 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[ee,G]})}),e[55]=ee,e[56]=G,e[57]=k):k=e[57],x=De,Q="w-24 px-3",U="flex items-center gap-1.5",J=t.jsx(E,{size:14,className:R.iconClassName}),D=ot("text-sm",R.labelColor),L=r(R.labelKey),e[17]=n,e[18]=h,e[19]=c,e[20]=d,e[21]=r,e[22]=l.status,e[23]=l.title,e[24]=y,e[25]=j,e[26]=x,e[27]=S,e[28]=I,e[29]=b,e[30]=C,e[31]=_,e[32]=P,e[33]=k,e[34]=D,e[35]=L,e[36]=U,e[37]=J,e[38]=Q}else x=e[26],S=e[27],I=e[28],b=e[29],C=e[30],_=e[31],P=e[32],k=e[33],D=e[34],L=e[35],U=e[36],J=e[37],Q=e[38];let N;e[58]!==D||e[59]!==L?(N=t.jsx("span",{className:D,children:L}),e[58]=D,e[59]=L,e[60]=N):N=e[60];let O;e[61]!==N||e[62]!==U||e[63]!==J?(O=t.jsxs("div",{className:U,children:[J,N]}),e[61]=N,e[62]=U,e[63]=J,e[64]=O):O=e[64];let F;e[65]!==x||e[66]!==O||e[67]!==Q?(F=t.jsx(x,{className:Q,children:O}),e[65]=x,e[66]=O,e[67]=Q,e[68]=F):F=e[68];let q;e[69]!==i?(q=i?Nt(i.totalTokens):"—",e[69]=i,e[70]=q):q=e[70];let $;e[71]!==q?($=t.jsx(De,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:q}),e[71]=q,e[72]=$):$=e[72];let W;e[73]!==g||e[74]!==i?(W=g&&t.jsx(De,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:i&&i.costUsd>0?xs(i.costUsd):"—"}),e[73]=g,e[74]=i,e[75]=W):W=e[75];let K;e[76]!==v?(K=t.jsx("div",{children:v}),e[76]=v,e[77]=K):K=e[77];let B;e[78]!==M?(B=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:M}),e[78]=M,e[79]=B):B=e[79];let V;e[80]!==K||e[81]!==B?(V=t.jsxs(De,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[K,B]}),e[80]=K,e[81]=B,e[82]=V):V=e[82];let Y;return e[83]!==S||e[84]!==I||e[85]!==b||e[86]!==C||e[87]!==_||e[88]!==P||e[89]!==k||e[90]!==F||e[91]!==$||e[92]!==W||e[93]!==V?(Y=t.jsxs(S,{ref:I,className:b,onClick:C,children:[_,P,k,F,$,W,V]}),e[83]=S,e[84]=I,e[85]=b,e[86]=C,e[87]=_,e[88]=P,e[89]=k,e[90]=F,e[91]=$,e[92]=W,e[93]=V,e[94]=Y):Y=e[94],Y}function fr(){const s=ue.c(4),e=_e();let l;s[0]!==e?(l=e("orgs.threads.loading"),s[0]=e,s[1]=l):l=s[1];let i;return s[2]!==l?(i=t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx("span",{className:"text-sm text-muted-foreground",children:l})}),s[2]=l,s[3]=i):i=s[3],i}function xr(s){const e=ue.c(9),{hasActiveFilters:l,t:i}=s,m=l?"orgs.threads.noMatchingChats":"orgs.threads.noChatsInTimeRange";let o;e[0]!==i||e[1]!==m?(o=i(m),e[0]=i,e[1]=m,e[2]=o):o=e[2];const u=l?"orgs.threads.tryAdjustingFilters":"orgs.threads.tryExpandingTimeRange";let d;e[3]!==i||e[4]!==u?(d=i(u),e[3]=i,e[4]=u,e[5]=d):d=e[5];let c;return e[6]!==o||e[7]!==d?(c=t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx(Ht,{title:o,description:d})}),e[6]=o,e[7]=d,e[8]=c):c=e[8],c}function pr(){const s=ue.c(4),e=_e();let l;s[0]!==e?(l=e("orgs.threads.loadingMore"),s[0]=e,s[1]=l):l=s[1];let i;return s[2]!==l?(i=t.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:l}),s[2]=l,s[3]=i):i=s[3],i}const is=50;function gr(s){const e=ue.c(25),{client:l,locator:i,membersData:m,allConnections:o,allVirtualMcps:u,dateRange:d,searchQuery:c,filterAgentIds:r,filterUserIds:g,filterStatus:h,filterSource:f}=s,n=_e(),w=Bt(),a=d.startDate.toISOString(),T=d.endDate.toISOString(),j=JSON.stringify({startDate:a,endDate:T,search:c,agentIds:r,userIds:g,status:h,source:f}),{data:y,fetchNextPage:v,hasNextPage:p,isFetchingNextPage:M,isLoading:x}=Il({queryKey:bt.threadsInfinite(i,j),queryFn:async R=>{const{pageParam:E}=R,H=E===void 0?0:E;if(!l)throw new Error("MCP client is not available");const A=await l.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:is,offset:H,startDate:a,endDate:T,...c?{search:c}:{},...r&&r.length>0?{agentId:r[0]}:{},...g&&g.length>0?{userId:g[0]}:{},...h&&h!=="all"?{status:h}:{},...f&&f!=="all"?{source:f}:{}}});return A.structuredContent??A},initialPageParam:0,getNextPageParam:br,staleTime:3e4}),S=(y?.pages??[]).flatMap(Nr),I=S.map(jr),{data:b}=Et({queryKey:bt.monitoringThreadUsage(i,JSON.stringify({ids:I,startDate:a,endDate:T})),queryFn:async()=>{if(!l)throw new Error("MCP client is not available");const R=await l.callTool({name:"MONITORING_THREAD_USAGE",arguments:{threadIds:I,startDate:a,endDate:T}});return R.structuredContent??R},enabled:!!l&&I.length>0,staleTime:3e4}),C=new Map((b?.items??[]).map(vr)),[_,P]=xe.useState(null),[k,D]=xe.useState("desc");let L;e[0]!==_?(L=R=>{_===R?D(hr):(P(R),D("desc"))},e[0]=_,e[1]=L):L=e[1];const U=L,J=R=>{const E=C.get(R);return E?_==="cost"?E.costUsd:E.totalTokens:0},Q=_?[...S].sort((R,E)=>{const H=J(R.id),A=J(E.id);return k==="desc"?A-H:H-A}):S,N=Os(Q),O=N.selected;let F;e[2]!==v||e[3]!==p||e[4]!==M?(F=()=>{p&&!M&&v()},e[2]=v,e[3]=p,e[4]=M,e[5]=F):F=e[5];const $=Fs(F,p??!1,M),W=!!c||(r?.length??0)>0||(g?.length??0)>0||!!(h&&h!=="all")||!!(f&&f!=="all");let K;e[6]!==N?(K=R=>{R||N.close()},e[6]=N,e[7]=K):K=e[7];let B;e[8]!==o||e[9]!==u||e[10]!==l||e[11]!==Q||e[12]!==i||e[13]!==m||e[14]!==O||e[15]!==N.index||e[16]!==N.next||e[17]!==N.prev?(B=O&&t.jsx(vl,{thread:O,client:l,locator:i,connections:o,virtualMcps:u,members:m,nav:{index:N.index,total:Q.length,onPrev:N.prev,onNext:N.next}}),e[8]=o,e[9]=u,e[10]=l,e[11]=Q,e[12]=i,e[13]=m,e[14]=O,e[15]=N.index,e[16]=N.next,e[17]=N.prev,e[18]=B):B=e[18];let V;e[19]!==B?(V=t.jsx(Ls,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:B}),e[19]=B,e[20]=V):V=e[20];let Y;return e[21]!==N.isOpen||e[22]!==K||e[23]!==V?(Y=t.jsx(Rs,{open:N.isOpen,onOpenChange:K,children:V}),e[21]=N.isOpen,e[22]=K,e[23]=V,e[24]=Y):Y=e[24],t.jsxs("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-8 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx("div",{className:"flex-1 min-w-0 pt-1",children:t.jsx("div",{className:"min-w-0",children:x?t.jsx(fr,{}):S.length===0?t.jsx(xr,{hasActiveFilters:W,t:n}):t.jsxs(t.Fragment,{children:[t.jsxs(Gt,{className:"w-full border-collapse",children:[t.jsx(Qt,{className:"border-b-0 z-20",children:t.jsxs(vt,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(he,{className:"pl-4 font-normal text-meta",children:n("orgs.threads.title")}),t.jsx(he,{className:"w-36 px-3 font-normal text-meta",children:n("orgs.threads.agent")}),t.jsx(he,{className:"w-28 px-3 font-normal text-meta",children:n("orgs.threads.user")}),t.jsx(he,{className:"w-24 px-3 font-normal text-meta",children:n("orgs.threads.status")}),t.jsx(he,{className:"w-24 px-3 font-normal text-meta text-right",children:t.jsxs("button",{type:"button",onClick:()=>U("tokens"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors",children:[n("orgs.threads.tokens"),_==="tokens"&&(k==="desc"?t.jsx(ss,{size:12}):t.jsx(ls,{size:12}))]})}),w&&t.jsx(he,{className:"w-24 px-3 font-normal text-meta text-right",children:t.jsxs("button",{type:"button",onClick:()=>U("cost"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors",children:[n("orgs.threads.cost"),_==="cost"&&(k==="desc"?t.jsx(ss,{size:12}):t.jsx(ls,{size:12}))]})}),t.jsx(he,{className:"w-32 px-3 pr-5 font-normal text-meta",children:n("orgs.threads.date")})]})}),t.jsx(Jt,{children:Q.map((R,E)=>t.jsx(ur,{thread:R,usage:C.get(R.id),members:m,connections:o,virtualMcps:u,onClick:()=>N.select(R.id),lastRowRef:E===Q.length-1?$:void 0},R.id))})]}),M&&t.jsx(pr,{})]})})})})}),Y]})}function hr(s){return s==="desc"?"asc":"desc"}function vr(s){return[s.threadId,{calls:s.calls,inputTokens:s.inputTokens,outputTokens:s.outputTokens,totalTokens:s.totalTokens,costUsd:s.costUsd}]}function jr(s){return s.id}function Nr(s){return s.items??[]}function br(s,e){const l=s,i=e;if(!((l?.items?.length??0)<is))return i.length*is}function yr(s){const e=ue.c(123),{filterAgentIds:l,filterUserIds:i,filterStatus:m,filterSource:o,virtualMcpOptions:u,memberOptions:d,activeFiltersCount:c,onUpdateFilters:r}=s,[g,h]=xe.useState(!1),f=_e();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(fs,{size:16}),e[0]=n):n=e[0];let w;e[1]!==f?(w=f("orgs.threadsFiltersPopover.filters"),e[1]=f,e[2]=w):w=e[2];let a;e[3]!==w?(a=t.jsx("span",{className:"hidden sm:inline",children:w}),e[3]=w,e[4]=a):a=e[4];let T;e[5]!==c?(T=c>0&&t.jsxs(t.Fragment,{children:[t.jsx(Lt,{variant:"default",size:"sm",className:"sm:hidden absolute -top-1.5 -right-1.5 min-w-4 leading-none",children:c}),t.jsx(Lt,{variant:"default",size:"icon",className:"hidden sm:flex ml-1",children:c})]}),e[5]=c,e[6]=T):T=e[6];let j;e[7]!==a||e[8]!==T?(j=t.jsx(ms,{asChild:!0,children:t.jsxs(je,{variant:"outline",className:"relative",children:[n,a,T]})}),e[7]=a,e[8]=T,e[9]=j):j=e[9];let y;e[10]!==f?(y=f("orgs.threadsFiltersPopover.filterChats"),e[10]=f,e[11]=y):y=e[11];let v;e[12]!==y?(v=t.jsx("h4",{className:"font-medium text-sm",children:y}),e[12]=y,e[13]=v):v=e[13];let p;e[14]!==f?(p=f("orgs.threadsFiltersPopover.agent"),e[14]=f,e[15]=p):p=e[15];let M;e[16]!==p?(M=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:p}),e[16]=p,e[17]=M):M=e[17];let x;e[18]!==r?(x=ce=>r({filterAgentIds:ce.slice(0,1)}),e[18]=r,e[19]=x):x=e[19];let S;e[20]!==f?(S=f("orgs.threadsFiltersPopover.allAgents"),e[20]=f,e[21]=S):S=e[21];let I;e[22]!==l||e[23]!==x||e[24]!==S||e[25]!==u?(I=t.jsx($t,{options:u,defaultValue:l,onValueChange:x,placeholder:S,className:"w-full",maxCount:1}),e[22]=l,e[23]=x,e[24]=S,e[25]=u,e[26]=I):I=e[26];let b;e[27]!==I||e[28]!==M?(b=t.jsxs("div",{children:[M,I]}),e[27]=I,e[28]=M,e[29]=b):b=e[29];let C;e[30]!==f?(C=f("orgs.threadsFiltersPopover.user"),e[30]=f,e[31]=C):C=e[31];let _;e[32]!==C?(_=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:C}),e[32]=C,e[33]=_):_=e[33];let P;e[34]!==r?(P=ce=>r({filterUserIds:ce.slice(0,1)}),e[34]=r,e[35]=P):P=e[35];let k;e[36]!==f?(k=f("orgs.threadsFiltersPopover.allUsers"),e[36]=f,e[37]=k):k=e[37];let D;e[38]!==i||e[39]!==d||e[40]!==P||e[41]!==k?(D=t.jsx($t,{options:d,defaultValue:i,onValueChange:P,placeholder:k,className:"w-full",maxCount:1}),e[38]=i,e[39]=d,e[40]=P,e[41]=k,e[42]=D):D=e[42];let L;e[43]!==_||e[44]!==D?(L=t.jsxs("div",{children:[_,D]}),e[43]=_,e[44]=D,e[45]=L):L=e[45];let U;e[46]!==f?(U=f("orgs.threadsFiltersPopover.status"),e[46]=f,e[47]=U):U=e[47];let J;e[48]!==U?(J=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:U}),e[48]=U,e[49]=J):J=e[49];let Q;e[50]!==r?(Q=ce=>r({filterStatus:ce}),e[50]=r,e[51]=Q):Q=e[51];let N;e[52]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(yt,{className:"w-full",children:t.jsx(wt,{})}),e[52]=N):N=e[52];let O;e[53]!==f?(O=f("orgs.threadsFiltersPopover.allStatuses"),e[53]=f,e[54]=O):O=e[54];let F;e[55]!==O?(F=t.jsx($e,{value:"all",children:O}),e[55]=O,e[56]=F):F=e[56];let q;e[57]!==f?(q=f("orgs.threadsFiltersPopover.completed"),e[57]=f,e[58]=q):q=e[58];let $;e[59]!==q?($=t.jsx($e,{value:"completed",children:q}),e[59]=q,e[60]=$):$=e[60];let W;e[61]!==f?(W=f("orgs.threadsFiltersPopover.active"),e[61]=f,e[62]=W):W=e[62];let K;e[63]!==W?(K=t.jsx($e,{value:"active",children:W}),e[63]=W,e[64]=K):K=e[64];let B;e[65]!==f?(B=f("orgs.threadsFiltersPopover.failed"),e[65]=f,e[66]=B):B=e[66];let V;e[67]!==B?(V=t.jsx($e,{value:"failed",children:B}),e[67]=B,e[68]=V):V=e[68];let Y;e[69]!==F||e[70]!==$||e[71]!==K||e[72]!==V?(Y=t.jsxs(St,{children:[F,$,K,V]}),e[69]=F,e[70]=$,e[71]=K,e[72]=V,e[73]=Y):Y=e[73];let R;e[74]!==m||e[75]!==Q||e[76]!==Y?(R=t.jsxs(It,{value:m,onValueChange:Q,children:[N,Y]}),e[74]=m,e[75]=Q,e[76]=Y,e[77]=R):R=e[77];let E;e[78]!==J||e[79]!==R?(E=t.jsxs("div",{children:[J,R]}),e[78]=J,e[79]=R,e[80]=E):E=e[80];let H;e[81]!==f?(H=f("orgs.threadsFiltersPopover.source"),e[81]=f,e[82]=H):H=e[82];let A;e[83]!==H?(A=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:H}),e[83]=H,e[84]=A):A=e[84];let Z;e[85]!==r?(Z=ce=>r({filterSource:ce}),e[85]=r,e[86]=Z):Z=e[86];let ee;e[87]===Symbol.for("react.memo_cache_sentinel")?(ee=t.jsx(yt,{className:"w-full",children:t.jsx(wt,{})}),e[87]=ee):ee=e[87];let G;e[88]!==f?(G=f("orgs.threadsFiltersPopover.allSources"),e[88]=f,e[89]=G):G=e[89];let de;e[90]!==G?(de=t.jsx($e,{value:"all",children:G}),e[90]=G,e[91]=de):de=e[91];let re;e[92]!==f?(re=f("orgs.threadsFiltersPopover.sourceJira"),e[92]=f,e[93]=re):re=e[93];let ie;e[94]!==re?(ie=t.jsx($e,{value:"jira",children:re}),e[94]=re,e[95]=ie):ie=e[95];let me;e[96]!==de||e[97]!==ie?(me=t.jsxs(St,{children:[de,ie]}),e[96]=de,e[97]=ie,e[98]=me):me=e[98];let te;e[99]!==o||e[100]!==Z||e[101]!==me?(te=t.jsxs(It,{value:o,onValueChange:Z,children:[ee,me]}),e[99]=o,e[100]=Z,e[101]=me,e[102]=te):te=e[102];let oe;e[103]!==A||e[104]!==te?(oe=t.jsxs("div",{children:[A,te]}),e[103]=A,e[104]=te,e[105]=oe):oe=e[105];let se;e[106]!==b||e[107]!==L||e[108]!==E||e[109]!==oe?(se=t.jsxs("div",{className:"space-y-3",children:[b,L,E,oe]}),e[106]=b,e[107]=L,e[108]=E,e[109]=oe,e[110]=se):se=e[110];let X;e[111]!==c||e[112]!==r||e[113]!==f?(X=c>0&&t.jsx(je,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{r({filterAgentIds:[],filterUserIds:[],filterStatus:"all",filterSource:"all"}),h(!1)},children:f("orgs.threadsFiltersPopover.clearAllFilters")}),e[111]=c,e[112]=r,e[113]=f,e[114]=X):X=e[114];let ne;e[115]!==se||e[116]!==X||e[117]!==v?(ne=t.jsx(us,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[v,se,X]})}),e[115]=se,e[116]=X,e[117]=v,e[118]=ne):ne=e[118];let ae;return e[119]!==g||e[120]!==ne||e[121]!==j?(ae=t.jsxs(ds,{open:g,onOpenChange:h,children:[j,ne]}),e[119]=g,e[120]=ne,e[121]=j,e[122]=ae):ae=e[122],ae}function wr(s){const e=ue.c(16),{dateRange:l}=s,i=_e(),{data:m,isLoading:o}=Tl(void 0);let u;e[0]!==m?(u=m===void 0?[]:m,e[0]=m,e[1]=u):u=e[1];const d=u,[c,r]=xe.useState(null),g=c??d[0]?.id??null,{data:h}=kl(g??"");let f;e[2]!==l.startDate?(f=l.startDate.toISOString(),e[2]=l.startDate,e[3]=f):f=e[3];let n;e[4]!==l.endDate?(n=l.endDate.toISOString(),e[4]=l.endDate,e[5]=n):n=e[5];let w;e[6]!==f||e[7]!==n?(w={startDate:f,endDate:n},e[6]=f,e[7]=n,e[8]=w):w=e[8];const a=w;let T;return e[9]!==h||e[10]!==d||e[11]!==g||e[12]!==o||e[13]!==a||e[14]!==i?(T=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-8 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:o?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:i("orgs.automations.loading")}):d.length===0?t.jsx("div",{className:"py-16",children:t.jsx(Ht,{title:i("orgs.automations.emptyTitle"),description:i("orgs.automations.emptyDescription")})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(It,{value:g??"",onValueChange:j=>r(j),children:[t.jsx(yt,{variant:"pill",size:"sm",className:"w-72",children:t.jsx(wt,{placeholder:i("orgs.automations.selectPlaceholder")})}),t.jsx(St,{children:d.map(Ir)})]})}),h?t.jsx(Ml,{automationId:h.id,triggerIds:h.triggers.map(Sr),range:a}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:i("orgs.automations.loading")})]})})}),e[9]=h,e[10]=d,e[11]=g,e[12]=o,e[13]=a,e[14]=i,e[15]=T):T=e[15],T}function Sr(s){return s.id}function Ir(s){return t.jsx($e,{value:s.id,children:s.name},s.id)}function Cr(s){const e=ue.c(12),{store:l,onSelect:i}=s,m=_e();let o;e[0]!==i?(o=r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),i())},e[0]=i,e[1]=o):o=e[1];let u;e[2]!==l.title?(u=t.jsx(De,{className:"font-medium text-foreground",children:l.title}),e[2]=l.title,e[3]=u):u=e[3];let d;e[4]!==l.rules||e[5]!==m?(d=zs.map(r=>{const g=l.rules.find(h=>h.rule===r);return t.jsx(De,{children:g?t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ll,{status:g.status}),t.jsx("span",{className:"text-xs text-muted-foreground",children:m("orderMonitor.since",{ago:Vs(new Date(g.since))})})]}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:m("orderMonitor.observedOfExpected",{observed:g.verdict.observed,expected:Math.round(g.verdict.expected)})})]}):t.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})},r)}),e[4]=l.rules,e[5]=m,e[6]=d):d=e[6];let c;return e[7]!==i||e[8]!==o||e[9]!==u||e[10]!==d?(c=t.jsxs(vt,{className:"cursor-pointer",role:"button",tabIndex:0,onClick:i,onKeyDown:o,children:[u,d]}),e[7]=i,e[8]=o,e[9]=u,e[10]=d,e[11]=c):c=e[11],c}function Tr(s){const e=ue.c(61),{orgSlug:l,store:i,at:m,onSelect:o}=s,u=_e(),d=Pl(l,!0);let c;e[0]!==d.data?(c=d.data??[],e[0]=d.data,e[1]=c):c=e[1];const r=c;if(d.isLoading){let v;return e[2]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ks,{className:"m-4 h-40"}),e[2]=v):v=e[2],v}if(d.error){let v;e[3]!==u?(v=u("orderMonitor.storesErrorTitle"),e[3]=u,e[4]=v):v=e[4];let p;return e[5]!==d.error.message||e[6]!==v?(p=t.jsx(Is,{title:v,description:d.error.message}),e[5]=d.error.message,e[6]=v,e[7]=p):p=e[7],p}let g;e[8]!==i||e[9]!==r?(g=i?r.find(v=>v.connectionId===i):void 0,e[8]=i,e[9]=r,e[10]=g):g=e[10];const h=g;if(i){let v;e[11]!==o?(v=()=>o({}),e[11]=o,e[12]=v):v=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(_l,{className:"size-4"}),e[13]=p):p=e[13];let M;e[14]!==u?(M=u("orderMonitor.allStores"),e[14]=u,e[15]=M):M=e[15];let x;e[16]!==v||e[17]!==M?(x=t.jsxs(je,{variant:"ghost",size:"sm",onClick:v,className:"gap-1",children:[p,M]}),e[16]=v,e[17]=M,e[18]=x):x=e[18];const S=h?.title??i;let I;e[19]!==S?(I=t.jsx("h2",{className:"text-base font-semibold text-foreground",children:S}),e[19]=S,e[20]=I):I=e[20];let b;e[21]!==x||e[22]!==I?(b=t.jsxs("div",{className:"flex items-center gap-2",children:[x,I]}),e[21]=x,e[22]=I,e[23]=b):b=e[23];let C;e[24]!==o||e[25]!==i?(C=k=>o({store:i,at:k}),e[24]=o,e[25]=i,e[26]=C):C=e[26];let _;e[27]!==m||e[28]!==l||e[29]!==i||e[30]!==C?(_=t.jsx(Rl,{orgSlug:l,connectionId:i,at:m,onAtChange:C}),e[27]=m,e[28]=l,e[29]=i,e[30]=C,e[31]=_):_=e[31];let P;return e[32]!==_||e[33]!==b?(P=t.jsxs("div",{className:"mx-auto flex w-full max-w-[1200px] flex-col gap-4 px-4 pt-1 pb-6 md:px-10",children:[b,_]}),e[32]=_,e[33]=b,e[34]=P):P=e[34],P}if(r.length===0){let v;e[35]!==u?(v=u("orderMonitor.noStoresTitle"),e[35]=u,e[36]=v):v=e[36];let p;e[37]!==u?(p=u("orderMonitor.noStoresBody"),e[37]=u,e[38]=p):p=e[38];let M;return e[39]!==v||e[40]!==p?(M=t.jsx(Is,{title:v,description:p}),e[39]=v,e[40]=p,e[41]=M):M=e[41],M}let f;e[42]!==u?(f=u("orderMonitor.store"),e[42]=u,e[43]=f):f=e[43];let n;e[44]!==f?(n=t.jsx(he,{children:f}),e[44]=f,e[45]=n):n=e[45];let w;e[46]!==u?(w=zs.map(v=>t.jsx(he,{children:Dl(v,u)},v)),e[46]=u,e[47]=w):w=e[47];let a;e[48]!==n||e[49]!==w?(a=t.jsx(Qt,{children:t.jsxs(vt,{children:[n,w]})}),e[48]=n,e[49]=w,e[50]=a):a=e[50];let T;if(e[51]!==o||e[52]!==r){let v;e[54]!==o?(v=p=>t.jsx(Cr,{store:p,onSelect:()=>o({store:p.connectionId})},p.connectionId),e[54]=o,e[55]=v):v=e[55],T=r.map(v),e[51]=o,e[52]=r,e[53]=T}else T=e[53];let j;e[56]!==T?(j=t.jsx(Jt,{children:T}),e[56]=T,e[57]=j):j=e[57];let y;return e[58]!==a||e[59]!==j?(y=t.jsx("div",{className:"mx-auto w-full max-w-[1200px] overflow-auto px-4 pt-1 pb-6 md:px-10",children:t.jsxs(Gt,{children:[a,j]})}),e[58]=a,e[59]=j,e[60]=y):y=e[60],y}const kr=[];function gs(){const s=ue.c(25),e=_e(),l=Bs();let i;s[0]!==e?(i=e("orgs.monitoring.chats"),s[0]=e,s[1]=i):i=s[1];let m;s[2]!==i?(m={id:"threads",label:i},s[2]=i,s[3]=m):m=s[3];let o;s[4]!==e?(o=e("orgs.monitoring.overview"),s[4]=e,s[5]=o):o=s[5];let u;s[6]!==o?(u={id:"overview",label:o},s[6]=o,s[7]=u):u=s[7];let d;s[8]!==e?(d=e("orgs.monitoring.audit"),s[8]=e,s[9]=d):d=s[9];let c;s[10]!==d?(c={id:"audit",label:d},s[10]=d,s[11]=c):c=s[11];let r;s[12]!==e?(r=e("orgs.monitoring.automations"),s[12]=e,s[13]=r):r=s[13];let g;s[14]!==r?(g={id:"automations",label:r},s[14]=r,s[15]=g):g=s[15];let h;s[16]!==l.orderMonitorEnabled||s[17]!==e?(h=l.orderMonitorEnabled===!0?[{id:"stores",label:e("orderMonitor.storesTab")}]:[],s[16]=l.orderMonitorEnabled,s[17]=e,s[18]=h):h=s[18];let f;return s[19]!==m||s[20]!==u||s[21]!==c||s[22]!==g||s[23]!==h?(f=[m,u,c,g,...h],s[19]=m,s[20]=u,s[21]=c,s[22]=g,s[23]=h,s[24]=f):f=s[24],f}function os(s){const e=ue.c(10),{tab:l}=s,{org:i}=ht(),m=gs();let o;e[0]!==l||e[1]!==m?(o=m.find(g=>g.id===l)??m.find(Mr),e[0]=l,e[1]=m,e[2]=o):o=e[2];const u=o;let d;e[3]!==i.slug?(d={link:{to:"/$org/settings/monitor",params:{org:i.slug}}},e[3]=i.slug,e[4]=d):d=e[4];let c;e[5]!==u?(c=u?[{key:"monitor-tab",label:u.label}]:[],e[5]=u,e[6]=c):c=e[6];let r;return e[7]!==d||e[8]!==c?(r=t.jsx(_t.Breadcrumbs,{after:"page",parent:d,items:c}),e[7]=d,e[8]=c,e[9]=r):r=e[9],r}function Mr(s){return s.id==="overview"}const _r=[{value:"eq",labelKey:"orgs.monitoring.operatorEquals"},{value:"contains",labelKey:"orgs.monitoring.operatorContains"},{value:"in",labelKey:"orgs.monitoring.operatorIn"},{value:"exists",labelKey:"orgs.monitoring.operatorExists"}];function Pr({connectionIds:s,virtualMcpIds:e,tool:l,status:i,hideSystem:m,propertyFilters:o,connectionOptions:u,virtualMcpOptions:d,activeFiltersCount:c,onUpdateFilters:r,onConnectionSearchChange:g,memberOptions:h,llmUserIds:f=kr,onLlmUserIdsChange:n,showMemberFilter:w}){const a=_e(),[T,j]=xe.useState(!1),[y,v]=xe.useState("form"),[p,M]=xe.useState(l),[x,S]=xe.useState(o),[I,b]=xe.useState(Vt(o)),C=xe.useRef(l),_=xe.useRef(jt(o));C.current!==l&&(C.current=l,p!==l&&M(l));const P=jt(o);_.current!==P&&(_.current=P,S(o),b(Vt(o)));const k=(N,O)=>{const F=[...x],q=F[N];q&&(F[N]={key:O.key??q.key,operator:O.operator??q.operator,value:O.value??q.value},S(F))},D=()=>{S([...x,{key:"",operator:"eq",value:""}])},L=N=>{const O=x.filter((F,q)=>q!==N);S(O),b(Vt(O)),r({propertyFilters:jt(O)})},U=()=>{r({propertyFilters:jt(x)})},J=()=>{const N=Cs(I);S(N),r({propertyFilters:jt(N)})},Q=()=>{if(y==="raw"){const N=Cs(I);S(N),v("form")}else b(Vt(x)),v("raw")};return t.jsxs(ds,{open:T,onOpenChange:j,children:[t.jsx(ms,{asChild:!0,children:t.jsxs(je,{variant:"outline",className:"relative",children:[t.jsx(fs,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:a("orgs.monitoring.filters")}),c>0&&t.jsxs(t.Fragment,{children:[t.jsx(Lt,{variant:"default",size:"sm",className:"sm:hidden absolute -top-1.5 -right-1.5 min-w-4 leading-none",children:c}),t.jsx(Lt,{variant:"default",size:"icon",className:"hidden sm:flex ml-1",children:c})]})]})}),t.jsx(us,{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:a("orgs.monitoring.filterLogs")})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(ml,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:a("orgs.monitoring.hideSystemCalls")}),t.jsx(dl,{id:"hide-system-calls",checked:m,onCheckedChange:N=>r({hideSystem:!!N})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.connections")}),t.jsx($t,{options:u,defaultValue:s,onValueChange:N=>r({connectionId:N}),onSearchChange:g,placeholder:a("orgs.monitoring.allServers"),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:a("orgs.monitoring.agents")}),t.jsx($t,{options:d,defaultValue:e,onValueChange:N=>r({virtualMcpId:N}),placeholder:a("orgs.monitoring.allAgents"),className:"w-full",maxCount:2})]}),w&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.members")}),t.jsx($t,{options:h??[],defaultValue:f,onValueChange:N=>n?.(N),placeholder:a("orgs.monitoring.allMembers"),className:"w-full",maxCount:2}),t.jsx("p",{className:"text-2xs text-muted-foreground mt-1",children:a("orgs.monitoring.filtersAiUsageOnly")})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.toolName")}),t.jsx(Xt,{id:"filter-tool",placeholder:a("orgs.monitoring.filterByToolPlaceholder"),value:p,onChange:N=>M(N.target.value),onBlur:()=>{p!==l&&r({tool:p})},onKeyDown:N=>{N.key==="Enter"&&p!==l&&r({tool:p})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.status")}),t.jsxs(It,{value:i,onValueChange:N=>r({status:N}),children:[t.jsx(yt,{className:"w-full",children:t.jsx(wt,{})}),t.jsxs(St,{children:[t.jsx($e,{value:"all",children:a("orgs.monitoring.allStatus")}),t.jsx($e,{value:"success",children:a("orgs.monitoring.successOnly")}),t.jsx($e,{value:"errors",children:a("orgs.monitoring.errorsOnly")})]})]})]}),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:a("orgs.monitoring.propertyFilters")}),t.jsxs(Pt,{children:[t.jsx(Dt,{asChild:!0,children:t.jsx(je,{variant:"ghost",size:"icon-xs",onClick:Q,children:y==="raw"?t.jsx(il,{size:14}):t.jsx(el,{size:14})})}),t.jsx(Rt,{children:a(y==="raw"?"orgs.monitoring.switchToFormView":"orgs.monitoring.switchToRawText")})]})]}),y==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(cl,{placeholder:a("orgs.monitoring.pastePropertyFiltersPlaceholder"),value:I,onChange:N=>b(N.target.value),onBlur:J,onKeyDown:N=>{N.key==="Enter"&&N.metaKey&&J()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("orgs.monitoring.onePerLine")," ",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:[x.map((N,O)=>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.jsx("span",{className:"text-xs text-muted-foreground",children:a("orgs.monitoring.filter",{number:(O+1).toString()})}),t.jsx(je,{variant:"ghost-destructive",size:"icon-xs",onClick:()=>L(O),children:t.jsx(nl,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Xt,{placeholder:a("orgs.monitoring.keyPlaceholder"),value:N.key,onChange:F=>k(O,{key:F.target.value}),onBlur:U,onKeyDown:F=>{F.key==="Enter"&&U()},className:"flex-1 font-mono text-sm"}),t.jsxs(It,{value:N.operator,onValueChange:F=>{const q=[...x],$=q[O];$&&(q[O]={...$,operator:F,value:F==="exists"?"":$.value},S(q),r({propertyFilters:jt(q)}))},children:[t.jsx(yt,{className:"w-28",children:t.jsx(wt,{})}),t.jsx(St,{children:_r.map(F=>t.jsx($e,{value:F.value,children:a(F.labelKey)},F.value))})]})]}),N.operator!=="exists"&&t.jsx(Xt,{placeholder:a("orgs.monitoring.valuePlaceholder"),value:N.value,onChange:F=>k(O,{value:F.target.value}),onBlur:U,onKeyDown:F=>{F.key==="Enter"&&U()},className:"w-full font-mono text-sm"})]},O)),t.jsxs(je,{variant:"outline",size:"sm",className:"w-full",onClick:D,children:[t.jsx(ol,{size:14,className:"mr-1.5"}),a("orgs.monitoring.addFilter")]})]})]})]}),c>0&&t.jsx(je,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{M(""),S([]),b(""),r({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),j(!1)},children:a("orgs.monitoring.clearAllFilters")})]})})]})}function Dr(s){const e=ue.c(195),{tab:l,dateRange:i,displayDateRange:m,connectionIds:o,virtualMcpIds:u,tool:d,status:c,search:r,streaming:g,hideSystem:h,activeFiltersCount:f,from:n,to:w,propertyFilters:a,store:T,at:j,onUpdateFilters:y,onTimeRangeChange:v,onStreamingToggle:p,onTabChange:M}=s,x=_e(),S=ts(),I=rl(),{data:b}=Js(),[C,_]=xe.useState(""),k=xe.useDeferredValue(C)||void 0;let D;e[0]!==k?(D={searchTerm:k},e[0]=k,e[1]=D):D=e[1];const L=ts(D);let U;e[2]!==L?(U=L??[],e[2]=L,e[3]=U):U=e[3];let J;e[4]!==U?(J=U.map(Or),e[4]=U,e[5]=J):J=e[5];const Q=J;let N;e[6]!==I?(N=I.map(Lr),e[6]=I,e[7]=N):N=e[7];const O=N,{pageSize:F,streamingRefetchInterval:q}=rs,{org:$,locator:W}=ht();let K;e[8]!==$.id||e[9]!==$.slug?(K={connectionId:Gs,orgId:$.id,orgSlug:$.slug},e[8]=$.id,e[9]=$.slug,e[10]=K):K=e[10];const B=ll(K);let V;e[11]!==a?(V=El(a),e[11]=a,e[12]=V):V=e[12];const Y=V;let R;e[13]!==h||e[14]!==$.id?(R=h?[Qs.SELF($.id)]:void 0,e[13]=h,e[14]=$.id,e[15]=R):R=e[15];const E=R;let H;e[16]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[16]=H):H=e[16];const[A,Z]=xe.useState(H);let ee;e[17]===Symbol.for("react.memo_cache_sentinel")?(ee=[],e[17]=ee):ee=e[17];const[G,de]=xe.useState(ee);let re;e[18]===Symbol.for("react.memo_cache_sentinel")?(re=[],e[18]=re):re=e[18];const[ie,me]=xe.useState(re),[te,oe]=xe.useState("all"),[se,X]=xe.useState("all"),ne=(G.length>0?1:0)+(ie.length>0?1:0)+(te!=="all"?1:0)+(se!=="all"?1:0);let ae;e[19]!==b?(ae=ps(b).map(Rr),e[19]=b,e[20]=ae):ae=e[20];const ce=ae;let z;e[21]!==i.startDate?(z=i.startDate.toISOString(),e[21]=i.startDate,e[22]=z):z=e[22];let le;e[23]!==i.endDate?(le=i.endDate.toISOString(),e[23]=i.endDate,e[24]=le):le=e[24];const fe=o.length===1?o[0]:void 0,ve=u.length===1?u[0]:void 0,Ge=d||void 0,Qe=c==="errors"?!0:c==="success"?!1:void 0;let Ee;e[25]!==E||e[26]!==Y||e[27]!==z||e[28]!==le||e[29]!==fe||e[30]!==ve||e[31]!==Ge||e[32]!==Qe?(Ee={startDate:z,endDate:le,connectionId:fe,excludeConnectionIds:E,virtualMcpId:ve,toolName:Ge,isError:Qe,...Y},e[25]=E,e[26]=Y,e[27]=z,e[28]=le,e[29]=fe,e[30]=ve,e[31]=Ge,e[32]=Qe,e[33]=Ee):Ee=e[33];const Re=Ee,Le=gs();let Oe;e[34]!==l?(Oe=t.jsx(os,{tab:l}),e[34]=l,e[35]=Oe):Oe=e[35];let we;e[36]!==M||e[37]!==Le?(we=it=>{const Ft=Le.find(Ut=>Ut.id===it);Ft&&M(Ft.id)},e[36]=M,e[37]=Le,e[38]=we):we=e[38];let Fe;e[39]!==we||e[40]!==l||e[41]!==Le?(Fe=t.jsx(Ds,{placement:"page",tabs:Le,activeTab:l,onTabChange:we}),e[39]=we,e[40]=l,e[41]=Le,e[42]=Fe):Fe=e[42];const Ye=l==="stores"&&"hidden";let Se;e[43]!==Ye?(Se=ot("flex items-center gap-2",Ye),e[43]=Ye,e[44]=Se):Se=e[44];let Ie;e[45]!==f||e[46]!==o||e[47]!==Q||e[48]!==C||e[49]!==h||e[50]!==g||e[51]!==A||e[52]!==ce||e[53]!==p||e[54]!==y||e[55]!==a||e[56]!==c||e[57]!==x||e[58]!==l||e[59]!==d||e[60]!==u||e[61]!==O?(Ie=(l==="overview"||l==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(je,{variant:g?"secondary":"outline",className:"gap-1.5",onClick:p,children:[g&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:x("orgs.monitoring.live")}),g&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Pr,{connectionIds:o,virtualMcpIds:u,tool:d,status:c,hideSystem:h,propertyFilters:a,connectionOptions:Q,virtualMcpOptions:O,activeFiltersCount:f,onUpdateFilters:y,connectionSearchTerm:C,onConnectionSearchChange:_,memberOptions:ce,llmUserIds:A,onLlmUserIdsChange:Z,showMemberFilter:l==="overview"})]}),e[45]=f,e[46]=o,e[47]=Q,e[48]=C,e[49]=h,e[50]=g,e[51]=A,e[52]=ce,e[53]=p,e[54]=y,e[55]=a,e[56]=c,e[57]=x,e[58]=l,e[59]=d,e[60]=u,e[61]=O,e[62]=Ie):Ie=e[62];let Ne;e[63]!==ce||e[64]!==l||e[65]!==ne||e[66]!==G||e[67]!==se||e[68]!==te||e[69]!==ie||e[70]!==O?(Ne=l==="threads"&&t.jsx(yr,{filterAgentIds:G,filterUserIds:ie,filterStatus:te,filterSource:se,virtualMcpOptions:O,memberOptions:ce,activeFiltersCount:ne,onUpdateFilters:it=>{const{filterAgentIds:Ft,filterUserIds:Ut,filterStatus:hs,filterSource:vs}=it;Ft!==void 0&&de(Ft),Ut!==void 0&&me(Ut),hs!==void 0&&oe(hs),vs!==void 0&&X(vs)}}),e[63]=ce,e[64]=l,e[65]=ne,e[66]=G,e[67]=se,e[68]=te,e[69]=ie,e[70]=O,e[71]=Ne):Ne=e[71];let be;e[72]!==n||e[73]!==w?(be={from:n,to:w},e[72]=n,e[73]=w,e[74]=be):be=e[74];let Ce;e[75]!==x?(Ce=x("monitoring.timeRangePicker.absoluteTimeRange"),e[75]=x,e[76]=Ce):Ce=e[76];let Te;e[77]!==x?(Te=x("monitoring.timeRangePicker.from"),e[77]=x,e[78]=Te):Te=e[78];let ke;e[79]!==x?(ke=x("monitoring.timeRangePicker.to"),e[79]=x,e[80]=ke):ke=e[80];let ze;e[81]!==x?(ze=x("monitoring.timeRangePicker.applyTimeRange"),e[81]=x,e[82]=ze):ze=e[82];let Ae;e[83]!==Ce||e[84]!==Te||e[85]!==ke||e[86]!==ze?(Ae={absoluteTimeRange:Ce,from:Te,to:ke,applyTimeRange:ze},e[83]=Ce,e[84]=Te,e[85]=ke,e[86]=ze,e[87]=Ae):Ae=e[87];let ge;e[88]!==x?(ge=x("monitoring.timeRangePicker.last5Minutes"),e[88]=x,e[89]=ge):ge=e[89];let pe;e[90]!==ge?(pe={label:ge,from:"now-5m",to:"now",value:"5m"},e[90]=ge,e[91]=pe):pe=e[91];let ye;e[92]!==x?(ye=x("monitoring.timeRangePicker.last15Minutes"),e[92]=x,e[93]=ye):ye=e[93];let Pe;e[94]!==ye?(Pe={label:ye,from:"now-15m",to:"now",value:"15m"},e[94]=ye,e[95]=Pe):Pe=e[95];let Me;e[96]!==x?(Me=x("monitoring.timeRangePicker.last30Minutes"),e[96]=x,e[97]=Me):Me=e[97];let Ue;e[98]!==Me?(Ue={label:Me,from:"now-30m",to:"now",value:"30m"},e[98]=Me,e[99]=Ue):Ue=e[99];let Ke;e[100]!==x?(Ke=x("monitoring.timeRangePicker.last1Hour"),e[100]=x,e[101]=Ke):Ke=e[101];let Ve;e[102]!==Ke?(Ve={label:Ke,from:"now-1h",to:"now",value:"1h"},e[102]=Ke,e[103]=Ve):Ve=e[103];let We;e[104]!==x?(We=x("monitoring.timeRangePicker.last3Hours"),e[104]=x,e[105]=We):We=e[105];let ut;e[106]!==We?(ut={label:We,from:"now-3h",to:"now",value:"3h"},e[106]=We,e[107]=ut):ut=e[107];let Xe;e[108]!==x?(Xe=x("monitoring.timeRangePicker.last6Hours"),e[108]=x,e[109]=Xe):Xe=e[109];let Ze;e[110]!==Xe?(Ze={label:Xe,from:"now-6h",to:"now",value:"6h"},e[110]=Xe,e[111]=Ze):Ze=e[111];let et;e[112]!==x?(et=x("monitoring.timeRangePicker.last12Hours"),e[112]=x,e[113]=et):et=e[113];let ft;e[114]!==et?(ft={label:et,from:"now-12h",to:"now",value:"12h"},e[114]=et,e[115]=ft):ft=e[115];let tt;e[116]!==x?(tt=x("monitoring.timeRangePicker.last24Hours"),e[116]=x,e[117]=tt):tt=e[117];let xt;e[118]!==tt?(xt={label:tt,from:"now-24h",to:"now",value:"24h"},e[118]=tt,e[119]=xt):xt=e[119];let st;e[120]!==x?(st=x("monitoring.timeRangePicker.last2Days"),e[120]=x,e[121]=st):st=e[121];let lt;e[122]!==st?(lt={label:st,from:"now-2d",to:"now",value:"2d"},e[122]=st,e[123]=lt):lt=e[123];let nt;e[124]!==x?(nt=x("monitoring.timeRangePicker.last7Days"),e[124]=x,e[125]=nt):nt=e[125];let qe;e[126]!==nt?(qe={label:nt,from:"now-7d",to:"now",value:"7d"},e[126]=nt,e[127]=qe):qe=e[127];let at;e[128]!==x?(at=x("monitoring.timeRangePicker.last30Days"),e[128]=x,e[129]=at):at=e[129];let pt;e[130]!==at?(pt={label:at,from:"now-30d",to:"now",value:"30d"},e[130]=at,e[131]=pt):pt=e[131];let He;e[132]!==pe||e[133]!==Pe||e[134]!==Ue||e[135]!==Ve||e[136]!==ut||e[137]!==Ze||e[138]!==ft||e[139]!==xt||e[140]!==lt||e[141]!==qe||e[142]!==pt?(He=[pe,Pe,Ue,Ve,ut,Ze,ft,xt,lt,qe,pt],e[132]=pe,e[133]=Pe,e[134]=Ue,e[135]=Ve,e[136]=ut,e[137]=Ze,e[138]=ft,e[139]=xt,e[140]=lt,e[141]=qe,e[142]=pt,e[143]=He):He=e[143];let Be;e[144]!==v||e[145]!==be||e[146]!==Ae||e[147]!==He?(Be=t.jsx(al,{value:be,onChange:v,labels:Ae,quickRanges:He}),e[144]=v,e[145]=be,e[146]=Ae,e[147]=He,e[148]=Be):Be=e[148];let Je;e[149]!==Se||e[150]!==Ie||e[151]!==Ne||e[152]!==Be?(Je=t.jsxs("div",{className:Se,children:[Ie,Ne,Be]}),e[149]=Se,e[150]=Ie,e[151]=Ne,e[152]=Be,e[153]=Je):Je=e[153];let rt;e[154]!==Fe||e[155]!==Je?(rt=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[Fe,Je]}),e[154]=Fe,e[155]=Je,e[156]=rt):rt=e[156];let ct;e[157]!==y||e[158]!==r||e[159]!==x||e[160]!==l?(ct=(l==="audit"||l==="threads")&&t.jsx(Ys,{value:r,onChange:it=>y({search:it}),placeholder:x(l==="threads"?"orgs.monitoring.searchByTitlePlaceholder":"orgs.monitoring.searchByToolPlaceholder"),onKeyDown:it=>{it.key==="Escape"&&(y({search:""}),it.target.blur())},className:"w-full md:w-[375px]"}),e[157]=y,e[158]=r,e[159]=x,e[160]=l,e[161]=ct):ct=e[161];let Tt;e[162]!==Oe||e[163]!==rt||e[164]!==ct?(Tt=t.jsx(_t.Container,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[Oe,rt,ct]})}),e[162]=Oe,e[163]=rt,e[164]=ct,e[165]=Tt):Tt=e[165];let kt;e[166]!==S||e[167]!==I||e[168]!==j||e[169]!==Re||e[170]!==B||e[171]!==o||e[172]!==i||e[173]!==m||e[174]!==E||e[175]!==g||e[176]!==A||e[177]!==W||e[178]!==b||e[179]!==y||e[180]!==$.slug||e[181]!==r||e[182]!==c||e[183]!==T||e[184]!==l||e[185]!==G||e[186]!==se||e[187]!==te||e[188]!==ie||e[189]!==d||e[190]!==u?(kt=l==="stores"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(Ol,{feature:"monitoring",children:t.jsx(Tr,{orgSlug:$.slug,store:T,at:j,onSelect:it=>y({store:it.store,at:it.at})})})}):l==="automations"?t.jsx(wr,{dateRange:i}):l==="threads"?t.jsx(gr,{client:B,locator:W,membersData:b,allConnections:S,allVirtualMcps:I,dateRange:i,searchQuery:r,filterAgentIds:G,filterUserIds:ie,filterStatus:te,filterSource:se}):l==="audit"?t.jsx(xe.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(qt.Skeleton,{})}),children:t.jsx(dr,{client:B,locator:W,baseParams:Re,pageSize:F,isStreaming:g,streamingRefetchInterval:q,connectionIds:o,virtualMcpIds:u,tool:d,status:c,searchQuery:r,allConnections:S,allVirtualMcps:I,membersData:b})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(Xl,{displayDateRange:m,connectionIds:o,excludeConnectionIds:E,toolName:d||void 0,status:c==="errors"?"error":c==="success"?"success":void 0,connections:S,isStreaming:g,streamingRefetchInterval:q,llmUserIds:A,virtualMcpIds:u,virtualMcps:I})}),e[166]=S,e[167]=I,e[168]=j,e[169]=Re,e[170]=B,e[171]=o,e[172]=i,e[173]=m,e[174]=E,e[175]=g,e[176]=A,e[177]=W,e[178]=b,e[179]=y,e[180]=$.slug,e[181]=r,e[182]=c,e[183]=T,e[184]=l,e[185]=G,e[186]=se,e[187]=te,e[188]=ie,e[189]=d,e[190]=u,e[191]=kt):kt=e[191];let At;return e[192]!==Tt||e[193]!==kt?(At=t.jsxs(t.Fragment,{children:[Tt,kt]}),e[192]=Tt,e[193]=kt,e[194]=At):At=e[194],At}function Rr(s){const e=s.user.name??s.user.email??s.userId,l=s.user.image??void 0;return{value:s.userId,label:e,icon:i=>{const{className:m}=i;return t.jsx(cs,{url:l,fallback:e,shape:"circle",size:"2xs",className:ot("shrink-0",m)})}}}function Lr(s){const e=s.icon,l=s.title??"Super Agent";return{value:s.id??"",label:l,icon:i=>{const{className:m}=i;return t.jsx(Ct,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(Ot,{}),className:ot("size-4! min-w-4! rounded-sm shrink-0",m)})}}}function Or(s){const e=s.icon,l=s.title||s.id;return{value:s.id,label:l,icon:i=>{const{className:m}=i;return t.jsx(Ct,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(Ot,{}),className:ot("size-4! min-w-4! rounded-sm shrink-0",m)})}}}function kn(){const s=ue.c(85),e=_e(),l=gs(),{org:i}=ht(),m=ns();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/monitor"},s[0]=o):o=s[0];const u=qs(o),{tab:d,from:c,to:r,connectionId:g,virtualMcpId:h,tool:f,search:n,status:w,streaming:a,propertyFilters:T,hideSystem:j,store:y,at:v}=u,p=d===void 0?"threads":d;let M;s[1]!==g?(M=g===void 0?[]:g,s[1]=g,s[2]=M):M=s[2];const x=M;let S;s[3]!==h?(S=h===void 0?[]:h,s[3]=h,s[4]=S):S=s[4];const I=S,b=a===void 0?!0:a,C=T===void 0?"":T,_=j===void 0?!1:j,P=$l(C);let k;s[5]!==m||s[6]!==i.slug||s[7]!==u?(k=X=>{m({to:"/$org/settings/monitor",params:{org:i.slug},search:{...u,...X}})},s[5]=m,s[6]=i.slug,s[7]=u,s[8]=k):k=s[8];const D=k,[L,U]=xe.useState(zr);let J;s[9]!==D?(J=X=>{U(Date.now()),D({from:X.from,to:X.to})},s[9]=D,s[10]=J):J=s[10];const Q=J;let N,O,F;if(s[11]!==L||s[12]!==c||s[13]!==b||s[14]!==r){const X=new Date(L),ne=ys(c,X),ae=ys(r,X);F=ne.date||new Date(L-864e5);const ce=ae.date||X;N={startDate:F,endDate:ce},O=ce,b&&r==="now"&&(O=new Date(ce),O.setHours(O.getHours()+1)),s[11]=L,s[12]=c,s[13]=b,s[14]=r,s[15]=N,s[16]=O,s[17]=F}else N=s[15],O=s[16],F=s[17];let q;s[18]!==O||s[19]!==F?(q={startDate:F,endDate:O},s[18]=O,s[19]=F,s[20]=q):q=s[20];const $=q;let W=0;x.length>0&&W++,I.length>0&&W++,f&&W++,w!=="all"&&W++,_&&W++;const K=P.filter(Fr);K.length>0&&(W=W+K.length);let B;s[21]!==p?(B=t.jsx(_t.Container,{className:"!pb-3",children:t.jsx(os,{tab:p})}),s[21]=p,s[22]=B):B=s[22];let V;s[23]!==e?(V=e("orgs.monitoring.failedLoadTitle"),s[23]=e,s[24]=V):V=s[24];let Y;s[25]!==e?(Y=e("orgs.monitoring.failedLoadDescription"),s[25]=e,s[26]=Y):Y=s[26];let R;s[27]!==V||s[28]!==Y?(R=t.jsx(_t.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(Ht,{title:V,description:Y})})}),s[27]=V,s[28]=Y,s[29]=R):R=s[29];let E;s[30]!==B||s[31]!==R?(E=t.jsxs(t.Fragment,{children:[B,R]}),s[30]=B,s[31]=R,s[32]=E):E=s[32];let H;s[33]!==p?(H=t.jsx(os,{tab:p}),s[33]=p,s[34]=H):H=s[34];let A;s[35]!==l||s[36]!==D?(A=X=>{const ne=l.find(ae=>ae.id===X);ne&&D({tab:ne.id})},s[35]=l,s[36]=D,s[37]=A):A=s[37];let Z;s[38]!==A||s[39]!==p||s[40]!==l?(Z=t.jsx(Ds,{placement:"page",tabs:l,activeTab:p,onTabChange:A}),s[38]=A,s[39]=p,s[40]=l,s[41]=Z):Z=s[41];let ee;s[42]!==H||s[43]!==Z?(ee=t.jsx(_t.Container,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[H,Z]})}),s[42]=H,s[43]=Z,s[44]=ee):ee=s[44];let G;s[45]!==p?(G=p==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(qt.Skeleton,{})}):p==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(qt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(sr,{})}),s[45]=p,s[46]=G):G=s[46];let de;s[47]!==ee||s[48]!==G?(de=t.jsxs(t.Fragment,{children:[ee,G]}),s[47]=ee,s[48]=G,s[49]=de):de=s[49];let re;s[50]!==Q?(re=X=>{Wt("monitoring_time_range_changed",{from:X.from,to:X.to}),Q(X)},s[50]=Q,s[51]=re):re=s[51];let ie;s[52]!==b||s[53]!==D?(ie=()=>{Wt("monitoring_live_toggled",{enabled:!b}),D({streaming:!b})},s[52]=b,s[53]=D,s[54]=ie):ie=s[54];let me;s[55]!==p||s[56]!==D?(me=X=>{X!==p&&Wt("monitoring_tab_changed",{from_tab:p,to_tab:X}),D({tab:X})},s[55]=p,s[56]=D,s[57]=me):me=s[57];let te;s[58]!==W||s[59]!==v||s[60]!==x||s[61]!==$||s[62]!==N||s[63]!==c||s[64]!==_||s[65]!==P||s[66]!==n||s[67]!==w||s[68]!==y||s[69]!==b||s[70]!==re||s[71]!==ie||s[72]!==me||s[73]!==p||s[74]!==r||s[75]!==f||s[76]!==D||s[77]!==I?(te=t.jsx(Dr,{tab:p,dateRange:$,displayDateRange:N,connectionIds:x,virtualMcpIds:I,tool:f,status:w,search:n,streaming:b,hideSystem:_,activeFiltersCount:W,from:c,to:r,propertyFilters:P,store:y,at:v,onUpdateFilters:D,onTimeRangeChange:re,onStreamingToggle:ie,onTabChange:me}),s[58]=W,s[59]=v,s[60]=x,s[61]=$,s[62]=N,s[63]=c,s[64]=_,s[65]=P,s[66]=n,s[67]=w,s[68]=y,s[69]=b,s[70]=re,s[71]=ie,s[72]=me,s[73]=p,s[74]=r,s[75]=f,s[76]=D,s[77]=I,s[78]=te):te=s[78];let oe;s[79]!==de||s[80]!==te?(oe=t.jsx(xe.Suspense,{fallback:de,children:te}),s[79]=de,s[80]=te,s[81]=oe):oe=s[81];let se;return s[82]!==E||s[83]!==oe?(se=t.jsx(Ws,{capability:"monitoring:view",area:"monitoring",children:t.jsx(_t,{children:t.jsx(Hs,{fallback:E,children:oe})})}),s[82]=E,s[83]=oe,s[84]=se):se=s[84],se}function Fr(s){return s.key.trim()}function zr(){return Date.now()}export{kn as default};
|