decocms 4.594.1 → 4.595.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (438) hide show
  1. package/dist/client/assets/{AlertCircle-CngNmW3n.js → AlertCircle-B5z_WzKF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-w2QCUzTm.js → AreaChart-Cxtm5a7V.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-7wIIyF4Y.js → ArrowLeft-s4im6VP0.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-Dyuh-rXZ.js → ArrowRight-DJNk5-qN.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-C9hRfWJJ.js → ArrowUp-D3VIHJdp.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-Bov9QL4X.js → BookOpen01-Dl6Fge4h.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DZFTbe0Q.js → CartesianChart-ZWrcGi0M.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-BJA3WMzp.js → CategoricalChart-D9Txbo5J.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-C0mDI2jO.js → CheckCircle-iaXkD4Gk.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-Cz82ih9S.js → ChevronDown-6CklIa96.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-B_wf9OPd.js → ChevronSelectorVertical-Dv5DFfYm.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CLsy4_cr.js → ChevronUp-Ct7Ad97m.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-C7XdJQOf.js → CreditCard01-CxC8pylQ.js} +1 -1
  14. package/dist/client/assets/{Eye-BoMcImel.js → Eye-CJuJnU0r.js} +1 -1
  15. package/dist/client/assets/{File02-BmbcQ1JX.js → File02-qGTfNAw0.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-CeWGcIpe.js → Fingerprint04-CcZCls-2.js} +1 -1
  17. package/dist/client/assets/{Globe04-_51WnfFJ.js → Globe04-MN7UsfuL.js} +1 -1
  18. package/dist/client/assets/{Image01-nL5rafgN.js → Image01-Ro_mBr5Q.js} +1 -1
  19. package/dist/client/assets/{Key01-DPEcpDw6.js → Key01-DS8naBPb.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DFrTynS3.js → LayoutLeft-6A-y0J6k.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-BPaKcMJ1.js → LinkBroken01-CzNPgm5x.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-DEwhGd-N.js → MessageCircle01-DlLXS5Co.js} +1 -1
  23. package/dist/client/assets/{Minus-CZtTY14n.js → Minus-u0SpxgL3.js} +1 -1
  24. package/dist/client/assets/{Monitor01-Dzk9r8YI.js → Monitor01-BS4hBPFs.js} +1 -1
  25. package/dist/client/assets/{Play-BNkIfSsq.js → Play-WL8i6cug.js} +1 -1
  26. package/dist/client/assets/{Plus-WQeLSh07.js → Plus-fTwMfsmc.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-Kl_nxn9t.js → ReferenceLine-CV25KVJe.js} +1 -1
  28. package/dist/client/assets/{SearchMd-CrM5HGUz.js → SearchMd-BehVsu6K.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-Dvi8noNw.js → ShoppingBag01-BGp8Ou9u.js} +1 -1
  30. package/dist/client/assets/{Sun-BUSaNVU-.js → Sun-CFqa-sGu.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-HaaMuIs0.js → SwitchHorizontal01-Bgyq2PJ9.js} +1 -1
  32. package/dist/client/assets/{Tool01-9Nk8XcOI.js → Tool01-DyTDmh4r.js} +1 -1
  33. package/dist/client/assets/{Tooltip--i_yceGL.js → Tooltip-CMiI-mCI.js} +1 -1
  34. package/dist/client/assets/{Trash01-By8obgKt.js → Trash01-fvESWCt4.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-D-BYwryf.js → TrendUp01-JopPoZCH.js} +1 -1
  36. package/dist/client/assets/{Upload01-BPnZnmHF.js → Upload01-DbVRDr03.js} +1 -1
  37. package/dist/client/assets/{UserCheck01-CuByTN5F.js → UserCheck01-CjStPV_Z.js} +1 -1
  38. package/dist/client/assets/{UserSquare-T90Jaoc-.js → UserSquare-CXqd3Jcd.js} +1 -1
  39. package/dist/client/assets/{Users01-D1-vaLa3.js → Users01-BWFocRss.js} +1 -1
  40. package/dist/client/assets/{XClose-Bomoew3H.js → XClose-DoeGoRM7.js} +1 -1
  41. package/dist/client/assets/{Zap-lo-lOcPp.js → Zap-0YPBexhR.js} +1 -1
  42. package/dist/client/assets/{access-gate-D9gT0mCZ.js → access-gate-C4lFpGca.js} +1 -1
  43. package/dist/client/assets/{add-connection-dialog-Bn6L9Ywx.js → add-connection-dialog-Bf5TVTPx.js} +1 -1
  44. package/dist/client/assets/agent-app--oLmsK9x.js +1 -0
  45. package/dist/client/assets/{agent-assets-BLuZ1J0l.js → agent-assets-B2ZXaarr.js} +1 -1
  46. package/dist/client/assets/{agent-automation-C0jF6GoO.js → agent-automation-DlPEe8Bi.js} +1 -1
  47. package/dist/client/assets/{agent-automations-CIknlYgn.js → agent-automations-DMIB7Zha.js} +1 -1
  48. package/dist/client/assets/{agent-blog-Dz0ZGfFq.js → agent-blog-LEARi0sP.js} +2 -2
  49. package/dist/client/assets/{agent-blog-post-r0FRVJ6G.js → agent-blog-post-CoE__6yW.js} +2 -2
  50. package/dist/client/assets/{agent-calendar-eiAtEeXX.js → agent-calendar-B-BPQvis.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-DWZ6HVp_.js → agent-capabilities-CPqmr421.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-tGjfqQgF.js → agent-connect-sources-CdfcDRB7.js} +1 -1
  53. package/dist/client/assets/agent-deck-BuLsUbZ_.js +1 -0
  54. package/dist/client/assets/{agent-e2e-ba5rV3St.js → agent-e2e-DKAWniTd.js} +1 -1
  55. package/dist/client/assets/agent-experiments---lqtxRv.js +1 -0
  56. package/dist/client/assets/agent-file-C2hZeW3i.js +1 -0
  57. package/dist/client/assets/{agent-hosting-D6vOkjJV.js → agent-hosting-CuDdn6us.js} +1 -1
  58. package/dist/client/assets/{agent-icon-zvo6Zsex.js → agent-icon-oLNgcKY7.js} +1 -1
  59. package/dist/client/assets/agent-library-BK7R3xhp.js +1 -0
  60. package/dist/client/assets/agent-library-file-FyFafRbo.js +1 -0
  61. package/dist/client/assets/agent-overview-g3LDv1gz.js +1 -0
  62. package/dist/client/assets/{agent-releases-CjP_903O.js → agent-releases-Blsg57lA.js} +1 -1
  63. package/dist/client/assets/agent-settings-D0koDP44.js +1 -0
  64. package/dist/client/assets/agent-site-editor-code-CC1kAdjn.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-BpHG-zVr.js +1 -0
  66. package/dist/client/assets/{agent-site-editor-CRCOwi7y.js → agent-site-editor-fuV8aRJ-.js} +1 -1
  67. package/dist/client/assets/agent-site-editor-preview-B1VODKuA.js +1 -0
  68. package/dist/client/assets/agent-view-B8M9ftmp.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-DupPwYUR.js → agent-view-guard-7II6IMHB.js} +1 -1
  70. package/dist/client/assets/{ai-providers-P9lSOFin.js → ai-providers-BN2GwB1v.js} +1 -1
  71. package/dist/client/assets/{alert-QfzOpdUg.js → alert-Cfbpb5Fi.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-at8BigEj.js → analytics-sections-pfAfJWCb.js} +1 -1
  73. package/dist/client/assets/api-keys-C0837QoC.js +1 -0
  74. package/dist/client/assets/{api-keys-yj-YvHdL.js → api-keys-C6fA8wM3.js} +1 -1
  75. package/dist/client/assets/{app-editor-CALR-Eh0.js → app-editor-B0-ugV0w.js} +1 -1
  76. package/dist/client/assets/{asset-utils-BDYUvtkF.js → asset-utils-B1638Qnj.js} +1 -1
  77. package/dist/client/assets/{auth--2gxCib9.js → auth-CzbUYaqd.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-BwHg1hCN.js → auth-catchall-CL8dPHcJ.js} +1 -1
  79. package/dist/client/assets/{auth-entry-8MjIvWkA.js → auth-entry-h5pd0jzu.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-DP2m0wm-.js → auth-split-layout-CI5Zd4MD.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-GGQFCWKI.js → authenticate-and-persist-oauth-DWGvkzrM.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-BJoBOS8m.js → automation-list-row-fQJ98i5K.js} +1 -1
  83. package/dist/client/assets/{automation-runs-ComF4nUM.js → automation-runs-CvginG54.js} +1 -1
  84. package/dist/client/assets/{automations-C5fxNUIr.js → automations-BQiHVWF1.js} +1 -1
  85. package/dist/client/assets/{badge-Di6qp_17.js → badge-CCYOd7Np.js} +1 -1
  86. package/dist/client/assets/{block-document-D7KablrH.js → block-document-B378ah9w.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-JYcUL0TS.js → blocks-preview-workspace-context-CfFp28C7.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-D8VyxdkW.js → blocks-tab-states-CL1m3CwV.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-DwcMPB8a.js → blog-preview-url-VcVlao0x.js} +1 -1
  90. package/dist/client/assets/{blog-schema-Dhm1FJA9.js → blog-schema-DpIrwlN8.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-B93Jk1n3.js → blog-source-gate-ByRS2PCQ.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-BDjHkxlS.js → blog-view-gate-DB0Qqp1C.js} +1 -1
  93. package/dist/client/assets/{buckets-DAeP-NAt.js → buckets-BMMkseN9.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-WLZ-Q0Fx.js → build-improve-prompt-doc-B6K3QJ7i.js} +1 -1
  95. package/dist/client/assets/{calendar-CqkLsAo9.js → calendar-bHS46tKB.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-j4JpxktV.js → capability-load-error-DMNHKA3p.js} +1 -1
  97. package/dist/client/assets/{category-editor-BblvA1zP.js → category-editor-8Cgh-PN4.js} +1 -1
  98. package/dist/client/assets/{category-tree-DSsAlLjn.js → category-tree-C_4CwVmY.js} +1 -1
  99. package/dist/client/assets/{chart-BZy9kWyI.js → chart-CZBICOJD.js} +1 -1
  100. package/dist/client/assets/{chat-context-CxkYg5uT.js → chat-context-f2uXEUUc.js} +1 -1
  101. package/dist/client/assets/{chat-draft-DzaoNZT_.js → chat-draft-DAdhM4hG.js} +1 -1
  102. package/dist/client/assets/{checkbox-C-dWRGEo.js → checkbox-zGVzGIPO.js} +1 -1
  103. package/dist/client/assets/{choose-editor-DS4c61th.js → choose-editor-BKh-ZgzW.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-DV77yJjs.js → cli-auth-success-SWuyuxfU.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-DaqJeGro.js → cms-settings-editor-CIaHjETV.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-5dkWWhlw.js → cms-store-drafts-CxK3uQ14.js} +1 -1
  107. package/dist/client/assets/{collapsible-BSD-rIyq.js → collapsible-CSkXOtd3.js} +1 -1
  108. package/dist/client/assets/{collection-detail-wkxjhC55.js → collection-detail-CzfjUueT.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-JBmYQ-27.js → collection-display-button-CjGbKQOO.js} +1 -1
  110. package/dist/client/assets/{collection-search-BpNjeFlC.js → collection-search-CwhEp-oW.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-BmrrNnjL.js → collection-table-wrapper-YEUaCnF0.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-CmuugrOY.js → collection-tabs-sBgCgUpi.js} +1 -1
  113. package/dist/client/assets/{combobox-D_fSr7_C.js → combobox-C-B4oPES.js} +1 -1
  114. package/dist/client/assets/{command-CwP4XJhp.js → command-Ft8JT44D.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-CG0lncr5.js → companion-mcps-section-C7sumJlT.js} +1 -1
  116. package/dist/client/assets/{config-4NBdyaeh.js → config-DJdwsFQj.js} +1 -1
  117. package/dist/client/assets/{connect-ChCcHtpb.js → connect-EY0xQWtC.js} +1 -1
  118. package/dist/client/assets/{connect-key-CJ6TvBP8.js → connect-key-CSZIaeE1.js} +1 -1
  119. package/dist/client/assets/{connect-layout-DTpwfpPI.js → connect-layout-CNtRW_I0.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-_ChBZ2Vd.js → connect-source-dialog-BhHAiSmR.js} +1 -1
  121. package/dist/client/assets/{connection-card-CxiJ1Nzx.js → connection-card-CZjPwDmb.js} +1 -1
  122. package/dist/client/assets/{connection-detail-CYCmhAUL.js → connection-detail-CoTL9vPi.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-UXeTmEmu.js → connection-form-helpers-BtL11Mk_.js} +1 -1
  124. package/dist/client/assets/{connection-DezKWiQc.js → connection-hU_-Jvky.js} +1 -1
  125. package/dist/client/assets/{connection-slug-DWaKdRBx.js → connection-slug-C3WB4zx1.js} +1 -1
  126. package/dist/client/assets/{connections-Bc9bEkOC.js → connections-CBA42Coy.js} +1 -1
  127. package/dist/client/assets/{content-tab-ChWZ09d_.js → content-tab-cfO-5VR4.js} +3 -3
  128. package/dist/client/assets/{context-1XEBvNOV.js → context-B7VoJ0VT.js} +1 -1
  129. package/dist/client/assets/{context-menu-haKBWhFK.js → context-menu-SpnH4Dig.js} +1 -1
  130. package/dist/client/assets/{context-shell-DApzBqkB.js → context-shell-DmaBJhFD.js} +3 -3
  131. package/dist/client/assets/{create-organization-dialog-BXvqxw2I.js → create-organization-dialog-wriFsbQI.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-Dpm7YKyw.js → daily-pulse-BFFhl1m4.js} +1 -1
  133. package/dist/client/assets/{delete-copy-L_pixdww.js → delete-copy--Lb1CSl_.js} +1 -1
  134. package/dist/client/assets/{device-hint-DfNddHqx.js → device-hint-CBRPjQO6.js} +1 -1
  135. package/dist/client/assets/{discover-CDF3_FOL.js → discover-CghOJf-2.js} +1 -1
  136. package/dist/client/assets/{domain-settings-SR0-GydA.js → domain-settings-fEXjUJuV.js} +1 -1
  137. package/dist/client/assets/{drawer-CmJXwXhP.js → drawer-Db2wwGe6.js} +1 -1
  138. package/dist/client/assets/{editor-stZYyxdg.js → editor-3VmdWOcR.js} +1 -1
  139. package/dist/client/assets/{editor-classes-C_k7lpha.js → editor-classes-C7jBvmm6.js} +1 -1
  140. package/dist/client/assets/{empty-state-DlNabApi.js → empty-state-1KFy8I29.js} +1 -1
  141. package/dist/client/assets/{empty-state-BP4JRDLR.js → empty-state-C97ArWSe.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-DZp7Pnbi.js → experiments-tab-choice-KIuD_KkY.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-CzqnFJl9.js → extract-connection-data-Bg4-SRmH.js} +1 -1
  144. package/dist/client/assets/{feature-gate-C_eiJnqB.js → feature-gate-bcVxBZpf.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-CBOn7yV2.js → feature-paywall-nCv5q87T.js} +1 -1
  146. package/dist/client/assets/{file-explorer-BrZ-CG01.js → file-explorer-CmhwbVXG.js} +1 -1
  147. package/dist/client/assets/{file-preview-PTP8hmPn.js → file-preview-D5D2K5X4.js} +1 -1
  148. package/dist/client/assets/{file-share-button-BegoNidK.js → file-share-button-BJyFhXb_.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-M87xyG0K.js → file-type-icon-DOLoaLI3.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Dcx7O7hC.js → folder-icon-iRxCwsD4.js} +1 -1
  151. package/dist/client/assets/{form-CJTkS9yd.js → form-DofCYNV-.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-BZ8W_2dq.js → frame-navigation-Cw0k5wWS.js} +1 -1
  153. package/dist/client/assets/{gateway-client-zPU6BhGI.js → gateway-client-DtP3YgTu.js} +1 -1
  154. package/dist/client/assets/{general-CvWpV1rC.js → general-DFn9UyuB.js} +1 -1
  155. package/dist/client/assets/{github-icon-D3IlXxDN.js → github-icon-DeJ6JoAX.js} +1 -1
  156. package/dist/client/assets/{held-block-view-CEue5DyE.js → held-block-view-DEQj9bBf.js} +1 -1
  157. package/dist/client/assets/{home-CBhOYnUz.js → home-BoVaYQWs.js} +1 -1
  158. package/dist/client/assets/{home-overview-nMDmkNSh.js → home-overview-DPQxLYUQ.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-CC64pDxA.js → hosted-reconcile-BEQpe6Vi.js} +1 -1
  160. package/dist/client/assets/{icon-button-C9InOUgM.js → icon-button-B0nhfFgA.js} +1 -1
  161. package/dist/client/assets/{index-Dy0Aphio.js → index-BDoN0dgN.js} +1 -1
  162. package/dist/client/assets/{index-B6vsr4i3.js → index-BLjqEI6b.js} +1 -1
  163. package/dist/client/assets/{index-BPvzZzln.js → index-BRafLLc1.js} +1 -1
  164. package/dist/client/assets/{index-OaQ5Wven.js → index-BU8jQPL9.js} +1 -1
  165. package/dist/client/assets/index-Bza-gCrO.css +1 -0
  166. package/dist/client/assets/{index-Cdf0nHrK.js → index-C-Kqy2qf.js} +1 -1
  167. package/dist/client/assets/index-CJrHnaIA.js +5 -0
  168. package/dist/client/assets/{index-mb-jxjEy.js → index-CzblxJEL.js} +6 -6
  169. package/dist/client/assets/{index-B8ZkvDME.js → index-D9Okg8Od.js} +1 -1
  170. package/dist/client/assets/{index-C-bUN66r.js → index-DE_uoRX0.js} +1 -1
  171. package/dist/client/assets/{index-hl8iFWLs.js → index-DEg3oi2U.js} +1 -1
  172. package/dist/client/assets/{index-CY-w4kYr.js → index-DG4I_TsN.js} +1 -1
  173. package/dist/client/assets/{index-D2FJssDQ.js → index-Dj9gWcAF.js} +1 -1
  174. package/dist/client/assets/{index-BIBRRoOW.js → index-DkUdNexJ.js} +1 -1
  175. package/dist/client/assets/{index-g0fJQ3Ik.js → index-DvHHQZeY.js} +1 -1
  176. package/dist/client/assets/{index-CyK1A-PV.js → index-jntrOp_m.js} +1 -1
  177. package/dist/client/assets/{index-kPKwu4SB.js → index-o9SHpWpT.js} +1 -1
  178. package/dist/client/assets/{index-CnFOA69K.js → index-p9qtZs6_.js} +1 -1
  179. package/dist/client/assets/{index-redirect-Cc2j63PQ.js → index-redirect-NQOumeNj.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-Dfcni9SV.js → infiniteQueryObserver-CJFiox0m.js} +1 -1
  181. package/dist/client/assets/{infra-billing-BYZXmRJD.js → infra-billing-CX8Dwn1f.js} +1 -1
  182. package/dist/client/assets/{input-BUC-cGry.js → input-DX222u3n.js} +3 -3
  183. package/dist/client/assets/{input-DjfzIqsk.js → input-DsnoOsvg.js} +1 -1
  184. package/dist/client/assets/{integration-icon-DRbGJhQo.js → integration-icon-B3tqbzra.js} +1 -1
  185. package/dist/client/assets/{item-actions-CDU7n7Cr.js → item-actions-Db4Hipj-.js} +1 -1
  186. package/dist/client/assets/{jira-icon-DdgjDC_T.js → jira-icon-DQB6Qjdp.js} +1 -1
  187. package/dist/client/assets/{label-DFYaZzfV.js → label-8YgWjsAI.js} +1 -1
  188. package/dist/client/assets/{layout-C1ShA0A2.js → layout-BUEtddid.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-C0rLwEhl.js → legacy-admin-welcome-dialog-DeQv5NRH.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-0KD5AZ-a.js → legacy-agents-deep-CS9jiXOg.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-DsJJQAHz.js → legacy-main-redirect-De0Lv6Az.js} +1 -1
  192. package/dist/client/assets/library-BGiPLA2O.js +1 -0
  193. package/dist/client/assets/{library-tab-BttdbOwT.js → library-tab-ByciCryZ.js} +1 -1
  194. package/dist/client/assets/{login-DkrQRBM-.js → login-BTKxnr4O.js} +1 -1
  195. package/dist/client/assets/{markdown-B-EQMrBl.js → markdown-8gty2O_i.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-B8_THT37.js → mcp-app-renderer-CwI30aBv.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-_iPR8QjI.js → mcp-oauth-Bwdp9dmz.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-Cya-fh0P.js → mcp-oauth-Da2M0Zt_.js} +1 -1
  199. package/dist/client/assets/{members-BVOPoO_W.js → members-D4_MCyx5.js} +1 -1
  200. package/dist/client/assets/{memory-C23hLBrZ.js → memory-D9W-dS_5.js} +1 -1
  201. package/dist/client/assets/{mock-board-BcZu24PK.js → mock-board-CgESzcLj.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-DttATUsj.js → monaco-editor-D8O0msWy.js} +1 -1
  203. package/dist/client/assets/monitoring-Bd2zKleB.js +2 -0
  204. package/dist/client/assets/{monitoring-stats-row-CRxmylqh.js → monitoring-stats-row-CnzmAx70.js} +1 -1
  205. package/dist/client/assets/{multi-select-CSOG3KaA.js → multi-select-DE5ksBaZ.js} +1 -1
  206. package/dist/client/assets/{mustache-clchl4ci.js → mustache-CZrIiiRA.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-C-_N0SXT.js → named-rule-step-DWukwLNl.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-DrUf_Aau.js → named-rule-view-BEOlp-VW.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-KtG8l1yi.js → new-project-dialog-D0V4pa6h.js} +1 -1
  210. package/dist/client/assets/{new-project-store-DDZH8miu.js → new-project-store-NXmiuVr4.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-B-J4rjBS.js → oauth-callback-BZ7jVLM3.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-DCheihxt.js → oauth-callback-ai-provider-CeAVl_HP.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-P6jhSz87.js → oauth-consent-2bInDFfL.js} +1 -1
  214. package/dist/client/assets/{onboarding-BoQQb_DJ.js → onboarding-C8Xvf63H.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-BRIcN7ns.js → openai-conversation-DanmxGeT.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-BhBXjk9R.js → optimistic-project-sidebar-views-DUwFLYDS.js} +1 -1
  217. package/dist/client/assets/order-monitor-day-BN_bDzbe.js +1 -0
  218. package/dist/client/assets/{organization-choice-NHrCNKHD.js → organization-choice-PN_l-X6n.js} +1 -1
  219. package/dist/client/assets/{orgs-oDKfi1NH.js → orgs-1LvqsLQJ.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-DfQklfiL.js → own-accounts-section-NdQe_2Cn.js} +1 -1
  221. package/dist/client/assets/{pair-CI1Rts6X.js → pair-Co6O8faf.js} +1 -1
  222. package/dist/client/assets/{parse-sections-Cv7KSMgB.js → parse-sections-B2-yXPZ-.js} +2 -2
  223. package/dist/client/assets/{plan-DhBEXV7d.js → plan-B_bP_jJS.js} +1 -1
  224. package/dist/client/assets/{plan-ladder-Dn1mCpkd.js → plan-ladder-C7D6F_yr.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-CoidaM8B.js → plan-usage-card-8DjiWnue.js} +1 -1
  226. package/dist/client/assets/{popover-D73VbCM5.js → popover-CzimP1Be.js} +1 -1
  227. package/dist/client/assets/{post-calendar-bB_dTysf.js → post-calendar-DVXjV-kZ.js} +1 -1
  228. package/dist/client/assets/{post-editor-DJgKYRYW.js → post-editor-CjtbCXrN.js} +1 -1
  229. package/dist/client/assets/{preview-content-g2WEpueQ.js → preview-content-BhpCZRyB.js} +1 -1
  230. package/dist/client/assets/{preview-dialog-DEGn7q2O.js → preview-dialog-BkjFMXaj.js} +1 -1
  231. package/dist/client/assets/{preview-panel-BWh6T2ND.js → preview-panel-DKmuVMNQ.js} +1 -1
  232. package/dist/client/assets/{preview-tab-BFrQickY.js → preview-tab-DrvrM6zg.js} +3 -3
  233. package/dist/client/assets/{primitives-BHTaKbue.js → primitives-BjQdGL_q.js} +1 -1
  234. package/dist/client/assets/{product-picker-dialog-B1FnNY41.js → product-picker-dialog-D_V5osWw.js} +1 -1
  235. package/dist/client/assets/{profile-KHrko28l.js → profile-Bq-3eOrh.js} +1 -1
  236. package/dist/client/assets/{project-app-view-CEsZ7pyQ.js → project-app-view-w3f0W-TQ.js} +1 -1
  237. package/dist/client/assets/{project-apps-BFfwYw5p.js → project-apps-Cwz4_h0k.js} +1 -1
  238. package/dist/client/assets/{project-icon-Bl4IAncl.js → project-icon-Ca_mayml.js} +1 -1
  239. package/dist/client/assets/{project-index-DyqPLhTf.js → project-index-Z-D9wj0s.js} +1 -1
  240. package/dist/client/assets/project-reports-IvMNrfuF.js +1 -0
  241. package/dist/client/assets/project-tasks-BW9Gen3T.js +1 -0
  242. package/dist/client/assets/{projects-D4oIfDMZ.js → projects-CdFwmhMX.js} +1 -1
  243. package/dist/client/assets/{projects-empty-state-PFeDurZg.js → projects-empty-state-D15986q9.js} +1 -1
  244. package/dist/client/assets/{prompts-TmqmoJme.js → prompts-BdqkpY3M.js} +1 -1
  245. package/dist/client/assets/record-editor-C9ZJFoFs.js +1 -0
  246. package/dist/client/assets/{redirect-editor-BlBcxP_z.js → redirect-editor-B-GYle2R.js} +1 -1
  247. package/dist/client/assets/reports-BQtJM_Hf.js +1 -0
  248. package/dist/client/assets/{reports-DxGhEr3Y.js → reports-D-ZCeJIZ.js} +1 -1
  249. package/dist/client/assets/{reports-onboarding-CM7YPxA7.js → reports-onboarding-ChTnfQ-B.js} +1 -1
  250. package/dist/client/assets/{reports-tab-DLrLzkx3.js → reports-tab-vi8L_Wxe.js} +2 -2
  251. package/dist/client/assets/{repositories-67wiZj2r.js → repositories-C6Hn2YCV.js} +1 -1
  252. package/dist/client/assets/repositories-CKyW9DY1.js +1 -0
  253. package/dist/client/assets/{repository-binding-w-FCDYuS.js → repository-binding-FQa6l_GE.js} +1 -1
  254. package/dist/client/assets/{repository-picker-DF0-TGsg.js → repository-picker-Ca4HUXXu.js} +1 -1
  255. package/dist/client/assets/{require-capability-7Xn2Fb3C.js → require-capability-DXx5oJc8.js} +1 -1
  256. package/dist/client/assets/{required-auth-layout-B1owCwtw.js → required-auth-layout-BtOK1hFG.js} +1 -1
  257. package/dist/client/assets/{reset-password-BvZRYC01.js → reset-password-CBL3fKMR.js} +1 -1
  258. package/dist/client/assets/{resizable-CJbr1Nyi.js → resizable-CdPpaO2k.js} +1 -1
  259. package/dist/client/assets/{resolve-tab-icon-3aZJM1BR.js → resolve-tab-icon-m4cf6LfN.js} +1 -1
  260. package/dist/client/assets/{review-settings-CISstknV.js → review-settings-CdPV9OIw.js} +1 -1
  261. package/dist/client/assets/{role-color-CW1lGNZj.js → role-color-BBWyZTcv.js} +1 -1
  262. package/dist/client/assets/roles-BOeFoZqn.js +1 -0
  263. package/dist/client/assets/{route-CPaIZZ88.js → route-BAIfah4j.js} +1 -1
  264. package/dist/client/assets/{route-CT0-z-8-.js → route-BB_rTgv3.js} +1 -1
  265. package/dist/client/assets/route-FU3Xmv-x.js +1 -0
  266. package/dist/client/assets/{route-page-header-CRzmHOKm.js → route-page-header--TAT5BSy.js} +1 -1
  267. package/dist/client/assets/{sandbox-git-api-1xYJwdHB.js → sandbox-git-api-BrexlX08.js} +1 -1
  268. package/dist/client/assets/{sandbox-lifecycle-context-CxRkhFod.js → sandbox-lifecycle-context-DNzajYIO.js} +1 -1
  269. package/dist/client/assets/{save-status-Csuo4rYY.js → save-status-Clcs_zVL.js} +1 -1
  270. package/dist/client/assets/{schema-DU3GC-Ez.js → schema-CUFnw3rd.js} +1 -1
  271. package/dist/client/assets/{schema-BluyjH2z.js → schema-vnxsZShA.js} +1 -1
  272. package/dist/client/assets/{scroll-area-D9mVov2B.js → scroll-area-D65ihrwn.js} +1 -1
  273. package/dist/client/assets/{search-input-D-gp-h4P.js → search-input-B_Oe2BEE.js} +1 -1
  274. package/dist/client/assets/{search-toggle-C1j-Ki1u.js → search-toggle-sCOfDnRT.js} +1 -1
  275. package/dist/client/assets/{secret-picker-BoQX39kK.js → secret-picker-XDPVDyfu.js} +1 -1
  276. package/dist/client/assets/{secrets-BZwPjTxC.js → secrets-C__PWtk2.js} +1 -1
  277. package/dist/client/assets/{section-array-field-4siTAXTX.js → section-array-field-CSurFJ3n.js} +1 -1
  278. package/dist/client/assets/{sections-Cwqt7k6K.js → sections-csOQBRhC.js} +1 -1
  279. package/dist/client/assets/{sections-editor-B2wYNbjz.js → sections-editor-COAVjFuf.js} +1 -1
  280. package/dist/client/assets/{select-DnlDCB9E.js → select-XJXfYbtd.js} +1 -1
  281. package/dist/client/assets/{select-model-Cm1Kbu8h.js → select-model-Ce2zoRh7.js} +1 -1
  282. package/dist/client/assets/{seo-editor-DbLTH9Vw.js → seo-editor-C0E2IWLW.js} +1 -1
  283. package/dist/client/assets/{separator-DsSANYB0.js → separator-DMzyrnc5.js} +1 -1
  284. package/dist/client/assets/{session-runtime-D2GKulko.js → session-runtime-CW0B7dQ4.js} +1 -1
  285. package/dist/client/assets/settings-tab-DgFLyBXQ.js +1 -0
  286. package/dist/client/assets/{sheet-Ctckoytn.js → sheet-CVzeiXCI.js} +1 -1
  287. package/dist/client/assets/{shell-layout-BS_Y65pV.js → shell-layout-B0_esTNv.js} +1 -1
  288. package/dist/client/assets/{site-draft-actions-BZf0yVqo.js → site-draft-actions-CcJXLEbn.js} +1 -1
  289. package/dist/client/assets/{site-draft-view-NypTEK1x.js → site-draft-view-i4kBvC06.js} +1 -1
  290. package/dist/client/assets/site-editor-H0myc-xa.js +1 -0
  291. package/dist/client/assets/{site-editor-toast-DfzFv4iY.js → site-editor-toast-plVdDShh.js} +1 -1
  292. package/dist/client/assets/{skills-2_Ugx28k.js → skills-DwpwOlyf.js} +1 -1
  293. package/dist/client/assets/{slider-Bqy5W8RM.js → slider-BC1Q8J4f.js} +1 -1
  294. package/dist/client/assets/{sortable.esm-Cl-YQgc8.js → sortable.esm-bzfUil0p.js} +1 -1
  295. package/dist/client/assets/{sso-CdbJh-Eu.js → sso-BoY0IIU2.js} +1 -1
  296. package/dist/client/assets/{suggestion-BoV2NIg6.js → suggestion-CS5OqVbx.js} +1 -1
  297. package/dist/client/assets/{super-agent-icon-CDA5EiNS.js → super-agent-icon-lftaTE8D.js} +1 -1
  298. package/dist/client/assets/{switch--3C-A5oU.js → switch-BeRq2sy_.js} +1 -1
  299. package/dist/client/assets/{synced-repos-BpiKoBMD.js → synced-repos-BYVaMPcH.js} +1 -1
  300. package/dist/client/assets/{tab-icon-glyph-CEoTzCNL.js → tab-icon-glyph-TQ-99Nhm.js} +1 -1
  301. package/dist/client/assets/{table-Cy5fo0ER.js → table-BcDxqdaD.js} +1 -1
  302. package/dist/client/assets/{tabs-DJ6SkMve.js → tabs-IIp9JExd.js} +1 -1
  303. package/dist/client/assets/{task-board-CShHcm1L.js → task-board-Bbot46A6.js} +1 -1
  304. package/dist/client/assets/{task-key-BP2--GY6.js → task-key-CxrBEN6B.js} +1 -1
  305. package/dist/client/assets/{task-route-BDNP9yC7.js → task-route-B9rjGqBa.js} +1 -1
  306. package/dist/client/assets/{task-status-GPS8HLw1.js → task-status-CTIpwwVm.js} +1 -1
  307. package/dist/client/assets/{taskboard-analytics-DPlKE9oq.js → taskboard-analytics-Ef33x3Ze.js} +1 -1
  308. package/dist/client/assets/{tasks-DQ5zrDt3.js → tasks-BtbTztqN.js} +1 -1
  309. package/dist/client/assets/tasks-DH9pZ8Il.js +1 -0
  310. package/dist/client/assets/{textarea-BCGFjA5F.js → textarea-ClHPjt8l.js} +1 -1
  311. package/dist/client/assets/{thread-analytics-B5IqH-5A.js → thread-analytics-DucCp7K1.js} +1 -1
  312. package/dist/client/assets/{thread-button-Dw70OEJl.js → thread-button-D0Qqy7Z5.js} +1 -1
  313. package/dist/client/assets/{thread-intent-BQWCtBA_.js → thread-intent-IktwWBBc.js} +1 -1
  314. package/dist/client/assets/{thread-route-Dix8r-rB.js → thread-route-09AnlrN7.js} +1 -1
  315. package/dist/client/assets/{thread-route-DRsKlO-E.js → thread-route-BzU-H4__.js} +1 -1
  316. package/dist/client/assets/{thread-sheet-body-iwOtv26B.js → thread-sheet-body-BsxdvE85.js} +1 -1
  317. package/dist/client/assets/{time-range-picker-CUAzqD4s.js → time-range-picker-lTtwlt0R.js} +1 -1
  318. package/dist/client/assets/{toggle-group-jkikwCcL.js → toggle-group-A-rZcwpa.js} +1 -1
  319. package/dist/client/assets/{tool-set-selector-Clh56c6v.js → tool-set-selector-DU3gp6NG.js} +1 -1
  320. package/dist/client/assets/{toolbar-icon-button-DcIFSTOI.js → toolbar-icon-button-D_toXiYW.js} +1 -1
  321. package/dist/client/assets/{tooltip-DCzbfwd7.js → tooltip-DUeLgX2y.js} +1 -1
  322. package/dist/client/assets/{tooltipContext-2wUW4UR-.js → tooltipContext-Bf7fva_B.js} +1 -1
  323. package/dist/client/assets/{track-D4IkVAbh.js → track-C5HcNGXi.js} +1 -1
  324. package/dist/client/assets/{types-BQYXFpO6.js → types-zX8La_Oo.js} +1 -1
  325. package/dist/client/assets/{url-slug-E3otz4_J.js → url-slug-DOqB5l7c.js} +1 -1
  326. package/dist/client/assets/{usage-stats-CiB8uQLm.js → usage-stats-DJhCKtUU.js} +1 -1
  327. package/dist/client/assets/{use-ai-providers-CTbi7eSd.js → use-ai-providers-BIHg8onN.js} +1 -1
  328. package/dist/client/assets/{use-api-keys-CuxnpyDB.js → use-api-keys-qXYXMDeD.js} +1 -1
  329. package/dist/client/assets/{use-apply-named-rule-BroFciug.js → use-apply-named-rule-B1nYpksR.js} +1 -1
  330. package/dist/client/assets/use-ask-in-chat-BMUxXmSL.js +1 -0
  331. package/dist/client/assets/{use-automations-BdniAcmH.js → use-automations-C8o7XABG.js} +1 -1
  332. package/dist/client/assets/{use-autosave-C9MsBAi1.js → use-autosave-BaWPgzzA.js} +1 -1
  333. package/dist/client/assets/use-blocks-v8-project-VphspV3C.js +1 -0
  334. package/dist/client/assets/use-blog-view-CokTQo5n.js +1 -0
  335. package/dist/client/assets/{use-chat-layout-state-77HNlix_.js → use-chat-layout-state-CbIBcyK1.js} +1 -1
  336. package/dist/client/assets/{use-cms-publish-actions-DGO40mZ2.js → use-cms-publish-actions-mAw_LUgT.js} +1 -1
  337. package/dist/client/assets/{use-connect-companion-BkEQhdBC.js → use-connect-companion-BThmLN1j.js} +1 -1
  338. package/dist/client/assets/{use-connection-DxwzNo03.js → use-connection-Cw54odQf.js} +1 -1
  339. package/dist/client/assets/{use-content-sync-C9H2kDwl.js → use-content-sync-B1XhNWuU.js} +1 -1
  340. package/dist/client/assets/{use-copy-DSNmvH9L.js → use-copy-DLKbeyhb.js} +1 -1
  341. package/dist/client/assets/{use-current-view-DvszbK0Z.js → use-current-view-C7-wvsoH.js} +1 -1
  342. package/dist/client/assets/{use-date-fns-locale-BSsydU_s.js → use-date-fns-locale-BaOJIxaM.js} +1 -1
  343. package/dist/client/assets/{use-debounced-autosave-D6iRm-Vv.js → use-debounced-autosave-CcByOZRj.js} +1 -1
  344. package/dist/client/assets/{use-debounced-value-CAOKwJaL.js → use-debounced-value-BSKJG7sB.js} +1 -1
  345. package/dist/client/assets/{use-deco-credits-DnZKzVHP.js → use-deco-credits-BWN1z58M.js} +1 -1
  346. package/dist/client/assets/{use-decopilot-events-BhcT5RAV.js → use-decopilot-events-B17ZZ4sn.js} +1 -1
  347. package/dist/client/assets/{use-delete-block-Bd0Db3-p.js → use-delete-block-Ft4r3Ll2.js} +1 -1
  348. package/dist/client/assets/{use-delete-connection-BMDl_PP-.js → use-delete-connection-BS-A4Vx_.js} +1 -1
  349. package/dist/client/assets/{use-deployment-admin-DCWHLNad.js → use-deployment-admin-DGCRiY5p.js} +1 -1
  350. package/dist/client/assets/{use-entitlements-CzwT7L5B.js → use-entitlements-DqwhSiMR.js} +1 -1
  351. package/dist/client/assets/{use-fast-preview-draft-url-DbEjmD3f.js → use-fast-preview-draft-url-30PqJojM.js} +1 -1
  352. package/dist/client/assets/{use-file-configs-yKe4yLHn.js → use-file-configs-1Cc44692.js} +1 -1
  353. package/dist/client/assets/{use-id-selection-DmcvY3GI.js → use-id-selection-ZlXmhkgL.js} +1 -1
  354. package/dist/client/assets/{use-in-settings-BTBVzmbg.js → use-in-settings-D4epJEJY.js} +1 -1
  355. package/dist/client/assets/{use-inbox-feed-BOy7gIMv.js → use-inbox-feed-DT8LzO8K.js} +1 -1
  356. package/dist/client/assets/{use-infinite-scroll-DnhPBPks.js → use-infinite-scroll-CKEqSGMh.js} +1 -1
  357. package/dist/client/assets/{use-join-requests-C0zVtdAh.js → use-join-requests-CYiQDu9h.js} +1 -1
  358. package/dist/client/assets/{use-main-panel-tabs-BCg6GLFm.js → use-main-panel-tabs-DToe3Hy3.js} +1 -1
  359. package/dist/client/assets/{use-mcp-auth-status-BZRJODR4.js → use-mcp-auth-status-arPUePNB.js} +1 -1
  360. package/dist/client/assets/{use-mcp-client-4k5JKqzF.js → use-mcp-client-DDkZkULJ.js} +1 -1
  361. package/dist/client/assets/{use-mcp-prompts-pJuJ9yii.js → use-mcp-prompts-BEtzDBYu.js} +1 -1
  362. package/dist/client/assets/{use-mcp-tools-Dh4scI4V.js → use-mcp-tools-CIqp5nHv.js} +1 -1
  363. package/dist/client/assets/{use-mobile-CBwmaBFU.js → use-mobile-BSIfiGG_.js} +1 -1
  364. package/dist/client/assets/{use-move-blocks-D8MFSTf7.js → use-move-blocks-B0wXD5xG.js} +1 -1
  365. package/dist/client/assets/{use-navigate-to-agent-H87rWFYJ.js → use-navigate-to-agent-CA-iSSHx.js} +1 -1
  366. package/dist/client/assets/{use-never-published-Db-SviVk.js → use-never-published-PEjFa9tQ.js} +1 -1
  367. package/dist/client/assets/{use-org-fs-CbXrwKDd.js → use-org-fs-DT7UqAaR.js} +1 -1
  368. package/dist/client/assets/{use-org-notice-BLDWm2ef.js → use-org-notice-CXzAhtHV.js} +1 -1
  369. package/dist/client/assets/{use-org-repo-syncs-BLfbsB0Y.js → use-org-repo-syncs-cJ0DjZdU.js} +1 -1
  370. package/dist/client/assets/{use-org-sso-Cfy5SkJ5.js → use-org-sso-BSaWiEhh.js} +1 -1
  371. package/dist/client/assets/{use-organization-settings-UrGbnM2k.js → use-organization-settings-DHvhF-b0.js} +1 -1
  372. package/dist/client/assets/{use-panel-navigate-B5u6ws6M.js → use-panel-navigate-C6W7QXfm.js} +1 -1
  373. package/dist/client/assets/{use-project-native-view-presence-Cww1Huve.js → use-project-native-view-presence-D5QDO7d-.js} +1 -1
  374. package/dist/client/assets/{use-project-scope-Dydp2D08.js → use-project-scope-DMZfmTcD.js} +1 -1
  375. package/dist/client/assets/{use-recent-apps-B6ojF6fA.js → use-recent-apps-clNLPNPd.js} +1 -1
  376. package/dist/client/assets/{use-reports-diagnostic-EfyKTU1j.js → use-reports-diagnostic-PYxtMSnv.js} +1 -1
  377. package/dist/client/assets/{use-sandbox-events-DEHux0gs.js → use-sandbox-events-BdmTu6AR.js} +1 -1
  378. package/dist/client/assets/{use-secrets-G3Yo5eAI.js → use-secrets-h1X-5RGX.js} +1 -1
  379. package/dist/client/assets/{use-section-preview-base-C2ASOAPw.js → use-section-preview-base-DdqG0XUD.js} +1 -1
  380. package/dist/client/assets/{use-sidebar-collapsed-DgMGLJyh.js → use-sidebar-collapsed-DZRZ-tVO.js} +1 -1
  381. package/dist/client/assets/{use-tags-laGjgQqt.js → use-tags-B5TWieoM.js} +1 -1
  382. package/dist/client/assets/{use-task-board-analytics-Ct6FAXeB.js → use-task-board-analytics-BKqonxiX.js} +1 -1
  383. package/dist/client/assets/{use-task-board-item-prs-BbVn1nYd.js → use-task-board-item-prs-B428bhbs.js} +1 -1
  384. package/dist/client/assets/{use-task-board-items-B_EMxvU9.js → use-task-board-items-CDcbSc1v.js} +1 -1
  385. package/dist/client/assets/{use-task-board-prompts-CE2PVOHH.js → use-task-board-prompts-CadyaT_f.js} +1 -1
  386. package/dist/client/assets/{use-task-metadata-L0GKyc-x.js → use-task-metadata-DwtMEa2x.js} +1 -1
  387. package/dist/client/assets/{use-thread-outputs-B9502nWa.js → use-thread-outputs-BQDuOJLv.js} +1 -1
  388. package/dist/client/assets/{use-view-draft-kind-CZT4hOaN.js → use-view-draft-kind-vEPuxNq3.js} +1 -1
  389. package/dist/client/assets/{use-voice-input-Nzha8Za1.js → use-voice-input-DKeQcA8M.js} +1 -1
  390. package/dist/client/assets/useInfiniteQuery-zuTodZ6M.js +1 -0
  391. package/dist/client/assets/{useQueries-CQ0xJF7W.js → useQueries-BTS9hepq.js} +1 -1
  392. package/dist/client/assets/useSuspenseInfiniteQuery-BkOKRRNR.js +1 -0
  393. package/dist/client/assets/{users-C_-sgV42.js → users-BqXSlgX6.js} +1 -1
  394. package/dist/client/assets/{utils-pe9cqItP.js → utils-ZusZ1r5L.js} +1 -1
  395. package/dist/client/assets/{variant-calendar-d5m67-k3.js → variant-calendar-BsqxUxJV.js} +1 -1
  396. package/dist/client/assets/{variant-matcher-override-DoPQRIHU.js → variant-matcher-override-CpJc52Q6.js} +1 -1
  397. package/dist/client/assets/{view-header-B0xV_oWh.js → view-header-Y-3vK3LE.js} +1 -1
  398. package/dist/client/assets/{virtual-mcp-DN6fu9Nf.js → virtual-mcp-Db3pDUcR.js} +1 -1
  399. package/dist/client/assets/watch-sse-pool-v35Iw-1F.js +1 -0
  400. package/dist/client/index.html +2 -2
  401. package/dist/server/migrate-dbos.js +2 -2
  402. package/dist/server/migrate.js +205 -205
  403. package/dist/server/server.js +804 -808
  404. package/package.json +1 -1
  405. package/dist/client/assets/agent-app-BBl0rE0n.js +0 -1
  406. package/dist/client/assets/agent-deck-Bhm8TGFo.js +0 -1
  407. package/dist/client/assets/agent-experiments-D8dPEPBA.js +0 -1
  408. package/dist/client/assets/agent-file-n_x6LXzO.js +0 -1
  409. package/dist/client/assets/agent-library-BM2Fah9h.js +0 -1
  410. package/dist/client/assets/agent-library-file-BO40iakQ.js +0 -1
  411. package/dist/client/assets/agent-overview-CJRKK7hh.js +0 -1
  412. package/dist/client/assets/agent-settings-CE2XV9z9.js +0 -1
  413. package/dist/client/assets/agent-site-editor-code-1w7lcxGQ.js +0 -2
  414. package/dist/client/assets/agent-site-editor-content-BU4N-bBf.js +0 -1
  415. package/dist/client/assets/agent-site-editor-preview-D9XYlGea.js +0 -1
  416. package/dist/client/assets/agent-view-B4jYgL5h.js +0 -1
  417. package/dist/client/assets/api-keys-BoLbPekZ.js +0 -1
  418. package/dist/client/assets/index-CFbcObvG.css +0 -1
  419. package/dist/client/assets/index-CiG92g6c.js +0 -5
  420. package/dist/client/assets/library-DKYFm9Uv.js +0 -1
  421. package/dist/client/assets/monitoring-CLDBgSzo.js +0 -2
  422. package/dist/client/assets/order-monitor-day-DEr2FQ1w.js +0 -1
  423. package/dist/client/assets/project-reports-Bo9Tf1zF.js +0 -1
  424. package/dist/client/assets/project-tasks-t-YvuQ_q.js +0 -1
  425. package/dist/client/assets/record-editor-WmiU2d6T.js +0 -1
  426. package/dist/client/assets/reports-Cb0Mwz-u.js +0 -1
  427. package/dist/client/assets/repositories-CDNeFlHK.js +0 -1
  428. package/dist/client/assets/roles-D7rYnEMh.js +0 -1
  429. package/dist/client/assets/route-CFBPrBcw.js +0 -1
  430. package/dist/client/assets/settings-tab-CSzHYez6.js +0 -1
  431. package/dist/client/assets/site-editor-BbPLQWC_.js +0 -1
  432. package/dist/client/assets/tasks-Coh8-0jv.js +0 -1
  433. package/dist/client/assets/use-ask-in-chat-vlpFfAp7.js +0 -1
  434. package/dist/client/assets/use-blocks-v8-project-BloQ91Xb.js +0 -1
  435. package/dist/client/assets/use-blog-view-Bi3aoju6.js +0 -1
  436. package/dist/client/assets/useInfiniteQuery-FxnnBp9W.js +0 -1
  437. package/dist/client/assets/useSuspenseInfiniteQuery-CtWAJlQZ.js +0 -1
  438. package/dist/client/assets/watch-sse-pool-7J-tc7Ge.js +0 -1
@@ -1 +1 @@
1
- import{c as L,b as V,r as N,j as r,m as q,B as Z,aY as ee}from"./index-mb-jxjEy.js";import{a as te,d as re,r as se,p as ne}from"./session-runtime-D2GKulko.js";import{u as Y,i as oe,d as le,j as ie,k as ce,m as ae}from"./chat-context-CxkYg5uT.js";import{b as ue}from"./repository-binding-w-FCDYuS.js";import{a as H,b as Q,P as G}from"./popover-D73VbCM5.js";import{d as de,b as fe,a as me,D as he}from"./drawer-CmJXwXhP.js";import{T as pe,a as xe,c as ge}from"./tooltip-DCzbfwd7.js";import{u as ve}from"./use-mobile-CBwmaBFU.js";import{g as ye,aa as Se}from"./agent-icon-zvo6Zsex.js";import{t as be}from"./ChevronDown-Cz82ih9S.js";import{a as je}from"./UserCheck01-CuByTN5F.js";import{t as Te}from"./Tool01-9Nk8XcOI.js";import{d as Re}from"./use-organization-settings-UrGbnM2k.js";import{u as J,c as Me,d as ke}from"./use-ai-providers-CTbi7eSd.js";import{M as Ce,a as Ie}from"./index-BIBRRoOW.js";import{d as we,e as Ne,b as _e}from"./use-entitlements-CzwT7L5B.js";function mt(t){const e=L.c(14),o=ue(t),S=Y(),s=o?.metadata,a=S?.activeTask,n=a?.metadata?.runtime;let u;e[0]!==n?(u=ne(n),e[0]=n,e[1]=u):u=e[1];const x=u,b=!!a&&!a.partial,l=a?.metadata;let j;e[2]!==s||e[3]!==l?(j=te(l,s),e[2]=s,e[3]=l,e[4]=j):j=e[4];const g=!!x||b&&!!o;let f;e[5]!==s?(f=re(s),e[5]=s,e[6]=f):f=e[6];let i;e[7]!==s?(i=se(s),e[7]=s,e[8]=i):i=e[8];let v;return e[9]!==j||e[10]!==g||e[11]!==f||e[12]!==i?(v={runtime:j,resolved:g,projectDefault:f,previewServerUrl:i},e[9]=j,e[10]=g,e[11]=f,e[12]=i,e[13]=v):v=e[13],v}function Pe(t){return["openai-compatible","openrouter","deco"].includes(t)}function De(t,e){return Pe(t)&&$e(e)!==null}function $e(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const Ee={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Fe(t,e){return Ee[t]?.test(e)??!1}function Ae(t){return Me(t)&&Fe(t.providerId,t.modelId)}function ze(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const Le={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function Ue(t){const e=L.c(32),{tier:o,orgSlot:S,userSlot:s,autoSlot:a,filterModels:n,onPick:u,onReset:x,onClose:b}=t,l=V(),j=J(),g=new Set(j.map(Be)),f=oe([s,S,a],g),i=f?.keyId??null,[v,m]=N.useState(i??j[0]?.id??null),c=j.some(P=>P.id===v)?v:i??j[0]?.id??null,k=c?j.find(P=>P.id===c):null,M="flex h-[70vh] max-h-[460px] w-full flex-col",T=Le[o];let h;e[0]!==l||e[1]!==T?(h=l(T),e[0]=l,e[1]=T,e[2]=h):h=e[2];let p;e[3]!==h?(p=r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h}),e[3]=h,e[4]=p):p=e[4];let y;e[5]!==x||e[6]!==l||e[7]!==s?(y=s&&r.jsx("button",{type:"button",onClick:x,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:l("chat.modelPreferences.reset")}),e[5]=x,e[6]=l,e[7]=s,e[8]=y):y=e[8];let R;e[9]!==p||e[10]!==y?(R=r.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[p,y]}),e[9]=p,e[10]=y,e[11]=R):R=e[11];const d="flex-1 min-h-0",C=N.Suspense;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(Ie,{}),e[12]=_):_=e[12];const z=Ce,A=!0,E=ze(i?f:null,k?.providerId??"deco");let D;e[13]!==c||e[14]!==u||e[15]!==m?(D=P=>{const F=P.keyId??c??"";m(F),u({keyId:F,modelId:P.modelId,title:P.title})},e[13]=c,e[14]=u,e[15]=m,e[16]=D):D=e[16];let I;e[17]!==z||e[18]!==c||e[19]!==n||e[20]!==b||e[21]!==m||e[22]!==E||e[23]!==D?(I=r.jsx(z,{compact:A,filterModels:n,onClose:b,credentialId:c,onCredentialChange:m,selectedModel:E,onModelChange:D}),e[17]=z,e[18]=c,e[19]=n,e[20]=b,e[21]=m,e[22]=E,e[23]=D,e[24]=I):I=e[24];let w;e[25]!==C||e[26]!==I||e[27]!==_?(w=r.jsx("div",{className:d,children:r.jsx(C,{fallback:_,children:I})}),e[25]=C,e[26]=I,e[27]=_,e[28]=w):w=e[28];let $;return e[29]!==w||e[30]!==R?($=r.jsxs("div",{className:M,children:[R,w]}),e[29]=w,e[30]=R,e[31]=$):$=e[31],$}function Be(t){return t.id}const Ke=["fast","smart","thinking"];function X(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const O={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function qe(t){const e=L.c(28),{tier:o,pillIcon:S,groups:s}=t,a=V();let n;e[0]!==a?(n=X(a),e[0]=a,e[1]=n):n=e[1];const u=n,[x,b]=N.useState(!1);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=R=>{R.onSelect(),b(!1)},e[2]=l):l=e[2];const j=l,g=u[o];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=q("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[480px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=q("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[480px]/chat-bottom:max-w-24 @[480px]/chat-bottom:opacity-100"),e[4]=i):i=e[4];const v=u[o];let m;e[5]!==v?(m=r.jsx("span",{className:i,children:v}),e[5]=v,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(be,{size:12,className:"opacity-60 hidden @[480px]/chat-bottom:inline-block"}),e[7]=c):c=e[7];let k;e[8]!==S||e[9]!==g||e[10]!==m?(k=r.jsx(pe,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(H,{asChild:!0,children:r.jsxs(Z,{type:"button",variant:"ghost",size:"default","aria-label":g,className:f,children:[S,m,c]})})})}),e[8]=S,e[9]=g,e[10]=m,e[11]=k):k=e[11];let M;e[12]!==g?(M=r.jsx(xe,{children:g}),e[12]=g,e[13]=M):M=e[13];let T;e[14]!==k||e[15]!==M?(T=r.jsxs(ge,{children:[k,M]}),e[14]=k,e[15]=M,e[16]=T):T=e[16];let h;if(e[17]!==s||e[18]!==a){let R;e[20]!==a?(R=d=>r.jsx("div",{className:"flex flex-col",children:d.rows.map(C=>r.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-accent",children:[r.jsxs("button",{type:"button",role:"menuitem","aria-label":C.title,onClick:()=>j(C),className:q("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",C.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[C.icon&&r.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:C.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",children:C.title}),C.subtitle&&r.jsx("div",{className:"text-xs text-muted-foreground",children:C.subtitle})]}),C.active&&r.jsx("span",{title:a("chat.tierTrigger.selected"),children:r.jsx(ee,{size:14,className:"text-foreground mt-0.5"})})]}),C.modelOverride&&r.jsx(Oe,{label:C.title,render:C.modelOverride})]},C.key))},d.key),e[20]=a,e[21]=R):R=e[21],h=s.map(R),e[17]=s,e[18]=a,e[19]=h}else h=e[19];let p;e[22]!==h?(p=r.jsx(Q,{align:"end",className:"p-1 w-64",onOpenAutoFocus:Ve,children:r.jsx("div",{role:"menu",className:"flex flex-col",children:h})}),e[22]=h,e[23]=p):p=e[23];let y;return e[24]!==x||e[25]!==T||e[26]!==p?(y=r.jsxs(G,{open:x,onOpenChange:b,children:[T,p]}),e[24]=x,e[25]=T,e[26]=p,e[27]=y):y=e[27],y}function Ve(t){return t.preventDefault()}function Oe(t){const e=L.c(38),{label:o,render:S}=t,s=V(),a=ve(),[n,u]=N.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),e[0]=x):x=e[0];const b=x;let l;e[1]!==o||e[2]!==s?(l=s("chat.modelPreferences.customizeModel",{tier:o}),e[1]=o,e[2]=s,e[3]=l):l=e[3];const j=n&&"opacity-100";let g;e[4]!==j?(g=q("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background shadow-edge","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",j),e[4]=j,e[5]=g):g=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(je,{size:14}),e[6]=f):f=e[6];let i;e[7]!==l||e[8]!==g?(i=r.jsx("button",{type:"button","aria-label":l,className:g,children:f}),e[7]=l,e[8]=g,e[9]=i):i=e[9];const v=i;if(a){let T;e[10]!==v?(T=r.jsx(de,{asChild:!0,children:v}),e[10]=v,e[11]=T):T=e[11];let h;e[12]!==o||e[13]!==s?(h=s("chat.modelPreferences.customizeModel",{tier:o}),e[12]=o,e[13]=s,e[14]=h):h=e[14];let p;e[15]!==h?(p=r.jsx(fe,{className:"sr-only",children:h}),e[15]=h,e[16]=p):p=e[16];let y;e[17]!==n||e[18]!==S?(y=n&&S(b),e[17]=n,e[18]=S,e[19]=y):y=e[19];let R;e[20]!==y||e[21]!==p?(R=r.jsxs(me,{className:"p-0 flex flex-col max-h-[95vh]",children:[p,y]}),e[20]=y,e[21]=p,e[22]=R):R=e[22];let d;return e[23]!==n||e[24]!==R||e[25]!==T?(d=r.jsxs(he,{open:n,onOpenChange:u,children:[T,R]}),e[23]=n,e[24]=R,e[25]=T,e[26]=d):d=e[26],d}let m;e[27]!==v?(m=r.jsx(H,{asChild:!0,children:v}),e[27]=v,e[28]=m):m=e[28];let c;e[29]!==n||e[30]!==S?(c=n&&S(b),e[29]=n,e[30]=S,e[31]=c):c=e[31];let k;e[32]!==c?(k=r.jsx(Q,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:c}),e[32]=c,e[33]=k):k=e[33];let M;return e[34]!==n||e[35]!==m||e[36]!==k?(M=r.jsxs(G,{open:n,onOpenChange:u,children:[m,k]}),e[34]=n,e[35]=m,e[36]=k,e[37]=M):M=e[37],M}function W(t){return t==="fast"?r.jsx(ye,{size:16}):t==="thinking"?r.jsx(Se,{size:16}):r.jsx(Te,{size:16})}function We(t){const e=L.c(13),o=ae();let S;e[0]!==t||e[1]!==o.tiers?(S=b=>{const l=o.tiers[b];return l?l.title??l.modelId:t.chat[b]?.title},e[0]=t,e[1]=o.tiers,e[2]=S):S=e[2];const s=S;let a;e[3]!==s?(a=s("fast"),e[3]=s,e[4]=a):a=e[4];let n;e[5]!==s?(n=s("smart"),e[5]=s,e[6]=n):n=e[6];let u;e[7]!==s?(u=s("thinking"),e[7]=s,e[8]=u):u=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==u?(x={fast:a,smart:n,thinking:u},e[9]=a,e[10]=n,e[11]=u,e[12]=x):x=e[12],x}function ht(){const t=L.c(25),e=V(),{simpleModeTier:o,setSimpleModeTier:S}=le(),s=Re(),a=J(),n=ke(a),u=We(n),{data:x,error:b}=ie();let l;t[0]!==x?(l=x===void 0?{tiers:{}}:x,t[0]=x,t[1]=l):l=t[1];const j=l,g=ce(),f=Y()?.lockedHarness,i=f==="claude-code",v=we("model_choice"),m=Ne(),c=_e();if(!m||!v)return null;let k,M;if(t[2]!==n||t[3]!==c||t[4]!==i||t[5]!==f||t[6]!==s||t[7]!==S||t[8]!==e||t[9]!==o||t[10]!==u||t[11]!==g||t[12]!==j||t[13]!==b){const R=X(e);k="decopilot",M=Ke.map(d=>{const C=u[d],_=j.tiers[d];return{key:`decopilot-${d}`,icon:W(d),title:R[d],subtitle:c?C??e(O[d]):e(O[d]),active:o===d,onSelect:()=>S(d),modelOverride:c?z=>r.jsxs(r.Fragment,{children:[b&&r.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),r.jsx(Ue,{tier:d,orgSlot:s.tiers[d],userSlot:_,autoSlot:n.chat[d],filterModels:f==="codex"?Ye:i?Ae:void 0,onClose:z,onPick:A=>g.mutate({tier:d,slot:A}),onReset:()=>g.mutate({tier:d,slot:null})},`${d}:${_?.keyId??"org"}:${_?.modelId??""}`)]}):void 0}}),t[2]=n,t[3]=c,t[4]=i,t[5]=f,t[6]=s,t[7]=S,t[8]=e,t[9]=o,t[10]=u,t[11]=g,t[12]=j,t[13]=b,t[14]=k,t[15]=M}else k=t[14],M=t[15];let T;t[16]!==k||t[17]!==M?(T=[{key:k,rows:M}],t[16]=k,t[17]=M,t[18]=T):T=t[18];const h=T;let p;t[19]!==o?(p=W(o),t[19]=o,t[20]=p):p=t[20];let y;return t[21]!==h||t[22]!==p||t[23]!==o?(y=r.jsx(qe,{tier:o,pillIcon:p,groups:h}),t[21]=h,t[22]=p,t[23]=o,t[24]=y):y=t[24],y}function Ye(t){return De(t.providerId,t.modelId)}const B=48;function pt(){const t=L.c(12),[e,o]=N.useState("idle"),[S,s]=N.useState(""),[a,n]=N.useState(""),[u,x]=N.useState(Ge),b=N.useRef(null),l=N.useRef(null),j=N.useRef(null),g=N.useRef(null),f=N.useRef(0),i=N.useRef(!1),v=N.useRef(""),m=N.useRef(""),c=N.useRef(!1),k=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),l.current?.close().catch(Qe),g.current?.getTracks().forEach(He),j.current=null,l.current=null,g.current=null},t[0]=M):M=t[0];const T=M;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=E=>{g.current=E;const D=new AudioContext;l.current=D;const I=D.createMediaStreamSource(E),w=D.createAnalyser();w.fftSize=128,w.smoothingTimeConstant=.8,I.connect(w),j.current=w;const $=new Uint8Array(w.frequencyBinCount),P=()=>{if(!j.current)return;j.current.getByteFrequencyData($);const F=[];for(let U=0;U<B;U++){const K=Math.floor(U/B*$.length);F.push(Math.max(.04,($[K]??0)/255))}x(F),f.current=requestAnimationFrame(P)};P()},t[1]=h):h=t[1];const p=h;let y;t[2]!==e?(y=async()=>{if(c.current||i.current)return e;c.current=!0;const E=window.SpeechRecognition||window.webkitSpeechRecognition;if(!E)return c.current=!1,o("unsupported"),"unsupported";let D;try{D=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return c.current=!1,o("permission-denied"),"permission-denied"}c.current=!1,s(""),n(""),m.current="",v.current="",i.current=!0,o("recording"),p(D);const I=new E;b.current=I,I.interimResults=!0,I.continuous=!0,I.lang=navigator.language||"en-US",I.onresult=w=>{if(b.current!==I)return;let $="",P="";for(let F=w.resultIndex;F<w.results.length;F++){const U=w.results[F],K=U?.[0]?.transcript??"";U?.isFinal?P=P+K:$=$+K}P&&(v.current=v.current+P,s(v.current)),m.current=$,n($)},I.onerror=w=>{b.current===I&&w.error!=="no-speech"&&(i.current=!1,b.current=null,T(),o(w.error==="not-allowed"?"permission-denied":"idle"))},I.onend=()=>{if(b.current===I&&i.current)try{I.start()}catch{}};try{I.start()}catch{return i.current=!1,b.current=null,T(),o("idle"),"idle"}return"recording"},t[2]=e,t[3]=y):y=t[3];const R=y;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{i.current=!1,b.current?.stop(),T(),o("idle"),x(Array(B).fill(.05)),n("");const E=(v.current+(m.current?" "+m.current:"")).trim();return s(""),v.current="",m.current="",E},t[4]=d):d=t[4];const C=d;let _;t[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current=!1,b.current?.abort(),T(),o("idle"),s(""),n(""),x(Array(B).fill(.05)),v.current="",m.current=""},t[5]=_):_=t[5];const z=_;let A;return t[6]!==a||t[7]!==R||t[8]!==e||t[9]!==S||t[10]!==u?(A={status:e,transcript:S,interimTranscript:a,waveformData:u,isSupported:k,startRecording:R,stopRecording:C,cancelRecording:z},t[6]=a,t[7]=R,t[8]=e,t[9]=S,t[10]=u,t[11]=A):A=t[11],A}function He(t){return t.stop()}function Qe(){}function Ge(){return Array(B).fill(.05)}export{ht as T,pt as a,Pe as s,mt as u};
1
+ import{c as L,b as V,r as N,j as r,m as q,B as Z,aY as ee}from"./index-CzblxJEL.js";import{a as te,d as re,r as se,p as ne}from"./session-runtime-CW0B7dQ4.js";import{u as Y,i as oe,d as le,j as ie,k as ce,m as ae}from"./chat-context-f2uXEUUc.js";import{b as ue}from"./repository-binding-FQa6l_GE.js";import{a as H,b as Q,P as G}from"./popover-CzimP1Be.js";import{d as de,b as fe,a as me,D as he}from"./drawer-Db2wwGe6.js";import{T as pe,a as xe,c as ge}from"./tooltip-DUeLgX2y.js";import{u as ve}from"./use-mobile-BSIfiGG_.js";import{g as ye,aa as Se}from"./agent-icon-oLNgcKY7.js";import{t as be}from"./ChevronDown-6CklIa96.js";import{a as je}from"./UserCheck01-CjStPV_Z.js";import{t as Te}from"./Tool01-DyTDmh4r.js";import{d as Re}from"./use-organization-settings-DHvhF-b0.js";import{u as J,c as Me,d as ke}from"./use-ai-providers-BIHg8onN.js";import{M as Ce,a as Ie}from"./index-DkUdNexJ.js";import{d as we,e as Ne,b as _e}from"./use-entitlements-DqwhSiMR.js";function mt(t){const e=L.c(14),o=ue(t),S=Y(),s=o?.metadata,a=S?.activeTask,n=a?.metadata?.runtime;let u;e[0]!==n?(u=ne(n),e[0]=n,e[1]=u):u=e[1];const x=u,b=!!a&&!a.partial,l=a?.metadata;let j;e[2]!==s||e[3]!==l?(j=te(l,s),e[2]=s,e[3]=l,e[4]=j):j=e[4];const g=!!x||b&&!!o;let f;e[5]!==s?(f=re(s),e[5]=s,e[6]=f):f=e[6];let i;e[7]!==s?(i=se(s),e[7]=s,e[8]=i):i=e[8];let v;return e[9]!==j||e[10]!==g||e[11]!==f||e[12]!==i?(v={runtime:j,resolved:g,projectDefault:f,previewServerUrl:i},e[9]=j,e[10]=g,e[11]=f,e[12]=i,e[13]=v):v=e[13],v}function Pe(t){return["openai-compatible","openrouter","deco"].includes(t)}function De(t,e){return Pe(t)&&$e(e)!==null}function $e(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const Ee={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Fe(t,e){return Ee[t]?.test(e)??!1}function Ae(t){return Me(t)&&Fe(t.providerId,t.modelId)}function ze(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const Le={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function Ue(t){const e=L.c(32),{tier:o,orgSlot:S,userSlot:s,autoSlot:a,filterModels:n,onPick:u,onReset:x,onClose:b}=t,l=V(),j=J(),g=new Set(j.map(Be)),f=oe([s,S,a],g),i=f?.keyId??null,[v,m]=N.useState(i??j[0]?.id??null),c=j.some(P=>P.id===v)?v:i??j[0]?.id??null,k=c?j.find(P=>P.id===c):null,M="flex h-[70vh] max-h-[460px] w-full flex-col",T=Le[o];let h;e[0]!==l||e[1]!==T?(h=l(T),e[0]=l,e[1]=T,e[2]=h):h=e[2];let p;e[3]!==h?(p=r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h}),e[3]=h,e[4]=p):p=e[4];let y;e[5]!==x||e[6]!==l||e[7]!==s?(y=s&&r.jsx("button",{type:"button",onClick:x,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:l("chat.modelPreferences.reset")}),e[5]=x,e[6]=l,e[7]=s,e[8]=y):y=e[8];let R;e[9]!==p||e[10]!==y?(R=r.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[p,y]}),e[9]=p,e[10]=y,e[11]=R):R=e[11];const d="flex-1 min-h-0",C=N.Suspense;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(Ie,{}),e[12]=_):_=e[12];const z=Ce,A=!0,E=ze(i?f:null,k?.providerId??"deco");let D;e[13]!==c||e[14]!==u||e[15]!==m?(D=P=>{const F=P.keyId??c??"";m(F),u({keyId:F,modelId:P.modelId,title:P.title})},e[13]=c,e[14]=u,e[15]=m,e[16]=D):D=e[16];let I;e[17]!==z||e[18]!==c||e[19]!==n||e[20]!==b||e[21]!==m||e[22]!==E||e[23]!==D?(I=r.jsx(z,{compact:A,filterModels:n,onClose:b,credentialId:c,onCredentialChange:m,selectedModel:E,onModelChange:D}),e[17]=z,e[18]=c,e[19]=n,e[20]=b,e[21]=m,e[22]=E,e[23]=D,e[24]=I):I=e[24];let w;e[25]!==C||e[26]!==I||e[27]!==_?(w=r.jsx("div",{className:d,children:r.jsx(C,{fallback:_,children:I})}),e[25]=C,e[26]=I,e[27]=_,e[28]=w):w=e[28];let $;return e[29]!==w||e[30]!==R?($=r.jsxs("div",{className:M,children:[R,w]}),e[29]=w,e[30]=R,e[31]=$):$=e[31],$}function Be(t){return t.id}const Ke=["fast","smart","thinking"];function X(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const O={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function qe(t){const e=L.c(28),{tier:o,pillIcon:S,groups:s}=t,a=V();let n;e[0]!==a?(n=X(a),e[0]=a,e[1]=n):n=e[1];const u=n,[x,b]=N.useState(!1);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=R=>{R.onSelect(),b(!1)},e[2]=l):l=e[2];const j=l,g=u[o];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=q("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[480px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=q("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[480px]/chat-bottom:max-w-24 @[480px]/chat-bottom:opacity-100"),e[4]=i):i=e[4];const v=u[o];let m;e[5]!==v?(m=r.jsx("span",{className:i,children:v}),e[5]=v,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(be,{size:12,className:"opacity-60 hidden @[480px]/chat-bottom:inline-block"}),e[7]=c):c=e[7];let k;e[8]!==S||e[9]!==g||e[10]!==m?(k=r.jsx(pe,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(H,{asChild:!0,children:r.jsxs(Z,{type:"button",variant:"ghost",size:"default","aria-label":g,className:f,children:[S,m,c]})})})}),e[8]=S,e[9]=g,e[10]=m,e[11]=k):k=e[11];let M;e[12]!==g?(M=r.jsx(xe,{children:g}),e[12]=g,e[13]=M):M=e[13];let T;e[14]!==k||e[15]!==M?(T=r.jsxs(ge,{children:[k,M]}),e[14]=k,e[15]=M,e[16]=T):T=e[16];let h;if(e[17]!==s||e[18]!==a){let R;e[20]!==a?(R=d=>r.jsx("div",{className:"flex flex-col",children:d.rows.map(C=>r.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-accent",children:[r.jsxs("button",{type:"button",role:"menuitem","aria-label":C.title,onClick:()=>j(C),className:q("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",C.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[C.icon&&r.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:C.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",children:C.title}),C.subtitle&&r.jsx("div",{className:"text-xs text-muted-foreground",children:C.subtitle})]}),C.active&&r.jsx("span",{title:a("chat.tierTrigger.selected"),children:r.jsx(ee,{size:14,className:"text-foreground mt-0.5"})})]}),C.modelOverride&&r.jsx(Oe,{label:C.title,render:C.modelOverride})]},C.key))},d.key),e[20]=a,e[21]=R):R=e[21],h=s.map(R),e[17]=s,e[18]=a,e[19]=h}else h=e[19];let p;e[22]!==h?(p=r.jsx(Q,{align:"end",className:"p-1 w-64",onOpenAutoFocus:Ve,children:r.jsx("div",{role:"menu",className:"flex flex-col",children:h})}),e[22]=h,e[23]=p):p=e[23];let y;return e[24]!==x||e[25]!==T||e[26]!==p?(y=r.jsxs(G,{open:x,onOpenChange:b,children:[T,p]}),e[24]=x,e[25]=T,e[26]=p,e[27]=y):y=e[27],y}function Ve(t){return t.preventDefault()}function Oe(t){const e=L.c(38),{label:o,render:S}=t,s=V(),a=ve(),[n,u]=N.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),e[0]=x):x=e[0];const b=x;let l;e[1]!==o||e[2]!==s?(l=s("chat.modelPreferences.customizeModel",{tier:o}),e[1]=o,e[2]=s,e[3]=l):l=e[3];const j=n&&"opacity-100";let g;e[4]!==j?(g=q("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background shadow-edge","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",j),e[4]=j,e[5]=g):g=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(je,{size:14}),e[6]=f):f=e[6];let i;e[7]!==l||e[8]!==g?(i=r.jsx("button",{type:"button","aria-label":l,className:g,children:f}),e[7]=l,e[8]=g,e[9]=i):i=e[9];const v=i;if(a){let T;e[10]!==v?(T=r.jsx(de,{asChild:!0,children:v}),e[10]=v,e[11]=T):T=e[11];let h;e[12]!==o||e[13]!==s?(h=s("chat.modelPreferences.customizeModel",{tier:o}),e[12]=o,e[13]=s,e[14]=h):h=e[14];let p;e[15]!==h?(p=r.jsx(fe,{className:"sr-only",children:h}),e[15]=h,e[16]=p):p=e[16];let y;e[17]!==n||e[18]!==S?(y=n&&S(b),e[17]=n,e[18]=S,e[19]=y):y=e[19];let R;e[20]!==y||e[21]!==p?(R=r.jsxs(me,{className:"p-0 flex flex-col max-h-[95vh]",children:[p,y]}),e[20]=y,e[21]=p,e[22]=R):R=e[22];let d;return e[23]!==n||e[24]!==R||e[25]!==T?(d=r.jsxs(he,{open:n,onOpenChange:u,children:[T,R]}),e[23]=n,e[24]=R,e[25]=T,e[26]=d):d=e[26],d}let m;e[27]!==v?(m=r.jsx(H,{asChild:!0,children:v}),e[27]=v,e[28]=m):m=e[28];let c;e[29]!==n||e[30]!==S?(c=n&&S(b),e[29]=n,e[30]=S,e[31]=c):c=e[31];let k;e[32]!==c?(k=r.jsx(Q,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:c}),e[32]=c,e[33]=k):k=e[33];let M;return e[34]!==n||e[35]!==m||e[36]!==k?(M=r.jsxs(G,{open:n,onOpenChange:u,children:[m,k]}),e[34]=n,e[35]=m,e[36]=k,e[37]=M):M=e[37],M}function W(t){return t==="fast"?r.jsx(ye,{size:16}):t==="thinking"?r.jsx(Se,{size:16}):r.jsx(Te,{size:16})}function We(t){const e=L.c(13),o=ae();let S;e[0]!==t||e[1]!==o.tiers?(S=b=>{const l=o.tiers[b];return l?l.title??l.modelId:t.chat[b]?.title},e[0]=t,e[1]=o.tiers,e[2]=S):S=e[2];const s=S;let a;e[3]!==s?(a=s("fast"),e[3]=s,e[4]=a):a=e[4];let n;e[5]!==s?(n=s("smart"),e[5]=s,e[6]=n):n=e[6];let u;e[7]!==s?(u=s("thinking"),e[7]=s,e[8]=u):u=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==u?(x={fast:a,smart:n,thinking:u},e[9]=a,e[10]=n,e[11]=u,e[12]=x):x=e[12],x}function ht(){const t=L.c(25),e=V(),{simpleModeTier:o,setSimpleModeTier:S}=le(),s=Re(),a=J(),n=ke(a),u=We(n),{data:x,error:b}=ie();let l;t[0]!==x?(l=x===void 0?{tiers:{}}:x,t[0]=x,t[1]=l):l=t[1];const j=l,g=ce(),f=Y()?.lockedHarness,i=f==="claude-code",v=we("model_choice"),m=Ne(),c=_e();if(!m||!v)return null;let k,M;if(t[2]!==n||t[3]!==c||t[4]!==i||t[5]!==f||t[6]!==s||t[7]!==S||t[8]!==e||t[9]!==o||t[10]!==u||t[11]!==g||t[12]!==j||t[13]!==b){const R=X(e);k="decopilot",M=Ke.map(d=>{const C=u[d],_=j.tiers[d];return{key:`decopilot-${d}`,icon:W(d),title:R[d],subtitle:c?C??e(O[d]):e(O[d]),active:o===d,onSelect:()=>S(d),modelOverride:c?z=>r.jsxs(r.Fragment,{children:[b&&r.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),r.jsx(Ue,{tier:d,orgSlot:s.tiers[d],userSlot:_,autoSlot:n.chat[d],filterModels:f==="codex"?Ye:i?Ae:void 0,onClose:z,onPick:A=>g.mutate({tier:d,slot:A}),onReset:()=>g.mutate({tier:d,slot:null})},`${d}:${_?.keyId??"org"}:${_?.modelId??""}`)]}):void 0}}),t[2]=n,t[3]=c,t[4]=i,t[5]=f,t[6]=s,t[7]=S,t[8]=e,t[9]=o,t[10]=u,t[11]=g,t[12]=j,t[13]=b,t[14]=k,t[15]=M}else k=t[14],M=t[15];let T;t[16]!==k||t[17]!==M?(T=[{key:k,rows:M}],t[16]=k,t[17]=M,t[18]=T):T=t[18];const h=T;let p;t[19]!==o?(p=W(o),t[19]=o,t[20]=p):p=t[20];let y;return t[21]!==h||t[22]!==p||t[23]!==o?(y=r.jsx(qe,{tier:o,pillIcon:p,groups:h}),t[21]=h,t[22]=p,t[23]=o,t[24]=y):y=t[24],y}function Ye(t){return De(t.providerId,t.modelId)}const B=48;function pt(){const t=L.c(12),[e,o]=N.useState("idle"),[S,s]=N.useState(""),[a,n]=N.useState(""),[u,x]=N.useState(Ge),b=N.useRef(null),l=N.useRef(null),j=N.useRef(null),g=N.useRef(null),f=N.useRef(0),i=N.useRef(!1),v=N.useRef(""),m=N.useRef(""),c=N.useRef(!1),k=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),l.current?.close().catch(Qe),g.current?.getTracks().forEach(He),j.current=null,l.current=null,g.current=null},t[0]=M):M=t[0];const T=M;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=E=>{g.current=E;const D=new AudioContext;l.current=D;const I=D.createMediaStreamSource(E),w=D.createAnalyser();w.fftSize=128,w.smoothingTimeConstant=.8,I.connect(w),j.current=w;const $=new Uint8Array(w.frequencyBinCount),P=()=>{if(!j.current)return;j.current.getByteFrequencyData($);const F=[];for(let U=0;U<B;U++){const K=Math.floor(U/B*$.length);F.push(Math.max(.04,($[K]??0)/255))}x(F),f.current=requestAnimationFrame(P)};P()},t[1]=h):h=t[1];const p=h;let y;t[2]!==e?(y=async()=>{if(c.current||i.current)return e;c.current=!0;const E=window.SpeechRecognition||window.webkitSpeechRecognition;if(!E)return c.current=!1,o("unsupported"),"unsupported";let D;try{D=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return c.current=!1,o("permission-denied"),"permission-denied"}c.current=!1,s(""),n(""),m.current="",v.current="",i.current=!0,o("recording"),p(D);const I=new E;b.current=I,I.interimResults=!0,I.continuous=!0,I.lang=navigator.language||"en-US",I.onresult=w=>{if(b.current!==I)return;let $="",P="";for(let F=w.resultIndex;F<w.results.length;F++){const U=w.results[F],K=U?.[0]?.transcript??"";U?.isFinal?P=P+K:$=$+K}P&&(v.current=v.current+P,s(v.current)),m.current=$,n($)},I.onerror=w=>{b.current===I&&w.error!=="no-speech"&&(i.current=!1,b.current=null,T(),o(w.error==="not-allowed"?"permission-denied":"idle"))},I.onend=()=>{if(b.current===I&&i.current)try{I.start()}catch{}};try{I.start()}catch{return i.current=!1,b.current=null,T(),o("idle"),"idle"}return"recording"},t[2]=e,t[3]=y):y=t[3];const R=y;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{i.current=!1,b.current?.stop(),T(),o("idle"),x(Array(B).fill(.05)),n("");const E=(v.current+(m.current?" "+m.current:"")).trim();return s(""),v.current="",m.current="",E},t[4]=d):d=t[4];const C=d;let _;t[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current=!1,b.current?.abort(),T(),o("idle"),s(""),n(""),x(Array(B).fill(.05)),v.current="",m.current=""},t[5]=_):_=t[5];const z=_;let A;return t[6]!==a||t[7]!==R||t[8]!==e||t[9]!==S||t[10]!==u?(A={status:e,transcript:S,interimTranscript:a,waveformData:u,isSupported:k,startRecording:R,stopRecording:C,cancelRecording:z},t[6]=a,t[7]=R,t[8]=e,t[9]=S,t[10]=u,t[11]=A):A=t[11],A}function He(t){return t.stop()}function Qe(){}function Ge(){return Array(B).fill(.05)}export{ht as T,pt as a,Pe as s,mt as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-CJFiox0m.js";import{e3 as i}from"./index-CzblxJEL.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{ed as Q,ee as y,ef as S,eg as w,e4 as C,q as k,eh as q,ei as x,r as p,ej as M,ek as H,el as L,em as P,en as O,eo as B,ep as A}from"./index-mb-jxjEy.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var j=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#a=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,c=i.some((o,d)=>o!==s[d]),f=u||c,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#a=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#c(t,s)]}#c(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#e,this.#a),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function I({queries:r,...e},s){const t=k(s),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=p.useState(()=>new j(t,u,e)),[f,b,o]=c.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?c.subscribe(y.batchCalls(h)):P,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,e)},[u,e,c]);const m=f.some((h,a)=>O(u[a],h))?f.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{I as u};
1
+ import{ed as Q,ee as y,ef as S,eg as w,e4 as C,q as k,eh as q,ei as x,r as p,ej as M,ek as H,el as L,em as P,en as O,eo as B,ep as A}from"./index-CzblxJEL.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var j=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#a=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,c=i.some((o,d)=>o!==s[d]),f=u||c,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#a=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#c(t,s)]}#c(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#e,this.#a),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function I({queries:r,...e},s){const t=k(s),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=p.useState(()=>new j(t,u,e)),[f,b,o]=c.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?c.subscribe(y.batchCalls(h)):P,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,e)},[u,e,c]);const m=f.some((h,a)=>O(u[a],h))?f.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{I as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./infiniteQueryObserver-CJFiox0m.js";import{e3 as u,eb as n}from"./index-CzblxJEL.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
@@ -1 +1 @@
1
- import{c as V,b as q,r as z,a as O,i as Y,e as $,j as t,n as L,K as J,t as Q,o as W,B as G,p as H}from"./index-mb-jxjEy.js";import{C as X}from"./collection-table-wrapper-BmrrNnjL.js";import{E as D}from"./empty-state-DlNabApi.js";import{S as Z}from"./search-input-D-gp-h4P.js";import{B as I}from"./badge-Di6qp_17.js";import{u as ee}from"./use-debounced-value-CAOKwJaL.js";import{a as K}from"./admin-fetch-BhTJlAsX.js";import"./table-Cy5fo0ER.js";import"./ArrowUp-C9hRfWJJ.js";import"./SearchMd-CrM5HGUz.js";function pe(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const i=ee(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==i?(n=J.deploymentAdminUsers(i),e[2]=i,e[3]=n):n=e[3];let l;e[4]!==i?(l=()=>{const a=new URLSearchParams({limit:"100"});return i&&a.set("searchValue",i),K(`/api/_admin/users?${a}`)},e[4]=i,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=te,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:a=>{Q.error(a instanceof Error?a.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=a=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(W,{url:a.image??void 0,fallback:a.name??"?",shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:a.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:a.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=a=>a.emailVerified?t.jsx(I,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(I,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:se,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:a=>t.jsx(G,{variant:"outline",size:"sm",disabled:a.id===k||E.isPending,onClick:()=>E.mutate(a.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(Z,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==i||e[47]!==A||e[48]!==s?(S=A?t.jsx(D,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(D,{title:s("admin.users.noUsersFoundTitle"),description:i?s("admin.users.noUsersMatchSearch",{search:i}):s("admin.users.noUsersYet")}),e[46]=i,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(X,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function se(e){return t.jsx("span",{className:"text-sm text-foreground",children:H(e.createdAt)})}function te(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{pe as default};
1
+ import{c as V,b as q,r as z,a as O,i as Y,e as $,j as t,n as L,K as J,t as Q,o as W,B as G,p as H}from"./index-CzblxJEL.js";import{C as X}from"./collection-table-wrapper-YEUaCnF0.js";import{E as D}from"./empty-state-1KFy8I29.js";import{S as Z}from"./search-input-B_Oe2BEE.js";import{B as I}from"./badge-CCYOd7Np.js";import{u as ee}from"./use-debounced-value-BSKJG7sB.js";import{a as K}from"./admin-fetch-BhTJlAsX.js";import"./table-BcDxqdaD.js";import"./ArrowUp-D3VIHJdp.js";import"./SearchMd-BehVsu6K.js";function pe(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const i=ee(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==i?(n=J.deploymentAdminUsers(i),e[2]=i,e[3]=n):n=e[3];let l;e[4]!==i?(l=()=>{const a=new URLSearchParams({limit:"100"});return i&&a.set("searchValue",i),K(`/api/_admin/users?${a}`)},e[4]=i,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=te,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:a=>{Q.error(a instanceof Error?a.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=a=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(W,{url:a.image??void 0,fallback:a.name??"?",shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:a.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:a.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=a=>a.emailVerified?t.jsx(I,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(I,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:se,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:a=>t.jsx(G,{variant:"outline",size:"sm",disabled:a.id===k||E.isPending,onClick:()=>E.mutate(a.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(Z,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==i||e[47]!==A||e[48]!==s?(S=A?t.jsx(D,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(D,{title:s("admin.users.noUsersFoundTitle"),description:i?s("admin.users.noUsersMatchSearch",{search:i}):s("admin.users.noUsersYet")}),e[46]=i,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(X,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function se(e){return t.jsx("span",{className:"text-sm text-foreground",children:H(e.createdAt)})}function te(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{pe as default};
@@ -1,4 +1,4 @@
1
- import{ar as W,as as E}from"./agent-icon-zvo6Zsex.js";import{i as w}from"./File02-BmbcQ1JX.js";import{a as j}from"./Image01-nL5rafgN.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function v(e){return`.deco/blocks/${P(e)}.json`}const z=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function D(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function _(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function M(e,t){return t==="directory"?e:$(e)}function S(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function H(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function q(e,t){return B(e)>=F&&!t.has(e)}function U(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function A(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function X(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function K(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:w,color:"#64748b"}:{Icon:w,color:T}}function V(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function J(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,k=s(l);let p=k.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),k.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function Q(e){const t=[];for(const n of e.split(`
1
+ import{ar as W,as as E}from"./agent-icon-oLNgcKY7.js";import{i as w}from"./File02-qGTfNAw0.js";import{a as j}from"./Image01-Ro_mBr5Q.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function v(e){return`.deco/blocks/${P(e)}.json`}const z=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function D(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function _(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function M(e,t){return t==="directory"?e:$(e)}function S(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function H(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function q(e,t){return B(e)>=F&&!t.has(e)}function U(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function A(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function X(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function K(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:w,color:"#64748b"}:{Icon:w,color:T}}function V(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function J(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,k=s(l);let p=k.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),k.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function Q(e){const t=[];for(const n of e.split(`
2
2
  `)){if(!n)continue;const r=n.indexOf(":");if(r<0)continue;const s=n.indexOf(":",r+1);if(s<0)continue;const o=Number.parseInt(n.slice(r+1,s),10);Number.isFinite(o)&&t.push({path:h(n.slice(0,r)),line:o,text:n.slice(s+1)})}return t}function Y(e,t,n){const r=t.trim().toLowerCase();if(!r)return[];const s=[];for(const o of e)if((o.split("/").pop()??o).toLowerCase().includes(r)&&(s.push(h(o)),s.length>=n))break;return s}const b=24;function Z(e,t){const n=e.replace(/^\s+/,""),r=t.trim().toLowerCase();if(!r)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const s=n.toLowerCase().indexOf(r);if(s<0)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const o=s>b,u=o?n.slice(s-b):n,a=u.toLowerCase(),i=[];let c=0;for(;;){const l=a.indexOf(r,c);if(l<0){c<u.length&&i.push({text:u.slice(c),match:!1});break}l>c&&i.push({text:u.slice(c,l),match:!1}),i.push({text:u.slice(l,l+r.length),match:!0}),c=l+r.length}return{leadingEllipsis:o,segments:i}}function tt(e){const t=[],n=new Map;for(const r of e){let s=n.get(r.path);s||(s={path:r.path,matches:[]},n.set(r.path,s),t.push(s)),s.matches.push(r)}return t}function et(e){return e.split(`
3
3
  `).map(t=>t.replace(/^\d+\t/,"")).join(`
4
4
  `)}export{F as E,C as a,L as b,z as c,v as d,J as e,N as f,X as g,tt as h,D as i,M as j,h as k,K as l,$ as m,V as n,Z as o,q as p,_ as q,U as r,et as s,x as t,Y as u,S as v,Q as w,A as x,H as y};
@@ -1 +1 @@
1
- import{c as K,b as X,r as Z,j as r,m as ne,B as ee,au as ue}from"./index-mb-jxjEy.js";import{j as xe}from"./agent-icon-zvo6Zsex.js";import{b as ge,n as le}from"./UserCheck01-CuByTN5F.js";import{L as be}from"./label-DFYaZzfV.js";import{S as ce}from"./scroll-area-D9mVov2B.js";import{S as ve}from"./switch--3C-A5oU.js";import{T as ye,c as je,a as Te}from"./tooltip-DCzbfwd7.js";import{a as se,T as Ne}from"./toggle-group-jkikwCcL.js";import{M as de,b as me,c as _e,s as ke,p as Ee,a as U,W as Se}from"./date-utils-CrvIKg-s.js";import"./AlertCircle-CngNmW3n.js";import"./Tool01-9Nk8XcOI.js";import"./ArrowUp-C9hRfWJJ.js";import"./ArrowLeft-7wIIyF4Y.js";import"./ArrowRight-Dyuh-rXZ.js";import"./BookOpen01-Bov9QL4X.js";import"./Globe04-_51WnfFJ.js";import"./CheckCircle-C0mDI2jO.js";import"./TrendUp01-D-BYwryf.js";import"./ChevronDown-Cz82ih9S.js";import"./ChevronSelectorVertical-B_wf9OPd.js";import"./ChevronUp-CLsy4_cr.js";import"./UserSquare-T90Jaoc-.js";import"./LinkBroken01-BPaKcMJ1.js";import"./CreditCard01-C7XdJQOf.js";import"./File02-BmbcQ1JX.js";import"./MessageCircle01-DEwhGd-N.js";import"./SwitchHorizontal01-HaaMuIs0.js";import"./Eye-BoMcImel.js";import"./Fingerprint04-CeWGcIpe.js";import"./Image01-nL5rafgN.js";import"./Key01-DPEcpDw6.js";import"./LayoutLeft-DFrTynS3.js";import"./Minus-CZtTY14n.js";import"./Monitor01-Dzk9r8YI.js";import"./Sun-BUSaNVU-.js";import"./Play-BNkIfSsq.js";import"./Plus-WQeLSh07.js";import"./SearchMd-CrM5HGUz.js";import"./ShoppingBag01-Dvi8noNw.js";import"./Trash01-By8obgKt.js";import"./Upload01-BPnZnmHF.js";import"./Users01-D1-vaLa3.js";import"./XClose-Bomoew3H.js";import"./Zap-lo-lOcPp.js";import"./index-BdQq_4o_.js";import"./index-B8ZkvDME.js";import"./active-indicator-CCMhAsc_.js";const we=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),Ce=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Me=new Date(-864e13),Ae=new Date(864e13),$e=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Le=/\/flags\/multivariate\.ts$/;function Re(t){let e=t;e.startsWith("pages-")&&(e=e.slice(6).replace(/-\d+$/,""));try{e=decodeURIComponent(e)}catch{}return e}function De(t){if(!t||typeof t!="object")return null;const{start:e,end:n}=t,s=typeof e=="string",o=typeof n=="string";if(!s&&!o)return null;const a=s?new Date(e):Me,i=o?new Date(n):Ae;return Number.isNaN(a.getTime())||Number.isNaN(i.getTime())||s&&o&&i.getTime()<=a.getTime()?null:{start:a,end:i,openStart:!s,openEnd:!o}}function fe(t,e){if(!t||typeof t!="object")return;const n=t.__resolveType;if(typeof n=="string"){if(we.has(n)){const s=De(t);s&&e.push(s);return}if(Ce.has(n)){const s=t.matchers;if(Array.isArray(s))for(const o of s)fe(o,e)}}}function Oe(t){if(!t||typeof t!="object")return!1;const e=t.__resolveType;if(typeof e!="string"||!$e.test(e))return!1;const n=t.variants;return Array.isArray(n)}function Pe(t){if(typeof t=="string"){const c=t.trim();if(c.length===0)return null;try{const d=new URL(c).pathname.split("/").filter(Boolean),m=d[d.length-1];if(m)return decodeURIComponent(m)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!t||typeof t!="object")return null;const e=t,n=e.config,o=e.desktop?.media,a=[e.title,e.name,e.label,e.alt,n?.title,n?.name,n?.typeAlert?.message,o?.alt,Array.isArray(e.matcher)?e.matcher[0]:void 0];for(const c of a)if(typeof c=="string"&&c.trim().length>0)return c.trim();const i=e.__resolveType;if(typeof i=="string"){const l=(i.split("/").pop()??i).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Ie(t){const e=[];for(let n=0;n<t.length;n++){const s=t[n];typeof s=="number"?e.length>0?e[e.length-1]+=`[${s}]`:e.push(`[${s}]`):e.push(s)}return e.join(" · ")}function Q(t,e,n,s,o){if(Oe(t)){const a=t.variants,i=t.__resolveType,c=Le.test(i)?"":Ie(s);a.forEach((l,d)=>{if(!l||typeof l!="object")return;const m=l,u=[];if(fe(m.rule,u),u.length===0)return;const g=Pe(m.value)??(c||n);for(const h of u)o.push({blockKey:e,blockLabel:n,innerPath:c,variantIndex:d,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:g,flagResolveType:i})});for(let l=0;l<a.length;l++){const d=a[l];d&&typeof d=="object"&&Q(d.value,e,n,[...s,"variants",l,"value"],o)}return}if(Array.isArray(t)){for(let a=0;a<t.length;a++)Q(t[a],e,n,[...s,a],o);return}if(t&&typeof t=="object")for(const[a,i]of Object.entries(t))a!=="__resolveType"&&Q(i,e,n,[...s,a],o)}function Ve(t){if(!t)return[];const e=[];for(const[n,s]of Object.entries(t))Q(s,n,Re(n),[],e);return e.sort((n,s)=>n.start.getTime()-s.start.getTime())}function He(t){const e=[...new Set(t)].sort(),n=new Map;return e.forEach((s,o)=>{const a=o*137.508%360;n.set(s,{bg:`oklch(0.62 0.14 ${a})`,text:"white",border:`oklch(0.50 0.14 ${a})`})}),n}const Be={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function pe(t,e){return t.get(e)??Be}const re=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Fe(t,e){const n=t.openStart?e("sandbox.variantCalendar.always"):re.format(t.start),s=t.openEnd?e("sandbox.variantCalendar.ongoing"):re.format(t.end);return`${n} → ${s}`}function We(t){const e=K.c(18),{variant:n}=t,s=X();let o;e[0]!==n.blockLabel?(o=r.jsx("div",{className:"font-semibold",children:n.blockLabel}),e[0]=n.blockLabel,e[1]=o):o=e[1];let a;e[2]!==n.innerPath?(a=n.innerPath&&r.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),e[2]=n.innerPath,e[3]=a):a=e[3];let i;e[4]!==n.blockLabel||e[5]!==n.innerPath||e[6]!==n.label?(i=n.label!==n.blockLabel&&n.label!==n.innerPath&&r.jsx("div",{className:"text-muted-foreground",children:n.label}),e[4]=n.blockLabel,e[5]=n.innerPath,e[6]=n.label,e[7]=i):i=e[7];let c;e[8]!==s||e[9]!==n?(c=Fe(n,s),e[8]=s,e[9]=n,e[10]=c):c=e[10];let l;e[11]!==c?(l=r.jsx("div",{className:"mt-1",children:c}),e[11]=c,e[12]=l):l=e[12];let d;return e[13]!==o||e[14]!==a||e[15]!==i||e[16]!==l?(d=r.jsx(Te,{children:r.jsxs("div",{className:"text-xs",children:[o,a,i,l]})}),e[13]=o,e[14]=a,e[15]=i,e[16]=l,e[17]=d):d=e[17],d}const ae=16;function ze(t,e){const n=t?"transparent":"#000 0",s=e?"transparent":"#000 100%";if(!(!t&&!e))return`linear-gradient(to right, ${n}, #000 ${ae}px, #000 calc(100% - ${ae}px), ${s})`}function he(t){const e=K.c(26),{variant:n,color:s,style:o,children:a,fadeStart:i,fadeEnd:c}=t,l=i===void 0?!1:i,d=c===void 0?!1:c;let m;e[0]!==d||e[1]!==l?(m=ze(l,d),e[0]=d,e[1]=l,e[2]=m):m=e[2];const u=m;let p;e[3]!==l?(p=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},e[3]=l,e[4]=p):p=e[4];let g;e[5]!==d?(g=d&&{borderTopRightRadius:0,borderBottomRightRadius:0},e[5]=d,e[6]=g):g=e[6];let h;e[7]!==u?(h=u&&{maskImage:u,WebkitMaskImage:u},e[7]=u,e[8]=h):h=e[8];let x;e[9]!==s.bg||e[10]!==s.text||e[11]!==o||e[12]!==p||e[13]!==g||e[14]!==h?(x={background:s.bg,color:s.text,borderRadius:4,...p,...g,...h,...o},e[9]=s.bg,e[10]=s.text,e[11]=o,e[12]=p,e[13]=g,e[14]=h,e[15]=x):x=e[15];let b;e[16]!==a?(b=r.jsx("span",{className:"truncate",children:a}),e[16]=a,e[17]=b):b=e[17];let S;e[18]!==x||e[19]!==b?(S=r.jsx(ye,{asChild:!0,children:r.jsx("div",{className:"absolute flex items-center px-2 text-2xs font-medium truncate cursor-default",style:x,children:b})}),e[18]=x,e[19]=b,e[20]=S):S=e[20];let T;e[21]!==n?(T=r.jsx(We,{variant:n}),e[21]=n,e[22]=T):T=e[22];let f;return e[23]!==T||e[24]!==S?(f=r.jsxs(je,{children:[S,T]}),e[23]=T,e[24]=S,e[25]=f):f=e[25],f}function Xt(t){const e=K.c(71),{decofile:n}=t,s=X(),[o,a]=Z.useState("calendar"),[i,c]=Z.useState(Ye),[l,d]=Z.useState(!1);let m,u,p;if(e[0]!==n||e[1]!==l){const M=Ve(n);m=M.filter(Ke).length,p=l?M:M.filter(Ue),u=He(p.map(Ge)),e[0]=n,e[1]=l,e[2]=m,e[3]=u,e[4]=p}else m=e[2],u=e[3],p=e[4];const g=u;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(me(new Date)),e[5]=h):h=e[5];const x=h;let b;e[6]!==o?(b=()=>c(M=>o==="calendar"?U(M,-1):U(M,-3)),e[6]=o,e[7]=b):b=e[7];const S=b;let T;e[8]!==o?(T=()=>c(M=>o==="calendar"?U(M,1):U(M,3)),e[8]=o,e[9]=T):T=e[9];const f=T;let v;e[10]!==s?(v=s("sandbox.variantCalendar.today"),e[10]=s,e[11]=v):v=e[11];let y;e[12]!==v?(y=r.jsx(ee,{variant:"outline",size:"sm",onClick:x,children:v}),e[12]=v,e[13]=y):y=e[13];let N;e[14]!==s?(N=s("sandbox.variantCalendar.previous"),e[14]=s,e[15]=N):N=e[15];let $;e[16]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(ge,{size:16}),e[16]=$):$=e[16];let _;e[17]!==S||e[18]!==N?(_=r.jsx(ee,{variant:"ghost",size:"icon",onClick:S,"aria-label":N,children:$}),e[17]=S,e[18]=N,e[19]=_):_=e[19];let k;e[20]!==s?(k=s("sandbox.variantCalendar.next"),e[20]=s,e[21]=k):k=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(ue,{size:16}),e[22]=C):C=e[22];let L;e[23]!==f||e[24]!==k?(L=r.jsx(ee,{variant:"ghost",size:"icon",onClick:f,"aria-label":k,children:C}),e[23]=f,e[24]=k,e[25]=L):L=e[25];const R=de[i.getMonth()];let A;e[26]!==i?(A=i.getFullYear(),e[26]=i,e[27]=A):A=e[27];let E;e[28]!==R||e[29]!==A?(E=r.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",A]}),e[28]=R,e[29]=A,e[30]=E):E=e[30];let j;e[31]!==L||e[32]!==E||e[33]!==y||e[34]!==_?(j=r.jsxs("div",{className:"flex items-center gap-2",children:[y,_,L,E]}),e[31]=L,e[32]=E,e[33]=y,e[34]=_,e[35]=j):j=e[35];let D;e[36]!==m||e[37]!==l||e[38]!==s?(D=m>0&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ve,{id:"show-ongoing",checked:l,onCheckedChange:d}),r.jsx(be,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:s("sandbox.variantCalendar.showOngoing",{count:m})})]}),e[36]=m,e[37]=l,e[38]=s,e[39]=D):D=e[39];let H;e[40]===Symbol.for("react.memo_cache_sentinel")?(H=M=>{(M==="calendar"||M==="timeline")&&a(M)},e[40]=H):H=e[40];let F;e[41]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(le,{}),e[41]=F):F=e[41];let w;e[42]!==s?(w=s("sandbox.variantCalendar.calendarMode"),e[42]=s,e[43]=w):w=e[43];let I;e[44]!==w?(I=r.jsxs(se,{value:"calendar",children:[F,w]}),e[44]=w,e[45]=I):I=e[45];let B;e[46]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(xe,{}),e[46]=B):B=e[46];let O;e[47]!==s?(O=s("sandbox.variantCalendar.timelineMode"),e[47]=s,e[48]=O):O=e[48];let P;e[49]!==O?(P=r.jsxs(se,{value:"timeline",children:[B,O]}),e[49]=O,e[50]=P):P=e[50];let V;e[51]!==I||e[52]!==P||e[53]!==o?(V=r.jsxs(Ne,{type:"single",variant:"segmented",size:"sm",value:o,onValueChange:H,children:[I,P]}),e[51]=I,e[52]=P,e[53]=o,e[54]=V):V=e[54];let W;e[55]!==D||e[56]!==V?(W=r.jsxs("div",{className:"flex items-center gap-4",children:[D,V]}),e[55]=D,e[56]=V,e[57]=W):W=e[57];let z;e[58]!==j||e[59]!==W?(z=r.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,W]}),e[58]=j,e[59]=W,e[60]=z):z=e[60];let G;e[61]!==g||e[62]!==i||e[63]!==m||e[64]!==l||e[65]!==p||e[66]!==o?(G=p.length===0?r.jsx(qe,{hiddenOngoing:l?0:m}):o==="calendar"?r.jsx(Qe,{monthStart:i,variants:p,colorMap:g}):r.jsx(tt,{monthStart:i,variants:p,colorMap:g}),e[61]=g,e[62]=i,e[63]=m,e[64]=l,e[65]=p,e[66]=o,e[67]=G):G=e[67];let q;return e[68]!==z||e[69]!==G?(q=r.jsxs("div",{className:"flex h-full w-full flex-col",children:[z,G]}),e[68]=z,e[69]=G,e[70]=q):q=e[70],q}function Ge(t){return t.blockKey}function Ue(t){return!t.openEnd}function Ke(t){return t.openEnd}function Ye(){return me(new Date)}function qe(t){const e=K.c(4),{hiddenOngoing:n}=t,s=n===void 0?0:n,o=X();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx(le,{size:24,className:"text-muted-foreground/60"}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==o?(i=r.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[a,s>0?r.jsxs(r.Fragment,{children:[r.jsx("div",{children:o("sandbox.variantCalendar.noDatedVariants")}),r.jsx("div",{className:"text-xs text-muted-foreground/80",children:o("sandbox.variantCalendar.hiddenOngoingVariants",{count:s})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{children:o("sandbox.variantCalendar.noScheduledVariants")}),r.jsx("div",{className:"text-xs text-muted-foreground/80",children:o("sandbox.variantCalendar.dateMatcherInfo")})]})]}),e[1]=s,e[2]=o,e[3]=i):i=e[3],i}const te=20,oe=2,ie=28,Je=6;function Qe(t){const e=K.c(17),{monthStart:n,variants:s,colorMap:o}=t;let a,i,c,l,d;if(e[0]!==o||e[1]!==n||e[2]!==s){const p=_e(n),g=ke(new Date);a=ce,d="flex-1 min-h-0",i="min-w-[840px]",e[8]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Se.map(Ze)}),e[8]=c):c=e[8],l=p.map((h,x)=>{const b=Ee(h,s),S=b.reduce(Xe,0),T=ie+S*(te+oe)+8;return r.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((f,v)=>{const y=f.getMonth()===n.getMonth(),N=f.getTime()===g.getTime();return r.jsx("div",{className:ne("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:r.jsx("span",{className:ne("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},v)}),b.map((f,v)=>{const y=pe(o,f.variant.blockKey),N=ie+f.lane*(te+oe),$=f.leftUnits/7*100,_=f.widthUnits/7*100,k=f.variant.openStart&&x===0,C=f.variant.openEnd&&x===p.length-1;return r.jsxs(he,{variant:f.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Je,height:te},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&r.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${x}-${v}`)})]},x)}),e[0]=o,e[1]=n,e[2]=s,e[3]=a,e[4]=i,e[5]=c,e[6]=l,e[7]=d}else a=e[3],i=e[4],c=e[5],l=e[6],d=e[7];let m;e[9]!==i||e[10]!==c||e[11]!==l?(m=r.jsxs("div",{className:i,children:[c,l]}),e[9]=i,e[10]=c,e[11]=l,e[12]=m):m=e[12];let u;return e[13]!==a||e[14]!==d||e[15]!==m?(u=r.jsx(a,{className:d,children:m}),e[13]=a,e[14]=d,e[15]=m,e[16]=u):u=e[16],u}function Xe(t,e){return Math.max(t,e.lane+1)}function Ze(t){return r.jsx("div",{className:"px-2 py-2 text-center",children:t},t)}const J=4,et=32,Y=240;function tt(t){const e=K.c(23),{monthStart:n,variants:s,colorMap:o}=t,a=n,i=U(n,J),c=new Date,l=new Map;for(const E of s){const j=l.get(E.blockKey)??[];j.push(E),l.set(E.blockKey,j)}const d=Array.from(l.entries()).sort(rt),m=i.getTime()-a.getTime(),u=E=>(Math.max(a.getTime(),Math.min(i.getTime(),E.getTime()))-a.getTime())/m*100;let p;e[0]!==a?(p=(E,j)=>U(a,j),e[0]=a,e[1]=p):p=e[1];const g=Array.from({length:J},p),h=c.getTime()>=a.getTime()&&c.getTime()<=i.getTime()?u(c):null,x=X(),b=ce,S="flex-1 min-h-0",T="min-w-[900px] relative";let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f={width:Y},e[2]=f):f=e[2];let v;e[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),e[3]=x,e[4]=v):v=e[4];let y;e[5]!==v?(y=r.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold text-muted-foreground border-r",style:f,children:v}),e[5]=v,e[6]=y):y=e[6];let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},e[7]=N):N=e[7];const $=g.map(st);let _;e[8]!==$?(_=r.jsx("div",{className:"flex-1 grid",style:N,children:$}),e[8]=$,e[9]=_):_=e[9];let k;e[10]!==y||e[11]!==_?(k=r.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),e[10]=y,e[11]=_,e[12]=k):k=e[12];let C;e[13]!==x||e[14]!==h?(C=h!==null&&r.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${h} / 100)`},children:r.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-2xs font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),e[13]=x,e[14]=h,e[15]=C):C=e[15];const L=d.map(E=>{const[j,D]=E,H=pe(o,j),F=D[0]?.blockLabel??j;return r.jsxs("div",{children:[r.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold text-muted-foreground",style:{height:28},children:r.jsx("div",{className:"px-3 truncate",style:{width:Y},children:F})}),D.map((w,I)=>r.jsxs("div",{className:"flex border-b items-center",style:{height:et},children:[r.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[r.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),r.jsx("span",{className:"truncate text-foreground/80",children:w.label})]}),r.jsxs("div",{className:"relative flex-1 h-full",children:[r.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(nt)}),(()=>{const B=Math.max(w.start.getTime(),a.getTime()),O=Math.min(w.end.getTime(),i.getTime());if(O<=B)return null;const P=u(new Date(B)),V=u(new Date(O))-P;return r.jsx(he,{variant:w,color:H,fadeStart:w.openStart,fadeEnd:w.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${V}% - 2px)`,height:22},children:w.label})})()]})]},I))]},j)});let R;e[16]!==k||e[17]!==C||e[18]!==L?(R=r.jsxs("div",{className:T,children:[k,C,L]}),e[16]=k,e[17]=C,e[18]=L,e[19]=R):R=e[19];let A;return e[20]!==b||e[21]!==R?(A=r.jsx(b,{className:S,children:R}),e[20]=b,e[21]=R,e[22]=A):A=e[22],A}function nt(t,e){return r.jsx("div",{className:"border-r last:border-r-0 border-border/40"},e)}function st(t,e){return r.jsxs("div",{className:"px-2 py-2 text-xs text-muted-foreground border-r last:border-r-0",children:[de[t.getMonth()]?.slice(0,3)," ",t.getFullYear()]},e)}function rt(t,e){return t[0].localeCompare(e[0])}export{Xt as VariantCalendar};
1
+ import{c as K,b as X,r as Z,j as r,m as ne,B as ee,au as ue}from"./index-CzblxJEL.js";import{j as xe}from"./agent-icon-oLNgcKY7.js";import{b as ge,n as le}from"./UserCheck01-CjStPV_Z.js";import{L as be}from"./label-8YgWjsAI.js";import{S as ce}from"./scroll-area-D65ihrwn.js";import{S as ve}from"./switch-BeRq2sy_.js";import{T as ye,c as je,a as Te}from"./tooltip-DUeLgX2y.js";import{a as se,T as Ne}from"./toggle-group-A-rZcwpa.js";import{M as de,b as me,c as _e,s as ke,p as Ee,a as U,W as Se}from"./date-utils-CrvIKg-s.js";import"./AlertCircle-B5z_WzKF.js";import"./Tool01-DyTDmh4r.js";import"./ArrowUp-D3VIHJdp.js";import"./ArrowLeft-s4im6VP0.js";import"./ArrowRight-DJNk5-qN.js";import"./BookOpen01-Dl6Fge4h.js";import"./Globe04-MN7UsfuL.js";import"./CheckCircle-iaXkD4Gk.js";import"./TrendUp01-JopPoZCH.js";import"./ChevronDown-6CklIa96.js";import"./ChevronSelectorVertical-Dv5DFfYm.js";import"./ChevronUp-Ct7Ad97m.js";import"./UserSquare-CXqd3Jcd.js";import"./LinkBroken01-CzNPgm5x.js";import"./CreditCard01-CxC8pylQ.js";import"./File02-qGTfNAw0.js";import"./MessageCircle01-DlLXS5Co.js";import"./SwitchHorizontal01-Bgyq2PJ9.js";import"./Eye-CJuJnU0r.js";import"./Fingerprint04-CcZCls-2.js";import"./Image01-Ro_mBr5Q.js";import"./Key01-DS8naBPb.js";import"./LayoutLeft-6A-y0J6k.js";import"./Minus-u0SpxgL3.js";import"./Monitor01-BS4hBPFs.js";import"./Sun-CFqa-sGu.js";import"./Play-WL8i6cug.js";import"./Plus-fTwMfsmc.js";import"./SearchMd-BehVsu6K.js";import"./ShoppingBag01-BGp8Ou9u.js";import"./Trash01-fvESWCt4.js";import"./Upload01-DbVRDr03.js";import"./Users01-BWFocRss.js";import"./XClose-DoeGoRM7.js";import"./Zap-0YPBexhR.js";import"./index-BdQq_4o_.js";import"./index-D9Okg8Od.js";import"./active-indicator-CCMhAsc_.js";const we=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),Ce=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Me=new Date(-864e13),Ae=new Date(864e13),$e=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Le=/\/flags\/multivariate\.ts$/;function Re(t){let e=t;e.startsWith("pages-")&&(e=e.slice(6).replace(/-\d+$/,""));try{e=decodeURIComponent(e)}catch{}return e}function De(t){if(!t||typeof t!="object")return null;const{start:e,end:n}=t,s=typeof e=="string",o=typeof n=="string";if(!s&&!o)return null;const a=s?new Date(e):Me,i=o?new Date(n):Ae;return Number.isNaN(a.getTime())||Number.isNaN(i.getTime())||s&&o&&i.getTime()<=a.getTime()?null:{start:a,end:i,openStart:!s,openEnd:!o}}function fe(t,e){if(!t||typeof t!="object")return;const n=t.__resolveType;if(typeof n=="string"){if(we.has(n)){const s=De(t);s&&e.push(s);return}if(Ce.has(n)){const s=t.matchers;if(Array.isArray(s))for(const o of s)fe(o,e)}}}function Oe(t){if(!t||typeof t!="object")return!1;const e=t.__resolveType;if(typeof e!="string"||!$e.test(e))return!1;const n=t.variants;return Array.isArray(n)}function Pe(t){if(typeof t=="string"){const c=t.trim();if(c.length===0)return null;try{const d=new URL(c).pathname.split("/").filter(Boolean),m=d[d.length-1];if(m)return decodeURIComponent(m)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!t||typeof t!="object")return null;const e=t,n=e.config,o=e.desktop?.media,a=[e.title,e.name,e.label,e.alt,n?.title,n?.name,n?.typeAlert?.message,o?.alt,Array.isArray(e.matcher)?e.matcher[0]:void 0];for(const c of a)if(typeof c=="string"&&c.trim().length>0)return c.trim();const i=e.__resolveType;if(typeof i=="string"){const l=(i.split("/").pop()??i).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Ie(t){const e=[];for(let n=0;n<t.length;n++){const s=t[n];typeof s=="number"?e.length>0?e[e.length-1]+=`[${s}]`:e.push(`[${s}]`):e.push(s)}return e.join(" · ")}function Q(t,e,n,s,o){if(Oe(t)){const a=t.variants,i=t.__resolveType,c=Le.test(i)?"":Ie(s);a.forEach((l,d)=>{if(!l||typeof l!="object")return;const m=l,u=[];if(fe(m.rule,u),u.length===0)return;const g=Pe(m.value)??(c||n);for(const h of u)o.push({blockKey:e,blockLabel:n,innerPath:c,variantIndex:d,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:g,flagResolveType:i})});for(let l=0;l<a.length;l++){const d=a[l];d&&typeof d=="object"&&Q(d.value,e,n,[...s,"variants",l,"value"],o)}return}if(Array.isArray(t)){for(let a=0;a<t.length;a++)Q(t[a],e,n,[...s,a],o);return}if(t&&typeof t=="object")for(const[a,i]of Object.entries(t))a!=="__resolveType"&&Q(i,e,n,[...s,a],o)}function Ve(t){if(!t)return[];const e=[];for(const[n,s]of Object.entries(t))Q(s,n,Re(n),[],e);return e.sort((n,s)=>n.start.getTime()-s.start.getTime())}function He(t){const e=[...new Set(t)].sort(),n=new Map;return e.forEach((s,o)=>{const a=o*137.508%360;n.set(s,{bg:`oklch(0.62 0.14 ${a})`,text:"white",border:`oklch(0.50 0.14 ${a})`})}),n}const Be={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function pe(t,e){return t.get(e)??Be}const re=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Fe(t,e){const n=t.openStart?e("sandbox.variantCalendar.always"):re.format(t.start),s=t.openEnd?e("sandbox.variantCalendar.ongoing"):re.format(t.end);return`${n} → ${s}`}function We(t){const e=K.c(18),{variant:n}=t,s=X();let o;e[0]!==n.blockLabel?(o=r.jsx("div",{className:"font-semibold",children:n.blockLabel}),e[0]=n.blockLabel,e[1]=o):o=e[1];let a;e[2]!==n.innerPath?(a=n.innerPath&&r.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),e[2]=n.innerPath,e[3]=a):a=e[3];let i;e[4]!==n.blockLabel||e[5]!==n.innerPath||e[6]!==n.label?(i=n.label!==n.blockLabel&&n.label!==n.innerPath&&r.jsx("div",{className:"text-muted-foreground",children:n.label}),e[4]=n.blockLabel,e[5]=n.innerPath,e[6]=n.label,e[7]=i):i=e[7];let c;e[8]!==s||e[9]!==n?(c=Fe(n,s),e[8]=s,e[9]=n,e[10]=c):c=e[10];let l;e[11]!==c?(l=r.jsx("div",{className:"mt-1",children:c}),e[11]=c,e[12]=l):l=e[12];let d;return e[13]!==o||e[14]!==a||e[15]!==i||e[16]!==l?(d=r.jsx(Te,{children:r.jsxs("div",{className:"text-xs",children:[o,a,i,l]})}),e[13]=o,e[14]=a,e[15]=i,e[16]=l,e[17]=d):d=e[17],d}const ae=16;function ze(t,e){const n=t?"transparent":"#000 0",s=e?"transparent":"#000 100%";if(!(!t&&!e))return`linear-gradient(to right, ${n}, #000 ${ae}px, #000 calc(100% - ${ae}px), ${s})`}function he(t){const e=K.c(26),{variant:n,color:s,style:o,children:a,fadeStart:i,fadeEnd:c}=t,l=i===void 0?!1:i,d=c===void 0?!1:c;let m;e[0]!==d||e[1]!==l?(m=ze(l,d),e[0]=d,e[1]=l,e[2]=m):m=e[2];const u=m;let p;e[3]!==l?(p=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},e[3]=l,e[4]=p):p=e[4];let g;e[5]!==d?(g=d&&{borderTopRightRadius:0,borderBottomRightRadius:0},e[5]=d,e[6]=g):g=e[6];let h;e[7]!==u?(h=u&&{maskImage:u,WebkitMaskImage:u},e[7]=u,e[8]=h):h=e[8];let x;e[9]!==s.bg||e[10]!==s.text||e[11]!==o||e[12]!==p||e[13]!==g||e[14]!==h?(x={background:s.bg,color:s.text,borderRadius:4,...p,...g,...h,...o},e[9]=s.bg,e[10]=s.text,e[11]=o,e[12]=p,e[13]=g,e[14]=h,e[15]=x):x=e[15];let b;e[16]!==a?(b=r.jsx("span",{className:"truncate",children:a}),e[16]=a,e[17]=b):b=e[17];let S;e[18]!==x||e[19]!==b?(S=r.jsx(ye,{asChild:!0,children:r.jsx("div",{className:"absolute flex items-center px-2 text-2xs font-medium truncate cursor-default",style:x,children:b})}),e[18]=x,e[19]=b,e[20]=S):S=e[20];let T;e[21]!==n?(T=r.jsx(We,{variant:n}),e[21]=n,e[22]=T):T=e[22];let f;return e[23]!==T||e[24]!==S?(f=r.jsxs(je,{children:[S,T]}),e[23]=T,e[24]=S,e[25]=f):f=e[25],f}function Xt(t){const e=K.c(71),{decofile:n}=t,s=X(),[o,a]=Z.useState("calendar"),[i,c]=Z.useState(Ye),[l,d]=Z.useState(!1);let m,u,p;if(e[0]!==n||e[1]!==l){const M=Ve(n);m=M.filter(Ke).length,p=l?M:M.filter(Ue),u=He(p.map(Ge)),e[0]=n,e[1]=l,e[2]=m,e[3]=u,e[4]=p}else m=e[2],u=e[3],p=e[4];const g=u;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(me(new Date)),e[5]=h):h=e[5];const x=h;let b;e[6]!==o?(b=()=>c(M=>o==="calendar"?U(M,-1):U(M,-3)),e[6]=o,e[7]=b):b=e[7];const S=b;let T;e[8]!==o?(T=()=>c(M=>o==="calendar"?U(M,1):U(M,3)),e[8]=o,e[9]=T):T=e[9];const f=T;let v;e[10]!==s?(v=s("sandbox.variantCalendar.today"),e[10]=s,e[11]=v):v=e[11];let y;e[12]!==v?(y=r.jsx(ee,{variant:"outline",size:"sm",onClick:x,children:v}),e[12]=v,e[13]=y):y=e[13];let N;e[14]!==s?(N=s("sandbox.variantCalendar.previous"),e[14]=s,e[15]=N):N=e[15];let $;e[16]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(ge,{size:16}),e[16]=$):$=e[16];let _;e[17]!==S||e[18]!==N?(_=r.jsx(ee,{variant:"ghost",size:"icon",onClick:S,"aria-label":N,children:$}),e[17]=S,e[18]=N,e[19]=_):_=e[19];let k;e[20]!==s?(k=s("sandbox.variantCalendar.next"),e[20]=s,e[21]=k):k=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(ue,{size:16}),e[22]=C):C=e[22];let L;e[23]!==f||e[24]!==k?(L=r.jsx(ee,{variant:"ghost",size:"icon",onClick:f,"aria-label":k,children:C}),e[23]=f,e[24]=k,e[25]=L):L=e[25];const R=de[i.getMonth()];let A;e[26]!==i?(A=i.getFullYear(),e[26]=i,e[27]=A):A=e[27];let E;e[28]!==R||e[29]!==A?(E=r.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",A]}),e[28]=R,e[29]=A,e[30]=E):E=e[30];let j;e[31]!==L||e[32]!==E||e[33]!==y||e[34]!==_?(j=r.jsxs("div",{className:"flex items-center gap-2",children:[y,_,L,E]}),e[31]=L,e[32]=E,e[33]=y,e[34]=_,e[35]=j):j=e[35];let D;e[36]!==m||e[37]!==l||e[38]!==s?(D=m>0&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ve,{id:"show-ongoing",checked:l,onCheckedChange:d}),r.jsx(be,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:s("sandbox.variantCalendar.showOngoing",{count:m})})]}),e[36]=m,e[37]=l,e[38]=s,e[39]=D):D=e[39];let H;e[40]===Symbol.for("react.memo_cache_sentinel")?(H=M=>{(M==="calendar"||M==="timeline")&&a(M)},e[40]=H):H=e[40];let F;e[41]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(le,{}),e[41]=F):F=e[41];let w;e[42]!==s?(w=s("sandbox.variantCalendar.calendarMode"),e[42]=s,e[43]=w):w=e[43];let I;e[44]!==w?(I=r.jsxs(se,{value:"calendar",children:[F,w]}),e[44]=w,e[45]=I):I=e[45];let B;e[46]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(xe,{}),e[46]=B):B=e[46];let O;e[47]!==s?(O=s("sandbox.variantCalendar.timelineMode"),e[47]=s,e[48]=O):O=e[48];let P;e[49]!==O?(P=r.jsxs(se,{value:"timeline",children:[B,O]}),e[49]=O,e[50]=P):P=e[50];let V;e[51]!==I||e[52]!==P||e[53]!==o?(V=r.jsxs(Ne,{type:"single",variant:"segmented",size:"sm",value:o,onValueChange:H,children:[I,P]}),e[51]=I,e[52]=P,e[53]=o,e[54]=V):V=e[54];let W;e[55]!==D||e[56]!==V?(W=r.jsxs("div",{className:"flex items-center gap-4",children:[D,V]}),e[55]=D,e[56]=V,e[57]=W):W=e[57];let z;e[58]!==j||e[59]!==W?(z=r.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,W]}),e[58]=j,e[59]=W,e[60]=z):z=e[60];let G;e[61]!==g||e[62]!==i||e[63]!==m||e[64]!==l||e[65]!==p||e[66]!==o?(G=p.length===0?r.jsx(qe,{hiddenOngoing:l?0:m}):o==="calendar"?r.jsx(Qe,{monthStart:i,variants:p,colorMap:g}):r.jsx(tt,{monthStart:i,variants:p,colorMap:g}),e[61]=g,e[62]=i,e[63]=m,e[64]=l,e[65]=p,e[66]=o,e[67]=G):G=e[67];let q;return e[68]!==z||e[69]!==G?(q=r.jsxs("div",{className:"flex h-full w-full flex-col",children:[z,G]}),e[68]=z,e[69]=G,e[70]=q):q=e[70],q}function Ge(t){return t.blockKey}function Ue(t){return!t.openEnd}function Ke(t){return t.openEnd}function Ye(){return me(new Date)}function qe(t){const e=K.c(4),{hiddenOngoing:n}=t,s=n===void 0?0:n,o=X();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx(le,{size:24,className:"text-muted-foreground/60"}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==o?(i=r.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[a,s>0?r.jsxs(r.Fragment,{children:[r.jsx("div",{children:o("sandbox.variantCalendar.noDatedVariants")}),r.jsx("div",{className:"text-xs text-muted-foreground/80",children:o("sandbox.variantCalendar.hiddenOngoingVariants",{count:s})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{children:o("sandbox.variantCalendar.noScheduledVariants")}),r.jsx("div",{className:"text-xs text-muted-foreground/80",children:o("sandbox.variantCalendar.dateMatcherInfo")})]})]}),e[1]=s,e[2]=o,e[3]=i):i=e[3],i}const te=20,oe=2,ie=28,Je=6;function Qe(t){const e=K.c(17),{monthStart:n,variants:s,colorMap:o}=t;let a,i,c,l,d;if(e[0]!==o||e[1]!==n||e[2]!==s){const p=_e(n),g=ke(new Date);a=ce,d="flex-1 min-h-0",i="min-w-[840px]",e[8]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Se.map(Ze)}),e[8]=c):c=e[8],l=p.map((h,x)=>{const b=Ee(h,s),S=b.reduce(Xe,0),T=ie+S*(te+oe)+8;return r.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((f,v)=>{const y=f.getMonth()===n.getMonth(),N=f.getTime()===g.getTime();return r.jsx("div",{className:ne("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:r.jsx("span",{className:ne("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},v)}),b.map((f,v)=>{const y=pe(o,f.variant.blockKey),N=ie+f.lane*(te+oe),$=f.leftUnits/7*100,_=f.widthUnits/7*100,k=f.variant.openStart&&x===0,C=f.variant.openEnd&&x===p.length-1;return r.jsxs(he,{variant:f.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Je,height:te},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&r.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${x}-${v}`)})]},x)}),e[0]=o,e[1]=n,e[2]=s,e[3]=a,e[4]=i,e[5]=c,e[6]=l,e[7]=d}else a=e[3],i=e[4],c=e[5],l=e[6],d=e[7];let m;e[9]!==i||e[10]!==c||e[11]!==l?(m=r.jsxs("div",{className:i,children:[c,l]}),e[9]=i,e[10]=c,e[11]=l,e[12]=m):m=e[12];let u;return e[13]!==a||e[14]!==d||e[15]!==m?(u=r.jsx(a,{className:d,children:m}),e[13]=a,e[14]=d,e[15]=m,e[16]=u):u=e[16],u}function Xe(t,e){return Math.max(t,e.lane+1)}function Ze(t){return r.jsx("div",{className:"px-2 py-2 text-center",children:t},t)}const J=4,et=32,Y=240;function tt(t){const e=K.c(23),{monthStart:n,variants:s,colorMap:o}=t,a=n,i=U(n,J),c=new Date,l=new Map;for(const E of s){const j=l.get(E.blockKey)??[];j.push(E),l.set(E.blockKey,j)}const d=Array.from(l.entries()).sort(rt),m=i.getTime()-a.getTime(),u=E=>(Math.max(a.getTime(),Math.min(i.getTime(),E.getTime()))-a.getTime())/m*100;let p;e[0]!==a?(p=(E,j)=>U(a,j),e[0]=a,e[1]=p):p=e[1];const g=Array.from({length:J},p),h=c.getTime()>=a.getTime()&&c.getTime()<=i.getTime()?u(c):null,x=X(),b=ce,S="flex-1 min-h-0",T="min-w-[900px] relative";let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f={width:Y},e[2]=f):f=e[2];let v;e[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),e[3]=x,e[4]=v):v=e[4];let y;e[5]!==v?(y=r.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold text-muted-foreground border-r",style:f,children:v}),e[5]=v,e[6]=y):y=e[6];let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},e[7]=N):N=e[7];const $=g.map(st);let _;e[8]!==$?(_=r.jsx("div",{className:"flex-1 grid",style:N,children:$}),e[8]=$,e[9]=_):_=e[9];let k;e[10]!==y||e[11]!==_?(k=r.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),e[10]=y,e[11]=_,e[12]=k):k=e[12];let C;e[13]!==x||e[14]!==h?(C=h!==null&&r.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${h} / 100)`},children:r.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-2xs font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),e[13]=x,e[14]=h,e[15]=C):C=e[15];const L=d.map(E=>{const[j,D]=E,H=pe(o,j),F=D[0]?.blockLabel??j;return r.jsxs("div",{children:[r.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold text-muted-foreground",style:{height:28},children:r.jsx("div",{className:"px-3 truncate",style:{width:Y},children:F})}),D.map((w,I)=>r.jsxs("div",{className:"flex border-b items-center",style:{height:et},children:[r.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[r.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),r.jsx("span",{className:"truncate text-foreground/80",children:w.label})]}),r.jsxs("div",{className:"relative flex-1 h-full",children:[r.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(nt)}),(()=>{const B=Math.max(w.start.getTime(),a.getTime()),O=Math.min(w.end.getTime(),i.getTime());if(O<=B)return null;const P=u(new Date(B)),V=u(new Date(O))-P;return r.jsx(he,{variant:w,color:H,fadeStart:w.openStart,fadeEnd:w.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${V}% - 2px)`,height:22},children:w.label})})()]})]},I))]},j)});let R;e[16]!==k||e[17]!==C||e[18]!==L?(R=r.jsxs("div",{className:T,children:[k,C,L]}),e[16]=k,e[17]=C,e[18]=L,e[19]=R):R=e[19];let A;return e[20]!==b||e[21]!==R?(A=r.jsx(b,{className:S,children:R}),e[20]=b,e[21]=R,e[22]=A):A=e[22],A}function nt(t,e){return r.jsx("div",{className:"border-r last:border-r-0 border-border/40"},e)}function st(t,e){return r.jsxs("div",{className:"px-2 py-2 text-xs text-muted-foreground border-r last:border-r-0",children:[de[t.getMonth()]?.slice(0,3)," ",t.getFullYear()]},e)}function rt(t,e){return t[0].localeCompare(e[0])}export{Xt as VariantCalendar};
@@ -1 +1 @@
1
- import{o as $,m as f}from"./section-array-field-4siTAXTX.js";const v="x-deco-matchers-override";function h({pageKey:n,prefix:r,variants:t,selectedIndex:a,decofile:i,meta:s}){if(!n||a<0||a>=t.length)return[];const o=[];for(let e=0;e<=a;e++){const u=t[e];if(!u)continue;const c=u.rule,l=e===a?"1":"0",d=($(c,i,s)?f(c,i,s):null)??`${n}@${r}.${e}.rule`;o.push(`${d}=${l}`)}return o}function p(n,r,t,a){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:n,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:a})}function x({pageKey:n,page:r,sectionIndex:t,sectionLazy:a,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value${r.lazyValues?".value":""}`:"sections"}.${t}${a?".section":""}.variants`,l=Array.isArray(i.variants)?i.variants:[];return h({pageKey:n,prefix:c,variants:l,selectedIndex:s,decofile:o,meta:e})}function y(n,r){const t=`${r}@`;return n.map(a=>a.startsWith(t)?`props.${a.slice(t.length)}`:a)}function B(n,r){if(r.length===0)return n;try{const t=new URL(n,"http://local");t.searchParams.delete(v);for(const a of r)t.searchParams.append(v,a);return n.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return n}}export{x as a,p as b,y as i,B as w};
1
+ import{o as $,m as f}from"./section-array-field-CSurFJ3n.js";const v="x-deco-matchers-override";function h({pageKey:n,prefix:r,variants:t,selectedIndex:a,decofile:i,meta:s}){if(!n||a<0||a>=t.length)return[];const o=[];for(let e=0;e<=a;e++){const u=t[e];if(!u)continue;const c=u.rule,l=e===a?"1":"0",d=($(c,i,s)?f(c,i,s):null)??`${n}@${r}.${e}.rule`;o.push(`${d}=${l}`)}return o}function p(n,r,t,a){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:n,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:a})}function x({pageKey:n,page:r,sectionIndex:t,sectionLazy:a,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value${r.lazyValues?".value":""}`:"sections"}.${t}${a?".section":""}.variants`,l=Array.isArray(i.variants)?i.variants:[];return h({pageKey:n,prefix:c,variants:l,selectedIndex:s,decofile:o,meta:e})}function y(n,r){const t=`${r}@`;return n.map(a=>a.startsWith(t)?`props.${a.slice(t.length)}`:a)}function B(n,r){if(r.length===0)return n;try{const t=new URL(n,"http://local");t.searchParams.delete(v);for(const a of r)t.searchParams.append(v,a);return n.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return n}}export{x as a,p as b,y as i,B as w};
@@ -1 +1 @@
1
- import{c as x,j as a,B as p}from"./index-mb-jxjEy.js";import{i as h}from"./ArrowLeft-7wIIyF4Y.js";const b="p-4";function k(m){const e=x.c(14),{intro:d,back:t,actions:n}=m;let r;e[0]!==n?(r=n?a.jsx("div",{className:"flex shrink-0 items-center gap-2","data-slot":"view-actions",children:n}):null,e[0]=n,e[1]=r):r=e[1];const s=r;if(t){let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(h,{size:16}),e[2]=o):o=e[2];let l;e[3]!==t.label||e[4]!==t.onClick?(l=a.jsxs(p,{variant:"ghost",size:"sm",onClick:t.onClick,children:[o,t.label]}),e[3]=t.label,e[4]=t.onClick,e[5]=l):l=e[5];let f;return e[6]!==s||e[7]!==l?(f=a.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4","data-testid":"site-draft-view-header",children:[l,s]}),e[6]=s,e[7]=l,e[8]=f):f=e[8],f}let i;e[9]!==d?(i=a.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:d}),e[9]=d,e[10]=i):i=e[10];let c;return e[11]!==s||e[12]!==i?(c=a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 pt-4","data-testid":"site-draft-view-header",children:[i,s]}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}export{b as S,k as a};
1
+ import{c as x,j as a,B as p}from"./index-CzblxJEL.js";import{i as h}from"./ArrowLeft-s4im6VP0.js";const b="p-4";function k(m){const e=x.c(14),{intro:d,back:t,actions:n}=m;let r;e[0]!==n?(r=n?a.jsx("div",{className:"flex shrink-0 items-center gap-2","data-slot":"view-actions",children:n}):null,e[0]=n,e[1]=r):r=e[1];const s=r;if(t){let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(h,{size:16}),e[2]=o):o=e[2];let l;e[3]!==t.label||e[4]!==t.onClick?(l=a.jsxs(p,{variant:"ghost",size:"sm",onClick:t.onClick,children:[o,t.label]}),e[3]=t.label,e[4]=t.onClick,e[5]=l):l=e[5];let f;return e[6]!==s||e[7]!==l?(f=a.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4","data-testid":"site-draft-view-header",children:[l,s]}),e[6]=s,e[7]=l,e[8]=f):f=e[8],f}let i;e[9]!==d?(i=a.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:d}),e[9]=d,e[10]=i):i=e[10];let c;return e[11]!==s||e[12]!==i?(c=a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 pt-4","data-testid":"site-draft-view-header",children:[i,s]}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}export{b as S,k as a};
@@ -1 +1 @@
1
- import{U as A}from"./url-slug-E3otz4_J.js";import{T as I}from"./session-runtime-D2GKulko.js";import{aH as a,bC as t,aI as e,bk as r,cp as o,cq as s,dE as d,dA as p,eM as k,dG as R,dy as w}from"./index-mb-jxjEy.js";const v=a({connection_id:e().describe("Connection ID"),selected_tools:t(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:t(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:t(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),h=500,y=200,_=200,E=20,U=50,P=100,T=20,C=100,N=300,V=100,O=8192,S=v.extend({selected_tools:t(e()).max(h).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:t(e()).max(h).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:t(e()).max(h).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),D=a({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),L=a({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:a({type:d("ext-app"),appId:e(),args:p(e(),w()).optional()})}),l=s(["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","analytics","cdn","automations"]),pe=s(["on","off"]),B=new Map([["manual","on"],["auto","on"]]),X=s(["on","off","manual","auto"]);function F(n){if(!n)return null;const i=B.get(n);return i||(n==="on"||n==="off"?n:null)}const j=a({defaultMainView:a({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:o().nullable().optional(),cmsDefaultOpen:o().nullable().optional(),cms:X.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:t(l).max(l.options.length).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:t(L).max(T).optional()});function be(n){return F(n?.cms)??"on"}function ue(n,i){const c=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...c?{defaultMainView:{type:"site-editor"}}:{}}}const f=a({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:p(e(),w()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:r().int().positive().optional(),maxHeight:r().int().positive().optional()}),H=a({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:t(D).max(P).nullable().optional(),layout:j.nullable().optional(),homeTile:f.nullable().optional(),homeTiles:t(f).max(E).nullable().optional(),homePrompts:t(e()).max(U).nullable().optional()}),z=/^[A-Za-z_][A-Za-z0-9_]*$/,g=e().min(1).regex(z,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),q=R("kind",[a({key:g,kind:d("literal"),value:e().max(O)}),a({key:g,kind:d("secret"),secretId:e().min(1)})]),K=2,G=a({path:e().trim().min(1).max(256).describe("Path (relative to repo root) to the app's package.json directory.")}),W=a({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),apps:t(G).max(K).nullable().optional().describe("Additional monorepo apps previewed beside the one at `path`, each run by its own dev server on the main app's install. Started only when the organization's `multi_app_preview` flag is on."),env:t(q).max(V).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),Y=a({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:r().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),Z=s(["agent-sandbox","local-api"]),$={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:r().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:a({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START"),apps:t(e()).nullable().optional().describe("Extra app paths the sandbox was given at SANDBOX_START; null when none were sent.")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path/apps) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=a($);function he(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,c={};for(const[b,u]of Object.entries(i))if(!(!u||typeof u!="object")&&!(b!=="agent-sandbox"&&b!=="local-api"))try{c[b]=x.parse(u)}catch{}return c}const J=p(e().describe("userId"),p(e().describe("branch"),k(Z,x))),Q=a({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:s(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:r().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),ee=t(Q).max(C).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),te=s(["smart","code-review","open"]),ae=te.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ne=o().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),ie=o().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),oe=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),se=a({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp"),runtime:s(I).optional().describe("Session runtime the release was created in. Picking a 'sandbox' release opens a coding session on its branch, since a CMS session renders production's code and would hide the branch's code changes. Absent ⇒ the project's default.")}),le=t(se).max(N).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:t(e()).max(_).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:t(l).max(l.options.length).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:d(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),sidebarViewsSeen:t(l).max(l.options.length).nullable().optional().describe("Views Studio offered this project once on top of an exact sidebarViews list (the top rows and Blog, plus Experiments and Calendar on a Blocks site and Hosting beside a hosted site's Site Editor). A view listed here shows only when sidebarViews selects it, so hiding it sticks."),repository:Y.nullable().optional().describe("Linked repository"),runtime:W.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:ee,siteSlug:e().nullable().optional().describe("The project's site id (asset tenancy, CDN paths, site tokens). Set once when the site is created or imported; any write that would change it is refused."),assetStorageConfigId:e().trim().min(1).nullable().optional().describe("Organization file configuration used for this project’s assets. null/absent uses automatic site matching."),publishPolicy:ae,previewServerUrl:oe,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:o().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),legacyBlogPostFormat:o().nullable().optional().describe("Blog: edit a post's body as one HTML document in `post.content` (the format sites built before `sections` read), instead of blocks in `post.sections`."),fastPreview:ne,releases:le,fastPreviewInPlace:ie},me=a({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),url_slug:e().nullable().optional().describe("Name of the project in Studio URLs, unique in the organization"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:s(["active","inactive"]).describe("Current status"),pinned:o().describe("Whether this space is pinned to the sidebar"),metadata:a(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:J.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:t(v).describe("Connections with their selected tools, resources, and prompts")}),M=a({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});a({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:s(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:o().optional().default(!1).describe("Pin to sidebar"),metadata:a(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:t(S).max(y).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:t(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});a({title:e().min(1).max(255).optional().describe("New name"),url_slug:A.nullish().describe("New URL slug. The old one keeps redirecting. Renaming does not change it. null keeps the current slug."),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:s(["active","inactive"]).optional().describe("New status"),pinned:o().optional().describe("Pin/unpin from sidebar"),blocksV8:o().optional().describe('Org owners and admins only: turn the project\'s "Blocks v8 site" switch on or off (`metadata.blocksV8`). On, Studio edits the site with the Blocks v8 editor and the hosted CMS, and `deco schema push` is accepted; off, it is a v7 site. Never set through `metadata`.'),metadata:a(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:t(S).max(y).optional().describe("New connections (replaces existing)"),prompts:t(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{pe as C,z as E,K as R,me as V,N as a,he as p,be as r,ue as w};
1
+ import{U as A}from"./url-slug-DOqB5l7c.js";import{T as I}from"./session-runtime-CW0B7dQ4.js";import{aH as a,bC as t,aI as e,bk as r,cp as o,cq as s,dE as d,dA as p,eM as k,dG as R,dy as w}from"./index-CzblxJEL.js";const v=a({connection_id:e().describe("Connection ID"),selected_tools:t(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:t(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:t(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),h=500,y=200,_=200,E=20,U=50,P=100,T=20,C=100,N=300,V=100,O=8192,S=v.extend({selected_tools:t(e()).max(h).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:t(e()).max(h).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:t(e()).max(h).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),D=a({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),L=a({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:a({type:d("ext-app"),appId:e(),args:p(e(),w()).optional()})}),l=s(["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","analytics","cdn","automations"]),pe=s(["on","off"]),B=new Map([["manual","on"],["auto","on"]]),X=s(["on","off","manual","auto"]);function F(n){if(!n)return null;const i=B.get(n);return i||(n==="on"||n==="off"?n:null)}const j=a({defaultMainView:a({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:o().nullable().optional(),cmsDefaultOpen:o().nullable().optional(),cms:X.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:t(l).max(l.options.length).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:t(L).max(T).optional()});function be(n){return F(n?.cms)??"on"}function ue(n,i){const c=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...c?{defaultMainView:{type:"site-editor"}}:{}}}const f=a({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:p(e(),w()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:r().int().positive().optional(),maxHeight:r().int().positive().optional()}),H=a({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:t(D).max(P).nullable().optional(),layout:j.nullable().optional(),homeTile:f.nullable().optional(),homeTiles:t(f).max(E).nullable().optional(),homePrompts:t(e()).max(U).nullable().optional()}),z=/^[A-Za-z_][A-Za-z0-9_]*$/,g=e().min(1).regex(z,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),q=R("kind",[a({key:g,kind:d("literal"),value:e().max(O)}),a({key:g,kind:d("secret"),secretId:e().min(1)})]),K=2,G=a({path:e().trim().min(1).max(256).describe("Path (relative to repo root) to the app's package.json directory.")}),W=a({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),apps:t(G).max(K).nullable().optional().describe("Additional monorepo apps previewed beside the one at `path`, each run by its own dev server on the main app's install. Started only when the organization's `multi_app_preview` flag is on."),env:t(q).max(V).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),Y=a({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:r().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),Z=s(["agent-sandbox","local-api"]),$={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:r().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:a({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START"),apps:t(e()).nullable().optional().describe("Extra app paths the sandbox was given at SANDBOX_START; null when none were sent.")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path/apps) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=a($);function he(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,c={};for(const[b,u]of Object.entries(i))if(!(!u||typeof u!="object")&&!(b!=="agent-sandbox"&&b!=="local-api"))try{c[b]=x.parse(u)}catch{}return c}const J=p(e().describe("userId"),p(e().describe("branch"),k(Z,x))),Q=a({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:s(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:r().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),ee=t(Q).max(C).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),te=s(["smart","code-review","open"]),ae=te.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ne=o().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),ie=o().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),oe=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),se=a({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp"),runtime:s(I).optional().describe("Session runtime the release was created in. Picking a 'sandbox' release opens a coding session on its branch, since a CMS session renders production's code and would hide the branch's code changes. Absent ⇒ the project's default.")}),le=t(se).max(N).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:t(e()).max(_).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:t(l).max(l.options.length).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:d(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),sidebarViewsSeen:t(l).max(l.options.length).nullable().optional().describe("Views Studio offered this project once on top of an exact sidebarViews list (the top rows and Blog, plus Experiments and Calendar on a Blocks site and Hosting beside a hosted site's Site Editor). A view listed here shows only when sidebarViews selects it, so hiding it sticks."),repository:Y.nullable().optional().describe("Linked repository"),runtime:W.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:ee,siteSlug:e().nullable().optional().describe("The project's site id (asset tenancy, CDN paths, site tokens). Set once when the site is created or imported; any write that would change it is refused."),assetStorageConfigId:e().trim().min(1).nullable().optional().describe("Organization file configuration used for this project’s assets. null/absent uses automatic site matching."),publishPolicy:ae,previewServerUrl:oe,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:o().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),legacyBlogPostFormat:o().nullable().optional().describe("Blog: edit a post's body as one HTML document in `post.content` (the format sites built before `sections` read), instead of blocks in `post.sections`."),fastPreview:ne,releases:le,fastPreviewInPlace:ie},me=a({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),url_slug:e().nullable().optional().describe("Name of the project in Studio URLs, unique in the organization"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:s(["active","inactive"]).describe("Current status"),pinned:o().describe("Whether this space is pinned to the sidebar"),metadata:a(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:J.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:t(v).describe("Connections with their selected tools, resources, and prompts")}),M=a({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});a({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:s(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:o().optional().default(!1).describe("Pin to sidebar"),metadata:a(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:t(S).max(y).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:t(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});a({title:e().min(1).max(255).optional().describe("New name"),url_slug:A.nullish().describe("New URL slug. The old one keeps redirecting. Renaming does not change it. null keeps the current slug."),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:s(["active","inactive"]).optional().describe("New status"),pinned:o().optional().describe("Pin/unpin from sidebar"),blocksV8:o().optional().describe('Org owners and admins only: turn the project\'s "Blocks v8 site" switch on or off (`metadata.blocksV8`). On, Studio edits the site with the Blocks v8 editor and the hosted CMS, and `deco schema push` is accepted; off, it is a v7 site. Never set through `metadata`.'),metadata:a(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:t(S).max(y).optional().describe("New connections (replaces existing)"),prompts:t(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{pe as C,z as E,K as R,me as V,N as a,he as p,be as r,ue as w};
@@ -0,0 +1 @@
1
+ import{bC as C,aI as T,aH as S}from"./index-CzblxJEL.js";import{T as w,a as O,b as L,c as N,d as P}from"./task-board-Bbot46A6.js";import{e as F}from"./backoff-CrEUbyZT.js";const h={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},V=Object.values(h),y="notification.created",j=60,$=100,x=2e3,u=C(T().min(1)).max(x),Y=S({id:T().min(1).max(64),name:T().trim().min(1).max(j),projectIds:u}),K=C(Y).max($),X=S({pinned:u,hidden:u,dismissed:u,hiddenFolders:u}),te={pinned:[],hidden:[],dismissed:[],hiddenFolders:[]};S({folders:K,preferences:X,joinedAt:T().nullable()});const I="project-folders.updated",M="order-monitor.store.evaluated",se=["orders_drop","denied_spike","cancel_spike"],v="alerts.updated",q=3e4,J=1e3;function U(c){const{buildUrl:f,eventTypes:p,name:d,crossTab:_=!1}=c,i=new Map,l=_&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(l&&!d)throw new Error("createSSESubscription: `name` is required when crossTab");function E(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function A(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function D(e){const t=new EventSource(f(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(A(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&B(e)};const s=a=>{e.channel?.postMessage({kind:"event",type:a.type,data:a.data}),E(e,a)};for(const a of p)t.addEventListener(a,s)}function B(e){if(e.refCount<=0||e.reconnectTimer)return;const t=F(q,J,e.reconnectAttempt,2,.5);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),D(e))},t)}function m(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,D(e)}function W(e){if(!l){m(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${d}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,m(e)})).catch(()=>{})}function g(e,t){t.kind==="event"?E(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&A(e)}function H(e){const t=i.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(i.set(e,s),l){const a=new BroadcastChannel(`sse:${d}:${e}`);a.onmessage=r=>g(s,r.data),s.channel=a}return s}function b(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,i.delete(e.key)}return{dispose(){for(const e of[...i.values()])b(e)},subscribe(e,t,s){const a=!i.has(e),r=H(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s),a&&W(r);let R=!1;return()=>{R||(R=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&b(r))}}}}function n(c,f){const p=new Set(f);return{dispose:()=>c.dispose(),subscribe(d,_,i){const l=E=>{p.has(E.type)&&_(E)};return c.subscribe(d,l,i)}}}const k=[...V,w,O,L,N,P,y,I,M,v],z=k,G=k,o=U({name:"watch",buildUrl:c=>`/api/${encodeURIComponent(c)}/watch?types=${z.join(",")}`,eventTypes:G,crossTab:!0}),re=n(o,[...V]),ae=n(o,[w,O]),ne=n(o,[L]),oe=n(o,[N]),ce=n(o,[P]),ie=n(o,[y]),de=n(o,[I]),le=n(o,[M]),Ee=n(o,[v]),ue=U({buildUrl:c=>`/api/${encodeURIComponent(c)}/watch?scope=all&types=${h.THREAD_STATUS}`,eventTypes:[h.THREAD_STATUS]});export{h as D,te as E,se as O,j as P,ce as a,oe as b,ne as c,re as d,ue as e,Ee as f,ie as n,le as o,de as p,ae as t};
@@ -58,8 +58,8 @@
58
58
  <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." />
59
59
  <meta name="twitter:image" content="/og-image.png" />
60
60
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
61
- <script type="module" crossorigin src="/assets/index-mb-jxjEy.js"></script>
62
- <link rel="stylesheet" crossorigin href="/assets/index-CFbcObvG.css">
61
+ <script type="module" crossorigin src="/assets/index-CzblxJEL.js"></script>
62
+ <link rel="stylesheet" crossorigin href="/assets/index-Bza-gCrO.css">
63
63
  </head>
64
64
  <body>
65
65
  <div id="root"></div>
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- var T=import.meta.require;var E="14";function R(h){return{name:"decocms",systemDatabaseUrl:h.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:h.poolSize,runAdminServer:!1,executorID:h.executorID,applicationVersion:E,...h.listenQueues!==void 0?{listenQueues:h.listenQueues}:{}}}function j(h,w={}){let{signal:f}=w;if(f?.aborted)return Promise.reject(f.reason);return new Promise((y,c)=>{let J=()=>{clearTimeout(+k),c(f?.reason)},k=_(()=>{f?.removeEventListener("abort",J),y()},h);f?.addEventListener("abort",J,{once:!0})})}var Q=2147483647;function _(h,w){if(w=Math.trunc(Math.max(w,0)||0),w<=Q){let J=Number(setTimeout(h,w));return{valueOf:()=>J}}let f=Date.now(),y,c=()=>{let J=w-(Date.now()-f);y=J>Q?Number(setTimeout(c,Q)):Number(setTimeout(h,J))};return c(),{valueOf:()=>y}}import M from"pg";var G=8314027461559302n,P=600000,g=500;async function q(h,w){let{databaseUrl:f,lockTimeoutMs:y=P}=h,c=h.log??((N)=>console.log(N)),J=new M.Client({connectionString:f});await J.connect();let d=Date.now(),k=!1;try{while(!k){if(k=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[G.toString()])).rows[0]?.locked===!0,k)break;if(Date.now()-d>=y)throw Error(`Timed out after ${y}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await j(g)}let N=Date.now()-d;if(N>1000)c(`[dbos] waited ${N}ms for the migration lock; another process migrated first`);return await w()}finally{if(k)try{await J.query("SELECT pg_advisory_unlock($1)",[G.toString()])}catch{}await J.end().catch(()=>{})}}import{homedir as A}from"os";var u=new Set(["all","worker","api"]);function p(h){let w=(h??"").trim();return u.has(w)?w:"all"}var I=new Set(["production","development","test"]);function t(h){let w=(h??"").trim();return I.has(w)?w:"development"}function z(h){return h==="true"||h==="1"}function X(h,w,f){if(w===void 0||w==="")return;let y=Number(w);if(!Number.isSafeInteger(y)||y<=0)throw Error(`${h} must be a positive integer`);if(f!==void 0&&y>f)throw Error(`${h} must be at most ${f}`);return y}function W(h,w,f,y){return X(h,w,y)??f}function l(h){let w={};for(let f of(h??"").split(",")){let y=f.trim();if(!y)continue;let c=y.indexOf("="),J=c>0?y.slice(0,c).trim():"",d=c>0?y.slice(c+1).trim():"";if(!J||!d){console.warn(`STRIPE_PLAN_PRICE_IDS: ignoring unparseable entry "${y}" \u2014 expected price_xxx=planId`);continue}w[J]=d}return w}function n(h){let w={};for(let f of(h??"").split(",")){let y=f.trim();if(!y)continue;let c=y.indexOf("="),J=c>0?y.slice(0,c).trim():"",d=c>0?y.slice(c+1).trim():"";if(!J||!d){console.warn(`MCP_INTERNAL_HOST_MAP: ignoring unparseable entry "${y}" \u2014 expected host=origin`);continue}w[J]=d}return w}function V(h,w,f,y){if(w===void 0||w==="")return f;let c=Number(w);if(!Number.isSafeInteger(c)||c<0)throw Error(`${h} must be a non-negative integer`);if(y!==void 0&&c>y)throw Error(`${h} must be at most ${y}`);return c}function U(h,w){if(h===void 0||h==="")return w;return h==="true"||h==="1"}function v(h){return h===void 0||h===""||h==="true"||h==="1"}function D(h,w){return h||w}function O(h){let w=h.DATA_DIR||h.DECOCMS_HOME||`${A()}/deco`,f=t(h.NODE_ENV),y=h.VOICE_CONVERSATION_PROVIDER?.trim()||"elevenlabs",c={nodeEnv:f,port:W("PORT",h.PORT,3000,65535),baseUrl:h.BASE_URL,publicUrl:D(h.STUDIO_PUBLIC_URL,h.MESH_PUBLIC_URL),dataDir:w,voiceConversationProvider:y==="elevenlabs"||y==="openai"?y:null,openaiLiveApiKey:h.OPENAI_LIVE_API_KEY,openaiLiveModel:h.OPENAI_LIVE_MODEL?.trim()||"gpt-live-1",openaiLiveVoice:h.OPENAI_LIVE_VOICE?.trim()||"marin",elevenlabsApiKey:h.ELEVENLABS_API_KEY,elevenlabsVoiceId:h.ELEVENLABS_VOICE_ID||"JBFqnCBsd6RMkjVDRZzb",elevenlabsVoiceModel:h.ELEVENLABS_VOICE_MODEL||"eleven_v4_turbo",elevenlabsConversationModel:h.ELEVENLABS_CONVERSATION_MODEL?.trim()||"gemini-2.5-flash",databaseUrl:h.DATABASE_URL||"postgresql://postgres:postgres@localhost:5432/postgres",databasePgSsl:z(h.DATABASE_PG_SSL),databasePoolMax:W("DATABASE_POOL_MAX",h.DATABASE_POOL_MAX,5),dbosPoolSize:W("DBOS_POOL_SIZE",h.DBOS_POOL_SIZE,5),betterAuthSecret:h.BETTER_AUTH_SECRET||"",encryptionKey:h.ENCRYPTION_KEY||"",studioJwtSecret:D(h.STUDIO_JWT_SECRET,h.MESH_JWT_SECRET),localMode:z(h.DECOCMS_LOCAL_MODE),disableRateLimit:z(h.DISABLE_RATE_LIMIT),jiraAllowLocalSiteUrl:z(h.JIRA_ALLOW_LOCAL_SITE_URL),codexUsageUrl:h.CODEX_USAGE_URL||"https://chatgpt.com/backend-api/wham/usage",claudeUsageUrl:h.CLAUDE_USAGE_URL||"https://api.anthropic.com/api/oauth/usage",jiraSettleSeconds:W("JIRA_SETTLE_SECONDS",h.JIRA_SETTLE_SECONDS,20,3600),studioProvisionSecretKey:h.STUDIO_PROVISION_SECRET_KEY,deploymentAdminEmails:(h.DEPLOYMENT_ADMIN_EMAILS??"").split(",").map((J)=>J.trim().toLowerCase()).filter(Boolean),taskBoardAdminOrgIds:(h.STUDIO_ADMIN_ORG_IDS??"").split(",").map((J)=>J.trim()).filter(Boolean),feedbackOrgId:h.STUDIO_FEEDBACK_ORG_ID?.trim()||void 0,feedbackProjectId:h.STUDIO_FEEDBACK_PROJECT_ID?.trim()||void 0,deploymentAdminToken:h.DEPLOYMENT_ADMIN_TOKEN||void 0,clickhouseUrl:h.CLICKHOUSE_URL,clickhouseMaxMemoryUsage:X("CLICKHOUSE_MAX_MEMORY_USAGE",h.CLICKHOUSE_MAX_MEMORY_USAGE),monitoringOtlpEndpoint:h.MONITORING_OTLP_ENDPOINT,otelServiceName:h.OTEL_SERVICE_NAME||"studio",natsUrls:(h.NATS_URL||"nats://localhost:4222").split(",").map((J)=>J.trim()).filter(Boolean),natsCredsPath:h.NATS_CREDS,natsUser:h.NATS_USER||void 0,natsPassword:h.NATS_PASSWORD||void 0,configPath:h.CONFIG_PATH||"./config.json",aiGatewayEnabled:z(h.DECO_AI_GATEWAY_ENABLED),aiGatewayUrl:h.DECO_AI_GATEWAY_URL||"https://ai-site.deco.site",aiGatewayAdminToken:h.DECO_AI_GATEWAY_ADMIN_TOKEN,stripeWebhookSecret:h.STRIPE_WEBHOOK_SECRET,stripeSecretKey:h.STRIPE_SECRET_KEY,stripeOrgPriceId:h.STRIPE_ORG_PRICE_ID,stripePlanPriceIds:l(h.STRIPE_PLAN_PRICE_IDS),stripePortalConfigurationId:h.STRIPE_PORTAL_CONFIGURATION_ID,stripeTopupProductId:h.STRIPE_TOPUP_PRODUCT_ID,topupFeePercent:V("STUDIO_TOPUP_FEE_PERCENT",h.STUDIO_TOPUP_FEE_PERCENT,15,100),enableDecoImport:z(h.ENABLE_DECO_IMPORT),hostingControlPlaneGa:z(h.HOSTING_CONTROL_PLANE_GA),monitorGa:z(h.MONITOR_GA),plansEnabled:z(h.STUDIO_PLANS_ENABLED),mcpCacheEnabled:U(h.MCP_CACHE_ENABLED,f!=="development"),mcpInternalHostMap:n(h.MCP_INTERNAL_HOST_MAP),orgFsPublicSetsJson:h.ORGFS_PUBLIC_SETS,orgFsMountsDisabled:z(h.DISABLE_ORGFS_MOUNTS),decopilotMaxConcurrentSubagents:W("DECOPILOT_MAX_CONCURRENT_SUBAGENTS",h.DECOPILOT_MAX_CONCURRENT_SUBAGENTS,4),decopilotMaxConcurrentHostedRuns:W("DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS",h.DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS,3),taskBoardReviewSweeperEnabled:U(h.TASK_BOARD_REVIEW_SWEEPER_ENABLED,!0),boardTransitionSettleSeconds:W("BOARD_TRANSITION_SETTLE_SECONDS",h.BOARD_TRANSITION_SETTLE_SECONDS,20,3600),decofileCommitGapSeconds:W("DECOFILE_COMMIT_GAP_SECONDS",h.DECOFILE_COMMIT_GAP_SECONDS,5,60),sandboxMaxConcurrentHostedRuns:W("SANDBOX_MAX_CONCURRENT_HOSTED_RUNS",h.SANDBOX_MAX_CONCURRENT_HOSTED_RUNS,12),s3Endpoint:h.S3_ENDPOINT,s3Bucket:h.S3_BUCKET,s3Region:h.S3_REGION||"auto",s3AccessKeyId:h.S3_ACCESS_KEY_ID,s3SecretAccessKey:h.S3_SECRET_ACCESS_KEY,s3ForcePathStyle:v(h.S3_FORCE_PATH_STYLE),monitoringS3Bucket:h.MONITORING_S3_BUCKET,monitoringS3Endpoint:h.MONITORING_S3_ENDPOINT,monitoringS3Region:h.MONITORING_S3_REGION,monitoringS3AccessKeyId:h.MONITORING_S3_ACCESS_KEY_ID,monitoringS3SecretAccessKey:h.MONITORING_S3_SECRET_ACCESS_KEY,monitoringS3Prefix:h.MONITORING_S3_PREFIX,duckdbExtensionDirectory:h.DUCKDB_EXTENSION_DIRECTORY||"/opt/duckdb/extensions",duckdbMemoryLimit:h.DUCKDB_MEMORY_LIMIT||void 0,duckdbThreads:X("DUCKDB_THREADS",h.DUCKDB_THREADS),podName:h.POD_NAME||crypto.randomUUID(),dispatchRole:p(D(h.STUDIO_DISPATCH_ROLE,h.MESH_DISPATCH_ROLE)),agentSandboxEnabled:z(h.STUDIO_AGENT_SANDBOX_ENABLED),sandboxStickyHeadRefEnabled:z(h.SANDBOX_STICKY_HEAD_REF),taskBoardRerunReusesPrBranch:U(h.TASK_BOARD_RERUN_REUSES_PR_BRANCH,!0),sandboxReleaseOnRunEndEnabled:z(h.SANDBOX_RELEASE_ON_RUN_END),sandboxPrewarmOnThreadCreateEnabled:z(h.SANDBOX_PREWARM_ON_THREAD_CREATE),sandboxPersistentHarnessEnabled:z(h.SANDBOX_PERSISTENT_HARNESS),sandboxReleaseGraceMs:W("SANDBOX_RELEASE_GRACE_MS",h.SANDBOX_RELEASE_GRACE_MS,120000),decoSupabaseUrl:h.DECO_SUPABASE_URL,decoSupabaseServiceKey:h.DECO_SUPABASE_SERVICE_KEY,controlplaneRestUrl:h.CONTROLPLANE_REST_URL,controlplaneServiceToken:h.CONTROLPLANE_SERVICE_TOKEN,analyticsDataUrl:h.ANALYTICS_URL,analyticsMasterToken:h.ANALYTICS_MASTER_TOKEN,clickhouseAnalyticsUrl:h.CLICKHOUSE_ANALYTICS_ADDRESS,clickhouseAnalyticsUsername:h.CLICKHOUSE_ANALYTICS_USERNAME||"admin_monitor",clickhouseAnalyticsPassword:h.CLICKHOUSE_ANALYTICS_PASSWORD,customerLakeUrl:h.CUSTOMER_LAKE_URL,customerLakeAdminUsername:h.CUSTOMER_LAKE_ADMIN_USERNAME||"customer_lake_user_admin",customerLakeAdminPassword:h.CUSTOMER_LAKE_ADMIN_PASSWORD,customerLakeTenantSecret:h.CUSTOMER_LAKE_TENANT_SECRET,orderMonitorIngestUrl:h.ORDER_MONITOR_INGEST_URL,oneDollarStatsApiKey:h.ONEDOLLAR_BACKEND_API_KEY,reportsInternalApiUrl:D(h.REPORTS_INTERNAL_API_URL,h.COMMERCE_DISCOVERY_INTERNAL_API_URL),reportsInternalApiKey:D(h.REPORTS_INTERNAL_API_KEY,h.COMMERCE_DISCOVERY_INTERNAL_API_KEY),s3TenantBucket:h.S3_TENANT_BUCKET||"new-deco-sites-assets",s3TenantRegion:h.S3_TENANT_REGION||"us-west-2",s3TenantEndpoint:h.S3_TENANT_ENDPOINT,s3TenantPublicUrlBase:h.S3_TENANT_PUBLIC_URL_BASE||"https://assets.decocms.com",awsS3TenantRoleArn:h.AWS_S3_TENANT_ROLE_ARN,awsS3TenantProvisionerAccessKeyId:h.AWS_S3_TENANT_PROVISIONER_ACCESS_KEY_ID,awsS3TenantProvisionerSecretAccessKey:h.AWS_S3_TENANT_PROVISIONER_SECRET_ACCESS_KEY,deliveryR2AccountId:h.DELIVERY_R2_ACCOUNT_ID,deliveryR2AccessKeyId:h.DELIVERY_R2_ACCESS_KEY_ID,deliveryR2SecretAccessKey:h.DELIVERY_R2_SECRET_ACCESS_KEY,deliveryR2Bucket:h.DELIVERY_R2_BUCKET,deliveryR2Endpoint:h.DELIVERY_R2_ENDPOINT,deliveryPublicOrigin:h.DELIVERY_PUBLIC_ORIGIN,deliveryKeyPrefix:h.DELIVERY_KEY_PREFIX,siteTokenSigningKey:h.DECO_SITE_TOKEN_SIGNING_KEY,cfDeliveryZoneId:h.CF_DELIVERY_ZONE_ID,cfPurgeApiToken:h.CF_PURGE_API_TOKEN};if(Boolean(c.natsUser)!==Boolean(c.natsPassword))throw Error("NATS_USER and NATS_PASSWORD must be set together");if(c.natsCredsPath&&c.natsUser)throw Error("Use either NATS_CREDS or NATS_USER/NATS_PASSWORD");if(c.plansEnabled&&!c.studioJwtSecret)throw Error("STUDIO_PLANS_ENABLED requires an explicit gateway JWT secret. Set STUDIO_JWT_SECRET (or its legacy alias MESH_JWT_SECRET) to the same value as the gateway's MESH_JWT_SECRET. Refusing to fall back to BETTER_AUTH_SECRET: that mismatch 401s every entitlements call, which every feature gate reads as 'no answer' and fails OPEN.");if(c.plansEnabled&&!c.studioProvisionSecretKey)throw Error("STUDIO_PLANS_ENABLED requires STUDIO_PROVISION_SECRET_KEY, set to the same value as the gateway's STUDIO_PROVISION_KEY. Without it the gateway cannot identify this server, falls back to a per-user membership callback that 401s for any user who never completed the gateway OAuth flow, and every feature gate then fails OPEN.");if(c.plansEnabled&&!c.aiGatewayEnabled)throw Error("STUDIO_PLANS_ENABLED requires DECO_AI_GATEWAY_ENABLED=true. Plans are read from the gateway; with it disabled there is no adapter to ask, so every feature gate fails OPEN on both server and client and the paid product is free fleet-wide.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>0&&!c.aiGatewayAdminToken)throw Error("STRIPE_PLAN_PRICE_IDS is set but DECO_AI_GATEWAY_ADMIN_TOKEN is not. The Stripe webhook places the paid tier through the gateway's admin API, so without the token a customer is charged and the entitlement "+"is never granted \u2014 and AI_PLAN_SET cannot repair it, it accepts only "+"'free'.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>1&&!c.stripePortalConfigurationId)console.warn("STRIPE_PLAN_PRICE_IDS maps more than one plan but STRIPE_PORTAL_CONFIGURATION_ID is unset. An org that already has a subscription cannot change tier: the account's default portal configuration lists only the legacy plans, not the tiers, so Stripe refuses the update flow. First-time checkout is unaffected.");return c}var r=null;function Z(){return r??=Object.freeze(O(process.env))}import{Kysely as gc,PostgresDialect as Ac}from"kysely";import{Pool as pc}from"pg";import{createContextKey as ch,metrics as fh,propagation as uw,ROOT_CONTEXT as pw,SpanStatusCode as Iw,trace as yh}from"@opentelemetry/api";import{logs as Jh,SeverityNumber as K}from"@opentelemetry/api-logs";import{OTLPLogExporter as nw}from"@opentelemetry/exporter-logs-otlp-proto";import{PrometheusExporter as dh}from"@opentelemetry/exporter-prometheus";import{OTLPTraceExporter as rw}from"@opentelemetry/exporter-trace-otlp-proto";import{RuntimeNodeInstrumentation as ew}from"@opentelemetry/instrumentation-runtime-node";import{context as Th,propagation as _h,SpanKind as Mh,SpanStatusCode as Ph}from"@opentelemetry/api";var Ah=globalThis.fetch;import{ExportResultCode as ah}from"@opentelemetry/core";import{ExportResultCode as $}from"@opentelemetry/core";import{mkdir as s,rename as e,writeFile as a}from"fs/promises";import{join as m}from"path";class F{bufferItems=[];bufferBytes=0;flushTimer=null;flushQueue=Promise.resolve();basePath;flushThreshold;maxBufferBytes;isShutdown=!1;knownDirs=new Set;partitionKey;constructor(h){this.basePath=h.basePath,this.flushThreshold=h.flushThreshold??1000,this.maxBufferBytes=h.maxBufferBytes??10485760,this.partitionKey=h.partitionKey;let w=h.flushIntervalMs??60000;if(w>0&&w<3600000){if(this.flushTimer=setInterval(()=>{this.flush().catch((f)=>{console.error("[NDJSONExporter] Timer flush failed:",f)})},w),this.flushTimer&&typeof this.flushTimer==="object"&&"unref"in this.flushTimer)this.flushTimer.unref()}}exportRows(h){if(this.isShutdown)return Promise.resolve({code:$.FAILED});for(let w of h){let f=JSON.stringify(w),y=this.partitionKey?this.partitionKey(w):"";this.bufferItems.push({partition:y,json:f}),this.bufferBytes+=Buffer.byteLength(f,"utf8")+1}if(this.bufferItems.length>=this.flushThreshold||this.bufferBytes>=this.maxBufferBytes)return this.flush().then(()=>({code:$.SUCCESS})).catch((w)=>{return console.error("[NDJSONExporter] Flush failed:",w),{code:$.FAILED}});return Promise.resolve({code:$.SUCCESS})}async shutdown(){if(this.isShutdown=!0,this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}async forceFlush(){try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}flush(){let w=this.flushQueue.catch(()=>{}).then(()=>this.doFlush());return this.flushQueue=w,w}async doFlush(){if(this.bufferItems.length===0)return;let h=this.bufferItems;this.bufferItems=[],this.bufferBytes=0;let w=new Map;for(let c of h){let J=w.get(c.partition);if(!J)J=[],w.set(c.partition,J);J.push(c.json)}let f=await Promise.allSettled(Array.from(w.entries()).map(([c,J])=>this.writeNDJSON(J,c).then(()=>c))),y=f.find((c)=>c.status==="rejected");if(y){let c=new Set;for(let d of f)if(d.status==="fulfilled")c.add(d.value);let J=h.filter((d)=>!c.has(d.partition));this.bufferItems=J.concat(this.bufferItems),this.bufferBytes=0;for(let d of this.bufferItems)this.bufferBytes+=Buffer.byteLength(d.json,"utf8")+1;throw y.reason}}async writeNDJSON(h,w){let f=new Date,y=[String(f.getUTCFullYear()),String(f.getUTCMonth()+1).padStart(2,"0"),String(f.getUTCDate()).padStart(2,"0"),String(f.getUTCHours()).padStart(2,"0")],c=w?m(this.basePath,w,...y):m(this.basePath,...y);if(!this.knownDirs.has(c))await s(c,{recursive:!0,mode:448}),this.knownDirs.add(c);let J=`${crypto.randomUUID()}.ndjson`,d=m(c,`.${J}.tmp`),k=m(c,J),N=h.join(`
2
+ var b=import.meta.require;var E="15";function R(h){return{name:"decocms",systemDatabaseUrl:h.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:h.poolSize,runAdminServer:!1,executorID:h.executorID,applicationVersion:E,...h.listenQueues!==void 0?{listenQueues:h.listenQueues}:{}}}function j(h,w={}){let{signal:f}=w;if(f?.aborted)return Promise.reject(f.reason);return new Promise((y,c)=>{let J=()=>{clearTimeout(+o),c(f?.reason)},o=_(()=>{f?.removeEventListener("abort",J),y()},h);f?.addEventListener("abort",J,{once:!0})})}var Q=2147483647;function _(h,w){if(w=Math.trunc(Math.max(w,0)||0),w<=Q){let J=Number(setTimeout(h,w));return{valueOf:()=>J}}let f=Date.now(),y,c=()=>{let J=w-(Date.now()-f);y=J>Q?Number(setTimeout(c,Q)):Number(setTimeout(h,J))};return c(),{valueOf:()=>y}}import M from"pg";var i=8314027461559302n,P=600000,g=500;async function G(h,w){let{databaseUrl:f,lockTimeoutMs:y=P}=h,c=h.log??((z)=>console.log(z)),J=new M.Client({connectionString:f});await J.connect();let d=Date.now(),o=!1;try{while(!o){if(o=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[i.toString()])).rows[0]?.locked===!0,o)break;if(Date.now()-d>=y)throw Error(`Timed out after ${y}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await j(g)}let z=Date.now()-d;if(z>1000)c(`[dbos] waited ${z}ms for the migration lock; another process migrated first`);return await w()}finally{if(o)try{await J.query("SELECT pg_advisory_unlock($1)",[i.toString()])}catch{}await J.end().catch(()=>{})}}import{homedir as A}from"os";var u=new Set(["all","worker","api"]);function p(h){let w=(h??"").trim();return u.has(w)?w:"all"}var I=new Set(["production","development","test"]);function t(h){let w=(h??"").trim();return I.has(w)?w:"development"}function k(h){return h==="true"||h==="1"}function X(h,w,f){if(w===void 0||w==="")return;let y=Number(w);if(!Number.isSafeInteger(y)||y<=0)throw Error(`${h} must be a positive integer`);if(f!==void 0&&y>f)throw Error(`${h} must be at most ${f}`);return y}function W(h,w,f,y){return X(h,w,y)??f}function l(h){let w={};for(let f of(h??"").split(",")){let y=f.trim();if(!y)continue;let c=y.indexOf("="),J=c>0?y.slice(0,c).trim():"",d=c>0?y.slice(c+1).trim():"";if(!J||!d){console.warn(`STRIPE_PLAN_PRICE_IDS: ignoring unparseable entry "${y}" \u2014 expected price_xxx=planId`);continue}w[J]=d}return w}function n(h){let w={};for(let f of(h??"").split(",")){let y=f.trim();if(!y)continue;let c=y.indexOf("="),J=c>0?y.slice(0,c).trim():"",d=c>0?y.slice(c+1).trim():"";if(!J||!d){console.warn(`MCP_INTERNAL_HOST_MAP: ignoring unparseable entry "${y}" \u2014 expected host=origin`);continue}w[J]=d}return w}function V(h,w,f,y){if(w===void 0||w==="")return f;let c=Number(w);if(!Number.isSafeInteger(c)||c<0)throw Error(`${h} must be a non-negative integer`);if(y!==void 0&&c>y)throw Error(`${h} must be at most ${y}`);return c}function U(h,w){if(h===void 0||h==="")return w;return h==="true"||h==="1"}function r(h){return h===void 0||h===""||h==="true"||h==="1"}function D(h,w){return h||w}function q(h){let w=h.DATA_DIR||h.DECOCMS_HOME||`${A()}/deco`,f=t(h.NODE_ENV),y=h.VOICE_CONVERSATION_PROVIDER?.trim()||"elevenlabs",c={nodeEnv:f,port:W("PORT",h.PORT,3000,65535),baseUrl:h.BASE_URL,publicUrl:D(h.STUDIO_PUBLIC_URL,h.MESH_PUBLIC_URL),dataDir:w,voiceConversationProvider:y==="elevenlabs"||y==="openai"?y:null,openaiLiveApiKey:h.OPENAI_LIVE_API_KEY,openaiLiveModel:h.OPENAI_LIVE_MODEL?.trim()||"gpt-live-1",openaiLiveVoice:h.OPENAI_LIVE_VOICE?.trim()||"marin",elevenlabsApiKey:h.ELEVENLABS_API_KEY,elevenlabsVoiceId:h.ELEVENLABS_VOICE_ID||"JBFqnCBsd6RMkjVDRZzb",elevenlabsVoiceModel:h.ELEVENLABS_VOICE_MODEL||"eleven_v4_turbo",elevenlabsConversationModel:h.ELEVENLABS_CONVERSATION_MODEL?.trim()||"gemini-2.5-flash",databaseUrl:h.DATABASE_URL||"postgresql://postgres:postgres@localhost:5432/postgres",databasePgSsl:k(h.DATABASE_PG_SSL),databasePoolMax:W("DATABASE_POOL_MAX",h.DATABASE_POOL_MAX,5),dbosPoolSize:W("DBOS_POOL_SIZE",h.DBOS_POOL_SIZE,5),betterAuthSecret:h.BETTER_AUTH_SECRET||"",encryptionKey:h.ENCRYPTION_KEY||"",studioJwtSecret:D(h.STUDIO_JWT_SECRET,h.MESH_JWT_SECRET),localMode:k(h.DECOCMS_LOCAL_MODE),disableRateLimit:k(h.DISABLE_RATE_LIMIT),jiraAllowLocalSiteUrl:k(h.JIRA_ALLOW_LOCAL_SITE_URL),codexUsageUrl:h.CODEX_USAGE_URL||"https://chatgpt.com/backend-api/wham/usage",claudeUsageUrl:h.CLAUDE_USAGE_URL||"https://api.anthropic.com/api/oauth/usage",jiraSettleSeconds:W("JIRA_SETTLE_SECONDS",h.JIRA_SETTLE_SECONDS,20,3600),studioProvisionSecretKey:h.STUDIO_PROVISION_SECRET_KEY,deploymentAdminEmails:(h.DEPLOYMENT_ADMIN_EMAILS??"").split(",").map((J)=>J.trim().toLowerCase()).filter(Boolean),taskBoardAdminOrgIds:(h.STUDIO_ADMIN_ORG_IDS??"").split(",").map((J)=>J.trim()).filter(Boolean),feedbackOrgId:h.STUDIO_FEEDBACK_ORG_ID?.trim()||void 0,feedbackProjectId:h.STUDIO_FEEDBACK_PROJECT_ID?.trim()||void 0,deploymentAdminToken:h.DEPLOYMENT_ADMIN_TOKEN||void 0,clickhouseUrl:h.CLICKHOUSE_URL,clickhouseMaxMemoryUsage:X("CLICKHOUSE_MAX_MEMORY_USAGE",h.CLICKHOUSE_MAX_MEMORY_USAGE),monitoringOtlpEndpoint:h.MONITORING_OTLP_ENDPOINT,otelServiceName:h.OTEL_SERVICE_NAME||"studio",natsUrls:(h.NATS_URL||"nats://localhost:4222").split(",").map((J)=>J.trim()).filter(Boolean),natsCredsPath:h.NATS_CREDS,natsUser:h.NATS_USER||void 0,natsPassword:h.NATS_PASSWORD||void 0,configPath:h.CONFIG_PATH||"./config.json",aiGatewayEnabled:k(h.DECO_AI_GATEWAY_ENABLED),aiGatewayUrl:h.DECO_AI_GATEWAY_URL||"https://ai-site.deco.site",aiGatewayAdminToken:h.DECO_AI_GATEWAY_ADMIN_TOKEN,stripeWebhookSecret:h.STRIPE_WEBHOOK_SECRET,stripeSecretKey:h.STRIPE_SECRET_KEY,stripeOrgPriceId:h.STRIPE_ORG_PRICE_ID,stripePlanPriceIds:l(h.STRIPE_PLAN_PRICE_IDS),stripePortalConfigurationId:h.STRIPE_PORTAL_CONFIGURATION_ID,stripeTopupProductId:h.STRIPE_TOPUP_PRODUCT_ID,topupFeePercent:V("STUDIO_TOPUP_FEE_PERCENT",h.STUDIO_TOPUP_FEE_PERCENT,15,100),enableDecoImport:k(h.ENABLE_DECO_IMPORT),hostingControlPlaneGa:k(h.HOSTING_CONTROL_PLANE_GA),monitorGa:k(h.MONITOR_GA),plansEnabled:k(h.STUDIO_PLANS_ENABLED),mcpCacheEnabled:U(h.MCP_CACHE_ENABLED,f!=="development"),mcpInternalHostMap:n(h.MCP_INTERNAL_HOST_MAP),orgFsPublicSetsJson:h.ORGFS_PUBLIC_SETS,orgFsMountsDisabled:k(h.DISABLE_ORGFS_MOUNTS),decopilotMaxConcurrentSubagents:W("DECOPILOT_MAX_CONCURRENT_SUBAGENTS",h.DECOPILOT_MAX_CONCURRENT_SUBAGENTS,4),decopilotMaxConcurrentHostedRuns:W("DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS",h.DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS,3),taskBoardReviewSweeperEnabled:U(h.TASK_BOARD_REVIEW_SWEEPER_ENABLED,!0),boardTransitionSettleSeconds:W("BOARD_TRANSITION_SETTLE_SECONDS",h.BOARD_TRANSITION_SETTLE_SECONDS,20,3600),decofileCommitGapSeconds:W("DECOFILE_COMMIT_GAP_SECONDS",h.DECOFILE_COMMIT_GAP_SECONDS,5,60),sandboxMaxConcurrentHostedRuns:W("SANDBOX_MAX_CONCURRENT_HOSTED_RUNS",h.SANDBOX_MAX_CONCURRENT_HOSTED_RUNS,12),s3Endpoint:h.S3_ENDPOINT,s3Bucket:h.S3_BUCKET,s3Region:h.S3_REGION||"auto",s3AccessKeyId:h.S3_ACCESS_KEY_ID,s3SecretAccessKey:h.S3_SECRET_ACCESS_KEY,s3ForcePathStyle:r(h.S3_FORCE_PATH_STYLE),monitoringS3Bucket:h.MONITORING_S3_BUCKET,monitoringS3Endpoint:h.MONITORING_S3_ENDPOINT,monitoringS3Region:h.MONITORING_S3_REGION,monitoringS3AccessKeyId:h.MONITORING_S3_ACCESS_KEY_ID,monitoringS3SecretAccessKey:h.MONITORING_S3_SECRET_ACCESS_KEY,monitoringS3Prefix:h.MONITORING_S3_PREFIX,duckdbExtensionDirectory:h.DUCKDB_EXTENSION_DIRECTORY||"/opt/duckdb/extensions",duckdbMemoryLimit:h.DUCKDB_MEMORY_LIMIT||void 0,duckdbThreads:X("DUCKDB_THREADS",h.DUCKDB_THREADS),podName:h.POD_NAME||crypto.randomUUID(),dispatchRole:p(D(h.STUDIO_DISPATCH_ROLE,h.MESH_DISPATCH_ROLE)),agentSandboxEnabled:k(h.STUDIO_AGENT_SANDBOX_ENABLED),sandboxStickyHeadRefEnabled:k(h.SANDBOX_STICKY_HEAD_REF),taskBoardRerunReusesPrBranch:U(h.TASK_BOARD_RERUN_REUSES_PR_BRANCH,!0),sandboxReleaseOnRunEndEnabled:k(h.SANDBOX_RELEASE_ON_RUN_END),sandboxPrewarmOnThreadCreateEnabled:k(h.SANDBOX_PREWARM_ON_THREAD_CREATE),sandboxPersistentHarnessEnabled:k(h.SANDBOX_PERSISTENT_HARNESS),sandboxReleaseGraceMs:W("SANDBOX_RELEASE_GRACE_MS",h.SANDBOX_RELEASE_GRACE_MS,120000),decoSupabaseUrl:h.DECO_SUPABASE_URL,decoSupabaseServiceKey:h.DECO_SUPABASE_SERVICE_KEY,controlplaneRestUrl:h.CONTROLPLANE_REST_URL,controlplaneServiceToken:h.CONTROLPLANE_SERVICE_TOKEN,analyticsDataUrl:h.ANALYTICS_URL,analyticsMasterToken:h.ANALYTICS_MASTER_TOKEN,clickhouseAnalyticsUrl:h.CLICKHOUSE_ANALYTICS_ADDRESS,clickhouseAnalyticsUsername:h.CLICKHOUSE_ANALYTICS_USERNAME||"admin_monitor",clickhouseAnalyticsPassword:h.CLICKHOUSE_ANALYTICS_PASSWORD,customerLakeUrl:h.CUSTOMER_LAKE_URL,customerLakeAdminUsername:h.CUSTOMER_LAKE_ADMIN_USERNAME||"customer_lake_user_admin",customerLakeAdminPassword:h.CUSTOMER_LAKE_ADMIN_PASSWORD,customerLakeTenantSecret:h.CUSTOMER_LAKE_TENANT_SECRET,orderMonitorIngestUrl:h.ORDER_MONITOR_INGEST_URL,oneDollarStatsApiKey:h.ONEDOLLAR_BACKEND_API_KEY,reportsInternalApiUrl:D(h.REPORTS_INTERNAL_API_URL,h.COMMERCE_DISCOVERY_INTERNAL_API_URL),reportsInternalApiKey:D(h.REPORTS_INTERNAL_API_KEY,h.COMMERCE_DISCOVERY_INTERNAL_API_KEY),s3TenantBucket:h.S3_TENANT_BUCKET||"new-deco-sites-assets",s3TenantRegion:h.S3_TENANT_REGION||"us-west-2",s3TenantEndpoint:h.S3_TENANT_ENDPOINT,s3TenantPublicUrlBase:h.S3_TENANT_PUBLIC_URL_BASE||"https://assets.decocms.com",awsS3TenantRoleArn:h.AWS_S3_TENANT_ROLE_ARN,awsS3TenantProvisionerAccessKeyId:h.AWS_S3_TENANT_PROVISIONER_ACCESS_KEY_ID,awsS3TenantProvisionerSecretAccessKey:h.AWS_S3_TENANT_PROVISIONER_SECRET_ACCESS_KEY,deliveryR2AccountId:h.DELIVERY_R2_ACCOUNT_ID,deliveryR2AccessKeyId:h.DELIVERY_R2_ACCESS_KEY_ID,deliveryR2SecretAccessKey:h.DELIVERY_R2_SECRET_ACCESS_KEY,deliveryR2Bucket:h.DELIVERY_R2_BUCKET,deliveryR2Endpoint:h.DELIVERY_R2_ENDPOINT,deliveryPublicOrigin:h.DELIVERY_PUBLIC_ORIGIN,deliveryKeyPrefix:h.DELIVERY_KEY_PREFIX,siteTokenSigningKey:h.DECO_SITE_TOKEN_SIGNING_KEY,cfDeliveryZoneId:h.CF_DELIVERY_ZONE_ID,cfPurgeApiToken:h.CF_PURGE_API_TOKEN};if(Boolean(c.natsUser)!==Boolean(c.natsPassword))throw Error("NATS_USER and NATS_PASSWORD must be set together");if(c.natsCredsPath&&c.natsUser)throw Error("Use either NATS_CREDS or NATS_USER/NATS_PASSWORD");if(c.plansEnabled&&!c.studioJwtSecret)throw Error("STUDIO_PLANS_ENABLED requires an explicit gateway JWT secret. Set STUDIO_JWT_SECRET (or its legacy alias MESH_JWT_SECRET) to the same value as the gateway's MESH_JWT_SECRET. Refusing to fall back to BETTER_AUTH_SECRET: that mismatch 401s every entitlements call, which every feature gate reads as 'no answer' and fails OPEN.");if(c.plansEnabled&&!c.studioProvisionSecretKey)throw Error("STUDIO_PLANS_ENABLED requires STUDIO_PROVISION_SECRET_KEY, set to the same value as the gateway's STUDIO_PROVISION_KEY. Without it the gateway cannot identify this server, falls back to a per-user membership callback that 401s for any user who never completed the gateway OAuth flow, and every feature gate then fails OPEN.");if(c.plansEnabled&&!c.aiGatewayEnabled)throw Error("STUDIO_PLANS_ENABLED requires DECO_AI_GATEWAY_ENABLED=true. Plans are read from the gateway; with it disabled there is no adapter to ask, so every feature gate fails OPEN on both server and client and the paid product is free fleet-wide.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>0&&!c.aiGatewayAdminToken)throw Error("STRIPE_PLAN_PRICE_IDS is set but DECO_AI_GATEWAY_ADMIN_TOKEN is not. The Stripe webhook places the paid tier through the gateway's admin API, so without the token a customer is charged and the entitlement "+"is never granted \u2014 and AI_PLAN_SET cannot repair it, it accepts only "+"'free'.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>1&&!c.stripePortalConfigurationId)console.warn("STRIPE_PLAN_PRICE_IDS maps more than one plan but STRIPE_PORTAL_CONFIGURATION_ID is unset. An org that already has a subscription cannot change tier: the account's default portal configuration lists only the legacy plans, not the tiers, so Stripe refuses the update flow. First-time checkout is unaffected.");return c}var s=null;function m(){return s??=Object.freeze(q(process.env))}import{Kysely as gc,PostgresDialect as Ac}from"kysely";import{Pool as pc}from"pg";import{createContextKey as ch,metrics as fh,propagation as uw,ROOT_CONTEXT as pw,SpanStatusCode as Iw,trace as yh}from"@opentelemetry/api";import{logs as Jh,SeverityNumber as K}from"@opentelemetry/api-logs";import{OTLPLogExporter as nw}from"@opentelemetry/exporter-logs-otlp-proto";import{PrometheusExporter as dh}from"@opentelemetry/exporter-prometheus";import{OTLPTraceExporter as sw}from"@opentelemetry/exporter-trace-otlp-proto";import{RuntimeNodeInstrumentation as ew}from"@opentelemetry/instrumentation-runtime-node";import{context as bh,propagation as _h,SpanKind as Mh,SpanStatusCode as Ph}from"@opentelemetry/api";var Ah=globalThis.fetch;import{ExportResultCode as ah}from"@opentelemetry/core";import{ExportResultCode as Z}from"@opentelemetry/core";import{mkdir as v,rename as e,writeFile as a}from"fs/promises";import{join as $}from"path";class F{bufferItems=[];bufferBytes=0;flushTimer=null;flushQueue=Promise.resolve();basePath;flushThreshold;maxBufferBytes;isShutdown=!1;knownDirs=new Set;partitionKey;constructor(h){this.basePath=h.basePath,this.flushThreshold=h.flushThreshold??1000,this.maxBufferBytes=h.maxBufferBytes??10485760,this.partitionKey=h.partitionKey;let w=h.flushIntervalMs??60000;if(w>0&&w<3600000){if(this.flushTimer=setInterval(()=>{this.flush().catch((f)=>{console.error("[NDJSONExporter] Timer flush failed:",f)})},w),this.flushTimer&&typeof this.flushTimer==="object"&&"unref"in this.flushTimer)this.flushTimer.unref()}}exportRows(h){if(this.isShutdown)return Promise.resolve({code:Z.FAILED});for(let w of h){let f=JSON.stringify(w),y=this.partitionKey?this.partitionKey(w):"";this.bufferItems.push({partition:y,json:f}),this.bufferBytes+=Buffer.byteLength(f,"utf8")+1}if(this.bufferItems.length>=this.flushThreshold||this.bufferBytes>=this.maxBufferBytes)return this.flush().then(()=>({code:Z.SUCCESS})).catch((w)=>{return console.error("[NDJSONExporter] Flush failed:",w),{code:Z.FAILED}});return Promise.resolve({code:Z.SUCCESS})}async shutdown(){if(this.isShutdown=!0,this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}async forceFlush(){try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}flush(){let w=this.flushQueue.catch(()=>{}).then(()=>this.doFlush());return this.flushQueue=w,w}async doFlush(){if(this.bufferItems.length===0)return;let h=this.bufferItems;this.bufferItems=[],this.bufferBytes=0;let w=new Map;for(let c of h){let J=w.get(c.partition);if(!J)J=[],w.set(c.partition,J);J.push(c.json)}let f=await Promise.allSettled(Array.from(w.entries()).map(([c,J])=>this.writeNDJSON(J,c).then(()=>c))),y=f.find((c)=>c.status==="rejected");if(y){let c=new Set;for(let d of f)if(d.status==="fulfilled")c.add(d.value);let J=h.filter((d)=>!c.has(d.partition));this.bufferItems=J.concat(this.bufferItems),this.bufferBytes=0;for(let d of this.bufferItems)this.bufferBytes+=Buffer.byteLength(d.json,"utf8")+1;throw y.reason}}async writeNDJSON(h,w){let f=new Date,y=[String(f.getUTCFullYear()),String(f.getUTCMonth()+1).padStart(2,"0"),String(f.getUTCDate()).padStart(2,"0"),String(f.getUTCHours()).padStart(2,"0")],c=w?$(this.basePath,w,...y):$(this.basePath,...y);if(!this.knownDirs.has(c))await v(c,{recursive:!0,mode:448}),this.knownDirs.add(c);let J=`${crypto.randomUUID()}.ndjson`,d=$(c,`.${J}.tmp`),o=$(c,J),z=h.join(`
3
3
  `)+`
4
- `;await a(d,N,{mode:384}),await e(d,k)}}import{ExportResultCode as yw}from"@opentelemetry/core";import{AggregationTemporality as dw,DataPointType as kw}from"@opentelemetry/sdk-metrics";import{ExportResultCode as Zw}from"@opentelemetry/core";var Qw=Buffer.byteLength("... [TRUNCATED]","utf8");import{BatchLogRecordProcessor as kc,LoggerProvider as zc}from"@opentelemetry/sdk-logs";import{detectResources as Wc,envDetector as oc,hostDetector as Dc,osDetector as Zc,processDetector as $c,resourceFromAttributes as mc}from"@opentelemetry/resources";import{PeriodicExportingMetricReader as Qc}from"@opentelemetry/sdk-metrics";import{NOOP_LOGGER as Xw}from"@opentelemetry/api-logs";import{NodeSDK as Xc}from"@opentelemetry/sdk-node";import{BatchSpanProcessor as Kc,SamplingDecision as o}from"@opentelemetry/sdk-trace-base";import{SpanStatusCode as Cw}from"@opentelemetry/api";var kh="__d",zh=ch("Current request"),Nh=1;var S=(h)=>{let f=new URL(h.url).searchParams.get(kh);if(f==="")return crypto.randomUUID();if(!f)f=h.headers.get("x-trace-debug-id");return f};class i{inner;constructor(h){this.inner=h}shouldSample(h,w,f,y,c,J){let d=h.getValue(zh);if(!d){if(this.inner)return this.inner.shouldSample(h,w,f,y,c,J);return{decision:o.RECORD_AND_SAMPLED}}let k=S(d);if(k)return{decision:o.RECORD_AND_SAMPLED,attributes:{"trace.debug.id":k}};if(this.inner){let N=this.inner.shouldSample(h,w,f,y,c,J);if(N.decision===o.RECORD_AND_SAMPLED){let H=crypto.randomUUID();N.attributes={...N.attributes??{},"trace.debug.id":H}}return N}return{decision:o.NOT_RECORD}}toString(){return"DebugSampler"}}class b{ratio;constructor(h){this.ratio=h}shouldSample(){if(Math.random()<this.ratio)return{decision:o.RECORD_AND_SAMPLED};return{decision:o.NOT_RECORD}}toString(){return`RatioSampler(${this.ratio})`}}var xc=new dh({preventServerStart:!0}),Cc=new i(new b(Nh));var L=yh.getTracer("studio","1.0.0"),Y=fh.getMeter("studio","1.0.0"),Wh=Jh.getLogger("studio","1.0.0"),B=(h,w,f)=>{let y={},c=f,J=f[f.length-1];if(J!==null&&typeof J==="object"&&!Array.isArray(J)&&!(J instanceof Error)&&Object.getPrototypeOf(J)===Object.prototype)y=J,c=f.slice(0,-1);let d=c.map((k)=>{if(k instanceof Error)return`${k.name}: ${k.message}`;if(typeof k==="object")try{return JSON.stringify(k)}catch{return"[Object]"}return String(k)}).join(" ");Wh.emit({severityNumber:h,severityText:w,body:d,attributes:{"log.source":"console",...y}})},x={error:console.error.bind(console),warn:console.warn.bind(console),debug:console.debug.bind(console)};console.error=(...h)=>{B(K.ERROR,"ERROR",h),x.error(...h)};console.warn=(...h)=>{B(K.WARN,"WARN",h),x.warn(...h)};console.debug=(...h)=>{B(K.DEBUG,"DEBUG",h),x.debug(...h)};function C(h,w){if(!w)return h;let f=new URL(h);if(!f.searchParams.has("sslmode"))f.searchParams.set("sslmode","verify-full");return f.toString()}async function oh(){let h=Z(),{DBOS:w}=await import("@dbos-inc/dbos-sdk");w.setConfig(R({systemDatabaseUrl:C(h.databaseUrl,h.databasePgSsl),poolSize:h.dbosPoolSize,executorID:h.podName,listenQueues:[]})),await q({databaseUrl:C(h.databaseUrl,h.databasePgSsl)},async()=>{await w.launch(),await w.shutdown()})}if(import.meta.main)(async()=>{try{await oh(),console.log("DBOS system-schema migrations completed."),process.exit(0)}catch(h){console.error("DBOS system-schema migration failed:",h),process.exit(1)}})();export{oh as migrateDbos};
4
+ `;await a(d,z,{mode:384}),await e(d,o)}}import{ExportResultCode as yw}from"@opentelemetry/core";import{AggregationTemporality as dw,DataPointType as ow}from"@opentelemetry/sdk-metrics";import{ExportResultCode as mw}from"@opentelemetry/core";var Qw=Buffer.byteLength("... [TRUNCATED]","utf8");import{BatchLogRecordProcessor as oc,LoggerProvider as kc}from"@opentelemetry/sdk-logs";import{detectResources as Wc,envDetector as Nc,hostDetector as Dc,osDetector as mc,processDetector as Zc,resourceFromAttributes as $c}from"@opentelemetry/resources";import{PeriodicExportingMetricReader as Qc}from"@opentelemetry/sdk-metrics";import{NOOP_LOGGER as Xw}from"@opentelemetry/api-logs";import{NodeSDK as Xc}from"@opentelemetry/sdk-node";import{BatchSpanProcessor as Kc,SamplingDecision as N}from"@opentelemetry/sdk-trace-base";import{SpanStatusCode as Cw}from"@opentelemetry/api";var oh="__d",kh=ch("Current request"),zh=1;var S=(h)=>{let f=new URL(h.url).searchParams.get(oh);if(f==="")return crypto.randomUUID();if(!f)f=h.headers.get("x-trace-debug-id");return f};class L{inner;constructor(h){this.inner=h}shouldSample(h,w,f,y,c,J){let d=h.getValue(kh);if(!d){if(this.inner)return this.inner.shouldSample(h,w,f,y,c,J);return{decision:N.RECORD_AND_SAMPLED}}let o=S(d);if(o)return{decision:N.RECORD_AND_SAMPLED,attributes:{"trace.debug.id":o}};if(this.inner){let z=this.inner.shouldSample(h,w,f,y,c,J);if(z.decision===N.RECORD_AND_SAMPLED){let H=crypto.randomUUID();z.attributes={...z.attributes??{},"trace.debug.id":H}}return z}return{decision:N.NOT_RECORD}}toString(){return"DebugSampler"}}class T{ratio;constructor(h){this.ratio=h}shouldSample(){if(Math.random()<this.ratio)return{decision:N.RECORD_AND_SAMPLED};return{decision:N.NOT_RECORD}}toString(){return`RatioSampler(${this.ratio})`}}var Bc=new dh({preventServerStart:!0}),Cc=new L(new T(zh));var O=yh.getTracer("studio","1.0.0"),Y=fh.getMeter("studio","1.0.0"),Wh=Jh.getLogger("studio","1.0.0"),x=(h,w,f)=>{let y={},c=f,J=f[f.length-1];if(J!==null&&typeof J==="object"&&!Array.isArray(J)&&!(J instanceof Error)&&Object.getPrototypeOf(J)===Object.prototype)y=J,c=f.slice(0,-1);let d=c.map((o)=>{if(o instanceof Error)return`${o.name}: ${o.message}`;if(typeof o==="object")try{return JSON.stringify(o)}catch{return"[Object]"}return String(o)}).join(" ");Wh.emit({severityNumber:h,severityText:w,body:d,attributes:{"log.source":"console",...y}})},B={error:console.error.bind(console),warn:console.warn.bind(console),debug:console.debug.bind(console)};console.error=(...h)=>{x(K.ERROR,"ERROR",h),B.error(...h)};console.warn=(...h)=>{x(K.WARN,"WARN",h),B.warn(...h)};console.debug=(...h)=>{x(K.DEBUG,"DEBUG",h),B.debug(...h)};function C(h,w){if(!w)return h;let f=new URL(h);if(!f.searchParams.has("sslmode"))f.searchParams.set("sslmode","verify-full");return f.toString()}async function Nh(){let h=m(),{DBOS:w}=await import("@dbos-inc/dbos-sdk");w.setConfig(R({systemDatabaseUrl:C(h.databaseUrl,h.databasePgSsl),poolSize:h.dbosPoolSize,executorID:h.podName,listenQueues:[]})),await G({databaseUrl:C(h.databaseUrl,h.databasePgSsl)},async()=>{await w.launch(),await w.shutdown()})}if(import.meta.main)(async()=>{try{await Nh(),console.log("DBOS system-schema migrations completed."),process.exit(0)}catch(h){console.error("DBOS system-schema migration failed:",h),process.exit(1)}})();export{Nh as migrateDbos};