decocms 4.235.3 → 4.235.4
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-Bwydi14I.js → AlertCircle-D2nUog9Y.js} +1 -1
- package/dist/client/assets/{AreaChart-CyMCau1j.js → AreaChart-DI2yFAHx.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CQq-v71a.js → ArrowLeft-CPB7dZBv.js} +1 -1
- package/dist/client/assets/{ArrowUp-D9Pq1-_Q.js → ArrowUp-CsAuyeSG.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BDYpD13s.js → ArrowUpRight-BDLo2Vsa.js} +1 -1
- package/dist/client/assets/{Check-isP8gYf8.js → Check-Cok2p3l7.js} +1 -1
- package/dist/client/assets/{CheckCircle-Crcc7Js6.js → CheckCircle-Dd3TDBGu.js} +1 -1
- package/dist/client/assets/{ChevronDown-CqBRCEM7.js → ChevronDown-nyq9wJ8V.js} +1 -1
- package/dist/client/assets/{ChevronRight-DROcm57M.js → ChevronRight-BwyR4cfl.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dyol5uzi.js → ChevronUp-Ck86-Vey.js} +1 -1
- package/dist/client/assets/{Copy01-DxhjeeL7.js → Copy01-CzSgFd-p.js} +1 -1
- package/dist/client/assets/{CpuChip01-DvqxZNNS.js → CpuChip01-DgOUkEPg.js} +1 -1
- package/dist/client/assets/{CreditCard01-DFRjZmk3.js → CreditCard01-D-5mF-ZT.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bz7uZKG1.js → DotsVertical-DXfeJwWF.js} +1 -1
- package/dist/client/assets/{Eye-CLzoNrd7.js → Eye-Db2nUT7-.js} +1 -1
- package/dist/client/assets/{FilterLines-Bxih74Ej.js → FilterLines-DI-c4RUP.js} +1 -1
- package/dist/client/assets/{Globe01-luUDoMdK.js → Globe01-CDhNr05S.js} +1 -1
- package/dist/client/assets/{Globe04-DJmSLeef.js → Globe04-dxMfFue_.js} +1 -1
- package/dist/client/assets/{HardDrive-DLsaxc3k.js → HardDrive-BikXdRZh.js} +1 -1
- package/dist/client/assets/{Key01-BlNPjLtd.js → Key01-XwV-fPuF.js} +1 -1
- package/dist/client/assets/{LayoutLeft-EU8_73Mi.js → LayoutLeft-DiQiSBez.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D3YPLPSn.js → LinkExternal01-CVNwg0nQ.js} +1 -1
- package/dist/client/assets/{LogOut01-eF-AIyxj.js → LogOut01-D8WF_HsV.js} +1 -1
- package/dist/client/assets/{Monitor01-BmtQnZxa.js → Monitor01-B90JF_HN.js} +1 -1
- package/dist/client/assets/{Palette-BdzSoMvh.js → Palette-DYeHswI6.js} +1 -1
- package/dist/client/assets/{Play-iI8jICu7.js → Play-DmgHI1_P.js} +1 -1
- package/dist/client/assets/{Plus-CB1ECJha.js → Plus-CcIEzZz3.js} +1 -1
- package/dist/client/assets/{SearchLg-CsoOuzi9.js → SearchLg-BujbX4Yf.js} +1 -1
- package/dist/client/assets/{SearchMd-DFrlLVmc.js → SearchMd-L06vKuns.js} +1 -1
- package/dist/client/assets/{Settings02-DZPa3UtA.js → Settings02-CnjYnjoz.js} +1 -1
- package/dist/client/assets/{Share07-CqKLzL60.js → Share07-BkiOq4HD.js} +1 -1
- package/dist/client/assets/{Shield01-9ysDO5R_.js → Shield01-D6ghTWw4.js} +1 -1
- package/dist/client/assets/{Star01-Bz59dmph.js → Star01-dJYiG7oI.js} +1 -1
- package/dist/client/assets/{Stars01-02KBe3zG.js → Stars01-CLgDB8qK.js} +1 -1
- package/dist/client/assets/{Stars02-CZYxCDOh.js → Stars02-Bq4qmq47.js} +1 -1
- package/dist/client/assets/{Sun-BVeuatGT.js → Sun-CccxdEiP.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bt4y0w2O.js → SwitchHorizontal01-MsX9O-sX.js} +1 -1
- package/dist/client/assets/{Tool01-Be2SYdOP.js → Tool01-tqe85jrx.js} +1 -1
- package/dist/client/assets/{Tool02-_rxG6cXC.js → Tool02-IYAr0Bch.js} +1 -1
- package/dist/client/assets/{Trash01-CxcuYQGT.js → Trash01-Db_H6xqK.js} +1 -1
- package/dist/client/assets/{TrendUp01-DlMtp5s8.js → TrendUp01-BehV5q-r.js} +1 -1
- package/dist/client/assets/{Upload01-C7_qWMmK.js → Upload01-DA0SrNfj.js} +1 -1
- package/dist/client/assets/{User01-DIcEa3mr.js → User01-D-Fr5V8H.js} +1 -1
- package/dist/client/assets/{Users01-D5ve9sBQ.js → Users01-BI1kG9lk.js} +1 -1
- package/dist/client/assets/{Users03-Bd6stz1B.js → Users03-t4th-_Li.js} +1 -1
- package/dist/client/assets/{X-D5xwEaEa.js → X-Bx5KFiJp.js} +1 -1
- package/dist/client/assets/{XCircle-BMZJ58_0.js → XCircle-Dbx6ZKqw.js} +1 -1
- package/dist/client/assets/{XClose-D9Vpl5_5.js → XClose-Ekyc_Aao.js} +1 -1
- package/dist/client/assets/{YAxis-Fj-LnnDa.js → YAxis-CyIpvIsw.js} +1 -1
- package/dist/client/assets/{Zap-DbP8SK5P.js → Zap-OqvKsHiT.js} +1 -1
- package/dist/client/assets/{ZapSquare-DYeUj_zf.js → ZapSquare-r0BK725p.js} +1 -1
- package/dist/client/assets/{access-gate-CI3bQiZu.js → access-gate-DGuEpGM1.js} +1 -1
- package/dist/client/assets/{agent-icon-DcHHXs2-.js → agent-icon-CD7MCjLr.js} +1 -1
- package/dist/client/assets/{agents-list-BWbliZZ2.js → agents-list-DBsmQh_f.js} +1 -1
- package/dist/client/assets/{ai-providers-D22q-r3J.js → ai-providers-DIegkj9r.js} +1 -1
- package/dist/client/assets/{alert-hNMHlgE2.js → alert-B_zvz_RA.js} +1 -1
- package/dist/client/assets/{alert-dialog-BaZZAnA9.js → alert-dialog-DaA3ovTd.js} +1 -1
- package/dist/client/assets/{api-keys-CXYt948F.js → api-keys-DymDI2LG.js} +1 -1
- package/dist/client/assets/{app-editor-BVubpadv.js → app-editor-B6uTcb83.js} +1 -1
- package/dist/client/assets/{auth-ImzY9inz.js → auth-Dre98ze2.js} +1 -1
- package/dist/client/assets/{auth-catchall-DZPdTwVl.js → auth-catchall-CCoA8z0o.js} +1 -1
- package/dist/client/assets/{auth-entry-CqjDDhwg.js → auth-entry-BC2Y3aN8.js} +1 -1
- package/dist/client/assets/{auth-split-layout-bdun82nT.js → auth-split-layout-Cu2zToQm.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B5f5a0rV.js → authenticate-and-persist-oauth-DNhKyQst.js} +1 -1
- package/dist/client/assets/{automation-list-row-DQICvnUV.js → automation-list-row-iqA99UTd.js} +1 -1
- package/dist/client/assets/{automation-runs-BVAJ6EQ9.js → automation-runs-8Q6QwbAl.js} +1 -1
- package/dist/client/assets/{automations-BmfJ8SGu.js → automations-EhBzrRcZ.js} +1 -1
- package/dist/client/assets/{avatar-CHFle1e4.js → avatar-BmwxpR20.js} +1 -1
- package/dist/client/assets/{badge-f64yIxwY.js → badge-dx6dTB2Q.js} +1 -1
- package/dist/client/assets/{billing-cmDNLC2I.js → billing-C2pxTjjn.js} +1 -1
- package/dist/client/assets/{block-document-TGSZwQGl.js → block-document-BlPF8Hg7.js} +1 -1
- package/dist/client/assets/{brand-context-CYmfZQkK.js → brand-context-C2I_z-QW.js} +1 -1
- package/dist/client/assets/{buckets-6IIGnfuP.js → buckets-D_mmC_wZ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-xHqRThDz.js → bulk-category-panel-C-0h7KUh.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cp6Ab8lu.js → capability-load-error-BPLsdPYF.js} +1 -1
- package/dist/client/assets/{card-aw_g0sYx.js → card-CmjVv1Oy.js} +1 -1
- package/dist/client/assets/{cards-D81Rmj3q.js → cards-CBJ6rRqU.js} +1 -1
- package/dist/client/assets/{category-editor-Dxd6sAkf.js → category-editor-YrdzlgeV.js} +1 -1
- package/dist/client/assets/{chart-Br8LsxFd.js → chart-BFwExGFP.js} +1 -1
- package/dist/client/assets/{chat-context-Dft_iFg6.js → chat-context-B-OEzU7t.js} +1 -1
- package/dist/client/assets/{checkbox-yCaiWOkQ.js → checkbox-i8qXr6A7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cy-lYvEV.js → cli-auth-success-Cg60NVld.js} +1 -1
- package/dist/client/assets/{collection-detail-BUIcM4oC.js → collection-detail-DRx55uYA.js} +1 -1
- package/dist/client/assets/{collection-display-button-C7Q2GURi.js → collection-display-button-Be6zn3ij.js} +1 -1
- package/dist/client/assets/{collection-search-DIRAP0LZ.js → collection-search-CoLqjQdj.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CBulnbGP.js → collection-table-wrapper-CNCuaiUE.js} +1 -1
- package/dist/client/assets/{collection-tabs-B09HGnBc.js → collection-tabs-99eK0FRA.js} +1 -1
- package/dist/client/assets/{command-CSb61sIV.js → command-Cv2A3uSb.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-Ch1yg_Kt.js → commerce-onboarding-DrhfJI4v.js} +1 -1
- package/dist/client/assets/{connect-rvCJ3KTb.js → connect-DwGm-nAw.js} +1 -1
- package/dist/client/assets/{connection-MZ8g_ajJ.js → connection-Cf1kcdez.js} +1 -1
- package/dist/client/assets/{connection-card-DkX8cukg.js → connection-card-D6tBvgoc.js} +1 -1
- package/dist/client/assets/{connection-detail-DcC3nbab.js → connection-detail-DeCVo5s7.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BkdB0IDN.js → connection-form-helpers-DPBeTUsW.js} +1 -1
- package/dist/client/assets/{connections-JIp5wErx.js → connections-CbK06SDX.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CxesjQ_Y.js → decopilot-sse-pool-DE3tPN2P.js} +1 -1
- package/dist/client/assets/{dialog-DdhWqZEd.js → dialog-BQwwYjeP.js} +1 -1
- package/dist/client/assets/{domain-settings-CandEnzc.js → domain-settings-VGjYjNN9.js} +1 -1
- package/dist/client/assets/{drawer-BNSl5biQ.js → drawer-zqzZI6dH.js} +1 -1
- package/dist/client/assets/{dropdown-menu-O4Sdhg7B.js → dropdown-menu-BIfUzigV.js} +1 -1
- package/dist/client/assets/{empty-state-o99Shgzy.js → empty-state-DRurkRJG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-rWaOmstu.js → extract-connection-data-Dp0i4RCz.js} +1 -1
- package/dist/client/assets/{file-explorer-BqDlYxrP.js → file-explorer-D5fTIQ1a.js} +1 -1
- package/dist/client/assets/{file-type-icon-BzKKp0ex.js → file-type-icon-ya5Xt_EW.js} +1 -1
- package/dist/client/assets/{form-0Tl-Y9Bo.js → form-CgJFjslm.js} +1 -1
- package/dist/client/assets/{general-CfUndi7r.js → general-BViuRGS-.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bu5ALaks.js → github-repo-picker-BTKOBqaS.js} +1 -1
- package/dist/client/assets/{hooks-DzvOeLke.js → hooks-BZPTg9Rd.js} +1 -1
- package/dist/client/assets/{index-7soBkhNt.js → index--fgQN3MS.js} +1 -1
- package/dist/client/assets/{index-5flhaUFY.js → index-BCTW2I9W.js} +1 -1
- package/dist/client/assets/{index-e5nCYXfP.js → index-BQC50rYJ.js} +4 -4
- package/dist/client/assets/{index-DKvuIL4e.js → index-BSEOLkDI.js} +1 -1
- package/dist/client/assets/{index-Buqvtd-9.js → index-BsSHRkKy.js} +1 -1
- package/dist/client/assets/{index-CXuHNmBm.js → index-BtYqR1Db.js} +1 -1
- package/dist/client/assets/{index-BnkwUee6.js → index-Dcmwku1J.js} +1 -1
- package/dist/client/assets/{index-CwrQgedd.js → index-DlZhL91s.js} +1 -1
- package/dist/client/assets/{index-BJIGWqo8.js → index-Dw1IUaC-.js} +1 -1
- package/dist/client/assets/{index-CL-Qamco.js → index-kUVoNeDu.js} +53 -53
- package/dist/client/assets/{index-redirect-jQaChfLv.js → index-redirect-B3pSdK3U.js} +1 -1
- package/dist/client/assets/{infra-billing--UFgfRkL.js → infra-billing-Dy7vsN3d.js} +1 -1
- package/dist/client/assets/{input-B8WNEFyS.js → input-jhdcbG_Y.js} +1 -1
- package/dist/client/assets/{integration-icon-DTNmGWzM.js → integration-icon-BmTzKcW9.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BKr85Mo9.js → invite-member-dialog-BD1CxALL.js} +1 -1
- package/dist/client/assets/{label-BrbR_fe8.js → label-LTu4TNSY.js} +1 -1
- package/dist/client/assets/{layout-BrCiDRcD.js → layout-D40sUkFN.js} +1 -1
- package/dist/client/assets/{login-Bfg0GbZO.js → login-zLkCBvVS.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D3xwnbxY.js → mcp-oauth-n-oBI6II.js} +1 -1
- package/dist/client/assets/{members-DnW4p-kR.js → members-ChvSDILX.js} +1 -1
- package/dist/client/assets/{monaco-editor-BDwaCCaY.js → monaco-editor-CEICLbIx.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DY5_x_tH.js → monitoring-stats-row-Ba8id58f.js} +1 -1
- package/dist/client/assets/{multi-select-CqEsiaxk.js → multi-select-BLbED3op.js} +1 -1
- package/dist/client/assets/{oauth-callback-WVZDROGQ.js → oauth-callback-WRroRCVa.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CtWgi2H3.js → oauth-callback-ai-provider-wh-qLiFa.js} +1 -1
- package/dist/client/assets/{onboarding-B9zLXQMi.js → onboarding-G0SGJIlK.js} +1 -1
- package/dist/client/assets/{org-layout-kOyt-afP.js → org-layout-rbqCu8F4.js} +1 -1
- package/dist/client/assets/{organization-choice-C78H69g0.js → organization-choice-DSFQ59YB.js} +1 -1
- package/dist/client/assets/{orgs-9DkEAu_p.js → orgs-DCkvlxbR.js} +1 -1
- package/dist/client/assets/{page-seo-form-BpMvJAAm.js → page-seo-form-B1laWrQa.js} +1 -1
- package/dist/client/assets/{popover-trSfF1TK.js → popover-tpnuRA9R.js} +1 -1
- package/dist/client/assets/{post-editor-sKkpXXBp.js → post-editor--P65bB8u.js} +1 -1
- package/dist/client/assets/{primitives-CcRL_1c1.js → primitives-VKUGPsBY.js} +1 -1
- package/dist/client/assets/profile-BEX9uGZK.js +1 -0
- package/dist/client/assets/{project-app-view-R82xY1hr.js → project-app-view-Lc56k15c.js} +1 -1
- package/dist/client/assets/record-editor-BR_9ooUL.js +1 -0
- package/dist/client/assets/{redirect-editor-D2CLOWBL.js → redirect-editor-6XLbfGJd.js} +1 -1
- package/dist/client/assets/registry-Bgrhq0n9.js +2 -0
- package/dist/client/assets/{registry-layout-B7ANcT3L.js → registry-layout-CqnoaPzp.js} +1 -1
- package/dist/client/assets/{reports-DMEmPO7O.js → reports-jq0R8QhN.js} +1 -1
- package/dist/client/assets/{require-capability-bmntaB2G.js → require-capability-BIAc7Uug.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CPPj-ahz.js → required-auth-layout-Cjh-4ecu.js} +1 -1
- package/dist/client/assets/{reset-password-D52hDQF5.js → reset-password-BzPOiosZ.js} +1 -1
- package/dist/client/assets/{roles-CZZ-Z1Q8.js → roles-D0Qx9mHy.js} +1 -1
- package/dist/client/assets/{search-input-DRSdLzOu.js → search-input-B8riqD2G.js} +1 -1
- package/dist/client/assets/{secrets-DsCHtNbD.js → secrets-BXaq7OUv.js} +1 -1
- package/dist/client/assets/{sections-editor-Ccm-SMvD.js → sections-editor-BnESLqSI.js} +1 -1
- package/dist/client/assets/{select-CGXOjZU9.js → select-BWFh2Bei.js} +1 -1
- package/dist/client/assets/{select-model-Bt7Md2gn.js → select-model-DXwD263x.js} +1 -1
- package/dist/client/assets/{self-tool-result-uuesWai-.js → self-tool-result-CZnZkNSs.js} +1 -1
- package/dist/client/assets/{seo-editor-9pkXcC9r.js → seo-editor-5Kxd-h6Y.js} +1 -1
- package/dist/client/assets/{settings-layout-n0mvbIOB.js → settings-layout-CZq6gwNG.js} +1 -1
- package/dist/client/assets/{settings-section-Br6573vj.js → settings-section-Cp6UDCOJ.js} +1 -1
- package/dist/client/assets/{shell-controls-C6ddoXS4.js → shell-controls-DEP2rru-.js} +1 -1
- package/dist/client/assets/{shell-layout-Cm2-FriW.js → shell-layout-BJVD_HrG.js} +1 -1
- package/dist/client/assets/{sidebar-B0UMMEqP.js → sidebar-2gxbheog.js} +1 -1
- package/dist/client/assets/{skeleton-DZQzIQrx.js → skeleton-DQsvscgv.js} +1 -1
- package/dist/client/assets/{spinner-cO_WluR0.js → spinner-BDzZagef.js} +1 -1
- package/dist/client/assets/{sso-Bc1GI_tn.js → sso-BQY7dWxf.js} +1 -1
- package/dist/client/assets/{store-CW7Ox3f9.js → store-Cv2PFUv3.js} +1 -1
- package/dist/client/assets/store-registry-DoDGf-Xm.js +2 -0
- package/dist/client/assets/{studio-tools-D6dyqLRX.js → studio-tools-Ba9QfsQ9.js} +1 -1
- package/dist/client/assets/{switch-Xbje-8On.js → switch-D4y0RCVr.js} +1 -1
- package/dist/client/assets/{synced-repos-CD4mNHNL.js → synced-repos-DqVDLOZK.js} +1 -1
- package/dist/client/assets/{tab-id-DVp8IqUW.js → tab-id-F4sMDTas.js} +1 -1
- package/dist/client/assets/{table-DOYJKxeS.js → table-6r-RpN_D.js} +1 -1
- package/dist/client/assets/{tabs-8vr8ecc2.js → tabs-B2LuHnWG.js} +1 -1
- package/dist/client/assets/{textarea-DH7ULA4L.js → textarea-ByIwkn24.js} +1 -1
- package/dist/client/assets/{toggle-group-orNDbn_0.js → toggle-group-DJxXfm9P.js} +1 -1
- package/dist/client/assets/{toolbar-DtwW2tvs.js → toolbar-ipTs1rCn.js} +1 -1
- package/dist/client/assets/{tooltip-C79b2Zcg.js → tooltip-DVrLoxbV.js} +1 -1
- package/dist/client/assets/{track-Yl2Olv-n.js → track-Bg89dbaf.js} +1 -1
- package/dist/client/assets/{types-Btb2IKkZ.js → types-D7VRk2Oq.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D11QBYNO.js → use-ai-providers-CqWyeMNw.js} +1 -1
- package/dist/client/assets/{use-api-keys-BhIcZ0AY.js → use-api-keys-DCmHAKMo.js} +1 -1
- package/dist/client/assets/{use-automations-CfxBY4Tt.js → use-automations-jthP4eLd.js} +1 -1
- package/dist/client/assets/{use-autosave-R9dyrOc9.js → use-autosave-VsVy9sRc.js} +1 -1
- package/dist/client/assets/{use-capability-D6bUvFFN.js → use-capability-DMewHf2p.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BxJ_9IDb.js → use-clock-tick-CrbpHDcd.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-BSMb3-hg.js → use-commerce-diagnostic-B7a1G5zN.js} +1 -1
- package/dist/client/assets/{use-connection-Cptj5T4a.js → use-connection-1_PudVHA.js} +1 -1
- package/dist/client/assets/{use-copy-LvKjdtZJ.js → use-copy-CIcvgBCB.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-rypVxVUP.js → use-create-virtual-mcp-B4uPPi_T.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DZnOuXX-.js → use-debounced-autosave-B8pdghhx.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CD6_uC0K.js → use-debounced-value-CeBz1B8T.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CoZNCfaG.js → use-decopilot-events-CurDGt_M.js} +1 -1
- package/dist/client/assets/{use-delete-connection-vLTPwINP.js → use-delete-connection-VDBapq4m.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D4Jq1j4F.js → use-deployment-admin-FlTJrLiE.js} +1 -1
- package/dist/client/assets/{use-file-configs-xBANpYQy.js → use-file-configs-CYHMSiVQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BoXbrD5q.js → use-infinite-scroll-CHrdOLkT.js} +1 -1
- package/dist/client/assets/{use-infra-billing-7f9OWYXu.js → use-infra-billing-2a7ctBRb.js} +1 -1
- package/dist/client/assets/{use-join-requests-BQQirvpV.js → use-join-requests-DzLAVTOL.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C_ACRe7a.js → use-mcp-client-CWBsZvnY.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-_KOqVZC4.js → use-mcp-tools-CpZif1FM.js} +1 -1
- package/dist/client/assets/{use-members-ajajk4Z_.js → use-members-DftQVkWn.js} +1 -1
- package/dist/client/assets/{use-mobile-DWnet46r.js → use-mobile-oQQuSKyQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CqXEf5IA.js → use-navigate-to-agent-C3BkMRu0.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Cl5v7FnL.js → use-open-billing-url-msWJHknV.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DkuW1dGS.js → use-org-auth-client-CGbL5nfk.js} +1 -1
- package/dist/client/assets/{use-org-sso-CM3go17J.js → use-org-sso-13MlH4Of.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bpa0mBqZ.js → use-organization-roles-B2EpTAQS.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BJLsKbiC.js → use-organization-settings-CK0uTfhX.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CAwVl542.js → use-registry-connections-DS2ZWEYe.js} +1 -1
- package/dist/client/assets/{use-secrets-4rIiGjvn.js → use-secrets-DE8cOnfP.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BCeYzKBq.js → use-section-preview-base-DAvZdlgp.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DgFZS-3W.js → use-status-sounds-BEkB6Wui.js} +1 -1
- package/dist/client/assets/{use-tags-BKlpIs9k.js → use-tags-BSNbzGjb.js} +1 -1
- package/dist/client/assets/{use-view-mode-DlWt_WX6.js → use-view-mode-Cy_3jj7y.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BGpllzxx.js → use-virtual-mcp-BBM1oJef.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BFF0Lvhy.js +1 -0
- package/dist/client/assets/{useRouterState-BS7HHmRu.js → useRouterState-u30ob2G8.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ZpufpLy_.js +1 -0
- package/dist/client/assets/{users-C6ZJHpQT.js → users-CCr6jOeX.js} +1 -1
- package/dist/client/assets/{variant-calendar-CGuwTpiJ.js → variant-calendar-D6kV5HqN.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DHgZvTLz.js → view-mode-toggle-DOubTFJ8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/profile-BpYFCz0j.js +0 -1
- package/dist/client/assets/record-editor-D--HJKhy.js +0 -1
- package/dist/client/assets/registry-C8Ft6Kup.js +0 -2
- package/dist/client/assets/store-registry-ZMFzJSV9.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DYQPr2Bc.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D-foMir8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as tt,r as et,j as s,m as ot,B as nt}from"./index-e5nCYXfP.js";import{w as vt,a7 as dt,aK as yt}from"./agent-icon-DcHHXs2-.js";import{i as Tt}from"./ChevronRight-DROcm57M.js";import{L as jt}from"./label-BrbR_fe8.js";import{B as pt}from"./automation-runs-BVAJ6EQ9.js";import{S as wt}from"./switch-Xbje-8On.js";import{T as Nt,c as kt,a as Mt}from"./tooltip-C79b2Zcg.js";import{V as _t}from"./view-mode-toggle-DHgZvTLz.js";import"./AlertCircle-Bwydi14I.js";import"./Tool01-Be2SYdOP.js";import"./ArrowUp-D9Pq1-_Q.js";import"./ArrowLeft-CQq-v71a.js";import"./Tool02-_rxG6cXC.js";import"./XCircle-BMZJ58_0.js";import"./ArrowUpRight-BDYpD13s.js";import"./TrendUp01-DlMtp5s8.js";import"./ZapSquare-DYeUj_zf.js";import"./Users03-Bd6stz1B.js";import"./CheckCircle-Crcc7Js6.js";import"./Check-isP8gYf8.js";import"./ChevronDown-CqBRCEM7.js";import"./ChevronUp-Dyol5uzi.js";import"./DotsVertical-Bz7uZKG1.js";import"./Stars02-CZYxCDOh.js";import"./Copy01-DxhjeeL7.js";import"./CpuChip01-DvqxZNNS.js";import"./CreditCard01-DFRjZmk3.js";import"./Globe01-luUDoMdK.js";import"./Settings02-DZPa3UtA.js";import"./Eye-CLzoNrd7.js";import"./FilterLines-Bxih74Ej.js";import"./Share07-CqKLzL60.js";import"./Star01-Bz59dmph.js";import"./Globe04-DJmSLeef.js";import"./SwitchHorizontal01-Bt4y0w2O.js";import"./HardDrive-DLsaxc3k.js";import"./Key01-BlNPjLtd.js";import"./LayoutLeft-EU8_73Mi.js";import"./LinkExternal01-D3YPLPSn.js";import"./LogOut01-eF-AIyxj.js";import"./Monitor01-BmtQnZxa.js";import"./Sun-BVeuatGT.js";import"./Palette-BdzSoMvh.js";import"./Play-iI8jICu7.js";import"./Plus-CB1ECJha.js";import"./SearchLg-CsoOuzi9.js";import"./SearchMd-DFrlLVmc.js";import"./Shield01-9ysDO5R_.js";import"./Stars01-02KBe3zG.js";import"./Trash01-CxcuYQGT.js";import"./Upload01-C7_qWMmK.js";import"./User01-DIcEa3mr.js";import"./Users01-D5ve9sBQ.js";import"./XClose-D9Vpl5_5.js";import"./X-D5xwEaEa.js";import"./Zap-DbP8SK5P.js";import"./select-CGXOjZU9.js";import"./useInfiniteQuery-DYQPr2Bc.js";import"./use-infinite-scroll-BoXbrD5q.js";import"./use-connection-Cptj5T4a.js";import"./use-mcp-client-C_ACRe7a.js";import"./auth-ImzY9inz.js";import"./use-virtual-mcp-BGpllzxx.js";import"./card-aw_g0sYx.js";import"./sidebar-B0UMMEqP.js";import"./use-mobile-DWnet46r.js";import"./table-DOYJKxeS.js";import"./empty-state-o99Shgzy.js";import"./use-members-ajajk4Z_.js";import"./use-org-auth-client-DkuW1dGS.js";import"./use-clock-tick-BxJ_9IDb.js";import"./use-automations-CfxBY4Tt.js";import"./studio-tools-D6dyqLRX.js";import"./useSuspenseInfiniteQuery-D-foMir8.js";import"./avatar-CHFle1e4.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-LvKjdtZJ.js";import"./dialog-DdhWqZEd.js";import"./tab-id-DVp8IqUW.js";import"./hooks-DzvOeLke.js";import"./decopilot-sse-pool-CxesjQ_Y.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-Dft_iFg6.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D11QBYNO.js";import"./use-decopilot-events-CoZNCfaG.js";import"./use-organization-settings-BJLsKbiC.js";import"./monaco-editor-BDwaCCaY.js";import"./spinner-cO_WluR0.js";import"./types-Btb2IKkZ.js";import"./shell-layout-Cm2-FriW.js";import"./required-auth-layout-CPPj-ahz.js";import"./use-org-sso-CM3go17J.js";import"./integration-icon-DTNmGWzM.js";import"./use-navigate-to-agent-CqXEf5IA.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-Br8LsxFd.js";import"./index-Buqvtd-9.js";import"./form-0Tl-Y9Bo.js";import"./input-B8WNEFyS.js";import"./file-type-icon-BzKKp0ex.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 ft(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)ft(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,f=[];if(ft(d.rule,f),f.length===0)return;const x=It(d.value)??(m||n);for(const h of f)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 Y(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 Kt(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),f=B(c.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?Z(r,-1):f,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),p=Math.max(it(new Date(j),n)-v,0);p<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:p})}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(f=>f<=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 Ut(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 Yt(e){const t=G.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=Ut(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 Gt(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=G.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=Gt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const f=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]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,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(Nt,{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(Yt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let p;return t[23]!==v||t[24]!==j?(p=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=p):p=t[25],p}function or(e){const t=G.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,f,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),f=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=f,t[4]=u}else d=t[2],f=t[3],u=t[4];const x=f;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"?Y(P,-1):Y(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?Y(P,1):Y(P,3)),t[8]=i,t[9]=v):v=t[9];const p=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 N;t[14]!==r?(N=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=N):N=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]!==N?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":N,children:D}),t[17]=j,t[18]=N,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]!==p||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:p,"aria-label":M,children:S}),t[23]=p,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 w;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(w=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]=w):w=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(wt,{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 K;t[59]!==w||t[60]!==z?(K=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[w,z]}),t[59]=w,t[60]=z,t[61]=K):K=t[61];let U;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(U=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]=U):U=t[68];let q;return t[69]!==K||t[70]!==U?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[K,U]}),t[69]=K,t[70]=U,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=G.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=G.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=pt,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=Kt(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((p,y)=>{const T=p.getMonth()===n.getMonth(),N=p.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",N&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),N=mt+p.lane*(rt+ct),D=p.leftUnits/7*100,k=p.widthUnits/7*100,M=p.variant.openStart&&g===0,S=p.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:p.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:N,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",p.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 f;return t[13]!==o||t[14]!==c||t[15]!==d?(f=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}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=G.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=Y(n,Q),m=new Date,l=new Map;for(const _ of r){const w=l.get(_.blockKey)??[];w.push(_),l.set(_.blockKey,w)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),f=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,w)=>Y(o,w),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()?f(m):null,g=tt(),b=pt,j="flex-1 min-h-0",v="min-w-[900px] relative";let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:J},t[2]=p):p=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:p,children:y}),t[5]=y,t[6]=T):T=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:N,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[w,L]=_,H=ut(i,w),F=L[0]?.blockLabel??w;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=f(new Date(R)),V=f(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))]},w)});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{or as VariantCalendar};
|
|
1
|
+
import{c as G,b as tt,r as et,j as s,m as ot,B as nt}from"./index-BQC50rYJ.js";import{w as vt,a7 as dt,aK as yt}from"./agent-icon-CD7MCjLr.js";import{i as Tt}from"./ChevronRight-BwyR4cfl.js";import{L as jt}from"./label-LTu4TNSY.js";import{B as pt}from"./automation-runs-8Q6QwbAl.js";import{S as wt}from"./switch-D4y0RCVr.js";import{T as Nt,c as kt,a as Mt}from"./tooltip-DVrLoxbV.js";import{V as _t}from"./view-mode-toggle-DOubTFJ8.js";import"./AlertCircle-D2nUog9Y.js";import"./Tool01-tqe85jrx.js";import"./ArrowUp-CsAuyeSG.js";import"./ArrowLeft-CPB7dZBv.js";import"./Tool02-IYAr0Bch.js";import"./XCircle-Dbx6ZKqw.js";import"./ArrowUpRight-BDLo2Vsa.js";import"./TrendUp01-BehV5q-r.js";import"./ZapSquare-r0BK725p.js";import"./Users03-t4th-_Li.js";import"./CheckCircle-Dd3TDBGu.js";import"./Check-Cok2p3l7.js";import"./ChevronDown-nyq9wJ8V.js";import"./ChevronUp-Ck86-Vey.js";import"./DotsVertical-DXfeJwWF.js";import"./Stars02-Bq4qmq47.js";import"./Copy01-CzSgFd-p.js";import"./CpuChip01-DgOUkEPg.js";import"./CreditCard01-D-5mF-ZT.js";import"./Globe01-CDhNr05S.js";import"./Settings02-CnjYnjoz.js";import"./Eye-Db2nUT7-.js";import"./FilterLines-DI-c4RUP.js";import"./Share07-BkiOq4HD.js";import"./Star01-dJYiG7oI.js";import"./Globe04-dxMfFue_.js";import"./SwitchHorizontal01-MsX9O-sX.js";import"./HardDrive-BikXdRZh.js";import"./Key01-XwV-fPuF.js";import"./LayoutLeft-DiQiSBez.js";import"./LinkExternal01-CVNwg0nQ.js";import"./LogOut01-D8WF_HsV.js";import"./Monitor01-B90JF_HN.js";import"./Sun-CccxdEiP.js";import"./Palette-DYeHswI6.js";import"./Play-DmgHI1_P.js";import"./Plus-CcIEzZz3.js";import"./SearchLg-BujbX4Yf.js";import"./SearchMd-L06vKuns.js";import"./Shield01-D6ghTWw4.js";import"./Stars01-CLgDB8qK.js";import"./Trash01-Db_H6xqK.js";import"./Upload01-DA0SrNfj.js";import"./User01-D-Fr5V8H.js";import"./Users01-BI1kG9lk.js";import"./XClose-Ekyc_Aao.js";import"./X-Bx5KFiJp.js";import"./Zap-OqvKsHiT.js";import"./select-BWFh2Bei.js";import"./useInfiniteQuery-BFF0Lvhy.js";import"./use-infinite-scroll-CHrdOLkT.js";import"./use-connection-1_PudVHA.js";import"./use-mcp-client-CWBsZvnY.js";import"./auth-Dre98ze2.js";import"./use-virtual-mcp-BBM1oJef.js";import"./card-CmjVv1Oy.js";import"./sidebar-2gxbheog.js";import"./use-mobile-oQQuSKyQ.js";import"./table-6r-RpN_D.js";import"./empty-state-DRurkRJG.js";import"./use-members-DftQVkWn.js";import"./use-org-auth-client-CGbL5nfk.js";import"./use-clock-tick-CrbpHDcd.js";import"./use-automations-jthP4eLd.js";import"./studio-tools-Ba9QfsQ9.js";import"./useSuspenseInfiniteQuery-ZpufpLy_.js";import"./avatar-BmwxpR20.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CIcvgBCB.js";import"./dialog-BQwwYjeP.js";import"./tab-id-F4sMDTas.js";import"./hooks-BZPTg9Rd.js";import"./decopilot-sse-pool-DE3tPN2P.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-B-OEzU7t.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-CqWyeMNw.js";import"./use-decopilot-events-CurDGt_M.js";import"./use-organization-settings-CK0uTfhX.js";import"./monaco-editor-CEICLbIx.js";import"./spinner-BDzZagef.js";import"./types-D7VRk2Oq.js";import"./shell-layout-BJVD_HrG.js";import"./required-auth-layout-Cjh-4ecu.js";import"./use-org-sso-13MlH4Of.js";import"./integration-icon-BmTzKcW9.js";import"./use-navigate-to-agent-C3BkMRu0.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-BFwExGFP.js";import"./index-BsSHRkKy.js";import"./form-CgJFjslm.js";import"./input-jhdcbG_Y.js";import"./file-type-icon-ya5Xt_EW.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 ft(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)ft(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,f=[];if(ft(d.rule,f),f.length===0)return;const x=It(d.value)??(m||n);for(const h of f)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 Y(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 Kt(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),f=B(c.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?Z(r,-1):f,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),p=Math.max(it(new Date(j),n)-v,0);p<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:p})}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(f=>f<=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 Ut(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 Yt(e){const t=G.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=Ut(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 Gt(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=G.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=Gt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const f=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]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,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(Nt,{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(Yt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let p;return t[23]!==v||t[24]!==j?(p=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=p):p=t[25],p}function or(e){const t=G.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,f,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),f=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=f,t[4]=u}else d=t[2],f=t[3],u=t[4];const x=f;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"?Y(P,-1):Y(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?Y(P,1):Y(P,3)),t[8]=i,t[9]=v):v=t[9];const p=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 N;t[14]!==r?(N=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=N):N=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]!==N?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":N,children:D}),t[17]=j,t[18]=N,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]!==p||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:p,"aria-label":M,children:S}),t[23]=p,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 w;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(w=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]=w):w=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(wt,{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 K;t[59]!==w||t[60]!==z?(K=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[w,z]}),t[59]=w,t[60]=z,t[61]=K):K=t[61];let U;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(U=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]=U):U=t[68];let q;return t[69]!==K||t[70]!==U?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[K,U]}),t[69]=K,t[70]=U,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=G.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=G.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=pt,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=Kt(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((p,y)=>{const T=p.getMonth()===n.getMonth(),N=p.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",N&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),N=mt+p.lane*(rt+ct),D=p.leftUnits/7*100,k=p.widthUnits/7*100,M=p.variant.openStart&&g===0,S=p.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:p.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:N,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",p.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 f;return t[13]!==o||t[14]!==c||t[15]!==d?(f=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}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=G.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=Y(n,Q),m=new Date,l=new Map;for(const _ of r){const w=l.get(_.blockKey)??[];w.push(_),l.set(_.blockKey,w)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),f=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,w)=>Y(o,w),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()?f(m):null,g=tt(),b=pt,j="flex-1 min-h-0",v="min-w-[900px] relative";let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:J},t[2]=p):p=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:p,children:y}),t[5]=y,t[6]=T):T=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:N,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[w,L]=_,H=ut(i,w),F=L[0]?.blockLabel??w;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=f(new Date(R)),V=f(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))]},w)});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{or 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-BQC50rYJ.js";import{c as k,T as I,a as P}from"./tooltip-DVrLoxbV.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,7 +50,7 @@
|
|
|
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-
|
|
53
|
+
<script type="module" crossorigin src="/assets/index-BQC50rYJ.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-BX7x5P5r.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -1332,7 +1332,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var qm1=O(()=>{Xf()});f
|
|
|
1332
1332
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await kb`
|
|
1333
1333
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1334
1334
|
`.execute($)}}async function dt1($){await Gn6($),await Jn6($);let Z=new ct1({db:$,provider:{getMigrations:()=>Promise.resolve(em0)}}),{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 Kn6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await Tc0();let G=X??U6(),J=async()=>{if(!Z&&!X)await kB(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await dt1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function Wn6(){let $=U6(),Z=new ct1({db:$.db,provider:{getMigrations:()=>Promise.resolve(em0)}}),{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 it1=O(()=>{ut1();Rc0();$X()});async function JZ0($){let Z={...process.env},X=a10($,Z);console.log(JO1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?Xn1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (w90(),B90)),{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(() => (Rc0(),Yn1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => ($X(),Pi1)),{migrateToLatest:N}=await Promise.resolve().then(() => (it1(),mt1)),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 Mm1(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 $i0=O(()=>{Xf();Qn1();S8()});var tt1={};w0(tt1,{updateService:()=>UE,subscribeCliState:()=>Qi0,setTuiConsoleIntercepted:()=>KZ0,setServerUrl:()=>Di,setMigrationsDone:()=>Li,setDevMode:()=>Un6,resetCliStateForTests:()=>Hn6,isTuiConsoleIntercepted:()=>WZ0,getCliState:()=>Xi0,addLogEntry:()=>xB});function nt1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function Hn6(){hQ=nt1()}function Nn6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Oi(){for(let $ of Zi0)$()}function Xi0(){return hQ}function Qi0($){return Zi0.add($),()=>Zi0.delete($)}function UE($){hQ={...hQ,services:hQ.services.map((Z)=>Z.name===$.name?$:Z)},Oi()}function Li(){hQ={...hQ,migrationsStatus:"done"},Oi()}function Di($){hQ={...hQ,serverUrl:$},Oi()}function xB($){let Z=[...hQ.logs,$];hQ={...hQ,logs:Z.length>500?Z.slice(-500):Z},Oi()}function Un6(){hQ={...hQ,services:[...Nn6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Oi()}function KZ0($){pt1=$}function WZ0(){return pt1}var hQ,Zi0,pt1=!1;var FE=O(()=>{hQ=nt1();Zi0=new Set});import{createServer as ot1}from"net";function Fn6($){return new Promise((Z)=>{let X=ot1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Ei($){if(await Fn6($))return $;let Z=await new Promise((X,Q)=>{let Y=ot1();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 Yi0=()=>{};function zi($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var Gi0={};w0(Gi0,{startDevServer:()=>wn6});import{join as Bn6}from"path";function rt1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1335
|
-
`);Q=G.pop()??"";for(let J of G){let K=zi(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;xB({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=zi(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)xB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function wn6($){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 Ei(Number(Y)+1):await Ei(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await JZ0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)UE({name:L.name,status:"ready",port:L.port});Li();let N=Bn6(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)rt1(F.stdout),rt1(F.stderr);Di(G),UE({name:"Vite",status:"ready",port:Number(Y)}),UE({name:"API",status:"ready",port:Number(K.port)});let w=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (w90(),B90));await D(K.dataDir)}};return process.on("SIGINT",()=>w("SIGINT")),process.on("SIGTERM",()=>w("SIGTERM")),{port:Number(Y),process:F}}var Ji0=O(()=>{$i0();FE();Yi0()});var HZ0;var Ki0=O(()=>{HZ0={name:"decocms",version:"4.235.3",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","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.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 Ln6,Text as at1}from"ink";import{jsx as Dn6,jsxs as st1}from"react/jsx-runtime";function et1({version:$}){return st1(Ln6,{flexDirection:"column",marginTop:1,children:[y90.map((Z,X)=>Dn6(at1,{color:g90[X],children:Z},X)),st1(at1,{dimColor:!0,children:[" v",$]})]})}var $o1=O(()=>{Yi()});import{Box as BE,Text as fB}from"ink";import{Spinner as En6}from"@inkjs/ui";import{jsx as rY,jsxs as Sb}from"react/jsx-runtime";function Zo1({status:$}){if($==="pending")return rY(En6,{label:""});return rY(fB,{color:"green",children:"\u2713"})}function zn6($){return`${$.name}: ${$.port||"...."}`}function Xo1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Sb(BE,{flexDirection:"column",paddingBottom:1,children:[rY(et1,{version:HZ0.version}),rY(BE,{marginBottom:1,children:rY(fB,{dimColor:!0,children:"\u2500".repeat(80)})}),rY(BE,{children:Sb(fB,{dimColor:!0,children:["Home: ",X]})}),Sb(BE,{gap:2,children:[$.map((Y)=>Sb(BE,{gap:1,children:[rY(fB,{children:zn6(Y)}),rY(Zo1,{status:Y.status})]},Y.name)),Sb(BE,{gap:1,children:[rY(fB,{children:"Migrations"}),rY(Zo1,{status:Z})]})]}),rY(BE,{children:Q?Sb(fB,{children:["Open in browser: ",rY(fB,{color:"cyan",children:Q})]}):rY(fB,{dimColor:!0,children:"Starting..."})})]})}var Qo1=O(()=>{Ki0();$o1()});import{Box as jn6,Text as ji}from"ink";import{jsx as Wi0,jsxs as Hi0}from"react/jsx-runtime";function Pn6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Yo1({logs:$}){return Wi0(jn6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Wi0(ji,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Hi0(ji,{children:[Hi0(ji,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Wi0(ji,{color:Pn6(Z.status),children:Z.status}),Hi0(ji,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Go1=()=>{};var Ni0={};w0(Ni0,{App:()=>Rn6});import{Box as An6}from"ink";import{useSyncExternalStore as Tn6}from"react";import{jsx as Jo1,jsxs as In6}from"react/jsx-runtime";function Rn6({home:$}){let Z=Tn6(Qi0,Xi0);return In6(An6,{flexDirection:"column",children:[Jo1(Xo1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Jo1(Yo1,{logs:Z.logs})]})}var Ui0=O(()=>{Qo1();Go1();FE()});var SJ="thread-gate",dN="decopilot-hosted-harness",mN="decopilot-hosted-harness-sandboxed",H3="automations",bB="background-tools",wE="task-board-github-reads";var Ko1="7";function Wo1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ko1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ho1=()=>{};function qn6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Fi0($,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 No1(){let $=qn6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Fi0($,"--cpu-prof-dir")??process.cwd(),name:Fi0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Fi0($,"--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 Uo1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=KE();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(()=>{}),NZ0=setInterval(()=>void Z().catch(()=>{}),$),NZ0.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(NZ0)clearInterval(NZ0)}}var NZ0;var Fo1=()=>{};import*as Mn6 from"bun:jsc";function Bo1(){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{Vn6()}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=kn6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((w)=>w.sourceURL&&!/Unknown Executable/.test(w.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(B,(W.get(B)??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 Vn6,kn6;var wo1=O(()=>{({startSamplingProfiler:Vn6,samplingProfilerStackTraces:kn6}=Mn6)});function Oo1(){No1();let $=[Uo1(),Bi1(),Bo1()];return()=>{for(let Z of $)Z()}}var Lo1=O(()=>{Bc0();Fo1();wo1()});var OE=_((Do1)=>{Object.defineProperty(Do1,"__esModule",{value:!0});Do1.RepublishHeaders=Do1.DirectMsgHeaders=Do1.JsHeaders=Do1.AdvisoryKind=void 0;Do1.isOrderedPushConsumerOptions=Sn6;Do1.isPullConsumer=Cn6;Do1.isPushConsumer=_n6;Do1.isBoundPushConsumerOptions=vn6;function Sn6($){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 Cn6($){return $.isPullConsumer()}function _n6($){return $.isPushConsumer()}function vn6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Do1.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"};Do1.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"};Do1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Do1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var aY=_((zo1)=>{Object.defineProperty(zo1,"__esModule",{value:!0});zo1.TD=zo1.TE=zo1.Empty=void 0;zo1.encode=ln6;zo1.decode=dn6;zo1.Empty=new Uint8Array(0);zo1.TE=new TextEncoder;zo1.TD=new TextDecoder;function cn6(...$){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 ln6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(zo1.TE.encode($[X]));if(Z.length===0)return zo1.Empty;if(Z.length===1)return Z[0];return cn6(...Z)}function dn6($){if(!$||$.length===0)return"";return zo1.TD.decode($)}});var sY=_((Ao1)=>{Object.defineProperty(Ao1,"__esModule",{value:!0});Ao1.errors=Ao1.PermissionViolationError=Ao1.NoRespondersError=Ao1.TimeoutError=Ao1.RequestError=Ao1.ProtocolError=Ao1.ConnectionError=Ao1.DrainingConnectionError=Ao1.ClosedConnectionError=Ao1.AuthorizationError=Ao1.UserAuthenticationExpiredError=Ao1.InvalidOperationError=Ao1.InvalidArgumentError=Ao1.InvalidSubjectError=void 0;class wi0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Ao1.InvalidSubjectError=wi0;class UZ0 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 UZ0(`${$} ${Z}`,X)}}Ao1.InvalidArgumentError=UZ0;class Oi0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Ao1.InvalidOperationError=Oi0;class FZ0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new FZ0($);return null}}Ao1.UserAuthenticationExpiredError=FZ0;class BZ0 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 BZ0($);return null}}Ao1.AuthorizationError=BZ0;class Li0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Ao1.ClosedConnectionError=Li0;class Di0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Ao1.DrainingConnectionError=Di0;class Ei0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Ao1.ConnectionError=Ei0;class zi0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Ao1.ProtocolError=zi0;class ji0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof wZ0}}Ao1.RequestError=ji0;class Pi0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Ao1.TimeoutError=Pi0;class wZ0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Ao1.NoRespondersError=wZ0;class OZ0 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 OZ0($,X,Q,Y)}}Ao1.PermissionViolationError=OZ0;Ao1.errors={AuthorizationError:BZ0,ClosedConnectionError:Li0,ConnectionError:Ei0,DrainingConnectionError:Di0,InvalidArgumentError:UZ0,InvalidOperationError:Oi0,InvalidSubjectError:wi0,NoRespondersError:wZ0,PermissionViolationError:OZ0,ProtocolError:zi0,RequestError:ji0,TimeoutError:Pi0,UserAuthenticationExpiredError:FZ0}});var CJ=_((Mo1)=>{Object.defineProperty(Mo1,"__esModule",{value:!0});Mo1.SimpleMutex=Mo1.Perf=void 0;Mo1.extend=Jp6;Mo1.render=Kp6;Mo1.timeout=Wp6;Mo1.delay=Hp6;Mo1.deadline=Np6;Mo1.deferred=Ti0;Mo1.debugDeferred=Up6;Mo1.shuffle=Fp6;Mo1.collect=Bp6;Mo1.jitter=qo1;Mo1.backoff=wp6;Mo1.nanos=Op6;Mo1.millis=Lp6;Mo1.randomToken=zp6;var Gp6=aY(),Ai0=sY();function Jp6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Kp6($){return Gp6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Wp6($,Z=!0){let X=Z?new Ai0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new Ai0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function Hp6($=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 Np6($,Z=1000){let X=Ti0(),Q=setTimeout(()=>{X.reject(new Ai0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function Ti0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Up6(){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 Fp6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Bp6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Ro1{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})}),$}}Mo1.Perf=Ro1;class Io1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Ti0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Mo1.SimpleMutex=Io1;function qo1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function wp6($=[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 qo1(X>Z?$[Z]:$[X])}}}function Op6($){return $*1e6}function Lp6($){return Math.floor($/1e6)}var Dp6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",iN=new Uint8Array(62);for(let $=0;$<62;$++)iN[$]=Dp6.charCodeAt($);var Ep6=218340105584896;function zp6(){let $=Math.floor(Math.random()*Ep6),Z=$%62,X=iN[Z];$=($-Z)/62,Z=$%62;let Q=iN[Z];$=($-Z)/62,Z=$%62;let Y=iN[Z];$=($-Z)/62,Z=$%62;let G=iN[Z];$=($-Z)/62,Z=$%62;let J=iN[Z];$=($-Z)/62,Z=$%62;let K=iN[Z];$=($-Z)/62,Z=$%62;let W=iN[Z];$=($-Z)/62;let H=iN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var fo1=_((vo1)=>{Object.defineProperty(vo1,"__esModule",{value:!0});vo1.nuid=vo1.NuidImpl=void 0;var fp6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",yB=62,DZ0=12,Co1=10,ko1=33,bp6=333,So1=DZ0+Co1,Ii0=new Uint8Array(yB);for(let $=0;$<yB;$++)Ii0[$]=fp6.charCodeAt($);var LZ0=4294967296,_o1=BigInt(yB)**BigInt(Co1),Pi=Number(_o1/(1n<<32n)),Ri0=Number(_o1%(1n<<32n));function yp6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function gp6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else yp6($)}class qi0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(So1),this.cbuf=new Uint8Array(DZ0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Pi+1)),this.seqLo=Math.floor(Math.random()*LZ0);while($++<8&&this.seqHi===Pi&&this.seqLo>=Ri0);if(this.seqHi===Pi&&this.seqLo>=Ri0)this.seqLo=0;this.inc=Math.random()*(bp6-ko1)+ko1|0}setPre(){gp6(this.cbuf);for(let $=0;$<DZ0;$++)this.buf[$]=Ii0[this.cbuf[$]%yB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=So1-1;X>=DZ0;X--){let Q=Math.floor($/yB),G=($-Q*yB)*LZ0+Z,J=Math.floor(G/yB),K=G-J*yB;this.buf[X]=Ii0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=LZ0)this.seqLo-=LZ0,this.seqHi+=1;if(this.seqHi>Pi||this.seqHi===Pi&&this.seqLo>=Ri0)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()}}vo1.NuidImpl=qi0;vo1.nuid=new qi0});var ho1=_((yo1)=>{Object.defineProperty(yo1,"__esModule",{value:!0});yo1.nuid=yo1.Nuid=void 0;var bo1=fo1();yo1.Nuid=bo1.NuidImpl;yo1.nuid=bo1.nuid});var zZ0=_((EZ0)=>{Object.defineProperty(EZ0,"__esModule",{value:!0});EZ0.nuid=EZ0.Nuid=void 0;var uo1=ho1();Object.defineProperty(EZ0,"Nuid",{enumerable:!0,get:function(){return uo1.Nuid}});Object.defineProperty(EZ0,"nuid",{enumerable:!0,get:function(){return uo1.nuid}})});var gB=_((co1)=>{Object.defineProperty(co1,"__esModule",{value:!0});co1.DEFAULT_HOST=co1.DEFAULT_PORT=co1.Match=void 0;co1.syncIterator=mp6;co1.createInbox=ip6;var lp6=zZ0(),dp6=sY();co1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function mp6($){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 ip6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw dp6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${lp6.nuid.next()}`}co1.DEFAULT_PORT=4222;co1.DEFAULT_HOST="127.0.0.1"});var Ai=_((io1)=>{Object.defineProperty(io1,"__esModule",{value:!0});io1.DataBuffer=void 0;var do1=aY();class mo1{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 do1.TE.encode($)}static toAscii($){return do1.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}}io1.DataBuffer=mo1});var LE=_((to1)=>{Object.defineProperty(to1,"__esModule",{value:!0});to1.LF=to1.CR=to1.CRLF=to1.CR_LF_LEN=to1.CR_LF=void 0;to1.setTransportFactory=ep6;to1.defaultPort=$t6;to1.getUrlParseFn=Zt6;to1.newTransport=Xt6;to1.getResolveFn=Qt6;to1.protoLen=po1;to1.extractProtocolMessage=Yt6;var rp6=aY(),ap6=gB(),sp6=Ai(),eY;function ep6($){eY=$}function $t6(){return eY!==void 0&&eY.defaultPort!==void 0?eY.defaultPort:ap6.DEFAULT_PORT}function Zt6(){return eY!==void 0&&eY.urlParseFn?eY.urlParseFn:void 0}function Xt6(){if(!eY||typeof eY.factory!=="function")throw Error("transport fn is not set");return eY.factory()}function Qt6(){return eY!==void 0&&eY.dnsResolveFn?eY.dnsResolveFn:void 0}to1.CR_LF=`\r
|
|
1335
|
+
`);Q=G.pop()??"";for(let J of G){let K=zi(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;xB({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=zi(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)xB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function wn6($){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 Ei(Number(Y)+1):await Ei(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await JZ0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)UE({name:L.name,status:"ready",port:L.port});Li();let N=Bn6(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)rt1(F.stdout),rt1(F.stderr);Di(G),UE({name:"Vite",status:"ready",port:Number(Y)}),UE({name:"API",status:"ready",port:Number(K.port)});let w=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (w90(),B90));await D(K.dataDir)}};return process.on("SIGINT",()=>w("SIGINT")),process.on("SIGTERM",()=>w("SIGTERM")),{port:Number(Y),process:F}}var Ji0=O(()=>{$i0();FE();Yi0()});var HZ0;var Ki0=O(()=>{HZ0={name:"decocms",version:"4.235.4",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","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.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 Ln6,Text as at1}from"ink";import{jsx as Dn6,jsxs as st1}from"react/jsx-runtime";function et1({version:$}){return st1(Ln6,{flexDirection:"column",marginTop:1,children:[y90.map((Z,X)=>Dn6(at1,{color:g90[X],children:Z},X)),st1(at1,{dimColor:!0,children:[" v",$]})]})}var $o1=O(()=>{Yi()});import{Box as BE,Text as fB}from"ink";import{Spinner as En6}from"@inkjs/ui";import{jsx as rY,jsxs as Sb}from"react/jsx-runtime";function Zo1({status:$}){if($==="pending")return rY(En6,{label:""});return rY(fB,{color:"green",children:"\u2713"})}function zn6($){return`${$.name}: ${$.port||"...."}`}function Xo1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Sb(BE,{flexDirection:"column",paddingBottom:1,children:[rY(et1,{version:HZ0.version}),rY(BE,{marginBottom:1,children:rY(fB,{dimColor:!0,children:"\u2500".repeat(80)})}),rY(BE,{children:Sb(fB,{dimColor:!0,children:["Home: ",X]})}),Sb(BE,{gap:2,children:[$.map((Y)=>Sb(BE,{gap:1,children:[rY(fB,{children:zn6(Y)}),rY(Zo1,{status:Y.status})]},Y.name)),Sb(BE,{gap:1,children:[rY(fB,{children:"Migrations"}),rY(Zo1,{status:Z})]})]}),rY(BE,{children:Q?Sb(fB,{children:["Open in browser: ",rY(fB,{color:"cyan",children:Q})]}):rY(fB,{dimColor:!0,children:"Starting..."})})]})}var Qo1=O(()=>{Ki0();$o1()});import{Box as jn6,Text as ji}from"ink";import{jsx as Wi0,jsxs as Hi0}from"react/jsx-runtime";function Pn6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Yo1({logs:$}){return Wi0(jn6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Wi0(ji,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Hi0(ji,{children:[Hi0(ji,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Wi0(ji,{color:Pn6(Z.status),children:Z.status}),Hi0(ji,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Go1=()=>{};var Ni0={};w0(Ni0,{App:()=>Rn6});import{Box as An6}from"ink";import{useSyncExternalStore as Tn6}from"react";import{jsx as Jo1,jsxs as In6}from"react/jsx-runtime";function Rn6({home:$}){let Z=Tn6(Qi0,Xi0);return In6(An6,{flexDirection:"column",children:[Jo1(Xo1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Jo1(Yo1,{logs:Z.logs})]})}var Ui0=O(()=>{Qo1();Go1();FE()});var SJ="thread-gate",dN="decopilot-hosted-harness",mN="decopilot-hosted-harness-sandboxed",H3="automations",bB="background-tools",wE="task-board-github-reads";var Ko1="7";function Wo1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ko1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ho1=()=>{};function qn6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Fi0($,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 No1(){let $=qn6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Fi0($,"--cpu-prof-dir")??process.cwd(),name:Fi0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Fi0($,"--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 Uo1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=KE();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(()=>{}),NZ0=setInterval(()=>void Z().catch(()=>{}),$),NZ0.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(NZ0)clearInterval(NZ0)}}var NZ0;var Fo1=()=>{};import*as Mn6 from"bun:jsc";function Bo1(){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{Vn6()}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=kn6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((w)=>w.sourceURL&&!/Unknown Executable/.test(w.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(B,(W.get(B)??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 Vn6,kn6;var wo1=O(()=>{({startSamplingProfiler:Vn6,samplingProfilerStackTraces:kn6}=Mn6)});function Oo1(){No1();let $=[Uo1(),Bi1(),Bo1()];return()=>{for(let Z of $)Z()}}var Lo1=O(()=>{Bc0();Fo1();wo1()});var OE=_((Do1)=>{Object.defineProperty(Do1,"__esModule",{value:!0});Do1.RepublishHeaders=Do1.DirectMsgHeaders=Do1.JsHeaders=Do1.AdvisoryKind=void 0;Do1.isOrderedPushConsumerOptions=Sn6;Do1.isPullConsumer=Cn6;Do1.isPushConsumer=_n6;Do1.isBoundPushConsumerOptions=vn6;function Sn6($){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 Cn6($){return $.isPullConsumer()}function _n6($){return $.isPushConsumer()}function vn6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Do1.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"};Do1.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"};Do1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Do1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var aY=_((zo1)=>{Object.defineProperty(zo1,"__esModule",{value:!0});zo1.TD=zo1.TE=zo1.Empty=void 0;zo1.encode=ln6;zo1.decode=dn6;zo1.Empty=new Uint8Array(0);zo1.TE=new TextEncoder;zo1.TD=new TextDecoder;function cn6(...$){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 ln6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(zo1.TE.encode($[X]));if(Z.length===0)return zo1.Empty;if(Z.length===1)return Z[0];return cn6(...Z)}function dn6($){if(!$||$.length===0)return"";return zo1.TD.decode($)}});var sY=_((Ao1)=>{Object.defineProperty(Ao1,"__esModule",{value:!0});Ao1.errors=Ao1.PermissionViolationError=Ao1.NoRespondersError=Ao1.TimeoutError=Ao1.RequestError=Ao1.ProtocolError=Ao1.ConnectionError=Ao1.DrainingConnectionError=Ao1.ClosedConnectionError=Ao1.AuthorizationError=Ao1.UserAuthenticationExpiredError=Ao1.InvalidOperationError=Ao1.InvalidArgumentError=Ao1.InvalidSubjectError=void 0;class wi0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Ao1.InvalidSubjectError=wi0;class UZ0 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 UZ0(`${$} ${Z}`,X)}}Ao1.InvalidArgumentError=UZ0;class Oi0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Ao1.InvalidOperationError=Oi0;class FZ0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new FZ0($);return null}}Ao1.UserAuthenticationExpiredError=FZ0;class BZ0 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 BZ0($);return null}}Ao1.AuthorizationError=BZ0;class Li0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Ao1.ClosedConnectionError=Li0;class Di0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Ao1.DrainingConnectionError=Di0;class Ei0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Ao1.ConnectionError=Ei0;class zi0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Ao1.ProtocolError=zi0;class ji0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof wZ0}}Ao1.RequestError=ji0;class Pi0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Ao1.TimeoutError=Pi0;class wZ0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Ao1.NoRespondersError=wZ0;class OZ0 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 OZ0($,X,Q,Y)}}Ao1.PermissionViolationError=OZ0;Ao1.errors={AuthorizationError:BZ0,ClosedConnectionError:Li0,ConnectionError:Ei0,DrainingConnectionError:Di0,InvalidArgumentError:UZ0,InvalidOperationError:Oi0,InvalidSubjectError:wi0,NoRespondersError:wZ0,PermissionViolationError:OZ0,ProtocolError:zi0,RequestError:ji0,TimeoutError:Pi0,UserAuthenticationExpiredError:FZ0}});var CJ=_((Mo1)=>{Object.defineProperty(Mo1,"__esModule",{value:!0});Mo1.SimpleMutex=Mo1.Perf=void 0;Mo1.extend=Jp6;Mo1.render=Kp6;Mo1.timeout=Wp6;Mo1.delay=Hp6;Mo1.deadline=Np6;Mo1.deferred=Ti0;Mo1.debugDeferred=Up6;Mo1.shuffle=Fp6;Mo1.collect=Bp6;Mo1.jitter=qo1;Mo1.backoff=wp6;Mo1.nanos=Op6;Mo1.millis=Lp6;Mo1.randomToken=zp6;var Gp6=aY(),Ai0=sY();function Jp6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Kp6($){return Gp6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Wp6($,Z=!0){let X=Z?new Ai0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new Ai0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function Hp6($=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 Np6($,Z=1000){let X=Ti0(),Q=setTimeout(()=>{X.reject(new Ai0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function Ti0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Up6(){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 Fp6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Bp6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Ro1{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})}),$}}Mo1.Perf=Ro1;class Io1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Ti0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Mo1.SimpleMutex=Io1;function qo1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function wp6($=[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 qo1(X>Z?$[Z]:$[X])}}}function Op6($){return $*1e6}function Lp6($){return Math.floor($/1e6)}var Dp6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",iN=new Uint8Array(62);for(let $=0;$<62;$++)iN[$]=Dp6.charCodeAt($);var Ep6=218340105584896;function zp6(){let $=Math.floor(Math.random()*Ep6),Z=$%62,X=iN[Z];$=($-Z)/62,Z=$%62;let Q=iN[Z];$=($-Z)/62,Z=$%62;let Y=iN[Z];$=($-Z)/62,Z=$%62;let G=iN[Z];$=($-Z)/62,Z=$%62;let J=iN[Z];$=($-Z)/62,Z=$%62;let K=iN[Z];$=($-Z)/62,Z=$%62;let W=iN[Z];$=($-Z)/62;let H=iN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var fo1=_((vo1)=>{Object.defineProperty(vo1,"__esModule",{value:!0});vo1.nuid=vo1.NuidImpl=void 0;var fp6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",yB=62,DZ0=12,Co1=10,ko1=33,bp6=333,So1=DZ0+Co1,Ii0=new Uint8Array(yB);for(let $=0;$<yB;$++)Ii0[$]=fp6.charCodeAt($);var LZ0=4294967296,_o1=BigInt(yB)**BigInt(Co1),Pi=Number(_o1/(1n<<32n)),Ri0=Number(_o1%(1n<<32n));function yp6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function gp6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else yp6($)}class qi0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(So1),this.cbuf=new Uint8Array(DZ0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Pi+1)),this.seqLo=Math.floor(Math.random()*LZ0);while($++<8&&this.seqHi===Pi&&this.seqLo>=Ri0);if(this.seqHi===Pi&&this.seqLo>=Ri0)this.seqLo=0;this.inc=Math.random()*(bp6-ko1)+ko1|0}setPre(){gp6(this.cbuf);for(let $=0;$<DZ0;$++)this.buf[$]=Ii0[this.cbuf[$]%yB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=So1-1;X>=DZ0;X--){let Q=Math.floor($/yB),G=($-Q*yB)*LZ0+Z,J=Math.floor(G/yB),K=G-J*yB;this.buf[X]=Ii0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=LZ0)this.seqLo-=LZ0,this.seqHi+=1;if(this.seqHi>Pi||this.seqHi===Pi&&this.seqLo>=Ri0)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()}}vo1.NuidImpl=qi0;vo1.nuid=new qi0});var ho1=_((yo1)=>{Object.defineProperty(yo1,"__esModule",{value:!0});yo1.nuid=yo1.Nuid=void 0;var bo1=fo1();yo1.Nuid=bo1.NuidImpl;yo1.nuid=bo1.nuid});var zZ0=_((EZ0)=>{Object.defineProperty(EZ0,"__esModule",{value:!0});EZ0.nuid=EZ0.Nuid=void 0;var uo1=ho1();Object.defineProperty(EZ0,"Nuid",{enumerable:!0,get:function(){return uo1.Nuid}});Object.defineProperty(EZ0,"nuid",{enumerable:!0,get:function(){return uo1.nuid}})});var gB=_((co1)=>{Object.defineProperty(co1,"__esModule",{value:!0});co1.DEFAULT_HOST=co1.DEFAULT_PORT=co1.Match=void 0;co1.syncIterator=mp6;co1.createInbox=ip6;var lp6=zZ0(),dp6=sY();co1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function mp6($){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 ip6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw dp6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${lp6.nuid.next()}`}co1.DEFAULT_PORT=4222;co1.DEFAULT_HOST="127.0.0.1"});var Ai=_((io1)=>{Object.defineProperty(io1,"__esModule",{value:!0});io1.DataBuffer=void 0;var do1=aY();class mo1{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 do1.TE.encode($)}static toAscii($){return do1.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}}io1.DataBuffer=mo1});var LE=_((to1)=>{Object.defineProperty(to1,"__esModule",{value:!0});to1.LF=to1.CR=to1.CRLF=to1.CR_LF_LEN=to1.CR_LF=void 0;to1.setTransportFactory=ep6;to1.defaultPort=$t6;to1.getUrlParseFn=Zt6;to1.newTransport=Xt6;to1.getResolveFn=Qt6;to1.protoLen=po1;to1.extractProtocolMessage=Yt6;var rp6=aY(),ap6=gB(),sp6=Ai(),eY;function ep6($){eY=$}function $t6(){return eY!==void 0&&eY.defaultPort!==void 0?eY.defaultPort:ap6.DEFAULT_PORT}function Zt6(){return eY!==void 0&&eY.urlParseFn?eY.urlParseFn:void 0}function Xt6(){if(!eY||typeof eY.factory!=="function")throw Error("transport fn is not set");return eY.factory()}function Qt6(){return eY!==void 0&&eY.dnsResolveFn?eY.dnsResolveFn:void 0}to1.CR_LF=`\r
|
|
1336
1336
|
`;to1.CR_LF_LEN=to1.CR_LF.length;to1.CRLF=sp6.DataBuffer.fromAscii(to1.CR_LF);to1.CR=new Uint8Array(to1.CRLF)[0];to1.LF=new Uint8Array(to1.CRLF)[1];function po1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===to1.CR&&$[X]===to1.LF)return X+1}return 0}function Yt6($){let Z=po1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return rp6.TD.decode(Q)}return""}});var Ci0=_((Xr1)=>{Object.defineProperty(Xr1,"__esModule",{value:!0});Xr1.ipV4=eo1;Xr1.isIP=Ot6;Xr1.parseIP=$r1;var Ti=4,DE=16,jZ0=48,so1=57,ro1=65,Bt6=70,ao1=97,wt6=102,Si0=16777215;function eo1($,Z,X,Q){let Y=new Uint8Array(DE);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 Ot6($){return $r1($)!==void 0}function $r1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Zr1($);case":":return Lt6($)}return}function Zr1($){let Z=new Uint8Array(Ti);for(let X=0;X<Ti;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=Dt6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return eo1(Z[0],Z[1],Z[2],Z[3])}function Lt6($){let Z=new Uint8Array(DE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<DE){let{n:Y,c:G,ok:J}=Et6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=DE-Ti)return;if(Q+Ti>DE)return;let K=Zr1($);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+=Ti;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<DE){if(X<0)return;let Y=DE-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 Dt6($){let Z=0,X=0;for(Z=0;Z<$.length&&jZ0<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=so1;Z++)if(X=X*10+($.charCodeAt(Z)-jZ0),X>=Si0)return{n:Si0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function Et6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(jZ0<=$.charCodeAt(X)&&$.charCodeAt(X)<=so1)Z*=16,Z+=$.charCodeAt(X)-jZ0;else if(ao1<=$.charCodeAt(X)&&$.charCodeAt(X)<=wt6)Z*=16,Z+=$.charCodeAt(X)-ao1+10;else if(ro1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Bt6)Z*=16,Z+=$.charCodeAt(X)-ro1+10;else break;if(Z>=Si0)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 yi0=_((Yr1)=>{Object.defineProperty(Yr1,"__esModule",{value:!0});Yr1.Servers=Yr1.ServerImpl=void 0;Yr1.isIPV4OrHostname=Qr1;Yr1.hostPort=bi0;var _i0=LE(),vi0=CJ(),xi0=Ci0(),At6=gB(),Tt6=sY();function Qr1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function fi0($){return!Qr1($)}function Rt6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function bi0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=Rt6($),fi0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=fi0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):At6.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 Cb{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=bi0($);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,xi0.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}://${fi0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new Cb(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,vi0.shuffle)(Z);return this.resolves=Z,Z}}Yr1.ServerImpl=Cb;class PZ0{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw Tt6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,_i0.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}=bi0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new Cb(Y))}if(this.randomize)(0,vi0.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,xi0.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,_i0.getUrlParseFn)();$=X?X($):$;let Q=new Cb($,Z);if((0,xi0.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 PZ0.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return PZ0.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,_i0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Cb(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,vi0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Yr1.Servers=PZ0});var AZ0=_((Wr1)=>{Object.defineProperty(Wr1,"__esModule",{value:!0});Wr1.QueuedIteratorImpl=void 0;var gi0=CJ(),Jr1=sY();class Kr1{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,gi0.deferred)(),this.yields=[],this.iterClosed=(0,gi0.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 Jr1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Jr1.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,gi0.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}}Wr1.QueuedIteratorImpl=Kr1});var hi0=_((Fr1)=>{Object.defineProperty(Fr1,"__esModule",{value:!0});Fr1.MuxSubscription=void 0;var Vt6=gB(),Nr1=sY();class Ur1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,Vt6.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 Nr1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Nr1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}Fr1.MuxSubscription=Ur1});var ui0=_((Or1)=>{Object.defineProperty(Or1,"__esModule",{value:!0});Or1.Heartbeat=void 0;var kt6=CJ();class wr1{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,kt6.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})}}Or1.Heartbeat=wr1});var di0=_((jr1)=>{Object.defineProperty(jr1,"__esModule",{value:!0});jr1.DenoBuffer=jr1.MAX_SIZE=jr1.AssertionError=void 0;jr1.assert=Er1;jr1.concat=zr1;jr1.append=Ct6;jr1.readAll=_t6;jr1.writeAll=vt6;var St6=aY();class ci0 extends Error{constructor($){super($);this.name="AssertionError"}}jr1.AssertionError=ci0;function Er1($,Z="Assertion failed."){if(!$)throw new ci0(Z)}var Dr1=32768;jr1.MAX_SIZE=4294967294;function TZ0($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function zr1($,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 Ct6($,Z){return zr1($,Uint8Array.of(Z))}class li0{_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($){Er1($<=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=TZ0(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(St6.TE.encode($))}write($){let Z=this._grow($.byteLength);return TZ0($,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)TZ0(this._buf.subarray(this._off),this._buf);else if(Q+$>jr1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,jr1.MAX_SIZE));TZ0(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,jr1.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(Dr1);while(!0){let Q=this.capacity-this.length<Dr1,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}}}jr1.DenoBuffer=li0;function _t6($){let Z=new li0;return Z.readFrom($),Z.bytes()}function vt6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var ni0=_((Ir1)=>{Object.defineProperty(Ir1,"__esModule",{value:!0});Ir1.cc=Ir1.State=Ir1.Parser=Ir1.Kind=void 0;Ir1.describe=ut6;var mi0=di0(),ii0=aY();Ir1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function ut6($){let Z,X="";switch($.kind){case Ir1.Kind.MSG:Z="MSG";break;case Ir1.Kind.OK:Z="OK";break;case Ir1.Kind.ERR:Z="ERR",X=ii0.TD.decode($.data);break;case Ir1.Kind.PING:Z="PING";break;case Ir1.Kind.PONG:Z="PONG";break;case Ir1.Kind.INFO:Z="INFO",X=ii0.TD.decode($.data)}return`${Z}: ${X}`}function Ar1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Tr1=48,ct6=57,_b=67108864;class Rr1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Ir1.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 Ir1.State.OP_START:switch(X){case Ir1.cc.M:case Ir1.cc.m:this.state=Ir1.State.OP_M,this.hdr=-1,this.ma=Ar1();break;case Ir1.cc.H:case Ir1.cc.h:this.state=Ir1.State.OP_H,this.hdr=0,this.ma=Ar1();break;case Ir1.cc.P:case Ir1.cc.p:this.state=Ir1.State.OP_P;break;case Ir1.cc.PLUS:this.state=Ir1.State.OP_PLUS;break;case Ir1.cc.MINUS:this.state=Ir1.State.OP_MINUS;break;case Ir1.cc.I:case Ir1.cc.i:this.state=Ir1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_H:switch(X){case Ir1.cc.M:case Ir1.cc.m:this.state=Ir1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_M:switch(X){case Ir1.cc.S:case Ir1.cc.s:this.state=Ir1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MS:switch(X){case Ir1.cc.G:case Ir1.cc.g:this.state=Ir1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MSG:switch(X){case Ir1.cc.SPACE:case Ir1.cc.TAB:this.state=Ir1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MSG_SPC:switch(X){case Ir1.cc.SPACE:case Ir1.cc.TAB:continue;default:this.state=Ir1.State.MSG_ARG,this.as=Z}break;case Ir1.State.MSG_ARG:switch(X){case Ir1.cc.CR:this.drop=1;break;case Ir1.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=Ir1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Ir1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Ir1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Ir1.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:Ir1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Ir1.State.MSG_END;break;case Ir1.State.MSG_END:switch(X){case Ir1.cc.NL:this.drop=0,this.as=Z+1,this.state=Ir1.State.OP_START;break;default:continue}break;case Ir1.State.OP_PLUS:switch(X){case Ir1.cc.O:case Ir1.cc.o:this.state=Ir1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PLUS_O:switch(X){case Ir1.cc.K:case Ir1.cc.k:this.state=Ir1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PLUS_OK:switch(X){case Ir1.cc.NL:this.dispatcher.push({kind:Ir1.Kind.OK}),this.drop=0,this.state=Ir1.State.OP_START;break}break;case Ir1.State.OP_MINUS:switch(X){case Ir1.cc.E:case Ir1.cc.e:this.state=Ir1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MINUS_E:switch(X){case Ir1.cc.R:case Ir1.cc.r:this.state=Ir1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MINUS_ER:switch(X){case Ir1.cc.R:case Ir1.cc.r:this.state=Ir1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MINUS_ERR:switch(X){case Ir1.cc.SPACE:case Ir1.cc.TAB:this.state=Ir1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_MINUS_ERR_SPC:switch(X){case Ir1.cc.SPACE:case Ir1.cc.TAB:continue;default:this.state=Ir1.State.MINUS_ERR_ARG,this.as=Z}break;case Ir1.State.MINUS_ERR_ARG:switch(X){case Ir1.cc.CR:this.drop=1;break;case Ir1.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:Ir1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Ir1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Ir1.State.OP_P:switch(X){case Ir1.cc.I:case Ir1.cc.i:this.state=Ir1.State.OP_PI;break;case Ir1.cc.O:case Ir1.cc.o:this.state=Ir1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PO:switch(X){case Ir1.cc.N:case Ir1.cc.n:this.state=Ir1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PON:switch(X){case Ir1.cc.G:case Ir1.cc.g:this.state=Ir1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PONG:switch(X){case Ir1.cc.NL:this.dispatcher.push({kind:Ir1.Kind.PONG}),this.drop=0,this.state=Ir1.State.OP_START;break}break;case Ir1.State.OP_PI:switch(X){case Ir1.cc.N:case Ir1.cc.n:this.state=Ir1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PIN:switch(X){case Ir1.cc.G:case Ir1.cc.g:this.state=Ir1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_PING:switch(X){case Ir1.cc.NL:this.dispatcher.push({kind:Ir1.Kind.PING}),this.drop=0,this.state=Ir1.State.OP_START;break}break;case Ir1.State.OP_I:switch(X){case Ir1.cc.N:case Ir1.cc.n:this.state=Ir1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_IN:switch(X){case Ir1.cc.F:case Ir1.cc.f:this.state=Ir1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_INF:switch(X){case Ir1.cc.O:case Ir1.cc.o:this.state=Ir1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_INFO:switch(X){case Ir1.cc.SPACE:case Ir1.cc.TAB:this.state=Ir1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ir1.State.OP_INFO_SPC:switch(X){case Ir1.cc.SPACE:case Ir1.cc.TAB:continue;default:this.state=Ir1.State.INFO_ARG,this.as=Z}break;case Ir1.State.INFO_ARG:switch(X){case Ir1.cc.CR:this.drop=1;break;case Ir1.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:Ir1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Ir1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Ir1.State.MSG_ARG||this.state===Ir1.State.MINUS_ERR_ARG||this.state===Ir1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new mi0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Ir1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new mi0.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 mi0.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 Ir1.cc.SPACE:case Ir1.cc.TAB:case Ir1.cc.CR:case Ir1.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],_b);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],_b);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}: ${ii0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Ir1.cc.SPACE:case Ir1.cc.TAB:case Ir1.cc.CR:case Ir1.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],_b),this.ma.size=this.protoParseInt(Z[3],_b);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],_b),this.ma.size=this.protoParseInt(Z[4],_b);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]<Tr1||$[Q]>ct6)return-1;X=X*10+($[Q]-Tr1)}return Z!==void 0&&X>Z?-1:X}}Ir1.Parser=Rr1;Ir1.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};Ir1.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 qZ0=_((Mr1)=>{Object.defineProperty(Mr1,"__esModule",{value:!0});Mr1.MsgHdrsImpl=void 0;Mr1.canonicalMIMEHeaderKey=ti0;Mr1.headers=mt6;var qr1=aY(),_J=gB(),IZ0=sY();function ti0($){let N=!0,U=Array($.length);for(let F=0;F<$.length;F++){let B=$.charCodeAt(F);if(B===58||B<33||B>126)throw IZ0.InvalidArgumentError.format("header",`'${$[F]}' is not a valid character in a header name`);if(N&&97<=B&&B<=122)B-=32;else if(!N&&65<=B&&B<=90)B+=32;U[F]=B,N=B==45}return String.fromCharCode(...U)}function mt6($=0,Z=""){if($===0&&Z!=="")throw IZ0.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw IZ0.InvalidArgumentError.format("description","is required");return new vb($,Z)}var pi0="NATS/1.0";class vb{_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 vb,Q=qr1.TD.decode($).split(`\r
|
|
1337
1337
|
`),Y=Q[0];if(Y!==pi0){let G=Y.replace(pi0,"").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 $=pi0;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
|
|
1338
1338
|
${Z}: ${X[Q]}`;return`${$}\r
|