decocms 4.301.0 → 4.301.1

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.
Files changed (229) hide show
  1. package/dist/client/assets/{AlertCircle-CBwIrPPb.js → AlertCircle-ljUXZVgg.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Bv0fe7ER.js → AreaChart-CfjqEiiW.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-qH_ye1J6.js → ArrowLeft-O_poTHg5.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DEtX0ZN8.js → ArrowUp-owAEYYU9.js} +1 -1
  5. package/dist/client/assets/{Check-DfWHyApv.js → Check-Dspx9Fp7.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BegfRG2j.js → CheckCircle-Xp4EEaHw.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-CIeYjal6.js → ChevronDown-BIP5kqgM.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Cs10Jm8L.js → ChevronRight-DN8wQOqh.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-jaA6p2pC.js → ChevronSelectorVertical-pB9PhHfJ.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-LrbyxJeG.js → ChevronUp-CziS5WaB.js} +1 -1
  11. package/dist/client/assets/{Copy01-Dca4umlh.js → Copy01-vCqfQzFe.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-BoBhJ6ou.js → CreditCard01-Do9O8xIN.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-CrhmuzYz.js → DotsVertical-BRi7moDO.js} +1 -1
  14. package/dist/client/assets/{Download01-7iFQ3GPU.js → Download01-CfiTBBn_.js} +1 -1
  15. package/dist/client/assets/{Eye-B9_hF1St.js → Eye-DeuttcGY.js} +1 -1
  16. package/dist/client/assets/{FilterLines-JjhPAtfq.js → FilterLines-D7mDTV7W.js} +1 -1
  17. package/dist/client/assets/{Globe01-BODMVNbb.js → Globe01-DjZFjLeY.js} +1 -1
  18. package/dist/client/assets/{Globe04-BhdBOMF1.js → Globe04-JNbM0T4S.js} +1 -1
  19. package/dist/client/assets/{HardDrive-Ch-yZbR_.js → HardDrive-BE93B0r3.js} +1 -1
  20. package/dist/client/assets/{Key01-CJA9-bCb.js → Key01-BfP4FjhZ.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CicQH1tw.js → LinkExternal01-DEeO7Yqp.js} +1 -1
  22. package/dist/client/assets/{LockUnlocked01-DcoaeWcH.js → LockUnlocked01-BV3keEk-.js} +1 -1
  23. package/dist/client/assets/{LogOut01-0-Ut5jdL.js → LogOut01--nH6fRjz.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DA5hHmOm.js → Monitor01-n4Ml3ptB.js} +1 -1
  25. package/dist/client/assets/{Palette-CaLkCeYK.js → Palette-DUQPyERX.js} +1 -1
  26. package/dist/client/assets/{Play-CjbzAnSz.js → Play-j8BtRPuR.js} +1 -1
  27. package/dist/client/assets/{Plus-DLtVR3IB.js → Plus-CH75M1Z_.js} +1 -1
  28. package/dist/client/assets/{SearchLg-CiXdS9Mb.js → SearchLg-BxkHIUp9.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CHRnb8Ay.js → SearchMd-gHnWrk04.js} +1 -1
  30. package/dist/client/assets/{Settings02-BKcZZrtU.js → Settings02-BPV8iKcU.js} +1 -1
  31. package/dist/client/assets/{Share07-Cm9hC0Yi.js → Share07-BGukGo7T.js} +1 -1
  32. package/dist/client/assets/{Shield01-lgvFbHBZ.js → Shield01-BB2neh_V.js} +1 -1
  33. package/dist/client/assets/{Stars01-CXqutOle.js → Stars01-COgnQQBe.js} +1 -1
  34. package/dist/client/assets/{Stars02-Dm1WK3vP.js → Stars02-DZ3JRVne.js} +1 -1
  35. package/dist/client/assets/{Sun-Bm1jbAxA.js → Sun-C6ZCInWh.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-Cgz8QAih.js → SwitchHorizontal01-CGTTaBt7.js} +1 -1
  37. package/dist/client/assets/{Tool01-BSNLNHNW.js → Tool01-BjY6qOZZ.js} +1 -1
  38. package/dist/client/assets/{Tool02-BdRGRa83.js → Tool02-D8r9WrY5.js} +1 -1
  39. package/dist/client/assets/{Trash01-BSWt74RV.js → Trash01-C-Qo_xAi.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-DiISHgUB.js → TrendUp01-fwYE1fSJ.js} +1 -1
  41. package/dist/client/assets/{Upload01-BPcxRp0w.js → Upload01-B8TZG867.js} +1 -1
  42. package/dist/client/assets/{User01-CPIlpmSI.js → User01-BVTsNjSS.js} +1 -1
  43. package/dist/client/assets/{UserSquare-CV3RLHOa.js → UserSquare-CcB7EE3-.js} +1 -1
  44. package/dist/client/assets/{Users01-DZaWmTLL.js → Users01-DFm0KLRk.js} +1 -1
  45. package/dist/client/assets/{Users03-CQZU6epa.js → Users03-CYQdFqu5.js} +1 -1
  46. package/dist/client/assets/{XCircle-DxchKayQ.js → XCircle-BLXZX6LN.js} +1 -1
  47. package/dist/client/assets/{XClose-CEd_w8Kc.js → XClose-BI1HCDzp.js} +1 -1
  48. package/dist/client/assets/{YAxis-B2VYfL3x.js → YAxis-Bagaia8x.js} +1 -1
  49. package/dist/client/assets/{Zap-Cr-4rKk6.js → Zap-CUiG_SEX.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-DwoLrslo.js → ZapSquare-dsonqlnJ.js} +1 -1
  51. package/dist/client/assets/{access-gate-DNASVgiA.js → access-gate-D98V2vC9.js} +1 -1
  52. package/dist/client/assets/{agent-icon-DOpXozg9.js → agent-icon-D080UAkK.js} +1 -1
  53. package/dist/client/assets/{agents-list-BOUVpf1u.js → agents-list-BHWoc2Ab.js} +1 -1
  54. package/dist/client/assets/{ai-providers-Ch4euat5.js → ai-providers-B_zbvZms.js} +1 -1
  55. package/dist/client/assets/{alert-CTjMhhQJ.js → alert-BZ-z_uGm.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-1z09vLUX.js → alert-dialog-D80JF1FN.js} +1 -1
  57. package/dist/client/assets/{api-keys-C_SgyOAp.js → api-keys-Dxx7a6SP.js} +1 -1
  58. package/dist/client/assets/{app-editor-Cu0pvoHh.js → app-editor-C_wNkqv4.js} +1 -1
  59. package/dist/client/assets/{auth-C0ya2_eb.js → auth-CAzZwnob.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-LZjk6XDi.js → auth-catchall-E-LlAM-S.js} +1 -1
  61. package/dist/client/assets/{auth-entry-VZGH6tmT.js → auth-entry-JuGGJf92.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-CVT7jyaJ.js → auth-split-layout-Bx_mmH-l.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-KbUMWqbo.js → authenticate-and-persist-oauth-Bl5SLBwb.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-1nfL4PJ_.js → automation-list-row-B8DIsrsz.js} +1 -1
  65. package/dist/client/assets/{automation-runs-D3kdIjbZ.js → automation-runs-8pT6UcJX.js} +1 -1
  66. package/dist/client/assets/{automations-TXJqoQN5.js → automations-BblT7_xF.js} +1 -1
  67. package/dist/client/assets/{avatar-CYmZSM_1.js → avatar-C-wDTrqY.js} +1 -1
  68. package/dist/client/assets/{badge-BfUJKkzo.js → badge-C3zovwOz.js} +1 -1
  69. package/dist/client/assets/{block-document-aP1XUgPp.js → block-document-B_n2-NvH.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-WYTBTa-X.js → breadcrumb-BGVJe9sP.js} +1 -1
  71. package/dist/client/assets/{buckets-DWZYVguP.js → buckets-D5WT0cf3.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-BWfQqWfZ.js → bulk-category-panel-HA3DYXop.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-DAG47Ni9.js → capability-load-error-DZd0TZqr.js} +1 -1
  74. package/dist/client/assets/{cards-DC4JUx4m.js → cards-hEkcdw4x.js} +1 -1
  75. package/dist/client/assets/{category-editor-D5EP8QX9.js → category-editor-BYTL98zO.js} +1 -1
  76. package/dist/client/assets/{chart-CrEK6PSs.js → chart-BEjRfmhR.js} +1 -1
  77. package/dist/client/assets/{chat-context-5QqOY7-J.js → chat-context-D8aIMWdd.js} +1 -1
  78. package/dist/client/assets/{checkbox-C2CrORhD.js → checkbox-D9umlVBm.js} +1 -1
  79. package/dist/client/assets/{choose-editor-Cmyb-7b_.js → choose-editor-zKSRgiY-.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-tePFt3ye.js → cli-auth-success-Pbjl8ie0.js} +1 -1
  81. package/dist/client/assets/{collection-detail-CB5dQT1j.js → collection-detail-KAQcK23P.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-D797UhPb.js → collection-display-button-DElS1JkI.js} +1 -1
  83. package/dist/client/assets/{collection-search-oG392hGv.js → collection-search-DwpjDZgj.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-dHoiu4Ri.js → collection-table-wrapper-BMfdmOc5.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-CKMFb25P.js → collection-tabs-MkxigJjY.js} +1 -1
  86. package/dist/client/assets/{command-CEvbU0nM.js → command-DUGT4YuA.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-BSmLX5SP.js → commerce-onboarding-BmuUaTay.js} +1 -1
  88. package/dist/client/assets/{config-CW9QRkoF.js → config-KtrfZ-Vw.js} +1 -1
  89. package/dist/client/assets/{connect-CJDeOL4S.js → connect-B-nmHPbw.js} +1 -1
  90. package/dist/client/assets/{connection-BdF6sNZ6.js → connection-LGpb7l5N.js} +1 -1
  91. package/dist/client/assets/{connection-card-BtrlWvje.js → connection-card-DG_wFSNi.js} +1 -1
  92. package/dist/client/assets/{connection-detail-2Jnsb5oh.js → connection-detail-aGo-Qvt-.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-DnrYJlcI.js → connection-form-helpers-BzuUoL8A.js} +1 -1
  94. package/dist/client/assets/{connections-D5EP4oH1.js → connections-CHRTDzbE.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-DqSRupe2.js → decopilot-sse-pool-BmPOv_9w.js} +1 -1
  96. package/dist/client/assets/{dialog-BDmUCtZo.js → dialog-C2z64945.js} +1 -1
  97. package/dist/client/assets/{domain-settings-B0nl3Ot5.js → domain-settings-CgGh3z2i.js} +1 -1
  98. package/dist/client/assets/{drawer-Bf_wXJLl.js → drawer-CUiOyXL0.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-CES77-Lv.js → dropdown-menu-ayJVblos.js} +1 -1
  100. package/dist/client/assets/{empty-state-T3sJArWn.js → empty-state-CJTsA7ZQ.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-gHDjR_pa.js → extract-connection-data-BcHTU76U.js} +1 -1
  102. package/dist/client/assets/{file-explorer-Brb5GXHS.js → file-explorer-CV9-oV-Q.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-sO2hN5jM.js → file-type-icon-BfUDQtPj.js} +1 -1
  104. package/dist/client/assets/{form-Ba1wcOo3.js → form-DA40jxLy.js} +1 -1
  105. package/dist/client/assets/{general-CtIHwyDp.js → general-MDpTV4Dk.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-BQ9FqmVY.js → github-repo-picker-CtQhVMRJ.js} +1 -1
  107. package/dist/client/assets/{hooks-D5cEzZTo.js → hooks-hTPN622N.js} +1 -1
  108. package/dist/client/assets/{index-BTAjo3Gc.js → index-BC3OycCV.js} +3 -3
  109. package/dist/client/assets/{index-D0SQspQ7.js → index-BOx0KUFh.js} +1 -1
  110. package/dist/client/assets/{index-_735stkr.js → index-Cd78eLLb.js} +6 -6
  111. package/dist/client/assets/{index-C7avnFky.js → index-D8eVz1G2.js} +1 -1
  112. package/dist/client/assets/{index-BPV6d0AX.js → index-DFMhMZ-D.js} +1 -1
  113. package/dist/client/assets/{index-CMb_3gcQ.js → index-DJEkiQUC.js} +1 -1
  114. package/dist/client/assets/{index-0cHuYJOM.js → index-DatPw8uA.js} +1 -1
  115. package/dist/client/assets/{index-D_LwAGq4.js → index-TJ7wGA3E.js} +1 -1
  116. package/dist/client/assets/{index-CPkDA-yX.js → index-m7UZKvUt.js} +1 -1
  117. package/dist/client/assets/{index-redirect-qyBmleOP.js → index-redirect-CwBQV1Xk.js} +1 -1
  118. package/dist/client/assets/{infra-billing-DeiBvZ3P.js → infra-billing-v-600drN.js} +1 -1
  119. package/dist/client/assets/{input-YEbMxdZS.js → input-CJmiU1C-.js} +1 -1
  120. package/dist/client/assets/{integration-icon-DlbE7Gr0.js → integration-icon-Bmo3oT9s.js} +1 -1
  121. package/dist/client/assets/{invite-member-dialog-CL2nzLI9.js → invite-member-dialog-D8eWOjYF.js} +1 -1
  122. package/dist/client/assets/{label-xbEfDIHO.js → label-BtUaN40E.js} +1 -1
  123. package/dist/client/assets/{layout-46ekPKzW.js → layout-zFndLcYt.js} +1 -1
  124. package/dist/client/assets/{login-C5LcCkP7.js → login-S0L8GE65.js} +1 -1
  125. package/dist/client/assets/{mcp-oauth-DBkQ7wH_.js → mcp-oauth-BOTsCCNI.js} +1 -1
  126. package/dist/client/assets/{members-CS6rVKZF.js → members-Bt5J0gS4.js} +1 -1
  127. package/dist/client/assets/{monaco-editor-802XwktR.js → monaco-editor-BMLMMPa-.js} +1 -1
  128. package/dist/client/assets/{monitoring-stats-row-fbmJYtRZ.js → monitoring-stats-row-UZRMU8x5.js} +1 -1
  129. package/dist/client/assets/{multi-select-Bw0MLZnU.js → multi-select-YRgR9zRZ.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-D5IDEHip.js → oauth-callback-BnhdUk1_.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-ai-provider-DJa0xvgf.js → oauth-callback-ai-provider-CI4OjqiI.js} +1 -1
  132. package/dist/client/assets/{onboarding-Dj_Oqipq.js → onboarding-gvZqKi2d.js} +1 -1
  133. package/dist/client/assets/{org-layout-32fPtkma.js → org-layout-COOCTYlT.js} +1 -1
  134. package/dist/client/assets/{organization-choice-ZUfzgAvX.js → organization-choice-BxQa72Tz.js} +1 -1
  135. package/dist/client/assets/{orgs-DDrdgF-v.js → orgs-D297Vmq3.js} +1 -1
  136. package/dist/client/assets/{page-seo-form-CAoQqJqe.js → page-seo-form-CdZBFD3f.js} +1 -1
  137. package/dist/client/assets/{popover-DQkswBqg.js → popover-If2D04hv.js} +1 -1
  138. package/dist/client/assets/{post-calendar-1D7-ugH1.js → post-calendar-_2sAU49Y.js} +1 -1
  139. package/dist/client/assets/{post-editor-DP4ChZHv.js → post-editor-Zk0Tm9uH.js} +1 -1
  140. package/dist/client/assets/{primitives-25tu4EdT.js → primitives-Bbg6u6XW.js} +1 -1
  141. package/dist/client/assets/{profile-D92F9cRB.js → profile-D0yNqtWs.js} +1 -1
  142. package/dist/client/assets/{project-app-view-CF8pxHiS.js → project-app-view-DYhcKdZW.js} +1 -1
  143. package/dist/client/assets/{prompts-D32AGYgu.js → prompts-BWkGzrDr.js} +1 -1
  144. package/dist/client/assets/record-editor-B4QVewxw.js +1 -0
  145. package/dist/client/assets/redirect-editor-CzUqckYJ.js +1 -0
  146. package/dist/client/assets/registry-C5pJ9d_K.js +2 -0
  147. package/dist/client/assets/{registry-layout-BYJ4EMZu.js → registry-layout-CLEVdutL.js} +1 -1
  148. package/dist/client/assets/{reports-c7Y6kWdt.js → reports-Crw9j2hu.js} +1 -1
  149. package/dist/client/assets/{require-capability-BDh-qplC.js → require-capability-DfH6z05e.js} +1 -1
  150. package/dist/client/assets/{required-auth-layout-DeCqKjmu.js → required-auth-layout-DqEnT119.js} +1 -1
  151. package/dist/client/assets/{reset-password-CMvXUf-N.js → reset-password-kid4OXSX.js} +1 -1
  152. package/dist/client/assets/{review-settings-BJvspPc1.js → review-settings-BT83EPcr.js} +1 -1
  153. package/dist/client/assets/{roles-BpwZp_fx.js → roles-BqBiL4PM.js} +1 -1
  154. package/dist/client/assets/{scroll-area-w2kYu_oz.js → scroll-area-DU8Ibx6i.js} +1 -1
  155. package/dist/client/assets/{search-input-Bw8H-vxX.js → search-input-By6KJCAU.js} +1 -1
  156. package/dist/client/assets/{secrets-Ddl4DPm_.js → secrets-FlYLmGbS.js} +1 -1
  157. package/dist/client/assets/{sections-editor-DaKbqfLT.js → sections-editor-BbYrmZD7.js} +1 -1
  158. package/dist/client/assets/{select-1BaCBI6X.js → select-CFw9zVOp.js} +1 -1
  159. package/dist/client/assets/{select-model-Bz9mMUDk.js → select-model-CithTGMh.js} +1 -1
  160. package/dist/client/assets/{self-tool-result-C6LvX5KJ.js → self-tool-result-DM6h1PYI.js} +1 -1
  161. package/dist/client/assets/{seo-editor-D95ihmDC.js → seo-editor-BGJcK_dD.js} +1 -1
  162. package/dist/client/assets/{settings-layout-Z7q8JWjI.js → settings-layout-B1BGgP9o.js} +1 -1
  163. package/dist/client/assets/{shell-controls-CG42xMKF.js → shell-controls-CgADbB3e.js} +1 -1
  164. package/dist/client/assets/{shell-layout-C4lLOvzu.js → shell-layout-CoGSaRZv.js} +1 -1
  165. package/dist/client/assets/{spinner-PpmrIBv-.js → spinner-BV8DqFIs.js} +1 -1
  166. package/dist/client/assets/{sso-DfTN64aM.js → sso-D-ZrE89R.js} +1 -1
  167. package/dist/client/assets/{store-BfRHeOow.js → store-Bc_bBUc7.js} +1 -1
  168. package/dist/client/assets/store-registry-B68MUNUv.js +2 -0
  169. package/dist/client/assets/{super-agent-icon-BYZPskOb.js → super-agent-icon-DU04sOQc.js} +1 -1
  170. package/dist/client/assets/{switch-4QvRINMP.js → switch--xQ7kaDU.js} +1 -1
  171. package/dist/client/assets/{synced-repos-DLKpbkI0.js → synced-repos-Biy9etbn.js} +1 -1
  172. package/dist/client/assets/{table-BO8OX3vv.js → table-4fFr5X3V.js} +1 -1
  173. package/dist/client/assets/{tabs-gwpi033l.js → tabs-DE8Uy3qS.js} +1 -1
  174. package/dist/client/assets/{task-board-C3d3TGQV.js → task-board-BiByHFh1.js} +1 -1
  175. package/dist/client/assets/{tasks-BG4ezYqY.js → tasks-Dv5scTC4.js} +1 -1
  176. package/dist/client/assets/{textarea-CVG93z3-.js → textarea-BIyCQMXE.js} +1 -1
  177. package/dist/client/assets/{toggle-group-BMFk5xP_.js → toggle-group-Ban17rBs.js} +1 -1
  178. package/dist/client/assets/{toolbar-DsSK7GUk.js → toolbar-BszG6pRV.js} +1 -1
  179. package/dist/client/assets/{track-DsSJOC_7.js → track-CRc7DoaF.js} +1 -1
  180. package/dist/client/assets/{types-Bkm-aXjf.js → types-CP0iwckl.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-BQi9bDDu.js → use-ai-providers-C6DxxrIw.js} +1 -1
  182. package/dist/client/assets/{use-api-keys-DPSHdUwU.js → use-api-keys-C22ovyI6.js} +1 -1
  183. package/dist/client/assets/{use-automations-BARFeJzu.js → use-automations-Dv4L_mqz.js} +1 -1
  184. package/dist/client/assets/{use-autosave-C40ILQWe.js → use-autosave-B3Ol1QtM.js} +1 -1
  185. package/dist/client/assets/{use-connection-2x9fb5ob.js → use-connection-BC-1N3cQ.js} +1 -1
  186. package/dist/client/assets/{use-copy-D6q621nq.js → use-copy-hIsI1Npw.js} +1 -1
  187. package/dist/client/assets/{use-create-virtual-mcp-8KBktLi_.js → use-create-virtual-mcp-DpPqjETZ.js} +1 -1
  188. package/dist/client/assets/{use-debounced-autosave-ByE9_r83.js → use-debounced-autosave-Bc2vPK15.js} +1 -1
  189. package/dist/client/assets/{use-debounced-value-B3MsngYH.js → use-debounced-value-CDyQcr4h.js} +1 -1
  190. package/dist/client/assets/{use-decopilot-events-BzwiM0xY.js → use-decopilot-events-D1jhrYA5.js} +1 -1
  191. package/dist/client/assets/{use-delete-connection-DutAVPzy.js → use-delete-connection-Cw-nlqJU.js} +1 -1
  192. package/dist/client/assets/{use-deployment-admin-DQN4dFvz.js → use-deployment-admin-CMGRAd7Z.js} +1 -1
  193. package/dist/client/assets/{use-destination-route-BrdQQ-kc.js → use-destination-route-ryxqobAF.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-CDoOpOCX.js → use-file-configs-Wie4CKvq.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-DX6iXRSu.js → use-infinite-scroll-CitCgVws.js} +1 -1
  196. package/dist/client/assets/{use-join-requests-CBNkXa-y.js → use-join-requests-BWcZjMaY.js} +1 -1
  197. package/dist/client/assets/{use-mcp-auth-status-DK_exDs4.js → use-mcp-auth-status-BIoyHUqD.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-CnMD0VyF.js → use-mcp-client-BCLniVpi.js} +1 -1
  199. package/dist/client/assets/{use-mcp-tools-CbaVLW4s.js → use-mcp-tools-BZwaAMhe.js} +1 -1
  200. package/dist/client/assets/{use-members-CM-DF5W6.js → use-members-DkgeBVL-.js} +1 -1
  201. package/dist/client/assets/{use-navigate-to-agent-Bygsb-nA.js → use-navigate-to-agent-DSUm9cYC.js} +1 -1
  202. package/dist/client/assets/{use-org-auth-client-lKjWGDyC.js → use-org-auth-client-BTYz4Get.js} +1 -1
  203. package/dist/client/assets/{use-org-repo-syncs-D9QTQ1a9.js → use-org-repo-syncs-5qnhLJ1m.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-BkgHoA6y.js → use-org-sso-ILC2SFH4.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-0BYkHS0Y.js → use-organization-roles-Bw-nhwHu.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-CIP8cnSJ.js → use-organization-settings-CS8eH9p-.js} +1 -1
  207. package/dist/client/assets/{use-panel-navigate-DNTQOebl.js → use-panel-navigate-D8J7h7Ug.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-U4ZKdycM.js → use-registry-connections-CkL-7k1R.js} +1 -1
  209. package/dist/client/assets/{use-secrets-Cwj09Kyw.js → use-secrets-ykqA76r4.js} +1 -1
  210. package/dist/client/assets/{use-section-preview-base-Dz7_MRTE.js → use-section-preview-base-vTLGJTTw.js} +1 -1
  211. package/dist/client/assets/{use-status-sounds-C8_GjLUB.js → use-status-sounds-DkcUZrtO.js} +1 -1
  212. package/dist/client/assets/{use-tags-DhiwmTSl.js → use-tags-TFH74lb0.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-C-K5PCMt.js → use-view-mode-DvqUeq37.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-8bLSmTsv.js → use-virtual-mcp-CTSK4a1q.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-CI3XHdhq.js +1 -0
  216. package/dist/client/assets/useSuspenseInfiniteQuery-VLjgFDWa.js +1 -0
  217. package/dist/client/assets/{users-DEdsmI2o.js → users-BYS0Fc9_.js} +1 -1
  218. package/dist/client/assets/{variant-calendar-DVRYa4YV.js → variant-calendar-D77tQewW.js} +1 -1
  219. package/dist/client/assets/{view-mode-toggle-CXSKeXpf.js → view-mode-toggle-DWyJ7Fpd.js} +1 -1
  220. package/dist/client/index.html +1 -1
  221. package/dist/server/cli.js +1 -1
  222. package/dist/server/server.js +1 -1
  223. package/package.json +1 -1
  224. package/dist/client/assets/record-editor--ri3yu2E.js +0 -1
  225. package/dist/client/assets/redirect-editor-CDA5Oq52.js +0 -1
  226. package/dist/client/assets/registry-C9OUHWDv.js +0 -2
  227. package/dist/client/assets/store-registry-DSOoui55.js +0 -2
  228. package/dist/client/assets/useInfiniteQuery-DRkeRQOH.js +0 -1
  229. package/dist/client/assets/useSuspenseInfiniteQuery-FHZdNBvJ.js +0 -1
@@ -1 +1 @@
1
- import{c as K,b as X,r as Z,j as o,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-BTAjo3Gc.js";import{r as gt,a6 as at,aF as bt}from"./agent-icon-DOpXozg9.js";import{i as vt}from"./ChevronRight-Cs10Jm8L.js";import{L as yt}from"./label-xbEfDIHO.js";import{S as lt}from"./scroll-area-w2kYu_oz.js";import{S as jt}from"./switch-4QvRINMP.js";import{V as Tt}from"./view-mode-toggle-CXSKeXpf.js";import{bP as ct,bQ as mt,bR as Nt,bS as _t,bT as kt,bU as U,bV as wt}from"./index-_735stkr.js";import"./AlertCircle-CBwIrPPb.js";import"./UserSquare-CV3RLHOa.js";import"./Tool01-BSNLNHNW.js";import"./ArrowUp-DEtX0ZN8.js";import"./ArrowLeft-qH_ye1J6.js";import"./Tool02-BdRGRa83.js";import"./XCircle-DxchKayQ.js";import"./TrendUp01-DiISHgUB.js";import"./ZapSquare-DwoLrslo.js";import"./Users03-CQZU6epa.js";import"./CheckCircle-BegfRG2j.js";import"./Check-DfWHyApv.js";import"./ChevronDown-CIeYjal6.js";import"./ChevronSelectorVertical-jaA6p2pC.js";import"./ChevronUp-LrbyxJeG.js";import"./DotsVertical-CrhmuzYz.js";import"./Stars02-Dm1WK3vP.js";import"./Copy01-Dca4umlh.js";import"./CreditCard01-BoBhJ6ou.js";import"./Download01-7iFQ3GPU.js";import"./Settings02-BKcZZrtU.js";import"./Eye-B9_hF1St.js";import"./FilterLines-JjhPAtfq.js";import"./Share07-Cm9hC0Yi.js";import"./Globe01-BODMVNbb.js";import"./Globe04-BhdBOMF1.js";import"./SwitchHorizontal01-Cgz8QAih.js";import"./HardDrive-Ch-yZbR_.js";import"./Key01-CJA9-bCb.js";import"./LinkExternal01-CicQH1tw.js";import"./LockUnlocked01-DcoaeWcH.js";import"./LogOut01-0-Ut5jdL.js";import"./Monitor01-DA5hHmOm.js";import"./Sun-Bm1jbAxA.js";import"./Palette-CaLkCeYK.js";import"./Play-CjbzAnSz.js";import"./Plus-DLtVR3IB.js";import"./SearchLg-CiXdS9Mb.js";import"./SearchMd-CHRnb8Ay.js";import"./Shield01-lgvFbHBZ.js";import"./Stars01-CXqutOle.js";import"./Trash01-BSWt74RV.js";import"./Upload01-BPcxRp0w.js";import"./User01-CPIlpmSI.js";import"./Users01-DZaWmTLL.js";import"./XClose-CEd_w8Kc.js";import"./Zap-Cr-4rKk6.js";import"./select-1BaCBI6X.js";import"./chat-context-5QqOY7-J.js";import"./use-panel-navigate-DNTQOebl.js";import"./dialog-BDmUCtZo.js";import"./use-destination-route-BrdQQ-kc.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-D5cEzZTo.js";import"./use-mcp-client-CnMD0VyF.js";import"./auth-C0ya2_eb.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DqSRupe2.js";import"./task-board-C3d3TGQV.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-8bLSmTsv.js";import"./use-ai-providers-BQi9bDDu.js";import"./use-decopilot-events-BzwiM0xY.js";import"./use-organization-settings-CIP8cnSJ.js";import"./automation-runs-D3kdIjbZ.js";import"./useInfiniteQuery-DRkeRQOH.js";import"./use-infinite-scroll-DX6iXRSu.js";import"./use-connection-2x9fb5ob.js";import"./table-BO8OX3vv.js";import"./empty-state-T3sJArWn.js";import"./use-members-CM-DF5W6.js";import"./use-org-auth-client-lKjWGDyC.js";import"./use-automations-BARFeJzu.js";import"./useSuspenseInfiniteQuery-FHZdNBvJ.js";import"./avatar-CYmZSM_1.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D6q621nq.js";import"./monaco-editor-802XwktR.js";import"./spinner-PpmrIBv-.js";import"./types-Bkm-aXjf.js";import"./shell-layout-C4lLOvzu.js";import"./required-auth-layout-DeCqKjmu.js";import"./use-org-sso-BkgHoA6y.js";import"./integration-icon-DlbE7Gr0.js";import"./use-navigate-to-agent-Bygsb-nA.js";import"./chart-CrEK6PSs.js";import"./index-D0SQspQ7.js";import"./form-Ba1wcOo3.js";import"./input-YEbMxdZS.js";import"./file-type-icon-sO2hN5jM.js";import"./drawer-Bf_wXJLl.js";import"./collection-search-oG392hGv.js";import"./tabs-gwpi033l.js";import"./toggle-group-BMFk5xP_.js";import"./super-agent-icon-BYZPskOb.js";import"./self-tool-result-C6LvX5KJ.js";import"./alert-dialog-1z09vLUX.js";import"./extract-connection-data-gHDjR_pa.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-B3MsngYH.js";import"./authenticate-and-persist-oauth-KbUMWqbo.js";import"./mcp-oauth-DBkQ7wH_.js";import"./track-DsSJOC_7.js";import"./popover-DQkswBqg.js";import"./toolbar-DsSK7GUk.js";import"./github-repo-picker-BQ9FqmVY.js";import"./use-mcp-tools-CbaVLW4s.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-BtrlWvje.js";import"./use-registry-connections-U4ZKdycM.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CVG93z3-.js";import"./connection-form-helpers-DnrYJlcI.js";import"./collection-tabs-CKMFb25P.js";import"./badge-BfUJKkzo.js";import"./select-model-Bz9mMUDk.js";import"./checkbox-C2CrORhD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-DC4JUx4m.js";import"./dropdown-menu-CES77-Lv.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C8_GjLUB.js";import"./use-file-configs-CDoOpOCX.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-ByE9_r83.js";import"./search-input-Bw8H-vxX.js";import"./use-mcp-auth-status-DK_exDs4.js";import"./use-secrets-Cwj09Kyw.js";import"./AreaChart-Bv0fe7ER.js";import"./config-CW9QRkoF.js";import"./breadcrumb-WYTBTa-X.js";import"./command-CEvbU0nM.js";import"./index-C7avnFky.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-DhiwmTSl.js";import"./automation-list-row-1nfL4PJ_.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-D9QTQ1a9.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 Pt(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 Ot(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)?"":Ot(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=Pt(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=X();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 Qn(e){const t=K.c(72),{decofile:r}=e,n=X(),[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 P;t[48]!==D?(P={value:"timeline",icon:F,label:D},t[48]=D,t[49]=P):P=t[49];let O;t[50]!==S||t[51]!==P?(O=[S,P],t[50]=S,t[51]=P,t[52]=O):O=t[52];let H;t[53]!==O||t[54]!==s?(H=o.jsx(Tt,{value:s,onValueChange:i,options:O}),t[53]=O,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 Q;return t[69]!==W||t[70]!==G?(Q=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Q):Q=t[71],Q}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=X();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,Qt=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(Xt)}),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:Qt,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 Xt(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=X(),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()),P=Math.min(S.end.getTime(),a.getTime());if(P<=D)return null;const O=h(new Date(D)),H=h(new Date(P))-O;return o.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,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{Qn as VariantCalendar};
1
+ import{c as K,b as X,r as Z,j as o,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-BC3OycCV.js";import{r as gt,a6 as at,aF as bt}from"./agent-icon-D080UAkK.js";import{i as vt}from"./ChevronRight-DN8wQOqh.js";import{L as yt}from"./label-BtUaN40E.js";import{S as lt}from"./scroll-area-DU8Ibx6i.js";import{S as jt}from"./switch--xQ7kaDU.js";import{V as Tt}from"./view-mode-toggle-DWyJ7Fpd.js";import{bP as ct,bQ as mt,bR as Nt,bS as _t,bT as kt,bU as U,bV as wt}from"./index-Cd78eLLb.js";import"./AlertCircle-ljUXZVgg.js";import"./UserSquare-CcB7EE3-.js";import"./Tool01-BjY6qOZZ.js";import"./ArrowUp-owAEYYU9.js";import"./ArrowLeft-O_poTHg5.js";import"./Tool02-D8r9WrY5.js";import"./XCircle-BLXZX6LN.js";import"./TrendUp01-fwYE1fSJ.js";import"./ZapSquare-dsonqlnJ.js";import"./Users03-CYQdFqu5.js";import"./CheckCircle-Xp4EEaHw.js";import"./Check-Dspx9Fp7.js";import"./ChevronDown-BIP5kqgM.js";import"./ChevronSelectorVertical-pB9PhHfJ.js";import"./ChevronUp-CziS5WaB.js";import"./DotsVertical-BRi7moDO.js";import"./Stars02-DZ3JRVne.js";import"./Copy01-vCqfQzFe.js";import"./CreditCard01-Do9O8xIN.js";import"./Download01-CfiTBBn_.js";import"./Settings02-BPV8iKcU.js";import"./Eye-DeuttcGY.js";import"./FilterLines-D7mDTV7W.js";import"./Share07-BGukGo7T.js";import"./Globe01-DjZFjLeY.js";import"./Globe04-JNbM0T4S.js";import"./SwitchHorizontal01-CGTTaBt7.js";import"./HardDrive-BE93B0r3.js";import"./Key01-BfP4FjhZ.js";import"./LinkExternal01-DEeO7Yqp.js";import"./LockUnlocked01-BV3keEk-.js";import"./LogOut01--nH6fRjz.js";import"./Monitor01-n4Ml3ptB.js";import"./Sun-C6ZCInWh.js";import"./Palette-DUQPyERX.js";import"./Play-j8BtRPuR.js";import"./Plus-CH75M1Z_.js";import"./SearchLg-BxkHIUp9.js";import"./SearchMd-gHnWrk04.js";import"./Shield01-BB2neh_V.js";import"./Stars01-COgnQQBe.js";import"./Trash01-C-Qo_xAi.js";import"./Upload01-B8TZG867.js";import"./User01-BVTsNjSS.js";import"./Users01-DFm0KLRk.js";import"./XClose-BI1HCDzp.js";import"./Zap-CUiG_SEX.js";import"./select-CFw9zVOp.js";import"./chat-context-D8aIMWdd.js";import"./use-panel-navigate-D8J7h7Ug.js";import"./dialog-C2z64945.js";import"./use-destination-route-ryxqobAF.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-hTPN622N.js";import"./use-mcp-client-BCLniVpi.js";import"./auth-CAzZwnob.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BmPOv_9w.js";import"./task-board-BiByHFh1.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-CTSK4a1q.js";import"./use-ai-providers-C6DxxrIw.js";import"./use-decopilot-events-D1jhrYA5.js";import"./use-organization-settings-CS8eH9p-.js";import"./automation-runs-8pT6UcJX.js";import"./useInfiniteQuery-CI3XHdhq.js";import"./use-infinite-scroll-CitCgVws.js";import"./use-connection-BC-1N3cQ.js";import"./table-4fFr5X3V.js";import"./empty-state-CJTsA7ZQ.js";import"./use-members-DkgeBVL-.js";import"./use-org-auth-client-BTYz4Get.js";import"./use-automations-Dv4L_mqz.js";import"./useSuspenseInfiniteQuery-VLjgFDWa.js";import"./avatar-C-wDTrqY.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-hIsI1Npw.js";import"./monaco-editor-BMLMMPa-.js";import"./spinner-BV8DqFIs.js";import"./types-CP0iwckl.js";import"./shell-layout-CoGSaRZv.js";import"./required-auth-layout-DqEnT119.js";import"./use-org-sso-ILC2SFH4.js";import"./integration-icon-Bmo3oT9s.js";import"./use-navigate-to-agent-DSUm9cYC.js";import"./chart-BEjRfmhR.js";import"./index-BOx0KUFh.js";import"./form-DA40jxLy.js";import"./input-CJmiU1C-.js";import"./file-type-icon-BfUDQtPj.js";import"./drawer-CUiOyXL0.js";import"./collection-search-DwpjDZgj.js";import"./tabs-DE8Uy3qS.js";import"./toggle-group-Ban17rBs.js";import"./super-agent-icon-DU04sOQc.js";import"./self-tool-result-DM6h1PYI.js";import"./alert-dialog-D80JF1FN.js";import"./extract-connection-data-BcHTU76U.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-CDyQcr4h.js";import"./authenticate-and-persist-oauth-Bl5SLBwb.js";import"./mcp-oauth-BOTsCCNI.js";import"./track-CRc7DoaF.js";import"./popover-If2D04hv.js";import"./toolbar-BszG6pRV.js";import"./github-repo-picker-CtQhVMRJ.js";import"./use-mcp-tools-BZwaAMhe.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-DG_wFSNi.js";import"./use-registry-connections-CkL-7k1R.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BIyCQMXE.js";import"./connection-form-helpers-BzuUoL8A.js";import"./collection-tabs-MkxigJjY.js";import"./badge-C3zovwOz.js";import"./select-model-CithTGMh.js";import"./checkbox-D9umlVBm.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-hEkcdw4x.js";import"./dropdown-menu-ayJVblos.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DkcUZrtO.js";import"./use-file-configs-Wie4CKvq.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-Bc2vPK15.js";import"./search-input-By6KJCAU.js";import"./use-mcp-auth-status-BIoyHUqD.js";import"./use-secrets-ykqA76r4.js";import"./AreaChart-CfjqEiiW.js";import"./config-KtrfZ-Vw.js";import"./breadcrumb-BGVJe9sP.js";import"./command-DUGT4YuA.js";import"./index-D8eVz1G2.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-TFH74lb0.js";import"./automation-list-row-B8DIsrsz.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-5qnhLJ1m.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 Pt(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 Ot(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)?"":Ot(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=Pt(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=X();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 Qn(e){const t=K.c(72),{decofile:r}=e,n=X(),[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 P;t[48]!==D?(P={value:"timeline",icon:F,label:D},t[48]=D,t[49]=P):P=t[49];let O;t[50]!==S||t[51]!==P?(O=[S,P],t[50]=S,t[51]=P,t[52]=O):O=t[52];let H;t[53]!==O||t[54]!==s?(H=o.jsx(Tt,{value:s,onValueChange:i,options:O}),t[53]=O,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 Q;return t[69]!==W||t[70]!==G?(Q=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Q):Q=t[71],Q}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=X();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,Qt=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(Xt)}),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:Qt,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 Xt(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=X(),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()),P=Math.min(S.end.getTime(),a.getTime());if(P<=D)return null;const O=h(new Date(D)),H=h(new Date(P))-O;return o.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,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{Qn 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-BTAjo3Gc.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};
1
+ import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-BC3OycCV.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};
@@ -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-BTAjo3Gc.js"></script>
53
+ <script type="module" crossorigin src="/assets/index-BC3OycCV.js"></script>
54
54
  <link rel="stylesheet" crossorigin href="/assets/index-DJSuP9VA.css">
55
55
  </head>
56
56
  <body>
@@ -1489,7 +1489,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var mp1=L(()=>{nf()});f
1489
1489
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await Ey`
1490
1490
  DELETE FROM kysely_migration WHERE name = ${X}
1491
1491
  `.execute($)}}async function ga1($){await Ts8($),await Rs8($);let Z=new ba1({db:$,provider:{getMigrations:()=>Promise.resolve(dp0)}}),{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 Is8($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await hl0();let G=X??F8(),J=async()=>{if(!Z&&!X)await eB(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await ga1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function qs8(){let $=F8(),Z=new ba1({db:$.db,provider:{getMigrations:()=>Promise.resolve(dp0)}}),{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 ua1=L(()=>{fa1();ul0();QX()});async function D70($){let Z={...process.env},X=H80($,Z);console.log(iw1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?zt1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (PZ0(),zZ0)),{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(() => (ul0(),At1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (QX(),gn1)),{migrateToLatest:F}=await Promise.resolve().then(() => (ua1(),ha1)),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 dp1(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 ip0=L(()=>{nf();Pt1();R$()});var da1={};Z0(da1,{updateService:()=>mE,subscribeCliState:()=>tp0,setTuiConsoleIntercepted:()=>w70,setServerUrl:()=>Op,setMigrationsDone:()=>Bp,setDevMode:()=>Vs8,resetCliStateForTests:()=>Ms8,isTuiConsoleIntercepted:()=>E70,getCliState:()=>np0,addLogEntry:()=>JO});function ca1(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function la1(){return{services:ca1(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function Ms8(){cQ=la1()}function Up(){for(let $ of pp0)$()}function np0(){return cQ}function tp0($){return pp0.add($),()=>pp0.delete($)}function mE($){cQ={...cQ,services:cQ.services.map((Z)=>Z.name===$.name?$:Z)},Up()}function Bp(){cQ={...cQ,migrationsStatus:"done"},Up()}function Op($){cQ={...cQ,serverUrl:$},Up()}function JO($){let Z=[...cQ.logs,$];cQ={...cQ,logs:Z.length>500?Z.slice(-500):Z},Up()}function Vs8(){cQ={...cQ,services:[...ca1(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Up()}function w70($){ma1=$}function E70(){return ma1}var cQ,pp0,ma1=!1;var dE=L(()=>{cQ=la1();pp0=new Set});import{createServer as ia1}from"net";function ks8($){return new Promise((Z)=>{let X=ia1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Lp($){if(await ks8($))return $;let Z=await new Promise((X,Q)=>{let Y=ia1();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 op0=()=>{};var ap0={};Z0(ap0,{startDevServer:()=>Cs8,pipeToLogStore:()=>rp0});import{join as Ss8}from"path";function rp0($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
1492
- `);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;JO({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)JO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Cs8($){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 Lp(Number(Y)+1):await Lp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await D70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)mE({name:D.name,status:"ready",port:D.port});Bp();let F=Ss8(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)rp0(U.stdout),rp0(U.stderr);Op(G),mE({name:"Vite",status:"ready",port:Number(Y)}),mE({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(() => (PZ0(),zZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var sp0=L(()=>{ip0();dE();op0()});var j70;var ep0=L(()=>{j70={name:"decocms",version:"4.301.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 vs8,Text as pa1}from"ink";import{jsx as xs8,jsxs as na1}from"react/jsx-runtime";function ta1({version:$}){return na1(vs8,{flexDirection:"column",marginTop:1,children:[dZ0.map((Z,X)=>xs8(pa1,{color:iZ0[X],children:Z},X)),na1(pa1,{dimColor:!0,children:[" v",$]})]})}var oa1=L(()=>{$p()});import{Box as iE,Text as KO}from"ink";import{Spinner as fs8}from"@inkjs/ui";import{jsx as XG,jsxs as jy}from"react/jsx-runtime";function ra1({status:$}){if($==="pending")return XG(fs8,{label:""});return XG(KO,{color:"green",children:"\u2713"})}function bs8($){return`${$.name}: ${$.port||"...."}`}function aa1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return jy(iE,{flexDirection:"column",paddingBottom:1,children:[XG(ta1,{version:j70.version}),XG(iE,{marginBottom:1,children:XG(KO,{dimColor:!0,children:"\u2500".repeat(80)})}),XG(iE,{children:jy(KO,{dimColor:!0,children:["Home: ",X]})}),jy(iE,{gap:2,children:[$.map((Y)=>jy(iE,{gap:1,children:[XG(KO,{children:bs8(Y)}),XG(ra1,{status:Y.status})]},Y.name)),jy(iE,{gap:1,children:[XG(KO,{children:"Migrations"}),XG(ra1,{status:Z})]})]}),XG(iE,{children:Q?jy(KO,{children:["Open in browser: ",XG(KO,{color:"cyan",children:Q})]}):XG(KO,{dimColor:!0,children:"Starting..."})})]})}var sa1=L(()=>{ep0();oa1()});import{Box as ys8,Text as Dp}from"ink";import{jsx as $n0,jsxs as Zn0}from"react/jsx-runtime";function gs8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function ea1({logs:$}){return $n0(ys8,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return $n0(Dp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Zn0(Dp,{children:[Zn0(Dp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),$n0(Dp,{color:gs8(Z.status),children:Z.status}),Zn0(Dp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var $s1=()=>{};var Xn0={};Z0(Xn0,{App:()=>cs8});import{Box as hs8}from"ink";import{useSyncExternalStore as us8}from"react";import{jsx as Zs1,jsxs as ls8}from"react/jsx-runtime";function cs8({home:$}){let Z=us8(tp0,np0);return ls8(hs8,{flexDirection:"column",children:[Zs1(aa1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Zs1(ea1,{logs:Z.logs})]})}var Qn0=L(()=>{sa1();$s1();dE()});var c3="thread-gate",HN="decopilot-hosted-harness",FN="decopilot-hosted-harness-sandboxed",wJ="automations",WO="background-tools",pE="task-board-github-reads",nE="jira-push";var Xs1="9";function Qs1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Xs1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ys1=()=>{};import ms8 from"pg";async function Js1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=ds8}=$,Y=$.log??((W)=>console.log(W)),G=new ms8.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",[Gs1.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 H$(is8)}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)",[Gs1.toString()])}catch{}await G.end().catch(()=>{})}}var Gs1=8314027461559302n,ds8=600000,is8=500;var Ks1=L(()=>{J4()});function ps8(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Yn0($,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 Ws1(){let $=ps8();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Yn0($,"--cpu-prof-dir")??process.cwd(),name:Yn0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Yn0($,"--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 Hs1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=hE();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 Fs1=()=>{};import*as ns8 from"bun:jsc";function Ns1(){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{ts8()}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=os8()?.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 ts8,os8;var Us1=L(()=>{({startSamplingProfiler:ts8,samplingProfilerStackTraces:os8}=ns8)});function Bs1(){Ws1();let $=[Hs1(),Sn1(),Ns1()];return()=>{for(let Z of $)Z()}}var Os1=L(()=>{Sl0();Fs1();Us1()});var tE=v((Ls1)=>{Object.defineProperty(Ls1,"__esModule",{value:!0});Ls1.RepublishHeaders=Ls1.DirectMsgHeaders=Ls1.JsHeaders=Ls1.AdvisoryKind=void 0;Ls1.isOrderedPushConsumerOptions=rs8;Ls1.isPullConsumer=as8;Ls1.isPushConsumer=ss8;Ls1.isBoundPushConsumerOptions=es8;function rs8($){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 as8($){return $.isPullConsumer()}function ss8($){return $.isPushConsumer()}function es8($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ls1.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"};Ls1.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"};Ls1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ls1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var QG=v((ws1)=>{Object.defineProperty(ws1,"__esModule",{value:!0});ws1.TD=ws1.TE=ws1.Empty=void 0;ws1.encode=We8;ws1.decode=He8;ws1.Empty=new Uint8Array(0);ws1.TE=new TextEncoder;ws1.TD=new TextDecoder;function Ke8(...$){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 We8(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(ws1.TE.encode($[X]));if(Z.length===0)return ws1.Empty;if(Z.length===1)return Z[0];return Ke8(...Z)}function He8($){if(!$||$.length===0)return"";return ws1.TD.decode($)}});var YG=v((zs1)=>{Object.defineProperty(zs1,"__esModule",{value:!0});zs1.errors=zs1.PermissionViolationError=zs1.NoRespondersError=zs1.TimeoutError=zs1.RequestError=zs1.ProtocolError=zs1.ConnectionError=zs1.DrainingConnectionError=zs1.ClosedConnectionError=zs1.AuthorizationError=zs1.UserAuthenticationExpiredError=zs1.InvalidOperationError=zs1.InvalidArgumentError=zs1.InvalidSubjectError=void 0;class Jn0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}zs1.InvalidSubjectError=Jn0;class P70 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 P70(`${$} ${Z}`,X)}}zs1.InvalidArgumentError=P70;class Kn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}zs1.InvalidOperationError=Kn0;class A70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new A70($);return null}}zs1.UserAuthenticationExpiredError=A70;class T70 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 T70($);return null}}zs1.AuthorizationError=T70;class Wn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}zs1.ClosedConnectionError=Wn0;class Hn0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}zs1.DrainingConnectionError=Hn0;class Fn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}zs1.ConnectionError=Fn0;class Nn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}zs1.ProtocolError=Nn0;class Un0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof R70}}zs1.RequestError=Un0;class Bn0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}zs1.TimeoutError=Bn0;class R70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}zs1.NoRespondersError=R70;class I70 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 I70($,X,Q,Y)}}zs1.PermissionViolationError=I70;zs1.errors={AuthorizationError:T70,ClosedConnectionError:Wn0,ConnectionError:Fn0,DrainingConnectionError:Hn0,InvalidArgumentError:P70,InvalidOperationError:Kn0,InvalidSubjectError:Jn0,NoRespondersError:R70,PermissionViolationError:I70,ProtocolError:Nn0,RequestError:Un0,TimeoutError:Bn0,UserAuthenticationExpiredError:A70}});var l3=v((Is1)=>{Object.defineProperty(Is1,"__esModule",{value:!0});Is1.SimpleMutex=Is1.Perf=void 0;Is1.extend=qe8;Is1.render=Me8;Is1.timeout=Ve8;Is1.delay=ke8;Is1.deadline=Se8;Is1.deferred=Ln0;Is1.debugDeferred=Ce8;Is1.shuffle=_e8;Is1.collect=ve8;Is1.jitter=Rs1;Is1.backoff=xe8;Is1.nanos=fe8;Is1.millis=be8;Is1.randomToken=he8;var Ie8=QG(),On0=YG();function qe8($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Me8($){return Ie8.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Ve8($,Z=!0){let X=Z?new On0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new On0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function ke8($=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 Se8($,Z=1000){let X=Ln0(),Q=setTimeout(()=>{X.reject(new On0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function Ln0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Ce8(){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 _e8($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function ve8($){let Z=[];for await(let X of $)Z.push(X);return Z}class As1{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})}),$}}Is1.Perf=As1;class Ts1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Ln0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Is1.SimpleMutex=Ts1;function Rs1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function xe8($=[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 Rs1(X>Z?$[Z]:$[X])}}}function fe8($){return $*1e6}function be8($){return Math.floor($/1e6)}var ye8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",NN=new Uint8Array(62);for(let $=0;$<62;$++)NN[$]=ye8.charCodeAt($);var ge8=218340105584896;function he8(){let $=Math.floor(Math.random()*ge8),Z=$%62,X=NN[Z];$=($-Z)/62,Z=$%62;let Q=NN[Z];$=($-Z)/62,Z=$%62;let Y=NN[Z];$=($-Z)/62,Z=$%62;let G=NN[Z];$=($-Z)/62,Z=$%62;let J=NN[Z];$=($-Z)/62,Z=$%62;let K=NN[Z];$=($-Z)/62,Z=$%62;let W=NN[Z];$=($-Z)/62;let H=NN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var vs1=v((Cs1)=>{Object.defineProperty(Cs1,"__esModule",{value:!0});Cs1.nuid=Cs1.NuidImpl=void 0;var Z04="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",HO=62,M70=12,ks1=10,Ms1=33,X04=333,Vs1=M70+ks1,wn0=new Uint8Array(HO);for(let $=0;$<HO;$++)wn0[$]=Z04.charCodeAt($);var q70=4294967296,Ss1=BigInt(HO)**BigInt(ks1),wp=Number(Ss1/(1n<<32n)),Dn0=Number(Ss1%(1n<<32n));function Q04($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Y04($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Q04($)}class En0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Vs1),this.cbuf=new Uint8Array(M70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(wp+1)),this.seqLo=Math.floor(Math.random()*q70);while($++<8&&this.seqHi===wp&&this.seqLo>=Dn0);if(this.seqHi===wp&&this.seqLo>=Dn0)this.seqLo=0;this.inc=Math.random()*(X04-Ms1)+Ms1|0}setPre(){Y04(this.cbuf);for(let $=0;$<M70;$++)this.buf[$]=wn0[this.cbuf[$]%HO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Vs1-1;X>=M70;X--){let Q=Math.floor($/HO),G=($-Q*HO)*q70+Z,J=Math.floor(G/HO),K=G-J*HO;this.buf[X]=wn0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=q70)this.seqLo-=q70,this.seqHi+=1;if(this.seqHi>wp||this.seqHi===wp&&this.seqLo>=Dn0)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()}}Cs1.NuidImpl=En0;Cs1.nuid=new En0});var ys1=v((fs1)=>{Object.defineProperty(fs1,"__esModule",{value:!0});fs1.nuid=fs1.Nuid=void 0;var xs1=vs1();fs1.Nuid=xs1.NuidImpl;fs1.nuid=xs1.nuid});var k70=v((V70)=>{Object.defineProperty(V70,"__esModule",{value:!0});V70.nuid=V70.Nuid=void 0;var gs1=ys1();Object.defineProperty(V70,"Nuid",{enumerable:!0,get:function(){return gs1.Nuid}});Object.defineProperty(V70,"nuid",{enumerable:!0,get:function(){return gs1.nuid}})});var FO=v((hs1)=>{Object.defineProperty(hs1,"__esModule",{value:!0});hs1.DEFAULT_HOST=hs1.DEFAULT_PORT=hs1.Match=void 0;hs1.syncIterator=F04;hs1.createInbox=N04;var W04=k70(),H04=YG();hs1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function F04($){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 N04($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw H04.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${W04.nuid.next()}`}hs1.DEFAULT_PORT=4222;hs1.DEFAULT_HOST="127.0.0.1"});var Ep=v((ms1)=>{Object.defineProperty(ms1,"__esModule",{value:!0});ms1.DataBuffer=void 0;var cs1=QG();class ls1{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 cs1.TE.encode($)}static toAscii($){return cs1.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}}ms1.DataBuffer=ls1});var oE=v((ps1)=>{Object.defineProperty(ps1,"__esModule",{value:!0});ps1.LF=ps1.CR=ps1.CRLF=ps1.CR_LF_LEN=ps1.CR_LF=void 0;ps1.setTransportFactory=j04;ps1.defaultPort=z04;ps1.getUrlParseFn=P04;ps1.newTransport=A04;ps1.getResolveFn=T04;ps1.protoLen=is1;ps1.extractProtocolMessage=R04;var D04=QG(),w04=FO(),E04=Ep(),GG;function j04($){GG=$}function z04(){return GG!==void 0&&GG.defaultPort!==void 0?GG.defaultPort:w04.DEFAULT_PORT}function P04(){return GG!==void 0&&GG.urlParseFn?GG.urlParseFn:void 0}function A04(){if(!GG||typeof GG.factory!=="function")throw Error("transport fn is not set");return GG.factory()}function T04(){return GG!==void 0&&GG.dnsResolveFn?GG.dnsResolveFn:void 0}ps1.CR_LF=`\r
1492
+ `);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;JO({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)JO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Cs8($){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 Lp(Number(Y)+1):await Lp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await D70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)mE({name:D.name,status:"ready",port:D.port});Bp();let F=Ss8(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)rp0(U.stdout),rp0(U.stderr);Op(G),mE({name:"Vite",status:"ready",port:Number(Y)}),mE({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(() => (PZ0(),zZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var sp0=L(()=>{ip0();dE();op0()});var j70;var ep0=L(()=>{j70={name:"decocms",version:"4.301.1",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","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 vs8,Text as pa1}from"ink";import{jsx as xs8,jsxs as na1}from"react/jsx-runtime";function ta1({version:$}){return na1(vs8,{flexDirection:"column",marginTop:1,children:[dZ0.map((Z,X)=>xs8(pa1,{color:iZ0[X],children:Z},X)),na1(pa1,{dimColor:!0,children:[" v",$]})]})}var oa1=L(()=>{$p()});import{Box as iE,Text as KO}from"ink";import{Spinner as fs8}from"@inkjs/ui";import{jsx as XG,jsxs as jy}from"react/jsx-runtime";function ra1({status:$}){if($==="pending")return XG(fs8,{label:""});return XG(KO,{color:"green",children:"\u2713"})}function bs8($){return`${$.name}: ${$.port||"...."}`}function aa1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return jy(iE,{flexDirection:"column",paddingBottom:1,children:[XG(ta1,{version:j70.version}),XG(iE,{marginBottom:1,children:XG(KO,{dimColor:!0,children:"\u2500".repeat(80)})}),XG(iE,{children:jy(KO,{dimColor:!0,children:["Home: ",X]})}),jy(iE,{gap:2,children:[$.map((Y)=>jy(iE,{gap:1,children:[XG(KO,{children:bs8(Y)}),XG(ra1,{status:Y.status})]},Y.name)),jy(iE,{gap:1,children:[XG(KO,{children:"Migrations"}),XG(ra1,{status:Z})]})]}),XG(iE,{children:Q?jy(KO,{children:["Open in browser: ",XG(KO,{color:"cyan",children:Q})]}):XG(KO,{dimColor:!0,children:"Starting..."})})]})}var sa1=L(()=>{ep0();oa1()});import{Box as ys8,Text as Dp}from"ink";import{jsx as $n0,jsxs as Zn0}from"react/jsx-runtime";function gs8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function ea1({logs:$}){return $n0(ys8,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return $n0(Dp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Zn0(Dp,{children:[Zn0(Dp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),$n0(Dp,{color:gs8(Z.status),children:Z.status}),Zn0(Dp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var $s1=()=>{};var Xn0={};Z0(Xn0,{App:()=>cs8});import{Box as hs8}from"ink";import{useSyncExternalStore as us8}from"react";import{jsx as Zs1,jsxs as ls8}from"react/jsx-runtime";function cs8({home:$}){let Z=us8(tp0,np0);return ls8(hs8,{flexDirection:"column",children:[Zs1(aa1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Zs1(ea1,{logs:Z.logs})]})}var Qn0=L(()=>{sa1();$s1();dE()});var c3="thread-gate",HN="decopilot-hosted-harness",FN="decopilot-hosted-harness-sandboxed",wJ="automations",WO="background-tools",pE="task-board-github-reads",nE="jira-push";var Xs1="9";function Qs1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Xs1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ys1=()=>{};import ms8 from"pg";async function Js1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=ds8}=$,Y=$.log??((W)=>console.log(W)),G=new ms8.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",[Gs1.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 H$(is8)}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)",[Gs1.toString()])}catch{}await G.end().catch(()=>{})}}var Gs1=8314027461559302n,ds8=600000,is8=500;var Ks1=L(()=>{J4()});function ps8(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Yn0($,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 Ws1(){let $=ps8();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Yn0($,"--cpu-prof-dir")??process.cwd(),name:Yn0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Yn0($,"--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 Hs1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=hE();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 Fs1=()=>{};import*as ns8 from"bun:jsc";function Ns1(){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{ts8()}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=os8()?.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 ts8,os8;var Us1=L(()=>{({startSamplingProfiler:ts8,samplingProfilerStackTraces:os8}=ns8)});function Bs1(){Ws1();let $=[Hs1(),Sn1(),Ns1()];return()=>{for(let Z of $)Z()}}var Os1=L(()=>{Sl0();Fs1();Us1()});var tE=v((Ls1)=>{Object.defineProperty(Ls1,"__esModule",{value:!0});Ls1.RepublishHeaders=Ls1.DirectMsgHeaders=Ls1.JsHeaders=Ls1.AdvisoryKind=void 0;Ls1.isOrderedPushConsumerOptions=rs8;Ls1.isPullConsumer=as8;Ls1.isPushConsumer=ss8;Ls1.isBoundPushConsumerOptions=es8;function rs8($){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 as8($){return $.isPullConsumer()}function ss8($){return $.isPushConsumer()}function es8($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ls1.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"};Ls1.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"};Ls1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ls1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var QG=v((ws1)=>{Object.defineProperty(ws1,"__esModule",{value:!0});ws1.TD=ws1.TE=ws1.Empty=void 0;ws1.encode=We8;ws1.decode=He8;ws1.Empty=new Uint8Array(0);ws1.TE=new TextEncoder;ws1.TD=new TextDecoder;function Ke8(...$){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 We8(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(ws1.TE.encode($[X]));if(Z.length===0)return ws1.Empty;if(Z.length===1)return Z[0];return Ke8(...Z)}function He8($){if(!$||$.length===0)return"";return ws1.TD.decode($)}});var YG=v((zs1)=>{Object.defineProperty(zs1,"__esModule",{value:!0});zs1.errors=zs1.PermissionViolationError=zs1.NoRespondersError=zs1.TimeoutError=zs1.RequestError=zs1.ProtocolError=zs1.ConnectionError=zs1.DrainingConnectionError=zs1.ClosedConnectionError=zs1.AuthorizationError=zs1.UserAuthenticationExpiredError=zs1.InvalidOperationError=zs1.InvalidArgumentError=zs1.InvalidSubjectError=void 0;class Jn0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}zs1.InvalidSubjectError=Jn0;class P70 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 P70(`${$} ${Z}`,X)}}zs1.InvalidArgumentError=P70;class Kn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}zs1.InvalidOperationError=Kn0;class A70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new A70($);return null}}zs1.UserAuthenticationExpiredError=A70;class T70 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 T70($);return null}}zs1.AuthorizationError=T70;class Wn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}zs1.ClosedConnectionError=Wn0;class Hn0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}zs1.DrainingConnectionError=Hn0;class Fn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}zs1.ConnectionError=Fn0;class Nn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}zs1.ProtocolError=Nn0;class Un0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof R70}}zs1.RequestError=Un0;class Bn0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}zs1.TimeoutError=Bn0;class R70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}zs1.NoRespondersError=R70;class I70 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 I70($,X,Q,Y)}}zs1.PermissionViolationError=I70;zs1.errors={AuthorizationError:T70,ClosedConnectionError:Wn0,ConnectionError:Fn0,DrainingConnectionError:Hn0,InvalidArgumentError:P70,InvalidOperationError:Kn0,InvalidSubjectError:Jn0,NoRespondersError:R70,PermissionViolationError:I70,ProtocolError:Nn0,RequestError:Un0,TimeoutError:Bn0,UserAuthenticationExpiredError:A70}});var l3=v((Is1)=>{Object.defineProperty(Is1,"__esModule",{value:!0});Is1.SimpleMutex=Is1.Perf=void 0;Is1.extend=qe8;Is1.render=Me8;Is1.timeout=Ve8;Is1.delay=ke8;Is1.deadline=Se8;Is1.deferred=Ln0;Is1.debugDeferred=Ce8;Is1.shuffle=_e8;Is1.collect=ve8;Is1.jitter=Rs1;Is1.backoff=xe8;Is1.nanos=fe8;Is1.millis=be8;Is1.randomToken=he8;var Ie8=QG(),On0=YG();function qe8($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Me8($){return Ie8.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Ve8($,Z=!0){let X=Z?new On0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new On0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function ke8($=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 Se8($,Z=1000){let X=Ln0(),Q=setTimeout(()=>{X.reject(new On0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function Ln0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Ce8(){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 _e8($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function ve8($){let Z=[];for await(let X of $)Z.push(X);return Z}class As1{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})}),$}}Is1.Perf=As1;class Ts1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Ln0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Is1.SimpleMutex=Ts1;function Rs1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function xe8($=[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 Rs1(X>Z?$[Z]:$[X])}}}function fe8($){return $*1e6}function be8($){return Math.floor($/1e6)}var ye8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",NN=new Uint8Array(62);for(let $=0;$<62;$++)NN[$]=ye8.charCodeAt($);var ge8=218340105584896;function he8(){let $=Math.floor(Math.random()*ge8),Z=$%62,X=NN[Z];$=($-Z)/62,Z=$%62;let Q=NN[Z];$=($-Z)/62,Z=$%62;let Y=NN[Z];$=($-Z)/62,Z=$%62;let G=NN[Z];$=($-Z)/62,Z=$%62;let J=NN[Z];$=($-Z)/62,Z=$%62;let K=NN[Z];$=($-Z)/62,Z=$%62;let W=NN[Z];$=($-Z)/62;let H=NN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var vs1=v((Cs1)=>{Object.defineProperty(Cs1,"__esModule",{value:!0});Cs1.nuid=Cs1.NuidImpl=void 0;var Z04="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",HO=62,M70=12,ks1=10,Ms1=33,X04=333,Vs1=M70+ks1,wn0=new Uint8Array(HO);for(let $=0;$<HO;$++)wn0[$]=Z04.charCodeAt($);var q70=4294967296,Ss1=BigInt(HO)**BigInt(ks1),wp=Number(Ss1/(1n<<32n)),Dn0=Number(Ss1%(1n<<32n));function Q04($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Y04($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Q04($)}class En0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Vs1),this.cbuf=new Uint8Array(M70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(wp+1)),this.seqLo=Math.floor(Math.random()*q70);while($++<8&&this.seqHi===wp&&this.seqLo>=Dn0);if(this.seqHi===wp&&this.seqLo>=Dn0)this.seqLo=0;this.inc=Math.random()*(X04-Ms1)+Ms1|0}setPre(){Y04(this.cbuf);for(let $=0;$<M70;$++)this.buf[$]=wn0[this.cbuf[$]%HO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Vs1-1;X>=M70;X--){let Q=Math.floor($/HO),G=($-Q*HO)*q70+Z,J=Math.floor(G/HO),K=G-J*HO;this.buf[X]=wn0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=q70)this.seqLo-=q70,this.seqHi+=1;if(this.seqHi>wp||this.seqHi===wp&&this.seqLo>=Dn0)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()}}Cs1.NuidImpl=En0;Cs1.nuid=new En0});var ys1=v((fs1)=>{Object.defineProperty(fs1,"__esModule",{value:!0});fs1.nuid=fs1.Nuid=void 0;var xs1=vs1();fs1.Nuid=xs1.NuidImpl;fs1.nuid=xs1.nuid});var k70=v((V70)=>{Object.defineProperty(V70,"__esModule",{value:!0});V70.nuid=V70.Nuid=void 0;var gs1=ys1();Object.defineProperty(V70,"Nuid",{enumerable:!0,get:function(){return gs1.Nuid}});Object.defineProperty(V70,"nuid",{enumerable:!0,get:function(){return gs1.nuid}})});var FO=v((hs1)=>{Object.defineProperty(hs1,"__esModule",{value:!0});hs1.DEFAULT_HOST=hs1.DEFAULT_PORT=hs1.Match=void 0;hs1.syncIterator=F04;hs1.createInbox=N04;var W04=k70(),H04=YG();hs1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function F04($){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 N04($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw H04.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${W04.nuid.next()}`}hs1.DEFAULT_PORT=4222;hs1.DEFAULT_HOST="127.0.0.1"});var Ep=v((ms1)=>{Object.defineProperty(ms1,"__esModule",{value:!0});ms1.DataBuffer=void 0;var cs1=QG();class ls1{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 cs1.TE.encode($)}static toAscii($){return cs1.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}}ms1.DataBuffer=ls1});var oE=v((ps1)=>{Object.defineProperty(ps1,"__esModule",{value:!0});ps1.LF=ps1.CR=ps1.CRLF=ps1.CR_LF_LEN=ps1.CR_LF=void 0;ps1.setTransportFactory=j04;ps1.defaultPort=z04;ps1.getUrlParseFn=P04;ps1.newTransport=A04;ps1.getResolveFn=T04;ps1.protoLen=is1;ps1.extractProtocolMessage=R04;var D04=QG(),w04=FO(),E04=Ep(),GG;function j04($){GG=$}function z04(){return GG!==void 0&&GG.defaultPort!==void 0?GG.defaultPort:w04.DEFAULT_PORT}function P04(){return GG!==void 0&&GG.urlParseFn?GG.urlParseFn:void 0}function A04(){if(!GG||typeof GG.factory!=="function")throw Error("transport fn is not set");return GG.factory()}function T04(){return GG!==void 0&&GG.dnsResolveFn?GG.dnsResolveFn:void 0}ps1.CR_LF=`\r
1493
1493
  `;ps1.CR_LF_LEN=ps1.CR_LF.length;ps1.CRLF=E04.DataBuffer.fromAscii(ps1.CR_LF);ps1.CR=new Uint8Array(ps1.CRLF)[0];ps1.LF=new Uint8Array(ps1.CRLF)[1];function is1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===ps1.CR&&$[X]===ps1.LF)return X+1}return 0}function R04($){let Z=is1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return D04.TD.decode(Q)}return""}});var Tn0=v(($e1)=>{Object.defineProperty($e1,"__esModule",{value:!0});$e1.ipV4=as1;$e1.isIP=f04;$e1.parseIP=ss1;var jp=4,rE=16,S70=48,rs1=57,ts1=65,v04=70,os1=97,x04=102,An0=16777215;function as1($,Z,X,Q){let Y=new Uint8Array(rE);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 f04($){return ss1($)!==void 0}function ss1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return es1($);case":":return b04($)}return}function es1($){let Z=new Uint8Array(jp);for(let X=0;X<jp;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=y04($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return as1(Z[0],Z[1],Z[2],Z[3])}function b04($){let Z=new Uint8Array(rE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<rE){let{n:Y,c:G,ok:J}=g04($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=rE-jp)return;if(Q+jp>rE)return;let K=es1($);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+=jp;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<rE){if(X<0)return;let Y=rE-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 y04($){let Z=0,X=0;for(Z=0;Z<$.length&&S70<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=rs1;Z++)if(X=X*10+($.charCodeAt(Z)-S70),X>=An0)return{n:An0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function g04($){let Z=0,X=0;for(X=0;X<$.length;X++){if(S70<=$.charCodeAt(X)&&$.charCodeAt(X)<=rs1)Z*=16,Z+=$.charCodeAt(X)-S70;else if(os1<=$.charCodeAt(X)&&$.charCodeAt(X)<=x04)Z*=16,Z+=$.charCodeAt(X)-os1+10;else if(ts1<=$.charCodeAt(X)&&$.charCodeAt(X)<=v04)Z*=16,Z+=$.charCodeAt(X)-ts1+10;else break;if(Z>=An0)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 kn0=v((Xe1)=>{Object.defineProperty(Xe1,"__esModule",{value:!0});Xe1.Servers=Xe1.ServerImpl=void 0;Xe1.isIPV4OrHostname=Ze1;Xe1.hostPort=Vn0;var Rn0=oE(),In0=l3(),qn0=Tn0(),l04=FO(),m04=YG();function Ze1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Mn0($){return!Ze1($)}function d04($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function Vn0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=d04($),Mn0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Mn0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):l04.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 zy{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=Vn0($);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,qn0.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}://${Mn0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new zy(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,In0.shuffle)(Z);return this.resolves=Z,Z}}Xe1.ServerImpl=zy;class C70{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw m04.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,Rn0.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}=Vn0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new zy(Y))}if(this.randomize)(0,In0.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,qn0.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,Rn0.getUrlParseFn)();$=X?X($):$;let Q=new zy($,Z);if((0,qn0.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 C70.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return C70.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,Rn0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new zy(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,In0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Xe1.Servers=C70});var _70=v((Je1)=>{Object.defineProperty(Je1,"__esModule",{value:!0});Je1.QueuedIteratorImpl=void 0;var Sn0=l3(),Ye1=YG();class Ge1{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,Sn0.deferred)(),this.yields=[],this.iterClosed=(0,Sn0.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 Ye1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Ye1.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,Sn0.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}}Je1.QueuedIteratorImpl=Ge1});var Cn0=v((Fe1)=>{Object.defineProperty(Fe1,"__esModule",{value:!0});Fe1.MuxSubscription=void 0;var t04=FO(),We1=YG();class He1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,t04.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 We1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new We1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}Fe1.MuxSubscription=He1});var _n0=v((Be1)=>{Object.defineProperty(Be1,"__esModule",{value:!0});Be1.Heartbeat=void 0;var o04=l3();class Ue1{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,o04.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})}}Be1.Heartbeat=Ue1});var fn0=v((Ee1)=>{Object.defineProperty(Ee1,"__esModule",{value:!0});Ee1.DenoBuffer=Ee1.MAX_SIZE=Ee1.AssertionError=void 0;Ee1.assert=De1;Ee1.concat=we1;Ee1.append=a04;Ee1.readAll=s04;Ee1.writeAll=e04;var r04=QG();class vn0 extends Error{constructor($){super($);this.name="AssertionError"}}Ee1.AssertionError=vn0;function De1($,Z="Assertion failed."){if(!$)throw new vn0(Z)}var Le1=32768;Ee1.MAX_SIZE=4294967294;function v70($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function we1($,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 a04($,Z){return we1($,Uint8Array.of(Z))}class xn0{_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($){De1($<=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=v70(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(r04.TE.encode($))}write($){let Z=this._grow($.byteLength);return v70($,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)v70(this._buf.subarray(this._off),this._buf);else if(Q+$>Ee1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,Ee1.MAX_SIZE));v70(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,Ee1.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(Le1);while(!0){let Q=this.capacity-this.length<Le1,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}}}Ee1.DenoBuffer=xn0;function s04($){let Z=new xn0;return Z.readFrom($),Z.bytes()}function e04($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var gn0=v((Te1)=>{Object.defineProperty(Te1,"__esModule",{value:!0});Te1.cc=Te1.State=Te1.Parser=Te1.Kind=void 0;Te1.describe=J14;var bn0=fn0(),yn0=QG();Te1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function J14($){let Z,X="";switch($.kind){case Te1.Kind.MSG:Z="MSG";break;case Te1.Kind.OK:Z="OK";break;case Te1.Kind.ERR:Z="ERR",X=yn0.TD.decode($.data);break;case Te1.Kind.PING:Z="PING";break;case Te1.Kind.PONG:Z="PONG";break;case Te1.Kind.INFO:Z="INFO",X=yn0.TD.decode($.data)}return`${Z}: ${X}`}function ze1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Pe1=48,K14=57,Py=67108864;class Ae1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Te1.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 Te1.State.OP_START:switch(X){case Te1.cc.M:case Te1.cc.m:this.state=Te1.State.OP_M,this.hdr=-1,this.ma=ze1();break;case Te1.cc.H:case Te1.cc.h:this.state=Te1.State.OP_H,this.hdr=0,this.ma=ze1();break;case Te1.cc.P:case Te1.cc.p:this.state=Te1.State.OP_P;break;case Te1.cc.PLUS:this.state=Te1.State.OP_PLUS;break;case Te1.cc.MINUS:this.state=Te1.State.OP_MINUS;break;case Te1.cc.I:case Te1.cc.i:this.state=Te1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_H:switch(X){case Te1.cc.M:case Te1.cc.m:this.state=Te1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_M:switch(X){case Te1.cc.S:case Te1.cc.s:this.state=Te1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MS:switch(X){case Te1.cc.G:case Te1.cc.g:this.state=Te1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MSG:switch(X){case Te1.cc.SPACE:case Te1.cc.TAB:this.state=Te1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MSG_SPC:switch(X){case Te1.cc.SPACE:case Te1.cc.TAB:continue;default:this.state=Te1.State.MSG_ARG,this.as=Z}break;case Te1.State.MSG_ARG:switch(X){case Te1.cc.CR:this.drop=1;break;case Te1.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=Te1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Te1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Te1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Te1.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:Te1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Te1.State.MSG_END;break;case Te1.State.MSG_END:switch(X){case Te1.cc.NL:this.drop=0,this.as=Z+1,this.state=Te1.State.OP_START;break;default:continue}break;case Te1.State.OP_PLUS:switch(X){case Te1.cc.O:case Te1.cc.o:this.state=Te1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PLUS_O:switch(X){case Te1.cc.K:case Te1.cc.k:this.state=Te1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PLUS_OK:switch(X){case Te1.cc.NL:this.dispatcher.push({kind:Te1.Kind.OK}),this.drop=0,this.state=Te1.State.OP_START;break}break;case Te1.State.OP_MINUS:switch(X){case Te1.cc.E:case Te1.cc.e:this.state=Te1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MINUS_E:switch(X){case Te1.cc.R:case Te1.cc.r:this.state=Te1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MINUS_ER:switch(X){case Te1.cc.R:case Te1.cc.r:this.state=Te1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MINUS_ERR:switch(X){case Te1.cc.SPACE:case Te1.cc.TAB:this.state=Te1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_MINUS_ERR_SPC:switch(X){case Te1.cc.SPACE:case Te1.cc.TAB:continue;default:this.state=Te1.State.MINUS_ERR_ARG,this.as=Z}break;case Te1.State.MINUS_ERR_ARG:switch(X){case Te1.cc.CR:this.drop=1;break;case Te1.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:Te1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Te1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Te1.State.OP_P:switch(X){case Te1.cc.I:case Te1.cc.i:this.state=Te1.State.OP_PI;break;case Te1.cc.O:case Te1.cc.o:this.state=Te1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PO:switch(X){case Te1.cc.N:case Te1.cc.n:this.state=Te1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PON:switch(X){case Te1.cc.G:case Te1.cc.g:this.state=Te1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PONG:switch(X){case Te1.cc.NL:this.dispatcher.push({kind:Te1.Kind.PONG}),this.drop=0,this.state=Te1.State.OP_START;break}break;case Te1.State.OP_PI:switch(X){case Te1.cc.N:case Te1.cc.n:this.state=Te1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PIN:switch(X){case Te1.cc.G:case Te1.cc.g:this.state=Te1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_PING:switch(X){case Te1.cc.NL:this.dispatcher.push({kind:Te1.Kind.PING}),this.drop=0,this.state=Te1.State.OP_START;break}break;case Te1.State.OP_I:switch(X){case Te1.cc.N:case Te1.cc.n:this.state=Te1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_IN:switch(X){case Te1.cc.F:case Te1.cc.f:this.state=Te1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_INF:switch(X){case Te1.cc.O:case Te1.cc.o:this.state=Te1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_INFO:switch(X){case Te1.cc.SPACE:case Te1.cc.TAB:this.state=Te1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Te1.State.OP_INFO_SPC:switch(X){case Te1.cc.SPACE:case Te1.cc.TAB:continue;default:this.state=Te1.State.INFO_ARG,this.as=Z}break;case Te1.State.INFO_ARG:switch(X){case Te1.cc.CR:this.drop=1;break;case Te1.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:Te1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Te1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Te1.State.MSG_ARG||this.state===Te1.State.MINUS_ERR_ARG||this.state===Te1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new bn0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Te1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new bn0.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 bn0.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 Te1.cc.SPACE:case Te1.cc.TAB:case Te1.cc.CR:case Te1.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],Py);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],Py);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}: ${yn0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Te1.cc.SPACE:case Te1.cc.TAB:case Te1.cc.CR:case Te1.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],Py),this.ma.size=this.protoParseInt(Z[3],Py);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],Py),this.ma.size=this.protoParseInt(Z[4],Py);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]<Pe1||$[Q]>K14)return-1;X=X*10+($[Q]-Pe1)}return Z!==void 0&&X>Z?-1:X}}Te1.Parser=Ae1;Te1.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};Te1.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 b70=v((Ie1)=>{Object.defineProperty(Ie1,"__esModule",{value:!0});Ie1.MsgHdrsImpl=void 0;Ie1.canonicalMIMEHeaderKey=un0;Ie1.headers=F14;var Re1=QG(),m3=FO(),f70=YG();function un0($){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 f70.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 F14($=0,Z=""){if($===0&&Z!=="")throw f70.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw f70.InvalidArgumentError.format("description","is required");return new Ay($,Z)}var hn0="NATS/1.0";class Ay{_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 Ay,Q=Re1.TD.decode($).split(`\r
1494
1494
  `),Y=Q[0];if(Y!==hn0){let G=Y.replace(hn0,"").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 $=hn0;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
1495
1495
  ${Z}: ${X[Q]}`;return`${$}\r