decocms 4.243.1 → 4.243.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/client/assets/{AlertCircle-8Zp9V4Gf.js → AlertCircle-DUlfht_8.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DY55BZH7.js → AreaChart-Cb6V67gW.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CV5LnTOD.js → ArrowLeft-xr5VbHB2.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-30qFHVAn.js → ArrowUp-CsCHH_fH.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-BbZhk1vr.js → ArrowUpRight-M9WAVHfb.js} +1 -1
  6. package/dist/client/assets/{Check-DybL0ANt.js → Check-BXav60Vy.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DRTLKGuF.js → CheckCircle-C2PmPe-o.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-xX7EiG6D.js → ChevronDown-CauLatdX.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-ChB7-Qdk.js → ChevronRight-BGcGReEM.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-B1KXM4ba.js → ChevronSelectorVertical-CvdZht1v.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-BqbI3e8M.js → ChevronUp-D_tIdiJb.js} +1 -1
  12. package/dist/client/assets/{Copy01-DTWBSnDM.js → Copy01-CV1JugLX.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CTZjNSbQ.js → CreditCard01-B_w5eexh.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-BOtiBqPV.js → DotsVertical-fn24sGZC.js} +1 -1
  15. package/dist/client/assets/{Download01-D5DovFP1.js → Download01-D3eJDAEO.js} +1 -1
  16. package/dist/client/assets/{Eye-DZbWTjje.js → Eye-BhHZY2CZ.js} +1 -1
  17. package/dist/client/assets/{FilterLines-CHaV7Nw9.js → FilterLines-BWjLIxVc.js} +1 -1
  18. package/dist/client/assets/{Globe01-BNmRPD0F.js → Globe01-DdUoMsv3.js} +1 -1
  19. package/dist/client/assets/{Globe04-B9LH-CHD.js → Globe04-B-w3WEq9.js} +1 -1
  20. package/dist/client/assets/{HardDrive-hrMMCqWl.js → HardDrive-BFP4nRun.js} +1 -1
  21. package/dist/client/assets/{Key01-Bhgh4Ahq.js → Key01-Cfe0Tudx.js} +1 -1
  22. package/dist/client/assets/{LayoutLeft-Bh-qR188.js → LayoutLeft-BEpfII_o.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-BkrsVkBk.js → LinkExternal01-D25gdGqj.js} +1 -1
  24. package/dist/client/assets/{LockUnlocked01-BhHn_96P.js → LockUnlocked01-P_wfDROK.js} +1 -1
  25. package/dist/client/assets/{LogOut01-3Vo4riO2.js → LogOut01-DBKmS50y.js} +1 -1
  26. package/dist/client/assets/{Monitor01-1BlCrc-_.js → Monitor01-BhLjoS2b.js} +1 -1
  27. package/dist/client/assets/{Palette-D4OaRwH0.js → Palette-aeV8tQ28.js} +1 -1
  28. package/dist/client/assets/{Play-B148yyee.js → Play-BdOAMmIp.js} +1 -1
  29. package/dist/client/assets/{Plus-BBoTedez.js → Plus-D1J2FK4h.js} +1 -1
  30. package/dist/client/assets/{SearchLg-DC1AF4wk.js → SearchLg-BzCLzG8R.js} +1 -1
  31. package/dist/client/assets/{SearchMd-BQD9siMW.js → SearchMd-xpLLk_pA.js} +1 -1
  32. package/dist/client/assets/{Settings02-KNp1ZCpy.js → Settings02-DjFkLPe4.js} +1 -1
  33. package/dist/client/assets/{Share07-D6xjuePS.js → Share07-Caa0Im56.js} +1 -1
  34. package/dist/client/assets/{Shield01-B1d6QDuN.js → Shield01-D5NbAsUv.js} +1 -1
  35. package/dist/client/assets/{Stars01-dBQbZtFY.js → Stars01-CCBcRCds.js} +1 -1
  36. package/dist/client/assets/{Stars02-DJ3XKS_q.js → Stars02-DtoiSIcu.js} +1 -1
  37. package/dist/client/assets/{Sun-gBtTF4fF.js → Sun-Dpvmek-4.js} +1 -1
  38. package/dist/client/assets/{SwitchHorizontal01-YXwPofOJ.js → SwitchHorizontal01-C5wQU73g.js} +1 -1
  39. package/dist/client/assets/{Tool01-C_sZUPJ-.js → Tool01-XzYGP86W.js} +1 -1
  40. package/dist/client/assets/{Tool02-ByQz2x4p.js → Tool02-CE2ZdUr1.js} +1 -1
  41. package/dist/client/assets/{Trash01-Dq61VZ-q.js → Trash01-BnQQflAa.js} +1 -1
  42. package/dist/client/assets/{TrendUp01-BhBYte7U.js → TrendUp01-BdIQtpYk.js} +1 -1
  43. package/dist/client/assets/{Upload01-P9cG59fw.js → Upload01-Bhqh3Tbq.js} +1 -1
  44. package/dist/client/assets/{User01-0XnrIXA7.js → User01-C1NHQ-ZR.js} +1 -1
  45. package/dist/client/assets/{Users01-SHxHbBOf.js → Users01-CMhcYnus.js} +1 -1
  46. package/dist/client/assets/{Users03-BWQEkc8q.js → Users03-BNksnLQf.js} +1 -1
  47. package/dist/client/assets/{X-DCc6F72_.js → X-DY9FeXqi.js} +1 -1
  48. package/dist/client/assets/{XCircle-nX8NmjEf.js → XCircle-_aQH9vJz.js} +1 -1
  49. package/dist/client/assets/{XClose-DQG60vKG.js → XClose-DdNRdfWH.js} +1 -1
  50. package/dist/client/assets/{YAxis-BlgfjaWv.js → YAxis-DLOWdC_A.js} +1 -1
  51. package/dist/client/assets/{Zap-DWK1mAeA.js → Zap-DDihnv3P.js} +1 -1
  52. package/dist/client/assets/{ZapSquare-D3-vIRZ1.js → ZapSquare-Bv6t7Fg1.js} +1 -1
  53. package/dist/client/assets/{access-gate-R3wf6ALF.js → access-gate-wLBW4P-Z.js} +1 -1
  54. package/dist/client/assets/{agent-icon-D4Q5f1gm.js → agent-icon-5ZYno8Im.js} +1 -1
  55. package/dist/client/assets/{agents-list-DIN-reB6.js → agents-list-7wqeXOXn.js} +1 -1
  56. package/dist/client/assets/{ai-providers-BaeTFoyD.js → ai-providers-BJDhlXiK.js} +1 -1
  57. package/dist/client/assets/{alert-A3FBuGpX.js → alert-B6Fmol8n.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-Bl3umpCX.js → alert-dialog-BOUVk-xM.js} +1 -1
  59. package/dist/client/assets/{api-keys-Jr2FvUt-.js → api-keys-DGMyGe_V.js} +1 -1
  60. package/dist/client/assets/{app-editor-Co97eV0d.js → app-editor-BQTeUJlT.js} +1 -1
  61. package/dist/client/assets/{auth-D1vEdZed.js → auth-Clf3KXjv.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-B2JDFzAV.js → auth-catchall-CPPqDGgA.js} +1 -1
  63. package/dist/client/assets/{auth-entry-oc6-i9fj.js → auth-entry-PFcfNCN7.js} +1 -1
  64. package/dist/client/assets/{auth-split-layout-CruGhGDV.js → auth-split-layout-5_o-m_dm.js} +1 -1
  65. package/dist/client/assets/{authenticate-and-persist-oauth-aq0GBY7a.js → authenticate-and-persist-oauth-BUQ1Xi6C.js} +1 -1
  66. package/dist/client/assets/{automation-list-row-BJ6ogb3E.js → automation-list-row-DRZedCha.js} +1 -1
  67. package/dist/client/assets/{automation-runs-Ca7EOakb.js → automation-runs-DaNWyAAB.js} +1 -1
  68. package/dist/client/assets/{automations-BclsmqkF.js → automations-BBd2nZBY.js} +1 -1
  69. package/dist/client/assets/{avatar-BtiojN-R.js → avatar-CsESGb5P.js} +1 -1
  70. package/dist/client/assets/{badge-BuMGJh5B.js → badge-BtBZ1HPJ.js} +1 -1
  71. package/dist/client/assets/{billing-DzIazHYW.js → billing-Bgr3WIC0.js} +1 -1
  72. package/dist/client/assets/{block-document-B6U4C9QA.js → block-document-BKnVO5ZG.js} +1 -1
  73. package/dist/client/assets/{buckets-D2T6_jto.js → buckets-Cg0MlwAj.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-j84BErz2.js → bulk-category-panel-BHhnBX-y.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-Djm4fhvR.js → capability-load-error-BasK1UyG.js} +1 -1
  76. package/dist/client/assets/{card-CRmNVgmu.js → card-CKXxuGX6.js} +1 -1
  77. package/dist/client/assets/{cards-BNsSG5Uz.js → cards-BIJ-5lG1.js} +1 -1
  78. package/dist/client/assets/{category-editor-hM1sJj-6.js → category-editor-BInGd-ra.js} +1 -1
  79. package/dist/client/assets/{chart-uaBUCKLk.js → chart-CkOpSzxv.js} +1 -1
  80. package/dist/client/assets/{chat-context-CYeQN_c_.js → chat-context-DAVuFXb-.js} +1 -1
  81. package/dist/client/assets/{checkbox-zjf3WVrQ.js → checkbox-BmMgY8o7.js} +1 -1
  82. package/dist/client/assets/{choose-editor-D2tovMd8.js → choose-editor-BGZ5cx6T.js} +1 -1
  83. package/dist/client/assets/{cli-auth-success-DhVY0Sbn.js → cli-auth-success-CRaZ-XOY.js} +1 -1
  84. package/dist/client/assets/{collection-detail-CIsWHDvV.js → collection-detail-CjMlAcj7.js} +1 -1
  85. package/dist/client/assets/{collection-display-button-1n7vCR9e.js → collection-display-button-C5Ypy8cN.js} +1 -1
  86. package/dist/client/assets/{collection-search-Bu8uyhh2.js → collection-search-Dc8oos2w.js} +1 -1
  87. package/dist/client/assets/{collection-table-wrapper-JuL67fWJ.js → collection-table-wrapper-BqCUWVdp.js} +1 -1
  88. package/dist/client/assets/{collection-tabs-BJRs7Thx.js → collection-tabs-DQs6Id7F.js} +1 -1
  89. package/dist/client/assets/{command-Dp9oDXnR.js → command-CckioSee.js} +1 -1
  90. package/dist/client/assets/{commerce-onboarding-2oipCRCJ.js → commerce-onboarding-D33mAwVV.js} +1 -1
  91. package/dist/client/assets/{connect-D3Vk44fr.js → connect-B2Kdp8ut.js} +1 -1
  92. package/dist/client/assets/{connection-Dg_Y5rHe.js → connection-DawcOkII.js} +1 -1
  93. package/dist/client/assets/{connection-card-DBM3JGC4.js → connection-card-JINQJoK5.js} +1 -1
  94. package/dist/client/assets/{connection-detail-B0zMtdpa.js → connection-detail-Db3nTX8u.js} +1 -1
  95. package/dist/client/assets/{connection-form-helpers-B38uYVsR.js → connection-form-helpers-Shqj1MAl.js} +1 -1
  96. package/dist/client/assets/{connections-3095A4O5.js → connections-BcEtHf8S.js} +1 -1
  97. package/dist/client/assets/{decopilot-sse-pool-DhZ037JV.js → decopilot-sse-pool-DLTV1od0.js} +1 -1
  98. package/dist/client/assets/{dialog-CThPBdlC.js → dialog-U03ZiuXk.js} +1 -1
  99. package/dist/client/assets/{domain-settings-Dgyux1NA.js → domain-settings-CDI7Fjmq.js} +1 -1
  100. package/dist/client/assets/{drawer-wwZlxN5E.js → drawer-qjynKTFN.js} +1 -1
  101. package/dist/client/assets/{dropdown-menu-CLAhqzHU.js → dropdown-menu-BmoCpvnT.js} +1 -1
  102. package/dist/client/assets/{empty-state-BvDYlB54.js → empty-state-PrJglZio.js} +1 -1
  103. package/dist/client/assets/{extract-connection-data-BM2bZGj-.js → extract-connection-data-GB3welMi.js} +1 -1
  104. package/dist/client/assets/{file-explorer-C-kCkJKc.js → file-explorer-BUj_Z3iJ.js} +1 -1
  105. package/dist/client/assets/{file-type-icon-DY6FwN_P.js → file-type-icon-DNO6EG6W.js} +1 -1
  106. package/dist/client/assets/{form-BK3EXow7.js → form-BlkhuHf9.js} +1 -1
  107. package/dist/client/assets/{general-jXuOSV2P.js → general-BSW7_Voe.js} +1 -1
  108. package/dist/client/assets/{github-repo-picker-DzLD80U9.js → github-repo-picker-D56QHlTy.js} +1 -1
  109. package/dist/client/assets/{hooks-U6YCxYng.js → hooks-B2woSXLe.js} +1 -1
  110. package/dist/client/assets/{index-D5A46YHt.js → index-AXIuo6hf.js} +1 -1
  111. package/dist/client/assets/{index-CdhHOj48.js → index-CToZ4kbL.js} +1 -1
  112. package/dist/client/assets/{index-_JizC8Pw.js → index-CY3hVAON.js} +1 -1
  113. package/dist/client/assets/{index-SyAtfjOo.js → index-Chdg8Asw.js} +1 -1
  114. package/dist/client/assets/{index-CZ7g67Kn.js → index-D-cW_7z2.js} +1 -1
  115. package/dist/client/assets/{index-CF2fQcn-.js → index-D5A_cbaj.js} +1 -1
  116. package/dist/client/assets/{index-CocRXnaV.js → index-DLyxjIYw.js} +3 -3
  117. package/dist/client/assets/{index-Bjo-nmTs.js → index-Djodm3GI.js} +1 -1
  118. package/dist/client/assets/{index-Dr-JCsMk.js → index-DlSq7kji.js} +1 -1
  119. package/dist/client/assets/{index-Cuh0Txtd.js → index-j097lZOT.js} +5 -5
  120. package/dist/client/assets/{index-redirect-DbzqPUaj.js → index-redirect-C__5RhjR.js} +1 -1
  121. package/dist/client/assets/{infra-billing-C6Ez0D8-.js → infra-billing-CI8pxTWO.js} +1 -1
  122. package/dist/client/assets/{input-Th45y1Oj.js → input-BH7zyD0i.js} +1 -1
  123. package/dist/client/assets/{integration-icon-1MrWDyJg.js → integration-icon-BolSFCMJ.js} +1 -1
  124. package/dist/client/assets/{invite-member-dialog-DDaJVH4L.js → invite-member-dialog-Cfb_Sthq.js} +1 -1
  125. package/dist/client/assets/{label-DBYMSMdt.js → label-Cwuc9phK.js} +1 -1
  126. package/dist/client/assets/{layout-DZ9hDu51.js → layout-BEPQVUxl.js} +1 -1
  127. package/dist/client/assets/{login-7RhTJ9dA.js → login-C2AFfDb-.js} +1 -1
  128. package/dist/client/assets/{mcp-oauth-Bxin9kcZ.js → mcp-oauth-BmzTS1ua.js} +1 -1
  129. package/dist/client/assets/{members-BQcTT1JU.js → members-D7MXmyE1.js} +1 -1
  130. package/dist/client/assets/{monaco-editor-DPjO46DP.js → monaco-editor-DBmhJ8Ys.js} +1 -1
  131. package/dist/client/assets/{monitoring-stats-row-D7Wk3JlQ.js → monitoring-stats-row-DfEDCsLl.js} +1 -1
  132. package/dist/client/assets/{multi-select-BxuvsxEA.js → multi-select-C2Dia25c.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-CyLwMCev.js → oauth-callback-D_WAqpRo.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-ai-provider-jneR5BMK.js → oauth-callback-ai-provider-BhA1cp1j.js} +1 -1
  135. package/dist/client/assets/{onboarding-wIaGbrtN.js → onboarding-uuvWd04L.js} +1 -1
  136. package/dist/client/assets/{org-layout-B7NbwjWG.js → org-layout-D-9MtDux.js} +1 -1
  137. package/dist/client/assets/{organization-choice-D7XaTjUk.js → organization-choice-YKPoOAc0.js} +1 -1
  138. package/dist/client/assets/{orgs-BMJupwVV.js → orgs-DgzYCdTa.js} +1 -1
  139. package/dist/client/assets/{page-seo-form-CRr4N9fu.js → page-seo-form-GRyqYD3q.js} +1 -1
  140. package/dist/client/assets/{popover-Du9wAhag.js → popover-9hL99Gs4.js} +1 -1
  141. package/dist/client/assets/{post-editor-Dzjriec9.js → post-editor-B2P499Gv.js} +1 -1
  142. package/dist/client/assets/{primitives-DuIzbwMK.js → primitives-5VVvVXDP.js} +1 -1
  143. package/dist/client/assets/{profile-DBHAfJMF.js → profile-CyKGXLmf.js} +1 -1
  144. package/dist/client/assets/{project-app-view-hDkkHLbP.js → project-app-view-kVyS_ky4.js} +1 -1
  145. package/dist/client/assets/record-editor-DHsX7f85.js +1 -0
  146. package/dist/client/assets/{redirect-editor-BXMiNcte.js → redirect-editor-wh6KUQar.js} +1 -1
  147. package/dist/client/assets/registry-BCU9YbQl.js +2 -0
  148. package/dist/client/assets/{registry-layout-B6d61YxT.js → registry-layout-BqclQM58.js} +1 -1
  149. package/dist/client/assets/{reports-YLKjgo7J.js → reports-ezYEoj8-.js} +1 -1
  150. package/dist/client/assets/{require-capability-Mr1OoF4-.js → require-capability-daZd2Avq.js} +1 -1
  151. package/dist/client/assets/{required-auth-layout-BCzBM0lT.js → required-auth-layout-tPpYmfR1.js} +1 -1
  152. package/dist/client/assets/{reset-password-BoJSAGaQ.js → reset-password-B_cu2DBW.js} +1 -1
  153. package/dist/client/assets/{roles-Do_gzClD.js → roles-CnMuEzXy.js} +1 -1
  154. package/dist/client/assets/{search-input-BwMDISby.js → search-input-Dlrgn3SA.js} +1 -1
  155. package/dist/client/assets/{secrets-C11hcvdy.js → secrets-DHhUnvN3.js} +1 -1
  156. package/dist/client/assets/{sections-editor--u_VmyTC.js → sections-editor-D2V-U5oa.js} +1 -1
  157. package/dist/client/assets/{select-E-1vIH1D.js → select-BhNhFGIm.js} +1 -1
  158. package/dist/client/assets/{select-model-CrYKaXss.js → select-model-BbkxZygk.js} +1 -1
  159. package/dist/client/assets/{self-tool-result-DKndch_o.js → self-tool-result-Bjns9v-D.js} +1 -1
  160. package/dist/client/assets/{seo-editor-C4XaQOFK.js → seo-editor-_sQ6ViyP.js} +1 -1
  161. package/dist/client/assets/{settings-layout-CepLX04C.js → settings-layout-CihM6Z5f.js} +1 -1
  162. package/dist/client/assets/{settings-section-svoIYw5J.js → settings-section-BIT7uWjs.js} +1 -1
  163. package/dist/client/assets/{settings-subnav-DtC3plyD.js → settings-subnav-DobJGu7Z.js} +1 -1
  164. package/dist/client/assets/{shell-controls-FOeaa4PN.js → shell-controls-BOR8V5VI.js} +1 -1
  165. package/dist/client/assets/{shell-layout-DEIeTMRI.js → shell-layout-Dpz4gldn.js} +1 -1
  166. package/dist/client/assets/{sidebar-C6vNFIX7.js → sidebar-_myHCEzH.js} +1 -1
  167. package/dist/client/assets/{skeleton-dgWEijLb.js → skeleton-CfDgtd5M.js} +1 -1
  168. package/dist/client/assets/{spinner-0lt9Wsr0.js → spinner-CgvhsPnS.js} +1 -1
  169. package/dist/client/assets/{sso-vnN4FYgS.js → sso-CzK_Pk8F.js} +1 -1
  170. package/dist/client/assets/{store-BkHOJNPR.js → store-Cu4INizs.js} +1 -1
  171. package/dist/client/assets/store-registry-OC_7xuUK.js +2 -0
  172. package/dist/client/assets/{studio-tools-Z3_Ho08E.js → studio-tools-ThQ_rcsF.js} +1 -1
  173. package/dist/client/assets/{switch-DMaQp-KH.js → switch-BCRtcgA0.js} +1 -1
  174. package/dist/client/assets/{synced-repos-DajRuqiT.js → synced-repos-DkuvF9QR.js} +1 -1
  175. package/dist/client/assets/{tab-id--OOSvEKL.js → tab-id-DM8k_HA-.js} +1 -1
  176. package/dist/client/assets/{table-CIn2xzFA.js → table-C5eCsrvC.js} +1 -1
  177. package/dist/client/assets/{tabs-BaLEcPo0.js → tabs-D-zNditx.js} +1 -1
  178. package/dist/client/assets/{tasks-Dn9xhCn5.js → tasks-CwCxAFhU.js} +1 -1
  179. package/dist/client/assets/{textarea-50Odtr43.js → textarea-BfUIS--d.js} +1 -1
  180. package/dist/client/assets/{toggle-group-DRZ_-Mcx.js → toggle-group-DvojD61A.js} +1 -1
  181. package/dist/client/assets/{toolbar-g180ZP8I.js → toolbar-C6N7bX1O.js} +1 -1
  182. package/dist/client/assets/{tooltip-CsaHSAiw.js → tooltip-B-y9isox.js} +1 -1
  183. package/dist/client/assets/{track-Bs3E_Z0a.js → track-Bwp-FwAP.js} +1 -1
  184. package/dist/client/assets/{types-Cp4OhzUj.js → types-D6tOWfuo.js} +1 -1
  185. package/dist/client/assets/{use-ai-providers-MHzwAwom.js → use-ai-providers-Bb772HOL.js} +1 -1
  186. package/dist/client/assets/{use-api-keys-DWJ8I1ik.js → use-api-keys-CX7vmPa_.js} +1 -1
  187. package/dist/client/assets/{use-automations-B03uaiym.js → use-automations-DyLBCDVI.js} +1 -1
  188. package/dist/client/assets/{use-autosave-DJi1cHzK.js → use-autosave-DnhwLkb4.js} +1 -1
  189. package/dist/client/assets/{use-capability-BVzZ6YO7.js → use-capability-DxO7qy1z.js} +1 -1
  190. package/dist/client/assets/{use-clock-tick-BG4XX5Ok.js → use-clock-tick-DS1Jl_N9.js} +1 -1
  191. package/dist/client/assets/{use-commerce-diagnostic-CL_Twf94.js → use-commerce-diagnostic-DtF4_mte.js} +1 -1
  192. package/dist/client/assets/{use-connection-BUow-BBf.js → use-connection-DmmNo1LM.js} +1 -1
  193. package/dist/client/assets/{use-copy-D8f2-t2L.js → use-copy-CSIcq8z_.js} +1 -1
  194. package/dist/client/assets/{use-create-virtual-mcp-BFo0K-5k.js → use-create-virtual-mcp-CR_IUdwo.js} +1 -1
  195. package/dist/client/assets/{use-debounced-autosave-uD_wTs7u.js → use-debounced-autosave-DjJh5yYH.js} +1 -1
  196. package/dist/client/assets/{use-debounced-value-BcMRwR1F.js → use-debounced-value-19BtC7Bb.js} +1 -1
  197. package/dist/client/assets/{use-decopilot-events-Bzb7ko-7.js → use-decopilot-events-Bb_7qSC-.js} +1 -1
  198. package/dist/client/assets/{use-delete-connection-CPwIsaxw.js → use-delete-connection-keAeE1I9.js} +1 -1
  199. package/dist/client/assets/{use-deployment-admin-qrivzoFz.js → use-deployment-admin-GvqoWv58.js} +1 -1
  200. package/dist/client/assets/{use-file-configs-CeV8SIoC.js → use-file-configs-IFt3zoqI.js} +1 -1
  201. package/dist/client/assets/{use-infinite-scroll-THZlE2jL.js → use-infinite-scroll-C1T3wjaO.js} +1 -1
  202. package/dist/client/assets/{use-join-requests-FtBbYM-P.js → use-join-requests-BeMEoip1.js} +1 -1
  203. package/dist/client/assets/{use-mcp-client-B0R6KE9j.js → use-mcp-client-_o9o88xf.js} +1 -1
  204. package/dist/client/assets/{use-mcp-tools-1OMI8U3k.js → use-mcp-tools-CRMPw5o_.js} +1 -1
  205. package/dist/client/assets/{use-members-D44SqWOd.js → use-members-BeAeYksa.js} +1 -1
  206. package/dist/client/assets/{use-mobile-CMwVM8Dm.js → use-mobile-H1cEPaVS.js} +1 -1
  207. package/dist/client/assets/{use-navigate-to-agent-DCU47VEH.js → use-navigate-to-agent-BqMCqmam.js} +1 -1
  208. package/dist/client/assets/{use-open-billing-url-C3VdIxbn.js → use-open-billing-url-BWzY_VeB.js} +1 -1
  209. package/dist/client/assets/{use-org-auth-client-BJjAWkzK.js → use-org-auth-client-A_fhg4VK.js} +1 -1
  210. package/dist/client/assets/{use-org-repo-syncs-17xU239e.js → use-org-repo-syncs-DboNdEwi.js} +1 -1
  211. package/dist/client/assets/{use-org-sso-BeKN7G5W.js → use-org-sso-D-BEPABI.js} +1 -1
  212. package/dist/client/assets/{use-organization-roles-C1-TDAKu.js → use-organization-roles-ABd_zIJY.js} +1 -1
  213. package/dist/client/assets/{use-organization-settings-CeWkbXSU.js → use-organization-settings-DPRJ0ATL.js} +1 -1
  214. package/dist/client/assets/{use-registry-connections-CNcrUm5j.js → use-registry-connections-Y17SLNHX.js} +1 -1
  215. package/dist/client/assets/{use-secrets-C8PoL8Jc.js → use-secrets-DH31aTTe.js} +1 -1
  216. package/dist/client/assets/{use-section-preview-base-Dt8sr8bZ.js → use-section-preview-base-Csrv-VqV.js} +1 -1
  217. package/dist/client/assets/{use-settings-tabs-CGvlVnxD.js → use-settings-tabs-CGwARRFk.js} +1 -1
  218. package/dist/client/assets/{use-status-sounds-KOU_LbBE.js → use-status-sounds-BeFWP6sc.js} +1 -1
  219. package/dist/client/assets/{use-tags-DpurgJWV.js → use-tags-BkefASeN.js} +1 -1
  220. package/dist/client/assets/{use-view-mode-CPN-uH9Q.js → use-view-mode-BLj18CVK.js} +1 -1
  221. package/dist/client/assets/{use-virtual-mcp-CcMn-V_g.js → use-virtual-mcp-B0LtGhD8.js} +1 -1
  222. package/dist/client/assets/useInfiniteQuery-BTBdPVyZ.js +1 -0
  223. package/dist/client/assets/{useRouterState-DsNBuiFB.js → useRouterState-um8-mtPt.js} +1 -1
  224. package/dist/client/assets/useSuspenseInfiniteQuery-C3uzz_IX.js +1 -0
  225. package/dist/client/assets/{users-CGeCpeZu.js → users-CWvqMFcP.js} +1 -1
  226. package/dist/client/assets/{variant-calendar-DL8f_Nde.js → variant-calendar-B1xj6WY-.js} +1 -1
  227. package/dist/client/assets/{view-mode-toggle-CWliLrij.js → view-mode-toggle-B1CxI2v1.js} +1 -1
  228. package/dist/client/index.html +1 -1
  229. package/dist/server/cli.js +2 -2
  230. package/dist/server/server.js +2 -2
  231. package/package.json +1 -1
  232. package/dist/client/assets/record-editor-SSA45zhH.js +0 -1
  233. package/dist/client/assets/registry-CPx0bJGL.js +0 -2
  234. package/dist/client/assets/store-registry-Dh7Jdgi9.js +0 -2
  235. package/dist/client/assets/useInfiniteQuery-BUh1ggHM.js +0 -1
  236. package/dist/client/assets/useSuspenseInfiniteQuery-B0aALDUm.js +0 -1
@@ -1 +1 @@
1
- import{c as K,b as tt,r as et,j as s,m as ot,B as nt}from"./index-CocRXnaV.js";import{x as vt,a9 as dt,aM as yt}from"./agent-icon-D4Q5f1gm.js";import{i as Tt}from"./ChevronRight-ChB7-Qdk.js";import{L as jt}from"./label-DBYMSMdt.js";import{B as pt}from"./automation-runs-Ca7EOakb.js";import{S as Nt}from"./switch-DMaQp-KH.js";import{T as wt,c as kt,a as Mt}from"./tooltip-CsaHSAiw.js";import{V as _t}from"./view-mode-toggle-CWliLrij.js";import"./AlertCircle-8Zp9V4Gf.js";import"./Tool01-C_sZUPJ-.js";import"./ArrowUp-30qFHVAn.js";import"./ArrowLeft-CV5LnTOD.js";import"./Tool02-ByQz2x4p.js";import"./XCircle-nX8NmjEf.js";import"./ArrowUpRight-BbZhk1vr.js";import"./TrendUp01-BhBYte7U.js";import"./ZapSquare-D3-vIRZ1.js";import"./Users03-BWQEkc8q.js";import"./CheckCircle-DRTLKGuF.js";import"./Check-DybL0ANt.js";import"./ChevronDown-xX7EiG6D.js";import"./ChevronSelectorVertical-B1KXM4ba.js";import"./ChevronUp-BqbI3e8M.js";import"./DotsVertical-BOtiBqPV.js";import"./Stars02-DJ3XKS_q.js";import"./Copy01-DTWBSnDM.js";import"./CreditCard01-CTZjNSbQ.js";import"./Download01-D5DovFP1.js";import"./Settings02-KNp1ZCpy.js";import"./Eye-DZbWTjje.js";import"./FilterLines-CHaV7Nw9.js";import"./Share07-D6xjuePS.js";import"./Globe01-BNmRPD0F.js";import"./Globe04-B9LH-CHD.js";import"./SwitchHorizontal01-YXwPofOJ.js";import"./HardDrive-hrMMCqWl.js";import"./Key01-Bhgh4Ahq.js";import"./LayoutLeft-Bh-qR188.js";import"./LinkExternal01-BkrsVkBk.js";import"./LockUnlocked01-BhHn_96P.js";import"./LogOut01-3Vo4riO2.js";import"./Monitor01-1BlCrc-_.js";import"./Sun-gBtTF4fF.js";import"./Palette-D4OaRwH0.js";import"./Play-B148yyee.js";import"./Plus-BBoTedez.js";import"./SearchLg-DC1AF4wk.js";import"./SearchMd-BQD9siMW.js";import"./Shield01-B1d6QDuN.js";import"./Stars01-dBQbZtFY.js";import"./Trash01-Dq61VZ-q.js";import"./Upload01-P9cG59fw.js";import"./User01-0XnrIXA7.js";import"./Users01-SHxHbBOf.js";import"./XClose-DQG60vKG.js";import"./X-DCc6F72_.js";import"./Zap-DWK1mAeA.js";import"./select-E-1vIH1D.js";import"./useInfiniteQuery-BUh1ggHM.js";import"./use-infinite-scroll-THZlE2jL.js";import"./use-connection-BUow-BBf.js";import"./use-mcp-client-B0R6KE9j.js";import"./auth-D1vEdZed.js";import"./use-virtual-mcp-CcMn-V_g.js";import"./card-CRmNVgmu.js";import"./sidebar-C6vNFIX7.js";import"./use-mobile-CMwVM8Dm.js";import"./table-CIn2xzFA.js";import"./empty-state-BvDYlB54.js";import"./use-members-D44SqWOd.js";import"./use-org-auth-client-BJjAWkzK.js";import"./use-clock-tick-BG4XX5Ok.js";import"./use-automations-B03uaiym.js";import"./studio-tools-Z3_Ho08E.js";import"./useSuspenseInfiniteQuery-B0aALDUm.js";import"./avatar-BtiojN-R.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D8f2-t2L.js";import"./dialog-CThPBdlC.js";import"./tab-id--OOSvEKL.js";import"./hooks-U6YCxYng.js";import"./decopilot-sse-pool-DhZ037JV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-CYeQN_c_.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-MHzwAwom.js";import"./use-decopilot-events-Bzb7ko-7.js";import"./use-organization-settings-CeWkbXSU.js";import"./monaco-editor-DPjO46DP.js";import"./spinner-0lt9Wsr0.js";import"./types-Cp4OhzUj.js";import"./shell-layout-DEIeTMRI.js";import"./required-auth-layout-BCzBM0lT.js";import"./use-org-sso-BeKN7G5W.js";import"./integration-icon-1MrWDyJg.js";import"./use-navigate-to-agent-DCU47VEH.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-uaBUCKLk.js";import"./index-_JizC8Pw.js";import"./form-BK3EXow7.js";import"./input-Th45y1Oj.js";import"./file-type-icon-DY6FwN_P.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Dt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",i=typeof n=="string";if(!r&&!i)return null;const o=r?new Date(t):Ct,a=i?new Date(n):Dt;return Number.isNaN(o.getTime())||Number.isNaN(a.getTime())||r&&i&&a.getTime()<=o.getTime()?null:{start:o,end:a,openStart:!r,openEnd:!i}}function ft(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(Et.has(n)){const r=Rt(e);r&&t.push(r);return}if(St.has(n)){const r=e.matchers;if(Array.isArray(r))for(const i of r)ft(i,t)}}}function Ot(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const n=e.variants;return Array.isArray(n)}function It(e){if(typeof e=="string"){const m=e.trim();if(m.length===0)return null;try{const c=new URL(m).pathname.split("/").filter(Boolean),d=c[c.length-1];if(d)return decodeURIComponent(d)}catch{}return m.length>80?`${m.slice(0,77)}…`:m}if(!e||typeof e!="object")return null;const t=e,n=t.config,i=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,i?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const m of o)if(typeof m=="string"&&m.trim().length>0)return m.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function X(e,t,n,r,i){if(Ot(e)){const o=e.variants,a=e.__resolveType,m=$t.test(a)?"":Pt(r);o.forEach((l,c)=>{if(!l||typeof l!="object")return;const d=l,f=[];if(ft(d.rule,f),f.length===0)return;const x=It(d.value)??(m||n);for(const h of f)i.push({blockKey:t,blockLabel:n,innerPath:m,variantIndex:c,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:a})});for(let l=0;l<o.length;l++){const c=o[l];c&&typeof c=="object"&&X(c.value,t,n,[...r,"variants",l,"value"],i)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)X(e[o],t,n,[...r,o],i);return}if(e&&typeof e=="object")for(const[o,a]of Object.entries(e))o!=="__resolveType"&&X(a,t,n,[...r,o],i)}function Ft(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))X(r,n,Lt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,i)=>{const o=i*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),n}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ut(e,t){return e.get(t)??Ht}const Bt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=1440*60*1e3;function B(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function xt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function G(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function st(e,t){return Math.round((B(e).getTime()-B(t).getTime())/gt)}function Wt(e){const t=(e.getTime()-B(e).getTime())/gt;return Math.min(Math.max(t,0),1)}function it(e,t){return st(e,t)+Wt(e)}function zt(e){const t=Z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const i=[];for(let o=0;o<7;o++)i.push(Z(t,r*7+o));n.push(i)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Ut(e,t){const n=B(e[0]),r=Z(n,7),i=n.getTime(),o=r.getTime(),a=[];for(const c of t){const d=B(c.start),f=B(c.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?Z(r,-1):f,h=st(u,n),g=st(x,u)+1;if(g<=0)continue;const b=Math.max(c.start.getTime(),i),j=Math.min(c.end.getTime(),o),v=it(new Date(b),n),p=Math.max(it(new Date(j),n)-v,0);p<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:p})}a.sort((c,d)=>c.startCol-d.startCol||d.span-c.span||c.variant.blockKey.localeCompare(d.variant.blockKey));const m=[],l=[];for(const c of a){let d=m.findIndex(f=>f<=c.startCol);d===-1&&(d=m.length,m.push(0)),m[d]=c.startCol+c.span,l.push({...c,lane:d})}return l}const at=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Yt(e,t){const n=e.openStart?t("sandbox.variantCalendar.always"):at.format(e.start),r=e.openEnd?t("sandbox.variantCalendar.ongoing"):at.format(e.end);return`${n} → ${r}`}function Gt(e){const t=K.c(18),{variant:n}=e,r=tt();let i;t[0]!==n.blockLabel?(i=s.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=i):i=t[1];let o;t[2]!==n.innerPath?(o=n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=o):o=t[3];let a;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(a=n.label!==n.blockLabel&&n.label!==n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=a):a=t[7];let m;t[8]!==r||t[9]!==n?(m=Yt(n,r),t[8]=r,t[9]=n,t[10]=m):m=t[10];let l;t[11]!==m?(l=s.jsx("div",{className:"mt-1",children:m}),t[11]=m,t[12]=l):l=t[12];let c;return t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==l?(c=s.jsx(Mt,{children:s.jsxs("div",{className:"text-xs",children:[i,o,a,l]})}),t[13]=i,t[14]=o,t[15]=a,t[16]=l,t[17]=c):c=t[17],c}const lt=16;function Kt(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${lt}px, #000 calc(100% - ${lt}px), ${r})`}function bt(e){const t=K.c(26),{variant:n,color:r,style:i,children:o,fadeStart:a,fadeEnd:m}=e,l=a===void 0?!1:a,c=m===void 0?!1:m;let d;t[0]!==c||t[1]!==l?(d=Kt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const f=d;let u;t[3]!==l?(u=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=u):u=t[4];let x;t[5]!==c?(x=c&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=c,t[6]=x):x=t[6];let h;t[7]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==i||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...i},t[9]=r.bg,t[10]=r.text,t[11]=i,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let j;t[18]!==g||t[19]!==b?(j=s.jsx(wt,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=j):j=t[20];let v;t[21]!==n?(v=s.jsx(Gt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let p;return t[23]!==v||t[24]!==j?(p=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=p):p=t[25],p}function ir(e){const t=K.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,f,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),f=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=f,t[4]=u}else d=t[2],f=t[3],u=t[4];const x=f;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>m(xt(new Date)),t[5]=h):h=t[5];const g=h;let b;t[6]!==i?(b=()=>m(P=>i==="calendar"?G(P,-1):G(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?G(P,1):G(P,3)),t[8]=i,t[9]=v):v=t[9];const p=v;let y;t[10]!==r?(y=r("sandbox.variantCalendar.today"),t[10]=r,t[11]=y):y=t[11];let T;t[12]!==y?(T=s.jsx(nt,{variant:"outline",size:"sm",onClick:g,children:y}),t[12]=y,t[13]=T):T=t[13];let w;t[14]!==r?(w=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=w):w=t[15];let D;t[16]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(vt,{size:16}),t[16]=D):D=t[16];let k;t[17]!==j||t[18]!==w?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":w,children:D}),t[17]=j,t[18]=w,t[19]=k):k=t[19];let M;t[20]!==r?(M=r("sandbox.variantCalendar.next"),t[20]=r,t[21]=M):M=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Tt,{size:16}),t[22]=S):S=t[22];let A;t[23]!==p||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:p,"aria-label":M,children:S}),t[23]=p,t[24]=M,t[25]=A):A=t[25];const $=ht[a.getMonth()];let C;t[26]!==a?(C=a.getFullYear(),t[26]=a,t[27]=C):C=t[27];let _;t[28]!==$||t[29]!==C?(_=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[$," ",C]}),t[28]=$,t[29]=C,t[30]=_):_=t[30];let N;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[T,k,A,_]}),t[31]=A,t[32]=_,t[33]=T,t[34]=k,t[35]=N):N=t[35];let L;t[36]!==d||t[37]!==l||t[38]!==r?(L=d>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nt,{id:"show-ongoing",checked:l,onCheckedChange:c}),s.jsx(jt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:r("sandbox.variantCalendar.showOngoing",{count:d})})]}),t[36]=d,t[37]=l,t[38]=r,t[39]=L):L=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(dt,{}),t[40]=H):H=t[40];let F;t[41]!==r?(F=r("sandbox.variantCalendar.calendarMode"),t[41]=r,t[42]=F):F=t[42];let E;t[43]!==F?(E={value:"calendar",icon:H,label:F},t[43]=F,t[44]=E):E=t[44];let W;t[45]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(yt,{}),t[45]=W):W=t[45];let R;t[46]!==r?(R=r("sandbox.variantCalendar.timelineMode"),t[46]=r,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:W,label:R},t[48]=R,t[49]=O):O=t[49];let I;t[50]!==E||t[51]!==O?(I=[E,O],t[50]=E,t[51]=O,t[52]=I):I=t[52];let V;t[53]!==I||t[54]!==i?(V=s.jsx(_t,{value:i,onValueChange:o,options:I}),t[53]=I,t[54]=i,t[55]=V):V=t[55];let z;t[56]!==L||t[57]!==V?(z=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=z):z=t[58];let U;t[59]!==N||t[60]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[N,z]}),t[59]=N,t[60]=z,t[61]=U):U=t[61];let Y;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(Y=u.length===0?s.jsx(Zt,{hiddenOngoing:l?0:d}):i==="calendar"?s.jsx(ee,{monthStart:a,variants:u,colorMap:x}):s.jsx(oe,{monthStart:a,variants:u,colorMap:x}),t[62]=x,t[63]=a,t[64]=d,t[65]=l,t[66]=u,t[67]=i,t[68]=Y):Y=t[68];let q;return t[69]!==U||t[70]!==Y?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[U,Y]}),t[69]=U,t[70]=Y,t[71]=q):q=t[71],q}function Jt(e){return e.blockKey}function qt(e){return!e.openEnd}function Qt(e){return e.openEnd}function Xt(){return xt(new Date)}function Zt(e){const t=K.c(4),{hiddenOngoing:n}=e,r=n===void 0?0:n,i=tt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{size:24,className:"text-muted-foreground/60"}),t[0]=o):o=t[0];let a;return t[1]!==r||t[2]!==i?(a=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[o,r>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noDatedVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.hiddenOngoingVariants",{count:r})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noScheduledVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=r,t[2]=i,t[3]=a):a=t[3],a}const rt=20,ct=2,mt=28,te=6;function ee(e){const t=K.c(17),{monthStart:n,variants:r,colorMap:i}=e;let o,a,m,l,c;if(t[0]!==i||t[1]!==n||t[2]!==r){const u=zt(n),x=B(new Date);o=pt,c="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Bt.map(re)}),t[8]=m):m=t[8],l=u.map((h,g)=>{const b=Ut(h,r),j=b.reduce(ne,0),v=mt+j*(rt+ct)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:v},children:[h.map((p,y)=>{const T=p.getMonth()===n.getMonth(),w=p.getTime()===x.getTime();return s.jsx("div",{className:ot("border-r last:border-r-0 px-2 pt-1.5 text-xs",T?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:ot("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",w&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),w=mt+p.lane*(rt+ct),D=p.leftUnits/7*100,k=p.widthUnits/7*100,M=p.variant.openStart&&g===0,S=p.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:p.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:w,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",p.variant.label]})]},`${g}-${y}`)})]},g)}),t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=m,t[6]=l,t[7]=c}else o=t[3],a=t[4],m=t[5],l=t[6],c=t[7];let d;t[9]!==a||t[10]!==m||t[11]!==l?(d=s.jsxs("div",{className:a,children:[m,l]}),t[9]=a,t[10]=m,t[11]=l,t[12]=d):d=t[12];let f;return t[13]!==o||t[14]!==c||t[15]!==d?(f=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}function ne(e,t){return Math.max(e,t.lane+1)}function re(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const Q=4,se=32,J=240;function oe(e){const t=K.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=G(n,Q),m=new Date,l=new Map;for(const _ of r){const N=l.get(_.blockKey)??[];N.push(_),l.set(_.blockKey,N)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),f=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,N)=>G(o,N),t[0]=o,t[1]=u):u=t[1];const x=Array.from({length:Q},u),h=m.getTime()>=o.getTime()&&m.getTime()<=a.getTime()?f(m):null,g=tt(),b=pt,j="flex-1 min-h-0",v="min-w-[900px] relative";let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:J},t[2]=p):p=t[2];let y;t[3]!==g?(y=g("sandbox.variantCalendar.variantBlock"),t[3]=g,t[4]=y):y=t[4];let T;t[5]!==y?(T=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:p,children:y}),t[5]=y,t[6]=T):T=t[6];let w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=w):w=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:w,children:D}),t[8]=D,t[9]=k):k=t[9];let M;t[10]!==T||t[11]!==k?(M=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[T,k]}),t[10]=T,t[11]=k,t[12]=M):M=t[12];let S;t[13]!==g||t[14]!==h?(S=h!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${J}px + (100% - ${J}px) * ${h} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:g("sandbox.variantCalendar.todayLabel")})}),t[13]=g,t[14]=h,t[15]=S):S=t[15];const A=c.map(_=>{const[N,L]=_,H=ut(i,N),F=L[0]?.blockLabel??N;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:J},children:F})}),L.map((E,W)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:se},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:J},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:E.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},children:x.map(ie)}),(()=>{const R=Math.max(E.start.getTime(),o.getTime()),O=Math.min(E.end.getTime(),a.getTime());if(O<=R)return null;const I=f(new Date(R)),V=f(new Date(O))-I;return s.jsx(bt,{variant:E,color:H,fadeStart:E.openStart,fadeEnd:E.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${I}%`,width:`calc(${V}% - 2px)`,height:22},children:E.label})})()]})]},W))]},N)});let $;t[16]!==M||t[17]!==S||t[18]!==A?($=s.jsxs("div",{className:v,children:[M,S,A]}),t[16]=M,t[17]=S,t[18]=A,t[19]=$):$=t[19];let C;return t[20]!==b||t[21]!==$?(C=s.jsx(b,{className:j,children:$}),t[20]=b,t[21]=$,t[22]=C):C=t[22],C}function ie(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function ae(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ht[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function le(e,t){return e[0].localeCompare(t[0])}export{ir as VariantCalendar};
1
+ import{c as K,b as tt,r as et,j as s,m as ot,B as nt}from"./index-DLyxjIYw.js";import{x as vt,a9 as dt,aM as yt}from"./agent-icon-5ZYno8Im.js";import{i as Tt}from"./ChevronRight-BGcGReEM.js";import{L as jt}from"./label-Cwuc9phK.js";import{B as pt}from"./automation-runs-DaNWyAAB.js";import{S as Nt}from"./switch-BCRtcgA0.js";import{T as wt,c as kt,a as Mt}from"./tooltip-B-y9isox.js";import{V as _t}from"./view-mode-toggle-B1CxI2v1.js";import"./AlertCircle-DUlfht_8.js";import"./Tool01-XzYGP86W.js";import"./ArrowUp-CsCHH_fH.js";import"./ArrowLeft-xr5VbHB2.js";import"./Tool02-CE2ZdUr1.js";import"./XCircle-_aQH9vJz.js";import"./ArrowUpRight-M9WAVHfb.js";import"./TrendUp01-BdIQtpYk.js";import"./ZapSquare-Bv6t7Fg1.js";import"./Users03-BNksnLQf.js";import"./CheckCircle-C2PmPe-o.js";import"./Check-BXav60Vy.js";import"./ChevronDown-CauLatdX.js";import"./ChevronSelectorVertical-CvdZht1v.js";import"./ChevronUp-D_tIdiJb.js";import"./DotsVertical-fn24sGZC.js";import"./Stars02-DtoiSIcu.js";import"./Copy01-CV1JugLX.js";import"./CreditCard01-B_w5eexh.js";import"./Download01-D3eJDAEO.js";import"./Settings02-DjFkLPe4.js";import"./Eye-BhHZY2CZ.js";import"./FilterLines-BWjLIxVc.js";import"./Share07-Caa0Im56.js";import"./Globe01-DdUoMsv3.js";import"./Globe04-B-w3WEq9.js";import"./SwitchHorizontal01-C5wQU73g.js";import"./HardDrive-BFP4nRun.js";import"./Key01-Cfe0Tudx.js";import"./LayoutLeft-BEpfII_o.js";import"./LinkExternal01-D25gdGqj.js";import"./LockUnlocked01-P_wfDROK.js";import"./LogOut01-DBKmS50y.js";import"./Monitor01-BhLjoS2b.js";import"./Sun-Dpvmek-4.js";import"./Palette-aeV8tQ28.js";import"./Play-BdOAMmIp.js";import"./Plus-D1J2FK4h.js";import"./SearchLg-BzCLzG8R.js";import"./SearchMd-xpLLk_pA.js";import"./Shield01-D5NbAsUv.js";import"./Stars01-CCBcRCds.js";import"./Trash01-BnQQflAa.js";import"./Upload01-Bhqh3Tbq.js";import"./User01-C1NHQ-ZR.js";import"./Users01-CMhcYnus.js";import"./XClose-DdNRdfWH.js";import"./X-DY9FeXqi.js";import"./Zap-DDihnv3P.js";import"./select-BhNhFGIm.js";import"./useInfiniteQuery-BTBdPVyZ.js";import"./use-infinite-scroll-C1T3wjaO.js";import"./use-connection-DmmNo1LM.js";import"./use-mcp-client-_o9o88xf.js";import"./auth-Clf3KXjv.js";import"./use-virtual-mcp-B0LtGhD8.js";import"./card-CKXxuGX6.js";import"./sidebar-_myHCEzH.js";import"./use-mobile-H1cEPaVS.js";import"./table-C5eCsrvC.js";import"./empty-state-PrJglZio.js";import"./use-members-BeAeYksa.js";import"./use-org-auth-client-A_fhg4VK.js";import"./use-clock-tick-DS1Jl_N9.js";import"./use-automations-DyLBCDVI.js";import"./studio-tools-ThQ_rcsF.js";import"./useSuspenseInfiniteQuery-C3uzz_IX.js";import"./avatar-CsESGb5P.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CSIcq8z_.js";import"./dialog-U03ZiuXk.js";import"./tab-id-DM8k_HA-.js";import"./hooks-B2woSXLe.js";import"./decopilot-sse-pool-DLTV1od0.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DAVuFXb-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-Bb772HOL.js";import"./use-decopilot-events-Bb_7qSC-.js";import"./use-organization-settings-DPRJ0ATL.js";import"./monaco-editor-DBmhJ8Ys.js";import"./spinner-CgvhsPnS.js";import"./types-D6tOWfuo.js";import"./shell-layout-Dpz4gldn.js";import"./required-auth-layout-tPpYmfR1.js";import"./use-org-sso-D-BEPABI.js";import"./integration-icon-BolSFCMJ.js";import"./use-navigate-to-agent-BqMCqmam.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-CkOpSzxv.js";import"./index-CY3hVAON.js";import"./form-BlkhuHf9.js";import"./input-BH7zyD0i.js";import"./file-type-icon-DNO6EG6W.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Dt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",i=typeof n=="string";if(!r&&!i)return null;const o=r?new Date(t):Ct,a=i?new Date(n):Dt;return Number.isNaN(o.getTime())||Number.isNaN(a.getTime())||r&&i&&a.getTime()<=o.getTime()?null:{start:o,end:a,openStart:!r,openEnd:!i}}function ft(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(Et.has(n)){const r=Rt(e);r&&t.push(r);return}if(St.has(n)){const r=e.matchers;if(Array.isArray(r))for(const i of r)ft(i,t)}}}function Ot(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const n=e.variants;return Array.isArray(n)}function It(e){if(typeof e=="string"){const m=e.trim();if(m.length===0)return null;try{const c=new URL(m).pathname.split("/").filter(Boolean),d=c[c.length-1];if(d)return decodeURIComponent(d)}catch{}return m.length>80?`${m.slice(0,77)}…`:m}if(!e||typeof e!="object")return null;const t=e,n=t.config,i=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,i?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const m of o)if(typeof m=="string"&&m.trim().length>0)return m.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function X(e,t,n,r,i){if(Ot(e)){const o=e.variants,a=e.__resolveType,m=$t.test(a)?"":Pt(r);o.forEach((l,c)=>{if(!l||typeof l!="object")return;const d=l,f=[];if(ft(d.rule,f),f.length===0)return;const x=It(d.value)??(m||n);for(const h of f)i.push({blockKey:t,blockLabel:n,innerPath:m,variantIndex:c,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:a})});for(let l=0;l<o.length;l++){const c=o[l];c&&typeof c=="object"&&X(c.value,t,n,[...r,"variants",l,"value"],i)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)X(e[o],t,n,[...r,o],i);return}if(e&&typeof e=="object")for(const[o,a]of Object.entries(e))o!=="__resolveType"&&X(a,t,n,[...r,o],i)}function Ft(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))X(r,n,Lt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,i)=>{const o=i*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),n}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ut(e,t){return e.get(t)??Ht}const Bt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=1440*60*1e3;function B(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function xt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function G(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function st(e,t){return Math.round((B(e).getTime()-B(t).getTime())/gt)}function Wt(e){const t=(e.getTime()-B(e).getTime())/gt;return Math.min(Math.max(t,0),1)}function it(e,t){return st(e,t)+Wt(e)}function zt(e){const t=Z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const i=[];for(let o=0;o<7;o++)i.push(Z(t,r*7+o));n.push(i)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Ut(e,t){const n=B(e[0]),r=Z(n,7),i=n.getTime(),o=r.getTime(),a=[];for(const c of t){const d=B(c.start),f=B(c.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?Z(r,-1):f,h=st(u,n),g=st(x,u)+1;if(g<=0)continue;const b=Math.max(c.start.getTime(),i),j=Math.min(c.end.getTime(),o),v=it(new Date(b),n),p=Math.max(it(new Date(j),n)-v,0);p<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:p})}a.sort((c,d)=>c.startCol-d.startCol||d.span-c.span||c.variant.blockKey.localeCompare(d.variant.blockKey));const m=[],l=[];for(const c of a){let d=m.findIndex(f=>f<=c.startCol);d===-1&&(d=m.length,m.push(0)),m[d]=c.startCol+c.span,l.push({...c,lane:d})}return l}const at=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Yt(e,t){const n=e.openStart?t("sandbox.variantCalendar.always"):at.format(e.start),r=e.openEnd?t("sandbox.variantCalendar.ongoing"):at.format(e.end);return`${n} → ${r}`}function Gt(e){const t=K.c(18),{variant:n}=e,r=tt();let i;t[0]!==n.blockLabel?(i=s.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=i):i=t[1];let o;t[2]!==n.innerPath?(o=n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=o):o=t[3];let a;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(a=n.label!==n.blockLabel&&n.label!==n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=a):a=t[7];let m;t[8]!==r||t[9]!==n?(m=Yt(n,r),t[8]=r,t[9]=n,t[10]=m):m=t[10];let l;t[11]!==m?(l=s.jsx("div",{className:"mt-1",children:m}),t[11]=m,t[12]=l):l=t[12];let c;return t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==l?(c=s.jsx(Mt,{children:s.jsxs("div",{className:"text-xs",children:[i,o,a,l]})}),t[13]=i,t[14]=o,t[15]=a,t[16]=l,t[17]=c):c=t[17],c}const lt=16;function Kt(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${lt}px, #000 calc(100% - ${lt}px), ${r})`}function bt(e){const t=K.c(26),{variant:n,color:r,style:i,children:o,fadeStart:a,fadeEnd:m}=e,l=a===void 0?!1:a,c=m===void 0?!1:m;let d;t[0]!==c||t[1]!==l?(d=Kt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const f=d;let u;t[3]!==l?(u=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=u):u=t[4];let x;t[5]!==c?(x=c&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=c,t[6]=x):x=t[6];let h;t[7]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==i||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...i},t[9]=r.bg,t[10]=r.text,t[11]=i,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let j;t[18]!==g||t[19]!==b?(j=s.jsx(wt,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=j):j=t[20];let v;t[21]!==n?(v=s.jsx(Gt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let p;return t[23]!==v||t[24]!==j?(p=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=p):p=t[25],p}function ir(e){const t=K.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,f,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),f=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=f,t[4]=u}else d=t[2],f=t[3],u=t[4];const x=f;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>m(xt(new Date)),t[5]=h):h=t[5];const g=h;let b;t[6]!==i?(b=()=>m(P=>i==="calendar"?G(P,-1):G(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?G(P,1):G(P,3)),t[8]=i,t[9]=v):v=t[9];const p=v;let y;t[10]!==r?(y=r("sandbox.variantCalendar.today"),t[10]=r,t[11]=y):y=t[11];let T;t[12]!==y?(T=s.jsx(nt,{variant:"outline",size:"sm",onClick:g,children:y}),t[12]=y,t[13]=T):T=t[13];let w;t[14]!==r?(w=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=w):w=t[15];let D;t[16]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(vt,{size:16}),t[16]=D):D=t[16];let k;t[17]!==j||t[18]!==w?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":w,children:D}),t[17]=j,t[18]=w,t[19]=k):k=t[19];let M;t[20]!==r?(M=r("sandbox.variantCalendar.next"),t[20]=r,t[21]=M):M=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Tt,{size:16}),t[22]=S):S=t[22];let A;t[23]!==p||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:p,"aria-label":M,children:S}),t[23]=p,t[24]=M,t[25]=A):A=t[25];const $=ht[a.getMonth()];let C;t[26]!==a?(C=a.getFullYear(),t[26]=a,t[27]=C):C=t[27];let _;t[28]!==$||t[29]!==C?(_=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[$," ",C]}),t[28]=$,t[29]=C,t[30]=_):_=t[30];let N;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[T,k,A,_]}),t[31]=A,t[32]=_,t[33]=T,t[34]=k,t[35]=N):N=t[35];let L;t[36]!==d||t[37]!==l||t[38]!==r?(L=d>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nt,{id:"show-ongoing",checked:l,onCheckedChange:c}),s.jsx(jt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:r("sandbox.variantCalendar.showOngoing",{count:d})})]}),t[36]=d,t[37]=l,t[38]=r,t[39]=L):L=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(dt,{}),t[40]=H):H=t[40];let F;t[41]!==r?(F=r("sandbox.variantCalendar.calendarMode"),t[41]=r,t[42]=F):F=t[42];let E;t[43]!==F?(E={value:"calendar",icon:H,label:F},t[43]=F,t[44]=E):E=t[44];let W;t[45]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(yt,{}),t[45]=W):W=t[45];let R;t[46]!==r?(R=r("sandbox.variantCalendar.timelineMode"),t[46]=r,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:W,label:R},t[48]=R,t[49]=O):O=t[49];let I;t[50]!==E||t[51]!==O?(I=[E,O],t[50]=E,t[51]=O,t[52]=I):I=t[52];let V;t[53]!==I||t[54]!==i?(V=s.jsx(_t,{value:i,onValueChange:o,options:I}),t[53]=I,t[54]=i,t[55]=V):V=t[55];let z;t[56]!==L||t[57]!==V?(z=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=z):z=t[58];let U;t[59]!==N||t[60]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[N,z]}),t[59]=N,t[60]=z,t[61]=U):U=t[61];let Y;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(Y=u.length===0?s.jsx(Zt,{hiddenOngoing:l?0:d}):i==="calendar"?s.jsx(ee,{monthStart:a,variants:u,colorMap:x}):s.jsx(oe,{monthStart:a,variants:u,colorMap:x}),t[62]=x,t[63]=a,t[64]=d,t[65]=l,t[66]=u,t[67]=i,t[68]=Y):Y=t[68];let q;return t[69]!==U||t[70]!==Y?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[U,Y]}),t[69]=U,t[70]=Y,t[71]=q):q=t[71],q}function Jt(e){return e.blockKey}function qt(e){return!e.openEnd}function Qt(e){return e.openEnd}function Xt(){return xt(new Date)}function Zt(e){const t=K.c(4),{hiddenOngoing:n}=e,r=n===void 0?0:n,i=tt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{size:24,className:"text-muted-foreground/60"}),t[0]=o):o=t[0];let a;return t[1]!==r||t[2]!==i?(a=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[o,r>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noDatedVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.hiddenOngoingVariants",{count:r})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noScheduledVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=r,t[2]=i,t[3]=a):a=t[3],a}const rt=20,ct=2,mt=28,te=6;function ee(e){const t=K.c(17),{monthStart:n,variants:r,colorMap:i}=e;let o,a,m,l,c;if(t[0]!==i||t[1]!==n||t[2]!==r){const u=zt(n),x=B(new Date);o=pt,c="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Bt.map(re)}),t[8]=m):m=t[8],l=u.map((h,g)=>{const b=Ut(h,r),j=b.reduce(ne,0),v=mt+j*(rt+ct)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:v},children:[h.map((p,y)=>{const T=p.getMonth()===n.getMonth(),w=p.getTime()===x.getTime();return s.jsx("div",{className:ot("border-r last:border-r-0 px-2 pt-1.5 text-xs",T?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:ot("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",w&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),w=mt+p.lane*(rt+ct),D=p.leftUnits/7*100,k=p.widthUnits/7*100,M=p.variant.openStart&&g===0,S=p.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:p.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:w,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",p.variant.label]})]},`${g}-${y}`)})]},g)}),t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=m,t[6]=l,t[7]=c}else o=t[3],a=t[4],m=t[5],l=t[6],c=t[7];let d;t[9]!==a||t[10]!==m||t[11]!==l?(d=s.jsxs("div",{className:a,children:[m,l]}),t[9]=a,t[10]=m,t[11]=l,t[12]=d):d=t[12];let f;return t[13]!==o||t[14]!==c||t[15]!==d?(f=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}function ne(e,t){return Math.max(e,t.lane+1)}function re(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const Q=4,se=32,J=240;function oe(e){const t=K.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=G(n,Q),m=new Date,l=new Map;for(const _ of r){const N=l.get(_.blockKey)??[];N.push(_),l.set(_.blockKey,N)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),f=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,N)=>G(o,N),t[0]=o,t[1]=u):u=t[1];const x=Array.from({length:Q},u),h=m.getTime()>=o.getTime()&&m.getTime()<=a.getTime()?f(m):null,g=tt(),b=pt,j="flex-1 min-h-0",v="min-w-[900px] relative";let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:J},t[2]=p):p=t[2];let y;t[3]!==g?(y=g("sandbox.variantCalendar.variantBlock"),t[3]=g,t[4]=y):y=t[4];let T;t[5]!==y?(T=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:p,children:y}),t[5]=y,t[6]=T):T=t[6];let w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=w):w=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:w,children:D}),t[8]=D,t[9]=k):k=t[9];let M;t[10]!==T||t[11]!==k?(M=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[T,k]}),t[10]=T,t[11]=k,t[12]=M):M=t[12];let S;t[13]!==g||t[14]!==h?(S=h!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${J}px + (100% - ${J}px) * ${h} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:g("sandbox.variantCalendar.todayLabel")})}),t[13]=g,t[14]=h,t[15]=S):S=t[15];const A=c.map(_=>{const[N,L]=_,H=ut(i,N),F=L[0]?.blockLabel??N;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:J},children:F})}),L.map((E,W)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:se},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:J},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:E.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},children:x.map(ie)}),(()=>{const R=Math.max(E.start.getTime(),o.getTime()),O=Math.min(E.end.getTime(),a.getTime());if(O<=R)return null;const I=f(new Date(R)),V=f(new Date(O))-I;return s.jsx(bt,{variant:E,color:H,fadeStart:E.openStart,fadeEnd:E.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${I}%`,width:`calc(${V}% - 2px)`,height:22},children:E.label})})()]})]},W))]},N)});let $;t[16]!==M||t[17]!==S||t[18]!==A?($=s.jsxs("div",{className:v,children:[M,S,A]}),t[16]=M,t[17]=S,t[18]=A,t[19]=$):$=t[19];let C;return t[20]!==b||t[21]!==$?(C=s.jsx(b,{className:j,children:$}),t[20]=b,t[21]=$,t[22]=C):C=t[22],C}function ie(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function ae(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ht[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function le(e,t){return e[0].localeCompare(t[0])}export{ir as VariantCalendar};
@@ -1 +1 @@
1
- import{c as $,r as T,m as f,j as i}from"./index-CocRXnaV.js";import{c as k,T as I,a as P}from"./tooltip-CsaHSAiw.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,b=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),m=R.current[e];m&&S({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==b||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,m)=>{const j=i.jsxs("button",{ref:V=>{R.current[m]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=b,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=b?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
1
+ import{c as $,r as T,m as f,j as i}from"./index-DLyxjIYw.js";import{c as k,T as I,a as P}from"./tooltip-B-y9isox.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,b=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),m=R.current[e];m&&S({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==b||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,m)=>{const j=i.jsxs("button",{ref:V=>{R.current[m]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=b,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=b?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
@@ -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-CocRXnaV.js"></script>
53
+ <script type="module" crossorigin src="/assets/index-DLyxjIYw.js"></script>
54
54
  <link rel="stylesheet" crossorigin href="/assets/index-C9I1mQ4O.css">
55
55
  </head>
56
56
  <body>
@@ -1371,7 +1371,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var Gi1=w(()=>{Lf()});f
1371
1371
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await mb`
1372
1372
  DELETE FROM kysely_migration WHERE name = ${X}
1373
1373
  `.execute($)}}async function To1($){await Lp6($),await Dp6($);let Z=new Po1({db:$,provider:{getMigrations:()=>Promise.resolve(Pi0)}}),{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 Ep6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await mc0();let G=X??F6(),J=async()=>{if(!Z&&!X)await hB(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await To1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function jp6(){let $=F6(),Z=new Po1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Pi0)}}),{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 Io1=w(()=>{zo1();ic0();QX()});async function AZ0($){let Z={...process.env},X=B80($,Z);console.log(hw1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?fn1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (S90(),k90)),{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(() => (ic0(),yn1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (QX(),$n1)),{migrateToLatest:N}=await Promise.resolve().then(() => (Io1(),Ro1)),U=H(G.databaseUrl);await N({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...X.settings,betterAuthSecret:Q,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{},...G.natsTunnel?{natsPublicUrl:G.natsTunnel.publicUrl,natsAccountJwt:G.natsTunnel.accountJwt,natsAccountSigningKey:G.natsTunnel.accountSigningKey,natsOperatorJwt:G.natsTunnel.operatorJwt,natsTunnelPublicEnabled:!0,natsCredsPath:G.natsTunnel.credsPath}:{}};return Ji1(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 Ai0=w(()=>{Lf();bn1();C8()});var Vo1={};F0(Vo1,{updateService:()=>EE,subscribeCliState:()=>Ii0,setTuiConsoleIntercepted:()=>TZ0,setServerUrl:()=>Ci,setMigrationsDone:()=>Si,setDevMode:()=>Ap6,resetCliStateForTests:()=>zp6,isTuiConsoleIntercepted:()=>RZ0,getCliState:()=>Ri0,addLogEntry:()=>mB});function qo1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function zp6(){cQ=qo1()}function Pp6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function ki(){for(let $ of Ti0)$()}function Ri0(){return cQ}function Ii0($){return Ti0.add($),()=>Ti0.delete($)}function EE($){cQ={...cQ,services:cQ.services.map((Z)=>Z.name===$.name?$:Z)},ki()}function Si(){cQ={...cQ,migrationsStatus:"done"},ki()}function Ci($){cQ={...cQ,serverUrl:$},ki()}function mB($){let Z=[...cQ.logs,$];cQ={...cQ,logs:Z.length>500?Z.slice(-500):Z},ki()}function Ap6(){cQ={...cQ,services:[...Pp6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},ki()}function TZ0($){Mo1=$}function RZ0(){return Mo1}var cQ,Ti0,Mo1=!1;var jE=w(()=>{cQ=qo1();Ti0=new Set});import{createServer as ko1}from"net";function Tp6($){return new Promise((Z)=>{let X=ko1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function _i($){if(await Tp6($))return $;let Z=await new Promise((X,Q)=>{let Y=ko1();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 qi0=()=>{};function vi($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var Mi0={};F0(Mi0,{startDevServer:()=>Ip6});import{join as Rp6}from"path";function So1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
1374
- `);Q=G.pop()??"";for(let J of G){let K=vi(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;mB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=vi(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)mB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Ip6($){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 _i(Number(Y)+1):await _i(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await AZ0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)EE({name:L.name,status:"ready",port:L.port});Si();let N=Rp6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)So1(F.stdout),So1(F.stderr);Ci(G),EE({name:"Vite",status:"ready",port:Number(Y)}),EE({name:"API",status:"ready",port:Number(K.port)});let O=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (S90(),k90));await D(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:F}}var Vi0=w(()=>{Ai0();jE();qi0()});var IZ0;var ki0=w(()=>{IZ0={name:"decocms",version:"4.243.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","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as Mp6,Text as Co1}from"ink";import{jsx as Vp6,jsxs as _o1}from"react/jsx-runtime";function vo1({version:$}){return _o1(Mp6,{flexDirection:"column",marginTop:1,children:[e90.map((Z,X)=>Vp6(Co1,{color:$Z0[X],children:Z},X)),_o1(Co1,{dimColor:!0,children:[" v",$]})]})}var xo1=w(()=>{Ei()});import{Box as zE,Text as iB}from"ink";import{Spinner as kp6}from"@inkjs/ui";import{jsx as aY,jsxs as ib}from"react/jsx-runtime";function fo1({status:$}){if($==="pending")return aY(kp6,{label:""});return aY(iB,{color:"green",children:"\u2713"})}function Sp6($){return`${$.name}: ${$.port||"...."}`}function bo1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return ib(zE,{flexDirection:"column",paddingBottom:1,children:[aY(vo1,{version:IZ0.version}),aY(zE,{marginBottom:1,children:aY(iB,{dimColor:!0,children:"\u2500".repeat(80)})}),aY(zE,{children:ib(iB,{dimColor:!0,children:["Home: ",X]})}),ib(zE,{gap:2,children:[$.map((Y)=>ib(zE,{gap:1,children:[aY(iB,{children:Sp6(Y)}),aY(fo1,{status:Y.status})]},Y.name)),ib(zE,{gap:1,children:[aY(iB,{children:"Migrations"}),aY(fo1,{status:Z})]})]}),aY(zE,{children:Q?ib(iB,{children:["Open in browser: ",aY(iB,{color:"cyan",children:Q})]}):aY(iB,{dimColor:!0,children:"Starting..."})})]})}var yo1=w(()=>{ki0();xo1()});import{Box as Cp6,Text as xi}from"ink";import{jsx as Si0,jsxs as Ci0}from"react/jsx-runtime";function _p6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function go1({logs:$}){return Si0(Cp6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Si0(xi,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Ci0(xi,{children:[Ci0(xi,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Si0(xi,{color:_p6(Z.status),children:Z.status}),Ci0(xi,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var ho1=()=>{};var _i0={};F0(_i0,{App:()=>fp6});import{Box as vp6}from"ink";import{useSyncExternalStore as xp6}from"react";import{jsx as uo1,jsxs as bp6}from"react/jsx-runtime";function fp6({home:$}){let Z=xp6(Ii0,Ri0);return bp6(vp6,{flexDirection:"column",children:[uo1(bo1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),uo1(go1,{logs:Z.logs})]})}var vi0=w(()=>{yo1();ho1();jE()});var fJ="thread-gate",sN="decopilot-hosted-harness",eN="decopilot-hosted-harness-sandboxed",N3="automations",nB="background-tools",PE="task-board-github-reads",AE="jira-push";var co1="7";function lo1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:co1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var do1=()=>{};function yp6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function xi0($,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 mo1(){let $=yp6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:xi0($,"--cpu-prof-dir")??process.cwd(),name:xi0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(xi0($,"--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 io1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=OE();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(()=>{}),qZ0=setInterval(()=>void Z().catch(()=>{}),$),qZ0.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(qZ0)clearInterval(qZ0)}}var qZ0;var no1=()=>{};import*as gp6 from"bun:jsc";function po1(){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{hp6()}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=up6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var hp6,up6;var to1=w(()=>{({startSamplingProfiler:hp6,samplingProfilerStackTraces:up6}=gp6)});function oo1(){mo1();let $=[io1(),ni1(),po1()];return()=>{for(let Z of $)Z()}}var ro1=w(()=>{xc0();no1();to1()});var TE=_((ao1)=>{Object.defineProperty(ao1,"__esModule",{value:!0});ao1.RepublishHeaders=ao1.DirectMsgHeaders=ao1.JsHeaders=ao1.AdvisoryKind=void 0;ao1.isOrderedPushConsumerOptions=cp6;ao1.isPullConsumer=lp6;ao1.isPushConsumer=dp6;ao1.isBoundPushConsumerOptions=mp6;function cp6($){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 lp6($){return $.isPullConsumer()}function dp6($){return $.isPushConsumer()}function mp6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}ao1.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"};ao1.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"};ao1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};ao1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var sY=_((eo1)=>{Object.defineProperty(eo1,"__esModule",{value:!0});eo1.TD=eo1.TE=eo1.Empty=void 0;eo1.encode=ep6;eo1.decode=$t6;eo1.Empty=new Uint8Array(0);eo1.TE=new TextEncoder;eo1.TD=new TextDecoder;function sp6(...$){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 ep6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(eo1.TE.encode($[X]));if(Z.length===0)return eo1.Empty;if(Z.length===1)return Z[0];return sp6(...Z)}function $t6($){if(!$||$.length===0)return"";return eo1.TD.decode($)}});var eY=_((Xr1)=>{Object.defineProperty(Xr1,"__esModule",{value:!0});Xr1.errors=Xr1.PermissionViolationError=Xr1.NoRespondersError=Xr1.TimeoutError=Xr1.RequestError=Xr1.ProtocolError=Xr1.ConnectionError=Xr1.DrainingConnectionError=Xr1.ClosedConnectionError=Xr1.AuthorizationError=Xr1.UserAuthenticationExpiredError=Xr1.InvalidOperationError=Xr1.InvalidArgumentError=Xr1.InvalidSubjectError=void 0;class bi0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Xr1.InvalidSubjectError=bi0;class MZ0 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 MZ0(`${$} ${Z}`,X)}}Xr1.InvalidArgumentError=MZ0;class yi0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Xr1.InvalidOperationError=yi0;class VZ0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new VZ0($);return null}}Xr1.UserAuthenticationExpiredError=VZ0;class kZ0 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 kZ0($);return null}}Xr1.AuthorizationError=kZ0;class gi0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Xr1.ClosedConnectionError=gi0;class hi0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Xr1.DrainingConnectionError=hi0;class ui0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Xr1.ConnectionError=ui0;class ci0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Xr1.ProtocolError=ci0;class li0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof SZ0}}Xr1.RequestError=li0;class di0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Xr1.TimeoutError=di0;class SZ0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Xr1.NoRespondersError=SZ0;class CZ0 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 CZ0($,X,Q,Y)}}Xr1.PermissionViolationError=CZ0;Xr1.errors={AuthorizationError:kZ0,ClosedConnectionError:gi0,ConnectionError:ui0,DrainingConnectionError:hi0,InvalidArgumentError:MZ0,InvalidOperationError:yi0,InvalidSubjectError:bi0,NoRespondersError:SZ0,PermissionViolationError:CZ0,ProtocolError:ci0,RequestError:li0,TimeoutError:di0,UserAuthenticationExpiredError:VZ0}});var bJ=_((Kr1)=>{Object.defineProperty(Kr1,"__esModule",{value:!0});Kr1.SimpleMutex=Kr1.Perf=void 0;Kr1.extend=Dt6;Kr1.render=Et6;Kr1.timeout=jt6;Kr1.delay=zt6;Kr1.deadline=Pt6;Kr1.deferred=ii0;Kr1.debugDeferred=At6;Kr1.shuffle=Tt6;Kr1.collect=Rt6;Kr1.jitter=Jr1;Kr1.backoff=It6;Kr1.nanos=qt6;Kr1.millis=Mt6;Kr1.randomToken=St6;var Lt6=sY(),mi0=eY();function Dt6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Et6($){return Lt6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function jt6($,Z=!0){let X=Z?new mi0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new mi0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function zt6($=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 Pt6($,Z=1000){let X=ii0(),Q=setTimeout(()=>{X.reject(new mi0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function ii0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function At6(){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 Tt6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Rt6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Yr1{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})}),$}}Kr1.Perf=Yr1;class Gr1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=ii0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Kr1.SimpleMutex=Gr1;function Jr1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function It6($=[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 Jr1(X>Z?$[Z]:$[X])}}}function qt6($){return $*1e6}function Mt6($){return Math.floor($/1e6)}var Vt6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$U=new Uint8Array(62);for(let $=0;$<62;$++)$U[$]=Vt6.charCodeAt($);var kt6=218340105584896;function St6(){let $=Math.floor(Math.random()*kt6),Z=$%62,X=$U[Z];$=($-Z)/62,Z=$%62;let Q=$U[Z];$=($-Z)/62,Z=$%62;let Y=$U[Z];$=($-Z)/62,Z=$%62;let G=$U[Z];$=($-Z)/62,Z=$%62;let J=$U[Z];$=($-Z)/62,Z=$%62;let K=$U[Z];$=($-Z)/62,Z=$%62;let W=$U[Z];$=($-Z)/62;let H=$U[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var wr1=_((Br1)=>{Object.defineProperty(Br1,"__esModule",{value:!0});Br1.nuid=Br1.NuidImpl=void 0;var nt6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",pB=62,vZ0=12,Ur1=10,Hr1=33,pt6=333,Nr1=vZ0+Ur1,pi0=new Uint8Array(pB);for(let $=0;$<pB;$++)pi0[$]=nt6.charCodeAt($);var _Z0=4294967296,Fr1=BigInt(pB)**BigInt(Ur1),fi=Number(Fr1/(1n<<32n)),ni0=Number(Fr1%(1n<<32n));function tt6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function ot6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else tt6($)}class ti0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Nr1),this.cbuf=new Uint8Array(vZ0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(fi+1)),this.seqLo=Math.floor(Math.random()*_Z0);while($++<8&&this.seqHi===fi&&this.seqLo>=ni0);if(this.seqHi===fi&&this.seqLo>=ni0)this.seqLo=0;this.inc=Math.random()*(pt6-Hr1)+Hr1|0}setPre(){ot6(this.cbuf);for(let $=0;$<vZ0;$++)this.buf[$]=pi0[this.cbuf[$]%pB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Nr1-1;X>=vZ0;X--){let Q=Math.floor($/pB),G=($-Q*pB)*_Z0+Z,J=Math.floor(G/pB),K=G-J*pB;this.buf[X]=pi0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=_Z0)this.seqLo-=_Z0,this.seqHi+=1;if(this.seqHi>fi||this.seqHi===fi&&this.seqLo>=ni0)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()}}Br1.NuidImpl=ti0;Br1.nuid=new ti0});var jr1=_((Dr1)=>{Object.defineProperty(Dr1,"__esModule",{value:!0});Dr1.nuid=Dr1.Nuid=void 0;var Lr1=wr1();Dr1.Nuid=Lr1.NuidImpl;Dr1.nuid=Lr1.nuid});var fZ0=_((xZ0)=>{Object.defineProperty(xZ0,"__esModule",{value:!0});xZ0.nuid=xZ0.Nuid=void 0;var zr1=jr1();Object.defineProperty(xZ0,"Nuid",{enumerable:!0,get:function(){return zr1.Nuid}});Object.defineProperty(xZ0,"nuid",{enumerable:!0,get:function(){return zr1.nuid}})});var tB=_((Pr1)=>{Object.defineProperty(Pr1,"__esModule",{value:!0});Pr1.DEFAULT_HOST=Pr1.DEFAULT_PORT=Pr1.Match=void 0;Pr1.syncIterator=Zo6;Pr1.createInbox=Xo6;var et6=fZ0(),$o6=eY();Pr1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Zo6($){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 Xo6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw $o6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${et6.nuid.next()}`}Pr1.DEFAULT_PORT=4222;Pr1.DEFAULT_HOST="127.0.0.1"});var bi=_((Ir1)=>{Object.defineProperty(Ir1,"__esModule",{value:!0});Ir1.DataBuffer=void 0;var Tr1=sY();class Rr1{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 Tr1.TE.encode($)}static toAscii($){return Tr1.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}}Ir1.DataBuffer=Rr1});var RE=_((Vr1)=>{Object.defineProperty(Vr1,"__esModule",{value:!0});Vr1.LF=Vr1.CR=Vr1.CRLF=Vr1.CR_LF_LEN=Vr1.CR_LF=void 0;Vr1.setTransportFactory=No6;Vr1.defaultPort=Uo6;Vr1.getUrlParseFn=Fo6;Vr1.newTransport=Bo6;Vr1.getResolveFn=Oo6;Vr1.protoLen=Mr1;Vr1.extractProtocolMessage=wo6;var Ko6=sY(),Wo6=tB(),Ho6=bi(),$G;function No6($){$G=$}function Uo6(){return $G!==void 0&&$G.defaultPort!==void 0?$G.defaultPort:Wo6.DEFAULT_PORT}function Fo6(){return $G!==void 0&&$G.urlParseFn?$G.urlParseFn:void 0}function Bo6(){if(!$G||typeof $G.factory!=="function")throw Error("transport fn is not set");return $G.factory()}function Oo6(){return $G!==void 0&&$G.dnsResolveFn?$G.dnsResolveFn:void 0}Vr1.CR_LF=`\r
1374
+ `);Q=G.pop()??"";for(let J of G){let K=vi(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;mB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=vi(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)mB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Ip6($){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 _i(Number(Y)+1):await _i(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await AZ0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)EE({name:L.name,status:"ready",port:L.port});Si();let N=Rp6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)So1(F.stdout),So1(F.stderr);Ci(G),EE({name:"Vite",status:"ready",port:Number(Y)}),EE({name:"API",status:"ready",port:Number(K.port)});let O=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (S90(),k90));await D(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:F}}var Vi0=w(()=>{Ai0();jE();qi0()});var IZ0;var ki0=w(()=>{IZ0={name:"decocms",version:"4.243.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as Mp6,Text as Co1}from"ink";import{jsx as Vp6,jsxs as _o1}from"react/jsx-runtime";function vo1({version:$}){return _o1(Mp6,{flexDirection:"column",marginTop:1,children:[e90.map((Z,X)=>Vp6(Co1,{color:$Z0[X],children:Z},X)),_o1(Co1,{dimColor:!0,children:[" v",$]})]})}var xo1=w(()=>{Ei()});import{Box as zE,Text as iB}from"ink";import{Spinner as kp6}from"@inkjs/ui";import{jsx as aY,jsxs as ib}from"react/jsx-runtime";function fo1({status:$}){if($==="pending")return aY(kp6,{label:""});return aY(iB,{color:"green",children:"\u2713"})}function Sp6($){return`${$.name}: ${$.port||"...."}`}function bo1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return ib(zE,{flexDirection:"column",paddingBottom:1,children:[aY(vo1,{version:IZ0.version}),aY(zE,{marginBottom:1,children:aY(iB,{dimColor:!0,children:"\u2500".repeat(80)})}),aY(zE,{children:ib(iB,{dimColor:!0,children:["Home: ",X]})}),ib(zE,{gap:2,children:[$.map((Y)=>ib(zE,{gap:1,children:[aY(iB,{children:Sp6(Y)}),aY(fo1,{status:Y.status})]},Y.name)),ib(zE,{gap:1,children:[aY(iB,{children:"Migrations"}),aY(fo1,{status:Z})]})]}),aY(zE,{children:Q?ib(iB,{children:["Open in browser: ",aY(iB,{color:"cyan",children:Q})]}):aY(iB,{dimColor:!0,children:"Starting..."})})]})}var yo1=w(()=>{ki0();xo1()});import{Box as Cp6,Text as xi}from"ink";import{jsx as Si0,jsxs as Ci0}from"react/jsx-runtime";function _p6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function go1({logs:$}){return Si0(Cp6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Si0(xi,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Ci0(xi,{children:[Ci0(xi,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Si0(xi,{color:_p6(Z.status),children:Z.status}),Ci0(xi,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var ho1=()=>{};var _i0={};F0(_i0,{App:()=>fp6});import{Box as vp6}from"ink";import{useSyncExternalStore as xp6}from"react";import{jsx as uo1,jsxs as bp6}from"react/jsx-runtime";function fp6({home:$}){let Z=xp6(Ii0,Ri0);return bp6(vp6,{flexDirection:"column",children:[uo1(bo1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),uo1(go1,{logs:Z.logs})]})}var vi0=w(()=>{yo1();ho1();jE()});var fJ="thread-gate",sN="decopilot-hosted-harness",eN="decopilot-hosted-harness-sandboxed",N3="automations",nB="background-tools",PE="task-board-github-reads",AE="jira-push";var co1="7";function lo1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:co1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var do1=()=>{};function yp6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function xi0($,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 mo1(){let $=yp6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:xi0($,"--cpu-prof-dir")??process.cwd(),name:xi0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(xi0($,"--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 io1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=OE();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(()=>{}),qZ0=setInterval(()=>void Z().catch(()=>{}),$),qZ0.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(qZ0)clearInterval(qZ0)}}var qZ0;var no1=()=>{};import*as gp6 from"bun:jsc";function po1(){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{hp6()}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=up6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var hp6,up6;var to1=w(()=>{({startSamplingProfiler:hp6,samplingProfilerStackTraces:up6}=gp6)});function oo1(){mo1();let $=[io1(),ni1(),po1()];return()=>{for(let Z of $)Z()}}var ro1=w(()=>{xc0();no1();to1()});var TE=_((ao1)=>{Object.defineProperty(ao1,"__esModule",{value:!0});ao1.RepublishHeaders=ao1.DirectMsgHeaders=ao1.JsHeaders=ao1.AdvisoryKind=void 0;ao1.isOrderedPushConsumerOptions=cp6;ao1.isPullConsumer=lp6;ao1.isPushConsumer=dp6;ao1.isBoundPushConsumerOptions=mp6;function cp6($){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 lp6($){return $.isPullConsumer()}function dp6($){return $.isPushConsumer()}function mp6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}ao1.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"};ao1.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"};ao1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};ao1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var sY=_((eo1)=>{Object.defineProperty(eo1,"__esModule",{value:!0});eo1.TD=eo1.TE=eo1.Empty=void 0;eo1.encode=ep6;eo1.decode=$t6;eo1.Empty=new Uint8Array(0);eo1.TE=new TextEncoder;eo1.TD=new TextDecoder;function sp6(...$){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 ep6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(eo1.TE.encode($[X]));if(Z.length===0)return eo1.Empty;if(Z.length===1)return Z[0];return sp6(...Z)}function $t6($){if(!$||$.length===0)return"";return eo1.TD.decode($)}});var eY=_((Xr1)=>{Object.defineProperty(Xr1,"__esModule",{value:!0});Xr1.errors=Xr1.PermissionViolationError=Xr1.NoRespondersError=Xr1.TimeoutError=Xr1.RequestError=Xr1.ProtocolError=Xr1.ConnectionError=Xr1.DrainingConnectionError=Xr1.ClosedConnectionError=Xr1.AuthorizationError=Xr1.UserAuthenticationExpiredError=Xr1.InvalidOperationError=Xr1.InvalidArgumentError=Xr1.InvalidSubjectError=void 0;class bi0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Xr1.InvalidSubjectError=bi0;class MZ0 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 MZ0(`${$} ${Z}`,X)}}Xr1.InvalidArgumentError=MZ0;class yi0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Xr1.InvalidOperationError=yi0;class VZ0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new VZ0($);return null}}Xr1.UserAuthenticationExpiredError=VZ0;class kZ0 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 kZ0($);return null}}Xr1.AuthorizationError=kZ0;class gi0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Xr1.ClosedConnectionError=gi0;class hi0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Xr1.DrainingConnectionError=hi0;class ui0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Xr1.ConnectionError=ui0;class ci0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Xr1.ProtocolError=ci0;class li0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof SZ0}}Xr1.RequestError=li0;class di0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Xr1.TimeoutError=di0;class SZ0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Xr1.NoRespondersError=SZ0;class CZ0 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 CZ0($,X,Q,Y)}}Xr1.PermissionViolationError=CZ0;Xr1.errors={AuthorizationError:kZ0,ClosedConnectionError:gi0,ConnectionError:ui0,DrainingConnectionError:hi0,InvalidArgumentError:MZ0,InvalidOperationError:yi0,InvalidSubjectError:bi0,NoRespondersError:SZ0,PermissionViolationError:CZ0,ProtocolError:ci0,RequestError:li0,TimeoutError:di0,UserAuthenticationExpiredError:VZ0}});var bJ=_((Kr1)=>{Object.defineProperty(Kr1,"__esModule",{value:!0});Kr1.SimpleMutex=Kr1.Perf=void 0;Kr1.extend=Dt6;Kr1.render=Et6;Kr1.timeout=jt6;Kr1.delay=zt6;Kr1.deadline=Pt6;Kr1.deferred=ii0;Kr1.debugDeferred=At6;Kr1.shuffle=Tt6;Kr1.collect=Rt6;Kr1.jitter=Jr1;Kr1.backoff=It6;Kr1.nanos=qt6;Kr1.millis=Mt6;Kr1.randomToken=St6;var Lt6=sY(),mi0=eY();function Dt6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Et6($){return Lt6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function jt6($,Z=!0){let X=Z?new mi0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new mi0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function zt6($=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 Pt6($,Z=1000){let X=ii0(),Q=setTimeout(()=>{X.reject(new mi0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function ii0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function At6(){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 Tt6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Rt6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Yr1{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})}),$}}Kr1.Perf=Yr1;class Gr1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=ii0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Kr1.SimpleMutex=Gr1;function Jr1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function It6($=[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 Jr1(X>Z?$[Z]:$[X])}}}function qt6($){return $*1e6}function Mt6($){return Math.floor($/1e6)}var Vt6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$U=new Uint8Array(62);for(let $=0;$<62;$++)$U[$]=Vt6.charCodeAt($);var kt6=218340105584896;function St6(){let $=Math.floor(Math.random()*kt6),Z=$%62,X=$U[Z];$=($-Z)/62,Z=$%62;let Q=$U[Z];$=($-Z)/62,Z=$%62;let Y=$U[Z];$=($-Z)/62,Z=$%62;let G=$U[Z];$=($-Z)/62,Z=$%62;let J=$U[Z];$=($-Z)/62,Z=$%62;let K=$U[Z];$=($-Z)/62,Z=$%62;let W=$U[Z];$=($-Z)/62;let H=$U[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var wr1=_((Br1)=>{Object.defineProperty(Br1,"__esModule",{value:!0});Br1.nuid=Br1.NuidImpl=void 0;var nt6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",pB=62,vZ0=12,Ur1=10,Hr1=33,pt6=333,Nr1=vZ0+Ur1,pi0=new Uint8Array(pB);for(let $=0;$<pB;$++)pi0[$]=nt6.charCodeAt($);var _Z0=4294967296,Fr1=BigInt(pB)**BigInt(Ur1),fi=Number(Fr1/(1n<<32n)),ni0=Number(Fr1%(1n<<32n));function tt6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function ot6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else tt6($)}class ti0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Nr1),this.cbuf=new Uint8Array(vZ0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(fi+1)),this.seqLo=Math.floor(Math.random()*_Z0);while($++<8&&this.seqHi===fi&&this.seqLo>=ni0);if(this.seqHi===fi&&this.seqLo>=ni0)this.seqLo=0;this.inc=Math.random()*(pt6-Hr1)+Hr1|0}setPre(){ot6(this.cbuf);for(let $=0;$<vZ0;$++)this.buf[$]=pi0[this.cbuf[$]%pB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Nr1-1;X>=vZ0;X--){let Q=Math.floor($/pB),G=($-Q*pB)*_Z0+Z,J=Math.floor(G/pB),K=G-J*pB;this.buf[X]=pi0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=_Z0)this.seqLo-=_Z0,this.seqHi+=1;if(this.seqHi>fi||this.seqHi===fi&&this.seqLo>=ni0)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()}}Br1.NuidImpl=ti0;Br1.nuid=new ti0});var jr1=_((Dr1)=>{Object.defineProperty(Dr1,"__esModule",{value:!0});Dr1.nuid=Dr1.Nuid=void 0;var Lr1=wr1();Dr1.Nuid=Lr1.NuidImpl;Dr1.nuid=Lr1.nuid});var fZ0=_((xZ0)=>{Object.defineProperty(xZ0,"__esModule",{value:!0});xZ0.nuid=xZ0.Nuid=void 0;var zr1=jr1();Object.defineProperty(xZ0,"Nuid",{enumerable:!0,get:function(){return zr1.Nuid}});Object.defineProperty(xZ0,"nuid",{enumerable:!0,get:function(){return zr1.nuid}})});var tB=_((Pr1)=>{Object.defineProperty(Pr1,"__esModule",{value:!0});Pr1.DEFAULT_HOST=Pr1.DEFAULT_PORT=Pr1.Match=void 0;Pr1.syncIterator=Zo6;Pr1.createInbox=Xo6;var et6=fZ0(),$o6=eY();Pr1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Zo6($){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 Xo6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw $o6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${et6.nuid.next()}`}Pr1.DEFAULT_PORT=4222;Pr1.DEFAULT_HOST="127.0.0.1"});var bi=_((Ir1)=>{Object.defineProperty(Ir1,"__esModule",{value:!0});Ir1.DataBuffer=void 0;var Tr1=sY();class Rr1{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 Tr1.TE.encode($)}static toAscii($){return Tr1.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}}Ir1.DataBuffer=Rr1});var RE=_((Vr1)=>{Object.defineProperty(Vr1,"__esModule",{value:!0});Vr1.LF=Vr1.CR=Vr1.CRLF=Vr1.CR_LF_LEN=Vr1.CR_LF=void 0;Vr1.setTransportFactory=No6;Vr1.defaultPort=Uo6;Vr1.getUrlParseFn=Fo6;Vr1.newTransport=Bo6;Vr1.getResolveFn=Oo6;Vr1.protoLen=Mr1;Vr1.extractProtocolMessage=wo6;var Ko6=sY(),Wo6=tB(),Ho6=bi(),$G;function No6($){$G=$}function Uo6(){return $G!==void 0&&$G.defaultPort!==void 0?$G.defaultPort:Wo6.DEFAULT_PORT}function Fo6(){return $G!==void 0&&$G.urlParseFn?$G.urlParseFn:void 0}function Bo6(){if(!$G||typeof $G.factory!=="function")throw Error("transport fn is not set");return $G.factory()}function Oo6(){return $G!==void 0&&$G.dnsResolveFn?$G.dnsResolveFn:void 0}Vr1.CR_LF=`\r
1375
1375
  `;Vr1.CR_LF_LEN=Vr1.CR_LF.length;Vr1.CRLF=Ho6.DataBuffer.fromAscii(Vr1.CR_LF);Vr1.CR=new Uint8Array(Vr1.CRLF)[0];Vr1.LF=new Uint8Array(Vr1.CRLF)[1];function Mr1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===Vr1.CR&&$[X]===Vr1.LF)return X+1}return 0}function wo6($){let Z=Mr1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return Ko6.TD.decode(Q)}return""}});var ei0=_((br1)=>{Object.defineProperty(br1,"__esModule",{value:!0});br1.ipV4=vr1;br1.isIP=qo6;br1.parseIP=xr1;var yi=4,IE=16,bZ0=48,_r1=57,Sr1=65,Ro6=70,Cr1=97,Io6=102,si0=16777215;function vr1($,Z,X,Q){let Y=new Uint8Array(IE);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 qo6($){return xr1($)!==void 0}function xr1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return fr1($);case":":return Mo6($)}return}function fr1($){let Z=new Uint8Array(yi);for(let X=0;X<yi;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=Vo6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return vr1(Z[0],Z[1],Z[2],Z[3])}function Mo6($){let Z=new Uint8Array(IE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<IE){let{n:Y,c:G,ok:J}=ko6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=IE-yi)return;if(Q+yi>IE)return;let K=fr1($);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+=yi;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<IE){if(X<0)return;let Y=IE-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 Vo6($){let Z=0,X=0;for(Z=0;Z<$.length&&bZ0<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=_r1;Z++)if(X=X*10+($.charCodeAt(Z)-bZ0),X>=si0)return{n:si0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function ko6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(bZ0<=$.charCodeAt(X)&&$.charCodeAt(X)<=_r1)Z*=16,Z+=$.charCodeAt(X)-bZ0;else if(Cr1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Io6)Z*=16,Z+=$.charCodeAt(X)-Cr1+10;else if(Sr1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Ro6)Z*=16,Z+=$.charCodeAt(X)-Sr1+10;else break;if(Z>=si0)return{n:0,c:X,ok:!1}}if(X===0)return{n:0,c:X,ok:!1};return{n:Z,c:X,ok:!0}}});var Gn0=_((gr1)=>{Object.defineProperty(gr1,"__esModule",{value:!0});gr1.Servers=gr1.ServerImpl=void 0;gr1.isIPV4OrHostname=yr1;gr1.hostPort=Yn0;var $n0=RE(),Zn0=bJ(),Xn0=ei0(),vo6=tB(),xo6=eY();function yr1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Qn0($){return!yr1($)}function fo6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function Yn0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=fo6($),Qn0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Qn0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):vo6.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 nb{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=Yn0($);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,Xn0.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}://${Qn0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new nb(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,Zn0.shuffle)(Z);return this.resolves=Z,Z}}gr1.ServerImpl=nb;class yZ0{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw xo6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,$n0.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}=Yn0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new nb(Y))}if(this.randomize)(0,Zn0.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,Xn0.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,$n0.getUrlParseFn)();$=X?X($):$;let Q=new nb($,Z);if((0,Xn0.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 yZ0.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return yZ0.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,$n0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new nb(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,Zn0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}gr1.Servers=yZ0});var gZ0=_((lr1)=>{Object.defineProperty(lr1,"__esModule",{value:!0});lr1.QueuedIteratorImpl=void 0;var Jn0=bJ(),ur1=eY();class cr1{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,Jn0.deferred)(),this.yields=[],this.iterClosed=(0,Jn0.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 ur1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new ur1.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,Jn0.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}}lr1.QueuedIteratorImpl=cr1});var Kn0=_((nr1)=>{Object.defineProperty(nr1,"__esModule",{value:!0});nr1.MuxSubscription=void 0;var ho6=tB(),mr1=eY();class ir1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,ho6.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 mr1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new mr1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}nr1.MuxSubscription=ir1});var Wn0=_((or1)=>{Object.defineProperty(or1,"__esModule",{value:!0});or1.Heartbeat=void 0;var uo6=bJ();class tr1{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,uo6.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}or1.Heartbeat=tr1});var Un0=_(($a1)=>{Object.defineProperty($a1,"__esModule",{value:!0});$a1.DenoBuffer=$a1.MAX_SIZE=$a1.AssertionError=void 0;$a1.assert=sr1;$a1.concat=er1;$a1.append=lo6;$a1.readAll=do6;$a1.writeAll=mo6;var co6=sY();class Hn0 extends Error{constructor($){super($);this.name="AssertionError"}}$a1.AssertionError=Hn0;function sr1($,Z="Assertion failed."){if(!$)throw new Hn0(Z)}var ar1=32768;$a1.MAX_SIZE=4294967294;function hZ0($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function er1($,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 lo6($,Z){return er1($,Uint8Array.of(Z))}class Nn0{_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($){sr1($<=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=hZ0(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(co6.TE.encode($))}write($){let Z=this._grow($.byteLength);return hZ0($,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)hZ0(this._buf.subarray(this._off),this._buf);else if(Q+$>$a1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,$a1.MAX_SIZE));hZ0(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,$a1.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(ar1);while(!0){let Q=this.capacity-this.length<ar1,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}}}$a1.DenoBuffer=Nn0;function do6($){let Z=new Nn0;return Z.readFrom($),Z.bytes()}function mo6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var On0=_((Ga1)=>{Object.defineProperty(Ga1,"__esModule",{value:!0});Ga1.cc=Ga1.State=Ga1.Parser=Ga1.Kind=void 0;Ga1.describe=ao6;var Fn0=Un0(),Bn0=sY();Ga1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function ao6($){let Z,X="";switch($.kind){case Ga1.Kind.MSG:Z="MSG";break;case Ga1.Kind.OK:Z="OK";break;case Ga1.Kind.ERR:Z="ERR",X=Bn0.TD.decode($.data);break;case Ga1.Kind.PING:Z="PING";break;case Ga1.Kind.PONG:Z="PONG";break;case Ga1.Kind.INFO:Z="INFO",X=Bn0.TD.decode($.data)}return`${Z}: ${X}`}function Xa1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Qa1=48,so6=57,pb=67108864;class Ya1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Ga1.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 Ga1.State.OP_START:switch(X){case Ga1.cc.M:case Ga1.cc.m:this.state=Ga1.State.OP_M,this.hdr=-1,this.ma=Xa1();break;case Ga1.cc.H:case Ga1.cc.h:this.state=Ga1.State.OP_H,this.hdr=0,this.ma=Xa1();break;case Ga1.cc.P:case Ga1.cc.p:this.state=Ga1.State.OP_P;break;case Ga1.cc.PLUS:this.state=Ga1.State.OP_PLUS;break;case Ga1.cc.MINUS:this.state=Ga1.State.OP_MINUS;break;case Ga1.cc.I:case Ga1.cc.i:this.state=Ga1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_H:switch(X){case Ga1.cc.M:case Ga1.cc.m:this.state=Ga1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_M:switch(X){case Ga1.cc.S:case Ga1.cc.s:this.state=Ga1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MS:switch(X){case Ga1.cc.G:case Ga1.cc.g:this.state=Ga1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MSG:switch(X){case Ga1.cc.SPACE:case Ga1.cc.TAB:this.state=Ga1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MSG_SPC:switch(X){case Ga1.cc.SPACE:case Ga1.cc.TAB:continue;default:this.state=Ga1.State.MSG_ARG,this.as=Z}break;case Ga1.State.MSG_ARG:switch(X){case Ga1.cc.CR:this.drop=1;break;case Ga1.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=Ga1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Ga1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Ga1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Ga1.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:Ga1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Ga1.State.MSG_END;break;case Ga1.State.MSG_END:switch(X){case Ga1.cc.NL:this.drop=0,this.as=Z+1,this.state=Ga1.State.OP_START;break;default:continue}break;case Ga1.State.OP_PLUS:switch(X){case Ga1.cc.O:case Ga1.cc.o:this.state=Ga1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PLUS_O:switch(X){case Ga1.cc.K:case Ga1.cc.k:this.state=Ga1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PLUS_OK:switch(X){case Ga1.cc.NL:this.dispatcher.push({kind:Ga1.Kind.OK}),this.drop=0,this.state=Ga1.State.OP_START;break}break;case Ga1.State.OP_MINUS:switch(X){case Ga1.cc.E:case Ga1.cc.e:this.state=Ga1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MINUS_E:switch(X){case Ga1.cc.R:case Ga1.cc.r:this.state=Ga1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MINUS_ER:switch(X){case Ga1.cc.R:case Ga1.cc.r:this.state=Ga1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MINUS_ERR:switch(X){case Ga1.cc.SPACE:case Ga1.cc.TAB:this.state=Ga1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_MINUS_ERR_SPC:switch(X){case Ga1.cc.SPACE:case Ga1.cc.TAB:continue;default:this.state=Ga1.State.MINUS_ERR_ARG,this.as=Z}break;case Ga1.State.MINUS_ERR_ARG:switch(X){case Ga1.cc.CR:this.drop=1;break;case Ga1.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:Ga1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Ga1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Ga1.State.OP_P:switch(X){case Ga1.cc.I:case Ga1.cc.i:this.state=Ga1.State.OP_PI;break;case Ga1.cc.O:case Ga1.cc.o:this.state=Ga1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PO:switch(X){case Ga1.cc.N:case Ga1.cc.n:this.state=Ga1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PON:switch(X){case Ga1.cc.G:case Ga1.cc.g:this.state=Ga1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PONG:switch(X){case Ga1.cc.NL:this.dispatcher.push({kind:Ga1.Kind.PONG}),this.drop=0,this.state=Ga1.State.OP_START;break}break;case Ga1.State.OP_PI:switch(X){case Ga1.cc.N:case Ga1.cc.n:this.state=Ga1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PIN:switch(X){case Ga1.cc.G:case Ga1.cc.g:this.state=Ga1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_PING:switch(X){case Ga1.cc.NL:this.dispatcher.push({kind:Ga1.Kind.PING}),this.drop=0,this.state=Ga1.State.OP_START;break}break;case Ga1.State.OP_I:switch(X){case Ga1.cc.N:case Ga1.cc.n:this.state=Ga1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_IN:switch(X){case Ga1.cc.F:case Ga1.cc.f:this.state=Ga1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_INF:switch(X){case Ga1.cc.O:case Ga1.cc.o:this.state=Ga1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_INFO:switch(X){case Ga1.cc.SPACE:case Ga1.cc.TAB:this.state=Ga1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Ga1.State.OP_INFO_SPC:switch(X){case Ga1.cc.SPACE:case Ga1.cc.TAB:continue;default:this.state=Ga1.State.INFO_ARG,this.as=Z}break;case Ga1.State.INFO_ARG:switch(X){case Ga1.cc.CR:this.drop=1;break;case Ga1.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:Ga1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Ga1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Ga1.State.MSG_ARG||this.state===Ga1.State.MINUS_ERR_ARG||this.state===Ga1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Fn0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Ga1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Fn0.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 Fn0.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 Ga1.cc.SPACE:case Ga1.cc.TAB:case Ga1.cc.CR:case Ga1.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],pb);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],pb);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}: ${Bn0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Ga1.cc.SPACE:case Ga1.cc.TAB:case Ga1.cc.CR:case Ga1.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],pb),this.ma.size=this.protoParseInt(Z[3],pb);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],pb),this.ma.size=this.protoParseInt(Z[4],pb);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]<Qa1||$[Q]>so6)return-1;X=X*10+($[Q]-Qa1)}return Z!==void 0&&X>Z?-1:X}}Ga1.Parser=Ya1;Ga1.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};Ga1.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 lZ0=_((Ka1)=>{Object.defineProperty(Ka1,"__esModule",{value:!0});Ka1.MsgHdrsImpl=void 0;Ka1.canonicalMIMEHeaderKey=Ln0;Ka1.headers=Zr6;var Ja1=sY(),yJ=tB(),cZ0=eY();function Ln0($){let N=!0,U=Array($.length);for(let F=0;F<$.length;F++){let B=$.charCodeAt(F);if(B===58||B<33||B>126)throw cZ0.InvalidArgumentError.format("header",`'${$[F]}' is not a valid character in a header name`);if(N&&97<=B&&B<=122)B-=32;else if(!N&&65<=B&&B<=90)B+=32;U[F]=B,N=B==45}return String.fromCharCode(...U)}function Zr6($=0,Z=""){if($===0&&Z!=="")throw cZ0.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw cZ0.InvalidArgumentError.format("description","is required");return new tb($,Z)}var wn0="NATS/1.0";class tb{_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 tb,Q=Ja1.TD.decode($).split(`\r
1376
1376
  `),Y=Q[0];if(Y!==wn0){let G=Y.replace(wn0,"").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 $=wn0;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
1377
1377
  ${Z}: ${X[Q]}`;return`${$}\r
@@ -2796,7 +2796,7 @@ ${KC8(Z.content)}
2796
2796
  `)X--;return $.slice(Z,X)}function zn4($){let Z=[],X=0;while(X<$.length){let Q=Pn4($,X),Y=WC8($,X,"{noformat}"),G=WC8($,X,"{quote}"),J=[];if(Q)J.push({type:"code",...Q});if(Y)J.push({type:"code",lang:"",...Y});if(G)J.push({type:"quote",...G});let K=J.sort((W,H)=>W.start-H.start)[0];if(!K){Z.push({type:"text",content:$.slice(X)});break}if(K.start>X)Z.push({type:"text",content:$.slice(X,K.start)});Z.push(K),X=K.end}return Z}function Pn4($,Z){for(let X=$.indexOf("{code",Z);X!==-1;){let Q=$.indexOf("}",X);if(Q===-1)return null;let Y=$.slice(X+5,Q);if(Y===""||Y.startsWith(":")){let G=$.indexOf("{code}",Q+1);if(G===-1)return null;let J=Y.startsWith(":")?Y.slice(1).split("|")[0]??"":"";return{start:X,end:G+6,content:$.slice(Q+1,G),lang:J}}X=$.indexOf("{code",X+1)}return null}function WC8($,Z,X){let Q=$.indexOf(X,Z);if(Q===-1)return null;let Y=$.indexOf(X,Q+X.length);if(Y===-1)return null;return{start:Q,end:Y+X.length,content:$.slice(Q+X.length,Y)}}function HC8($){return $.split(`
2797
2797
  `).map(Tn4).join(`
2798
2798
  `)}function $Z1($,Z){let X=0;while($[X]===Z)X++;return X}function An4($){let Z=$.trim();return Z.length>=4&&$Z1(Z,"-")===Z.length}function Tn4($){let Z=$[1]??"";if($[0]==="h"&&Z>="1"&&Z<="6"&&$[2]===".")return`${"#".repeat(Number(Z))} ${Lv($.slice(3).trimStart())}`;if(An4($))return"---";let X=$Z1($,"*");if(X>0&&$[X]===" ")return`${X===1?"*":`${" ".repeat(X-1)}-`} ${Lv($.slice(X+1))}`;let Q=$Z1($,"#");if(Q>0&&$[Q]===" ")return`${" ".repeat(Q-1)}1. ${Lv($.slice(Q+1))}`;let Y=$.trimEnd();if(Y.startsWith("||")&&Y.endsWith("||")&&Y.length>4){let G=Y.slice(2,-2).split("||");return`${`| ${G.map((K)=>Lv(K.trim())).join(" | ")} |`}
2799
- |${G.map(()=>" --- ").join("|")}|`}if(Y.startsWith("|")&&Y.endsWith("|")&&Y.length>2)return`| ${Y.slice(1,-1).split("|").map((J)=>Lv(J.trim())).join(" | ")} |`;return Lv($)}function e91($){return($.startsWith("http://")||$.startsWith("https://"))&&!$.includes(" ")}function Lv($){let Z="",X=0;while(X<$.length){let Q=$[X]??"";if(Q==="{"){if($.startsWith("{{",X)){let Y=$.indexOf("}}",X+2);if(Y!==-1){Z+=`\`${$.slice(X+2,Y)}\``,X=Y+2;continue}}if($.startsWith("{color",X)){let Y=$.indexOf("}",X);if(Y!==-1){X=Y+1;continue}}}else if(Q==="["){let Y=$.indexOf("]",X);if(Y!==-1){let G=$.slice(X+1,Y),J=G.indexOf("|");if(J!==-1&&e91(G.slice(J+1))){Z+=`[${G.slice(0,J)}](${G.slice(J+1)})`,X=Y+1;continue}if(e91(G)){Z+=G,X=Y+1;continue}}}else if(Q==="!"){let Y=$.indexOf("!",X+1);if(Y!==-1){let G=$.slice(X+1,Y),J=G.indexOf("|"),K=J===-1?G:G.slice(0,J);if(e91(K)){Z+=`![](${K})`,X=Y+1;continue}}}else if(Q==="*"||Q==="_"){let Y=qn4($,X,Q,Z.slice(-1)||" ");if(Y){Z+=Y.text,X=Y.next;continue}}Z+=Q,X++}return Z}function qn4($,Z,X,Q){if(!Rn4.includes(Q))return null;let Y=$[Z+1];if(!Y||Y===" "||Y===X)return null;for(let G=Z+2;G<$.length;G++){if($[G]!==X||$[G-1]===" ")continue;let J=$[G+1];if(J!==void 0&&!In4.includes(J))continue;let K=Lv($.slice(Z+1,G));return{text:X==="*"?`**${K}**`:`*${K}*`,next:G+1}}return null}var Rn4=" ([{>",In4=` )]}.,:;!?{["'`;function kn4($){let X=($ instanceof Error?$.message:String($)).match(/failed \((\d+)\)/);if(X&&X[1]){let Q=parseInt(X[1],10);return Q>=500||Q===429}return!0}function XZ1($){let Z=$.trim().replace(/\/+$/,""),X=/^https?:\/\//i.test(Z)?Z:`https://${Z}`,Q;try{Q=new URL(X).hostname.toLowerCase()}catch{throw Error(`Invalid Jira site URL: ${$}`)}if(!Sn4.test(Q))throw Error(`Invalid Jira site URL: ${$} \u2014 expected <your-site>.atlassian.net`);return`https://${Q}`}function ZZ1($){if(!/^\d+$/.test($))throw Error(`Invalid Jira board id: ${$}`);return $}class gK{baseUrl;authHeader;constructor($,Z,X){this.baseUrl=XZ1($),this.authHeader=`Basic ${Buffer.from(`${Z}:${X}`).toString("base64")}`}async request($,Z,{idempotent:X=!0}={}){let Q=async()=>{let Y=await fetch(`${this.baseUrl}${$}`,{...Z,headers:{Authorization:this.authHeader,Accept:"application/json",...Z?.body?{"Content-Type":"application/json"}:{}},signal:AbortSignal.timeout(Mn4)}),G=await Y.text().catch(()=>"");if(!Y.ok)throw Error(`Jira ${$} failed (${Y.status}): ${G.slice(0,300)}`);return G===""?void 0:JSON.parse(G)};if(!X)return Q();return z5(Q,{maxAttempts:3,minTimeout:100,maxTimeout:5000,multiplier:2,jitter:1,isRetriable:kn4})}async myself(){return this.request("/rest/api/3/myself")}async listBoards(){let $=[],Z=0;while($.length<200){let X=await this.request(`/rest/agile/1.0/board?startAt=${Z}&maxResults=50`);if($.push(...X.values.map((Q)=>({id:Q.id,name:Q.name,type:Q.type,projectKey:Q.location?.projectKey,projectName:Q.location?.projectName}))),X.isLast||X.values.length===0)break;Z+=X.values.length}return $}async getBoardColumns($){let Z=await this.request(`/rest/agile/1.0/board/${ZZ1($)}/configuration`),X=new Map,Q=[];for(let Y of Z.columnConfig?.columns??[]){let G=[];for(let J of Y.statuses??[]){if(!X.has(J.id)){let K=await this.request(`/rest/api/3/status/${encodeURIComponent(J.id)}`);X.set(J.id,K.name)}G.push(X.get(J.id)??J.id)}Q.push({name:Y.name,statuses:G})}return Q}async listBoardIssues($){let Z=new URLSearchParams({startAt:String($.startAt),maxResults:"100",jql:$.jql,fields:Vn4}),X=await this.request(`/rest/agile/1.0/board/${ZZ1($.boardId)}/issue?${Z}`);return{issues:X.issues??[],total:X.total}}async listBacklogIssueIds($){let Z=new Set,X=0;while(Z.size<5000){let Q=await this.request(`/rest/agile/1.0/board/${ZZ1($)}/backlog?startAt=${X}&maxResults=100&fields=id`);for(let Y of Q.issues??[])Z.add(Y.id);if(X+=Q.issues?.length??0,X>=Q.total||(Q.issues?.length??0)===0)break}return Z}async listTransitions($){return(await this.request(`/rest/api/3/issue/${encodeURIComponent($)}/transitions`)).transitions??[]}async getStatusName($){return(await this.request(`/rest/api/3/issue/${encodeURIComponent($)}?fields=status`)).fields?.status?.name??null}async transitionIssue($,Z){await this.request(`/rest/api/3/issue/${encodeURIComponent($)}/transitions`,{method:"POST",body:JSON.stringify({transition:{id:Z}})},{idempotent:!1})}async listComments($){let Z=[],X=0;while(Z.length<1000){let Q=await this.request(`/rest/api/3/issue/${encodeURIComponent($)}/comment?startAt=${X}&maxResults=100&orderBy=created`);if(Z.push(...Q.comments),Z.length>=Q.total||Q.comments.length===0)break;X+=Q.comments.length}return Z}async addComment($,Z){return this.request(`/rest/api/3/issue/${encodeURIComponent($)}/comment`,{method:"POST",body:JSON.stringify({body:Cn4(Z)})},{idempotent:!1})}}function Cn4($){let Z=$.split(`
2799
+ |${G.map(()=>" --- ").join("|")}|`}if(Y.startsWith("|")&&Y.endsWith("|")&&Y.length>2)return`| ${Y.slice(1,-1).split("|").map((J)=>Lv(J.trim())).join(" | ")} |`;return Lv($)}function e91($){return($.startsWith("http://")||$.startsWith("https://"))&&!$.includes(" ")}function Lv($){let Z="",X=0;while(X<$.length){let Q=$[X]??"";if(Q==="{"){if($.startsWith("{{",X)){let Y=$.indexOf("}}",X+2);if(Y!==-1){Z+=`\`${$.slice(X+2,Y)}\``,X=Y+2;continue}}if($.startsWith("{color",X)){let Y=$.indexOf("}",X);if(Y!==-1){X=Y+1;continue}}}else if(Q==="["){let Y=$.indexOf("]",X);if(Y!==-1){let G=$.slice(X+1,Y),J=G.indexOf("|");if(J!==-1&&e91(G.slice(J+1))){Z+=`[${G.slice(0,J)}](${G.slice(J+1)})`,X=Y+1;continue}if(e91(G)){Z+=G,X=Y+1;continue}}}else if(Q==="!"){let Y=$.indexOf("!",X+1);if(Y!==-1){let G=$.slice(X+1,Y),J=G.indexOf("|"),K=J===-1?G:G.slice(0,J);if(e91(K)){Z+=`![](${K})`,X=Y+1;continue}}}else if(Q==="*"||Q==="_"){let Y=qn4($,X,Q,Z.slice(-1)||" ");if(Y){Z+=Y.text,X=Y.next;continue}}Z+=Q,X++}return Z}function qn4($,Z,X,Q){if(!Rn4.includes(Q))return null;let Y=$[Z+1];if(!Y||Y===" "||Y===X)return null;for(let G=Z+2;G<$.length;G++){if($[G]!==X||$[G-1]===" ")continue;let J=$[G+1];if(J!==void 0&&!In4.includes(J))continue;let K=Lv($.slice(Z+1,G));return{text:X==="*"?`**${K}**`:`*${K}*`,next:G+1}}return null}var Rn4=" ([{>",In4=` )]}.,:;!?{["'`;function kn4($){let Z=$ instanceof Error?$.message:String($),X=Z.match(/failed \((\d+)\)/);if(X&&X[1]){let Q=parseInt(X[1],10);return Q>=500||Q===429}if(/returned invalid JSON/.test(Z))return!1;return!0}function XZ1($){let Z=$.trim().replace(/\/+$/,""),X=/^https?:\/\//i.test(Z)?Z:`https://${Z}`,Q;try{Q=new URL(X).hostname.toLowerCase()}catch{throw Error(`Invalid Jira site URL: ${$}`)}if(!Sn4.test(Q))throw Error(`Invalid Jira site URL: ${$} \u2014 expected <your-site>.atlassian.net`);return`https://${Q}`}function ZZ1($){if(!/^\d+$/.test($))throw Error(`Invalid Jira board id: ${$}`);return $}class gK{baseUrl;authHeader;constructor($,Z,X){this.baseUrl=XZ1($),this.authHeader=`Basic ${Buffer.from(`${Z}:${X}`).toString("base64")}`}async request($,Z,{idempotent:X=!0}={}){let Q=async()=>{let Y=await fetch(`${this.baseUrl}${$}`,{...Z,headers:{Authorization:this.authHeader,Accept:"application/json",...Z?.body?{"Content-Type":"application/json"}:{}},signal:AbortSignal.timeout(Mn4)}),G=await Y.text().catch(()=>"");if(!Y.ok)throw Error(`Jira ${$} failed (${Y.status}): ${G.slice(0,300)}`);if(G==="")return;try{return JSON.parse(G)}catch(J){throw Error(`Jira ${$} returned invalid JSON: ${G.slice(0,300)}`,{cause:J})}};if(!X)return Q();return z5(Q,{maxAttempts:3,minTimeout:100,maxTimeout:5000,multiplier:2,jitter:1,isRetriable:kn4})}async myself(){return this.request("/rest/api/3/myself")}async listBoards(){let $=[],Z=0;while($.length<200){let X=await this.request(`/rest/agile/1.0/board?startAt=${Z}&maxResults=50`);if($.push(...X.values.map((Q)=>({id:Q.id,name:Q.name,type:Q.type,projectKey:Q.location?.projectKey,projectName:Q.location?.projectName}))),X.isLast||X.values.length===0)break;Z+=X.values.length}return $}async getBoardColumns($){let Z=await this.request(`/rest/agile/1.0/board/${ZZ1($)}/configuration`),X=new Map,Q=[];for(let Y of Z.columnConfig?.columns??[]){let G=[];for(let J of Y.statuses??[]){if(!X.has(J.id)){let K=await this.request(`/rest/api/3/status/${encodeURIComponent(J.id)}`);X.set(J.id,K.name)}G.push(X.get(J.id)??J.id)}Q.push({name:Y.name,statuses:G})}return Q}async listBoardIssues($){let Z=new URLSearchParams({startAt:String($.startAt),maxResults:"100",jql:$.jql,fields:Vn4}),X=await this.request(`/rest/agile/1.0/board/${ZZ1($.boardId)}/issue?${Z}`);return{issues:X.issues??[],total:X.total}}async listBacklogIssueIds($){let Z=new Set,X=0;while(Z.size<5000){let Q=await this.request(`/rest/agile/1.0/board/${ZZ1($)}/backlog?startAt=${X}&maxResults=100&fields=id`);for(let Y of Q.issues??[])Z.add(Y.id);if(X+=Q.issues?.length??0,X>=Q.total||(Q.issues?.length??0)===0)break}return Z}async listTransitions($){return(await this.request(`/rest/api/3/issue/${encodeURIComponent($)}/transitions`)).transitions??[]}async getStatusName($){return(await this.request(`/rest/api/3/issue/${encodeURIComponent($)}?fields=status`)).fields?.status?.name??null}async transitionIssue($,Z){await this.request(`/rest/api/3/issue/${encodeURIComponent($)}/transitions`,{method:"POST",body:JSON.stringify({transition:{id:Z}})},{idempotent:!1})}async listComments($){let Z=[],X=0;while(Z.length<1000){let Q=await this.request(`/rest/api/3/issue/${encodeURIComponent($)}/comment?startAt=${X}&maxResults=100&orderBy=created`);if(Z.push(...Q.comments),Z.length>=Q.total||Q.comments.length===0)break;X+=Q.comments.length}return Z}async addComment($,Z){return this.request(`/rest/api/3/issue/${encodeURIComponent($)}/comment`,{method:"POST",body:JSON.stringify({body:Cn4(Z)})},{idempotent:!1})}}function Cn4($){let Z=$.split(`
2800
2800
  `).filter((X)=>X.trim()!=="");return{type:"doc",version:1,content:Z.length>0?Z.map((X)=>({type:"paragraph",content:[{type:"text",text:X}]})):[{type:"paragraph",content:[]}]}}function FA0($){if(typeof $==="string")return NC8($);if(!$||typeof $!=="object")return"";let Z=$;if(Z.type==="text")return Z.text??"";if(Z.type==="hardBreak")return`
2801
2801
  `;let X=(Array.isArray(Z.content)?Z.content:[]).map(FA0);if(Z.type==="doc")return X.filter((Q)=>Q.trim()!=="").join(`
2802
2802