decocms 4.217.2 → 4.217.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BA-4RgcF.js → AlertCircle-CjUGbl3S.js} +1 -1
- package/dist/client/assets/{AreaChart-DY6BJAfR.js → AreaChart-BNSYHeXJ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Je7Tw-c5.js → ArrowLeft-BENlO5G2.js} +1 -1
- package/dist/client/assets/{ArrowUp-C-MsS2sZ.js → ArrowUp-BB1iED5u.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BvAcQrzG.js → ArrowUpRight-CMs5lZI4.js} +1 -1
- package/dist/client/assets/{Check-BhjsPtKn.js → Check-C5QnTAkt.js} +1 -1
- package/dist/client/assets/{CheckCircle-Di0ZSB0G.js → CheckCircle-xMjtdzLZ.js} +1 -1
- package/dist/client/assets/{ChevronDown-B93a6UN-.js → ChevronDown-Dt_wSZp0.js} +1 -1
- package/dist/client/assets/{ChevronRight-DdcCOd_P.js → ChevronRight-DEsWOOLy.js} +1 -1
- package/dist/client/assets/{ChevronUp-C1BCpy6t.js → ChevronUp-CSM3p3D2.js} +1 -1
- package/dist/client/assets/{Copy01-dqW9HoS_.js → Copy01-tAKtF6ti.js} +1 -1
- package/dist/client/assets/{CpuChip01-R7He3wrZ.js → CpuChip01-CZcvm9tY.js} +1 -1
- package/dist/client/assets/{CreditCard01-GG5Fabm-.js → CreditCard01-CwN_Nu54.js} +1 -1
- package/dist/client/assets/{DotsVertical-BHpBomVY.js → DotsVertical-CBNAcV8v.js} +1 -1
- package/dist/client/assets/{Eye-B8a7wrMn.js → Eye-CjDCA-ZB.js} +1 -1
- package/dist/client/assets/{FilterLines-BZQAuEV6.js → FilterLines-B-AHM3s3.js} +1 -1
- package/dist/client/assets/{Globe01-Cygjy64P.js → Globe01-CO0ofC_2.js} +1 -1
- package/dist/client/assets/{Globe04-C_ys06V3.js → Globe04-CFyC6w8Z.js} +1 -1
- package/dist/client/assets/{HardDrive-BIbTh8Kb.js → HardDrive-CLyAFWBs.js} +1 -1
- package/dist/client/assets/{Key01-B9YdPxLN.js → Key01-D3RG9VTP.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DRCn9V-9.js → LayoutLeft-CoJsfQ3d.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DWovkzYQ.js → LinkExternal01-Bn0LoWr4.js} +1 -1
- package/dist/client/assets/{LogOut01-DTxfyJrC.js → LogOut01-CoF1E3dU.js} +1 -1
- package/dist/client/assets/{Monitor01-DzLJpxPW.js → Monitor01-CNEyiav5.js} +1 -1
- package/dist/client/assets/{Palette-8-v7SBTG.js → Palette-PeceMnSC.js} +1 -1
- package/dist/client/assets/{Play-C3Qepd7U.js → Play-BlUjL5FI.js} +1 -1
- package/dist/client/assets/{Plus-DX80E320.js → Plus-bqJz84Vv.js} +1 -1
- package/dist/client/assets/{SearchLg-D15KQ-WE.js → SearchLg-DQbwKr-w.js} +1 -1
- package/dist/client/assets/{SearchMd-D4gUZJX4.js → SearchMd-zWAidH0_.js} +1 -1
- package/dist/client/assets/{Settings02-Dbe-8cP6.js → Settings02-9g-36GOl.js} +1 -1
- package/dist/client/assets/{Share07-Ds3L3UKw.js → Share07-Cl8WEM39.js} +1 -1
- package/dist/client/assets/{Shield01-BsCrtB5a.js → Shield01-HITEL7Kq.js} +1 -1
- package/dist/client/assets/{Star01-Bhq55mZP.js → Star01-9buHL1eg.js} +1 -1
- package/dist/client/assets/{Stars01-D116tEqK.js → Stars01-gNHP5MAv.js} +1 -1
- package/dist/client/assets/{Stars02-DxLgo9YK.js → Stars02-DvsKZJYL.js} +1 -1
- package/dist/client/assets/{Sun-CT_Vi7v3.js → Sun-nfzB4FCg.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-ClWjxC7p.js → SwitchHorizontal01-D217_w46.js} +1 -1
- package/dist/client/assets/{Tool01-BnSvETgt.js → Tool01-Uaennir0.js} +1 -1
- package/dist/client/assets/{Tool02-jnxH0AZQ.js → Tool02-DBxLNkyU.js} +1 -1
- package/dist/client/assets/{Trash01-Db5cqPQb.js → Trash01-xPXLMsa-.js} +1 -1
- package/dist/client/assets/{TrendUp01-DoigYBWT.js → TrendUp01-DQKryBi6.js} +1 -1
- package/dist/client/assets/{Upload01-w3KS95rm.js → Upload01-DLsoAm4Z.js} +1 -1
- package/dist/client/assets/{User01-BAu_vDyh.js → User01-fM1cXEvq.js} +1 -1
- package/dist/client/assets/{Users01-DsPVedXy.js → Users01-DEqY6hva.js} +1 -1
- package/dist/client/assets/{Users03-Ry-CvxtN.js → Users03-BXzDPddJ.js} +1 -1
- package/dist/client/assets/{X-Bzb6oJIk.js → X-BSRitIH-.js} +1 -1
- package/dist/client/assets/{XCircle-By-XkSnw.js → XCircle-DdI0KcdF.js} +1 -1
- package/dist/client/assets/{XClose-szxWZyge.js → XClose-CBrC179e.js} +1 -1
- package/dist/client/assets/{Zap-2GLM3B98.js → Zap-sGKKzYq7.js} +1 -1
- package/dist/client/assets/{ZapSquare-ByAgTfQH.js → ZapSquare-qJUvIf_4.js} +1 -1
- package/dist/client/assets/{access-gate-B0cTzjRo.js → access-gate-BDid6aFV.js} +1 -1
- package/dist/client/assets/{agent-icon-Bptnx9E0.js → agent-icon-DsBO25C9.js} +1 -1
- package/dist/client/assets/{agents-list-BVnFVuON.js → agents-list-DSGH7Q2T.js} +1 -1
- package/dist/client/assets/{ai-providers-CreFdKN0.js → ai-providers-BdC-vbI6.js} +1 -1
- package/dist/client/assets/{alert-CSHBE2_R.js → alert-Aw763isq.js} +1 -1
- package/dist/client/assets/{alert-dialog-DVgB3Cr1.js → alert-dialog-qsBTDhnm.js} +1 -1
- package/dist/client/assets/{api-keys-DXPja77u.js → api-keys-CH3aM-iy.js} +1 -1
- package/dist/client/assets/{app-editor-BdxBxtUz.js → app-editor-DfdOkhgx.js} +1 -1
- package/dist/client/assets/{auth-BqOdFwnz.js → auth-CP4CW3yJ.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bd8iyHA_.js → auth-catchall-BgeJ3H34.js} +1 -1
- package/dist/client/assets/{auth-entry-CLZixJ9A.js → auth-entry-yBUZRaFa.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B52Hm8dc.js → auth-split-layout-DDo1rZVU.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-6awGtS4c.js → authenticate-and-persist-oauth-DJUA7VwM.js} +1 -1
- package/dist/client/assets/{automation-list-row-BmnT4SLP.js → automation-list-row-CEdiSKl-.js} +1 -1
- package/dist/client/assets/{automation-runs-BDzvUk3C.js → automation-runs-Bg6cvecN.js} +1 -1
- package/dist/client/assets/{automations-CD2H4cQO.js → automations-DV1KJ_HA.js} +1 -1
- package/dist/client/assets/{avatar-85uUe_Cb.js → avatar-BvSHu2UT.js} +1 -1
- package/dist/client/assets/{badge-C6CZu8ID.js → badge-DgZ-6KFB.js} +1 -1
- package/dist/client/assets/{billing-Digogi45.js → billing-KWWw95Cv.js} +1 -1
- package/dist/client/assets/{block-document-CXzUcZf3.js → block-document-BmK8HcM3.js} +1 -1
- package/dist/client/assets/{brand-context-BbEckjOP.js → brand-context-D_e9qPaS.js} +1 -1
- package/dist/client/assets/{buckets-_q1umue5.js → buckets-DoDJ2QXs.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BK2iiWBq.js → bulk-category-panel-DOfZ92L2.js} +1 -1
- package/dist/client/assets/{capability-load-error-_r_QHZ_E.js → capability-load-error-BU849wxy.js} +1 -1
- package/dist/client/assets/{card-mNhcAceO.js → card-yjy9gpUT.js} +1 -1
- package/dist/client/assets/{cards-CBT1b3Hs.js → cards-D49R3nWm.js} +1 -1
- package/dist/client/assets/{category-editor-D3Jxvk2V.js → category-editor-CuRWIOFB.js} +1 -1
- package/dist/client/assets/{chat-context-BATtnpFX.js → chat-context-DrDJQ7_L.js} +1 -1
- package/dist/client/assets/{checkbox-1uOT9QVF.js → checkbox-B3U-z6Uq.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cq9LRkwJ.js → cli-auth-success-Bzatq-u7.js} +1 -1
- package/dist/client/assets/{collection-detail-BjZqh1xC.js → collection-detail-i-KYBRTq.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bj4qX2Ku.js → collection-display-button-GFrgsadQ.js} +1 -1
- package/dist/client/assets/{collection-search-CLXMjGyk.js → collection-search-DILdiUaB.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-SMmhGMlH.js → collection-table-wrapper-BtUW1pMl.js} +1 -1
- package/dist/client/assets/{collection-tabs-B3JU0aTa.js → collection-tabs-D5suRpJJ.js} +1 -1
- package/dist/client/assets/{command-BlmG8Awj.js → command-Dx5lsc-L.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BjAOIc5y.js → commerce-onboarding-CpH9G5jD.js} +1 -1
- package/dist/client/assets/{connect-Cm2vQbgp.js → connect-Bbq1Rv3N.js} +1 -1
- package/dist/client/assets/{connection-mQ4d2he1.js → connection-D8tANILZ.js} +1 -1
- package/dist/client/assets/{connection-card-eznf9wRc.js → connection-card-DRUJOF3M.js} +1 -1
- package/dist/client/assets/{connection-detail-m9R9KPM6.js → connection-detail-C5LQqb-L.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Dlm7kj2H.js → connection-form-helpers-C0djBRAT.js} +1 -1
- package/dist/client/assets/{connections-CsmNJikH.js → connections-Dz7vbKlK.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DCIkgoB0.js → decopilot-sse-pool-BISJQ2Wy.js} +1 -1
- package/dist/client/assets/{dialog-YiorkP_a.js → dialog-Bq6WVxgf.js} +1 -1
- package/dist/client/assets/{domain-settings-BdeEgLxL.js → domain-settings-BZYjwQEW.js} +1 -1
- package/dist/client/assets/{drawer-CGpKnhzl.js → drawer-DClQx26i.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BCbLRJ8w.js → dropdown-menu-CpGXaxOP.js} +1 -1
- package/dist/client/assets/{empty-state-DkunShqI.js → empty-state-Ck253IK4.js} +1 -1
- package/dist/client/assets/{extract-connection-data-GOPALh3o.js → extract-connection-data-DRZXR45G.js} +1 -1
- package/dist/client/assets/{file-explorer-lHZU-hwQ.js → file-explorer-C-zDByg6.js} +1 -1
- package/dist/client/assets/{file-type-icon-DA6wPYfb.js → file-type-icon-6EtrdKKc.js} +1 -1
- package/dist/client/assets/{form-YLfaL8et.js → form-Cw6QtAH6.js} +1 -1
- package/dist/client/assets/{general-gLVO7RCa.js → general-BeId0m-B.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bo2ED3nR.js → github-repo-picker-DSYDDBiz.js} +1 -1
- package/dist/client/assets/{hooks-DhrS682Z.js → hooks-DwImyW4m.js} +1 -1
- package/dist/client/assets/{index-z9QIuWJa.js → index-9sNs9xWx.js} +1 -1
- package/dist/client/assets/{index-DfXfkCwM.js → index-BAiJpItS.js} +3 -3
- package/dist/client/assets/{index-BDpwD7pj.js → index-CA6KmRc0.js} +1 -1
- package/dist/client/assets/{index-BlqHjRv2.js → index-CBESPzOS.js} +1 -1
- package/dist/client/assets/{index-Ba2s3N4C.js → index-CZLMCekJ.js} +1 -1
- package/dist/client/assets/{index-CZfth8at.js → index-D84XLmGy.js} +1 -1
- package/dist/client/assets/{index-Xgi3z-oO.js → index-Dp-hUsWg.js} +1 -1
- package/dist/client/assets/{index-BjmeYxbb.js → index-IDIhc7tp.js} +1 -1
- package/dist/client/assets/{index-ecOIW--2.js → index-jHOwXnRg.js} +49 -49
- package/dist/client/assets/{index-YR9i5Jvj.js → index-mov-SVmZ.js} +1 -1
- package/dist/client/assets/{index-redirect-Cu9QfK9u.js → index-redirect-DJKyhXL7.js} +1 -1
- package/dist/client/assets/{input-BVoAovEw.js → input-Bn_HObXh.js} +1 -1
- package/dist/client/assets/{integration-icon-DLz-3AnG.js → integration-icon-DdEonz1a.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-F5Y4SyTA.js → invite-member-dialog-D22efyrN.js} +1 -1
- package/dist/client/assets/{label-C0y1RbUi.js → label-BGKByVEB.js} +1 -1
- package/dist/client/assets/{layout-BxBs5tOY.js → layout-v6MKo_zt.js} +1 -1
- package/dist/client/assets/{login-BJOnCSUv.js → login-ud5cUyav.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Di_qoTTQ.js → mcp-oauth-HJV8JgD5.js} +1 -1
- package/dist/client/assets/{members-CJQPPy80.js → members-LyJ2RADV.js} +1 -1
- package/dist/client/assets/{monaco-editor-mXsRj2tC.js → monaco-editor-nPR5obLP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DaBAoPZn.js → monitoring-stats-row-C83GHApu.js} +1 -1
- package/dist/client/assets/{multi-select-ewHCxWRI.js → multi-select-Bnj9oTT8.js} +1 -1
- package/dist/client/assets/{oauth-callback-BEHogBNK.js → oauth-callback-BRKzwL4L.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DiihF3Z-.js → oauth-callback-ai-provider-DmdDye7a.js} +1 -1
- package/dist/client/assets/{onboarding-DzjWOUsM.js → onboarding-UMFU_RE6.js} +1 -1
- package/dist/client/assets/{org-layout-DFWBmmVu.js → org-layout-CKCXM8Fb.js} +1 -1
- package/dist/client/assets/{organization-choice-C6AmmtO3.js → organization-choice-RgbBVIqk.js} +1 -1
- package/dist/client/assets/{orgs-B1OyUW-c.js → orgs-CLP7fWjJ.js} +1 -1
- package/dist/client/assets/{page-seo-form-fZM82YK0.js → page-seo-form-DpiHyXr2.js} +1 -1
- package/dist/client/assets/{popover-gjnhsOhY.js → popover-DDixoR4f.js} +1 -1
- package/dist/client/assets/{post-editor-Cap1kE7R.js → post-editor-54wdpBqB.js} +1 -1
- package/dist/client/assets/{primitives-Dgl-clwE.js → primitives-BLUoYluK.js} +1 -1
- package/dist/client/assets/{profile-BjDjUjm5.js → profile-vXrkfNlC.js} +1 -1
- package/dist/client/assets/{project-app-view-DuGhw9ib.js → project-app-view-CEIZSZgB.js} +1 -1
- package/dist/client/assets/record-editor-IWgIaA_v.js +1 -0
- package/dist/client/assets/redirect-editor-By9apu7j.js +1 -0
- package/dist/client/assets/registry-3ZWkHVaU.js +2 -0
- package/dist/client/assets/{registry-layout-DOOMtLK0.js → registry-layout-TnFapqlk.js} +1 -1
- package/dist/client/assets/{reports-DZ0LEdEQ.js → reports-DRkn_fI8.js} +1 -1
- package/dist/client/assets/{require-capability-CfpSwaVR.js → require-capability-B30gdSdw.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D4hk5EJ3.js → required-auth-layout-BMm1IHVv.js} +1 -1
- package/dist/client/assets/{reset-password-BvJMGDgK.js → reset-password-Chje625o.js} +1 -1
- package/dist/client/assets/{roles-Bdo1Ho79.js → roles-DdoHmhF_.js} +1 -1
- package/dist/client/assets/{search-input-D4Qgi7eN.js → search-input-BIFouB0m.js} +1 -1
- package/dist/client/assets/{secrets-B3qiJQf5.js → secrets-ClXipwvF.js} +1 -1
- package/dist/client/assets/{sections-editor-Bt2Bq3tE.js → sections-editor-CoNVM2rv.js} +1 -1
- package/dist/client/assets/{select-CWl0YYNe.js → select-D_yeJ75K.js} +1 -1
- package/dist/client/assets/{select-model-IW03v_K5.js → select-model-BVtIKD5W.js} +1 -1
- package/dist/client/assets/{self-tool-result-HEblZTYn.js → self-tool-result-DEd61fTj.js} +1 -1
- package/dist/client/assets/{seo-editor-7gUhcyCl.js → seo-editor-pOUZFSh-.js} +1 -1
- package/dist/client/assets/{settings-layout-DfFcqeOD.js → settings-layout-QQeP30jU.js} +1 -1
- package/dist/client/assets/{settings-section-DztkNP0d.js → settings-section-C6tA5V_G.js} +1 -1
- package/dist/client/assets/{shell-controls-DpcV4B_P.js → shell-controls-CSzSvO8a.js} +1 -1
- package/dist/client/assets/{shell-layout-zJeUA2R6.js → shell-layout-BTYtGWaF.js} +1 -1
- package/dist/client/assets/{sidebar-B0FM7EZ9.js → sidebar-CDnOjt0X.js} +1 -1
- package/dist/client/assets/{skeleton-CkYelUeS.js → skeleton-BM-r770-.js} +1 -1
- package/dist/client/assets/{spinner-COnig_sx.js → spinner-BDyTrCfh.js} +1 -1
- package/dist/client/assets/{sso-DqvFv39K.js → sso-CbzSSlyQ.js} +1 -1
- package/dist/client/assets/{store-C_rk4iKr.js → store-BKZBb_xp.js} +1 -1
- package/dist/client/assets/store-registry-BD3353_O.js +2 -0
- package/dist/client/assets/{studio-tools-B35Xxz75.js → studio-tools-aMiIXKCJ.js} +1 -1
- package/dist/client/assets/{switch-DdlGzRvU.js → switch-DzFEF9Ql.js} +1 -1
- package/dist/client/assets/{synced-repos-B7eN86Lv.js → synced-repos-CqOZQfnr.js} +1 -1
- package/dist/client/assets/{tab-id-C2pWBVBK.js → tab-id-Bv9VEJXN.js} +1 -1
- package/dist/client/assets/{table-C2gUkIjM.js → table-BtgWn5yb.js} +1 -1
- package/dist/client/assets/{tabs-DJ5RjVP9.js → tabs-CYDaJKXA.js} +1 -1
- package/dist/client/assets/{textarea-wGZcgPjx.js → textarea-Cruv4mf3.js} +1 -1
- package/dist/client/assets/{toggle-group-tTSh7QvB.js → toggle-group-KUEB4tVg.js} +1 -1
- package/dist/client/assets/{toolbar-B1Fc_ZpA.js → toolbar-5bcTmDQZ.js} +1 -1
- package/dist/client/assets/{tooltip-4DtnkGLf.js → tooltip-CAwch2cc.js} +1 -1
- package/dist/client/assets/{track-CFqotqLu.js → track-QWKgwT6J.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bl-gR4fH.js → use-ai-providers-CanrvhVD.js} +1 -1
- package/dist/client/assets/{use-api-keys-DMGLcwOS.js → use-api-keys-Cov7NXkp.js} +1 -1
- package/dist/client/assets/{use-automations-CDlkHa33.js → use-automations-D6lJtU9D.js} +1 -1
- package/dist/client/assets/{use-autosave-HyMFVYgl.js → use-autosave-BHsS_7UH.js} +1 -1
- package/dist/client/assets/{use-capability-xOw0-LVT.js → use-capability-ClszbKDY.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BJaDrGoy.js → use-clock-tick-JQx2KD5i.js} +1 -1
- package/dist/client/assets/{use-connection-DHpUPjf1.js → use-connection-h8YaSW9y.js} +1 -1
- package/dist/client/assets/{use-copy-BFywbTSl.js → use-copy-CXAG7AgP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D_rrPDmt.js → use-create-virtual-mcp-WR0KHuAs.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-yiZzBi6P.js → use-debounced-autosave-CC1xSuY_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C5lBTNvL.js → use-debounced-value-Yq_CFn9Y.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CJEvEfWe.js → use-deco-credits-52y0E1Hi.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BAS2DTkE.js → use-decopilot-events-BhJuqChk.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C88gze-D.js → use-delete-connection-BVu1RkaO.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BHDLTJ7A.js → use-deployment-admin-BLATv0Hs.js} +1 -1
- package/dist/client/assets/{use-file-configs-DTVZlClI.js → use-file-configs-C0mZn40A.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cao-Mwrk.js → use-infinite-scroll-B71N644_.js} +1 -1
- package/dist/client/assets/{use-join-requests-CRGYhm7Q.js → use-join-requests-3Ymqz5ZY.js} +1 -1
- package/dist/client/assets/{use-mcp-client-YTBr9HtX.js → use-mcp-client-GhpoIQKr.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BswhoepV.js → use-mcp-tools-UEFQklBn.js} +1 -1
- package/dist/client/assets/{use-members-BZq5H1WT.js → use-members-CRlBxqmb.js} +1 -1
- package/dist/client/assets/{use-mobile-CIucwn9L.js → use-mobile-CoTq1oqK.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-70yjw6vq.js → use-navigate-to-agent-DjRdpKJa.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Buu8dwcr.js → use-open-billing-url-BwyXsji5.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-k2d4Qzc1.js → use-org-auth-client-DIlVqUXY.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bk521YqK.js → use-org-sso-BglYIxya.js} +1 -1
- package/dist/client/assets/{use-organization-roles-B-voKCxO.js → use-organization-roles-6Ok1X0zC.js} +1 -1
- package/dist/client/assets/{use-organization-settings-raf1HSTR.js → use-organization-settings-D3DVxBkF.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BHBTv71-.js → use-registry-connections-Bh9pwnTP.js} +1 -1
- package/dist/client/assets/{use-secrets-wKvhXs9g.js → use-secrets-CoYxSG0J.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Bw5Irht3.js → use-section-preview-base-pPsaxIpp.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DKmX3az3.js → use-status-sounds-DVxL4JSj.js} +1 -1
- package/dist/client/assets/{use-tags-BtSWH5Bb.js → use-tags-NSxvIMH8.js} +1 -1
- package/dist/client/assets/{use-view-mode-G6QhXW5c.js → use-view-mode-zmaoTSGy.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CI97Yn-q.js → use-virtual-mcp-DLPyOiQv.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CvT6z6qt.js +1 -0
- package/dist/client/assets/{useRouterState-CqymXQC_.js → useRouterState-DT1vUIFc.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cz_pqIIT.js +1 -0
- package/dist/client/assets/{users-DUZLOBpz.js → users-DFY_vM54.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bh-YOTC8.js → variant-calendar-D66LwPfx.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CBCp8Jlo.js → view-mode-toggle-Ba6R7TV_.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/record-editor-DZPgCBPy.js +0 -1
- package/dist/client/assets/redirect-editor-CMYB3Ta8.js +0 -1
- package/dist/client/assets/registry-DhDDHRf3.js +0 -2
- package/dist/client/assets/store-registry-D_BVvpXA.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BtXHXDUp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-FOQPA7R1.js +0 -1
package/dist/server/cli.js
CHANGED
|
@@ -1332,7 +1332,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var vd1=O(()=>{px()});f
|
|
|
1332
1332
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await Pb`
|
|
1333
1333
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1334
1334
|
`.execute($)}}async function ap1($){await nm6($),await pm6($);let Z=new op1({db:$,provider:{getMigrations:()=>Promise.resolve(Om0)}}),{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 tm6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await hu0();let G=X??N6(),J=async()=>{if(!Z&&!X)await Aw(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await ap1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function om6(){let $=N6(),Z=new op1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Om0)}}),{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 ep1=O(()=>{tp1();uu0();e7()});async function h90($){let Z={...process.env},X=_10($,Z);console.log(wB1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?Ui1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (o50(),t50)),{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(() => (uu0(),Fi1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (e7(),Vm1)),{migrateToLatest:U}=await Promise.resolve().then(() => (ep1(),sp1)),N=H(G.databaseUrl);await U({keepOpen:!0,database:N,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 xd1(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 Lm0=O(()=>{px();Ni1();k8()});var Xt1={};B0(Xt1,{updateService:()=>YE,subscribeCliState:()=>zm0,setTuiConsoleIntercepted:()=>u90,setServerUrl:()=>Xi,setMigrationsDone:()=>Zi,setDevMode:()=>sm6,resetCliStateForTests:()=>rm6,isTuiConsoleIntercepted:()=>c90,getCliState:()=>Em0,addLogEntry:()=>Mw});function $t1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function rm6(){bQ=$t1()}function am6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function $i(){for(let $ of Dm0)$()}function Em0(){return bQ}function zm0($){return Dm0.add($),()=>Dm0.delete($)}function YE($){bQ={...bQ,services:bQ.services.map((Z)=>Z.name===$.name?$:Z)},$i()}function Zi(){bQ={...bQ,migrationsStatus:"done"},$i()}function Xi($){bQ={...bQ,serverUrl:$},$i()}function Mw($){let Z=[...bQ.logs,$];bQ={...bQ,logs:Z.length>500?Z.slice(-500):Z},$i()}function sm6(){bQ={...bQ,services:[...am6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},$i()}function u90($){Zt1=$}function c90(){return Zt1}var bQ,Dm0,Zt1=!1;var GE=O(()=>{bQ=$t1();Dm0=new Set});import{createServer as Qt1}from"net";function em6($){return new Promise((Z)=>{let X=Qt1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Qi($){if(await em6($))return $;let Z=await new Promise((X,Q)=>{let Y=Qt1();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 jm0=()=>{};function Yi($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var Pm0={};B0(Pm0,{startDevServer:()=>Zi6});import{join as $i6}from"path";function Yt1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1335
|
-
`);Q=G.pop()??"";for(let J of G){let K=Yi(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Mw({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=Yi(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Mw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Zi6($){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 Qi(Number(Y)+1):await Qi(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await h90({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)YE({name:L.name,status:"ready",port:L.port});Zi();let U=$i6(import.meta.dir,"..","..","..","..",".."),N=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:U,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",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)Yt1(F.stdout),Yt1(F.stderr);Xi(G),YE({name:"Vite",status:"ready",port:Number(Y)}),YE({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (o50(),t50));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var Am0=O(()=>{Lm0();GE();jm0()});var l90;var Tm0=O(()=>{l90={name:"decocms",version:"4.217.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as Qi6,Text as Gt1}from"ink";import{jsx as Yi6,jsxs as Jt1}from"react/jsx-runtime";function Kt1({version:$}){return Jt1(Qi6,{flexDirection:"column",marginTop:1,children:[L90.map((Z,X)=>Yi6(Gt1,{color:D90[X],children:Z},X)),Jt1(Gt1,{dimColor:!0,children:[" v",$]})]})}var Wt1=O(()=>{dm()});import{Box as JE,Text as Vw}from"ink";import{Spinner as Gi6}from"@inkjs/ui";import{jsx as iY,jsxs as Ab}from"react/jsx-runtime";function Ht1({status:$}){if($==="pending")return iY(Gi6,{label:""});return iY(Vw,{color:"green",children:"\u2713"})}function Ji6($){return`${$.name}: ${$.port||"...."}`}function Ut1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Ab(JE,{flexDirection:"column",paddingBottom:1,children:[iY(Kt1,{version:l90.version}),iY(JE,{marginBottom:1,children:iY(Vw,{dimColor:!0,children:"\u2500".repeat(80)})}),iY(JE,{children:Ab(Vw,{dimColor:!0,children:["Home: ",X]})}),Ab(JE,{gap:2,children:[$.map((Y)=>Ab(JE,{gap:1,children:[iY(Vw,{children:Ji6(Y)}),iY(Ht1,{status:Y.status})]},Y.name)),Ab(JE,{gap:1,children:[iY(Vw,{children:"Migrations"}),iY(Ht1,{status:Z})]})]}),iY(JE,{children:Q?Ab(Vw,{children:["Open in browser: ",iY(Vw,{color:"cyan",children:Q})]}):iY(Vw,{dimColor:!0,children:"Starting..."})})]})}var Nt1=O(()=>{Tm0();Wt1()});import{Box as Ki6,Text as Gi}from"ink";import{jsx as Rm0,jsxs as Im0}from"react/jsx-runtime";function Wi6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Ft1({logs:$}){return Rm0(Ki6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Rm0(Gi,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Im0(Gi,{children:[Im0(Gi,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Rm0(Gi,{color:Wi6(Z.status),children:Z.status}),Im0(Gi,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var wt1=()=>{};var qm0={};B0(qm0,{App:()=>Ni6});import{Box as Hi6}from"ink";import{useSyncExternalStore as Ui6}from"react";import{jsx as Bt1,jsxs as Fi6}from"react/jsx-runtime";function Ni6({home:$}){let Z=Ui6(zm0,Em0);return Fi6(Hi6,{flexDirection:"column",children:[Bt1(Ut1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Bt1(Ft1,{logs:Z.logs})]})}var Mm0=O(()=>{Nt1();wt1();GE()});var RJ="thread-gate",hU="decopilot-hosted-harness",Z3="automations",kw="background-tools",KE="task-board-github-reads";var Ot1="7";function Lt1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ot1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Dt1=()=>{};function wi6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Vm0($,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 Et1(){let $=wi6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Vm0($,"--cpu-prof-dir")??process.cwd(),name:Vm0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Vm0($,"--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 zt1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=$E();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(()=>{}),d90=setInterval(()=>void Z().catch(()=>{}),$),d90.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(d90)clearInterval(d90)}}var d90;var jt1=()=>{};import*as Bi6 from"bun:jsc";function Pt1(){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{Oi6()}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=Li6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let U of K){let N=U.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??U.frames[0];if(!N)continue;let F=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${N.name??"?"} @ ${F}:${N.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((U,N)=>N[1]-U[1]).slice(0,8).map(([U,N])=>({frame:U,count:N}));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 Oi6,Li6;var At1=O(()=>{({startSamplingProfiler:Oi6,samplingProfilerStackTraces:Li6}=Bi6)});function Tt1(){Et1();let $=[zt1(),jm1(),Pt1()];return()=>{for(let Z of $)Z()}}var Rt1=O(()=>{ku0();jt1();At1()});var WE=_((It1)=>{Object.defineProperty(It1,"__esModule",{value:!0});It1.RepublishHeaders=It1.DirectMsgHeaders=It1.JsHeaders=It1.AdvisoryKind=void 0;It1.isOrderedPushConsumerOptions=Di6;It1.isPullConsumer=Ei6;It1.isPushConsumer=zi6;It1.isBoundPushConsumerOptions=ji6;function Di6($){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 Ei6($){return $.isPullConsumer()}function zi6($){return $.isPushConsumer()}function ji6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}It1.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"};It1.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"};It1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};It1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var nY=_((Mt1)=>{Object.defineProperty(Mt1,"__esModule",{value:!0});Mt1.TD=Mt1.TE=Mt1.Empty=void 0;Mt1.encode=ki6;Mt1.decode=Si6;Mt1.Empty=new Uint8Array(0);Mt1.TE=new TextEncoder;Mt1.TD=new TextDecoder;function Vi6(...$){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 ki6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Mt1.TE.encode($[X]));if(Z.length===0)return Mt1.Empty;if(Z.length===1)return Z[0];return Vi6(...Z)}function Si6($){if(!$||$.length===0)return"";return Mt1.TD.decode($)}});var pY=_((St1)=>{Object.defineProperty(St1,"__esModule",{value:!0});St1.errors=St1.PermissionViolationError=St1.NoRespondersError=St1.TimeoutError=St1.RequestError=St1.ProtocolError=St1.ConnectionError=St1.DrainingConnectionError=St1.ClosedConnectionError=St1.AuthorizationError=St1.UserAuthenticationExpiredError=St1.InvalidOperationError=St1.InvalidArgumentError=St1.InvalidSubjectError=void 0;class Sm0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}St1.InvalidSubjectError=Sm0;class m90 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 m90(`${$} ${Z}`,X)}}St1.InvalidArgumentError=m90;class Cm0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}St1.InvalidOperationError=Cm0;class i90 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new i90($);return null}}St1.UserAuthenticationExpiredError=i90;class n90 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 n90($);return null}}St1.AuthorizationError=n90;class _m0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}St1.ClosedConnectionError=_m0;class vm0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}St1.DrainingConnectionError=vm0;class xm0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}St1.ConnectionError=xm0;class fm0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}St1.ProtocolError=fm0;class bm0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof p90}}St1.RequestError=bm0;class ym0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}St1.TimeoutError=ym0;class p90 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}St1.NoRespondersError=p90;class t90 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 t90($,X,Q,Y)}}St1.PermissionViolationError=t90;St1.errors={AuthorizationError:n90,ClosedConnectionError:_m0,ConnectionError:xm0,DrainingConnectionError:vm0,InvalidArgumentError:m90,InvalidOperationError:Cm0,InvalidSubjectError:Sm0,NoRespondersError:p90,PermissionViolationError:t90,ProtocolError:fm0,RequestError:bm0,TimeoutError:ym0,UserAuthenticationExpiredError:i90}});var IJ=_((ft1)=>{Object.defineProperty(ft1,"__esModule",{value:!0});ft1.SimpleMutex=ft1.Perf=void 0;ft1.extend=pi6;ft1.render=ti6;ft1.timeout=oi6;ft1.delay=ri6;ft1.deadline=ai6;ft1.deferred=hm0;ft1.debugDeferred=si6;ft1.shuffle=ei6;ft1.collect=$n6;ft1.jitter=xt1;ft1.backoff=Zn6;ft1.nanos=Xn6;ft1.millis=Qn6;ft1.randomToken=Jn6;var ni6=nY(),gm0=pY();function pi6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function ti6($){return ni6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function oi6($,Z=!0){let X=Z?new gm0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new gm0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function ri6($=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 ai6($,Z=1000){let X=hm0(),Q=setTimeout(()=>{X.reject(new gm0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function hm0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function si6(){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 ei6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function $n6($){let Z=[];for await(let X of $)Z.push(X);return Z}class _t1{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})}),$}}ft1.Perf=_t1;class vt1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=hm0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}ft1.SimpleMutex=vt1;function xt1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Zn6($=[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 xt1(X>Z?$[Z]:$[X])}}}function Xn6($){return $*1e6}function Qn6($){return Math.floor($/1e6)}var Yn6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",uU=new Uint8Array(62);for(let $=0;$<62;$++)uU[$]=Yn6.charCodeAt($);var Gn6=218340105584896;function Jn6(){let $=Math.floor(Math.random()*Gn6),Z=$%62,X=uU[Z];$=($-Z)/62,Z=$%62;let Q=uU[Z];$=($-Z)/62,Z=$%62;let Y=uU[Z];$=($-Z)/62,Z=$%62;let G=uU[Z];$=($-Z)/62,Z=$%62;let J=uU[Z];$=($-Z)/62,Z=$%62;let K=uU[Z];$=($-Z)/62,Z=$%62;let W=uU[Z];$=($-Z)/62;let H=uU[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var dt1=_((ct1)=>{Object.defineProperty(ct1,"__esModule",{value:!0});ct1.nuid=ct1.NuidImpl=void 0;var An6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Sw=62,r90=12,ht1=10,yt1=33,Tn6=333,gt1=r90+ht1,cm0=new Uint8Array(Sw);for(let $=0;$<Sw;$++)cm0[$]=An6.charCodeAt($);var o90=4294967296,ut1=BigInt(Sw)**BigInt(ht1),Ji=Number(ut1/(1n<<32n)),um0=Number(ut1%(1n<<32n));function Rn6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function In6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Rn6($)}class lm0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(gt1),this.cbuf=new Uint8Array(r90),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Ji+1)),this.seqLo=Math.floor(Math.random()*o90);while($++<8&&this.seqHi===Ji&&this.seqLo>=um0);if(this.seqHi===Ji&&this.seqLo>=um0)this.seqLo=0;this.inc=Math.random()*(Tn6-yt1)+yt1|0}setPre(){In6(this.cbuf);for(let $=0;$<r90;$++)this.buf[$]=cm0[this.cbuf[$]%Sw]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=gt1-1;X>=r90;X--){let Q=Math.floor($/Sw),G=($-Q*Sw)*o90+Z,J=Math.floor(G/Sw),K=G-J*Sw;this.buf[X]=cm0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=o90)this.seqLo-=o90,this.seqHi+=1;if(this.seqHi>Ji||this.seqHi===Ji&&this.seqLo>=um0)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()}}ct1.NuidImpl=lm0;ct1.nuid=new lm0});var pt1=_((it1)=>{Object.defineProperty(it1,"__esModule",{value:!0});it1.nuid=it1.Nuid=void 0;var mt1=dt1();it1.Nuid=mt1.NuidImpl;it1.nuid=mt1.nuid});var s90=_((a90)=>{Object.defineProperty(a90,"__esModule",{value:!0});a90.nuid=a90.Nuid=void 0;var tt1=pt1();Object.defineProperty(a90,"Nuid",{enumerable:!0,get:function(){return tt1.Nuid}});Object.defineProperty(a90,"nuid",{enumerable:!0,get:function(){return tt1.nuid}})});var Cw=_((ot1)=>{Object.defineProperty(ot1,"__esModule",{value:!0});ot1.DEFAULT_HOST=ot1.DEFAULT_PORT=ot1.Match=void 0;ot1.syncIterator=Cn6;ot1.createInbox=_n6;var kn6=s90(),Sn6=pY();ot1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Cn6($){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 _n6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Sn6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${kn6.nuid.next()}`}ot1.DEFAULT_PORT=4222;ot1.DEFAULT_HOST="127.0.0.1"});var Ki=_((et1)=>{Object.defineProperty(et1,"__esModule",{value:!0});et1.DataBuffer=void 0;var at1=nY();class st1{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 at1.TE.encode($)}static toAscii($){return at1.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}}et1.DataBuffer=st1});var HE=_((Xo1)=>{Object.defineProperty(Xo1,"__esModule",{value:!0});Xo1.LF=Xo1.CR=Xo1.CRLF=Xo1.CR_LF_LEN=Xo1.CR_LF=void 0;Xo1.setTransportFactory=un6;Xo1.defaultPort=cn6;Xo1.getUrlParseFn=ln6;Xo1.newTransport=dn6;Xo1.getResolveFn=mn6;Xo1.protoLen=Zo1;Xo1.extractProtocolMessage=in6;var yn6=nY(),gn6=Cw(),hn6=Ki(),tY;function un6($){tY=$}function cn6(){return tY!==void 0&&tY.defaultPort!==void 0?tY.defaultPort:gn6.DEFAULT_PORT}function ln6(){return tY!==void 0&&tY.urlParseFn?tY.urlParseFn:void 0}function dn6(){if(!tY||typeof tY.factory!=="function")throw Error("transport fn is not set");return tY.factory()}function mn6(){return tY!==void 0&&tY.dnsResolveFn?tY.dnsResolveFn:void 0}Xo1.CR_LF=`\r
|
|
1335
|
+
`);Q=G.pop()??"";for(let J of G){let K=Yi(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Mw({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=Yi(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Mw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Zi6($){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 Qi(Number(Y)+1):await Qi(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await h90({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)YE({name:L.name,status:"ready",port:L.port});Zi();let U=$i6(import.meta.dir,"..","..","..","..",".."),N=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:U,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",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)Yt1(F.stdout),Yt1(F.stderr);Xi(G),YE({name:"Vite",status:"ready",port:Number(Y)}),YE({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (o50(),t50));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var Am0=O(()=>{Lm0();GE();jm0()});var l90;var Tm0=O(()=>{l90={name:"decocms",version:"4.217.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",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as Qi6,Text as Gt1}from"ink";import{jsx as Yi6,jsxs as Jt1}from"react/jsx-runtime";function Kt1({version:$}){return Jt1(Qi6,{flexDirection:"column",marginTop:1,children:[L90.map((Z,X)=>Yi6(Gt1,{color:D90[X],children:Z},X)),Jt1(Gt1,{dimColor:!0,children:[" v",$]})]})}var Wt1=O(()=>{dm()});import{Box as JE,Text as Vw}from"ink";import{Spinner as Gi6}from"@inkjs/ui";import{jsx as iY,jsxs as Ab}from"react/jsx-runtime";function Ht1({status:$}){if($==="pending")return iY(Gi6,{label:""});return iY(Vw,{color:"green",children:"\u2713"})}function Ji6($){return`${$.name}: ${$.port||"...."}`}function Ut1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Ab(JE,{flexDirection:"column",paddingBottom:1,children:[iY(Kt1,{version:l90.version}),iY(JE,{marginBottom:1,children:iY(Vw,{dimColor:!0,children:"\u2500".repeat(80)})}),iY(JE,{children:Ab(Vw,{dimColor:!0,children:["Home: ",X]})}),Ab(JE,{gap:2,children:[$.map((Y)=>Ab(JE,{gap:1,children:[iY(Vw,{children:Ji6(Y)}),iY(Ht1,{status:Y.status})]},Y.name)),Ab(JE,{gap:1,children:[iY(Vw,{children:"Migrations"}),iY(Ht1,{status:Z})]})]}),iY(JE,{children:Q?Ab(Vw,{children:["Open in browser: ",iY(Vw,{color:"cyan",children:Q})]}):iY(Vw,{dimColor:!0,children:"Starting..."})})]})}var Nt1=O(()=>{Tm0();Wt1()});import{Box as Ki6,Text as Gi}from"ink";import{jsx as Rm0,jsxs as Im0}from"react/jsx-runtime";function Wi6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Ft1({logs:$}){return Rm0(Ki6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Rm0(Gi,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Im0(Gi,{children:[Im0(Gi,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Rm0(Gi,{color:Wi6(Z.status),children:Z.status}),Im0(Gi,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var wt1=()=>{};var qm0={};B0(qm0,{App:()=>Ni6});import{Box as Hi6}from"ink";import{useSyncExternalStore as Ui6}from"react";import{jsx as Bt1,jsxs as Fi6}from"react/jsx-runtime";function Ni6({home:$}){let Z=Ui6(zm0,Em0);return Fi6(Hi6,{flexDirection:"column",children:[Bt1(Ut1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Bt1(Ft1,{logs:Z.logs})]})}var Mm0=O(()=>{Nt1();wt1();GE()});var RJ="thread-gate",hU="decopilot-hosted-harness",Z3="automations",kw="background-tools",KE="task-board-github-reads";var Ot1="7";function Lt1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ot1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Dt1=()=>{};function wi6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Vm0($,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 Et1(){let $=wi6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Vm0($,"--cpu-prof-dir")??process.cwd(),name:Vm0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Vm0($,"--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 zt1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=$E();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(()=>{}),d90=setInterval(()=>void Z().catch(()=>{}),$),d90.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(d90)clearInterval(d90)}}var d90;var jt1=()=>{};import*as Bi6 from"bun:jsc";function Pt1(){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{Oi6()}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=Li6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let U of K){let N=U.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??U.frames[0];if(!N)continue;let F=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${N.name??"?"} @ ${F}:${N.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((U,N)=>N[1]-U[1]).slice(0,8).map(([U,N])=>({frame:U,count:N}));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 Oi6,Li6;var At1=O(()=>{({startSamplingProfiler:Oi6,samplingProfilerStackTraces:Li6}=Bi6)});function Tt1(){Et1();let $=[zt1(),jm1(),Pt1()];return()=>{for(let Z of $)Z()}}var Rt1=O(()=>{ku0();jt1();At1()});var WE=_((It1)=>{Object.defineProperty(It1,"__esModule",{value:!0});It1.RepublishHeaders=It1.DirectMsgHeaders=It1.JsHeaders=It1.AdvisoryKind=void 0;It1.isOrderedPushConsumerOptions=Di6;It1.isPullConsumer=Ei6;It1.isPushConsumer=zi6;It1.isBoundPushConsumerOptions=ji6;function Di6($){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 Ei6($){return $.isPullConsumer()}function zi6($){return $.isPushConsumer()}function ji6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}It1.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"};It1.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"};It1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};It1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var nY=_((Mt1)=>{Object.defineProperty(Mt1,"__esModule",{value:!0});Mt1.TD=Mt1.TE=Mt1.Empty=void 0;Mt1.encode=ki6;Mt1.decode=Si6;Mt1.Empty=new Uint8Array(0);Mt1.TE=new TextEncoder;Mt1.TD=new TextDecoder;function Vi6(...$){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 ki6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Mt1.TE.encode($[X]));if(Z.length===0)return Mt1.Empty;if(Z.length===1)return Z[0];return Vi6(...Z)}function Si6($){if(!$||$.length===0)return"";return Mt1.TD.decode($)}});var pY=_((St1)=>{Object.defineProperty(St1,"__esModule",{value:!0});St1.errors=St1.PermissionViolationError=St1.NoRespondersError=St1.TimeoutError=St1.RequestError=St1.ProtocolError=St1.ConnectionError=St1.DrainingConnectionError=St1.ClosedConnectionError=St1.AuthorizationError=St1.UserAuthenticationExpiredError=St1.InvalidOperationError=St1.InvalidArgumentError=St1.InvalidSubjectError=void 0;class Sm0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}St1.InvalidSubjectError=Sm0;class m90 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 m90(`${$} ${Z}`,X)}}St1.InvalidArgumentError=m90;class Cm0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}St1.InvalidOperationError=Cm0;class i90 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new i90($);return null}}St1.UserAuthenticationExpiredError=i90;class n90 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 n90($);return null}}St1.AuthorizationError=n90;class _m0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}St1.ClosedConnectionError=_m0;class vm0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}St1.DrainingConnectionError=vm0;class xm0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}St1.ConnectionError=xm0;class fm0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}St1.ProtocolError=fm0;class bm0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof p90}}St1.RequestError=bm0;class ym0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}St1.TimeoutError=ym0;class p90 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}St1.NoRespondersError=p90;class t90 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 t90($,X,Q,Y)}}St1.PermissionViolationError=t90;St1.errors={AuthorizationError:n90,ClosedConnectionError:_m0,ConnectionError:xm0,DrainingConnectionError:vm0,InvalidArgumentError:m90,InvalidOperationError:Cm0,InvalidSubjectError:Sm0,NoRespondersError:p90,PermissionViolationError:t90,ProtocolError:fm0,RequestError:bm0,TimeoutError:ym0,UserAuthenticationExpiredError:i90}});var IJ=_((ft1)=>{Object.defineProperty(ft1,"__esModule",{value:!0});ft1.SimpleMutex=ft1.Perf=void 0;ft1.extend=pi6;ft1.render=ti6;ft1.timeout=oi6;ft1.delay=ri6;ft1.deadline=ai6;ft1.deferred=hm0;ft1.debugDeferred=si6;ft1.shuffle=ei6;ft1.collect=$n6;ft1.jitter=xt1;ft1.backoff=Zn6;ft1.nanos=Xn6;ft1.millis=Qn6;ft1.randomToken=Jn6;var ni6=nY(),gm0=pY();function pi6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function ti6($){return ni6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function oi6($,Z=!0){let X=Z?new gm0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new gm0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function ri6($=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 ai6($,Z=1000){let X=hm0(),Q=setTimeout(()=>{X.reject(new gm0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function hm0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function si6(){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 ei6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function $n6($){let Z=[];for await(let X of $)Z.push(X);return Z}class _t1{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})}),$}}ft1.Perf=_t1;class vt1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=hm0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}ft1.SimpleMutex=vt1;function xt1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Zn6($=[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 xt1(X>Z?$[Z]:$[X])}}}function Xn6($){return $*1e6}function Qn6($){return Math.floor($/1e6)}var Yn6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",uU=new Uint8Array(62);for(let $=0;$<62;$++)uU[$]=Yn6.charCodeAt($);var Gn6=218340105584896;function Jn6(){let $=Math.floor(Math.random()*Gn6),Z=$%62,X=uU[Z];$=($-Z)/62,Z=$%62;let Q=uU[Z];$=($-Z)/62,Z=$%62;let Y=uU[Z];$=($-Z)/62,Z=$%62;let G=uU[Z];$=($-Z)/62,Z=$%62;let J=uU[Z];$=($-Z)/62,Z=$%62;let K=uU[Z];$=($-Z)/62,Z=$%62;let W=uU[Z];$=($-Z)/62;let H=uU[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var dt1=_((ct1)=>{Object.defineProperty(ct1,"__esModule",{value:!0});ct1.nuid=ct1.NuidImpl=void 0;var An6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Sw=62,r90=12,ht1=10,yt1=33,Tn6=333,gt1=r90+ht1,cm0=new Uint8Array(Sw);for(let $=0;$<Sw;$++)cm0[$]=An6.charCodeAt($);var o90=4294967296,ut1=BigInt(Sw)**BigInt(ht1),Ji=Number(ut1/(1n<<32n)),um0=Number(ut1%(1n<<32n));function Rn6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function In6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Rn6($)}class lm0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(gt1),this.cbuf=new Uint8Array(r90),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Ji+1)),this.seqLo=Math.floor(Math.random()*o90);while($++<8&&this.seqHi===Ji&&this.seqLo>=um0);if(this.seqHi===Ji&&this.seqLo>=um0)this.seqLo=0;this.inc=Math.random()*(Tn6-yt1)+yt1|0}setPre(){In6(this.cbuf);for(let $=0;$<r90;$++)this.buf[$]=cm0[this.cbuf[$]%Sw]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=gt1-1;X>=r90;X--){let Q=Math.floor($/Sw),G=($-Q*Sw)*o90+Z,J=Math.floor(G/Sw),K=G-J*Sw;this.buf[X]=cm0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=o90)this.seqLo-=o90,this.seqHi+=1;if(this.seqHi>Ji||this.seqHi===Ji&&this.seqLo>=um0)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()}}ct1.NuidImpl=lm0;ct1.nuid=new lm0});var pt1=_((it1)=>{Object.defineProperty(it1,"__esModule",{value:!0});it1.nuid=it1.Nuid=void 0;var mt1=dt1();it1.Nuid=mt1.NuidImpl;it1.nuid=mt1.nuid});var s90=_((a90)=>{Object.defineProperty(a90,"__esModule",{value:!0});a90.nuid=a90.Nuid=void 0;var tt1=pt1();Object.defineProperty(a90,"Nuid",{enumerable:!0,get:function(){return tt1.Nuid}});Object.defineProperty(a90,"nuid",{enumerable:!0,get:function(){return tt1.nuid}})});var Cw=_((ot1)=>{Object.defineProperty(ot1,"__esModule",{value:!0});ot1.DEFAULT_HOST=ot1.DEFAULT_PORT=ot1.Match=void 0;ot1.syncIterator=Cn6;ot1.createInbox=_n6;var kn6=s90(),Sn6=pY();ot1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Cn6($){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 _n6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Sn6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${kn6.nuid.next()}`}ot1.DEFAULT_PORT=4222;ot1.DEFAULT_HOST="127.0.0.1"});var Ki=_((et1)=>{Object.defineProperty(et1,"__esModule",{value:!0});et1.DataBuffer=void 0;var at1=nY();class st1{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 at1.TE.encode($)}static toAscii($){return at1.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}}et1.DataBuffer=st1});var HE=_((Xo1)=>{Object.defineProperty(Xo1,"__esModule",{value:!0});Xo1.LF=Xo1.CR=Xo1.CRLF=Xo1.CR_LF_LEN=Xo1.CR_LF=void 0;Xo1.setTransportFactory=un6;Xo1.defaultPort=cn6;Xo1.getUrlParseFn=ln6;Xo1.newTransport=dn6;Xo1.getResolveFn=mn6;Xo1.protoLen=Zo1;Xo1.extractProtocolMessage=in6;var yn6=nY(),gn6=Cw(),hn6=Ki(),tY;function un6($){tY=$}function cn6(){return tY!==void 0&&tY.defaultPort!==void 0?tY.defaultPort:gn6.DEFAULT_PORT}function ln6(){return tY!==void 0&&tY.urlParseFn?tY.urlParseFn:void 0}function dn6(){if(!tY||typeof tY.factory!=="function")throw Error("transport fn is not set");return tY.factory()}function mn6(){return tY!==void 0&&tY.dnsResolveFn?tY.dnsResolveFn:void 0}Xo1.CR_LF=`\r
|
|
1336
1336
|
`;Xo1.CR_LF_LEN=Xo1.CR_LF.length;Xo1.CRLF=hn6.DataBuffer.fromAscii(Xo1.CR_LF);Xo1.CR=new Uint8Array(Xo1.CRLF)[0];Xo1.LF=new Uint8Array(Xo1.CRLF)[1];function Zo1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===Xo1.CR&&$[X]===Xo1.LF)return X+1}return 0}function in6($){let Z=Zo1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return yn6.TD.decode(Q)}return""}});var pm0=_((Uo1)=>{Object.defineProperty(Uo1,"__esModule",{value:!0});Uo1.ipV4=Ko1;Uo1.isIP=Xp6;Uo1.parseIP=Wo1;var Wi=4,UE=16,e90=48,Jo1=57,Yo1=65,$p6=70,Go1=97,Zp6=102,nm0=16777215;function Ko1($,Z,X,Q){let Y=new Uint8Array(UE);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 Xp6($){return Wo1($)!==void 0}function Wo1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Ho1($);case":":return Qp6($)}return}function Ho1($){let Z=new Uint8Array(Wi);for(let X=0;X<Wi;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=Yp6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return Ko1(Z[0],Z[1],Z[2],Z[3])}function Qp6($){let Z=new Uint8Array(UE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<UE){let{n:Y,c:G,ok:J}=Gp6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=UE-Wi)return;if(Q+Wi>UE)return;let K=Ho1($);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+=Wi;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<UE){if(X<0)return;let Y=UE-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 Yp6($){let Z=0,X=0;for(Z=0;Z<$.length&&e90<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=Jo1;Z++)if(X=X*10+($.charCodeAt(Z)-e90),X>=nm0)return{n:nm0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function Gp6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(e90<=$.charCodeAt(X)&&$.charCodeAt(X)<=Jo1)Z*=16,Z+=$.charCodeAt(X)-e90;else if(Go1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Zp6)Z*=16,Z+=$.charCodeAt(X)-Go1+10;else if(Yo1<=$.charCodeAt(X)&&$.charCodeAt(X)<=$p6)Z*=16,Z+=$.charCodeAt(X)-Yo1+10;else break;if(Z>=nm0)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 em0=_((Fo1)=>{Object.defineProperty(Fo1,"__esModule",{value:!0});Fo1.Servers=Fo1.ServerImpl=void 0;Fo1.isIPV4OrHostname=No1;Fo1.hostPort=sm0;var tm0=HE(),om0=IJ(),rm0=pm0(),Hp6=Cw(),Up6=pY();function No1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function am0($){return!No1($)}function Np6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function sm0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=Np6($),am0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=am0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):Hp6.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 Tb{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=sm0($);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,rm0.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}://${am0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new Tb(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,om0.shuffle)(Z);return this.resolves=Z,Z}}Fo1.ServerImpl=Tb;class $Z0{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw Up6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,tm0.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}=sm0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new Tb(Y))}if(this.randomize)(0,om0.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,rm0.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,tm0.getUrlParseFn)();$=X?X($):$;let Q=new Tb($,Z);if((0,rm0.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 $Z0.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return $Z0.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,tm0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Tb(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,om0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Fo1.Servers=$Z0});var ZZ0=_((Lo1)=>{Object.defineProperty(Lo1,"__esModule",{value:!0});Lo1.QueuedIteratorImpl=void 0;var $i0=IJ(),Bo1=pY();class Oo1{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,$i0.deferred)(),this.yields=[],this.iterClosed=(0,$i0.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 Bo1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Bo1.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,$i0.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}}Lo1.QueuedIteratorImpl=Oo1});var Zi0=_((jo1)=>{Object.defineProperty(jo1,"__esModule",{value:!0});jo1.MuxSubscription=void 0;var Op6=Cw(),Eo1=pY();class zo1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,Op6.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 Eo1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Eo1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}jo1.MuxSubscription=zo1});var Xi0=_((To1)=>{Object.defineProperty(To1,"__esModule",{value:!0});To1.Heartbeat=void 0;var Lp6=IJ();class Ao1{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,Lp6.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})}}To1.Heartbeat=Ao1});var Gi0=_((Vo1)=>{Object.defineProperty(Vo1,"__esModule",{value:!0});Vo1.DenoBuffer=Vo1.MAX_SIZE=Vo1.AssertionError=void 0;Vo1.assert=qo1;Vo1.concat=Mo1;Vo1.append=Ep6;Vo1.readAll=zp6;Vo1.writeAll=jp6;var Dp6=nY();class Qi0 extends Error{constructor($){super($);this.name="AssertionError"}}Vo1.AssertionError=Qi0;function qo1($,Z="Assertion failed."){if(!$)throw new Qi0(Z)}var Io1=32768;Vo1.MAX_SIZE=4294967294;function XZ0($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function Mo1($,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 Ep6($,Z){return Mo1($,Uint8Array.of(Z))}class Yi0{_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($){qo1($<=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=XZ0(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(Dp6.TE.encode($))}write($){let Z=this._grow($.byteLength);return XZ0($,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)XZ0(this._buf.subarray(this._off),this._buf);else if(Q+$>Vo1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,Vo1.MAX_SIZE));XZ0(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,Vo1.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(Io1);while(!0){let Q=this.capacity-this.length<Io1,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}}}Vo1.DenoBuffer=Yi0;function zp6($){let Z=new Yi0;return Z.readFrom($),Z.bytes()}function jp6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Wi0=_((vo1)=>{Object.defineProperty(vo1,"__esModule",{value:!0});vo1.cc=vo1.State=vo1.Parser=vo1.Kind=void 0;vo1.describe=Mp6;var Ji0=Gi0(),Ki0=nY();vo1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function Mp6($){let Z,X="";switch($.kind){case vo1.Kind.MSG:Z="MSG";break;case vo1.Kind.OK:Z="OK";break;case vo1.Kind.ERR:Z="ERR",X=Ki0.TD.decode($.data);break;case vo1.Kind.PING:Z="PING";break;case vo1.Kind.PONG:Z="PONG";break;case vo1.Kind.INFO:Z="INFO",X=Ki0.TD.decode($.data)}return`${Z}: ${X}`}function So1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Co1=48,Vp6=57,Rb=67108864;class _o1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=vo1.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 vo1.State.OP_START:switch(X){case vo1.cc.M:case vo1.cc.m:this.state=vo1.State.OP_M,this.hdr=-1,this.ma=So1();break;case vo1.cc.H:case vo1.cc.h:this.state=vo1.State.OP_H,this.hdr=0,this.ma=So1();break;case vo1.cc.P:case vo1.cc.p:this.state=vo1.State.OP_P;break;case vo1.cc.PLUS:this.state=vo1.State.OP_PLUS;break;case vo1.cc.MINUS:this.state=vo1.State.OP_MINUS;break;case vo1.cc.I:case vo1.cc.i:this.state=vo1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_H:switch(X){case vo1.cc.M:case vo1.cc.m:this.state=vo1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_M:switch(X){case vo1.cc.S:case vo1.cc.s:this.state=vo1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MS:switch(X){case vo1.cc.G:case vo1.cc.g:this.state=vo1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MSG:switch(X){case vo1.cc.SPACE:case vo1.cc.TAB:this.state=vo1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MSG_SPC:switch(X){case vo1.cc.SPACE:case vo1.cc.TAB:continue;default:this.state=vo1.State.MSG_ARG,this.as=Z}break;case vo1.State.MSG_ARG:switch(X){case vo1.cc.CR:this.drop=1;break;case vo1.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=vo1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case vo1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:vo1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=vo1.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:vo1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=vo1.State.MSG_END;break;case vo1.State.MSG_END:switch(X){case vo1.cc.NL:this.drop=0,this.as=Z+1,this.state=vo1.State.OP_START;break;default:continue}break;case vo1.State.OP_PLUS:switch(X){case vo1.cc.O:case vo1.cc.o:this.state=vo1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PLUS_O:switch(X){case vo1.cc.K:case vo1.cc.k:this.state=vo1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PLUS_OK:switch(X){case vo1.cc.NL:this.dispatcher.push({kind:vo1.Kind.OK}),this.drop=0,this.state=vo1.State.OP_START;break}break;case vo1.State.OP_MINUS:switch(X){case vo1.cc.E:case vo1.cc.e:this.state=vo1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MINUS_E:switch(X){case vo1.cc.R:case vo1.cc.r:this.state=vo1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MINUS_ER:switch(X){case vo1.cc.R:case vo1.cc.r:this.state=vo1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MINUS_ERR:switch(X){case vo1.cc.SPACE:case vo1.cc.TAB:this.state=vo1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_MINUS_ERR_SPC:switch(X){case vo1.cc.SPACE:case vo1.cc.TAB:continue;default:this.state=vo1.State.MINUS_ERR_ARG,this.as=Z}break;case vo1.State.MINUS_ERR_ARG:switch(X){case vo1.cc.CR:this.drop=1;break;case vo1.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:vo1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=vo1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case vo1.State.OP_P:switch(X){case vo1.cc.I:case vo1.cc.i:this.state=vo1.State.OP_PI;break;case vo1.cc.O:case vo1.cc.o:this.state=vo1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PO:switch(X){case vo1.cc.N:case vo1.cc.n:this.state=vo1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PON:switch(X){case vo1.cc.G:case vo1.cc.g:this.state=vo1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PONG:switch(X){case vo1.cc.NL:this.dispatcher.push({kind:vo1.Kind.PONG}),this.drop=0,this.state=vo1.State.OP_START;break}break;case vo1.State.OP_PI:switch(X){case vo1.cc.N:case vo1.cc.n:this.state=vo1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PIN:switch(X){case vo1.cc.G:case vo1.cc.g:this.state=vo1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_PING:switch(X){case vo1.cc.NL:this.dispatcher.push({kind:vo1.Kind.PING}),this.drop=0,this.state=vo1.State.OP_START;break}break;case vo1.State.OP_I:switch(X){case vo1.cc.N:case vo1.cc.n:this.state=vo1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_IN:switch(X){case vo1.cc.F:case vo1.cc.f:this.state=vo1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_INF:switch(X){case vo1.cc.O:case vo1.cc.o:this.state=vo1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_INFO:switch(X){case vo1.cc.SPACE:case vo1.cc.TAB:this.state=vo1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case vo1.State.OP_INFO_SPC:switch(X){case vo1.cc.SPACE:case vo1.cc.TAB:continue;default:this.state=vo1.State.INFO_ARG,this.as=Z}break;case vo1.State.INFO_ARG:switch(X){case vo1.cc.CR:this.drop=1;break;case vo1.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:vo1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=vo1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===vo1.State.MSG_ARG||this.state===vo1.State.MINUS_ERR_ARG||this.state===vo1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Ji0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===vo1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Ji0.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 Ji0.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 vo1.cc.SPACE:case vo1.cc.TAB:case vo1.cc.CR:case vo1.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],Rb);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],Rb);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}: ${Ki0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case vo1.cc.SPACE:case vo1.cc.TAB:case vo1.cc.CR:case vo1.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],Rb),this.ma.size=this.protoParseInt(Z[3],Rb);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],Rb),this.ma.size=this.protoParseInt(Z[4],Rb);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]<Co1||$[Q]>Vp6)return-1;X=X*10+($[Q]-Co1)}return Z!==void 0&&X>Z?-1:X}}vo1.Parser=_o1;vo1.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};vo1.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 GZ0=_((fo1)=>{Object.defineProperty(fo1,"__esModule",{value:!0});fo1.MsgHdrsImpl=void 0;fo1.canonicalMIMEHeaderKey=Ui0;fo1.headers=Cp6;var xo1=nY(),qJ=Cw(),YZ0=pY();function Ui0($){let U=!0,N=Array($.length);for(let F=0;F<$.length;F++){let w=$.charCodeAt(F);if(w===58||w<33||w>126)throw YZ0.InvalidArgumentError.format("header",`'${$[F]}' is not a valid character in a header name`);if(U&&97<=w&&w<=122)w-=32;else if(!U&&65<=w&&w<=90)w+=32;N[F]=w,U=w==45}return String.fromCharCode(...N)}function Cp6($=0,Z=""){if($===0&&Z!=="")throw YZ0.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw YZ0.InvalidArgumentError.format("description","is required");return new Ib($,Z)}var Hi0="NATS/1.0";class Ib{_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 Ib,Q=xo1.TD.decode($).split(`\r
|
|
1337
1337
|
`),Y=Q[0];if(Y!==Hi0){let G=Y.replace(Hi0,"").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 $=Hi0;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
|