decocms 4.272.2 → 4.273.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-uy8fm5uL.js → AlertCircle-DA0HHE_4.js} +1 -1
- package/dist/client/assets/{AreaChart-Bx2w1DYH.js → AreaChart-BoFM7Y_U.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BpoQYmX-.js → ArrowLeft-BomaGH3Z.js} +1 -1
- package/dist/client/assets/{ArrowUp-B13V5WGQ.js → ArrowUp-fpl1nY5M.js} +1 -1
- package/dist/client/assets/{Check-C1O3YYVP.js → Check-CgEwgUZc.js} +1 -1
- package/dist/client/assets/{CheckCircle-KTMh1bww.js → CheckCircle-BfnTD9V2.js} +1 -1
- package/dist/client/assets/{ChevronDown-v6T15JWm.js → ChevronDown-WDSnQZIx.js} +1 -1
- package/dist/client/assets/{ChevronRight-CKIX_b26.js → ChevronRight-DVnjdYSw.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BTkElq6k.js → ChevronSelectorVertical-iWLF-7da.js} +1 -1
- package/dist/client/assets/{ChevronUp-Pc0kkNeh.js → ChevronUp-DD7w6qvp.js} +1 -1
- package/dist/client/assets/{Copy01-DAU98omo.js → Copy01-Cs_tyYYT.js} +1 -1
- package/dist/client/assets/{CreditCard01-jtFY7kEg.js → CreditCard01-WKNIsRwK.js} +1 -1
- package/dist/client/assets/{DotsVertical-j5lYfAff.js → DotsVertical-CwC6xcRZ.js} +1 -1
- package/dist/client/assets/{Download01-BPFVrVmQ.js → Download01-ObJjQ4GV.js} +1 -1
- package/dist/client/assets/{Eye-BBym3ptV.js → Eye-CH7TYKJz.js} +1 -1
- package/dist/client/assets/{FilterLines-f9sKuqYA.js → FilterLines-BvVaZ6M0.js} +1 -1
- package/dist/client/assets/{Globe01-lTI2wSSl.js → Globe01-jEYS04G7.js} +1 -1
- package/dist/client/assets/{Globe04-CbIARQ-Q.js → Globe04-CWMdvX9x.js} +1 -1
- package/dist/client/assets/{HardDrive-B6CWpiOP.js → HardDrive-23wEU78b.js} +1 -1
- package/dist/client/assets/{Key01-aA_W2FCe.js → Key01-BULDNBHZ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-yPEVH7Vh.js → LinkExternal01-Clj5x2_h.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-DXi5JAGM.js → LockUnlocked01-x_h1EQ6K.js} +1 -1
- package/dist/client/assets/{LogOut01-CRAOodrj.js → LogOut01-QUGLEnim.js} +1 -1
- package/dist/client/assets/{Monitor01-DSqVAgVl.js → Monitor01-D3KM04XD.js} +1 -1
- package/dist/client/assets/{Palette-CQQ-_4yk.js → Palette-B7SeIHT-.js} +1 -1
- package/dist/client/assets/{Play-BP8zVu5l.js → Play-fT-NfQU5.js} +1 -1
- package/dist/client/assets/{Plus-BobG9zOC.js → Plus-dncFLm_M.js} +1 -1
- package/dist/client/assets/{SearchLg-CshU-dZB.js → SearchLg-Ct-c5-1B.js} +1 -1
- package/dist/client/assets/{SearchMd-C8obkKNf.js → SearchMd-Eva5I0lR.js} +1 -1
- package/dist/client/assets/{Settings02-Dr8v95sb.js → Settings02-BrO-vBjP.js} +1 -1
- package/dist/client/assets/{Share07-Cv7Ln-dq.js → Share07-BbLZiAeC.js} +1 -1
- package/dist/client/assets/{Shield01-DUEVyKaG.js → Shield01-BVd-SZb6.js} +1 -1
- package/dist/client/assets/{Stars01-C9mABxrm.js → Stars01-DLkxnjl3.js} +1 -1
- package/dist/client/assets/{Stars02-DmoiftZE.js → Stars02-7tpY_HNP.js} +1 -1
- package/dist/client/assets/{Sun-B33ENh7b.js → Sun-ClE6wP-c.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CcobiJWv.js → SwitchHorizontal01-CHmpjQiM.js} +1 -1
- package/dist/client/assets/{Tool01-BWiulST8.js → Tool01-BUXFjeQh.js} +1 -1
- package/dist/client/assets/{Tool02-Dndaec6p.js → Tool02-DjXKAv6T.js} +1 -1
- package/dist/client/assets/{Trash01-7LMUjRez.js → Trash01-CspdqWBf.js} +1 -1
- package/dist/client/assets/{TrendUp01-Bl2Pch9m.js → TrendUp01-CNVb48hi.js} +1 -1
- package/dist/client/assets/{Upload01-i1ztLhZ8.js → Upload01-Cl8-CEgW.js} +1 -1
- package/dist/client/assets/{User01-Br8OmdzM.js → User01-CN2NzxA_.js} +1 -1
- package/dist/client/assets/{UserSquare-DV2Sj3UH.js → UserSquare-b82PVvAd.js} +1 -1
- package/dist/client/assets/{Users01-BRR4JDGJ.js → Users01-XFTS2dST.js} +1 -1
- package/dist/client/assets/{Users03-Dqf49Dm9.js → Users03-Bimguokg.js} +1 -1
- package/dist/client/assets/{XCircle-BtfCuIPn.js → XCircle-D9NCGMXH.js} +1 -1
- package/dist/client/assets/{XClose-DMf5AF8A.js → XClose-DONeM1Lx.js} +1 -1
- package/dist/client/assets/{YAxis-DWAPdSqZ.js → YAxis-BBMF8Byl.js} +1 -1
- package/dist/client/assets/{Zap-CpdmS69X.js → Zap-DxLtLoW7.js} +1 -1
- package/dist/client/assets/{ZapSquare-CDSVEXL3.js → ZapSquare-BUntBAoC.js} +1 -1
- package/dist/client/assets/{access-gate-ZQo9EC24.js → access-gate-DbkhKjzO.js} +1 -1
- package/dist/client/assets/{agent-icon-e0UWFas1.js → agent-icon-enqCot1p.js} +1 -1
- package/dist/client/assets/{agents-list-ntynRSsU.js → agents-list-DAzxRaek.js} +1 -1
- package/dist/client/assets/{ai-providers-DJ--N_lY.js → ai-providers-DxxMpD7m.js} +1 -1
- package/dist/client/assets/{alert-BXuYplH7.js → alert-D3QebRtv.js} +1 -1
- package/dist/client/assets/{alert-dialog-B46Q3R-O.js → alert-dialog-JjYa31qY.js} +1 -1
- package/dist/client/assets/{api-keys-BsgGK2sn.js → api-keys-CAJwVVkh.js} +1 -1
- package/dist/client/assets/{app-editor-CU9KqH-P.js → app-editor-C-zYqt8L.js} +1 -1
- package/dist/client/assets/{auth-Bs2O16yk.js → auth-CJDmwcnO.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dbla0VTS.js → auth-catchall-Bm6rkmLQ.js} +1 -1
- package/dist/client/assets/{auth-entry-CudpD2-V.js → auth-entry-DlQbZiJZ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D0O1lFqY.js → auth-split-layout-DNxVNJeX.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-C3fODE4r.js → authenticate-and-persist-oauth-BIiuhX01.js} +1 -1
- package/dist/client/assets/{automation-list-row-C3dRm69t.js → automation-list-row-Dc725NHW.js} +1 -1
- package/dist/client/assets/{automation-runs-CtQkmGTG.js → automation-runs-sYvBcCJ7.js} +1 -1
- package/dist/client/assets/{automations-NQBAyqmg.js → automations-CrhH-Zfs.js} +1 -1
- package/dist/client/assets/{avatar-DXGbmREV.js → avatar-ELscjbIy.js} +1 -1
- package/dist/client/assets/{badge-BOyAnazZ.js → badge-CRyGixe0.js} +1 -1
- package/dist/client/assets/{block-document-Bl5dfBkt.js → block-document-CR-4saFB.js} +1 -1
- package/dist/client/assets/{buckets-BfRdaIlc.js → buckets-Dsa73N2u.js} +1 -1
- package/dist/client/assets/{bulk-category-panel--w2Bqfj4.js → bulk-category-panel-9Me2vKRf.js} +1 -1
- package/dist/client/assets/{capability-load-error-tstCslox.js → capability-load-error-Di3HQkgl.js} +1 -1
- package/dist/client/assets/{cards-BPWtxmCd.js → cards-CiYMsBlV.js} +1 -1
- package/dist/client/assets/{category-editor-CB1DJtNo.js → category-editor-C77nz-Sr.js} +1 -1
- package/dist/client/assets/{chart-CHwYufmR.js → chart-BlY_Ql3Y.js} +1 -1
- package/dist/client/assets/{chat-context-BsUIroks.js → chat-context-CzDA21Cg.js} +1 -1
- package/dist/client/assets/{checkbox-CASMZ0iU.js → checkbox-BcEKZN9o.js} +1 -1
- package/dist/client/assets/{choose-editor-ntRSuRBk.js → choose-editor-mu1R2Y21.js} +1 -1
- package/dist/client/assets/{cli-auth-success-9PLbWNXf.js → cli-auth-success-DfFZpJ4P.js} +1 -1
- package/dist/client/assets/{collection-detail-BBJ6CxBs.js → collection-detail-CrmDLOv0.js} +1 -1
- package/dist/client/assets/{collection-display-button-Thrt0GaT.js → collection-display-button-D9NGRn6Z.js} +1 -1
- package/dist/client/assets/{collection-search-CRQ0RrfN.js → collection-search-CwRYz0pN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DgWWUsxr.js → collection-table-wrapper-D3nisvNa.js} +1 -1
- package/dist/client/assets/{collection-tabs-5dHuKa9J.js → collection-tabs-GN5FUfmk.js} +1 -1
- package/dist/client/assets/{command-CvZrruGa.js → command-B-zehPyM.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-eVUvGSnX.js → commerce-onboarding-Ct40pBoQ.js} +1 -1
- package/dist/client/assets/{connect-D8jzmaDm.js → connect-9dejsLeH.js} +1 -1
- package/dist/client/assets/{connection-CfcD6sVT.js → connection-BLzu-_kL.js} +1 -1
- package/dist/client/assets/{connection-card-Dj7Uza34.js → connection-card-DOgD1o2p.js} +1 -1
- package/dist/client/assets/{connection-detail-DxosbAJr.js → connection-detail-hThWrntF.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BX9f4hKs.js → connection-form-helpers-DTQL2LuC.js} +1 -1
- package/dist/client/assets/{connections-CB4CpLsk.js → connections-C8GCA7s_.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CkSJtjMz.js → decopilot-sse-pool-CzxAtTSg.js} +1 -1
- package/dist/client/assets/{dialog-DkVA5A9U.js → dialog-BAPSYC44.js} +1 -1
- package/dist/client/assets/{domain-settings-OG4Eq-TY.js → domain-settings-BG9-gP3a.js} +1 -1
- package/dist/client/assets/{drawer-CRq-hl5D.js → drawer-DMSPb5bF.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BP8PfAqT.js → dropdown-menu-CeY5D4I_.js} +1 -1
- package/dist/client/assets/{empty-state-BImKJ-1D.js → empty-state-DykoeJL9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D-L6iZeF.js → extract-connection-data-QrQ6x2ha.js} +1 -1
- package/dist/client/assets/{file-explorer-DMwOWEC2.js → file-explorer-CMaotIXv.js} +1 -1
- package/dist/client/assets/{file-type-icon-BgtW054a.js → file-type-icon-CKD2fNrm.js} +1 -1
- package/dist/client/assets/{form-Dexb9RAJ.js → form-CEoONn37.js} +1 -1
- package/dist/client/assets/{general-1RPr1q3J.js → general-kY_fptjk.js} +1 -1
- package/dist/client/assets/{github-repo-picker-D9crLFWT.js → github-repo-picker-CDqFbKPy.js} +1 -1
- package/dist/client/assets/{hooks-BGDPuHWi.js → hooks-aUduqTiV.js} +1 -1
- package/dist/client/assets/{index-L9bZkktk.js → index-B1ZIOc5B.js} +1 -1
- package/dist/client/assets/{index-B35hk5m2.js → index-BR__ZRsJ.js} +1 -1
- package/dist/client/assets/{index-lEB0sZhz.js → index-BUJwO83m.js} +5 -5
- package/dist/client/assets/{index-C4zbS5ys.js → index-Btqo9dDu.js} +1 -1
- package/dist/client/assets/{index-BM6ZmzFS.js → index-CL1MOD5T.js} +3 -3
- package/dist/client/assets/{index-BO-Rh4FS.js → index-Cg7iR241.js} +1 -1
- package/dist/client/assets/{index-DJ2RqJi4.js → index-ChfStVP2.js} +1 -1
- package/dist/client/assets/{index-BKwHiZwW.js → index-ClxNQRu1.js} +1 -1
- package/dist/client/assets/{index-DRYKEG9_.js → index-D5F2Zx4v.js} +1 -1
- package/dist/client/assets/{index-redirect-C35avYyY.js → index-redirect-C6EkgInJ.js} +1 -1
- package/dist/client/assets/{index-CQS7qKEo.js → index-zEo3R2pe.js} +1 -1
- package/dist/client/assets/{infra-billing-V5WuKSFt.js → infra-billing-BGTGsikp.js} +1 -1
- package/dist/client/assets/{input-CGWM8Gl1.js → input-D6YuYRZe.js} +1 -1
- package/dist/client/assets/{integration-icon-erD4OqjD.js → integration-icon-BCBOPtqS.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C5mxFf6K.js → invite-member-dialog-DC7whaOW.js} +1 -1
- package/dist/client/assets/{label-Cwe96a6t.js → label-5KUxAu9u.js} +1 -1
- package/dist/client/assets/{layout-DO2-_xhn.js → layout-C-eddKLP.js} +1 -1
- package/dist/client/assets/{login-CvAncYDT.js → login-B0gqsMtA.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DVS5w90O.js → mcp-oauth-DOLRJjO7.js} +1 -1
- package/dist/client/assets/{members-nqcMhEFP.js → members-CgqUef7X.js} +1 -1
- package/dist/client/assets/{monaco-editor-BdtjGGwr.js → monaco-editor-B4-phYzT.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CXEzGyUQ.js → monitoring-stats-row-CYy5g2C9.js} +1 -1
- package/dist/client/assets/{multi-select-CCBIOv7Q.js → multi-select-BoUzGIoC.js} +1 -1
- package/dist/client/assets/{oauth-callback-BehjxOrP.js → oauth-callback-B0-qXhlT.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CxurjExA.js → oauth-callback-ai-provider-CDWYgYMx.js} +1 -1
- package/dist/client/assets/{onboarding-CdCwudiT.js → onboarding-DbmL_ITs.js} +1 -1
- package/dist/client/assets/{org-layout-cPxt4ZkG.js → org-layout-d72zKtqJ.js} +1 -1
- package/dist/client/assets/{organization-choice-Cfp77ZgZ.js → organization-choice-CeFmMss4.js} +1 -1
- package/dist/client/assets/{orgs-CrnO2VyW.js → orgs-DPdpMVno.js} +1 -1
- package/dist/client/assets/{page-seo-form-DtaVlOks.js → page-seo-form-D4tilKSE.js} +1 -1
- package/dist/client/assets/{popover-CA-qKtY0.js → popover-CuPbjEi-.js} +1 -1
- package/dist/client/assets/{post-calendar-DbeWi4dR.js → post-calendar-gGnLQCMX.js} +1 -1
- package/dist/client/assets/{post-editor-CQn3QY-n.js → post-editor-DBF18tyf.js} +1 -1
- package/dist/client/assets/{primitives-9kcLMOOc.js → primitives-BiwvUolJ.js} +1 -1
- package/dist/client/assets/{profile-BbZeeDRM.js → profile-BmDqSIBp.js} +1 -1
- package/dist/client/assets/{project-app-view-D1EHG8AR.js → project-app-view-PQbGOyiE.js} +1 -1
- package/dist/client/assets/record-editor-dhpvBWP3.js +1 -0
- package/dist/client/assets/{redirect-editor-r1RjIwZl.js → redirect-editor-D1tPIlnL.js} +1 -1
- package/dist/client/assets/registry-CLvXZHL_.js +2 -0
- package/dist/client/assets/{registry-layout-CK9cpIpg.js → registry-layout-C_8AOsBc.js} +1 -1
- package/dist/client/assets/{reports-C3eaHiYY.js → reports-CfsaH35R.js} +1 -1
- package/dist/client/assets/{require-capability-CXdewBUK.js → require-capability-C2ZXOLj4.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DnMKxz5A.js → required-auth-layout-B-Bj1b82.js} +1 -1
- package/dist/client/assets/{reset-password-D2t5iCn1.js → reset-password-bzvlKH68.js} +1 -1
- package/dist/client/assets/{roles-CJJK5OO6.js → roles-BnM4yZgZ.js} +1 -1
- package/dist/client/assets/{search-input-BlwPLrw-.js → search-input-6cTC9T3y.js} +1 -1
- package/dist/client/assets/{secrets-CnwVp_5W.js → secrets-DRLVUs8P.js} +1 -1
- package/dist/client/assets/{sections-editor-C2YyrdDs.js → sections-editor-CUC7GotI.js} +1 -1
- package/dist/client/assets/{select-model-BXiTi3lj.js → select-model-DYdISD36.js} +1 -1
- package/dist/client/assets/{select-pkt6m39h.js → select-zMJiMADM.js} +1 -1
- package/dist/client/assets/{self-tool-result-B-4jOu4Z.js → self-tool-result-DLa7ivek.js} +1 -1
- package/dist/client/assets/{seo-editor-JWdqHf-g.js → seo-editor-C2e63I1V.js} +1 -1
- package/dist/client/assets/{settings-layout-Cu9-rj_M.js → settings-layout-ik5y4AvR.js} +1 -1
- package/dist/client/assets/{shell-controls-DVHQYeHI.js → shell-controls-AWCVQIoS.js} +1 -1
- package/dist/client/assets/{shell-layout-BIr4am4J.js → shell-layout-7Xdfigj0.js} +1 -1
- package/dist/client/assets/{spinner-IpkeNj-o.js → spinner-C5BV_v7J.js} +1 -1
- package/dist/client/assets/{sso-CcqCfw0Q.js → sso-BHi1efAN.js} +1 -1
- package/dist/client/assets/{store-DR7dFGvM.js → store-DqJ3ShWC.js} +1 -1
- package/dist/client/assets/store-registry-BnmIVxUh.js +2 -0
- package/dist/client/assets/{switch-CSeOgmoy.js → switch-CSn35JcM.js} +1 -1
- package/dist/client/assets/{synced-repos-sawTEigN.js → synced-repos-B91Uy-k7.js} +1 -1
- package/dist/client/assets/{tab-id-Bu159uEj.js → tab-id-D8yjQ-2W.js} +1 -1
- package/dist/client/assets/{table-ny71vL5y.js → table-CxonyU3I.js} +1 -1
- package/dist/client/assets/{tabs-Dx-VW08N.js → tabs-Tdg9_6T9.js} +1 -1
- package/dist/client/assets/{tasks-B-UrQyVC.js → tasks-vBLgAxmB.js} +1 -1
- package/dist/client/assets/{textarea-Cn322LbX.js → textarea-CbQMd7s7.js} +1 -1
- package/dist/client/assets/{toggle-group-DGnmDdR2.js → toggle-group-JSaPqco6.js} +1 -1
- package/dist/client/assets/{toolbar-PllDBpQK.js → toolbar-DNB3XbNp.js} +1 -1
- package/dist/client/assets/{track-DAkxD0n_.js → track-DJ9n-eXH.js} +1 -1
- package/dist/client/assets/{types-CWBuoZ3j.js → types-DVaP4ziG.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CdzYCmNn.js → use-ai-providers-CPgIEeaM.js} +1 -1
- package/dist/client/assets/{use-api-keys-CkSNIDqn.js → use-api-keys-Wa9WQJ9M.js} +1 -1
- package/dist/client/assets/{use-automations-BsoK4Mcl.js → use-automations-vCpJk76Q.js} +1 -1
- package/dist/client/assets/{use-autosave-DxeGpOkv.js → use-autosave-BuOoyEl8.js} +1 -1
- package/dist/client/assets/{use-clock-tick-52uZ-ASa.js → use-clock-tick-C9bzB47F.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-Yxf6gC0s.js → use-commerce-diagnostic-B8Pyo7eQ.js} +1 -1
- package/dist/client/assets/{use-connection-CO66I1Vi.js → use-connection-CwOj7HpX.js} +1 -1
- package/dist/client/assets/{use-copy-CPTC2GNt.js → use-copy-3LmTB60K.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DAM0GMhA.js → use-create-virtual-mcp-Czlaqr-j.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BCrUDrPT.js → use-debounced-autosave-CMri9Uxl.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DMBSjfST.js → use-debounced-value-CFSGh2gv.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dh2pwaZB.js → use-decopilot-events-BpcOsOAo.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DXXNp0oT.js → use-delete-connection-o3p6j17X.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DNAzPd6i.js → use-deployment-admin-DRFWrnrl.js} +1 -1
- package/dist/client/assets/{use-file-configs-CsogxuOx.js → use-file-configs-CspJUVE_.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cpox4VKN.js → use-infinite-scroll-Cm3NRfHD.js} +1 -1
- package/dist/client/assets/{use-join-requests-CO_swPD4.js → use-join-requests-BYx2lvhB.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D76Wzuoy.js → use-mcp-client-S4GMK3TK.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DPr7_eDi.js → use-mcp-tools-DO6xzYBO.js} +1 -1
- package/dist/client/assets/{use-members-DEFQNL5s.js → use-members-BZ0dURIo.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-dA9aDm5_.js → use-navigate-to-agent-FNgAgXvc.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DWf1rkdL.js → use-org-auth-client-NcJ1ALUx.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-u8zzHhVK.js → use-org-repo-syncs-S0GWjcOF.js} +1 -1
- package/dist/client/assets/{use-org-sso-BUm_moTp.js → use-org-sso-CpngLo4r.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C-6yyooR.js → use-organization-roles-BlvBQrFm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C2H0iVjp.js → use-organization-settings-_ZfqRUWi.js} +1 -1
- package/dist/client/assets/{use-registry-connections-N-HdMvMd.js → use-registry-connections-zt3wPupK.js} +1 -1
- package/dist/client/assets/{use-secrets-BFkCeLO4.js → use-secrets-CBjixC4q.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BQ1qnRh4.js → use-section-preview-base-DIwEZCnG.js} +1 -1
- package/dist/client/assets/{use-status-sounds-ACper2wO.js → use-status-sounds-DT2gniZA.js} +1 -1
- package/dist/client/assets/{use-tags-BuvNWhev.js → use-tags-DeIQGfk5.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DqzOLqH1.js → use-task-board-items-CM2d6Csw.js} +1 -1
- package/dist/client/assets/{use-view-mode-BZkBuQQd.js → use-view-mode-DPTfvDI0.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-4P119gUj.js → use-virtual-mcp-CHwTQjix.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dj9TxWJ5.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DvWGomgu.js +1 -0
- package/dist/client/assets/{users-CZQTE6EE.js → users-3vou9jvw.js} +1 -1
- package/dist/client/assets/{variant-calendar-BEasF8pF.js → variant-calendar-BabI3Xuh.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BNRHAudB.js → view-mode-toggle-DwUJhV8t.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-C0D5oSC0.js +0 -1
- package/dist/client/assets/registry-DI2VSACa.js +0 -2
- package/dist/client/assets/store-registry-BABEi8xj.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DMfJlfxk.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Boh1yBmT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,b as Q,r as Z,j as o,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-BM6ZmzFS.js";import{w as gt,ae as at,aS as bt}from"./agent-icon-e0UWFas1.js";import{i as vt}from"./ChevronRight-CKIX_b26.js";import{L as yt}from"./label-Cwe96a6t.js";import{S as lt}from"./use-clock-tick-52uZ-ASa.js";import{S as jt}from"./switch-CSeOgmoy.js";import{V as Tt}from"./view-mode-toggle-BNRHAudB.js";import{bR as ct,bS as mt,bT as Nt,bU as _t,bV as kt,bW as U,bX as wt}from"./index-lEB0sZhz.js";import"./AlertCircle-uy8fm5uL.js";import"./Tool01-BWiulST8.js";import"./ArrowUp-B13V5WGQ.js";import"./ArrowLeft-BpoQYmX-.js";import"./Tool02-Dndaec6p.js";import"./XCircle-BtfCuIPn.js";import"./TrendUp01-Bl2Pch9m.js";import"./ZapSquare-CDSVEXL3.js";import"./Users03-Dqf49Dm9.js";import"./CheckCircle-KTMh1bww.js";import"./Check-C1O3YYVP.js";import"./ChevronDown-v6T15JWm.js";import"./ChevronSelectorVertical-BTkElq6k.js";import"./ChevronUp-Pc0kkNeh.js";import"./DotsVertical-j5lYfAff.js";import"./Stars02-DmoiftZE.js";import"./UserSquare-DV2Sj3UH.js";import"./Copy01-DAU98omo.js";import"./CreditCard01-jtFY7kEg.js";import"./Download01-BPFVrVmQ.js";import"./Settings02-Dr8v95sb.js";import"./Eye-BBym3ptV.js";import"./FilterLines-f9sKuqYA.js";import"./Share07-Cv7Ln-dq.js";import"./Globe01-lTI2wSSl.js";import"./Globe04-CbIARQ-Q.js";import"./SwitchHorizontal01-CcobiJWv.js";import"./HardDrive-B6CWpiOP.js";import"./Key01-aA_W2FCe.js";import"./LinkExternal01-yPEVH7Vh.js";import"./LockUnlocked01-DXi5JAGM.js";import"./LogOut01-CRAOodrj.js";import"./Monitor01-DSqVAgVl.js";import"./Sun-B33ENh7b.js";import"./Palette-CQQ-_4yk.js";import"./Play-BP8zVu5l.js";import"./Plus-BobG9zOC.js";import"./SearchLg-CshU-dZB.js";import"./SearchMd-C8obkKNf.js";import"./Shield01-DUEVyKaG.js";import"./Stars01-C9mABxrm.js";import"./Trash01-7LMUjRez.js";import"./Upload01-i1ztLhZ8.js";import"./User01-Br8OmdzM.js";import"./Users01-BRR4JDGJ.js";import"./XClose-DMf5AF8A.js";import"./Zap-CpdmS69X.js";import"./select-pkt6m39h.js";import"./chat-context-BsUIroks.js";import"./tab-id-Bu159uEj.js";import"./dialog-DkVA5A9U.js";import"./session-runtime-wVXsCwcJ.js";import"./hooks-BGDPuHWi.js";import"./use-mcp-client-D76Wzuoy.js";import"./constants-z9Iog-sb.js";import"./auth-Bs2O16yk.js";import"./decopilot-sse-pool-CkSJtjMz.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-4P119gUj.js";import"./use-ai-providers-CdzYCmNn.js";import"./use-decopilot-events-Dh2pwaZB.js";import"./use-organization-settings-C2H0iVjp.js";import"./automation-runs-CtQkmGTG.js";import"./useInfiniteQuery-DMfJlfxk.js";import"./use-infinite-scroll-Cpox4VKN.js";import"./use-connection-CO66I1Vi.js";import"./table-ny71vL5y.js";import"./empty-state-BImKJ-1D.js";import"./use-members-DEFQNL5s.js";import"./use-org-auth-client-DWf1rkdL.js";import"./use-automations-BsoK4Mcl.js";import"./useSuspenseInfiniteQuery-Boh1yBmT.js";import"./avatar-DXGbmREV.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CPTC2GNt.js";import"./monaco-editor-BdtjGGwr.js";import"./spinner-IpkeNj-o.js";import"./types-CWBuoZ3j.js";import"./shell-layout-BIr4am4J.js";import"./required-auth-layout-DnMKxz5A.js";import"./use-org-sso-BUm_moTp.js";import"./integration-icon-erD4OqjD.js";import"./use-navigate-to-agent-dA9aDm5_.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-CHwYufmR.js";import"./index-L9bZkktk.js";import"./form-Dexb9RAJ.js";import"./input-CGWM8Gl1.js";import"./file-type-icon-BgtW054a.js";import"./drawer-CRq-hl5D.js";import"./collection-search-CRQ0RrfN.js";import"./tabs-Dx-VW08N.js";import"./toggle-group-DGnmDdR2.js";import"./use-commerce-diagnostic-Yxf6gC0s.js";import"./popover-CA-qKtY0.js";import"./self-tool-result-B-4jOu4Z.js";import"./alert-dialog-B46Q3R-O.js";import"./extract-connection-data-D-L6iZeF.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DMBSjfST.js";import"./authenticate-and-persist-oauth-C3fODE4r.js";import"./mcp-oauth-DVS5w90O.js";import"./track-DAkxD0n_.js";import"./toolbar-PllDBpQK.js";import"./github-repo-picker-D9crLFWT.js";import"./use-mcp-tools-DPr7_eDi.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-Dj7Uza34.js";import"./use-registry-connections-N-HdMvMd.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-Cn322LbX.js";import"./connection-form-helpers-BX9f4hKs.js";import"./collection-tabs-5dHuKa9J.js";import"./badge-BOyAnazZ.js";import"./command-CvZrruGa.js";import"./index-B35hk5m2.js";import"./select-model-BXiTi3lj.js";import"./checkbox-CASMZ0iU.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-BPWtxmCd.js";import"./dropdown-menu-BP8PfAqT.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-ACper2wO.js";import"./use-file-configs-CsogxuOx.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-BCrUDrPT.js";import"./search-input-BlwPLrw-.js";import"./index-DRYKEG9_.js";import"./use-secrets-BFkCeLO4.js";import"./AreaChart-Bx2w1DYH.js";import"./use-task-board-items-DqzOLqH1.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-BuvNWhev.js";import"./task-key-BCHdFiOO.js";import"./automation-list-row-C3dRm69t.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-u8zzHhVK.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Rt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Lt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,n=typeof t=="string",s=typeof r=="string";if(!n&&!s)return null;const i=n?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||n&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!n,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const n=Lt(e);n&&t.push(n);return}if(St.has(r)){const n=e.matchers;if(Array.isArray(n))for(const s of n)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];typeof n=="number"?t.length>0?t[t.length-1]+=`[${n}]`:t.push(`[${n}]`):t.push(n)}return t.join(" · ")}function J(e,t,r,n,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(n);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&J(m.value,t,r,[...n,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)J(e[i],t,r,[...n,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&J(a,t,r,[...n,i],s)}function Vt(e){if(!e)return[];const t=[];for(const[r,n]of Object.entries(e))J(n,r,Rt(r),[],t);return t.sort((r,n)=>r.start.getTime()-n.start.getTime())}function It(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((n,s)=>{const i=s*137.508%360;r.set(n,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const nt=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):nt.format(e.start),n=e.openEnd?t("sandbox.variantCalendar.ongoing"):nt.format(e.end);return`${r} → ${n}`}function Ft(e){const t=K.c(18),{variant:r}=e,n=Q();let s;t[0]!==r.blockLabel?(s=o.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==n||t[9]!==r?(c=Bt(r,n),t[8]=n,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=o.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=o.jsx(xt,{children:o.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const ot=16;function zt(e,t){const r=e?"transparent":"#000 0",n=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${ot}px, #000 calc(100% - ${ot}px), ${n})`}function ft(e){const t=K.c(26),{variant:r,color:n,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==n.bg||t[10]!==n.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:n.bg,color:n.text,borderRadius:4,...f,...g,...u,...s},t[9]=n.bg,t[10]=n.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=o.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=o.jsx(ut,{asChild:!0,children:o.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=o.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=o.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Kn(e){const t=K.c(72),{decofile:r}=e,n=Q(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==n?(v=n("sandbox.variantCalendar.today"),t[10]=n,t[11]=v):v=t[11];let y;t[12]!==v?(y=o.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==n?(N=n("sandbox.variantCalendar.previous"),t[14]=n,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=o.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==n?(k=n("sandbox.variantCalendar.next"),t[20]=n,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=o.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const R=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==R||t[29]!==M?(w=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",M]}),t[28]=R,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=o.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let L;t[36]!==p||t[37]!==l||t[38]!==n?(L=p>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),o.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:n("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=n,t[39]=L):L=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=o.jsx(at,{}),t[40]=B):B=t[40];let I;t[41]!==n?(I=n("sandbox.variantCalendar.calendarMode"),t[41]=n,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:B,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=o.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==n?(D=n("sandbox.variantCalendar.timelineMode"),t[46]=n,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=o.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==L||t[57]!==H?(z=o.jsxs("div",{className:"flex items-center gap-4",children:[L,H]}),t[56]=L,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?o.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?o.jsx(qt,{monthStart:a,variants:f,colorMap:g}):o.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let X;return t[69]!==W||t[70]!==G?(X=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=X):X=t[71],X}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,n=r===void 0?0:r,s=Q();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==s?(a=o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,n>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:n})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=n,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Xt=6;function qt(e){const t=K.c(17),{monthStart:r,variants:n,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==n){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Qt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,n),E=b.reduce(Jt,0),T=st+E*(et+it)+8;return o.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return o.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:o.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return o.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Xt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=o.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=o.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Jt(e,t){return Math.max(e,t.lane+1)}function Qt(e){return o.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const q=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:n,colorMap:s}=e,i=r,a=U(r,q),c=new Date,l=new Map;for(const w of n){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(ne),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:q},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=Q(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=o.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=o.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=o.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&o.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:o.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,L]=w,B=dt(s,j),I=L[0]?.blockLabel??j;return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:o.jsx("div",{className:"px-3 truncate",style:{width:Y},children:I})}),L.map((S,F)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),H=h(new Date(O))-P;return o.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let R;t[16]!==k||t[17]!==C||t[18]!==$?(R=o.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=R):R=t[19];let M;return t[20]!==b||t[21]!==R?(M=o.jsx(b,{className:E,children:R}),t[20]=b,t[21]=R,t[22]=M):M=t[22],M}function ee(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return o.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function ne(e,t){return e[0].localeCompare(t[0])}export{Kn as VariantCalendar};
|
|
1
|
+
import{c as K,b as Q,r as Z,j as o,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-CL1MOD5T.js";import{w as gt,ae as at,aS as bt}from"./agent-icon-enqCot1p.js";import{i as vt}from"./ChevronRight-DVnjdYSw.js";import{L as yt}from"./label-5KUxAu9u.js";import{S as lt}from"./use-clock-tick-C9bzB47F.js";import{S as jt}from"./switch-CSn35JcM.js";import{V as Tt}from"./view-mode-toggle-DwUJhV8t.js";import{bR as ct,bS as mt,bT as Nt,bU as _t,bV as kt,bW as U,bX as wt}from"./index-BUJwO83m.js";import"./AlertCircle-DA0HHE_4.js";import"./Tool01-BUXFjeQh.js";import"./ArrowUp-fpl1nY5M.js";import"./ArrowLeft-BomaGH3Z.js";import"./Tool02-DjXKAv6T.js";import"./XCircle-D9NCGMXH.js";import"./TrendUp01-CNVb48hi.js";import"./ZapSquare-BUntBAoC.js";import"./Users03-Bimguokg.js";import"./CheckCircle-BfnTD9V2.js";import"./Check-CgEwgUZc.js";import"./ChevronDown-WDSnQZIx.js";import"./ChevronSelectorVertical-iWLF-7da.js";import"./ChevronUp-DD7w6qvp.js";import"./DotsVertical-CwC6xcRZ.js";import"./Stars02-7tpY_HNP.js";import"./UserSquare-b82PVvAd.js";import"./Copy01-Cs_tyYYT.js";import"./CreditCard01-WKNIsRwK.js";import"./Download01-ObJjQ4GV.js";import"./Settings02-BrO-vBjP.js";import"./Eye-CH7TYKJz.js";import"./FilterLines-BvVaZ6M0.js";import"./Share07-BbLZiAeC.js";import"./Globe01-jEYS04G7.js";import"./Globe04-CWMdvX9x.js";import"./SwitchHorizontal01-CHmpjQiM.js";import"./HardDrive-23wEU78b.js";import"./Key01-BULDNBHZ.js";import"./LinkExternal01-Clj5x2_h.js";import"./LockUnlocked01-x_h1EQ6K.js";import"./LogOut01-QUGLEnim.js";import"./Monitor01-D3KM04XD.js";import"./Sun-ClE6wP-c.js";import"./Palette-B7SeIHT-.js";import"./Play-fT-NfQU5.js";import"./Plus-dncFLm_M.js";import"./SearchLg-Ct-c5-1B.js";import"./SearchMd-Eva5I0lR.js";import"./Shield01-BVd-SZb6.js";import"./Stars01-DLkxnjl3.js";import"./Trash01-CspdqWBf.js";import"./Upload01-Cl8-CEgW.js";import"./User01-CN2NzxA_.js";import"./Users01-XFTS2dST.js";import"./XClose-DONeM1Lx.js";import"./Zap-DxLtLoW7.js";import"./select-zMJiMADM.js";import"./chat-context-CzDA21Cg.js";import"./tab-id-D8yjQ-2W.js";import"./dialog-BAPSYC44.js";import"./session-runtime-wVXsCwcJ.js";import"./hooks-aUduqTiV.js";import"./use-mcp-client-S4GMK3TK.js";import"./constants-z9Iog-sb.js";import"./auth-CJDmwcnO.js";import"./decopilot-sse-pool-CzxAtTSg.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-CHwTQjix.js";import"./use-ai-providers-CPgIEeaM.js";import"./use-decopilot-events-BpcOsOAo.js";import"./use-organization-settings-_ZfqRUWi.js";import"./automation-runs-sYvBcCJ7.js";import"./useInfiniteQuery-Dj9TxWJ5.js";import"./use-infinite-scroll-Cm3NRfHD.js";import"./use-connection-CwOj7HpX.js";import"./table-CxonyU3I.js";import"./empty-state-DykoeJL9.js";import"./use-members-BZ0dURIo.js";import"./use-org-auth-client-NcJ1ALUx.js";import"./use-automations-vCpJk76Q.js";import"./useSuspenseInfiniteQuery-DvWGomgu.js";import"./avatar-ELscjbIy.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-3LmTB60K.js";import"./monaco-editor-B4-phYzT.js";import"./spinner-C5BV_v7J.js";import"./types-DVaP4ziG.js";import"./shell-layout-7Xdfigj0.js";import"./required-auth-layout-B-Bj1b82.js";import"./use-org-sso-CpngLo4r.js";import"./integration-icon-BCBOPtqS.js";import"./use-navigate-to-agent-FNgAgXvc.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-BlY_Ql3Y.js";import"./index-B1ZIOc5B.js";import"./form-CEoONn37.js";import"./input-D6YuYRZe.js";import"./file-type-icon-CKD2fNrm.js";import"./drawer-DMSPb5bF.js";import"./collection-search-CwRYz0pN.js";import"./tabs-Tdg9_6T9.js";import"./toggle-group-JSaPqco6.js";import"./use-commerce-diagnostic-B8Pyo7eQ.js";import"./popover-CuPbjEi-.js";import"./self-tool-result-DLa7ivek.js";import"./alert-dialog-JjYa31qY.js";import"./extract-connection-data-QrQ6x2ha.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-CFSGh2gv.js";import"./authenticate-and-persist-oauth-BIiuhX01.js";import"./mcp-oauth-DOLRJjO7.js";import"./track-DJ9n-eXH.js";import"./toolbar-DNB3XbNp.js";import"./github-repo-picker-CDqFbKPy.js";import"./use-mcp-tools-DO6xzYBO.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-DOgD1o2p.js";import"./use-registry-connections-zt3wPupK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CbQMd7s7.js";import"./connection-form-helpers-DTQL2LuC.js";import"./collection-tabs-GN5FUfmk.js";import"./badge-CRyGixe0.js";import"./command-B-zehPyM.js";import"./index-BR__ZRsJ.js";import"./select-model-DYdISD36.js";import"./checkbox-BcEKZN9o.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-CiYMsBlV.js";import"./dropdown-menu-CeY5D4I_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DT2gniZA.js";import"./use-file-configs-CspJUVE_.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-CMri9Uxl.js";import"./search-input-6cTC9T3y.js";import"./index-D5F2Zx4v.js";import"./use-secrets-CBjixC4q.js";import"./AreaChart-BoFM7Y_U.js";import"./use-task-board-items-CM2d6Csw.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-DeIQGfk5.js";import"./task-key-BCHdFiOO.js";import"./automation-list-row-Dc725NHW.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-S0GWjcOF.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Rt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Lt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,n=typeof t=="string",s=typeof r=="string";if(!n&&!s)return null;const i=n?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||n&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!n,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const n=Lt(e);n&&t.push(n);return}if(St.has(r)){const n=e.matchers;if(Array.isArray(n))for(const s of n)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];typeof n=="number"?t.length>0?t[t.length-1]+=`[${n}]`:t.push(`[${n}]`):t.push(n)}return t.join(" · ")}function J(e,t,r,n,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(n);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&J(m.value,t,r,[...n,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)J(e[i],t,r,[...n,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&J(a,t,r,[...n,i],s)}function Vt(e){if(!e)return[];const t=[];for(const[r,n]of Object.entries(e))J(n,r,Rt(r),[],t);return t.sort((r,n)=>r.start.getTime()-n.start.getTime())}function It(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((n,s)=>{const i=s*137.508%360;r.set(n,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const nt=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):nt.format(e.start),n=e.openEnd?t("sandbox.variantCalendar.ongoing"):nt.format(e.end);return`${r} → ${n}`}function Ft(e){const t=K.c(18),{variant:r}=e,n=Q();let s;t[0]!==r.blockLabel?(s=o.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==n||t[9]!==r?(c=Bt(r,n),t[8]=n,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=o.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=o.jsx(xt,{children:o.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const ot=16;function zt(e,t){const r=e?"transparent":"#000 0",n=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${ot}px, #000 calc(100% - ${ot}px), ${n})`}function ft(e){const t=K.c(26),{variant:r,color:n,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==n.bg||t[10]!==n.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:n.bg,color:n.text,borderRadius:4,...f,...g,...u,...s},t[9]=n.bg,t[10]=n.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=o.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=o.jsx(ut,{asChild:!0,children:o.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=o.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=o.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Kn(e){const t=K.c(72),{decofile:r}=e,n=Q(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==n?(v=n("sandbox.variantCalendar.today"),t[10]=n,t[11]=v):v=t[11];let y;t[12]!==v?(y=o.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==n?(N=n("sandbox.variantCalendar.previous"),t[14]=n,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=o.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==n?(k=n("sandbox.variantCalendar.next"),t[20]=n,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=o.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const R=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==R||t[29]!==M?(w=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",M]}),t[28]=R,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=o.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let L;t[36]!==p||t[37]!==l||t[38]!==n?(L=p>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),o.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:n("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=n,t[39]=L):L=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=o.jsx(at,{}),t[40]=B):B=t[40];let I;t[41]!==n?(I=n("sandbox.variantCalendar.calendarMode"),t[41]=n,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:B,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=o.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==n?(D=n("sandbox.variantCalendar.timelineMode"),t[46]=n,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=o.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==L||t[57]!==H?(z=o.jsxs("div",{className:"flex items-center gap-4",children:[L,H]}),t[56]=L,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?o.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?o.jsx(qt,{monthStart:a,variants:f,colorMap:g}):o.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let X;return t[69]!==W||t[70]!==G?(X=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=X):X=t[71],X}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,n=r===void 0?0:r,s=Q();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==s?(a=o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,n>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:n})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=n,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Xt=6;function qt(e){const t=K.c(17),{monthStart:r,variants:n,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==n){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Qt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,n),E=b.reduce(Jt,0),T=st+E*(et+it)+8;return o.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return o.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:o.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return o.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Xt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=o.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=o.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Jt(e,t){return Math.max(e,t.lane+1)}function Qt(e){return o.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const q=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:n,colorMap:s}=e,i=r,a=U(r,q),c=new Date,l=new Map;for(const w of n){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(ne),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:q},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=Q(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=o.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=o.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=o.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&o.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:o.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,L]=w,B=dt(s,j),I=L[0]?.blockLabel??j;return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:o.jsx("div",{className:"px-3 truncate",style:{width:Y},children:I})}),L.map((S,F)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),H=h(new Date(O))-P;return o.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let R;t[16]!==k||t[17]!==C||t[18]!==$?(R=o.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=R):R=t[19];let M;return t[20]!==b||t[21]!==R?(M=o.jsx(b,{className:E,children:R}),t[20]=b,t[21]=R,t[22]=M):M=t[22],M}function ee(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return o.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function ne(e,t){return e[0].localeCompare(t[0])}export{Kn as VariantCalendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-
|
|
1
|
+
import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-CL1MOD5T.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const n=M[_];let l;t[6]!==z?(l=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=l):l=t[7];let a;t[8]!==n||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(n.buttonWithLabel,"px-3"):n.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=n,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":n.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==l||t[25]!==a?(v=i.jsxs("div",{className:l,children:[a,u]}),t[23]=u,t[24]=l,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
|
package/dist/client/index.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
51
51
|
<meta name="twitter:image" content="/og-image.png" />
|
|
52
52
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
53
|
-
<script type="module" crossorigin src="/assets/index-
|
|
53
|
+
<script type="module" crossorigin src="/assets/index-CL1MOD5T.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-CQp7LEDw.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -1429,7 +1429,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var $p1=L(()=>{kf()});f
|
|
|
1429
1429
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await Zy`
|
|
1430
1430
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1431
1431
|
`.execute($)}}async function gr1($){await gr8($),await hr8($);let Z=new br1({db:$,provider:{getMigrations:()=>Promise.resolve(Kp0)}}),{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 ur8($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await Ol0();let G=X??Y8(),J=async()=>{if(!Z&&!X)await cB(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await gr1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function cr8(){let $=Y8(),Z=new br1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Kp0)}}),{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 ur1=L(()=>{fr1();Ll0();XX()});async function aZ0($){let Z={...process.env},X=n$0($,Z);console.log(Xw1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?Cn1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (GZ0(),YZ0)),{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(() => (Ll0(),vn1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (XX(),op1)),{migrateToLatest:F}=await Promise.resolve().then(() => (ur1(),hr1)),N=H(G.databaseUrl);await F({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}:{}};return Zp1(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 Wp0=L(()=>{kf();_n1();V$()});var mr1={};Q0(mr1,{updateService:()=>VE,subscribeCliState:()=>Np0,setTuiConsoleIntercepted:()=>sZ0,setServerUrl:()=>Xp,setMigrationsDone:()=>Zp,setDevMode:()=>dr8,resetCliStateForTests:()=>lr8,isTuiConsoleIntercepted:()=>eZ0,getCliState:()=>Fp0,addLogEntry:()=>tB});function cr1(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function lr1(){return{services:cr1(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function lr8(){lQ=lr1()}function $p(){for(let $ of Hp0)$()}function Fp0(){return lQ}function Np0($){return Hp0.add($),()=>Hp0.delete($)}function VE($){lQ={...lQ,services:lQ.services.map((Z)=>Z.name===$.name?$:Z)},$p()}function Zp(){lQ={...lQ,migrationsStatus:"done"},$p()}function Xp($){lQ={...lQ,serverUrl:$},$p()}function tB($){let Z=[...lQ.logs,$];lQ={...lQ,logs:Z.length>500?Z.slice(-500):Z},$p()}function dr8(){lQ={...lQ,services:[...cr1(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},$p()}function sZ0($){dr1=$}function eZ0(){return dr1}var lQ,Hp0,dr1=!1;var kE=L(()=>{lQ=lr1();Hp0=new Set});import{createServer as ir1}from"net";function mr8($){return new Promise((Z)=>{let X=ir1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Qp($){if(await mr8($))return $;let Z=await new Promise((X,Q)=>{let Y=ir1();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 Up0=()=>{};var Op0={};Q0(Op0,{startDevServer:()=>pr8,pipeToLogStore:()=>Bp0});import{join as ir8}from"path";function Bp0($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1432
|
-
`);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;tB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}}catch{}if(Q.trim()){let G=Bun.stripANSI(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)tB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function pr8($){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 Qp(Number(Y)+1):await Qp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await aZ0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)VE({name:D.name,status:"ready",port:D.port});Zp();let F=ir8(import.meta.dir,"..","..","..","..",".."),N=X===!0,U=Bun.spawn(["bun","run","dev:servers"],{cwd:F,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.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)Bp0(U.stdout),Bp0(U.stderr);Xp(G),VE({name:"Vite",status:"ready",port:Number(Y)}),VE({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(U.kill(D),await U.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (GZ0(),YZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var Lp0=L(()=>{Wp0();kE();Up0()});var $70;var Dp0=L(()=>{$70={name:"decocms",version:"4.272.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","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@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 tr8,Text as pr1}from"ink";import{jsx as or8,jsxs as nr1}from"react/jsx-runtime";function tr1({version:$}){return nr1(tr8,{flexDirection:"column",marginTop:1,children:[MZ0.map((Z,X)=>or8(pr1,{color:VZ0[X],children:Z},X)),nr1(pr1,{dimColor:!0,children:[" v",$]})]})}var or1=L(()=>{di()});import{Box as SE,Text as oB}from"ink";import{Spinner as rr8}from"@inkjs/ui";import{jsx as eY,jsxs as Xy}from"react/jsx-runtime";function rr1({status:$}){if($==="pending")return eY(rr8,{label:""});return eY(oB,{color:"green",children:"\u2713"})}function ar8($){return`${$.name}: ${$.port||"...."}`}function ar1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Xy(SE,{flexDirection:"column",paddingBottom:1,children:[eY(tr1,{version:$70.version}),eY(SE,{marginBottom:1,children:eY(oB,{dimColor:!0,children:"\u2500".repeat(80)})}),eY(SE,{children:Xy(oB,{dimColor:!0,children:["Home: ",X]})}),Xy(SE,{gap:2,children:[$.map((Y)=>Xy(SE,{gap:1,children:[eY(oB,{children:ar8(Y)}),eY(rr1,{status:Y.status})]},Y.name)),Xy(SE,{gap:1,children:[eY(oB,{children:"Migrations"}),eY(rr1,{status:Z})]})]}),eY(SE,{children:Q?Xy(oB,{children:["Open in browser: ",eY(oB,{color:"cyan",children:Q})]}):eY(oB,{dimColor:!0,children:"Starting..."})})]})}var sr1=L(()=>{Dp0();or1()});import{Box as sr8,Text as Yp}from"ink";import{jsx as wp0,jsxs as Ep0}from"react/jsx-runtime";function er8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function er1({logs:$}){return wp0(sr8,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return wp0(Yp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Ep0(Yp,{children:[Ep0(Yp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),wp0(Yp,{color:er8(Z.status),children:Z.status}),Ep0(Yp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var $a1=()=>{};var jp0={};Q0(jp0,{App:()=>Xa8});import{Box as $a8}from"ink";import{useSyncExternalStore as Za8}from"react";import{jsx as Za1,jsxs as Qa8}from"react/jsx-runtime";function Xa8({home:$}){let Z=Za8(Np0,Fp0);return Qa8($a8,{flexDirection:"column",children:[Za1(ar1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Za1(er1,{logs:Z.logs})]})}var zp0=L(()=>{sr1();$a1();kE()});var g3="thread-gate",GN="decopilot-hosted-harness",JN="decopilot-hosted-harness-sandboxed",UJ="automations",rB="background-tools",CE="task-board-github-reads",_E="jira-push";var Xa1="9";function Qa1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Xa1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ya1=()=>{};import Ya8 from"pg";async function Ja1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=Ga8}=$,Y=$.log??((W)=>console.log(W)),G=new Ya8.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ga1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await W$(Ja8)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ga1.toString()])}catch{}await G.end().catch(()=>{})}}var Ga1=8314027461559302n,Ga8=600000,Ja8=500;var Ka1=L(()=>{N4()});function Ka8(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Pp0($,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 Wa1(){let $=Ka8();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Pp0($,"--cpu-prof-dir")??process.cwd(),name:Pp0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Pp0($,"--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 Ha1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=RE();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(()=>{}),Z70=setInterval(()=>void Z().catch(()=>{}),$),Z70.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(Z70)clearInterval(Z70)}}var Z70;var Fa1=()=>{};import*as Wa8 from"bun:jsc";function Na1(){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{Ha8()}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=Fa8()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let N=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!N)continue;let U=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${N.name??"?"} @ ${U}:${N.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,N)=>N[1]-F[1]).slice(0,8).map(([F,N])=>({frame:F,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 Ha8,Fa8;var Ua1=L(()=>{({startSamplingProfiler:Ha8,samplingProfilerStackTraces:Fa8}=Wa8)});function Ba1(){Wa1();let $=[Ha1(),cp1(),Na1()];return()=>{for(let Z of $)Z()}}var Oa1=L(()=>{Gl0();Fa1();Ua1()});var vE=v((La1)=>{Object.defineProperty(La1,"__esModule",{value:!0});La1.RepublishHeaders=La1.DirectMsgHeaders=La1.JsHeaders=La1.AdvisoryKind=void 0;La1.isOrderedPushConsumerOptions=Na8;La1.isPullConsumer=Ua8;La1.isPushConsumer=Ba8;La1.isBoundPushConsumerOptions=Oa8;function Na8($){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 Ua8($){return $.isPullConsumer()}function Ba8($){return $.isPushConsumer()}function Oa8($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}La1.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"};La1.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"};La1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};La1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var $G=v((wa1)=>{Object.defineProperty(wa1,"__esModule",{value:!0});wa1.TD=wa1.TE=wa1.Empty=void 0;wa1.encode=Ta8;wa1.decode=Ra8;wa1.Empty=new Uint8Array(0);wa1.TE=new TextEncoder;wa1.TD=new TextDecoder;function Aa8(...$){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 Ta8(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(wa1.TE.encode($[X]));if(Z.length===0)return wa1.Empty;if(Z.length===1)return Z[0];return Aa8(...Z)}function Ra8($){if(!$||$.length===0)return"";return wa1.TD.decode($)}});var ZG=v((za1)=>{Object.defineProperty(za1,"__esModule",{value:!0});za1.errors=za1.PermissionViolationError=za1.NoRespondersError=za1.TimeoutError=za1.RequestError=za1.ProtocolError=za1.ConnectionError=za1.DrainingConnectionError=za1.ClosedConnectionError=za1.AuthorizationError=za1.UserAuthenticationExpiredError=za1.InvalidOperationError=za1.InvalidArgumentError=za1.InvalidSubjectError=void 0;class Tp0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}za1.InvalidSubjectError=Tp0;class X70 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 X70(`${$} ${Z}`,X)}}za1.InvalidArgumentError=X70;class Rp0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}za1.InvalidOperationError=Rp0;class Q70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new Q70($);return null}}za1.UserAuthenticationExpiredError=Q70;class Y70 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 Y70($);return null}}za1.AuthorizationError=Y70;class Ip0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}za1.ClosedConnectionError=Ip0;class qp0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}za1.DrainingConnectionError=qp0;class Mp0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}za1.ConnectionError=Mp0;class Vp0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}za1.ProtocolError=Vp0;class kp0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof G70}}za1.RequestError=kp0;class Sp0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}za1.TimeoutError=Sp0;class G70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}za1.NoRespondersError=G70;class J70 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 J70($,X,Q,Y)}}za1.PermissionViolationError=J70;za1.errors={AuthorizationError:Y70,ClosedConnectionError:Ip0,ConnectionError:Mp0,DrainingConnectionError:qp0,InvalidArgumentError:X70,InvalidOperationError:Rp0,InvalidSubjectError:Tp0,NoRespondersError:G70,PermissionViolationError:J70,ProtocolError:Vp0,RequestError:kp0,TimeoutError:Sp0,UserAuthenticationExpiredError:Q70}});var h3=v((Ia1)=>{Object.defineProperty(Ia1,"__esModule",{value:!0});Ia1.SimpleMutex=Ia1.Perf=void 0;Ia1.extend=ca8;Ia1.render=la8;Ia1.timeout=da8;Ia1.delay=ma8;Ia1.deadline=ia8;Ia1.deferred=_p0;Ia1.debugDeferred=pa8;Ia1.shuffle=na8;Ia1.collect=ta8;Ia1.jitter=Ra1;Ia1.backoff=oa8;Ia1.nanos=ra8;Ia1.millis=aa8;Ia1.randomToken=$s8;var ua8=$G(),Cp0=ZG();function ca8($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function la8($){return ua8.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function da8($,Z=!0){let X=Z?new Cp0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new Cp0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function ma8($=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 ia8($,Z=1000){let X=_p0(),Q=setTimeout(()=>{X.reject(new Cp0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function _p0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function pa8(){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 na8($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function ta8($){let Z=[];for await(let X of $)Z.push(X);return Z}class Aa1{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})}),$}}Ia1.Perf=Aa1;class Ta1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=_p0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Ia1.SimpleMutex=Ta1;function Ra1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function oa8($=[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 Ra1(X>Z?$[Z]:$[X])}}}function ra8($){return $*1e6}function aa8($){return Math.floor($/1e6)}var sa8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",KN=new Uint8Array(62);for(let $=0;$<62;$++)KN[$]=sa8.charCodeAt($);var ea8=218340105584896;function $s8(){let $=Math.floor(Math.random()*ea8),Z=$%62,X=KN[Z];$=($-Z)/62,Z=$%62;let Q=KN[Z];$=($-Z)/62,Z=$%62;let Y=KN[Z];$=($-Z)/62,Z=$%62;let G=KN[Z];$=($-Z)/62,Z=$%62;let J=KN[Z];$=($-Z)/62,Z=$%62;let K=KN[Z];$=($-Z)/62,Z=$%62;let W=KN[Z];$=($-Z)/62;let H=KN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var va1=v((Ca1)=>{Object.defineProperty(Ca1,"__esModule",{value:!0});Ca1.nuid=Ca1.NuidImpl=void 0;var Ds8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",aB=62,W70=12,ka1=10,Ma1=33,ws8=333,Va1=W70+ka1,xp0=new Uint8Array(aB);for(let $=0;$<aB;$++)xp0[$]=Ds8.charCodeAt($);var K70=4294967296,Sa1=BigInt(aB)**BigInt(ka1),Gp=Number(Sa1/(1n<<32n)),vp0=Number(Sa1%(1n<<32n));function Es8($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function js8($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Es8($)}class fp0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Va1),this.cbuf=new Uint8Array(W70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Gp+1)),this.seqLo=Math.floor(Math.random()*K70);while($++<8&&this.seqHi===Gp&&this.seqLo>=vp0);if(this.seqHi===Gp&&this.seqLo>=vp0)this.seqLo=0;this.inc=Math.random()*(ws8-Ma1)+Ma1|0}setPre(){js8(this.cbuf);for(let $=0;$<W70;$++)this.buf[$]=xp0[this.cbuf[$]%aB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Va1-1;X>=W70;X--){let Q=Math.floor($/aB),G=($-Q*aB)*K70+Z,J=Math.floor(G/aB),K=G-J*aB;this.buf[X]=xp0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=K70)this.seqLo-=K70,this.seqHi+=1;if(this.seqHi>Gp||this.seqHi===Gp&&this.seqLo>=vp0)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()}}Ca1.NuidImpl=fp0;Ca1.nuid=new fp0});var ya1=v((fa1)=>{Object.defineProperty(fa1,"__esModule",{value:!0});fa1.nuid=fa1.Nuid=void 0;var xa1=va1();fa1.Nuid=xa1.NuidImpl;fa1.nuid=xa1.nuid});var F70=v((H70)=>{Object.defineProperty(H70,"__esModule",{value:!0});H70.nuid=H70.Nuid=void 0;var ga1=ya1();Object.defineProperty(H70,"Nuid",{enumerable:!0,get:function(){return ga1.Nuid}});Object.defineProperty(H70,"nuid",{enumerable:!0,get:function(){return ga1.nuid}})});var sB=v((ha1)=>{Object.defineProperty(ha1,"__esModule",{value:!0});ha1.DEFAULT_HOST=ha1.DEFAULT_PORT=ha1.Match=void 0;ha1.syncIterator=Is8;ha1.createInbox=qs8;var Ts8=F70(),Rs8=ZG();ha1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Is8($){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 qs8($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Rs8.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Ts8.nuid.next()}`}ha1.DEFAULT_PORT=4222;ha1.DEFAULT_HOST="127.0.0.1"});var Jp=v((da1)=>{Object.defineProperty(da1,"__esModule",{value:!0});da1.DataBuffer=void 0;var ca1=$G();class la1{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 ca1.TE.encode($)}static toAscii($){return ca1.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}}da1.DataBuffer=la1});var xE=v((pa1)=>{Object.defineProperty(pa1,"__esModule",{value:!0});pa1.LF=pa1.CR=pa1.CRLF=pa1.CR_LF_LEN=pa1.CR_LF=void 0;pa1.setTransportFactory=xs8;pa1.defaultPort=fs8;pa1.getUrlParseFn=bs8;pa1.newTransport=ys8;pa1.getResolveFn=gs8;pa1.protoLen=ia1;pa1.extractProtocolMessage=hs8;var Cs8=$G(),_s8=sB(),vs8=Jp(),XG;function xs8($){XG=$}function fs8(){return XG!==void 0&&XG.defaultPort!==void 0?XG.defaultPort:_s8.DEFAULT_PORT}function bs8(){return XG!==void 0&&XG.urlParseFn?XG.urlParseFn:void 0}function ys8(){if(!XG||typeof XG.factory!=="function")throw Error("transport fn is not set");return XG.factory()}function gs8(){return XG!==void 0&&XG.dnsResolveFn?XG.dnsResolveFn:void 0}pa1.CR_LF=`\r
|
|
1432
|
+
`);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;tB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}}catch{}if(Q.trim()){let G=Bun.stripANSI(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)tB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function pr8($){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 Qp(Number(Y)+1):await Qp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await aZ0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)VE({name:D.name,status:"ready",port:D.port});Zp();let F=ir8(import.meta.dir,"..","..","..","..",".."),N=X===!0,U=Bun.spawn(["bun","run","dev:servers"],{cwd:F,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.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)Bp0(U.stdout),Bp0(U.stderr);Xp(G),VE({name:"Vite",status:"ready",port:Number(Y)}),VE({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(U.kill(D),await U.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (GZ0(),YZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var Lp0=L(()=>{Wp0();kE();Up0()});var $70;var Dp0=L(()=>{$70={name:"decocms",version:"4.273.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@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 tr8,Text as pr1}from"ink";import{jsx as or8,jsxs as nr1}from"react/jsx-runtime";function tr1({version:$}){return nr1(tr8,{flexDirection:"column",marginTop:1,children:[MZ0.map((Z,X)=>or8(pr1,{color:VZ0[X],children:Z},X)),nr1(pr1,{dimColor:!0,children:[" v",$]})]})}var or1=L(()=>{di()});import{Box as SE,Text as oB}from"ink";import{Spinner as rr8}from"@inkjs/ui";import{jsx as eY,jsxs as Xy}from"react/jsx-runtime";function rr1({status:$}){if($==="pending")return eY(rr8,{label:""});return eY(oB,{color:"green",children:"\u2713"})}function ar8($){return`${$.name}: ${$.port||"...."}`}function ar1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Xy(SE,{flexDirection:"column",paddingBottom:1,children:[eY(tr1,{version:$70.version}),eY(SE,{marginBottom:1,children:eY(oB,{dimColor:!0,children:"\u2500".repeat(80)})}),eY(SE,{children:Xy(oB,{dimColor:!0,children:["Home: ",X]})}),Xy(SE,{gap:2,children:[$.map((Y)=>Xy(SE,{gap:1,children:[eY(oB,{children:ar8(Y)}),eY(rr1,{status:Y.status})]},Y.name)),Xy(SE,{gap:1,children:[eY(oB,{children:"Migrations"}),eY(rr1,{status:Z})]})]}),eY(SE,{children:Q?Xy(oB,{children:["Open in browser: ",eY(oB,{color:"cyan",children:Q})]}):eY(oB,{dimColor:!0,children:"Starting..."})})]})}var sr1=L(()=>{Dp0();or1()});import{Box as sr8,Text as Yp}from"ink";import{jsx as wp0,jsxs as Ep0}from"react/jsx-runtime";function er8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function er1({logs:$}){return wp0(sr8,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return wp0(Yp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Ep0(Yp,{children:[Ep0(Yp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),wp0(Yp,{color:er8(Z.status),children:Z.status}),Ep0(Yp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var $a1=()=>{};var jp0={};Q0(jp0,{App:()=>Xa8});import{Box as $a8}from"ink";import{useSyncExternalStore as Za8}from"react";import{jsx as Za1,jsxs as Qa8}from"react/jsx-runtime";function Xa8({home:$}){let Z=Za8(Np0,Fp0);return Qa8($a8,{flexDirection:"column",children:[Za1(ar1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Za1(er1,{logs:Z.logs})]})}var zp0=L(()=>{sr1();$a1();kE()});var g3="thread-gate",GN="decopilot-hosted-harness",JN="decopilot-hosted-harness-sandboxed",UJ="automations",rB="background-tools",CE="task-board-github-reads",_E="jira-push";var Xa1="9";function Qa1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Xa1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ya1=()=>{};import Ya8 from"pg";async function Ja1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=Ga8}=$,Y=$.log??((W)=>console.log(W)),G=new Ya8.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ga1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await W$(Ja8)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ga1.toString()])}catch{}await G.end().catch(()=>{})}}var Ga1=8314027461559302n,Ga8=600000,Ja8=500;var Ka1=L(()=>{N4()});function Ka8(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Pp0($,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 Wa1(){let $=Ka8();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Pp0($,"--cpu-prof-dir")??process.cwd(),name:Pp0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Pp0($,"--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 Ha1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=RE();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(()=>{}),Z70=setInterval(()=>void Z().catch(()=>{}),$),Z70.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(Z70)clearInterval(Z70)}}var Z70;var Fa1=()=>{};import*as Wa8 from"bun:jsc";function Na1(){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{Ha8()}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=Fa8()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let N=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!N)continue;let U=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${N.name??"?"} @ ${U}:${N.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,N)=>N[1]-F[1]).slice(0,8).map(([F,N])=>({frame:F,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 Ha8,Fa8;var Ua1=L(()=>{({startSamplingProfiler:Ha8,samplingProfilerStackTraces:Fa8}=Wa8)});function Ba1(){Wa1();let $=[Ha1(),cp1(),Na1()];return()=>{for(let Z of $)Z()}}var Oa1=L(()=>{Gl0();Fa1();Ua1()});var vE=v((La1)=>{Object.defineProperty(La1,"__esModule",{value:!0});La1.RepublishHeaders=La1.DirectMsgHeaders=La1.JsHeaders=La1.AdvisoryKind=void 0;La1.isOrderedPushConsumerOptions=Na8;La1.isPullConsumer=Ua8;La1.isPushConsumer=Ba8;La1.isBoundPushConsumerOptions=Oa8;function Na8($){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 Ua8($){return $.isPullConsumer()}function Ba8($){return $.isPushConsumer()}function Oa8($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}La1.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"};La1.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"};La1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};La1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var $G=v((wa1)=>{Object.defineProperty(wa1,"__esModule",{value:!0});wa1.TD=wa1.TE=wa1.Empty=void 0;wa1.encode=Ta8;wa1.decode=Ra8;wa1.Empty=new Uint8Array(0);wa1.TE=new TextEncoder;wa1.TD=new TextDecoder;function Aa8(...$){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 Ta8(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(wa1.TE.encode($[X]));if(Z.length===0)return wa1.Empty;if(Z.length===1)return Z[0];return Aa8(...Z)}function Ra8($){if(!$||$.length===0)return"";return wa1.TD.decode($)}});var ZG=v((za1)=>{Object.defineProperty(za1,"__esModule",{value:!0});za1.errors=za1.PermissionViolationError=za1.NoRespondersError=za1.TimeoutError=za1.RequestError=za1.ProtocolError=za1.ConnectionError=za1.DrainingConnectionError=za1.ClosedConnectionError=za1.AuthorizationError=za1.UserAuthenticationExpiredError=za1.InvalidOperationError=za1.InvalidArgumentError=za1.InvalidSubjectError=void 0;class Tp0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}za1.InvalidSubjectError=Tp0;class X70 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 X70(`${$} ${Z}`,X)}}za1.InvalidArgumentError=X70;class Rp0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}za1.InvalidOperationError=Rp0;class Q70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new Q70($);return null}}za1.UserAuthenticationExpiredError=Q70;class Y70 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 Y70($);return null}}za1.AuthorizationError=Y70;class Ip0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}za1.ClosedConnectionError=Ip0;class qp0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}za1.DrainingConnectionError=qp0;class Mp0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}za1.ConnectionError=Mp0;class Vp0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}za1.ProtocolError=Vp0;class kp0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof G70}}za1.RequestError=kp0;class Sp0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}za1.TimeoutError=Sp0;class G70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}za1.NoRespondersError=G70;class J70 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 J70($,X,Q,Y)}}za1.PermissionViolationError=J70;za1.errors={AuthorizationError:Y70,ClosedConnectionError:Ip0,ConnectionError:Mp0,DrainingConnectionError:qp0,InvalidArgumentError:X70,InvalidOperationError:Rp0,InvalidSubjectError:Tp0,NoRespondersError:G70,PermissionViolationError:J70,ProtocolError:Vp0,RequestError:kp0,TimeoutError:Sp0,UserAuthenticationExpiredError:Q70}});var h3=v((Ia1)=>{Object.defineProperty(Ia1,"__esModule",{value:!0});Ia1.SimpleMutex=Ia1.Perf=void 0;Ia1.extend=ca8;Ia1.render=la8;Ia1.timeout=da8;Ia1.delay=ma8;Ia1.deadline=ia8;Ia1.deferred=_p0;Ia1.debugDeferred=pa8;Ia1.shuffle=na8;Ia1.collect=ta8;Ia1.jitter=Ra1;Ia1.backoff=oa8;Ia1.nanos=ra8;Ia1.millis=aa8;Ia1.randomToken=$s8;var ua8=$G(),Cp0=ZG();function ca8($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function la8($){return ua8.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function da8($,Z=!0){let X=Z?new Cp0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new Cp0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function ma8($=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 ia8($,Z=1000){let X=_p0(),Q=setTimeout(()=>{X.reject(new Cp0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function _p0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function pa8(){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 na8($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function ta8($){let Z=[];for await(let X of $)Z.push(X);return Z}class Aa1{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})}),$}}Ia1.Perf=Aa1;class Ta1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=_p0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Ia1.SimpleMutex=Ta1;function Ra1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function oa8($=[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 Ra1(X>Z?$[Z]:$[X])}}}function ra8($){return $*1e6}function aa8($){return Math.floor($/1e6)}var sa8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",KN=new Uint8Array(62);for(let $=0;$<62;$++)KN[$]=sa8.charCodeAt($);var ea8=218340105584896;function $s8(){let $=Math.floor(Math.random()*ea8),Z=$%62,X=KN[Z];$=($-Z)/62,Z=$%62;let Q=KN[Z];$=($-Z)/62,Z=$%62;let Y=KN[Z];$=($-Z)/62,Z=$%62;let G=KN[Z];$=($-Z)/62,Z=$%62;let J=KN[Z];$=($-Z)/62,Z=$%62;let K=KN[Z];$=($-Z)/62,Z=$%62;let W=KN[Z];$=($-Z)/62;let H=KN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var va1=v((Ca1)=>{Object.defineProperty(Ca1,"__esModule",{value:!0});Ca1.nuid=Ca1.NuidImpl=void 0;var Ds8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",aB=62,W70=12,ka1=10,Ma1=33,ws8=333,Va1=W70+ka1,xp0=new Uint8Array(aB);for(let $=0;$<aB;$++)xp0[$]=Ds8.charCodeAt($);var K70=4294967296,Sa1=BigInt(aB)**BigInt(ka1),Gp=Number(Sa1/(1n<<32n)),vp0=Number(Sa1%(1n<<32n));function Es8($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function js8($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Es8($)}class fp0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Va1),this.cbuf=new Uint8Array(W70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Gp+1)),this.seqLo=Math.floor(Math.random()*K70);while($++<8&&this.seqHi===Gp&&this.seqLo>=vp0);if(this.seqHi===Gp&&this.seqLo>=vp0)this.seqLo=0;this.inc=Math.random()*(ws8-Ma1)+Ma1|0}setPre(){js8(this.cbuf);for(let $=0;$<W70;$++)this.buf[$]=xp0[this.cbuf[$]%aB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Va1-1;X>=W70;X--){let Q=Math.floor($/aB),G=($-Q*aB)*K70+Z,J=Math.floor(G/aB),K=G-J*aB;this.buf[X]=xp0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=K70)this.seqLo-=K70,this.seqHi+=1;if(this.seqHi>Gp||this.seqHi===Gp&&this.seqLo>=vp0)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()}}Ca1.NuidImpl=fp0;Ca1.nuid=new fp0});var ya1=v((fa1)=>{Object.defineProperty(fa1,"__esModule",{value:!0});fa1.nuid=fa1.Nuid=void 0;var xa1=va1();fa1.Nuid=xa1.NuidImpl;fa1.nuid=xa1.nuid});var F70=v((H70)=>{Object.defineProperty(H70,"__esModule",{value:!0});H70.nuid=H70.Nuid=void 0;var ga1=ya1();Object.defineProperty(H70,"Nuid",{enumerable:!0,get:function(){return ga1.Nuid}});Object.defineProperty(H70,"nuid",{enumerable:!0,get:function(){return ga1.nuid}})});var sB=v((ha1)=>{Object.defineProperty(ha1,"__esModule",{value:!0});ha1.DEFAULT_HOST=ha1.DEFAULT_PORT=ha1.Match=void 0;ha1.syncIterator=Is8;ha1.createInbox=qs8;var Ts8=F70(),Rs8=ZG();ha1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Is8($){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 qs8($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Rs8.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Ts8.nuid.next()}`}ha1.DEFAULT_PORT=4222;ha1.DEFAULT_HOST="127.0.0.1"});var Jp=v((da1)=>{Object.defineProperty(da1,"__esModule",{value:!0});da1.DataBuffer=void 0;var ca1=$G();class la1{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 ca1.TE.encode($)}static toAscii($){return ca1.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}}da1.DataBuffer=la1});var xE=v((pa1)=>{Object.defineProperty(pa1,"__esModule",{value:!0});pa1.LF=pa1.CR=pa1.CRLF=pa1.CR_LF_LEN=pa1.CR_LF=void 0;pa1.setTransportFactory=xs8;pa1.defaultPort=fs8;pa1.getUrlParseFn=bs8;pa1.newTransport=ys8;pa1.getResolveFn=gs8;pa1.protoLen=ia1;pa1.extractProtocolMessage=hs8;var Cs8=$G(),_s8=sB(),vs8=Jp(),XG;function xs8($){XG=$}function fs8(){return XG!==void 0&&XG.defaultPort!==void 0?XG.defaultPort:_s8.DEFAULT_PORT}function bs8(){return XG!==void 0&&XG.urlParseFn?XG.urlParseFn:void 0}function ys8(){if(!XG||typeof XG.factory!=="function")throw Error("transport fn is not set");return XG.factory()}function gs8(){return XG!==void 0&&XG.dnsResolveFn?XG.dnsResolveFn:void 0}pa1.CR_LF=`\r
|
|
1433
1433
|
`;pa1.CR_LF_LEN=pa1.CR_LF.length;pa1.CRLF=vs8.DataBuffer.fromAscii(pa1.CR_LF);pa1.CR=new Uint8Array(pa1.CRLF)[0];pa1.LF=new Uint8Array(pa1.CRLF)[1];function ia1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===pa1.CR&&$[X]===pa1.LF)return X+1}return 0}function hs8($){let Z=ia1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return Cs8.TD.decode(Q)}return""}});var up0=v(($s1)=>{Object.defineProperty($s1,"__esModule",{value:!0});$s1.ipV4=aa1;$s1.isIP=rs8;$s1.parseIP=sa1;var Kp=4,fE=16,N70=48,ra1=57,ta1=65,ts8=70,oa1=97,os8=102,hp0=16777215;function aa1($,Z,X,Q){let Y=new Uint8Array(fE);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 rs8($){return sa1($)!==void 0}function sa1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return ea1($);case":":return as8($)}return}function ea1($){let Z=new Uint8Array(Kp);for(let X=0;X<Kp;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=ss8($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return aa1(Z[0],Z[1],Z[2],Z[3])}function as8($){let Z=new Uint8Array(fE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<fE){let{n:Y,c:G,ok:J}=es8($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=fE-Kp)return;if(Q+Kp>fE)return;let K=ea1($);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+=Kp;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<fE){if(X<0)return;let Y=fE-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 ss8($){let Z=0,X=0;for(Z=0;Z<$.length&&N70<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=ra1;Z++)if(X=X*10+($.charCodeAt(Z)-N70),X>=hp0)return{n:hp0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function es8($){let Z=0,X=0;for(X=0;X<$.length;X++){if(N70<=$.charCodeAt(X)&&$.charCodeAt(X)<=ra1)Z*=16,Z+=$.charCodeAt(X)-N70;else if(oa1<=$.charCodeAt(X)&&$.charCodeAt(X)<=os8)Z*=16,Z+=$.charCodeAt(X)-oa1+10;else if(ta1<=$.charCodeAt(X)&&$.charCodeAt(X)<=ts8)Z*=16,Z+=$.charCodeAt(X)-ta1+10;else break;if(Z>=hp0)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 pp0=v((Xs1)=>{Object.defineProperty(Xs1,"__esModule",{value:!0});Xs1.Servers=Xs1.ServerImpl=void 0;Xs1.isIPV4OrHostname=Zs1;Xs1.hostPort=ip0;var cp0=xE(),lp0=h3(),dp0=up0(),Qe8=sB(),Ye8=ZG();function Zs1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function mp0($){return!Zs1($)}function Ge8($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function ip0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=Ge8($),mp0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=mp0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):Qe8.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 Qy{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=ip0($);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,dp0.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}://${mp0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new Qy(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,lp0.shuffle)(Z);return this.resolves=Z,Z}}Xs1.ServerImpl=Qy;class U70{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw Ye8.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,cp0.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}=ip0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new Qy(Y))}if(this.randomize)(0,lp0.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,dp0.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,cp0.getUrlParseFn)();$=X?X($):$;let Q=new Qy($,Z);if((0,dp0.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 U70.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return U70.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,cp0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Qy(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,lp0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Xs1.Servers=U70});var B70=v((Js1)=>{Object.defineProperty(Js1,"__esModule",{value:!0});Js1.QueuedIteratorImpl=void 0;var np0=h3(),Ys1=ZG();class Gs1{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,np0.deferred)(),this.yields=[],this.iterClosed=(0,np0.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 Ys1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Ys1.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,np0.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}}Js1.QueuedIteratorImpl=Gs1});var tp0=v((Fs1)=>{Object.defineProperty(Fs1,"__esModule",{value:!0});Fs1.MuxSubscription=void 0;var He8=sB(),Ws1=ZG();class Hs1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,He8.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 Ws1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Ws1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}Fs1.MuxSubscription=Hs1});var op0=v((Bs1)=>{Object.defineProperty(Bs1,"__esModule",{value:!0});Bs1.Heartbeat=void 0;var Fe8=h3();class Us1{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,Fe8.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})}}Bs1.Heartbeat=Us1});var sp0=v((Es1)=>{Object.defineProperty(Es1,"__esModule",{value:!0});Es1.DenoBuffer=Es1.MAX_SIZE=Es1.AssertionError=void 0;Es1.assert=Ds1;Es1.concat=ws1;Es1.append=Ue8;Es1.readAll=Be8;Es1.writeAll=Oe8;var Ne8=$G();class rp0 extends Error{constructor($){super($);this.name="AssertionError"}}Es1.AssertionError=rp0;function Ds1($,Z="Assertion failed."){if(!$)throw new rp0(Z)}var Ls1=32768;Es1.MAX_SIZE=4294967294;function O70($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function ws1($,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 Ue8($,Z){return ws1($,Uint8Array.of(Z))}class ap0{_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($){Ds1($<=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=O70(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(Ne8.TE.encode($))}write($){let Z=this._grow($.byteLength);return O70($,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)O70(this._buf.subarray(this._off),this._buf);else if(Q+$>Es1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,Es1.MAX_SIZE));O70(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,Es1.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(Ls1);while(!0){let Q=this.capacity-this.length<Ls1,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}}}Es1.DenoBuffer=ap0;function Be8($){let Z=new ap0;return Z.readFrom($),Z.bytes()}function Oe8($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Zn0=v((Ts1)=>{Object.defineProperty(Ts1,"__esModule",{value:!0});Ts1.cc=Ts1.State=Ts1.Parser=Ts1.Kind=void 0;Ts1.describe=Pe8;var ep0=sp0(),$n0=$G();Ts1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function Pe8($){let Z,X="";switch($.kind){case Ts1.Kind.MSG:Z="MSG";break;case Ts1.Kind.OK:Z="OK";break;case Ts1.Kind.ERR:Z="ERR",X=$n0.TD.decode($.data);break;case Ts1.Kind.PING:Z="PING";break;case Ts1.Kind.PONG:Z="PONG";break;case Ts1.Kind.INFO:Z="INFO",X=$n0.TD.decode($.data)}return`${Z}: ${X}`}function zs1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Ps1=48,Ae8=57,Yy=67108864;class As1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Ts1.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 Ts1.State.OP_START:switch(X){case Ts1.cc.M:case Ts1.cc.m:this.state=Ts1.State.OP_M,this.hdr=-1,this.ma=zs1();break;case Ts1.cc.H:case Ts1.cc.h:this.state=Ts1.State.OP_H,this.hdr=0,this.ma=zs1();break;case Ts1.cc.P:case Ts1.cc.p:this.state=Ts1.State.OP_P;break;case Ts1.cc.PLUS:this.state=Ts1.State.OP_PLUS;break;case Ts1.cc.MINUS:this.state=Ts1.State.OP_MINUS;break;case Ts1.cc.I:case Ts1.cc.i:this.state=Ts1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_H:switch(X){case Ts1.cc.M:case Ts1.cc.m:this.state=Ts1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_M:switch(X){case Ts1.cc.S:case Ts1.cc.s:this.state=Ts1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MS:switch(X){case Ts1.cc.G:case Ts1.cc.g:this.state=Ts1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MSG:switch(X){case Ts1.cc.SPACE:case Ts1.cc.TAB:this.state=Ts1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MSG_SPC:switch(X){case Ts1.cc.SPACE:case Ts1.cc.TAB:continue;default:this.state=Ts1.State.MSG_ARG,this.as=Z}break;case Ts1.State.MSG_ARG:switch(X){case Ts1.cc.CR:this.drop=1;break;case Ts1.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=Ts1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Ts1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Ts1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Ts1.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:Ts1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Ts1.State.MSG_END;break;case Ts1.State.MSG_END:switch(X){case Ts1.cc.NL:this.drop=0,this.as=Z+1,this.state=Ts1.State.OP_START;break;default:continue}break;case Ts1.State.OP_PLUS:switch(X){case Ts1.cc.O:case Ts1.cc.o:this.state=Ts1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PLUS_O:switch(X){case Ts1.cc.K:case Ts1.cc.k:this.state=Ts1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PLUS_OK:switch(X){case Ts1.cc.NL:this.dispatcher.push({kind:Ts1.Kind.OK}),this.drop=0,this.state=Ts1.State.OP_START;break}break;case Ts1.State.OP_MINUS:switch(X){case Ts1.cc.E:case Ts1.cc.e:this.state=Ts1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MINUS_E:switch(X){case Ts1.cc.R:case Ts1.cc.r:this.state=Ts1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MINUS_ER:switch(X){case Ts1.cc.R:case Ts1.cc.r:this.state=Ts1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MINUS_ERR:switch(X){case Ts1.cc.SPACE:case Ts1.cc.TAB:this.state=Ts1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_MINUS_ERR_SPC:switch(X){case Ts1.cc.SPACE:case Ts1.cc.TAB:continue;default:this.state=Ts1.State.MINUS_ERR_ARG,this.as=Z}break;case Ts1.State.MINUS_ERR_ARG:switch(X){case Ts1.cc.CR:this.drop=1;break;case Ts1.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:Ts1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Ts1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Ts1.State.OP_P:switch(X){case Ts1.cc.I:case Ts1.cc.i:this.state=Ts1.State.OP_PI;break;case Ts1.cc.O:case Ts1.cc.o:this.state=Ts1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PO:switch(X){case Ts1.cc.N:case Ts1.cc.n:this.state=Ts1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PON:switch(X){case Ts1.cc.G:case Ts1.cc.g:this.state=Ts1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PONG:switch(X){case Ts1.cc.NL:this.dispatcher.push({kind:Ts1.Kind.PONG}),this.drop=0,this.state=Ts1.State.OP_START;break}break;case Ts1.State.OP_PI:switch(X){case Ts1.cc.N:case Ts1.cc.n:this.state=Ts1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PIN:switch(X){case Ts1.cc.G:case Ts1.cc.g:this.state=Ts1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_PING:switch(X){case Ts1.cc.NL:this.dispatcher.push({kind:Ts1.Kind.PING}),this.drop=0,this.state=Ts1.State.OP_START;break}break;case Ts1.State.OP_I:switch(X){case Ts1.cc.N:case Ts1.cc.n:this.state=Ts1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_IN:switch(X){case Ts1.cc.F:case Ts1.cc.f:this.state=Ts1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_INF:switch(X){case Ts1.cc.O:case Ts1.cc.o:this.state=Ts1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_INFO:switch(X){case Ts1.cc.SPACE:case Ts1.cc.TAB:this.state=Ts1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ts1.State.OP_INFO_SPC:switch(X){case Ts1.cc.SPACE:case Ts1.cc.TAB:continue;default:this.state=Ts1.State.INFO_ARG,this.as=Z}break;case Ts1.State.INFO_ARG:switch(X){case Ts1.cc.CR:this.drop=1;break;case Ts1.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:Ts1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Ts1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Ts1.State.MSG_ARG||this.state===Ts1.State.MINUS_ERR_ARG||this.state===Ts1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new ep0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Ts1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new ep0.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 ep0.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 Ts1.cc.SPACE:case Ts1.cc.TAB:case Ts1.cc.CR:case Ts1.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],Yy);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],Yy);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}: ${$n0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Ts1.cc.SPACE:case Ts1.cc.TAB:case Ts1.cc.CR:case Ts1.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],Yy),this.ma.size=this.protoParseInt(Z[3],Yy);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],Yy),this.ma.size=this.protoParseInt(Z[4],Yy);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]<Ps1||$[Q]>Ae8)return-1;X=X*10+($[Q]-Ps1)}return Z!==void 0&&X>Z?-1:X}}Ts1.Parser=As1;Ts1.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};Ts1.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 w70=v((Is1)=>{Object.defineProperty(Is1,"__esModule",{value:!0});Is1.MsgHdrsImpl=void 0;Is1.canonicalMIMEHeaderKey=Qn0;Is1.headers=Ie8;var Rs1=$G(),u3=sB(),D70=ZG();function Qn0($){let F=!0,N=Array($.length);for(let U=0;U<$.length;U++){let B=$.charCodeAt(U);if(B===58||B<33||B>126)throw D70.InvalidArgumentError.format("header",`'${$[U]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;N[U]=B,F=B==45}return String.fromCharCode(...N)}function Ie8($=0,Z=""){if($===0&&Z!=="")throw D70.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw D70.InvalidArgumentError.format("description","is required");return new Gy($,Z)}var Xn0="NATS/1.0";class Gy{_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 Gy,Q=Rs1.TD.decode($).split(`\r
|
|
1434
1434
|
`),Y=Q[0];if(Y!==Xn0){let G=Y.replace(Xn0,"").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 $=Xn0;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
|
|
1435
1435
|
${Z}: ${X[Q]}`;return`${$}\r
|