decocms 4.187.1 → 4.187.2
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-P2HKgtqw.js → AlertCircle-DfAm4o9d.js} +1 -1
- package/dist/client/assets/{AreaChart-DKnQ34DX.js → AreaChart-Dg_R-EHK.js} +1 -1
- package/dist/client/assets/{ArrowUp-2QnjJkvm.js → ArrowUp-A7Mx0wQq.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Cc3pr966.js → ArrowUpRight-JxGVImer.js} +1 -1
- package/dist/client/assets/{Check-D9Gv3e7Y.js → Check-DCYpTX7L.js} +1 -1
- package/dist/client/assets/{CheckCircle-CQ2a3-uE.js → CheckCircle-CAxEgYBD.js} +1 -1
- package/dist/client/assets/{ChevronDown-QYJIoaz5.js → ChevronDown-PFtiUBSQ.js} +1 -1
- package/dist/client/assets/{ChevronRight-SRezhA8m.js → ChevronRight-CxJTFr1Z.js} +1 -1
- package/dist/client/assets/{ChevronUp-DNvu894s.js → ChevronUp-BdH75oDU.js} +1 -1
- package/dist/client/assets/{Copy01-B0fooHit.js → Copy01-Bc5VfVJK.js} +1 -1
- package/dist/client/assets/{CpuChip01-CSBVNRdU.js → CpuChip01-DWLM6pni.js} +1 -1
- package/dist/client/assets/{CreditCard01-5PQDe0L_.js → CreditCard01-BT88WrjK.js} +1 -1
- package/dist/client/assets/{DotsVertical-pQ-LPc7h.js → DotsVertical-BGKdNMuc.js} +1 -1
- package/dist/client/assets/{Eye-BL6snfIb.js → Eye-Bmz_K6Az.js} +1 -1
- package/dist/client/assets/{FilterLines-ChWMAGnL.js → FilterLines-CoDG45q_.js} +1 -1
- package/dist/client/assets/{HardDrive-BaMAVhr_.js → HardDrive-BtIbx3qj.js} +1 -1
- package/dist/client/assets/{Key01-BKEduGqA.js → Key01-U9_ySw41.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CGFBFtgN.js → LayoutLeft-Ct7sobUG.js} +1 -1
- package/dist/client/assets/{LinkExternal01-E87yxpAR.js → LinkExternal01-DZBb956i.js} +1 -1
- package/dist/client/assets/{LogOut01-DZHSQ5mw.js → LogOut01-CVO6-MqX.js} +1 -1
- package/dist/client/assets/{Monitor01-O_C0vR1B.js → Monitor01-CNIDIRyn.js} +1 -1
- package/dist/client/assets/{Palette-CXX1NJKF.js → Palette-ieliJ9ri.js} +1 -1
- package/dist/client/assets/{Play-BiK4mJxt.js → Play-YwjBxXxu.js} +1 -1
- package/dist/client/assets/{Plus-BWQTEgou.js → Plus-DshatFPI.js} +1 -1
- package/dist/client/assets/{SearchLg-BwSJkB3J.js → SearchLg-CA_csAv5.js} +1 -1
- package/dist/client/assets/{SearchMd-LsvVvvC0.js → SearchMd-D51gG9yR.js} +1 -1
- package/dist/client/assets/{Settings02-Bwc4Ou5c.js → Settings02-DKxAMtG6.js} +1 -1
- package/dist/client/assets/{Shield01-CBCBOZto.js → Shield01-DcD-RjAf.js} +1 -1
- package/dist/client/assets/{Star01-Ckd0-vPz.js → Star01-A6Co6I5T.js} +1 -1
- package/dist/client/assets/{Stars01-nWiq-uAI.js → Stars01-GAsjgHvR.js} +1 -1
- package/dist/client/assets/{Stars02-Csd8Nq8B.js → Stars02-CbrW-bl9.js} +1 -1
- package/dist/client/assets/{Sun-Cb_1ZeKB.js → Sun-By6pya_9.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CksktbpR.js → SwitchHorizontal01-COkct-t0.js} +1 -1
- package/dist/client/assets/{Tool01-CIAT9egH.js → Tool01-DIokgqXj.js} +1 -1
- package/dist/client/assets/{Tool02-DOZgL63b.js → Tool02-Ddkawasa.js} +1 -1
- package/dist/client/assets/{Trash01-Ds258bVF.js → Trash01-BnkpBeyG.js} +1 -1
- package/dist/client/assets/{TrendUp01-ExM3QBvB.js → TrendUp01-C42-Wjl8.js} +1 -1
- package/dist/client/assets/{Upload01-DLlME6A5.js → Upload01-CL-S7mCf.js} +1 -1
- package/dist/client/assets/{User01-xq5WLuS1.js → User01-Dkl2AAm0.js} +1 -1
- package/dist/client/assets/{Users01-aFZ8ECBq.js → Users01-C5V1wUhw.js} +1 -1
- package/dist/client/assets/{Users03-X07cigY1.js → Users03-DvXZQDEh.js} +1 -1
- package/dist/client/assets/{X-BcI5xbtc.js → X-C0IBj9M7.js} +1 -1
- package/dist/client/assets/{XCircle-D-1wEwqz.js → XCircle-D4coMBPk.js} +1 -1
- package/dist/client/assets/{XClose-BqFNQcHS.js → XClose-DubUci38.js} +1 -1
- package/dist/client/assets/{Zap-D-UB-kDR.js → Zap-cKHE_zIY.js} +1 -1
- package/dist/client/assets/{ZapSquare-WZJLHByv.js → ZapSquare-B8T6rKNs.js} +1 -1
- package/dist/client/assets/{access-gate-DifWuOiT.js → access-gate-DYNzAGYH.js} +1 -1
- package/dist/client/assets/{add-section-modal-D_h1oBZK.js → add-section-modal-CPpEOCSh.js} +1 -1
- package/dist/client/assets/{agent-icon-D5OVtYPP.js → agent-icon-kVYCkgDa.js} +1 -1
- package/dist/client/assets/{agents-list-BzyNAEA5.js → agents-list-BnZIltxK.js} +1 -1
- package/dist/client/assets/{ai-providers-CL1gci-X.js → ai-providers-CWVLidjU.js} +1 -1
- package/dist/client/assets/{alert-dialog-BnzSYFmc.js → alert-dialog-CgooVxEs.js} +1 -1
- package/dist/client/assets/{alert-CcG3LUN4.js → alert-q-AWcpPi.js} +1 -1
- package/dist/client/assets/{app-editor-BdpjR-eA.js → app-editor-GvS8ciIA.js} +1 -1
- package/dist/client/assets/{auth-BZABTTKv.js → auth-CBvb6Xya.js} +1 -1
- package/dist/client/assets/{auth-catchall-CdQiT_F2.js → auth-catchall-BMoFkvv5.js} +1 -1
- package/dist/client/assets/{auth-entry-Mls2VelI.js → auth-entry-DjEw3RXW.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CI8tBu1c.js → auth-split-layout-CV0JvC41.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D52ZY-Fq.js → authenticate-and-persist-oauth-D6Cg3rRV.js} +1 -1
- package/dist/client/assets/{automation-list-row-D7whiVBS.js → automation-list-row-jyrfVLO8.js} +1 -1
- package/dist/client/assets/{automation-runs-i4z7qF-v.js → automation-runs-DM4fJpM9.js} +1 -1
- package/dist/client/assets/{automations-BjRewboV.js → automations-BnMqcz59.js} +1 -1
- package/dist/client/assets/{avatar-CSNZjLhH.js → avatar-ICdV2BRR.js} +1 -1
- package/dist/client/assets/{badge-BiKMjzJW.js → badge-CCx5WpWL.js} +1 -1
- package/dist/client/assets/{billing-BGnYo_J1.js → billing-CP0ccpix.js} +1 -1
- package/dist/client/assets/{block-document-CUqint4H.js → block-document-DWCHIvSx.js} +1 -1
- package/dist/client/assets/{brand-context-C3igLLvc.js → brand-context-PdyFpIAJ.js} +1 -1
- package/dist/client/assets/{buckets-B3rq3qSQ.js → buckets-bCF5m_py.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DlLRLSiJ.js → bulk-category-panel-CRrRQWZM.js} +1 -1
- package/dist/client/assets/{capability-load-error-DN-xwfk8.js → capability-load-error-CqaJ2CyT.js} +1 -1
- package/dist/client/assets/{card-C-s8pHIa.js → card-C96BA3_o.js} +1 -1
- package/dist/client/assets/{category-editor-CZp8-Cl1.js → category-editor-fJIsMQon.js} +1 -1
- package/dist/client/assets/{chat-context-DwjnCD5v.js → chat-context-DtQAFZGy.js} +1 -1
- package/dist/client/assets/{checkbox-CYnJ6cT4.js → checkbox-CWd555HO.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D3Xd8i8r.js → cli-auth-success-BFKi_3xZ.js} +1 -1
- package/dist/client/assets/{collection-detail-DEYaVIwR.js → collection-detail-Dqx7327X.js} +1 -1
- package/dist/client/assets/{collection-display-button-CMuqCu5U.js → collection-display-button-C4OY7Wzq.js} +1 -1
- package/dist/client/assets/{collection-search--0o-_y_0.js → collection-search-k2eiLSTO.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CrTRpN8M.js → collection-table-wrapper-D02H5hcq.js} +1 -1
- package/dist/client/assets/{collection-tabs-CqLPT7f9.js → collection-tabs-BXsKWfGz.js} +1 -1
- package/dist/client/assets/{command-FClZie0O.js → command-B6b6o_6w.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-Dceaic-q.js → commerce-onboarding-DDERfVdl.js} +1 -1
- package/dist/client/assets/{connect-CAX1E9WU.js → connect-DMb2PMGs.js} +1 -1
- package/dist/client/assets/{connection-C7j5UDpV.js → connection-DFe3W5IP.js} +1 -1
- package/dist/client/assets/{connection-card-D79bjp3g.js → connection-card-D_9VNazf.js} +1 -1
- package/dist/client/assets/{connection-detail-CZI8H4nR.js → connection-detail-f7JsMg2X.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-6AeIVMvW.js → connection-form-helpers-DrJjgPbl.js} +1 -1
- package/dist/client/assets/{connections-Bv2R2l3g.js → connections-BnxbwuD2.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CFtVw7wk.js → decopilot-sse-pool-GQur4M3a.js} +1 -1
- package/dist/client/assets/{dialog-B0y4FNeh.js → dialog-C6qg7Ck8.js} +1 -1
- package/dist/client/assets/{domain-settings-BB2DEvJC.js → domain-settings-Co2WC3dD.js} +1 -1
- package/dist/client/assets/{drawer-D5Jbosf2.js → drawer-DsX5bBE-.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CDr0gXOO.js → dropdown-menu-DU8DtkSC.js} +1 -1
- package/dist/client/assets/{empty-state-Bp4JRlF8.js → empty-state-CkwReOEQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dj3mL3rI.js → extract-connection-data-Cad0ShHO.js} +1 -1
- package/dist/client/assets/{file-explorer-BxzFLApK.js → file-explorer-BkzLM1ah.js} +1 -1
- package/dist/client/assets/{form-BOGnGAg0.js → form-Dibti8iC.js} +1 -1
- package/dist/client/assets/{general-BJ8QBOTt.js → general-CDsHR6d_.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CgzT50L-.js → github-repo-picker-CppfYsNH.js} +1 -1
- package/dist/client/assets/{hooks-BuDFWsHu.js → hooks-XfMYeEIs.js} +1 -1
- package/dist/client/assets/{index-DPGnZ2C7.js → index-BMzn09lx.js} +1 -1
- package/dist/client/assets/{index-DHCkR8xR.css → index-BQ5clB3L.css} +1 -1
- package/dist/client/assets/{index-DXra3gJ5.js → index-BXvFQMhX.js} +46 -46
- package/dist/client/assets/{index-BR_jD8W6.js → index-B_MMsAiE.js} +3 -3
- package/dist/client/assets/{index-CFMJBHbq.js → index-Cgto-g9E.js} +1 -1
- package/dist/client/assets/{index-88gGKfrs.js → index-ConrVmae.js} +1 -1
- package/dist/client/assets/{index-BC-qTexq.js → index-DA3i9gHG.js} +1 -1
- package/dist/client/assets/{index-CA4irSam.js → index-DbB3C14p.js} +1 -1
- package/dist/client/assets/{index-CxLAWdJN.js → index-Dm1vrjTR.js} +1 -1
- package/dist/client/assets/{index-SVDLxjQH.js → index-Dw7ePJkF.js} +1 -1
- package/dist/client/assets/{index-Btn_-5ma.js → index-la_NhVUv.js} +1 -1
- package/dist/client/assets/{index-redirect-DgY_kNvB.js → index-redirect-UHGFLtkm.js} +1 -1
- package/dist/client/assets/{index-CfMm2UKj.js → index-y-47HFza.js} +1 -1
- package/dist/client/assets/{input-bUQSb5Y2.js → input-CDSeZvCx.js} +1 -1
- package/dist/client/assets/{integration-icon-6jigSrAM.js → integration-icon-CvX-0tHP.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BXLS7uLZ.js → invite-member-dialog-Bzlc-sDq.js} +1 -1
- package/dist/client/assets/{label-DtYAPCcl.js → label-DMbGJZiR.js} +1 -1
- package/dist/client/assets/{layout-C-w1FisC.js → layout-oTtJ7CGf.js} +1 -1
- package/dist/client/assets/{login-BEPGxsJn.js → login-CUR_dtLn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C7mxaInP.js → mcp-oauth-ymd3SFfg.js} +1 -1
- package/dist/client/assets/{members-CV3hfthi.js → members-CZiUUbnR.js} +1 -1
- package/dist/client/assets/{monaco-editor-BhwNEk5p.js → monaco-editor-D1NyXstY.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-frI0jVtv.js → monitoring-stats-row-Cf7X8yyx.js} +1 -1
- package/dist/client/assets/{multi-select-Cp4uxBoJ.js → multi-select-CJHqj-l8.js} +1 -1
- package/dist/client/assets/{oauth-callback-BdMDySov.js → oauth-callback-_OQnoAnP.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mvfS1uYm.js → oauth-callback-ai-provider-DQXvlvJU.js} +1 -1
- package/dist/client/assets/{onboarding-CCeFkRpp.js → onboarding-prj3JP9J.js} +1 -1
- package/dist/client/assets/{org-layout-BausOh17.js → org-layout-bdLlCnF4.js} +1 -1
- package/dist/client/assets/{organization-choice-CRWcoJXt.js → organization-choice-DN1sDygp.js} +1 -1
- package/dist/client/assets/{orgs-DiNRXpZV.js → orgs-3jgCg8uP.js} +1 -1
- package/dist/client/assets/{page-seo-form-CO2mkuSW.js → page-seo-form-DuEcpMt8.js} +1 -1
- package/dist/client/assets/{popover-CZW0Yxj6.js → popover-Ds4SkgvE.js} +1 -1
- package/dist/client/assets/{post-editor-BqQMeUg8.js → post-editor-DyEwJwLC.js} +1 -1
- package/dist/client/assets/{primitives-DElNMEXa.js → primitives-Db1yM4BZ.js} +1 -1
- package/dist/client/assets/{profile-DlrSRd_5.js → profile-D226p6WC.js} +1 -1
- package/dist/client/assets/project-app-view-Dll8gpvf.js +1 -0
- package/dist/client/assets/record-editor-D7X_Qutr.js +1 -0
- package/dist/client/assets/{redirect-editor-57QmxjeN.js → redirect-editor-GNNYWddM.js} +1 -1
- package/dist/client/assets/registry-DV5pbA2j.js +2 -0
- package/dist/client/assets/{registry-layout-CJ7QbFRD.js → registry-layout-hvt8-3Vh.js} +1 -1
- package/dist/client/assets/{reports-Dl3OsEl9.js → reports-J6BlP8fs.js} +1 -1
- package/dist/client/assets/{require-capability-hlQEOXdT.js → require-capability-DaTvC6dg.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CPu1utr5.js → required-auth-layout-B4xElUex.js} +1 -1
- package/dist/client/assets/{reset-password-BugxGaV_.js → reset-password-D-i8x1Hf.js} +1 -1
- package/dist/client/assets/{roles-CsIoUI5Y.js → roles-COKuWdD8.js} +1 -1
- package/dist/client/assets/{search-input-CXnuNUQA.js → search-input-DMrgq14n.js} +1 -1
- package/dist/client/assets/{secrets-gGmYf7tg.js → secrets-EzmUheNk.js} +1 -1
- package/dist/client/assets/{sections-editor-Bi-YKf8_.js → sections-editor-DYTv79VM.js} +1 -1
- package/dist/client/assets/{select-model-BloZx6WX.js → select-model-Cp3i2y21.js} +1 -1
- package/dist/client/assets/{select-NereDSEc.js → select-vyt7fwjg.js} +1 -1
- package/dist/client/assets/{self-tool-result-DJYQ7M5Z.js → self-tool-result-BwqRkK5H.js} +1 -1
- package/dist/client/assets/{seo-editor-CIAVNMOt.js → seo-editor-CC2ug35A.js} +1 -1
- package/dist/client/assets/{settings-layout-D7Ta_FdH.js → settings-layout-S0u8Yptq.js} +1 -1
- package/dist/client/assets/{settings-section-C2yUpQoJ.js → settings-section-DolAvAtQ.js} +1 -1
- package/dist/client/assets/{shell-controls-mzD01Nat.js → shell-controls-B6WCNQyz.js} +1 -1
- package/dist/client/assets/{shell-layout-Dx2uIQi3.js → shell-layout-C7OHxOgm.js} +1 -1
- package/dist/client/assets/{sidebar-B0tKZ8v7.js → sidebar-BaKYje5H.js} +1 -1
- package/dist/client/assets/{skeleton-Cn79XS9y.js → skeleton-DWhDXNUH.js} +1 -1
- package/dist/client/assets/{spinner-BacUOjXK.js → spinner-CjAa-sPH.js} +1 -1
- package/dist/client/assets/{sso-ojlpi-BX.js → sso-Bj2UlJt6.js} +1 -1
- package/dist/client/assets/{store-UoSHkKa_.js → store-YfD9Wnyh.js} +1 -1
- package/dist/client/assets/store-registry-pcGrF9p4.js +2 -0
- package/dist/client/assets/{studio-tools-DARFxJQl.js → studio-tools-Bt6twF2O.js} +1 -1
- package/dist/client/assets/{switch-DomcwtKH.js → switch-CLB543ZX.js} +1 -1
- package/dist/client/assets/{tab-id-Ba3uxJ_r.js → tab-id-E3-rpOnl.js} +1 -1
- package/dist/client/assets/{table-T6KMsC6E.js → table-BkUJwywN.js} +1 -1
- package/dist/client/assets/{tabs-Bc8v3Em3.js → tabs-CUrHUr0C.js} +1 -1
- package/dist/client/assets/{textarea-C2xPMEh3.js → textarea-_kpFU1gC.js} +1 -1
- package/dist/client/assets/{toggle-group-CewQEDWu.js → toggle-group-DzvX03Se.js} +1 -1
- package/dist/client/assets/{toolbar-fu9TuGIj.js → toolbar-Bfscd_AO.js} +1 -1
- package/dist/client/assets/{tooltip-Dcjj14gg.js → tooltip-GW2DyJLV.js} +1 -1
- package/dist/client/assets/{use-ai-providers-KPNiLydR.js → use-ai-providers-BwjLzn7U.js} +1 -1
- package/dist/client/assets/{use-automations-Q4YYiiNK.js → use-automations-CVabhFuJ.js} +1 -1
- package/dist/client/assets/{use-autosave-DGbdO3ut.js → use-autosave-C-0TybV5.js} +1 -1
- package/dist/client/assets/{use-capability-BvI99AJE.js → use-capability-7F3PzOjI.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DcV2WKMA.js → use-clock-tick-DyK_4mkp.js} +1 -1
- package/dist/client/assets/{use-connection-B2VvkBiS.js → use-connection-KMNTjm45.js} +1 -1
- package/dist/client/assets/{use-copy-CLGByJfE.js → use-copy-ttE3tfUB.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D_hcjt9V.js → use-create-virtual-mcp-DhQO9gA9.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BNqNytXD.js → use-debounced-autosave-D0ErO20C.js} +1 -1
- package/dist/client/assets/{use-debounced-value-QEN1cKU3.js → use-debounced-value-oFI-ZZu5.js} +1 -1
- package/dist/client/assets/{use-deco-credits-hpgOnaq2.js → use-deco-credits-BEOen75e.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CMJj2bwK.js → use-decopilot-events-DJCN9WmR.js} +1 -1
- package/dist/client/assets/{use-delete-connection-hcNQugmI.js → use-delete-connection-BgPxGezM.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D3HHzcfh.js → use-deployment-admin-BdRe1jVl.js} +1 -1
- package/dist/client/assets/{use-file-configs-ChPDKI8Z.js → use-file-configs-BvS6lKL3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-s1_Fv-8s.js → use-infinite-scroll-BEDxOpbR.js} +1 -1
- package/dist/client/assets/{use-join-requests-BTmO2uMI.js → use-join-requests-Bs1r80wR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-42PkQvzM.js → use-mcp-client-J2akoQCG.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DtQnR7yz.js → use-mcp-tools-B1AdDqZd.js} +1 -1
- package/dist/client/assets/{use-members-Bze8CV3a.js → use-members-BSJzl9B_.js} +1 -1
- package/dist/client/assets/{use-mobile-D-knLN44.js → use-mobile-B21Exqzk.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CXWhPrYd.js → use-navigate-to-agent-BbUq2LGY.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-B6_gV_hr.js → use-open-billing-url-D5Yp4-ix.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DeLDh3lj.js → use-org-auth-client-CAbfHSfT.js} +1 -1
- package/dist/client/assets/{use-org-sso-D7zG-9rn.js → use-org-sso-DuHEve8n.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BAke5JaO.js → use-organization-roles-DkvrCtr9.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DUF-qv-f.js → use-organization-settings-CfB7lZCX.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CQmJge_O.js → use-registry-connections-D6aDbOx7.js} +1 -1
- package/dist/client/assets/{use-secrets-DESNFuAV.js → use-secrets-P9Lsm-7m.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BqqIW436.js → use-status-sounds-DsQVB8cv.js} +1 -1
- package/dist/client/assets/{use-tags-DWg0w_Nq.js → use-tags-Dh5OlPEI.js} +1 -1
- package/dist/client/assets/{use-view-mode-CvaYE5cE.js → use-view-mode-BLAVUQ6i.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BpO2J5oB.js → use-virtual-mcp-BbsY8Sm2.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CM2CVHiC.js +1 -0
- package/dist/client/assets/{useRouterState-b5PXbSWM.js → useRouterState-DHb6vPVl.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-qyvQUEBa.js +1 -0
- package/dist/client/assets/{users-zsf7FLMm.js → users-BisKIdWZ.js} +1 -1
- package/dist/client/assets/{variant-calendar-9jQtP_Ej.js → variant-calendar-B2ZCRsp-.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DChpYNJs.js → view-mode-toggle-DZJkZ-64.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-G4qVJoHN.js +0 -1
- package/dist/client/assets/record-editor-D7yJQ9eD.js +0 -1
- package/dist/client/assets/registry-DM1WMpEL.js +0 -2
- package/dist/client/assets/store-registry-B1RzMauQ.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DS0CsBJg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D2bmzTg7.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,n as p,x as q,K as T}from"./index-
|
|
1
|
+
import{c as m,n as p,x as q,K as T}from"./index-B_MMsAiE.js";function C(r){const e=m.c(12);let t,o;e[0]!==r?({client:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const n=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==n?(i={...o,queryKey:l,queryFn:s,staleTime:n,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=n,e[11]=i):i=e[11],q(i)}function K(r){const e=m.c(12);let t,o;e[0]!==r?({client:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const n=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==n?(i={...o,queryKey:l,queryFn:s,staleTime:n,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=n,e[11]=i):i=e[11],p(i)}function O(r){const e=m.c(21);let t,o,l,s;e[0]!==r?({client:t,toolName:s,toolArguments:l,...o}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let n,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=q,n=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=n,e[10]=i,e[11]=u}else n=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==n||e[17]!==i||e[18]!==a||e[19]!==y?(c={...n,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=n,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}function w(r){const e=m.c(21);let t,o,l,s;e[0]!==r?({client:t,toolName:s,toolArguments:l,...o}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let n,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=p,n=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=n,e[10]=i,e[11]=u}else n=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==n||e[17]!==i||e[18]!==a||e[19]!==y?(c={...n,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=n,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{K as a,C as b,O as c,w as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,F as m,x as b,K as f,n as M}from"./index-
|
|
1
|
+
import{c,F as m,x as b,K as f,n as M}from"./index-B_MMsAiE.js";import{u as y}from"./use-org-auth-client-CAbfHSfT.js";const p=300*1e3;function d(){const t=c.c(7),{locator:e}=m(),o=y();let r;t[0]!==e?(r=f.members(e),t[0]=e,t[1]=r):r=t[1];let s;t[2]!==o?(s=()=>o.organization.listMembers(),t[2]=o,t[3]=s):s=t[3];let n;return t[4]!==r||t[5]!==s?(n={queryKey:r,queryFn:s},t[4]=r,t[5]=s,t[6]=n):n=t[6],b(n)}function q(t){const e=c.c(10);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const{enabled:r}=o,s=r===void 0?!0:r,{locator:n}=m(),a=y();let u;e[2]!==n?(u=f.members(n),e[2]=n,e[3]=u):u=e[3];let i;e[4]!==a?(i=()=>a.organization.listMembers(),e[4]=a,e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==u||e[8]!==i?(l={queryKey:u,queryFn:i,staleTime:p,enabled:s},e[6]=s,e[7]=u,e[8]=i,e[9]=l):l=e[9],M(l)}export{q as a,d as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r}from"./index-
|
|
1
|
+
import{c as m,r}from"./index-B_MMsAiE.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
package/dist/client/assets/{use-navigate-to-agent-CXWhPrYd.js → use-navigate-to-agent-BbUq2LGY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as y,r as c,c as b,j as A,d as C,F as E,a as $}from"./index-
|
|
1
|
+
import{G as y,r as c,c as b,j as A,d as C,F as E,a as $}from"./index-B_MMsAiE.js";import{a as _}from"./use-virtual-mcp-BbsY8Sm2.js";import{c as G}from"./hooks-XfMYeEIs.js";import{f as P}from"./reusable-new-chat-CouMjkYR.js";const h=new Map;function I(e){return`${e.orgId}:${e.userId}`}function w(e){return`sidebar.group-order.${e}`}function O(e){try{const t=localStorage.getItem(e),r=t?JSON.parse(t):[];return Array.isArray(r)?r.filter(s=>typeof s=="string"):[]}catch{return[]}}function N(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function U(e){const t=I(e),r=h.get(t);if(r)return r;const s=y.sidebarGroupOrder(e.orgId,e.userId);let a=!1;try{a=localStorage.getItem(s)!==null}catch{}let o=O(s);if(!a&&o.length===0&&e.userId!=="anon"){const i=O(w(e.orgId));i.length>0&&(o=i)}return h.set(t,o),o}function T(e,t){const r=new Set(t);return U(e).filter(s=>!r.has(s))}function j(e,t){h.set(I(e),t),N(y.sidebarGroupOrder(e.orgId,e.userId),t)}function K(e,t,r=[]){if(r.includes(t))return;const s=T(e,r);s.includes(t)||j(e,[t,...s])}const S=c.createContext(null);function Q(e){const t=b.c(7),{children:r}=e,[s,a]=c.useState(!1),[o,i]=c.useState(0);let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(k),t[0]=d):d=t[0];const l=d;let n;t[1]!==s||t[2]!==o?(n={empty:s,setEmpty:a,orderRevision:o,bumpOrderRevision:l},t[1]=s,t[2]=o,t[3]=n):n=t[3];let u;return t[4]!==r||t[5]!==n?(u=A.jsx(S.Provider,{value:n,children:r}),t[4]=r,t[5]=n,t[6]=u):u=t[6],u}function k(e){return e+1}function W(){return c.useContext(S)?.empty??!1}function D(){return c.useContext(S)?.bumpOrderRevision??J}function J(){}const v=[],L=()=>()=>{};function B(e){return(e??[]).filter(t=>!!t.pinned).map(t=>t.id)}function X(){const e=b.c(15),t=C(),{org:r}=E(),s=_(),{data:a}=$.useSession(),o=a?.user?.id??"anon";let i;e[0]!==s?(i=B(s),e[0]=s,e[1]=i):i=e[1];const d=i,l=D(),n=G();let u;e[2]!==n?.threads.get?(u=n?.threads.get??H,e[2]=n?.threads.get,e[3]=u):u=e[3];let f;e[4]!==n?.threads.get?(f=n?.threads.get??F,e[4]=n?.threads.get,e[5]=f):f=e[5];const m=c.useSyncExternalStore(n?.threads.subscribe??L,u,f);let g;return e[6]!==l||e[7]!==t||e[8]!==r.id||e[9]!==r.slug||e[10]!==d||e[11]!==a?.user?.id||e[12]!==o||e[13]!==m?(g=(p,x)=>{K({orgId:r.id,userId:o},p,d),l();const R=P(m,p,a?.user?.id)?.id??crypto.randomUUID();t({to:"/$org/$taskId",params:{org:r.slug,taskId:R},search:{...x?.search??{},virtualmcpid:p}})},e[6]=l,e[7]=t,e[8]=r.id,e[9]=r.slug,e[10]=d,e[11]=a?.user?.id,e[12]=o,e[13]=m,e[14]=g):g=e[14],g}function F(){return v}function H(){return v}export{Q as S,D as a,K as b,X as c,B as g,W as u};
|
package/dist/client/assets/{use-open-billing-url-B6_gV_hr.js → use-open-billing-url-D5Yp4-ix.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,b as l,e as p,t as f}from"./index-
|
|
1
|
+
import{c,b as l,e as p,t as f}from"./index-B_MMsAiE.js";import{u as m}from"./studio-tools-Bt6twF2O.js";function b(n,r){const t=c.c(9),u=m(),i=l();let e;t[0]!==u||t[1]!==n?(e=async()=>{const{url:a}=await u.call(n,{});return a},t[0]=u,t[1]=n,t[2]=e):e=t[2];let s;t[3]!==r||t[4]!==i?(s=a=>f.error(i(r,{message:a.message})),t[3]=r,t[4]=i,t[5]=s):s=t[5];let o;return t[6]!==e||t[7]!==s?(o={mutationFn:e,onSuccess:d,onError:s},t[6]=e,t[7]=s,t[8]=o):o=t[8],p(o)}function d(n){return window.open(n,"_blank","noopener,noreferrer")}export{b as u};
|
package/dist/client/assets/{use-org-auth-client-DeLDh3lj.js → use-org-auth-client-CAbfHSfT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,F as j,a as i}from"./index-
|
|
1
|
+
import{c as x,F as j,a as i}from"./index-B_MMsAiE.js";function A(){const e=x.c(32),{org:O}=j(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let I;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(I={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=I):I=e[31],I}export{A as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,n as S,o as r,e as y,K as c}from"./index-
|
|
1
|
+
import{c as u,n as S,o as r,e as y,K as c}from"./index-B_MMsAiE.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
|
package/dist/client/assets/{use-organization-roles-BAke5JaO.js → use-organization-roles-DkvrCtr9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as R}from"./use-org-auth-client-
|
|
1
|
+
import{u as R}from"./use-org-auth-client-CAbfHSfT.js";import{F as b,n as P,K as y}from"./index-B_MMsAiE.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let i=!1;const u=[];let c=!1;const a=new Set;let s=!1,f=0,e=!1;for(const[l,o]of Object.entries(t)){if(l==="self"){o.includes("*")?i=!0:n.push(...o);continue}if(l==="models"){o.includes("*:*")?e=!0:f=o.length;continue}if(l==="*"){if(c=!0,o.includes("*"))s=!0;else for(const r of o)a.add(r);continue}if(u.push(l),o.includes("*"))s=!0;else for(const r of o)a.add(r)}return{staticPermissions:n,allowsAllStaticPermissions:i,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(a),allowsAllTools:s,modelCount:f,allowsAllModels:e}}function I(){const{locator:t}=b(),n=R(),{data:i,isLoading:u,error:c,refetch:a}=P({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const e=await n.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),s=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(i&&Array.isArray(i))for(const e of i){const l=e.role;if(!l||w.some(h=>h.value===l))continue;const{staticPermissions:o,allowsAllStaticPermissions:r,connectionIds:g,allowsAllConnections:m,toolNames:p,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(e.permission);s.push({id:e.id,role:l,label:B(l),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:r?-1:o.length,allowsAllStaticPermissions:r,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:p.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(e=>!e.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:a}}export{I as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,F as y,n as E,K as _,o as I,e as M,r as R}from"./index-
|
|
1
|
+
import{c as l,F as y,n as E,K as _,o as I,e as M,r as R}from"./index-B_MMsAiE.js";import{W as D}from"./use-mcp-client-J2akoQCG.js";import{c as b,u as G}from"./studio-tools-Bt6twF2O.js";const O={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null,flags:null,main_agent_id:null},N={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function $(t,e){return{queryKey:_.organizationSettings(e),queryFn:async()=>{try{return await b(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...O,organizationId:e}}},staleTime:6e4}}function m(t){const e=l.c(6),{org:s}=y();let n;e[0]!==s.id||e[1]!==s.slug?(n=$(s.slug,s.id),e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const i=t;let a;return e[3]!==n||e[4]!==i?(a={...n,select:i},e[3]=n,e[4]=i,e[5]=a):a=e[5],E(a)}function Z(t,e){const s=l.c(3);let n;s[0]!==t||s[1]!==e?(n=$(e,t),s[0]=t,s[1]=e,s[2]=n):n=s[2];const{data:i}=E(n);return i??null}function f(){const t=l.c(9),{org:e}=y(),s=G(),n=I();let i;t[0]!==e||t[1]!==s?(i=async r=>{const o=await s.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...r});if(!o)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return o},t[0]=e,t[1]=s,t[2]=i):i=t[2];let a;t[3]!==e||t[4]!==n?(a=r=>{n.setQueryData(_.organizationSettings(e.id),o=>({...o??O,...r}))},t[3]=e,t[4]=n,t[5]=a):a=t[5];let u;return t[6]!==i||t[7]!==a?(u={mutationFn:i,onSuccess:a},t[6]=i,t[7]=a,t[8]=u):u=t[8],M(u)}function P(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:N}function j(){const{data:t}=m(Q);return t??N}function Q(t){return P(t.simple_mode)}function B(){const t=l.c(7),e=f();let s,n;t[0]!==e?(s=(a,u)=>e.mutate({simple_mode:a},u),n=(a,u)=>e.mutateAsync({simple_mode:a},u),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function L(){return C("reports_only")}function C(t){const e=l.c(2);let s;e[0]!==t?(s=i=>i.flags?.[t]??!1,e[0]=t,e[1]=s):s=e[1];const{data:n}=m(s);return n??!1}function v(){const t=l.c(7),e=f();let s,n;t[0]!==e?(s=(a,u,r)=>e.mutate({flags:{[a]:u}},r),n=(a,u,r)=>e.mutateAsync({flags:{[a]:u}},r),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function k(){const{data:t}=m(x);return t??null}function x(t){return t.registry_config}function J(){const t=l.c(7),e=f();let s,n;t[0]!==e?(s=(a,u)=>e.mutate({registry_config:a},u),n=(a,u)=>e.mutateAsync({registry_config:a},u),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function V(){const{data:t}=m(U);return t??null}function U(t){return t.default_home_agents}function q(){const t=l.c(7),e=f();let s,n;t[0]!==e?(s=(a,u)=>e.mutate({default_home_agents:a},u),n=(a,u)=>e.mutateAsync({default_home_agents:a},u),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function X(){const t=l.c(14),{org:e}=y(),s=q(),n=I();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=Promise.resolve(),t[0]=i):i=t[0];const a=R.useRef(i);let u;t[1]!==e.id?(u=_.organizationSettings(e.id),t[1]=e.id,t[2]=u):u=t[2];const r=u;let o;t[3]!==r||t[4]!==n?(o=()=>n.getQueryData(r)?.default_home_agents?.ids??[],t[3]=r,t[4]=n,t[5]=o):o=t[5];const p=o;let g;t[6]!==r||t[7]!==e.slug||t[8]!==n||t[9]!==s?(g=w=>{const S=a.current.then(async()=>{const T=n.getQueryData(r),A=w(T?.default_home_agents?.ids??[]);if(A!==null){n.setQueryData(r,c=>c&&{...c,default_home_agents:{ids:A}});try{await s.mutateAsync({ids:A}),await n.refetchQueries({queryKey:_.homeNextActions(e.slug),type:"active"})}catch(c){const z=c;throw n.setQueryData(r,T),z}}});return a.current=S.catch(F),S},t[6]=r,t[7]=e.slug,t[8]=n,t[9]=s,t[10]=g):g=t[10];const h=g;let d;return t[11]!==h||t[12]!==p?(d={currentIds:p,apply:h},t[11]=h,t[12]=p,t[13]=d):d=t[13],d}function F(){}function tt(){const t=l.c(3),{data:e,isPending:s}=m(K),n=e??null;let i;return t[0]!==s||t[1]!==n?(i={mainAgentId:n,isPending:s},t[0]=s,t[1]=n,t[2]=i):i=t[2],i}function K(t){return t.main_agent_id??null}function et(){const t=l.c(7),e=f();let s,n;t[0]!==e?(s=(a,u)=>e.mutate({main_agent_id:a},u),n=(a,u)=>e.mutateAsync({main_agent_id:a},u),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function nt(){const t=l.c(5),{org:e}=y(),s=k();let n;t[0]!==e.id?(n=D.REGISTRY(e.id),t[0]=e.id,t[1]=n):n=t[1];const i=n;let a;return t[2]!==i||t[3]!==s?(a=u=>{if(!s)return u===i;const r=s.registries[u];return r?r.enabled:u===i},t[2]=i,t[3]=s,t[4]=a):a=t[4],a}export{L as a,j as b,V as c,X as d,tt as e,nt as f,Z as g,et as h,v as i,B as j,k,J as l,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,F as R}from"./index-
|
|
1
|
+
import{c as C,F as R}from"./index-B_MMsAiE.js";import{u as p}from"./use-connection-KMNTjm45.js";import{W as a}from"./use-mcp-client-J2akoQCG.js";import{k as y}from"./use-organization-settings-CfB7lZCX.js";function M(){const e=C.c(19),{org:i}=R(),o=y();let l;e[0]!==i.id?(l=a.REGISTRY(i.id),e[0]=i.id,e[1]=l):l=e[1];const d=l;let f;e[2]!==i.id?(f=a.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=f):f=e[3];const g=f;let r;e[4]!==g||e[5]!==d?(r=[d,g],e[4]=g,e[5]=d,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const u of s)t.add(u)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const m=p();let n;e[12]!==m?(n=m??[],e[12]=m,e[13]=n):n=e[13];let c;if(e[14]!==t||e[15]!==n){let s;e[17]!==t?(s=u=>t.has(u.id),e[17]=t,e[18]=s):s=e[18],c=n.filter(s),e[14]=t,e[15]=n,e[16]=c}else c=e[16];return c}export{M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,F as a,K as c,x as y,o as d,e as S}from"./index-
|
|
1
|
+
import{c as r,F as a,K as c,x as y,o as d,e as S}from"./index-B_MMsAiE.js";import{u as l}from"./studio-tools-Bt6twF2O.js";function C(){const e=r.c(7),{org:i}=a(),u=l();let o;e[0]!==i.id?(o=c.secrets(i.id),e[0]=i.id,e[1]=o):o=e[1];let t;e[2]!==u?(t=async()=>await u.call("SECRET_LIST",{}),e[2]=u,e[3]=t):t=e[3];let s;e[4]!==o||e[5]!==t?(s={queryKey:o,staleTime:6e4,queryFn:t},e[4]=o,e[5]=t,e[6]=s):s=e[6];const{data:n}=y(s);return n.secrets}function p(){const e=r.c(8),{org:i}=a(),u=l(),o=d();let t;e[0]!==u?(t=async f=>await u.call("SECRET_CREATE",{...f}),e[0]=u,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==o?(s=()=>{o.invalidateQueries({queryKey:c.secrets(i.id)})},e[2]=i,e[3]=o,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],S(n)}export{p as a,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,v as u}from"./index-
|
|
1
|
+
import{c as r,v as u}from"./index-B_MMsAiE.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-DJCN9WmR.js";const p=new Set(["completed","failed","requires_action"]);function q(s){const e=r.c(5),[n]=u();let t;e[0]!==n?(t=o=>{n.enableSounds&&p.has(o.data.status)&&i(c.dataUri).catch(l)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function l(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,F as f,n as E,o as g,e as T,K as l,t as m}from"./index-
|
|
1
|
+
import{c as u,F as f,n as E,o as g,e as T,K as l,t as m}from"./index-B_MMsAiE.js";import{u as y}from"./studio-tools-Bt6twF2O.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],E(a)}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){m.error(e instanceof Error?e.message:"Failed to create tag")}function M(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){m.error(e instanceof Error?e.message:"Failed to delete tag")}function A(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],E(c)}function G(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){m.error(e instanceof Error?e.message:"Failed to update member tags")}export{C as a,M as b,A as c,G as d,K as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,r as f}from"./index-
|
|
1
|
+
import{c as p,r as f}from"./index-B_MMsAiE.js";import{u as w}from"./use-mobile-B21Exqzk.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,F as a,d$ as P,bd as L,K as S,bc as p,n as V}from"./index-
|
|
1
|
+
import{c as d,F as a,d$ as P,bd as L,K as S,bc as p,n as V}from"./index-B_MMsAiE.js";import{S as g,u as C}from"./use-mcp-client-J2akoQCG.js";function U(e){const t=d.c(5);let s;t[0]!==e?(s=e===void 0?{}:e,t[0]=e,t[1]=s):s=t[1];const n=s,{org:i}=a();let o;t[2]!==i.id||t[3]!==i.slug?(o={connectionId:g,orgId:i.id,orgSlug:i.slug},t[2]=i.id,t[3]=i.slug,t[4]=o):o=t[4];const l=C(o);return P(i.id,"VIRTUAL_MCP",l,n)}function b(e){const t=d.c(3),{org:s}=a();let n;t[0]!==s.id||t[1]!==s.slug?(n={connectionId:g,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=n):n=t[2];const i=C(n);return p(s.id,"VIRTUAL_MCP",e??void 0,i)}function y(e){const t=d.c(15),{org:s}=a();let n;t[0]!==s.id||t[1]!==s.slug?(n={connectionId:g,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=n):n=t[2];const i=C(n);let o,l,u;t[3]!==e||t[4]!==s.id?(o=[...e].sort(),u=V,l=S.virtualMcpLastUsed(s.id,o),t[3]=e,t[4]=s.id,t[5]=o,t[6]=l,t[7]=u):(o=t[5],l=t[6],u=t[7]);const I=o.length>0;let c;t[8]!==i||t[9]!==o?(c=async()=>{const M=(await i.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:o}})).structuredContent??{items:[]},f=new Map;for(const m of M.items)f.set(m.id,m);return f},t[8]=i,t[9]=o,t[10]=c):c=t[10];let r;return t[11]!==l||t[12]!==I||t[13]!==c?(r={queryKey:l,enabled:I,staleTime:3e4,queryFn:c},t[11]=l,t[12]=I,t[13]=c,t[14]=r):r=t[14],u(r)}function R(){const e=d.c(3),{org:t}=a();let s;e[0]!==t.id||e[1]!==t.slug?(s={connectionId:g,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=s):s=e[2];const n=C(s);return L(t.id,"VIRTUAL_MCP",n)}export{U as a,R as b,y as c,b as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as u}from"./use-infinite-scroll-BEDxOpbR.js";import{e5 as i}from"./index-B_MMsAiE.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b3 as s,r as c,b4 as a,b5 as i}from"./index-
|
|
1
|
+
import{b3 as s,r as c,b4 as a,b5 as i}from"./index-B_MMsAiE.js";function f(r){const n=s({warn:r?.router===void 0}),t=r?.router||n,u=c.useRef(void 0);return a(t.stores.__store,e=>{if(r?.select){if(r.structuralSharing??t.options.defaultStructuralSharing){const o=i(u.current,r.select(e));return u.current=o,o}return r.select(e)}return e})}export{f as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as s}from"./use-infinite-scroll-BEDxOpbR.js";import{e5 as u,b2 as n}from"./index-B_MMsAiE.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,b as q,r as z,a as O,n as Y,e as $,j as t,K as J,t as Q,B as W}from"./index-
|
|
1
|
+
import{c as V,b as q,r as z,a as O,n as Y,e as $,j as t,K as J,t as Q,B as W}from"./index-B_MMsAiE.js";import{P as I}from"./index-Dw7ePJkF.js";import{C as G}from"./collection-table-wrapper-D02H5hcq.js";import{E as L}from"./empty-state-CkwReOEQ.js";import{S as H}from"./search-input-DMrgq14n.js";import{A as X}from"./avatar-ICdV2BRR.js";import{B as D}from"./badge-CCx5WpWL.js";import{u as Z}from"./use-debounced-value-oFI-ZZu5.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BnbuEtat.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./sidebar-BaKYje5H.js";import"./LayoutLeft-Ct7sobUG.js";import"./use-mobile-B21Exqzk.js";import"./X-C0IBj9M7.js";import"./tooltip-GW2DyJLV.js";import"./table-BkUJwywN.js";import"./ArrowUp-A7Mx0wQq.js";import"./SearchMd-D51gG9yR.js";import"./User01-Dkl2AAm0.js";import"./differenceInSeconds-NQ4PDo0z.js";function be(){const e=V.c(58),s=q(),[a,M]=z.useState("");let N;e[0]!==a?(N=a.trim(),e[0]=a,e[1]=N):N=e[1];const r=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==r?(n=J.deploymentAdminUsers(r),e[2]=r,e[3]=n):n=e[3];let l;e[4]!==r?(l=()=>{const i=new URLSearchParams({limit:"100"});return r&&i.set("searchValue",r),K(`/api/_admin/users?${i}`)},e[4]=r,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:re,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==a||e[44]!==j?(g=t.jsx(H,{value:a,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=a,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==r||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:r?s("admin.users.noUsersMatchSearch",{search:r}):s("admin.users.noUsersYet")}),e[46]=r,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function re(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,b as tt,r as et,j as s,m as ot,B as nt}from"./index-BR_jD8W6.js";import{u as vt,a9 as dt,f as yt}from"./agent-icon-D5OVtYPP.js";import{i as Tt}from"./ChevronRight-SRezhA8m.js";import{L as jt}from"./label-DtYAPCcl.js";import{C as ft}from"./automation-runs-i4z7qF-v.js";import{S as Nt}from"./switch-DomcwtKH.js";import{T as wt,c as kt,a as Mt}from"./tooltip-Dcjj14gg.js";import{V as _t}from"./view-mode-toggle-DChpYNJs.js";import"./AlertCircle-P2HKgtqw.js";import"./Tool01-CIAT9egH.js";import"./ArrowUp-2QnjJkvm.js";import"./Settings02-Bwc4Ou5c.js";import"./Tool02-DOZgL63b.js";import"./XCircle-D-1wEwqz.js";import"./ArrowUpRight-Cc3pr966.js";import"./TrendUp01-ExM3QBvB.js";import"./ZapSquare-WZJLHByv.js";import"./Users03-X07cigY1.js";import"./CheckCircle-CQ2a3-uE.js";import"./Check-D9Gv3e7Y.js";import"./ChevronDown-QYJIoaz5.js";import"./ChevronUp-DNvu894s.js";import"./DotsVertical-pQ-LPc7h.js";import"./Stars02-Csd8Nq8B.js";import"./Copy01-B0fooHit.js";import"./CpuChip01-CSBVNRdU.js";import"./CreditCard01-5PQDe0L_.js";import"./Eye-BL6snfIb.js";import"./FilterLines-ChWMAGnL.js";import"./Star01-Ckd0-vPz.js";import"./Palette-CXX1NJKF.js";import"./SwitchHorizontal01-CksktbpR.js";import"./HardDrive-BaMAVhr_.js";import"./Key01-BKEduGqA.js";import"./LayoutLeft-CGFBFtgN.js";import"./LinkExternal01-E87yxpAR.js";import"./LogOut01-DZHSQ5mw.js";import"./Monitor01-O_C0vR1B.js";import"./Sun-Cb_1ZeKB.js";import"./Play-BiK4mJxt.js";import"./Plus-BWQTEgou.js";import"./SearchLg-BwSJkB3J.js";import"./SearchMd-LsvVvvC0.js";import"./Shield01-CBCBOZto.js";import"./Stars01-nWiq-uAI.js";import"./Trash01-Ds258bVF.js";import"./Upload01-DLlME6A5.js";import"./User01-xq5WLuS1.js";import"./Users01-aFZ8ECBq.js";import"./XClose-BqFNQcHS.js";import"./X-BcI5xbtc.js";import"./Zap-D-UB-kDR.js";import"./select-NereDSEc.js";import"./useInfiniteQuery-DS0CsBJg.js";import"./use-infinite-scroll-s1_Fv-8s.js";import"./use-connection-B2VvkBiS.js";import"./use-mcp-client-42PkQvzM.js";import"./auth-BZABTTKv.js";import"./use-virtual-mcp-BpO2J5oB.js";import"./card-C-s8pHIa.js";import"./sidebar-B0tKZ8v7.js";import"./use-mobile-D-knLN44.js";import"./table-T6KMsC6E.js";import"./empty-state-Bp4JRlF8.js";import"./use-members-Bze8CV3a.js";import"./use-org-auth-client-DeLDh3lj.js";import"./use-clock-tick-DcV2WKMA.js";import"./use-automations-Q4YYiiNK.js";import"./studio-tools-DARFxJQl.js";import"./useSuspenseInfiniteQuery-D2bmzTg7.js";import"./avatar-CSNZjLhH.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CLGByJfE.js";import"./dialog-B0y4FNeh.js";import"./tab-id-Ba3uxJ_r.js";import"./hooks-BuDFWsHu.js";import"./decopilot-sse-pool-CFtVw7wk.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DwjnCD5v.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-KPNiLydR.js";import"./use-decopilot-events-CMJj2bwK.js";import"./use-organization-settings-DUF-qv-f.js";import"./monaco-editor-BhwNEk5p.js";import"./spinner-BacUOjXK.js";import"./index-CA4irSam.js";import"./shell-layout-Dx2uIQi3.js";import"./required-auth-layout-CPu1utr5.js";import"./use-org-sso-D7zG-9rn.js";import"./integration-icon-6jigSrAM.js";import"./use-navigate-to-agent-CXWhPrYd.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DKnQ34DX.js";import"./form-BOGnGAg0.js";import"./input-bUQSb5Y2.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Dt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",i=typeof n=="string";if(!r&&!i)return null;const o=r?new Date(t):Ct,a=i?new Date(n):Dt;return Number.isNaN(o.getTime())||Number.isNaN(a.getTime())||r&&i&&a.getTime()<=o.getTime()?null:{start:o,end:a,openStart:!r,openEnd:!i}}function pt(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(Et.has(n)){const r=Rt(e);r&&t.push(r);return}if(St.has(n)){const r=e.matchers;if(Array.isArray(r))for(const i of r)pt(i,t)}}}function Ot(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const n=e.variants;return Array.isArray(n)}function It(e){if(typeof e=="string"){const m=e.trim();if(m.length===0)return null;try{const c=new URL(m).pathname.split("/").filter(Boolean),d=c[c.length-1];if(d)return decodeURIComponent(d)}catch{}return m.length>80?`${m.slice(0,77)}…`:m}if(!e||typeof e!="object")return null;const t=e,n=t.config,i=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,i?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const m of o)if(typeof m=="string"&&m.trim().length>0)return m.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function X(e,t,n,r,i){if(Ot(e)){const o=e.variants,a=e.__resolveType,m=$t.test(a)?"":Pt(r);o.forEach((l,c)=>{if(!l||typeof l!="object")return;const d=l,p=[];if(pt(d.rule,p),p.length===0)return;const x=It(d.value)??(m||n);for(const h of p)i.push({blockKey:t,blockLabel:n,innerPath:m,variantIndex:c,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:a})});for(let l=0;l<o.length;l++){const c=o[l];c&&typeof c=="object"&&X(c.value,t,n,[...r,"variants",l,"value"],i)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)X(e[o],t,n,[...r,o],i);return}if(e&&typeof e=="object")for(const[o,a]of Object.entries(e))o!=="__resolveType"&&X(a,t,n,[...r,o],i)}function Ft(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))X(r,n,Lt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,i)=>{const o=i*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),n}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ut(e,t){return e.get(t)??Ht}const Bt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=1440*60*1e3;function B(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function xt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function G(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function st(e,t){return Math.round((B(e).getTime()-B(t).getTime())/gt)}function Wt(e){const t=(e.getTime()-B(e).getTime())/gt;return Math.min(Math.max(t,0),1)}function it(e,t){return st(e,t)+Wt(e)}function zt(e){const t=Z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const i=[];for(let o=0;o<7;o++)i.push(Z(t,r*7+o));n.push(i)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Ut(e,t){const n=B(e[0]),r=Z(n,7),i=n.getTime(),o=r.getTime(),a=[];for(const c of t){const d=B(c.start),p=B(c.end);if(p.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=p.getTime()>=r.getTime()?Z(r,-1):p,h=st(u,n),g=st(x,u)+1;if(g<=0)continue;const b=Math.max(c.start.getTime(),i),j=Math.min(c.end.getTime(),o),v=it(new Date(b),n),f=Math.max(it(new Date(j),n)-v,0);f<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:f})}a.sort((c,d)=>c.startCol-d.startCol||d.span-c.span||c.variant.blockKey.localeCompare(d.variant.blockKey));const m=[],l=[];for(const c of a){let d=m.findIndex(p=>p<=c.startCol);d===-1&&(d=m.length,m.push(0)),m[d]=c.startCol+c.span,l.push({...c,lane:d})}return l}const at=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Yt(e,t){const n=e.openStart?t("sandbox.variantCalendar.always"):at.format(e.start),r=e.openEnd?t("sandbox.variantCalendar.ongoing"):at.format(e.end);return`${n} → ${r}`}function Gt(e){const t=K.c(18),{variant:n}=e,r=tt();let i;t[0]!==n.blockLabel?(i=s.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=i):i=t[1];let o;t[2]!==n.innerPath?(o=n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=o):o=t[3];let a;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(a=n.label!==n.blockLabel&&n.label!==n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=a):a=t[7];let m;t[8]!==r||t[9]!==n?(m=Yt(n,r),t[8]=r,t[9]=n,t[10]=m):m=t[10];let l;t[11]!==m?(l=s.jsx("div",{className:"mt-1",children:m}),t[11]=m,t[12]=l):l=t[12];let c;return t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==l?(c=s.jsx(Mt,{children:s.jsxs("div",{className:"text-xs",children:[i,o,a,l]})}),t[13]=i,t[14]=o,t[15]=a,t[16]=l,t[17]=c):c=t[17],c}const lt=16;function Kt(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${lt}px, #000 calc(100% - ${lt}px), ${r})`}function bt(e){const t=K.c(26),{variant:n,color:r,style:i,children:o,fadeStart:a,fadeEnd:m}=e,l=a===void 0?!1:a,c=m===void 0?!1:m;let d;t[0]!==c||t[1]!==l?(d=Kt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const p=d;let u;t[3]!==l?(u=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=u):u=t[4];let x;t[5]!==c?(x=c&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=c,t[6]=x):x=t[6];let h;t[7]!==p?(h=p&&{maskImage:p,WebkitMaskImage:p},t[7]=p,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==i||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...i},t[9]=r.bg,t[10]=r.text,t[11]=i,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let j;t[18]!==g||t[19]!==b?(j=s.jsx(wt,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=j):j=t[20];let v;t[21]!==n?(v=s.jsx(Gt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let f;return t[23]!==v||t[24]!==j?(f=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=f):f=t[25],f}function Zn(e){const t=K.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,p,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),p=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=p,t[4]=u}else d=t[2],p=t[3],u=t[4];const x=p;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>m(xt(new Date)),t[5]=h):h=t[5];const g=h;let b;t[6]!==i?(b=()=>m(P=>i==="calendar"?G(P,-1):G(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?G(P,1):G(P,3)),t[8]=i,t[9]=v):v=t[9];const f=v;let y;t[10]!==r?(y=r("sandbox.variantCalendar.today"),t[10]=r,t[11]=y):y=t[11];let T;t[12]!==y?(T=s.jsx(nt,{variant:"outline",size:"sm",onClick:g,children:y}),t[12]=y,t[13]=T):T=t[13];let w;t[14]!==r?(w=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=w):w=t[15];let D;t[16]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(vt,{size:16}),t[16]=D):D=t[16];let k;t[17]!==j||t[18]!==w?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":w,children:D}),t[17]=j,t[18]=w,t[19]=k):k=t[19];let M;t[20]!==r?(M=r("sandbox.variantCalendar.next"),t[20]=r,t[21]=M):M=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Tt,{size:16}),t[22]=S):S=t[22];let A;t[23]!==f||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:f,"aria-label":M,children:S}),t[23]=f,t[24]=M,t[25]=A):A=t[25];const $=ht[a.getMonth()];let C;t[26]!==a?(C=a.getFullYear(),t[26]=a,t[27]=C):C=t[27];let _;t[28]!==$||t[29]!==C?(_=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[$," ",C]}),t[28]=$,t[29]=C,t[30]=_):_=t[30];let N;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[T,k,A,_]}),t[31]=A,t[32]=_,t[33]=T,t[34]=k,t[35]=N):N=t[35];let L;t[36]!==d||t[37]!==l||t[38]!==r?(L=d>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nt,{id:"show-ongoing",checked:l,onCheckedChange:c}),s.jsx(jt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:r("sandbox.variantCalendar.showOngoing",{count:d})})]}),t[36]=d,t[37]=l,t[38]=r,t[39]=L):L=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(dt,{}),t[40]=H):H=t[40];let F;t[41]!==r?(F=r("sandbox.variantCalendar.calendarMode"),t[41]=r,t[42]=F):F=t[42];let E;t[43]!==F?(E={value:"calendar",icon:H,label:F},t[43]=F,t[44]=E):E=t[44];let W;t[45]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(yt,{}),t[45]=W):W=t[45];let R;t[46]!==r?(R=r("sandbox.variantCalendar.timelineMode"),t[46]=r,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:W,label:R},t[48]=R,t[49]=O):O=t[49];let I;t[50]!==E||t[51]!==O?(I=[E,O],t[50]=E,t[51]=O,t[52]=I):I=t[52];let V;t[53]!==I||t[54]!==i?(V=s.jsx(_t,{value:i,onValueChange:o,options:I}),t[53]=I,t[54]=i,t[55]=V):V=t[55];let z;t[56]!==L||t[57]!==V?(z=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=z):z=t[58];let U;t[59]!==N||t[60]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[N,z]}),t[59]=N,t[60]=z,t[61]=U):U=t[61];let Y;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(Y=u.length===0?s.jsx(Zt,{hiddenOngoing:l?0:d}):i==="calendar"?s.jsx(ee,{monthStart:a,variants:u,colorMap:x}):s.jsx(oe,{monthStart:a,variants:u,colorMap:x}),t[62]=x,t[63]=a,t[64]=d,t[65]=l,t[66]=u,t[67]=i,t[68]=Y):Y=t[68];let q;return t[69]!==U||t[70]!==Y?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[U,Y]}),t[69]=U,t[70]=Y,t[71]=q):q=t[71],q}function Jt(e){return e.blockKey}function qt(e){return!e.openEnd}function Qt(e){return e.openEnd}function Xt(){return xt(new Date)}function Zt(e){const t=K.c(4),{hiddenOngoing:n}=e,r=n===void 0?0:n,i=tt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{size:24,className:"text-muted-foreground/60"}),t[0]=o):o=t[0];let a;return t[1]!==r||t[2]!==i?(a=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[o,r>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noDatedVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.hiddenOngoingVariants",{count:r})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noScheduledVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=r,t[2]=i,t[3]=a):a=t[3],a}const rt=20,ct=2,mt=28,te=6;function ee(e){const t=K.c(17),{monthStart:n,variants:r,colorMap:i}=e;let o,a,m,l,c;if(t[0]!==i||t[1]!==n||t[2]!==r){const u=zt(n),x=B(new Date);o=ft,c="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Bt.map(re)}),t[8]=m):m=t[8],l=u.map((h,g)=>{const b=Ut(h,r),j=b.reduce(ne,0),v=mt+j*(rt+ct)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:v},children:[h.map((f,y)=>{const T=f.getMonth()===n.getMonth(),w=f.getTime()===x.getTime();return s.jsx("div",{className:ot("border-r last:border-r-0 px-2 pt-1.5 text-xs",T?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:ot("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",w&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},y)}),b.map((f,y)=>{const T=ut(i,f.variant.blockKey),w=mt+f.lane*(rt+ct),D=f.leftUnits/7*100,k=f.widthUnits/7*100,M=f.variant.openStart&&g===0,S=f.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:f.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:w,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${g}-${y}`)})]},g)}),t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=m,t[6]=l,t[7]=c}else o=t[3],a=t[4],m=t[5],l=t[6],c=t[7];let d;t[9]!==a||t[10]!==m||t[11]!==l?(d=s.jsxs("div",{className:a,children:[m,l]}),t[9]=a,t[10]=m,t[11]=l,t[12]=d):d=t[12];let p;return t[13]!==o||t[14]!==c||t[15]!==d?(p=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=p):p=t[16],p}function ne(e,t){return Math.max(e,t.lane+1)}function re(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const Q=4,se=32,J=240;function oe(e){const t=K.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=G(n,Q),m=new Date,l=new Map;for(const _ of r){const N=l.get(_.blockKey)??[];N.push(_),l.set(_.blockKey,N)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),p=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,N)=>G(o,N),t[0]=o,t[1]=u):u=t[1];const x=Array.from({length:Q},u),h=m.getTime()>=o.getTime()&&m.getTime()<=a.getTime()?p(m):null,g=tt(),b=ft,j="flex-1 min-h-0",v="min-w-[900px] relative";let f;t[2]===Symbol.for("react.memo_cache_sentinel")?(f={width:J},t[2]=f):f=t[2];let y;t[3]!==g?(y=g("sandbox.variantCalendar.variantBlock"),t[3]=g,t[4]=y):y=t[4];let T;t[5]!==y?(T=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:f,children:y}),t[5]=y,t[6]=T):T=t[6];let w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=w):w=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:w,children:D}),t[8]=D,t[9]=k):k=t[9];let M;t[10]!==T||t[11]!==k?(M=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[T,k]}),t[10]=T,t[11]=k,t[12]=M):M=t[12];let S;t[13]!==g||t[14]!==h?(S=h!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${J}px + (100% - ${J}px) * ${h} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:g("sandbox.variantCalendar.todayLabel")})}),t[13]=g,t[14]=h,t[15]=S):S=t[15];const A=c.map(_=>{const[N,L]=_,H=ut(i,N),F=L[0]?.blockLabel??N;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:J},children:F})}),L.map((E,W)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:se},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:J},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:E.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},children:x.map(ie)}),(()=>{const R=Math.max(E.start.getTime(),o.getTime()),O=Math.min(E.end.getTime(),a.getTime());if(O<=R)return null;const I=p(new Date(R)),V=p(new Date(O))-I;return s.jsx(bt,{variant:E,color:H,fadeStart:E.openStart,fadeEnd:E.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${I}%`,width:`calc(${V}% - 2px)`,height:22},children:E.label})})()]})]},W))]},N)});let $;t[16]!==M||t[17]!==S||t[18]!==A?($=s.jsxs("div",{className:v,children:[M,S,A]}),t[16]=M,t[17]=S,t[18]=A,t[19]=$):$=t[19];let C;return t[20]!==b||t[21]!==$?(C=s.jsx(b,{className:j,children:$}),t[20]=b,t[21]=$,t[22]=C):C=t[22],C}function ie(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function ae(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ht[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function le(e,t){return e[0].localeCompare(t[0])}export{Zn as VariantCalendar};
|
|
1
|
+
import{c as K,b as tt,r as et,j as s,m as ot,B as nt}from"./index-B_MMsAiE.js";import{u as vt,a9 as dt,f as yt}from"./agent-icon-kVYCkgDa.js";import{i as Tt}from"./ChevronRight-CxJTFr1Z.js";import{L as jt}from"./label-DMbGJZiR.js";import{C as ft}from"./automation-runs-DM4fJpM9.js";import{S as Nt}from"./switch-CLB543ZX.js";import{T as wt,c as kt,a as Mt}from"./tooltip-GW2DyJLV.js";import{V as _t}from"./view-mode-toggle-DZJkZ-64.js";import"./AlertCircle-DfAm4o9d.js";import"./Tool01-DIokgqXj.js";import"./ArrowUp-A7Mx0wQq.js";import"./Settings02-DKxAMtG6.js";import"./Tool02-Ddkawasa.js";import"./XCircle-D4coMBPk.js";import"./ArrowUpRight-JxGVImer.js";import"./TrendUp01-C42-Wjl8.js";import"./ZapSquare-B8T6rKNs.js";import"./Users03-DvXZQDEh.js";import"./CheckCircle-CAxEgYBD.js";import"./Check-DCYpTX7L.js";import"./ChevronDown-PFtiUBSQ.js";import"./ChevronUp-BdH75oDU.js";import"./DotsVertical-BGKdNMuc.js";import"./Stars02-CbrW-bl9.js";import"./Copy01-Bc5VfVJK.js";import"./CpuChip01-DWLM6pni.js";import"./CreditCard01-BT88WrjK.js";import"./Eye-Bmz_K6Az.js";import"./FilterLines-CoDG45q_.js";import"./Star01-A6Co6I5T.js";import"./Palette-ieliJ9ri.js";import"./SwitchHorizontal01-COkct-t0.js";import"./HardDrive-BtIbx3qj.js";import"./Key01-U9_ySw41.js";import"./LayoutLeft-Ct7sobUG.js";import"./LinkExternal01-DZBb956i.js";import"./LogOut01-CVO6-MqX.js";import"./Monitor01-CNIDIRyn.js";import"./Sun-By6pya_9.js";import"./Play-YwjBxXxu.js";import"./Plus-DshatFPI.js";import"./SearchLg-CA_csAv5.js";import"./SearchMd-D51gG9yR.js";import"./Shield01-DcD-RjAf.js";import"./Stars01-GAsjgHvR.js";import"./Trash01-BnkpBeyG.js";import"./Upload01-CL-S7mCf.js";import"./User01-Dkl2AAm0.js";import"./Users01-C5V1wUhw.js";import"./XClose-DubUci38.js";import"./X-C0IBj9M7.js";import"./Zap-cKHE_zIY.js";import"./select-vyt7fwjg.js";import"./useInfiniteQuery-CM2CVHiC.js";import"./use-infinite-scroll-BEDxOpbR.js";import"./use-connection-KMNTjm45.js";import"./use-mcp-client-J2akoQCG.js";import"./auth-CBvb6Xya.js";import"./use-virtual-mcp-BbsY8Sm2.js";import"./card-C96BA3_o.js";import"./sidebar-BaKYje5H.js";import"./use-mobile-B21Exqzk.js";import"./table-BkUJwywN.js";import"./empty-state-CkwReOEQ.js";import"./use-members-BSJzl9B_.js";import"./use-org-auth-client-CAbfHSfT.js";import"./use-clock-tick-DyK_4mkp.js";import"./use-automations-CVabhFuJ.js";import"./studio-tools-Bt6twF2O.js";import"./useSuspenseInfiniteQuery-qyvQUEBa.js";import"./avatar-ICdV2BRR.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-ttE3tfUB.js";import"./dialog-C6qg7Ck8.js";import"./tab-id-E3-rpOnl.js";import"./hooks-XfMYeEIs.js";import"./decopilot-sse-pool-GQur4M3a.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DtQAFZGy.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-BwjLzn7U.js";import"./use-decopilot-events-DJCN9WmR.js";import"./use-organization-settings-CfB7lZCX.js";import"./monaco-editor-D1NyXstY.js";import"./spinner-CjAa-sPH.js";import"./index-DbB3C14p.js";import"./shell-layout-C7OHxOgm.js";import"./required-auth-layout-B4xElUex.js";import"./use-org-sso-DuHEve8n.js";import"./integration-icon-CvX-0tHP.js";import"./use-navigate-to-agent-BbUq2LGY.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Dg_R-EHK.js";import"./form-Dibti8iC.js";import"./input-CDSeZvCx.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Dt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",i=typeof n=="string";if(!r&&!i)return null;const o=r?new Date(t):Ct,a=i?new Date(n):Dt;return Number.isNaN(o.getTime())||Number.isNaN(a.getTime())||r&&i&&a.getTime()<=o.getTime()?null:{start:o,end:a,openStart:!r,openEnd:!i}}function pt(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(Et.has(n)){const r=Rt(e);r&&t.push(r);return}if(St.has(n)){const r=e.matchers;if(Array.isArray(r))for(const i of r)pt(i,t)}}}function Ot(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const n=e.variants;return Array.isArray(n)}function It(e){if(typeof e=="string"){const m=e.trim();if(m.length===0)return null;try{const c=new URL(m).pathname.split("/").filter(Boolean),d=c[c.length-1];if(d)return decodeURIComponent(d)}catch{}return m.length>80?`${m.slice(0,77)}…`:m}if(!e||typeof e!="object")return null;const t=e,n=t.config,i=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,i?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const m of o)if(typeof m=="string"&&m.trim().length>0)return m.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function X(e,t,n,r,i){if(Ot(e)){const o=e.variants,a=e.__resolveType,m=$t.test(a)?"":Pt(r);o.forEach((l,c)=>{if(!l||typeof l!="object")return;const d=l,p=[];if(pt(d.rule,p),p.length===0)return;const x=It(d.value)??(m||n);for(const h of p)i.push({blockKey:t,blockLabel:n,innerPath:m,variantIndex:c,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:a})});for(let l=0;l<o.length;l++){const c=o[l];c&&typeof c=="object"&&X(c.value,t,n,[...r,"variants",l,"value"],i)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)X(e[o],t,n,[...r,o],i);return}if(e&&typeof e=="object")for(const[o,a]of Object.entries(e))o!=="__resolveType"&&X(a,t,n,[...r,o],i)}function Ft(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))X(r,n,Lt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,i)=>{const o=i*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),n}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ut(e,t){return e.get(t)??Ht}const Bt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=1440*60*1e3;function B(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function xt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function G(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function st(e,t){return Math.round((B(e).getTime()-B(t).getTime())/gt)}function Wt(e){const t=(e.getTime()-B(e).getTime())/gt;return Math.min(Math.max(t,0),1)}function it(e,t){return st(e,t)+Wt(e)}function zt(e){const t=Z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const i=[];for(let o=0;o<7;o++)i.push(Z(t,r*7+o));n.push(i)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Ut(e,t){const n=B(e[0]),r=Z(n,7),i=n.getTime(),o=r.getTime(),a=[];for(const c of t){const d=B(c.start),p=B(c.end);if(p.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=p.getTime()>=r.getTime()?Z(r,-1):p,h=st(u,n),g=st(x,u)+1;if(g<=0)continue;const b=Math.max(c.start.getTime(),i),j=Math.min(c.end.getTime(),o),v=it(new Date(b),n),f=Math.max(it(new Date(j),n)-v,0);f<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:f})}a.sort((c,d)=>c.startCol-d.startCol||d.span-c.span||c.variant.blockKey.localeCompare(d.variant.blockKey));const m=[],l=[];for(const c of a){let d=m.findIndex(p=>p<=c.startCol);d===-1&&(d=m.length,m.push(0)),m[d]=c.startCol+c.span,l.push({...c,lane:d})}return l}const at=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Yt(e,t){const n=e.openStart?t("sandbox.variantCalendar.always"):at.format(e.start),r=e.openEnd?t("sandbox.variantCalendar.ongoing"):at.format(e.end);return`${n} → ${r}`}function Gt(e){const t=K.c(18),{variant:n}=e,r=tt();let i;t[0]!==n.blockLabel?(i=s.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=i):i=t[1];let o;t[2]!==n.innerPath?(o=n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=o):o=t[3];let a;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(a=n.label!==n.blockLabel&&n.label!==n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=a):a=t[7];let m;t[8]!==r||t[9]!==n?(m=Yt(n,r),t[8]=r,t[9]=n,t[10]=m):m=t[10];let l;t[11]!==m?(l=s.jsx("div",{className:"mt-1",children:m}),t[11]=m,t[12]=l):l=t[12];let c;return t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==l?(c=s.jsx(Mt,{children:s.jsxs("div",{className:"text-xs",children:[i,o,a,l]})}),t[13]=i,t[14]=o,t[15]=a,t[16]=l,t[17]=c):c=t[17],c}const lt=16;function Kt(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${lt}px, #000 calc(100% - ${lt}px), ${r})`}function bt(e){const t=K.c(26),{variant:n,color:r,style:i,children:o,fadeStart:a,fadeEnd:m}=e,l=a===void 0?!1:a,c=m===void 0?!1:m;let d;t[0]!==c||t[1]!==l?(d=Kt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const p=d;let u;t[3]!==l?(u=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=u):u=t[4];let x;t[5]!==c?(x=c&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=c,t[6]=x):x=t[6];let h;t[7]!==p?(h=p&&{maskImage:p,WebkitMaskImage:p},t[7]=p,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==i||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...i},t[9]=r.bg,t[10]=r.text,t[11]=i,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let j;t[18]!==g||t[19]!==b?(j=s.jsx(wt,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=j):j=t[20];let v;t[21]!==n?(v=s.jsx(Gt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let f;return t[23]!==v||t[24]!==j?(f=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=f):f=t[25],f}function Zn(e){const t=K.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,p,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),p=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=p,t[4]=u}else d=t[2],p=t[3],u=t[4];const x=p;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>m(xt(new Date)),t[5]=h):h=t[5];const g=h;let b;t[6]!==i?(b=()=>m(P=>i==="calendar"?G(P,-1):G(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?G(P,1):G(P,3)),t[8]=i,t[9]=v):v=t[9];const f=v;let y;t[10]!==r?(y=r("sandbox.variantCalendar.today"),t[10]=r,t[11]=y):y=t[11];let T;t[12]!==y?(T=s.jsx(nt,{variant:"outline",size:"sm",onClick:g,children:y}),t[12]=y,t[13]=T):T=t[13];let w;t[14]!==r?(w=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=w):w=t[15];let D;t[16]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(vt,{size:16}),t[16]=D):D=t[16];let k;t[17]!==j||t[18]!==w?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":w,children:D}),t[17]=j,t[18]=w,t[19]=k):k=t[19];let M;t[20]!==r?(M=r("sandbox.variantCalendar.next"),t[20]=r,t[21]=M):M=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Tt,{size:16}),t[22]=S):S=t[22];let A;t[23]!==f||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:f,"aria-label":M,children:S}),t[23]=f,t[24]=M,t[25]=A):A=t[25];const $=ht[a.getMonth()];let C;t[26]!==a?(C=a.getFullYear(),t[26]=a,t[27]=C):C=t[27];let _;t[28]!==$||t[29]!==C?(_=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[$," ",C]}),t[28]=$,t[29]=C,t[30]=_):_=t[30];let N;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[T,k,A,_]}),t[31]=A,t[32]=_,t[33]=T,t[34]=k,t[35]=N):N=t[35];let L;t[36]!==d||t[37]!==l||t[38]!==r?(L=d>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nt,{id:"show-ongoing",checked:l,onCheckedChange:c}),s.jsx(jt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:r("sandbox.variantCalendar.showOngoing",{count:d})})]}),t[36]=d,t[37]=l,t[38]=r,t[39]=L):L=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(dt,{}),t[40]=H):H=t[40];let F;t[41]!==r?(F=r("sandbox.variantCalendar.calendarMode"),t[41]=r,t[42]=F):F=t[42];let E;t[43]!==F?(E={value:"calendar",icon:H,label:F},t[43]=F,t[44]=E):E=t[44];let W;t[45]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(yt,{}),t[45]=W):W=t[45];let R;t[46]!==r?(R=r("sandbox.variantCalendar.timelineMode"),t[46]=r,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:W,label:R},t[48]=R,t[49]=O):O=t[49];let I;t[50]!==E||t[51]!==O?(I=[E,O],t[50]=E,t[51]=O,t[52]=I):I=t[52];let V;t[53]!==I||t[54]!==i?(V=s.jsx(_t,{value:i,onValueChange:o,options:I}),t[53]=I,t[54]=i,t[55]=V):V=t[55];let z;t[56]!==L||t[57]!==V?(z=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=z):z=t[58];let U;t[59]!==N||t[60]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[N,z]}),t[59]=N,t[60]=z,t[61]=U):U=t[61];let Y;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(Y=u.length===0?s.jsx(Zt,{hiddenOngoing:l?0:d}):i==="calendar"?s.jsx(ee,{monthStart:a,variants:u,colorMap:x}):s.jsx(oe,{monthStart:a,variants:u,colorMap:x}),t[62]=x,t[63]=a,t[64]=d,t[65]=l,t[66]=u,t[67]=i,t[68]=Y):Y=t[68];let q;return t[69]!==U||t[70]!==Y?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[U,Y]}),t[69]=U,t[70]=Y,t[71]=q):q=t[71],q}function Jt(e){return e.blockKey}function qt(e){return!e.openEnd}function Qt(e){return e.openEnd}function Xt(){return xt(new Date)}function Zt(e){const t=K.c(4),{hiddenOngoing:n}=e,r=n===void 0?0:n,i=tt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{size:24,className:"text-muted-foreground/60"}),t[0]=o):o=t[0];let a;return t[1]!==r||t[2]!==i?(a=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[o,r>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noDatedVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.hiddenOngoingVariants",{count:r})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noScheduledVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=r,t[2]=i,t[3]=a):a=t[3],a}const rt=20,ct=2,mt=28,te=6;function ee(e){const t=K.c(17),{monthStart:n,variants:r,colorMap:i}=e;let o,a,m,l,c;if(t[0]!==i||t[1]!==n||t[2]!==r){const u=zt(n),x=B(new Date);o=ft,c="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Bt.map(re)}),t[8]=m):m=t[8],l=u.map((h,g)=>{const b=Ut(h,r),j=b.reduce(ne,0),v=mt+j*(rt+ct)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:v},children:[h.map((f,y)=>{const T=f.getMonth()===n.getMonth(),w=f.getTime()===x.getTime();return s.jsx("div",{className:ot("border-r last:border-r-0 px-2 pt-1.5 text-xs",T?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:ot("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",w&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},y)}),b.map((f,y)=>{const T=ut(i,f.variant.blockKey),w=mt+f.lane*(rt+ct),D=f.leftUnits/7*100,k=f.widthUnits/7*100,M=f.variant.openStart&&g===0,S=f.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:f.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:w,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${g}-${y}`)})]},g)}),t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=m,t[6]=l,t[7]=c}else o=t[3],a=t[4],m=t[5],l=t[6],c=t[7];let d;t[9]!==a||t[10]!==m||t[11]!==l?(d=s.jsxs("div",{className:a,children:[m,l]}),t[9]=a,t[10]=m,t[11]=l,t[12]=d):d=t[12];let p;return t[13]!==o||t[14]!==c||t[15]!==d?(p=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=p):p=t[16],p}function ne(e,t){return Math.max(e,t.lane+1)}function re(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const Q=4,se=32,J=240;function oe(e){const t=K.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=G(n,Q),m=new Date,l=new Map;for(const _ of r){const N=l.get(_.blockKey)??[];N.push(_),l.set(_.blockKey,N)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),p=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,N)=>G(o,N),t[0]=o,t[1]=u):u=t[1];const x=Array.from({length:Q},u),h=m.getTime()>=o.getTime()&&m.getTime()<=a.getTime()?p(m):null,g=tt(),b=ft,j="flex-1 min-h-0",v="min-w-[900px] relative";let f;t[2]===Symbol.for("react.memo_cache_sentinel")?(f={width:J},t[2]=f):f=t[2];let y;t[3]!==g?(y=g("sandbox.variantCalendar.variantBlock"),t[3]=g,t[4]=y):y=t[4];let T;t[5]!==y?(T=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:f,children:y}),t[5]=y,t[6]=T):T=t[6];let w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=w):w=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:w,children:D}),t[8]=D,t[9]=k):k=t[9];let M;t[10]!==T||t[11]!==k?(M=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[T,k]}),t[10]=T,t[11]=k,t[12]=M):M=t[12];let S;t[13]!==g||t[14]!==h?(S=h!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${J}px + (100% - ${J}px) * ${h} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:g("sandbox.variantCalendar.todayLabel")})}),t[13]=g,t[14]=h,t[15]=S):S=t[15];const A=c.map(_=>{const[N,L]=_,H=ut(i,N),F=L[0]?.blockLabel??N;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:J},children:F})}),L.map((E,W)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:se},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:J},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:E.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},children:x.map(ie)}),(()=>{const R=Math.max(E.start.getTime(),o.getTime()),O=Math.min(E.end.getTime(),a.getTime());if(O<=R)return null;const I=p(new Date(R)),V=p(new Date(O))-I;return s.jsx(bt,{variant:E,color:H,fadeStart:E.openStart,fadeEnd:E.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${I}%`,width:`calc(${V}% - 2px)`,height:22},children:E.label})})()]})]},W))]},N)});let $;t[16]!==M||t[17]!==S||t[18]!==A?($=s.jsxs("div",{className:v,children:[M,S,A]}),t[16]=M,t[17]=S,t[18]=A,t[19]=$):$=t[19];let C;return t[20]!==b||t[21]!==$?(C=s.jsx(b,{className:j,children:$}),t[20]=b,t[21]=$,t[22]=C):C=t[22],C}function ie(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function ae(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ht[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function le(e,t){return e[0].localeCompare(t[0])}export{Zn as VariantCalendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as T,m as f,j as i}from"./index-
|
|
1
|
+
import{c as $,r as T,m as f,j as i}from"./index-B_MMsAiE.js";import{c as k,T as I,a as P}from"./tooltip-GW2DyJLV.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,b=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),m=R.current[e];m&&S({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==b||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,m)=>{const j=i.jsxs("button",{ref:V=>{R.current[m]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=b,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=b?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
|
package/dist/client/index.html
CHANGED
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
51
51
|
<meta name="twitter:image" content="/og-image.png" />
|
|
52
52
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
53
|
-
<script type="module" crossorigin src="/assets/index-
|
|
54
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
53
|
+
<script type="module" crossorigin src="/assets/index-B_MMsAiE.js"></script>
|
|
54
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BQ5clB3L.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
|
57
57
|
<div id="root"></div>
|
package/dist/server/cli.js
CHANGED
|
@@ -1292,7 +1292,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var fu1=O(()=>{zx()});f
|
|
|
1292
1292
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await pf`
|
|
1293
1293
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1294
1294
|
`.execute($)}}async function pm1($){await Th6($),await Rh6($);let Z=new im1({db:$,provider:{getMigrations:()=>Promise.resolve(Fl0)}}),{error:X,results:Q}=await Z.migrateToLatest(),Y=0;if(Q?.forEach((G)=>{if(G.status==="Success")Y++;else if(G.status==="Error")console.error(`Failed to execute migration "${G.migrationName}"`)}),X)throw console.error("Failed to migrate"),console.error(X),X;return Y}async function Ih6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await dg0();let G=X??H6(),J=async()=>{if(!Z&&!X)await Jw(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await pm1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function qh6(){let $=H6(),Z=new im1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Fl0)}}),{error:X,results:Q}=await Z.migrateDown();if(Q?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),X)throw console.error("Failed to rollback migration"),console.error(X),X}var om1=O(()=>{mm1();mg0();m7()});async function x50($){let Z={...process.env},X=V00($,Z);console.log(OU1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?Fl1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (n$0(),i$0)),{outputs:G,services:J}=await Y({home:X.settings.dataDir,externalDatabaseUrl:X.externalDatabaseUrl,externalNatsUrl:X.externalNatsUrl});if(!X.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (mg0(),Bl1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (m7(),Sc1)),{migrateToLatest:N}=await Promise.resolve().then(() => (om1(),tm1)),U=H(G.databaseUrl);await N({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...X.settings,betterAuthSecret:Q,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{},...G.natsTunnel?{natsPublicUrl:G.natsTunnel.publicUrl,natsAccountJwt:G.natsTunnel.accountJwt,natsAccountSigningKey:G.natsTunnel.accountSigningKey,natsOperatorJwt:G.natsTunnel.operatorJwt,natsTunnelPublicEnabled:!0,natsCredsPath:G.natsTunnel.credsPath}:{}};return bu1(K),{settings:K,services:J.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:J.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var wl0=O(()=>{zx();wl1();y8()});var sm1={};w0(sm1,{updateService:()=>gD,subscribeCliState:()=>Ll0,setTuiConsoleIntercepted:()=>f50,setServerUrl:()=>Em,setMigrationsDone:()=>Dm,setDevMode:()=>Vh6,resetCliStateForTests:()=>Mh6,isTuiConsoleIntercepted:()=>b50,getCliState:()=>Ol0,addLogEntry:()=>Uw});function rm1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function Mh6(){kQ=rm1()}function kh6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Lm(){for(let $ of Bl0)$()}function Ol0(){return kQ}function Ll0($){return Bl0.add($),()=>Bl0.delete($)}function gD($){kQ={...kQ,services:kQ.services.map((Z)=>Z.name===$.name?$:Z)},Lm()}function Dm(){kQ={...kQ,migrationsStatus:"done"},Lm()}function Em($){kQ={...kQ,serverUrl:$},Lm()}function Uw($){let Z=[...kQ.logs,$];kQ={...kQ,logs:Z.length>500?Z.slice(-500):Z},Lm()}function Vh6(){kQ={...kQ,services:[...kh6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Lm()}function f50($){am1=$}function b50(){return am1}var kQ,Bl0,am1=!1;var hD=O(()=>{kQ=rm1();Bl0=new Set});import{createServer as em1}from"net";function Sh6($){return new Promise((Z)=>{let X=em1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function zm($){if(await Sh6($))return $;let Z=await new Promise((X,Q)=>{let Y=em1();Y.once("error",Q),Y.listen(0,"0.0.0.0",()=>{let G=Y.address(),J=typeof G==="object"&&G?G.port:0;Y.close(()=>X(J))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var Dl0=()=>{};function jm($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var El0={};w0(El0,{startDevServer:()=>_h6});import{join as Ch6}from"path";function $i1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1295
|
-
`);Q=G.pop()??"";for(let J of G){let K=jm(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=jm(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function _h6($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await zm(Number(Y)+1):await zm(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await x50({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)gD({name:L.name,status:"ready",port:L.port});Dm();let N=Ch6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)$i1(F.stdout),$i1(F.stderr);Em(G),gD({name:"Vite",status:"ready",port:Number(Y)}),gD({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (n$0(),i$0));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var zl0=O(()=>{wl0();hD();Dl0()});var y50;var jl0=O(()=>{y50={name:"decocms",version:"4.187.1",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as xh6,Text as Zi1}from"ink";import{jsx as fh6,jsxs as Xi1}from"react/jsx-runtime";function Qi1({version:$}){return Xi1(xh6,{flexDirection:"column",marginTop:1,children:[w50.map((Z,X)=>fh6(Zi1,{color:B50[X],children:Z},X)),Xi1(Zi1,{dimColor:!0,children:[" v",$]})]})}var Yi1=O(()=>{Gm()});import{Box as uD,Text as Fw}from"ink";import{Spinner as bh6}from"@inkjs/ui";import{jsx as fY,jsxs as tf}from"react/jsx-runtime";function Gi1({status:$}){if($==="pending")return fY(bh6,{label:""});return fY(Fw,{color:"green",children:"\u2713"})}function yh6($){return`${$.name}: ${$.port||"...."}`}function Ji1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return tf(uD,{flexDirection:"column",paddingBottom:1,children:[fY(Qi1,{version:y50.version}),fY(uD,{marginBottom:1,children:fY(Fw,{dimColor:!0,children:"\u2500".repeat(80)})}),fY(uD,{children:tf(Fw,{dimColor:!0,children:["Home: ",X]})}),tf(uD,{gap:2,children:[$.map((Y)=>tf(uD,{gap:1,children:[fY(Fw,{children:yh6(Y)}),fY(Gi1,{status:Y.status})]},Y.name)),tf(uD,{gap:1,children:[fY(Fw,{children:"Migrations"}),fY(Gi1,{status:Z})]})]}),fY(uD,{children:Q?tf(Fw,{children:["Open in browser: ",fY(Fw,{color:"cyan",children:Q})]}):fY(Fw,{dimColor:!0,children:"Starting..."})})]})}var Ki1=O(()=>{jl0();Yi1()});import{Box as gh6,Text as Pm}from"ink";import{jsx as Pl0,jsxs as Al0}from"react/jsx-runtime";function hh6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Wi1({logs:$}){return Pl0(gh6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Pl0(Pm,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Al0(Pm,{children:[Al0(Pm,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Pl0(Pm,{color:hh6(Z.status),children:Z.status}),Al0(Pm,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Hi1=()=>{};var Tl0={};w0(Tl0,{App:()=>lh6});import{Box as uh6}from"ink";import{useSyncExternalStore as ch6}from"react";import{jsx as Ni1,jsxs as dh6}from"react/jsx-runtime";function lh6({home:$}){let Z=ch6(Ll0,Ol0);return dh6(uh6,{flexDirection:"column",children:[Ni1(Ji1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Ni1(Wi1,{logs:Z.logs})]})}var Rl0=O(()=>{Ki1();Hi1();hD()});var JJ="thread-gate",qN="decopilot-hosted-harness",lG="automations",ww="background-tools";var Ui1="7";function Fi1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ui1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var wi1=()=>{};function mh6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Il0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Bi1(){let $=mh6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Il0($,"--cpu-prof-dir")??process.cwd(),name:Il0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Il0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Oi1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=xD();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),g50=setInterval(()=>void Z().catch(()=>{}),$),g50.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(g50)clearInterval(g50)}}var g50;var Li1=()=>{};import*as ih6 from"bun:jsc";function Di1(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{nh6()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=ph6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var nh6,ph6;var Ei1=O(()=>{({startSamplingProfiler:nh6,samplingProfilerStackTraces:ph6}=ih6)});function zi1(){Bi1();let $=[Oi1(),Ac1(),Di1()];return()=>{for(let Z of $)Z()}}var ji1=O(()=>{vg0();Li1();Ei1()});var cD=_((Pi1)=>{Object.defineProperty(Pi1,"__esModule",{value:!0});Pi1.RepublishHeaders=Pi1.DirectMsgHeaders=Pi1.JsHeaders=Pi1.AdvisoryKind=void 0;Pi1.isOrderedPushConsumerOptions=th6;Pi1.isPullConsumer=oh6;Pi1.isPushConsumer=rh6;Pi1.isBoundPushConsumerOptions=ah6;function th6($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function oh6($){return $.isPullConsumer()}function rh6($){return $.isPushConsumer()}function ah6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Pi1.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};Pi1.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};Pi1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Pi1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var bY=_((Ti1)=>{Object.defineProperty(Ti1,"__esModule",{value:!0});Ti1.TD=Ti1.TE=Ti1.Empty=void 0;Ti1.encode=Ju6;Ti1.decode=Ku6;Ti1.Empty=new Uint8Array(0);Ti1.TE=new TextEncoder;Ti1.TD=new TextDecoder;function Gu6(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function Ju6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Ti1.TE.encode($[X]));if(Z.length===0)return Ti1.Empty;if(Z.length===1)return Z[0];return Gu6(...Z)}function Ku6($){if(!$||$.length===0)return"";return Ti1.TD.decode($)}});var yY=_((qi1)=>{Object.defineProperty(qi1,"__esModule",{value:!0});qi1.errors=qi1.PermissionViolationError=qi1.NoRespondersError=qi1.TimeoutError=qi1.RequestError=qi1.ProtocolError=qi1.ConnectionError=qi1.DrainingConnectionError=qi1.ClosedConnectionError=qi1.AuthorizationError=qi1.UserAuthenticationExpiredError=qi1.InvalidOperationError=qi1.InvalidArgumentError=qi1.InvalidSubjectError=void 0;class Ml0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}qi1.InvalidSubjectError=Ml0;class h50 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new h50(`${$} ${Z}`,X)}}qi1.InvalidArgumentError=h50;class kl0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}qi1.InvalidOperationError=kl0;class u50 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new u50($);return null}}qi1.UserAuthenticationExpiredError=u50;class c50 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new c50($);return null}}qi1.AuthorizationError=c50;class Vl0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}qi1.ClosedConnectionError=Vl0;class Sl0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}qi1.DrainingConnectionError=Sl0;class Cl0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}qi1.ConnectionError=Cl0;class _l0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}qi1.ProtocolError=_l0;class vl0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof l50}}qi1.RequestError=vl0;class xl0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}qi1.TimeoutError=xl0;class l50 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}qi1.NoRespondersError=l50;class d50 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new d50($,X,Q,Y)}}qi1.PermissionViolationError=d50;qi1.errors={AuthorizationError:c50,ClosedConnectionError:Vl0,ConnectionError:Cl0,DrainingConnectionError:Sl0,InvalidArgumentError:h50,InvalidOperationError:kl0,InvalidSubjectError:Ml0,NoRespondersError:l50,PermissionViolationError:d50,ProtocolError:_l0,RequestError:vl0,TimeoutError:xl0,UserAuthenticationExpiredError:u50}});var KJ=_((Ci1)=>{Object.defineProperty(Ci1,"__esModule",{value:!0});Ci1.SimpleMutex=Ci1.Perf=void 0;Ci1.extend=Ru6;Ci1.render=Iu6;Ci1.timeout=qu6;Ci1.delay=Mu6;Ci1.deadline=ku6;Ci1.deferred=bl0;Ci1.debugDeferred=Vu6;Ci1.shuffle=Su6;Ci1.collect=Cu6;Ci1.jitter=Si1;Ci1.backoff=_u6;Ci1.nanos=vu6;Ci1.millis=xu6;Ci1.randomToken=yu6;var Tu6=bY(),fl0=yY();function Ru6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Iu6($){return Tu6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function qu6($,Z=!0){let X=Z?new fl0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new fl0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function Mu6($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function ku6($,Z=1000){let X=bl0(),Q=setTimeout(()=>{X.reject(new fl0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function bl0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Vu6(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function Su6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Cu6($){let Z=[];for await(let X of $)Z.push(X);return Z}class ki1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}Ci1.Perf=ki1;class Vi1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=bl0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Ci1.SimpleMutex=Vi1;function Si1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function _u6($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return Si1(X>Z?$[Z]:$[X])}}}function vu6($){return $*1e6}function xu6($){return Math.floor($/1e6)}var fu6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",MN=new Uint8Array(62);for(let $=0;$<62;$++)MN[$]=fu6.charCodeAt($);var bu6=218340105584896;function yu6(){let $=Math.floor(Math.random()*bu6),Z=$%62,X=MN[Z];$=($-Z)/62,Z=$%62;let Q=MN[Z];$=($-Z)/62,Z=$%62;let Y=MN[Z];$=($-Z)/62,Z=$%62;let G=MN[Z];$=($-Z)/62,Z=$%62;let J=MN[Z];$=($-Z)/62,Z=$%62;let K=MN[Z];$=($-Z)/62,Z=$%62;let W=MN[Z];$=($-Z)/62;let H=MN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var hi1=_((yi1)=>{Object.defineProperty(yi1,"__esModule",{value:!0});yi1.nuid=yi1.NuidImpl=void 0;var eu6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bw=62,i50=12,fi1=10,vi1=33,$c6=333,xi1=i50+fi1,gl0=new Uint8Array(Bw);for(let $=0;$<Bw;$++)gl0[$]=eu6.charCodeAt($);var m50=4294967296,bi1=BigInt(Bw)**BigInt(fi1),Am=Number(bi1/(1n<<32n)),yl0=Number(bi1%(1n<<32n));function Zc6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Xc6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Zc6($)}class hl0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(xi1),this.cbuf=new Uint8Array(i50),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Am+1)),this.seqLo=Math.floor(Math.random()*m50);while($++<8&&this.seqHi===Am&&this.seqLo>=yl0);if(this.seqHi===Am&&this.seqLo>=yl0)this.seqLo=0;this.inc=Math.random()*($c6-vi1)+vi1|0}setPre(){Xc6(this.cbuf);for(let $=0;$<i50;$++)this.buf[$]=gl0[this.cbuf[$]%Bw]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=xi1-1;X>=i50;X--){let Q=Math.floor($/Bw),G=($-Q*Bw)*m50+Z,J=Math.floor(G/Bw),K=G-J*Bw;this.buf[X]=gl0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=m50)this.seqLo-=m50,this.seqHi+=1;if(this.seqHi>Am||this.seqHi===Am&&this.seqLo>=yl0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}yi1.NuidImpl=hl0;yi1.nuid=new hl0});var di1=_((ci1)=>{Object.defineProperty(ci1,"__esModule",{value:!0});ci1.nuid=ci1.Nuid=void 0;var ui1=hi1();ci1.Nuid=ui1.NuidImpl;ci1.nuid=ui1.nuid});var p50=_((n50)=>{Object.defineProperty(n50,"__esModule",{value:!0});n50.nuid=n50.Nuid=void 0;var mi1=di1();Object.defineProperty(n50,"Nuid",{enumerable:!0,get:function(){return mi1.Nuid}});Object.defineProperty(n50,"nuid",{enumerable:!0,get:function(){return mi1.nuid}})});var Ow=_((ii1)=>{Object.defineProperty(ii1,"__esModule",{value:!0});ii1.DEFAULT_HOST=ii1.DEFAULT_PORT=ii1.Match=void 0;ii1.syncIterator=Wc6;ii1.createInbox=Hc6;var Jc6=p50(),Kc6=yY();ii1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Wc6($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function Hc6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Kc6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Jc6.nuid.next()}`}ii1.DEFAULT_PORT=4222;ii1.DEFAULT_HOST="127.0.0.1"});var Tm=_((oi1)=>{Object.defineProperty(oi1,"__esModule",{value:!0});oi1.DataBuffer=void 0;var pi1=bY();class ti1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return pi1.TE.encode($)}static toAscii($){return pi1.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}oi1.DataBuffer=ti1});var lD=_((si1)=>{Object.defineProperty(si1,"__esModule",{value:!0});si1.LF=si1.CR=si1.CRLF=si1.CR_LF_LEN=si1.CR_LF=void 0;si1.setTransportFactory=Dc6;si1.defaultPort=Ec6;si1.getUrlParseFn=zc6;si1.newTransport=jc6;si1.getResolveFn=Pc6;si1.protoLen=ai1;si1.extractProtocolMessage=Ac6;var Bc6=bY(),Oc6=Ow(),Lc6=Tm(),gY;function Dc6($){gY=$}function Ec6(){return gY!==void 0&&gY.defaultPort!==void 0?gY.defaultPort:Oc6.DEFAULT_PORT}function zc6(){return gY!==void 0&&gY.urlParseFn?gY.urlParseFn:void 0}function jc6(){if(!gY||typeof gY.factory!=="function")throw Error("transport fn is not set");return gY.factory()}function Pc6(){return gY!==void 0&&gY.dnsResolveFn?gY.dnsResolveFn:void 0}si1.CR_LF=`\r
|
|
1295
|
+
`);Q=G.pop()??"";for(let J of G){let K=jm(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=jm(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function _h6($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await zm(Number(Y)+1):await zm(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await x50({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)gD({name:L.name,status:"ready",port:L.port});Dm();let N=Ch6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)$i1(F.stdout),$i1(F.stderr);Em(G),gD({name:"Vite",status:"ready",port:Number(Y)}),gD({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (n$0(),i$0));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var zl0=O(()=>{wl0();hD();Dl0()});var y50;var jl0=O(()=>{y50={name:"decocms",version:"4.187.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as xh6,Text as Zi1}from"ink";import{jsx as fh6,jsxs as Xi1}from"react/jsx-runtime";function Qi1({version:$}){return Xi1(xh6,{flexDirection:"column",marginTop:1,children:[w50.map((Z,X)=>fh6(Zi1,{color:B50[X],children:Z},X)),Xi1(Zi1,{dimColor:!0,children:[" v",$]})]})}var Yi1=O(()=>{Gm()});import{Box as uD,Text as Fw}from"ink";import{Spinner as bh6}from"@inkjs/ui";import{jsx as fY,jsxs as tf}from"react/jsx-runtime";function Gi1({status:$}){if($==="pending")return fY(bh6,{label:""});return fY(Fw,{color:"green",children:"\u2713"})}function yh6($){return`${$.name}: ${$.port||"...."}`}function Ji1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return tf(uD,{flexDirection:"column",paddingBottom:1,children:[fY(Qi1,{version:y50.version}),fY(uD,{marginBottom:1,children:fY(Fw,{dimColor:!0,children:"\u2500".repeat(80)})}),fY(uD,{children:tf(Fw,{dimColor:!0,children:["Home: ",X]})}),tf(uD,{gap:2,children:[$.map((Y)=>tf(uD,{gap:1,children:[fY(Fw,{children:yh6(Y)}),fY(Gi1,{status:Y.status})]},Y.name)),tf(uD,{gap:1,children:[fY(Fw,{children:"Migrations"}),fY(Gi1,{status:Z})]})]}),fY(uD,{children:Q?tf(Fw,{children:["Open in browser: ",fY(Fw,{color:"cyan",children:Q})]}):fY(Fw,{dimColor:!0,children:"Starting..."})})]})}var Ki1=O(()=>{jl0();Yi1()});import{Box as gh6,Text as Pm}from"ink";import{jsx as Pl0,jsxs as Al0}from"react/jsx-runtime";function hh6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Wi1({logs:$}){return Pl0(gh6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Pl0(Pm,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Al0(Pm,{children:[Al0(Pm,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Pl0(Pm,{color:hh6(Z.status),children:Z.status}),Al0(Pm,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Hi1=()=>{};var Tl0={};w0(Tl0,{App:()=>lh6});import{Box as uh6}from"ink";import{useSyncExternalStore as ch6}from"react";import{jsx as Ni1,jsxs as dh6}from"react/jsx-runtime";function lh6({home:$}){let Z=ch6(Ll0,Ol0);return dh6(uh6,{flexDirection:"column",children:[Ni1(Ji1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Ni1(Wi1,{logs:Z.logs})]})}var Rl0=O(()=>{Ki1();Hi1();hD()});var JJ="thread-gate",qN="decopilot-hosted-harness",lG="automations",ww="background-tools";var Ui1="7";function Fi1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ui1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var wi1=()=>{};function mh6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Il0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Bi1(){let $=mh6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Il0($,"--cpu-prof-dir")??process.cwd(),name:Il0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Il0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Oi1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=xD();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),g50=setInterval(()=>void Z().catch(()=>{}),$),g50.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(g50)clearInterval(g50)}}var g50;var Li1=()=>{};import*as ih6 from"bun:jsc";function Di1(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{nh6()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=ph6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var nh6,ph6;var Ei1=O(()=>{({startSamplingProfiler:nh6,samplingProfilerStackTraces:ph6}=ih6)});function zi1(){Bi1();let $=[Oi1(),Ac1(),Di1()];return()=>{for(let Z of $)Z()}}var ji1=O(()=>{vg0();Li1();Ei1()});var cD=_((Pi1)=>{Object.defineProperty(Pi1,"__esModule",{value:!0});Pi1.RepublishHeaders=Pi1.DirectMsgHeaders=Pi1.JsHeaders=Pi1.AdvisoryKind=void 0;Pi1.isOrderedPushConsumerOptions=th6;Pi1.isPullConsumer=oh6;Pi1.isPushConsumer=rh6;Pi1.isBoundPushConsumerOptions=ah6;function th6($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function oh6($){return $.isPullConsumer()}function rh6($){return $.isPushConsumer()}function ah6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Pi1.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};Pi1.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};Pi1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Pi1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var bY=_((Ti1)=>{Object.defineProperty(Ti1,"__esModule",{value:!0});Ti1.TD=Ti1.TE=Ti1.Empty=void 0;Ti1.encode=Ju6;Ti1.decode=Ku6;Ti1.Empty=new Uint8Array(0);Ti1.TE=new TextEncoder;Ti1.TD=new TextDecoder;function Gu6(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function Ju6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Ti1.TE.encode($[X]));if(Z.length===0)return Ti1.Empty;if(Z.length===1)return Z[0];return Gu6(...Z)}function Ku6($){if(!$||$.length===0)return"";return Ti1.TD.decode($)}});var yY=_((qi1)=>{Object.defineProperty(qi1,"__esModule",{value:!0});qi1.errors=qi1.PermissionViolationError=qi1.NoRespondersError=qi1.TimeoutError=qi1.RequestError=qi1.ProtocolError=qi1.ConnectionError=qi1.DrainingConnectionError=qi1.ClosedConnectionError=qi1.AuthorizationError=qi1.UserAuthenticationExpiredError=qi1.InvalidOperationError=qi1.InvalidArgumentError=qi1.InvalidSubjectError=void 0;class Ml0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}qi1.InvalidSubjectError=Ml0;class h50 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new h50(`${$} ${Z}`,X)}}qi1.InvalidArgumentError=h50;class kl0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}qi1.InvalidOperationError=kl0;class u50 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new u50($);return null}}qi1.UserAuthenticationExpiredError=u50;class c50 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new c50($);return null}}qi1.AuthorizationError=c50;class Vl0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}qi1.ClosedConnectionError=Vl0;class Sl0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}qi1.DrainingConnectionError=Sl0;class Cl0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}qi1.ConnectionError=Cl0;class _l0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}qi1.ProtocolError=_l0;class vl0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof l50}}qi1.RequestError=vl0;class xl0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}qi1.TimeoutError=xl0;class l50 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}qi1.NoRespondersError=l50;class d50 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new d50($,X,Q,Y)}}qi1.PermissionViolationError=d50;qi1.errors={AuthorizationError:c50,ClosedConnectionError:Vl0,ConnectionError:Cl0,DrainingConnectionError:Sl0,InvalidArgumentError:h50,InvalidOperationError:kl0,InvalidSubjectError:Ml0,NoRespondersError:l50,PermissionViolationError:d50,ProtocolError:_l0,RequestError:vl0,TimeoutError:xl0,UserAuthenticationExpiredError:u50}});var KJ=_((Ci1)=>{Object.defineProperty(Ci1,"__esModule",{value:!0});Ci1.SimpleMutex=Ci1.Perf=void 0;Ci1.extend=Ru6;Ci1.render=Iu6;Ci1.timeout=qu6;Ci1.delay=Mu6;Ci1.deadline=ku6;Ci1.deferred=bl0;Ci1.debugDeferred=Vu6;Ci1.shuffle=Su6;Ci1.collect=Cu6;Ci1.jitter=Si1;Ci1.backoff=_u6;Ci1.nanos=vu6;Ci1.millis=xu6;Ci1.randomToken=yu6;var Tu6=bY(),fl0=yY();function Ru6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Iu6($){return Tu6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function qu6($,Z=!0){let X=Z?new fl0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new fl0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function Mu6($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function ku6($,Z=1000){let X=bl0(),Q=setTimeout(()=>{X.reject(new fl0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function bl0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Vu6(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function Su6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Cu6($){let Z=[];for await(let X of $)Z.push(X);return Z}class ki1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}Ci1.Perf=ki1;class Vi1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=bl0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Ci1.SimpleMutex=Vi1;function Si1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function _u6($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return Si1(X>Z?$[Z]:$[X])}}}function vu6($){return $*1e6}function xu6($){return Math.floor($/1e6)}var fu6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",MN=new Uint8Array(62);for(let $=0;$<62;$++)MN[$]=fu6.charCodeAt($);var bu6=218340105584896;function yu6(){let $=Math.floor(Math.random()*bu6),Z=$%62,X=MN[Z];$=($-Z)/62,Z=$%62;let Q=MN[Z];$=($-Z)/62,Z=$%62;let Y=MN[Z];$=($-Z)/62,Z=$%62;let G=MN[Z];$=($-Z)/62,Z=$%62;let J=MN[Z];$=($-Z)/62,Z=$%62;let K=MN[Z];$=($-Z)/62,Z=$%62;let W=MN[Z];$=($-Z)/62;let H=MN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var hi1=_((yi1)=>{Object.defineProperty(yi1,"__esModule",{value:!0});yi1.nuid=yi1.NuidImpl=void 0;var eu6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bw=62,i50=12,fi1=10,vi1=33,$c6=333,xi1=i50+fi1,gl0=new Uint8Array(Bw);for(let $=0;$<Bw;$++)gl0[$]=eu6.charCodeAt($);var m50=4294967296,bi1=BigInt(Bw)**BigInt(fi1),Am=Number(bi1/(1n<<32n)),yl0=Number(bi1%(1n<<32n));function Zc6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Xc6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Zc6($)}class hl0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(xi1),this.cbuf=new Uint8Array(i50),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Am+1)),this.seqLo=Math.floor(Math.random()*m50);while($++<8&&this.seqHi===Am&&this.seqLo>=yl0);if(this.seqHi===Am&&this.seqLo>=yl0)this.seqLo=0;this.inc=Math.random()*($c6-vi1)+vi1|0}setPre(){Xc6(this.cbuf);for(let $=0;$<i50;$++)this.buf[$]=gl0[this.cbuf[$]%Bw]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=xi1-1;X>=i50;X--){let Q=Math.floor($/Bw),G=($-Q*Bw)*m50+Z,J=Math.floor(G/Bw),K=G-J*Bw;this.buf[X]=gl0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=m50)this.seqLo-=m50,this.seqHi+=1;if(this.seqHi>Am||this.seqHi===Am&&this.seqLo>=yl0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}yi1.NuidImpl=hl0;yi1.nuid=new hl0});var di1=_((ci1)=>{Object.defineProperty(ci1,"__esModule",{value:!0});ci1.nuid=ci1.Nuid=void 0;var ui1=hi1();ci1.Nuid=ui1.NuidImpl;ci1.nuid=ui1.nuid});var p50=_((n50)=>{Object.defineProperty(n50,"__esModule",{value:!0});n50.nuid=n50.Nuid=void 0;var mi1=di1();Object.defineProperty(n50,"Nuid",{enumerable:!0,get:function(){return mi1.Nuid}});Object.defineProperty(n50,"nuid",{enumerable:!0,get:function(){return mi1.nuid}})});var Ow=_((ii1)=>{Object.defineProperty(ii1,"__esModule",{value:!0});ii1.DEFAULT_HOST=ii1.DEFAULT_PORT=ii1.Match=void 0;ii1.syncIterator=Wc6;ii1.createInbox=Hc6;var Jc6=p50(),Kc6=yY();ii1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Wc6($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function Hc6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Kc6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Jc6.nuid.next()}`}ii1.DEFAULT_PORT=4222;ii1.DEFAULT_HOST="127.0.0.1"});var Tm=_((oi1)=>{Object.defineProperty(oi1,"__esModule",{value:!0});oi1.DataBuffer=void 0;var pi1=bY();class ti1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return pi1.TE.encode($)}static toAscii($){return pi1.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}oi1.DataBuffer=ti1});var lD=_((si1)=>{Object.defineProperty(si1,"__esModule",{value:!0});si1.LF=si1.CR=si1.CRLF=si1.CR_LF_LEN=si1.CR_LF=void 0;si1.setTransportFactory=Dc6;si1.defaultPort=Ec6;si1.getUrlParseFn=zc6;si1.newTransport=jc6;si1.getResolveFn=Pc6;si1.protoLen=ai1;si1.extractProtocolMessage=Ac6;var Bc6=bY(),Oc6=Ow(),Lc6=Tm(),gY;function Dc6($){gY=$}function Ec6(){return gY!==void 0&&gY.defaultPort!==void 0?gY.defaultPort:Oc6.DEFAULT_PORT}function zc6(){return gY!==void 0&&gY.urlParseFn?gY.urlParseFn:void 0}function jc6(){if(!gY||typeof gY.factory!=="function")throw Error("transport fn is not set");return gY.factory()}function Pc6(){return gY!==void 0&&gY.dnsResolveFn?gY.dnsResolveFn:void 0}si1.CR_LF=`\r
|
|
1296
1296
|
`;si1.CR_LF_LEN=si1.CR_LF.length;si1.CRLF=Lc6.DataBuffer.fromAscii(si1.CR_LF);si1.CR=new Uint8Array(si1.CRLF)[0];si1.LF=new Uint8Array(si1.CRLF)[1];function ai1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===si1.CR&&$[X]===si1.LF)return X+1}return 0}function Ac6($){let Z=ai1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return Bc6.TD.decode(Q)}return""}});var ml0=_((Jn1)=>{Object.defineProperty(Jn1,"__esModule",{value:!0});Jn1.ipV4=Qn1;Jn1.isIP=vc6;Jn1.parseIP=Yn1;var Rm=4,dD=16,t50=48,Xn1=57,$n1=65,Cc6=70,Zn1=97,_c6=102,dl0=16777215;function Qn1($,Z,X,Q){let Y=new Uint8Array(dD);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((J,K)=>{Y[K]=J}),Y[12]=$,Y[13]=Z,Y[14]=X,Y[15]=Q,Y}function vc6($){return Yn1($)!==void 0}function Yn1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Gn1($);case":":return xc6($)}return}function Gn1($){let Z=new Uint8Array(Rm);for(let X=0;X<Rm;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=fc6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return Qn1(Z[0],Z[1],Z[2],Z[3])}function xc6($){let Z=new Uint8Array(dD),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<dD){let{n:Y,c:G,ok:J}=bc6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=dD-Rm)return;if(Q+Rm>dD)return;let K=Gn1($);if(K===void 0)return;Z[Q]=K[12],Z[Q+1]=K[13],Z[Q+2]=K[14],Z[Q+3]=K[15],$="",Q+=Rm;break}if(Z[Q]=Y>>8,Z[Q+1]=Y,Q+=2,$=$.substring(G),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(X>=0)return;if(X=Q,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(Q<dD){if(X<0)return;let Y=dD-Q;for(let G=Q-1;G>=X;G--)Z[G+Y]=Z[G];for(let G=X+Y-1;G>=X;G--)Z[G]=0}else if(X>=0)return;return Z}function fc6($){let Z=0,X=0;for(Z=0;Z<$.length&&t50<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=Xn1;Z++)if(X=X*10+($.charCodeAt(Z)-t50),X>=dl0)return{n:dl0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function bc6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(t50<=$.charCodeAt(X)&&$.charCodeAt(X)<=Xn1)Z*=16,Z+=$.charCodeAt(X)-t50;else if(Zn1<=$.charCodeAt(X)&&$.charCodeAt(X)<=_c6)Z*=16,Z+=$.charCodeAt(X)-Zn1+10;else if($n1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Cc6)Z*=16,Z+=$.charCodeAt(X)-$n1+10;else break;if(Z>=dl0)return{n:0,c:X,ok:!1}}if(X===0)return{n:0,c:X,ok:!1};return{n:Z,c:X,ok:!0}}});var rl0=_((Wn1)=>{Object.defineProperty(Wn1,"__esModule",{value:!0});Wn1.Servers=Wn1.ServerImpl=void 0;Wn1.isIPV4OrHostname=Kn1;Wn1.hostPort=ol0;var il0=lD(),nl0=KJ(),pl0=ml0(),uc6=Ow(),cc6=yY();function Kn1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function tl0($){return!Kn1($)}function lc6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function ol0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=lc6($),tl0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=tl0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):uc6.DEFAULT_PORT,Y=new URL(`${X===80?"https":"http"}://${$}`);Y.port=`${X}`;let G=Y.hostname;if(G.charAt(0)==="[")G=G.substring(1,G.length-1);return{listen:Y.host,hostname:G,port:X}}class of{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=ol0($);this.listen=X.listen,this.hostname=X.hostname,this.port=X.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,pl0.isIP)(this.hostname))return[this];else{let X=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${X.join(",")}`);for(let Q of X){let Y=this.port===80?"https":"http",G=new URL(`${Y}://${tl0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new of(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,nl0.shuffle)(Z);return this.resolves=Z,Z}}Wn1.ServerImpl=of;class o50{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw cc6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,il0.getUrlParseFn)(),X=new Map;for(let Y of this.servers)X.set(Y.listen,Y);let Q=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:G}=ol0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new of(Y))}if(this.randomize)(0,nl0.shuffle)(Q);if(this.servers=Q,this.currentServer===void 0||!Q.includes(this.currentServer))this.currentServer=Q[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,pl0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let X=(0,il0.getUrlParseFn)();$=X?X($):$;let Q=new of($,Z);if((0,pl0.isIP)(Q.hostname))Q.tlsName=this.tlsName;this.servers.push(Q)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return o50.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return o50.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let X=[],Q=[],Y=(0,il0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new of(K,!0);G.set(K,W)});let J=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&G.get(H)===void 0)J.push(W);G.delete(H)}),J.reverse(),J.forEach((K)=>{let W=this.servers.splice(K,1);Q=Q.concat(W[0].listen)}),G.forEach((K,W)=>{this.servers.push(K),X.push(W)}),this.randomize&&X.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,nl0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Wn1.Servers=o50});var r50=_((Fn1)=>{Object.defineProperty(Fn1,"__esModule",{value:!0});Fn1.QueuedIteratorImpl=void 0;var al0=KJ(),Nn1=yY();class Un1{inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,al0.deferred)(),this.yields=[],this.iterClosed=(0,al0.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(X){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new Nn1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Nn1.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let Q=$[Z];try{Q()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let X=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-X:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,al0.deferred)()}}finally{this.didBreak=!0,this.stop()}}stop($){if(this.done)return;this.err=$,this.done=!0,this.signal.resolve(),this.iterClosed.resolve($)}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}Fn1.QueuedIteratorImpl=Un1});var sl0=_((Ln1)=>{Object.defineProperty(Ln1,"__esModule",{value:!0});Ln1.MuxSubscription=void 0;var nc6=Ow(),Bn1=yY();class On1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,nc6.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((X)=>{X.resolver(Z,{})}),!0;if(Z.operation==="publish"){let X=this.all().find((Q)=>{return Q.requestSubject===Z.subject});if(X)return X.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let X=this.getToken(Z);if(X){let Q=this.get(X);if(Q){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new Bn1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Bn1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}Ln1.MuxSubscription=On1});var el0=_((zn1)=>{Object.defineProperty(zn1,"__esModule",{value:!0});zn1.Heartbeat=void 0;var pc6=KJ();class En1{ph;interval;maxOut;timer;pendings;constructor($,Z,X){this.ph=$,this.interval=Z,this.maxOut=X,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,pc6.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}zn1.Heartbeat=En1});var Xd0=_((Rn1)=>{Object.defineProperty(Rn1,"__esModule",{value:!0});Rn1.DenoBuffer=Rn1.MAX_SIZE=Rn1.AssertionError=void 0;Rn1.assert=An1;Rn1.concat=Tn1;Rn1.append=oc6;Rn1.readAll=rc6;Rn1.writeAll=ac6;var tc6=bY();class $d0 extends Error{constructor($){super($);this.name="AssertionError"}}Rn1.AssertionError=$d0;function An1($,Z="Assertion failed."){if(!$)throw new $d0(Z)}var Pn1=32768;Rn1.MAX_SIZE=4294967294;function a50($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function Tn1($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let X=new Uint8Array($.length+Z.length);return X.set($,0),X.set(Z,$.length),X}function oc6($,Z){return Tn1($,Uint8Array.of(Z))}class Zd0{_buf;_off;constructor($){if(this._off=0,$==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array($)}bytes($={copy:!0}){if($.copy===!1)return this._buf.subarray(this._off);return this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate($){if($===0){this.reset();return}if($<0||$>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+$)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice($){let Z=this._buf.byteLength;if($<=this.capacity-Z)return this._reslice(Z+$),Z;return-1}_reslice($){An1($<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,$)}readByte(){let $=new Uint8Array(1);if(this.read($))return $[0];return null}read($){if(this.empty()){if(this.reset(),$.byteLength===0)return 0;return null}let Z=a50(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(tc6.TE.encode($))}write($){let Z=this._grow($.byteLength);return a50($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let X=this._tryGrowByReslice($);if(X>=0)return X;let Q=this.capacity;if($<=Math.floor(Q/2)-Z)a50(this._buf.subarray(this._off),this._buf);else if(Q+$>Rn1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,Rn1.MAX_SIZE));a50(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,Rn1.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,X=new Uint8Array(Pn1);while(!0){let Q=this.capacity-this.length<Pn1,Y=Q?X:new Uint8Array(this._buf.buffer,this.length),G=$.read(Y);if(G===null)return Z;if(Q)this.write(Y.subarray(0,G));else this._reslice(this.length+G);Z+=G}}}Rn1.DenoBuffer=Zd0;function rc6($){let Z=new Zd0;return Z.readFrom($),Z.bytes()}function ac6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Gd0=_((Vn1)=>{Object.defineProperty(Vn1,"__esModule",{value:!0});Vn1.cc=Vn1.State=Vn1.Parser=Vn1.Kind=void 0;Vn1.describe=Yl6;var Qd0=Xd0(),Yd0=bY();Vn1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function Yl6($){let Z,X="";switch($.kind){case Vn1.Kind.MSG:Z="MSG";break;case Vn1.Kind.OK:Z="OK";break;case Vn1.Kind.ERR:Z="ERR",X=Yd0.TD.decode($.data);break;case Vn1.Kind.PING:Z="PING";break;case Vn1.Kind.PONG:Z="PONG";break;case Vn1.Kind.INFO:Z="INFO",X=Yd0.TD.decode($.data)}return`${Z}: ${X}`}function qn1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Mn1=48,Gl6=57,rf=67108864;class kn1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Vn1.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let X=$[Z];switch(this.state){case Vn1.State.OP_START:switch(X){case Vn1.cc.M:case Vn1.cc.m:this.state=Vn1.State.OP_M,this.hdr=-1,this.ma=qn1();break;case Vn1.cc.H:case Vn1.cc.h:this.state=Vn1.State.OP_H,this.hdr=0,this.ma=qn1();break;case Vn1.cc.P:case Vn1.cc.p:this.state=Vn1.State.OP_P;break;case Vn1.cc.PLUS:this.state=Vn1.State.OP_PLUS;break;case Vn1.cc.MINUS:this.state=Vn1.State.OP_MINUS;break;case Vn1.cc.I:case Vn1.cc.i:this.state=Vn1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_H:switch(X){case Vn1.cc.M:case Vn1.cc.m:this.state=Vn1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_M:switch(X){case Vn1.cc.S:case Vn1.cc.s:this.state=Vn1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MS:switch(X){case Vn1.cc.G:case Vn1.cc.g:this.state=Vn1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MSG:switch(X){case Vn1.cc.SPACE:case Vn1.cc.TAB:this.state=Vn1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MSG_SPC:switch(X){case Vn1.cc.SPACE:case Vn1.cc.TAB:continue;default:this.state=Vn1.State.MSG_ARG,this.as=Z}break;case Vn1.State.MSG_ARG:switch(X){case Vn1.cc.CR:this.drop=1;break;case Vn1.cc.NL:{let Q=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(Q),this.drop=0,this.as=Z+1,this.state=Vn1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Vn1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Vn1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Vn1.State.MSG_END}else{let Q=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<Q)Q=Y;if(Q>0)this.msgBuf.write($.subarray(Z,Z+Q)),Z=Z+Q-1;else this.msgBuf.writeByte(X)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:Vn1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Vn1.State.MSG_END;break;case Vn1.State.MSG_END:switch(X){case Vn1.cc.NL:this.drop=0,this.as=Z+1,this.state=Vn1.State.OP_START;break;default:continue}break;case Vn1.State.OP_PLUS:switch(X){case Vn1.cc.O:case Vn1.cc.o:this.state=Vn1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PLUS_O:switch(X){case Vn1.cc.K:case Vn1.cc.k:this.state=Vn1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PLUS_OK:switch(X){case Vn1.cc.NL:this.dispatcher.push({kind:Vn1.Kind.OK}),this.drop=0,this.state=Vn1.State.OP_START;break}break;case Vn1.State.OP_MINUS:switch(X){case Vn1.cc.E:case Vn1.cc.e:this.state=Vn1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MINUS_E:switch(X){case Vn1.cc.R:case Vn1.cc.r:this.state=Vn1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MINUS_ER:switch(X){case Vn1.cc.R:case Vn1.cc.r:this.state=Vn1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MINUS_ERR:switch(X){case Vn1.cc.SPACE:case Vn1.cc.TAB:this.state=Vn1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_MINUS_ERR_SPC:switch(X){case Vn1.cc.SPACE:case Vn1.cc.TAB:continue;default:this.state=Vn1.State.MINUS_ERR_ARG,this.as=Z}break;case Vn1.State.MINUS_ERR_ARG:switch(X){case Vn1.cc.CR:this.drop=1;break;case Vn1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:Vn1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Vn1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Vn1.State.OP_P:switch(X){case Vn1.cc.I:case Vn1.cc.i:this.state=Vn1.State.OP_PI;break;case Vn1.cc.O:case Vn1.cc.o:this.state=Vn1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PO:switch(X){case Vn1.cc.N:case Vn1.cc.n:this.state=Vn1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PON:switch(X){case Vn1.cc.G:case Vn1.cc.g:this.state=Vn1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PONG:switch(X){case Vn1.cc.NL:this.dispatcher.push({kind:Vn1.Kind.PONG}),this.drop=0,this.state=Vn1.State.OP_START;break}break;case Vn1.State.OP_PI:switch(X){case Vn1.cc.N:case Vn1.cc.n:this.state=Vn1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PIN:switch(X){case Vn1.cc.G:case Vn1.cc.g:this.state=Vn1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_PING:switch(X){case Vn1.cc.NL:this.dispatcher.push({kind:Vn1.Kind.PING}),this.drop=0,this.state=Vn1.State.OP_START;break}break;case Vn1.State.OP_I:switch(X){case Vn1.cc.N:case Vn1.cc.n:this.state=Vn1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_IN:switch(X){case Vn1.cc.F:case Vn1.cc.f:this.state=Vn1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_INF:switch(X){case Vn1.cc.O:case Vn1.cc.o:this.state=Vn1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_INFO:switch(X){case Vn1.cc.SPACE:case Vn1.cc.TAB:this.state=Vn1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Vn1.State.OP_INFO_SPC:switch(X){case Vn1.cc.SPACE:case Vn1.cc.TAB:continue;default:this.state=Vn1.State.INFO_ARG,this.as=Z}break;case Vn1.State.INFO_ARG:switch(X){case Vn1.cc.CR:this.drop=1;break;case Vn1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:Vn1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Vn1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Vn1.State.MSG_ARG||this.state===Vn1.State.MINUS_ERR_ARG||this.state===Vn1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Qd0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Vn1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Qd0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,X=new Uint8Array($+Z);if(X.set(this.ma.subject),this.ma.reply)X.set(this.ma.reply,$);if(this.argBuf=new Qd0.DenoBuffer(X),this.ma.subject=X.subarray(0,$),this.ma.reply)this.ma.reply=X.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Vn1.cc.SPACE:case Vn1.cc.TAB:case Vn1.cc.CR:case Vn1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],rf);break;case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.size=this.protoParseInt(Z[3],rf);break;default:throw this.fail($,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail($,"processMsgArgs Bad or Missing Size Error")}fail($,Z=""){if(!Z)Z=`parse error [${this.state}]`;else Z=`${Z} [${this.state}]`;return Error(`${Z}: ${Yd0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Vn1.cc.SPACE:case Vn1.cc.TAB:case Vn1.cc.CR:case Vn1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],rf),this.ma.size=this.protoParseInt(Z[3],rf);break;case 5:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.hdr=this.protoParseInt(Z[3],rf),this.ma.size=this.protoParseInt(Z[4],rf);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let X=0;for(let Q=0;Q<$.length;Q++){if($[Q]<Mn1||$[Q]>Gl6)return-1;X=X*10+($[Q]-Mn1)}return Z!==void 0&&X>Z?-1:X}}Vn1.Parser=kn1;Vn1.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30};Vn1.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}});var $90=_((Cn1)=>{Object.defineProperty(Cn1,"__esModule",{value:!0});Cn1.MsgHdrsImpl=void 0;Cn1.canonicalMIMEHeaderKey=Kd0;Cn1.headers=Wl6;var Sn1=bY(),WJ=Ow(),e50=yY();function Kd0($){let N=!0,U=Array($.length);for(let F=0;F<$.length;F++){let w=$.charCodeAt(F);if(w===58||w<33||w>126)throw e50.InvalidArgumentError.format("header",`'${$[F]}' is not a valid character in a header name`);if(N&&97<=w&&w<=122)w-=32;else if(!N&&65<=w&&w<=90)w+=32;U[F]=w,N=w==45}return String.fromCharCode(...U)}function Wl6($=0,Z=""){if($===0&&Z!=="")throw e50.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw e50.InvalidArgumentError.format("description","is required");return new af($,Z)}var Jd0="NATS/1.0";class af{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,X]of this.headers){let Q=$.values(Z);if(X.length!==Q.length)return!1;let Y=[...X].sort(),G=[...Q].sort();for(let J=0;J<Y.length;J++)if(Y[J]!==G[J])return!1}return!0}return!1}static decode($){let Z=new af,Q=Sn1.TD.decode($).split(`\r
|
|
1297
1297
|
`),Y=Q[0];if(Y!==Jd0){let G=Y.replace(Jd0,"").trim();if(G.length>0){if(Z._code=parseInt(G,10),isNaN(Z._code))Z._code=0;let J=Z._code.toString();G=G.replace(J,""),Z._description=G.trim()}}if(Q.length>=1)Q.slice(1).map((G)=>{if(G){let J=G.indexOf(":");if(J>-1){let K=G.slice(0,J),W=G.slice(J+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=Jd0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,X]of this.headers)for(let Q=0;Q<X.length;Q++)$=`${$}\r
|
|
1298
1298
|
${Z}: ${X[Q]}`;return`${$}\r
|