decocms 4.596.0 → 4.597.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 (434) hide show
  1. package/dist/client/assets/{AlertCircle-AllCHsc-.js → AlertCircle-BLw7QvfG.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C6w_b9ET.js → AreaChart-Cg0oUTGM.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CRw3W_qh.js → ArrowLeft-DH7F9HYx.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DSFHA030.js → ArrowRight-DZeVAIN7.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-D_GhkPcm.js → ArrowUp-C_Mw0uky.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-lNQqqERm.js → BookOpen01-9fv3inuR.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DPVXkgL4.js → CartesianChart-B1PjlPEb.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-DRsmm3_a.js → CategoricalChart-CcMGdgiC.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-D_eJlHYl.js → CheckCircle--1SXoxG_.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-C0tAiNqc.js → ChevronDown-DwO0ALfW.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-oMR2kCqB.js → ChevronSelectorVertical-Bj17dUxw.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CLxsyktD.js → ChevronUp-BaiO1bgX.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DfogeJXR.js → CreditCard01-D6jLDMwS.js} +1 -1
  14. package/dist/client/assets/{Eye-IB81hGdK.js → Eye-DvcGz393.js} +1 -1
  15. package/dist/client/assets/{File02-C5RfRHg9.js → File02-Bes4ATvL.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-d20CepTC.js → Fingerprint04-BpB7HSc7.js} +1 -1
  17. package/dist/client/assets/{Globe04-Cffx8Biv.js → Globe04-BBsqVmHb.js} +1 -1
  18. package/dist/client/assets/{Image01-C3Wojgfs.js → Image01-D2QOi7x6.js} +1 -1
  19. package/dist/client/assets/{Key01-UGh5N-kc.js → Key01-CDcaZkCg.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DtDmaSrQ.js → LayoutLeft-19qu82-A.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-CG6bLE37.js → LinkBroken01-Z9hP4zTf.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-MLX2eDnv.js → MessageCircle01-DjShhQqZ.js} +1 -1
  23. package/dist/client/assets/{Minus-DUjfsLQY.js → Minus-ChoEICrx.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DKJLays1.js → Monitor01-DtssQiym.js} +1 -1
  25. package/dist/client/assets/{Play-BkcMWNbk.js → Play-DatgPxza.js} +1 -1
  26. package/dist/client/assets/{Plus-D84NDH53.js → Plus-GSWEwEm-.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-qG6ZRY0w.js → ReferenceLine-Cl-8dOcW.js} +1 -1
  28. package/dist/client/assets/{SearchMd-lt6LFgc6.js → SearchMd-DhrJsmFj.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BswoJp3c.js → ShoppingBag01-DQR5ci-Q.js} +1 -1
  30. package/dist/client/assets/{Sun-C0_F0NYL.js → Sun-Dpzqhodu.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DX564T5r.js → SwitchHorizontal01-NAHL2C3Y.js} +1 -1
  32. package/dist/client/assets/{Tool01-C5c4fHOY.js → Tool01-DJqLAFcI.js} +1 -1
  33. package/dist/client/assets/{Tooltip-C4Wh1SAv.js → Tooltip-fSWtSvYM.js} +1 -1
  34. package/dist/client/assets/{Trash01-CFKOdFdJ.js → Trash01-Br_8Dd8k.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-Me2ucQTV.js → TrendUp01-Dnr3ECEr.js} +1 -1
  36. package/dist/client/assets/{Upload01-A4xsFQc7.js → Upload01-B1gnueEL.js} +1 -1
  37. package/dist/client/assets/{UserCheck01-CLDfWEEJ.js → UserCheck01-CpLKejEQ.js} +1 -1
  38. package/dist/client/assets/{UserSquare-bg0CCGVi.js → UserSquare-D1HQ9ju8.js} +1 -1
  39. package/dist/client/assets/{Users01-CCleMxbO.js → Users01-qnd_BT_N.js} +1 -1
  40. package/dist/client/assets/{XClose-DNnGTtOa.js → XClose-BbVr5nc7.js} +1 -1
  41. package/dist/client/assets/{Zap-DS2xaVCg.js → Zap-B1JA6VL5.js} +1 -1
  42. package/dist/client/assets/{access-gate-52qvSzpx.js → access-gate-m6QmHtAD.js} +1 -1
  43. package/dist/client/assets/{add-connection-dialog-D3rS-xq2.js → add-connection-dialog-BIOFD97r.js} +1 -1
  44. package/dist/client/assets/agent-app-gA5AyVqP.js +1 -0
  45. package/dist/client/assets/{agent-assets-CLgcJh-a.js → agent-assets-CHRKOS2u.js} +1 -1
  46. package/dist/client/assets/{agent-automation-Asj6Mdk8.js → agent-automation-to9UMVoQ.js} +1 -1
  47. package/dist/client/assets/{agent-automations-DpoiR-xj.js → agent-automations-VyCqK5Re.js} +1 -1
  48. package/dist/client/assets/{agent-blog-D5adgi1l.js → agent-blog-CZmmsFZV.js} +2 -2
  49. package/dist/client/assets/{agent-blog-post-DD7TPgaA.js → agent-blog-post-CB4b_awk.js} +2 -2
  50. package/dist/client/assets/{agent-calendar-p4pBUNRv.js → agent-calendar-Cp5T7Qbr.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-DX42M_HX.js → agent-capabilities-B8dQ_ZB8.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-BuuNPgeS.js → agent-connect-sources-BoFtzsla.js} +1 -1
  53. package/dist/client/assets/agent-deck-ClKs4ShI.js +1 -0
  54. package/dist/client/assets/{agent-e2e-CrXJS3S8.js → agent-e2e-DYM6mhlb.js} +1 -1
  55. package/dist/client/assets/agent-experiments-w6nqO2q9.js +1 -0
  56. package/dist/client/assets/agent-file-DrrOEB-e.js +1 -0
  57. package/dist/client/assets/{agent-hosting-DJ4qshnA.js → agent-hosting-BSxiIsrn.js} +1 -1
  58. package/dist/client/assets/{agent-icon-m6DF-jGw.js → agent-icon-ButaHLCM.js} +1 -1
  59. package/dist/client/assets/agent-library-UPbdmbqv.js +1 -0
  60. package/dist/client/assets/agent-library-file-D6WFOASp.js +1 -0
  61. package/dist/client/assets/agent-overview-BYbm2jhI.js +1 -0
  62. package/dist/client/assets/{agent-releases-C0fErCE1.js → agent-releases-DxZH4Aop.js} +1 -1
  63. package/dist/client/assets/agent-settings-BlXhuK2P.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-B4mZ_3uO.js → agent-site-editor-BVDN7iAe.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-BzxDSxJp.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-r61QYhf7.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-BwuXgbhX.js +1 -0
  68. package/dist/client/assets/agent-view-Ba6W0Fqn.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-1CRBHJVM.js → agent-view-guard-DgSIx4Rz.js} +1 -1
  70. package/dist/client/assets/{ai-providers-DxMPTF-k.js → ai-providers-BLNPddjm.js} +1 -1
  71. package/dist/client/assets/{alert-Dt-QBVYu.js → alert-B3inZFUT.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-CULzJT-Z.js → analytics-sections-CTzZQv_A.js} +1 -1
  73. package/dist/client/assets/api-keys-BxUV6FZ8.js +1 -0
  74. package/dist/client/assets/{api-keys-DRuBz837.js → api-keys-D5yeJ96D.js} +1 -1
  75. package/dist/client/assets/{app-editor-hPksTJHj.js → app-editor-2zianuY6.js} +1 -1
  76. package/dist/client/assets/{asset-utils-Wh7PCoXS.js → asset-utils-FQrgs53r.js} +1 -1
  77. package/dist/client/assets/{auth-DTCWUZG7.js → auth-DlYbrS5R.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-DpL2hlxq.js → auth-catchall-DovAKkgg.js} +1 -1
  79. package/dist/client/assets/{auth-entry-Df1KBDSc.js → auth-entry-BeARMnxr.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-CY_uRTFl.js → auth-split-layout-CnJuCNmk.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-CxIxVe3C.js → authenticate-and-persist-oauth-Da9zgsaC.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-CtlM_d9l.js → automation-list-row-Cfemy10y.js} +1 -1
  83. package/dist/client/assets/{automation-runs-CUFatpqX.js → automation-runs-DhXlimIG.js} +1 -1
  84. package/dist/client/assets/{automations-DJcRHo1X.js → automations-BgwFiPYA.js} +1 -1
  85. package/dist/client/assets/{badge-BMdL2EZN.js → badge-CaU7DsCB.js} +1 -1
  86. package/dist/client/assets/{block-document-xUve5SNT.js → block-document-D8KopzHb.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-DF85bSj9.js → blocks-preview-workspace-context-Rebn6SsT.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-Cw0RWK3h.js → blocks-tab-states-CrihrdT0.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-Cxts0MFJ.js → blog-preview-url-DM-lGGhF.js} +1 -1
  90. package/dist/client/assets/{blog-schema-7GeVkqmc.js → blog-schema-0H53CE3k.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-DHJ3KgAL.js → blog-source-gate-B_GOyP5p.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-D2wthXO5.js → blog-view-gate-JzJtOYCL.js} +1 -1
  93. package/dist/client/assets/{buckets-Budfl0cb.js → buckets-CVXQhalH.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-CvGA95vT.js → build-improve-prompt-doc-DgQdPFxI.js} +1 -1
  95. package/dist/client/assets/{calendar-CWY9RcGt.js → calendar-DZVkXGhA.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-Cpo9EAh2.js → capability-load-error-p87qKYlk.js} +1 -1
  97. package/dist/client/assets/{category-editor-Djma6ffb.js → category-editor-BEomaUlT.js} +1 -1
  98. package/dist/client/assets/{category-tree-CwYyvh-H.js → category-tree-DUNY9TG8.js} +1 -1
  99. package/dist/client/assets/{chart-J7juGn_W.js → chart-D6tXreNC.js} +1 -1
  100. package/dist/client/assets/chat-context-DsLpz7ew.js +44 -0
  101. package/dist/client/assets/{chat-draft-D3TYZAMx.js → chat-draft-ODW7kZWh.js} +1 -1
  102. package/dist/client/assets/{checkbox-DyPy5TYa.js → checkbox-Bo6uhaqm.js} +1 -1
  103. package/dist/client/assets/{choose-editor-Bxibi_V8.js → choose-editor-CptxA-2o.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-BZdMcx2v.js → cli-auth-success-1ibs6VjG.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-CEMWX5NG.js → cms-settings-editor-q2PD6d-f.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-D_M6m3uA.js → cms-store-drafts-Da9bgH02.js} +1 -1
  107. package/dist/client/assets/{collapsible-RVJX7MiV.js → collapsible-Cug6Pp5N.js} +1 -1
  108. package/dist/client/assets/{collection-detail-Du67mRiO.js → collection-detail-BFFv8EBD.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-BNBHMUXK.js → collection-display-button-BeCmwRLy.js} +1 -1
  110. package/dist/client/assets/{collection-search-0Y7SoOe-.js → collection-search-EKEj7NYh.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-Cuy0AVX7.js → collection-table-wrapper-QVfey_uk.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-CaUB-XIg.js → collection-tabs-THb2ZDUR.js} +1 -1
  113. package/dist/client/assets/{combobox-BU7hsWmk.js → combobox-CkvX9Of3.js} +1 -1
  114. package/dist/client/assets/{command-D0_H05ec.js → command-BA_BVypg.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-BzJEcjRJ.js → companion-mcps-section-mGMTO-21.js} +1 -1
  116. package/dist/client/assets/{config-XJHmvtsd.js → config-DeP83Mjq.js} +1 -1
  117. package/dist/client/assets/{connect-CC6AcPLN.js → connect-C-ernj3S.js} +1 -1
  118. package/dist/client/assets/{connect-key-BpMVre0r.js → connect-key-B_1YtIEI.js} +1 -1
  119. package/dist/client/assets/{connect-layout-BNX1pnZc.js → connect-layout-DhcQffyl.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-BhW7w8Tz.js → connect-source-dialog-DXcG_Psx.js} +1 -1
  121. package/dist/client/assets/{connection-e0YK2xiz.js → connection-DUUZ34Ff.js} +1 -1
  122. package/dist/client/assets/{connection-card-h1GpQqz7.js → connection-card-BbAx38kp.js} +1 -1
  123. package/dist/client/assets/{connection-detail-w5Ybk1Ow.js → connection-detail-NnYjF1KC.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-ee1lsDjo.js → connection-form-helpers-DEnW0ORZ.js} +1 -1
  125. package/dist/client/assets/{connection-slug-pVnJQqDL.js → connection-slug-Wiu7W5Ro.js} +1 -1
  126. package/dist/client/assets/{connections-ClU5q4ro.js → connections-Bs7MQX46.js} +1 -1
  127. package/dist/client/assets/{content-tab-BbCE8gow.js → content-tab-CJmgvKjP.js} +3 -3
  128. package/dist/client/assets/{context-BE0varMc.js → context-NTAokEvz.js} +1 -1
  129. package/dist/client/assets/{context-menu-sx0q9-17.js → context-menu-BvoelKnM.js} +1 -1
  130. package/dist/client/assets/{context-shell-D7PccH2n.js → context-shell-BHDXVCRL.js} +3 -3
  131. package/dist/client/assets/{create-organization-dialog-BcfxwKOk.js → create-organization-dialog-dpA6uSHX.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-BQDk63PY.js → daily-pulse-83GnvMF_.js} +1 -1
  133. package/dist/client/assets/{delete-copy-UCaGT3P5.js → delete-copy-C8ERxzK8.js} +1 -1
  134. package/dist/client/assets/{device-hint-Dzp4aTKL.js → device-hint-5lkWUASQ.js} +1 -1
  135. package/dist/client/assets/{discover-BulaXBT4.js → discover-C9WBot8k.js} +1 -1
  136. package/dist/client/assets/{domain-settings-k3Y2Q4CL.js → domain-settings-C7L5I-Ps.js} +1 -1
  137. package/dist/client/assets/{drawer-cDJNr0UL.js → drawer-Daptw1OQ.js} +1 -1
  138. package/dist/client/assets/{editor-D_TP8Zgm.js → editor-CGkWZSA7.js} +1 -1
  139. package/dist/client/assets/{editor-classes-0NCpfosP.js → editor-classes-eVnt4vp_.js} +1 -1
  140. package/dist/client/assets/{empty-state-BQLWtNQT.js → empty-state--1H9mx7y.js} +1 -1
  141. package/dist/client/assets/{empty-state-Oh19ZuqH.js → empty-state-Dfjwzagg.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-Bo6k5V9E.js → experiments-tab-choice-BVYrDQR_.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-Dcybc2XD.js → extract-connection-data-Csm2LLbI.js} +1 -1
  144. package/dist/client/assets/{feature-gate-VZsia_Hs.js → feature-gate-DP0JLkRq.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-DR7Clo4c.js → feature-paywall-CuECkoDT.js} +1 -1
  146. package/dist/client/assets/{file-explorer-81aDQUj9.js → file-explorer-_xEpPcaK.js} +1 -1
  147. package/dist/client/assets/{file-preview-X_NFkOVD.js → file-preview-J0KlNfCN.js} +1 -1
  148. package/dist/client/assets/{file-share-button-DOAhwfe0.js → file-share-button-1KUHqOgB.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-DR-V5GzT.js → file-type-icon-sxJ1fqoc.js} +1 -1
  150. package/dist/client/assets/{folder-icon-BEMnD9Mo.js → folder-icon-DfGo2fIA.js} +1 -1
  151. package/dist/client/assets/{form-C_3vsTjd.js → form-msT-Nxjd.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-B6xzv3L_.js → frame-navigation-COhxs0rP.js} +1 -1
  153. package/dist/client/assets/{gateway-client-CwKPU6S4.js → gateway-client-mrWD5tSx.js} +1 -1
  154. package/dist/client/assets/{general-BfGOnQz-.js → general-C0agZL75.js} +1 -1
  155. package/dist/client/assets/{github-icon-mqy7WjXH.js → github-icon-DGEVXZ8I.js} +1 -1
  156. package/dist/client/assets/{held-block-view-8Ktr6QKV.js → held-block-view-DUdsae86.js} +1 -1
  157. package/dist/client/assets/{home-CoqulptE.js → home-b8Q92l_T.js} +1 -1
  158. package/dist/client/assets/{home-overview-Cqkq8Gda.js → home-overview-CC9gx7Fg.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-BfDZiVDB.js → hosted-reconcile-DH-KyBYi.js} +1 -1
  160. package/dist/client/assets/{icon-button-BZNuDXN_.js → icon-button-am6dsn69.js} +1 -1
  161. package/dist/client/assets/{index-DbcKAUw4.js → index-0yoxovPZ.js} +1 -1
  162. package/dist/client/assets/{index-CHcZo0sN.js → index-4q-RLwEk.js} +1 -1
  163. package/dist/client/assets/{index-C4RiD3F4.js → index-B26uWbt_.js} +1 -1
  164. package/dist/client/assets/{index-6k36ehsW.js → index-B2vvUsuK.js} +3 -3
  165. package/dist/client/assets/{index-CbxeeWwk.js → index-BYSU1KyF.js} +1 -1
  166. package/dist/client/assets/{index-BOcJIVCK.js → index-C0WKaVxy.js} +1 -1
  167. package/dist/client/assets/index-C4wvi2v7.css +1 -0
  168. package/dist/client/assets/{index-WlTKCESy.js → index-C9UqnrNB.js} +1 -1
  169. package/dist/client/assets/{index-CGp5e78v.js → index-CDpTFqpR.js} +1 -1
  170. package/dist/client/assets/{index-Pt2Dg3Hd.js → index-CsQM0oHc.js} +1 -1
  171. package/dist/client/assets/{index-DYr4DM-_.js → index-D0GEyG42.js} +13 -13
  172. package/dist/client/assets/{index-BZvJPANC.js → index-D8TuIm4d.js} +1 -1
  173. package/dist/client/assets/{index-NYmpejop.js → index-D9zWR22g.js} +1 -1
  174. package/dist/client/assets/{index-BNMtwLGo.js → index-DETAJcho.js} +1 -1
  175. package/dist/client/assets/{index-gxh0eyFF.js → index-DOrEGYb6.js} +1 -1
  176. package/dist/client/assets/{index-Ccjzy_Yg.js → index-DeLM7Rkt.js} +1 -1
  177. package/dist/client/assets/{index-_N6kCtM_.js → index-DgVQUrlP.js} +1 -1
  178. package/dist/client/assets/{index-unMd35fT.js → index-DjWhIee5.js} +1 -1
  179. package/dist/client/assets/{index-redirect-BKO9Og1V.js → index-redirect-uY3IN3rF.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-BU4GB00s.js → infiniteQueryObserver-B6MEVTvt.js} +1 -1
  181. package/dist/client/assets/{infra-billing-Dp0t1IaK.js → infra-billing-4CjwqMVB.js} +1 -1
  182. package/dist/client/assets/input-Bzo1OCNz.js +1 -0
  183. package/dist/client/assets/{input-CH4Gjy3Z.js → input-DFHiqhmH.js} +3 -3
  184. package/dist/client/assets/{integration-icon-CThPNDLT.js → integration-icon-DazsuPNm.js} +1 -1
  185. package/dist/client/assets/{item-actions-Cd5OpKeM.js → item-actions-Yc8vcOg0.js} +1 -1
  186. package/dist/client/assets/{jira-icon-C-P_hNAy.js → jira-icon-CsaUkukk.js} +1 -1
  187. package/dist/client/assets/{label-B05fQV9w.js → label-BLEP0nH0.js} +1 -1
  188. package/dist/client/assets/{layout-D62GW4Xy.js → layout-c8-5uC_O.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-BOk_1MDr.js → legacy-admin-welcome-dialog-DwTePCPF.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-CwnshL_u.js → legacy-agents-deep-DL8ddlj5.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-B9wSse7w.js → legacy-main-redirect-DjX7qNM7.js} +1 -1
  192. package/dist/client/assets/library-BD-JkXMr.js +1 -0
  193. package/dist/client/assets/{library-tab-6C3BHzqG.js → library-tab-DOE8AqM2.js} +1 -1
  194. package/dist/client/assets/{login-De-omavu.js → login--MYPwAKH.js} +1 -1
  195. package/dist/client/assets/{markdown-B2-eb-Eh.js → markdown-COcXeIyG.js} +29 -29
  196. package/dist/client/assets/{mcp-app-renderer-Bj6Yqj6W.js → mcp-app-renderer-CDjvP8t9.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-CBgv_I8z.js → mcp-oauth-DESKCBIm.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-DsdWz5k5.js → mcp-oauth-ciX7wK5f.js} +1 -1
  199. package/dist/client/assets/{members-ai18MRiF.js → members-DKu_OhY9.js} +1 -1
  200. package/dist/client/assets/{memory-lLPqtjY5.js → memory-BL_L-Q3R.js} +1 -1
  201. package/dist/client/assets/{mock-board-DUqjanpY.js → mock-board--Ssgy-f6.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-C4oSGu0z.js → monaco-editor-C0bUrX9K.js} +1 -1
  203. package/dist/client/assets/{monitoring-DHvjzxYU.js → monitoring-D8_3FcCV.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-C3be9geZ.js → monitoring-stats-row-L0MR9OOK.js} +1 -1
  205. package/dist/client/assets/{multi-select-UQ5zKqaL.js → multi-select-VurXcITl.js} +1 -1
  206. package/dist/client/assets/{mustache-zZXkHC_L.js → mustache-CSfql4oE.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-CrcD_duq.js → named-rule-step-BfgtyNIr.js} +1 -1
  208. package/dist/client/assets/{named-rule-view--duBjHJb.js → named-rule-view-D1pVQoPd.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-C8GsS3yA.js → new-project-dialog-CsFe_Ifg.js} +1 -1
  210. package/dist/client/assets/{new-project-store-DIzzNFh1.js → new-project-store-D3tRl8ms.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-B-5nafY2.js → oauth-callback-ai-provider-DYAZYkh4.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-oqd3bXUP.js → oauth-callback-hp7uk30l.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-K2APicmR.js → oauth-consent-Buw7iq_C.js} +1 -1
  214. package/dist/client/assets/{onboarding-o9kHZxKA.js → onboarding-CPK6bWVC.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-BZLoClec.js → openai-conversation-naly2gFj.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-pk8rg5oK.js → optimistic-project-sidebar-views-DWktyZnu.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-wSsYm9_l.js → order-monitor-day-lcmZ_W6T.js} +1 -1
  218. package/dist/client/assets/{organization-choice-BUBhZfiC.js → organization-choice-5J7_8tx5.js} +1 -1
  219. package/dist/client/assets/{orgs-DB1GWwYI.js → orgs-CTAlA2gh.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-DPjhNkN7.js → own-accounts-section-CL-lWHC3.js} +1 -1
  221. package/dist/client/assets/pair-IZ41S3dI.js +48 -0
  222. package/dist/client/assets/{parse-sections-Ck3UjwM8.js → parse-sections-bc3ugIU6.js} +2 -2
  223. package/dist/client/assets/{plan-ClnTFbh5.js → plan-C-tbQnGr.js} +1 -1
  224. package/dist/client/assets/{plan-ladder-C-nHzfvE.js → plan-ladder-CpzLELQm.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-DX0TEH1I.js → plan-usage-card-Djn1n4Si.js} +1 -1
  226. package/dist/client/assets/{popover-CH9oXjqN.js → popover-BN8yB-gL.js} +1 -1
  227. package/dist/client/assets/{post-calendar-Nt_O_Z94.js → post-calendar-B4Ra6fFT.js} +1 -1
  228. package/dist/client/assets/{post-editor-TZTGdKmL.js → post-editor-k1GseIfg.js} +1 -1
  229. package/dist/client/assets/{preview-content-C_30wxn1.js → preview-content-DrUsIXaL.js} +1 -1
  230. package/dist/client/assets/{preview-dialog-C2Vuh1sp.js → preview-dialog-Bl4nn6SJ.js} +1 -1
  231. package/dist/client/assets/{preview-panel-S5oFn61k.js → preview-panel-CPnrD7jy.js} +1 -1
  232. package/dist/client/assets/{preview-tab-ClSpAkmV.js → preview-tab-DJCbL8xU.js} +3 -3
  233. package/dist/client/assets/{primitives-CrCuT0LR.js → primitives-7GEzJciO.js} +1 -1
  234. package/dist/client/assets/{product-picker-dialog-mmy97YMY.js → product-picker-dialog-BsLtWfxx.js} +1 -1
  235. package/dist/client/assets/{profile-dIGLO0tj.js → profile-LVIi9kQl.js} +1 -1
  236. package/dist/client/assets/{project-app-view-CL2brGAW.js → project-app-view-CfT_gJz2.js} +1 -1
  237. package/dist/client/assets/{project-apps-BPLYxsdb.js → project-apps-B5076YmV.js} +1 -1
  238. package/dist/client/assets/{project-icon-BwoqBozX.js → project-icon-NAtCd-2E.js} +1 -1
  239. package/dist/client/assets/{project-index-Cb0knzOx.js → project-index-BDBvdHSq.js} +1 -1
  240. package/dist/client/assets/project-reports-Cc5D1Wqe.js +1 -0
  241. package/dist/client/assets/project-tasks-BzeYrrtq.js +1 -0
  242. package/dist/client/assets/{projects-AVd6wnYc.js → projects-0NQRxQMi.js} +1 -1
  243. package/dist/client/assets/{projects-empty-state-C7JwlwFZ.js → projects-empty-state-Bhe-Ul5b.js} +1 -1
  244. package/dist/client/assets/{prompts-CYDVxedF.js → prompts-fURd1E3_.js} +1 -1
  245. package/dist/client/assets/record-editor-BiyfqDBa.js +1 -0
  246. package/dist/client/assets/{redirect-editor-Buclfl6T.js → redirect-editor-CysPkosR.js} +1 -1
  247. package/dist/client/assets/reports-CuT-F3LQ.js +1 -0
  248. package/dist/client/assets/{reports-D5WruuUL.js → reports-K6JrO8c3.js} +1 -1
  249. package/dist/client/assets/{reports-onboarding-CFJe1Yh6.js → reports-onboarding-COfLbzIl.js} +1 -1
  250. package/dist/client/assets/{reports-tab-BEIeHpqv.js → reports-tab-BNdKCtPv.js} +2 -2
  251. package/dist/client/assets/repositories-BcVuKWWr.js +1 -0
  252. package/dist/client/assets/{repositories-DWThiX2p.js → repositories-noe5N_6-.js} +1 -1
  253. package/dist/client/assets/{repository-binding--4TzKXBA.js → repository-binding-DC98qYdg.js} +1 -1
  254. package/dist/client/assets/{repository-picker-v7iVCEUT.js → repository-picker-BLhEIBPT.js} +1 -1
  255. package/dist/client/assets/{require-capability-CAcEc9hc.js → require-capability-r0eDYoNg.js} +1 -1
  256. package/dist/client/assets/{required-auth-layout-B8y_MNr7.js → required-auth-layout-Dq6PcaGv.js} +1 -1
  257. package/dist/client/assets/{reset-password-ClGMHHI7.js → reset-password-CeDXY3wu.js} +1 -1
  258. package/dist/client/assets/{resizable-COGor2Ly.js → resizable-CDUVHUkS.js} +1 -1
  259. package/dist/client/assets/{resolve-tab-icon-kXOqF-K7.js → resolve-tab-icon-CCnYS1It.js} +1 -1
  260. package/dist/client/assets/{review-settings-BvN5yP9q.js → review-settings-Cfg9u4wr.js} +1 -1
  261. package/dist/client/assets/{role-color-BqI6S_sH.js → role-color-j5ZAxcKG.js} +1 -1
  262. package/dist/client/assets/{roles-DiINUuVU.js → roles-DNr0gwrs.js} +1 -1
  263. package/dist/client/assets/{route-BZ58rj3h.js → route-Bny9Lc4o.js} +1 -1
  264. package/dist/client/assets/route-CpGHqQae.js +1 -0
  265. package/dist/client/assets/{route-page-header-ZxjL9WRx.js → route-page-header-B-0s5BiJ.js} +1 -1
  266. package/dist/client/assets/{route-Do9iV-Fa.js → route-zFj6XsMD.js} +1 -1
  267. package/dist/client/assets/{sandbox-git-api-BySMpBzA.js → sandbox-git-api-CJ3-CkeV.js} +1 -1
  268. package/dist/client/assets/{sandbox-lifecycle-context-D7Mo6SMT.js → sandbox-lifecycle-context-DJVkUHOC.js} +1 -1
  269. package/dist/client/assets/{save-status-DUiju85M.js → save-status-5VC4rIi2.js} +1 -1
  270. package/dist/client/assets/{schema-DzB5MtLQ.js → schema-B5pk7azZ.js} +1 -1
  271. package/dist/client/assets/{schema-DcMtzh-L.js → schema-CAZOGJTH.js} +1 -1
  272. package/dist/client/assets/{scroll-area-CT5pMPAI.js → scroll-area-CXINzzvW.js} +1 -1
  273. package/dist/client/assets/{search-input-B5JIa11y.js → search-input-Dmx6N7Z7.js} +1 -1
  274. package/dist/client/assets/{search-toggle-B8OLzvCM.js → search-toggle-uhoeAt8V.js} +1 -1
  275. package/dist/client/assets/{secret-picker-DQnzetrk.js → secret-picker-CdBDBcEP.js} +1 -1
  276. package/dist/client/assets/{secrets-CohVPhQA.js → secrets-DdH9QnxK.js} +1 -1
  277. package/dist/client/assets/{section-array-field-BmxRdqC1.js → section-array-field-RxYDyVUT.js} +1 -1
  278. package/dist/client/assets/{sections-4E-Bc25K.js → sections-CvVT6jo9.js} +1 -1
  279. package/dist/client/assets/{sections-editor-DdYFn1-8.js → sections-editor-FJjN0xqY.js} +1 -1
  280. package/dist/client/assets/{select-BzOd4QV1.js → select-PhQ1dHUc.js} +1 -1
  281. package/dist/client/assets/{select-model-9pBB2Ftb.js → select-model-DsYbAwnw.js} +1 -1
  282. package/dist/client/assets/{seo-editor-D0KLiDO0.js → seo-editor-DTf59Uvx.js} +1 -1
  283. package/dist/client/assets/{separator-DpCH28os.js → separator-BspBySaE.js} +1 -1
  284. package/dist/client/assets/{session-runtime-fnzDQ8ba.js → session-runtime-CWUXrNEM.js} +1 -1
  285. package/dist/client/assets/settings-tab-CoHHJ63I.js +1 -0
  286. package/dist/client/assets/{sheet-D0InrjqO.js → sheet-DsBIaG5c.js} +1 -1
  287. package/dist/client/assets/{shell-layout-D8-R0sqM.js → shell-layout-DfpoOTvP.js} +1 -1
  288. package/dist/client/assets/{site-draft-actions-tjwxcrrz.js → site-draft-actions-bEXIW2Ci.js} +1 -1
  289. package/dist/client/assets/{site-draft-view-DY3MROcG.js → site-draft-view-DL1xS2bS.js} +1 -1
  290. package/dist/client/assets/site-editor-OTjpPpEJ.js +1 -0
  291. package/dist/client/assets/{site-editor-toast-BfB5E3lf.js → site-editor-toast-DI5QMuI-.js} +1 -1
  292. package/dist/client/assets/{skills-BgqMrKh3.js → skills-sOnNG6z3.js} +1 -1
  293. package/dist/client/assets/{slider-CiWmLveF.js → slider-DiJZup4s.js} +1 -1
  294. package/dist/client/assets/{sortable.esm-BnSJzMhQ.js → sortable.esm-AH9TOEe6.js} +1 -1
  295. package/dist/client/assets/{sso-C44FERRz.js → sso-DJUFzVd6.js} +1 -1
  296. package/dist/client/assets/{suggestion-Bnw1hfqZ.js → suggestion-BKU1aw0O.js} +1 -1
  297. package/dist/client/assets/{super-agent-icon-C6LdYrGo.js → super-agent-icon-KeQzZLhO.js} +1 -1
  298. package/dist/client/assets/{switch-C9KE8PCO.js → switch-CavZ0Td_.js} +1 -1
  299. package/dist/client/assets/{synced-repos-CZPSEENY.js → synced-repos-CpobCKuE.js} +1 -1
  300. package/dist/client/assets/{tab-icon-glyph-CWJ_EMCz.js → tab-icon-glyph-BQpSs905.js} +1 -1
  301. package/dist/client/assets/{table-BabWDHl3.js → table-_0cphCuz.js} +1 -1
  302. package/dist/client/assets/{tabs-CLDwlIBj.js → tabs-CB9wyI2L.js} +1 -1
  303. package/dist/client/assets/{task-board-D-EY7IDb.js → task-board-DAlkVSdn.js} +1 -1
  304. package/dist/client/assets/{task-key-Bf-5jxEO.js → task-key-D_de_YB4.js} +1 -1
  305. package/dist/client/assets/{task-route-C5TECNuR.js → task-route-gaZIOP1Q.js} +1 -1
  306. package/dist/client/assets/{task-status-GtZc7DUE.js → task-status-Dm8lN6h7.js} +1 -1
  307. package/dist/client/assets/{taskboard-analytics-Bgm_SXDy.js → taskboard-analytics-BRO72FRF.js} +1 -1
  308. package/dist/client/assets/tasks-BjMbQPZT.js +1 -0
  309. package/dist/client/assets/{tasks-fCd-XF0B.js → tasks-LD7DAdjg.js} +1 -1
  310. package/dist/client/assets/{textarea-zXJwvg1C.js → textarea-C5yT2rai.js} +1 -1
  311. package/dist/client/assets/{thread-analytics-CToiKm9y.js → thread-analytics-TKt2gIA9.js} +1 -1
  312. package/dist/client/assets/{thread-button-D0_qm01C.js → thread-button-jA6lXOHW.js} +1 -1
  313. package/dist/client/assets/{thread-intent-HcaWskQl.js → thread-intent-DC5UuPI5.js} +1 -1
  314. package/dist/client/assets/{thread-route-DkHlrR6F.js → thread-route-BmXDes0-.js} +1 -1
  315. package/dist/client/assets/{thread-route-DISRw9NA.js → thread-route-NC2TJMv2.js} +1 -1
  316. package/dist/client/assets/{thread-sheet-body-BwoNg8G-.js → thread-sheet-body-BATHVA9a.js} +1 -1
  317. package/dist/client/assets/{time-range-picker-BJLph571.js → time-range-picker-BdF4LahQ.js} +1 -1
  318. package/dist/client/assets/{toggle-group--KiJldtG.js → toggle-group-B2L0Fh-A.js} +1 -1
  319. package/dist/client/assets/{tool-set-selector-DigSDBNa.js → tool-set-selector-sYj6JiLu.js} +1 -1
  320. package/dist/client/assets/{toolbar-icon-button-Cl7Yg4qZ.js → toolbar-icon-button-BleYd0k2.js} +1 -1
  321. package/dist/client/assets/{tooltip-CpNT29Lg.js → tooltip-C0XDZQqg.js} +1 -1
  322. package/dist/client/assets/{tooltipContext-HwIIkoOx.js → tooltipContext-B5tdv-rH.js} +1 -1
  323. package/dist/client/assets/{track-CnwyZ_-v.js → track-DkQvKF_r.js} +1 -1
  324. package/dist/client/assets/{types-U1xib9QI.js → types-BmRTIjW9.js} +1 -1
  325. package/dist/client/assets/{url-slug-o-5lOvNU.js → url-slug-HTy1TIRr.js} +1 -1
  326. package/dist/client/assets/{usage-stats-BpSzWrpu.js → usage-stats-BbuSELy1.js} +21 -21
  327. package/dist/client/assets/{use-ai-providers-CL55euJG.js → use-ai-providers-CGeOv9zD.js} +1 -1
  328. package/dist/client/assets/{use-api-keys-DJl2frpX.js → use-api-keys-BBDeQmvb.js} +1 -1
  329. package/dist/client/assets/{use-apply-named-rule-Sto1nxzx.js → use-apply-named-rule-c0_gPvLu.js} +1 -1
  330. package/dist/client/assets/use-ask-in-chat-DQt8TEjL.js +1 -0
  331. package/dist/client/assets/{use-automations-DC0esRjE.js → use-automations-UppgD9x4.js} +1 -1
  332. package/dist/client/assets/{use-autosave-C-v37PG8.js → use-autosave-DP-Xo78G.js} +1 -1
  333. package/dist/client/assets/use-blocks-v8-project-BzyehgAq.js +1 -0
  334. package/dist/client/assets/use-blog-view-BPx89KE1.js +1 -0
  335. package/dist/client/assets/{use-chat-layout-state-DuyGxNZ8.js → use-chat-layout-state-CYDJQho2.js} +1 -1
  336. package/dist/client/assets/{use-cms-publish-actions-Cef_LTMV.js → use-cms-publish-actions-sZFllHA3.js} +1 -1
  337. package/dist/client/assets/{use-connect-companion-BaxDHT_c.js → use-connect-companion-DM6nloeD.js} +1 -1
  338. package/dist/client/assets/{use-connection-BrUoHInG.js → use-connection-BlQSFvXZ.js} +1 -1
  339. package/dist/client/assets/{use-content-sync-C-N3pUjd.js → use-content-sync-CmcdSf-W.js} +1 -1
  340. package/dist/client/assets/{use-copy-BosHh8hs.js → use-copy-_EjHpFlu.js} +1 -1
  341. package/dist/client/assets/{use-current-view-CQkQuEPS.js → use-current-view-DJmYWR9r.js} +1 -1
  342. package/dist/client/assets/{use-date-fns-locale-CL5KHXt3.js → use-date-fns-locale-8kgkXGzy.js} +1 -1
  343. package/dist/client/assets/{use-debounced-autosave-Dd0HvZCV.js → use-debounced-autosave-43RSVqCJ.js} +1 -1
  344. package/dist/client/assets/{use-debounced-value-D92V-nO1.js → use-debounced-value-CtUf9JOP.js} +1 -1
  345. package/dist/client/assets/{use-deco-credits-BbacUwGD.js → use-deco-credits-CrAjq5eE.js} +1 -1
  346. package/dist/client/assets/{use-decopilot-events-CXr5p6cn.js → use-decopilot-events-CwyVZVbh.js} +1 -1
  347. package/dist/client/assets/{use-delete-block-CcnRhYow.js → use-delete-block-CziQYeFw.js} +1 -1
  348. package/dist/client/assets/{use-delete-connection-C5CW1TMU.js → use-delete-connection-5KBJh_4H.js} +1 -1
  349. package/dist/client/assets/{use-deployment-admin-CrPYh0iy.js → use-deployment-admin-vod10AYl.js} +1 -1
  350. package/dist/client/assets/{use-entitlements-CtKDjSCc.js → use-entitlements-D-BsJsBn.js} +1 -1
  351. package/dist/client/assets/{use-fast-preview-draft-url-oDvx6qNG.js → use-fast-preview-draft-url-CTybhvJ7.js} +1 -1
  352. package/dist/client/assets/{use-file-configs-d8oveZti.js → use-file-configs-zM1_UDsD.js} +1 -1
  353. package/dist/client/assets/{use-id-selection-YDCUJkW7.js → use-id-selection-B-V9WQKU.js} +1 -1
  354. package/dist/client/assets/{use-in-settings-CSXNVGfX.js → use-in-settings-CKmb_d-Z.js} +1 -1
  355. package/dist/client/assets/{use-inbox-feed-BmDqTf6H.js → use-inbox-feed-BIRoBmxG.js} +1 -1
  356. package/dist/client/assets/{use-infinite-scroll-Bk9vcUF2.js → use-infinite-scroll-D0fDDIyn.js} +1 -1
  357. package/dist/client/assets/{use-join-requests-C1GX0oi8.js → use-join-requests-C7XAF7yu.js} +1 -1
  358. package/dist/client/assets/{use-main-panel-tabs-D6PrQKj_.js → use-main-panel-tabs-CFBnVDX4.js} +1 -1
  359. package/dist/client/assets/{use-mcp-auth-status-BXEHX9A9.js → use-mcp-auth-status-Cvpzf8bf.js} +1 -1
  360. package/dist/client/assets/{use-mcp-client-Dn7GJEfR.js → use-mcp-client-C25DU1dz.js} +1 -1
  361. package/dist/client/assets/{use-mcp-prompts-BMSkxk3j.js → use-mcp-prompts-DFURxOZn.js} +1 -1
  362. package/dist/client/assets/{use-mcp-tools-BNwnVHgE.js → use-mcp-tools-DU4EJz2s.js} +1 -1
  363. package/dist/client/assets/{use-mobile-Bwg13Khk.js → use-mobile-DFpIEPum.js} +1 -1
  364. package/dist/client/assets/{use-move-blocks-sK7PvIYV.js → use-move-blocks-HLsANXZk.js} +1 -1
  365. package/dist/client/assets/{use-navigate-to-agent-CzSAlpxn.js → use-navigate-to-agent-BGA3nmOF.js} +1 -1
  366. package/dist/client/assets/{use-never-published-DAOoxMmV.js → use-never-published-BnWhN5r2.js} +1 -1
  367. package/dist/client/assets/{use-org-fs-ISEYfoeP.js → use-org-fs-BrF60Lzy.js} +1 -1
  368. package/dist/client/assets/{use-org-notice-BTIpWL_p.js → use-org-notice-BmwTtllY.js} +1 -1
  369. package/dist/client/assets/{use-org-repo-syncs-BPpDk25r.js → use-org-repo-syncs-Bi8Ut_qX.js} +1 -1
  370. package/dist/client/assets/{use-org-sso-BZklGZ0G.js → use-org-sso-CpaEO6G5.js} +1 -1
  371. package/dist/client/assets/{use-organization-settings-CYN_vYgA.js → use-organization-settings-CeyizmcT.js} +1 -1
  372. package/dist/client/assets/{use-panel-navigate-BAJB306G.js → use-panel-navigate-BvdMbLN8.js} +1 -1
  373. package/dist/client/assets/{use-project-native-view-presence-D1vQT4ZH.js → use-project-native-view-presence-Cj3jJM1f.js} +1 -1
  374. package/dist/client/assets/{use-project-scope-DVgj2Lmp.js → use-project-scope-TiMALD5Y.js} +1 -1
  375. package/dist/client/assets/{use-recent-apps-DV9D4KSi.js → use-recent-apps-CAx2Sj77.js} +1 -1
  376. package/dist/client/assets/{use-reports-diagnostic-CxJVNJu1.js → use-reports-diagnostic-BWUL8kSa.js} +1 -1
  377. package/dist/client/assets/{use-sandbox-events-BqtbFabs.js → use-sandbox-events-CrjWSBYb.js} +1 -1
  378. package/dist/client/assets/{use-secrets-BZGVO7wb.js → use-secrets-DYs_2mJJ.js} +1 -1
  379. package/dist/client/assets/{use-section-preview-base-_QoALJol.js → use-section-preview-base-bQf9hU5_.js} +1 -1
  380. package/dist/client/assets/{use-sidebar-collapsed-UNm7xHPV.js → use-sidebar-collapsed-Cynyx51j.js} +1 -1
  381. package/dist/client/assets/{use-tags-DHI_FfeM.js → use-tags-Ds4Jpuu1.js} +1 -1
  382. package/dist/client/assets/{use-task-board-analytics-BWCmk6Id.js → use-task-board-analytics-5UJcKLaD.js} +1 -1
  383. package/dist/client/assets/{use-task-board-item-prs-CNeKRqLE.js → use-task-board-item-prs-C0gHPfb5.js} +1 -1
  384. package/dist/client/assets/{use-task-board-items-VCVSuTG_.js → use-task-board-items-osFWr4F_.js} +1 -1
  385. package/dist/client/assets/{use-task-board-prompts-Cym2n16B.js → use-task-board-prompts-eYQIzP7F.js} +1 -1
  386. package/dist/client/assets/{use-task-metadata-DF5Dujx5.js → use-task-metadata-DqYio8UA.js} +1 -1
  387. package/dist/client/assets/{use-thread-outputs-y7iH8wUp.js → use-thread-outputs-DJQKtV2q.js} +1 -1
  388. package/dist/client/assets/{use-view-draft-kind-CofWB4b8.js → use-view-draft-kind-BYPtD8MA.js} +1 -1
  389. package/dist/client/assets/{use-voice-input-DuTeTois.js → use-voice-input-wPU7RMRz.js} +1 -1
  390. package/dist/client/assets/useInfiniteQuery-EaWUgCtN.js +1 -0
  391. package/dist/client/assets/{useQueries-D5FTElAG.js → useQueries-DKbjoyEp.js} +1 -1
  392. package/dist/client/assets/useSuspenseInfiniteQuery-D-KEcWQs.js +1 -0
  393. package/dist/client/assets/{users-9DnwrQDD.js → users-BaX74SiF.js} +1 -1
  394. package/dist/client/assets/{utils-B6aCtHUu.js → utils-C8EWsG3o.js} +1 -1
  395. package/dist/client/assets/{variant-calendar-BnXhZ8PW.js → variant-calendar-56I1fIKh.js} +1 -1
  396. package/dist/client/assets/{variant-matcher-override-BH-xFtlD.js → variant-matcher-override-BsSZ5yFL.js} +1 -1
  397. package/dist/client/assets/{view-header-mqw-cAVS.js → view-header-B-qrTWpm.js} +1 -1
  398. package/dist/client/assets/{virtual-mcp-sCTq7xTd.js → virtual-mcp-DeWQ4GR6.js} +1 -1
  399. package/dist/client/assets/{watch-sse-pool-cOL-0uUN.js → watch-sse-pool-DSisQksD.js} +1 -1
  400. package/dist/client/index.html +2 -2
  401. package/dist/server/server.js +694 -694
  402. package/package.json +1 -1
  403. package/dist/client/assets/agent-app-CEj8SI4b.js +0 -1
  404. package/dist/client/assets/agent-deck-Dtfd3CpA.js +0 -1
  405. package/dist/client/assets/agent-experiments-BdbuSony.js +0 -1
  406. package/dist/client/assets/agent-file-DyBlPMUW.js +0 -1
  407. package/dist/client/assets/agent-library-CfpThBWc.js +0 -1
  408. package/dist/client/assets/agent-library-file-CUOBgwAH.js +0 -1
  409. package/dist/client/assets/agent-overview-D-zPptb2.js +0 -1
  410. package/dist/client/assets/agent-settings-CdKoAPBN.js +0 -1
  411. package/dist/client/assets/agent-site-editor-code-l_JomA6X.js +0 -2
  412. package/dist/client/assets/agent-site-editor-content-349ebUkh.js +0 -1
  413. package/dist/client/assets/agent-site-editor-preview-86h2RYbj.js +0 -1
  414. package/dist/client/assets/agent-view-BNcVDHOV.js +0 -1
  415. package/dist/client/assets/api-keys-D9RiubWH.js +0 -1
  416. package/dist/client/assets/chat-context-BW-slB_k.js +0 -43
  417. package/dist/client/assets/index-yFD0_BNc.css +0 -1
  418. package/dist/client/assets/input-DAb55cm0.js +0 -1
  419. package/dist/client/assets/library-CE-7zswq.js +0 -1
  420. package/dist/client/assets/pair-D_71JV_h.js +0 -48
  421. package/dist/client/assets/project-reports-Es3eodEf.js +0 -1
  422. package/dist/client/assets/project-tasks-BObhyp-g.js +0 -1
  423. package/dist/client/assets/record-editor-C24399Kq.js +0 -1
  424. package/dist/client/assets/reports-DwRlsCV2.js +0 -1
  425. package/dist/client/assets/repositories-BCW1MaJF.js +0 -1
  426. package/dist/client/assets/route-DvsPl2dV.js +0 -1
  427. package/dist/client/assets/settings-tab-C7l6cj8f.js +0 -1
  428. package/dist/client/assets/site-editor-TTvFFMn0.js +0 -1
  429. package/dist/client/assets/tasks-C_2YCqC5.js +0 -1
  430. package/dist/client/assets/use-ask-in-chat-CT64oCbR.js +0 -1
  431. package/dist/client/assets/use-blocks-v8-project-CHvN3d67.js +0 -1
  432. package/dist/client/assets/use-blog-view-CVo7QYbd.js +0 -1
  433. package/dist/client/assets/useInfiniteQuery-AR0nCC2r.js +0 -1
  434. package/dist/client/assets/useSuspenseInfiniteQuery-CcdFZ__h.js +0 -1
@@ -0,0 +1,48 @@
1
+ import{c as $,r as z,j as l,g5 as be,b as U,au as De,m as K,aY as gt,g8 as Ve,aH as Oe,aI as Ne,bk as ns,a6 as me,q as xt,L as lt,K as pe,g9 as ot,am as as,e as ls,t as Be,i as ht,aj as os,R as rs,h as is,B as ye,b6 as bt,ai as cs,ga as us,gb as yt,a9 as ds,F as fs,C as Je,d as Qe,dL as ms,gc as rt,et as ps,gd as gs}from"./index-B2vvUsuK.js";import{e as xs,A as Xe,aw as hs,a6 as bs,a as it,ax as ys,k as js,Y as vs,ay as Ss,az as jt,aA as ks,a5 as Ue,aB as Ns,aC as vt,aD as de,aE as we,g as ws,b as _s,av as Ts,aF as Cs}from"./agent-icon-ButaHLCM.js";import{t as Ie,f as Is,b as $s}from"./Tool01-DJqLAFcI.js";import{i as St}from"./ArrowRight-DZeVAIN7.js";import{b as Ms,C as As,a as Ps}from"./collapsible-Cug6Pp5N.js";import{u as Es}from"./use-copy-_EjHpFlu.js";import{h as kt,i as Ls,j as $e,k as Rs,P as zs,a as Fs,C as Ds,l as Os,n as Bs,F as Us,E as Hs,o as Ks}from"./usage-stats-BbuSELy1.js";import{h as Nt}from"./UserCheck01-CpLKejEQ.js";import{t as qs}from"./task-key-D_de_YB4.js";import{a as Ws}from"./use-task-board-items-osFWr4F_.js";import{l as Gs}from"./config-DeP83Mjq.js";import{t as Vs}from"./task-route-gaZIOP1Q.js";import{a as Js}from"./repository-binding-DC98qYdg.js";import{u as Me,t as Qs,g as ge}from"./utils-CVEq3hMx.js";import{i as Xs}from"./TrendUp01-Dnr3ECEr.js";import{l as Ys,c as Zs,r as en,m as tn}from"./thread-intent-DC5UuPI5.js";import{f as je,y as sn,u as ve,z as nn,b as an,B as wt,E as ln,F as Ae,G as on,H as rn}from"./chat-context-DsLpz7ew.js";import{a as Ye,u as cn,b as un}from"./shell-layout-DfpoOTvP.js";import{c as dn}from"./content-blocks-o63cs2vh.js";import{M as fn}from"./mcp-app-renderer-CDjvP8t9.js";import{g as _t}from"./types-BmRTIjW9.js";import{o as mn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as Tt,a as Ct,c as It}from"./tooltip-C0XDZQqg.js";import{c as pn,u as gn,a as xn}from"./use-mcp-client-C25DU1dz.js";import{s as $t,g as Mt,a as At}from"./gateway-client-mrWD5tSx.js";import{i as Pt}from"./AlertCircle-BLw7QvfG.js";import{s as hn}from"./Eye-DvcGz393.js";import{s as bn}from"./XClose-BbVr5nc7.js";import{n as He}from"./BookOpen01-9fv3inuR.js";import{s as yn}from"./File02-Bes4ATvL.js";import{i as jn}from"./SearchMd-DhrJsmFj.js";import{a as Ze}from"./use-panel-navigate-BvdMbLN8.js";import{a as _e}from"./Image01-D2QOi7x6.js";import{b as Et}from"./use-entitlements-D-BsJsBn.js";import{I as vn,M as Lt}from"./markdown-COcXeIyG.js";import{c as Sn,S as kn,a as Nn,b as wn}from"./sheet-DsBIaG5c.js";import{I as Se}from"./integration-icon-DazsuPNm.js";import{u as Rt}from"./use-connection-BlQSFvXZ.js";import{u as zt}from"./use-navigate-to-agent-BGA3nmOF.js";import{s as _n}from"./UserSquare-D1HQ9ju8.js";import{g as Tn}from"./use-mcp-prompts-DFURxOZn.js";import{t as Cn}from"./ChevronDown-DwO0ALfW.js";import{i as In}from"./Monitor01-DtssQiym.js";import{a as $n}from"./use-thread-outputs-DJQKtV2q.js";import{F as Mn}from"./file-type-icon-sxJ1fqoc.js";const Ft=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function An(){const s=$.c(5),[e]=z.useState(Pn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Ft.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Pn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Ft.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const En={damping:.7,stiffness:.05,mass:1.25},Ln=70,Rn=1e3/60,zn=350;let Pe=!1;globalThis.document?.addEventListener("mousedown",()=>{Pe=!0});globalThis.document?.addEventListener("mouseup",()=>{Pe=!1});globalThis.document?.addEventListener("click",()=>{Pe=!1});const Fn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Pe)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const N=b.getRangeAt(0);return N.commonAncestorContainer.contains(h.current)||h.current?.contains(N.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),m=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(N){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=N,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:N}=this;if(!s.targetScrollTop)return N;if(b?.targetScrollTop===N)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(N,{scrollElement:h.current,contentElement:y.current}),N),0);return b={targetScrollTop:N,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Ln}}},[]),f=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const N=Date.now()+(Number(b.wait)||0),j=Re(i.current,b.animation),{ignoreEscapes:w=!1}=b;let k,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{k=Date.now()}):k=N+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,M=performance.now(),P=(M-(d.lastTick??M))/Rn;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=M),u()||N>Date.now())return v();if(T<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return k>Date.now()?(S=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Re(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,k-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{m(!0),r(!1)},[m,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:N,ignoreScrollToTop:j}=d;let{lastScrollTop:w=N}=d;d.lastScrollTop=N,d.ignoreScrollToTop=void 0,j&&j>N&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||N===j)return;if(u()){m(!0),r(!1);return}const k=N>w,S=N<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}S&&(m(!0),r(!1)),k&&m(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[m,r,u,d]),x=z.useCallback(({target:b,deltaY:N})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&N<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),r(!1))},[m,r,d]),h=ct(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=ct(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let N;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,k=w-(N??w);if(d.resizeDifference=k,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),k>=0){const S=Re(i.current,N?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:zn})}else d.isNearBottom&&(m(!1),r(!0));N=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===k&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:f,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function ct(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Le=new Map;function Re(...s){const e={...En};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Le.has(n)||Le.set(n,Object.freeze(e)),t?"instant":Le.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[x,h]=z.useState(f??!1),{handleCopy:y,copied:b}=Es(),N=a==="loading",j=a==="error",w=!!(o&&o.trim()),k=w||!!p,S=u==="subtask",v=(i??!1)||x,_=Fn({initial:N?"instant":!1}),T=l.jsxs(Ms,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(As,{disabled:!k,className:K("group/tool flex items-center gap-2 w-full py-1.5 text-left transition-colors",!k&&"cursor-default"),"aria-disabled":!k,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(De,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",k&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),k&&l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(De,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:K("shrink-0 text-sm font-normal transition-colors",j?"text-warning/80":v?"text-foreground":"text-muted-foreground [@media(hover:hover)]:group-hover/tool:text-foreground",N&&"shimmer"),children:e}),n&&!(v&&w)?l.jsx("span",{className:K("min-w-0 flex-1 truncate text-sm text-muted-foreground/60",N&&"shimmer"),children:n}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(kt,{usage:t})]}),k&&l.jsx(Ps,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"ml-[7px] mb-1 border-l border-border pl-[17px]",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-60 overflow-y-auto",children:l.jsx("p",{ref:_.contentRef,className:"text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(gt,{className:"size-3.5"}):l.jsx(xs,{className:"size-3.5"})})]})})}))})]});return S?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const Dt=4;function Ot(s){const e=$.c(8),{count:t,noun:n,onClick:a}=s,o=U();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(St,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function et(s){const e=$.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const m=Ve(a);if(m===null){u=null;break e}const d=new Date(m);o=d.toLocaleString(),e[6]!==n?(c=K("text-sm text-muted-foreground select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}const Dn=Oe({item:Oe({id:Ne(),title:Ne(),status:Ne(),keySeq:ns().nullable(),virtualMcpId:Ne().nullable()})});function On(s){if(s.state!=="output-available")return null;const e=Dn.safeParse(Me(s.output)??s.output);return e.success?e.data.item:null}function Bn(s){const e=$.c(17),{task:t}=s,n=U(),{org:a,locator:o}=me(),c=xt(),{items:i}=Ws();let u;e[0]!==t?(u=M=>M.id===t.id,e[0]=t,e[1]=u):u=e[1];const r=i.find(u),m=r??t,d=()=>{r||c.invalidateQueries({queryKey:pe.taskBoardItems(o)})},f=Js(m.virtualMcpId),p=Gs(m.status,n),g=p.visual.icon,x=qs(a.slug,m.keySeq),h=Vs(a.slug,m);let y;e[2]!==f?(y=f?l.jsx(Xe,{icon:f.icon??null,name:f.title,size:"sm"}):l.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:l.jsx(Nt,{size:16})}),e[2]=f,e[3]=y):y=e[3];const b="mt-0.5 flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",N=K("size-3.5 shrink-0",p.visual.iconClassName);let j;e[4]!==g||e[5]!==N?(j=l.jsx(g,{className:N,"aria-hidden":!0}),e[4]=g,e[5]=N,e[6]=j):j=e[6];let w;e[7]!==p.label?(w=l.jsx("span",{className:"shrink-0",children:p.label}),e[7]=p.label,e[8]=w):w=e[8];const k=f?.title;let S;e[9]!==x||e[10]!==k?(S=[x,k].filter(Boolean).map(Un),e[9]=x,e[10]=k,e[11]=S):S=e[11];let v;e[12]!==j||e[13]!==w||e[14]!==S?(v=l.jsxs("span",{className:b,children:[j,w,S]}),e[12]=j,e[13]=w,e[14]=S,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(De,{size:16,"aria-hidden":!0,className:"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-foreground"}),e[16]=_):_=e[16];const T=l.jsxs(l.Fragment,{children:[y,l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate text-sm font-medium text-foreground",children:m.title}),v]}),_]});return m.virtualMcpId?l.jsx(lt,{to:"/$org/projects/$agentId/tasks/{-$taskKey}",params:{org:a.slug,agentId:m.virtualMcpId,taskKey:h},className:"group my-2 flex items-center gap-3 rounded-xl border border-border bg-card px-3 py-2.5 shadow-xs transition-colors hover:bg-accent/50 focus-ring",onClick:d,children:T}):l.jsx(lt,{to:"/$org/tasks/{-$taskKey}",params:{org:a.slug,taskKey:h},className:"group my-2 flex items-center gap-3 rounded-xl border border-border bg-card px-3 py-2.5 shadow-xs transition-colors hover:bg-accent/50 focus-ring",onClick:d,children:T})}function Un(s){return l.jsx("span",{className:"truncate before:mr-1.5 before:content-['·']",children:s},s)}function Ke(s){const e=$.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>ot(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(ot(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let m;return e[7]!==r?(m=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=m):m=e[8],m}function Hn(s){return{planning:{icon:l.jsx(Xs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Kn=1200;function qe(s){const e=$.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let m;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(m=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=m):m=e[7],m}function qn(s){const e=$.c(22),{startedAt:t}=s,n=U(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},Kn);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Ys(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ie,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let N;e[7]!==t?(N=t!==null&&l.jsx(Ke,{since:t}),e[7]=t,e[8]=N):N=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==N?(j=l.jsx(qe,{icon:y,title:b,summary:h.detail,state:"loading",trailing:N}),e[9]=h.detail,e[10]=b,e[11]=N,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=Hn(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Ke,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=l.jsx(qe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Wn(s){const e=$.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(An,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(Ke,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Gn=2e4;function Vn(s){const e=$.c(9),{startedAt:t}=s,n=U(),a=Ye(1e3),o=je(),i=(t!==null?a-t:0)>=Gn;let u;e[0]!==t?(u=l.jsx(qn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let m;return e[6]!==u||e[7]!==r?(m=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=m):m=e[8],m}function Jn(s){const e=$.c(24),{duration:t,parts:n,isStreaming:a}=s,o=U();let c;e[0]!==n?(c=n.every(Yn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let m;if(e[5]!==i||e[6]!==a||e[7]!==n){const N=n.map(Xn).join(`
2
+ `).trim().split(`
3
+ `).filter(Boolean),j=a?N[N.length-1]??"":N[0]??"";m=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==i||e[10]!==n){const b=n.map(Qn).join(`
4
+
5
+ `);f=!i&&b.trim()?b.trim():null,e[9]=i,e[10]=n,e[11]=f}else f=e[11];const p=f;let g;e[12]!==a?(g=a?l.jsx(Ie,{className:"size-4"}):l.jsx(hs,{className:"size-4"}),e[12]=a,e[13]=g):g=e[13];let x;e[14]!==a||e[15]!==o||e[16]!==r?(x=a?o("chat.thinkingIndicator.thinking"):r,e[14]=a,e[15]=o,e[16]=r,e[17]=x):x=e[17];const h=a?"loading":"idle";let y;return e[18]!==p||e[19]!==d||e[20]!==g||e[21]!==x||e[22]!==h?(y=l.jsx(qe,{icon:g,title:x,summary:d,detail:p,state:h,detailVariant:"prose"}),e[18]=p,e[19]=d,e[20]=g,e[21]=x,e[22]=h,e[23]=y):y=e[23],y}function Qn(s){return s.text??""}function Xn(s){return s.text??""}function Yn(s){return s.text?.includes("REDACTED")}function Zn(s){const e=$.c(24),{org:t}=me(),n=xt(),a=Zs(),o=as();let c;e[0]!==o||e[1]!==s?(c=async x=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const y=(await o.call("COLLECTION_THREADS_GET",{id:s})).item?.metadata??{},N=(y.expanded_tools??[]).filter(w=>w.toolName!==x.toolName);N.push({...x,expandedAt:new Date().toISOString()});const j={...mn(y),expanded_tools:N};return await o.call("COLLECTION_THREADS_UPDATE",{id:s,data:{metadata:j}}),N},e[0]=o,e[1]=s,e[2]=c):c=e[2];let i,u,r;e[3]!==t||e[4]!==n||e[5]!==s?(i=async x=>{const h=pe.ensureTask(t.id,s??"");await n.cancelQueries({queryKey:h});const y=n.getQueryData(h),N=(y?.metadata?.expanded_tools??[]).filter(j=>j.toolName!==x.toolName);return N.push({...x,expandedAt:new Date().toISOString()}),n.setQueryData(h,j=>j&&{...j,metadata:{...j.metadata??{},expanded_tools:N}}),{previous:y}},u=()=>{n.invalidateQueries({queryKey:pe.ensureTask(t.id,s??"")})},r=(x,h,y)=>{const b=pe.ensureTask(t.id,s??"");y?.previous===void 0?n.removeQueries({queryKey:b,exact:!0}):n.setQueryData(b,y.previous),Be.error(x instanceof Error?x.message:"Failed to expand tool")},e[3]=t,e[4]=n,e[5]=s,e[6]=i,e[7]=u,e[8]=r):(i=e[6],u=e[7],r=e[8]);let m;e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==r?(m={mutationFn:c,onMutate:i,onSuccess:u,onError:r},e[9]=c,e[10]=i,e[11]=u,e[12]=r,e[13]=m):m=e[13];const d=ls(m);let f;e[14]!==a||e[15]!==d||e[16]!==t||e[17]!==n||e[18]!==s?(f=x=>{if(!s||!a)return;const h=pe.ensureTask(t.id,s),y=n.getQueryData(h),N=(y?.metadata?.expanded_tools??[]).filter(w=>w.toolName!==x.toolName);N.push({...x,expandedAt:new Date().toISOString()});const j={...y?.metadata??{},expanded_tools:N};n.setQueryData(h,w=>w&&{...w,metadata:j}),a.patchThread({id:s,metadata:j}),d.mutate(x)},e[14]=a,e[15]=d,e[16]=t,e[17]=n,e[18]=s,e[19]=f):f=e[19];const p=f;let g;return e[20]!==p||e[21]!==d.isPending||e[22]!==d.mutate?(g={addOrReplace:d.mutate,addOrReplaceEager:p,isPending:d.isPending},e[20]=p,e[21]=d.isPending,e[22]=d.mutate,e[23]=g):g=e[23],g}function ea(s){if(s<1024)return`${s} B`;if(s<1024*1024){const t=s/1024;return t<10?`${t.toFixed(1)} KB`:`${Math.round(t)} KB`}const e=s/(1024*1024);return e<10?`${e.toFixed(1)} MB`:`${Math.round(e)} MB`}function ta(s,e,t,n){const{data:a,isLoading:o}=ht({queryKey:pe.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const c=await pn({connectionId:e,orgId:t,orgSlug:n});try{const{tools:i}=await c.listTools(),u=$t(s);return i.find(r=>r.name===u)??null}finally{await c.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:a??void 0,isLoading:o}}const sa={read:{icon:it,labelKey:"chat.generic.tool.read"},write:{icon:$s,labelKey:"chat.generic.tool.write"},edit:{icon:vs,labelKey:"chat.generic.tool.edit"},grep:{icon:jn,labelKey:"chat.generic.tool.grep"},glob:{icon:js,labelKey:"chat.generic.tool.glob"},bash:{icon:ys,labelKey:"chat.generic.tool.bash"},read_tool_output:{icon:it,labelKey:"chat.generic.tool.readToolOutput"},read_resource:{icon:yn,labelKey:"chat.generic.tool.readResource"},read_prompt:{icon:He,labelKey:"chat.generic.tool.readPrompt"},skill:{icon:He,labelKey:"chat.generic.tool.skill"},enable_tool:{icon:Is,labelKey:"chat.generic.tool.enableTool"},open_in_agent:{icon:os,labelKey:"chat.generic.tool.openInAgent"},sandbox:{icon:bs,labelKey:"chat.generic.tool.sandbox"}},Bt="studio:bash-sleep-start:v1",na=200;function aa(s,e,t,n=na){const a=s.filter(([o])=>o!==e);for(a.push([e,t]);a.length>n;)a.shift();return a}function la(){try{const s=sessionStorage.getItem(Bt);if(!s)return[];const e=JSON.parse(s);return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&Number.isFinite(t[1])):[]}catch{return[]}}function oa(s){try{const e=la(),t=e.find(([a])=>a===s);if(t)return t[1];const n=Date.now();return sessionStorage.setItem(Bt,JSON.stringify(aa(e,s,n))),n}catch{return Date.now()}}function Ut(s,e){const t=$.c(2);let n;t[0]!==s?(n=()=>oa(s),t[0]=s,t[1]=n):n=t[1];const a=z.useState(n)[0];return e??a}function Ht(s){const e=Math.ceil(s/1e3);if(e<60)return`${e}s`;const t=Math.floor(e/60),n=e%60;return n?`${t}m ${n}s`:`${t}m`}function ra(s){const e=$.c(5),{toolCallId:t,durationMs:n,anchorMs:a}=s,o=U(),c=Ye(1e3),u=Ut(t,a)+n-c;let r;e[0]!==u||e[1]!==o?(r=u>0?o("chat.generic.waitingFor",{duration:Ht(u)}):o("chat.generic.wrappingUp"),e[0]=u,e[1]=o,e[2]=r):r=e[2];let m;return e[3]!==r?(m=l.jsx("span",{className:"tabular-nums",children:r}),e[3]=r,e[4]=m):m=e[4],m}const ia=1e4;function ca(s){const e=$.c(7),{toolCallId:t,anchorMs:n}=s,a=U(),o=Ye(1e3),c=Ut(t,n),i=o-c;if(i<ia){let m;return e[0]!==a?(m=a("chat.generic.preparing"),e[0]=a,e[1]=m):m=e[1],m}let u;e[2]!==i||e[3]!==a?(u=a("chat.generic.runningFor",{elapsed:Ht(i)}),e[2]=i,e[3]=a,e[4]=u):u=e[4];let r;return e[5]!==u?(r=l.jsx("span",{className:"tabular-nums",children:u}),e[5]=u,e[6]=r):r=e[6],r}const ua={s:1e3,m:6e4,h:36e5,d:864e5};function da(s){const e=/(?:^|[\s;&|(])sleep((?:\s+[\d.]+[smhd]?)+)/g;let t=0,n=!1;for(const a of s.matchAll(e))for(const o of a[1].trim().split(/\s+/)){const c=/^([\d.]+)([smhd]?)$/.exec(o);if(!c)continue;const i=Number.parseFloat(c[1]);Number.isFinite(i)&&(t+=i*(ua[c[2]||"s"]??1e3),n=!0)}return n?t:null}function Ee(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function xe(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}function Ce(s){const e=xe(s);if(e===""||e==="[Non-serializable value]")return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const fa=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function ma(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const n of e.parts)if(n.type==="text"&&typeof n.text=="string")t.push(n.text);else if(n.type==="reasoning")t.push(`## Reasoning
6
+ ${n.text}`);else if(n.type==="source-url")t.push(`## Source URL
7
+ ${n.url}`);else if(n.type==="source-document")t.push(`## Source Document
8
+ ${n.title}`);else if(n.type==="file")t.push(`## File
9
+ ${n.filename??n.url}`);else if(n.type!=="step-start"){if(fa(n)){const a=n.type.startsWith("tool-")?n.type.slice(5):n.toolName;if(n.state==="input-streaming")t.push(`## ${a}
10
+ Input streaming...`);else if(n.state==="input-available"){const o=xe(n.input).slice(0,20);t.push(`## ${a}
11
+ ### Input
12
+ ${o||"[No input]"}...`)}else if(n.state==="approval-requested")t.push(`## ${a}
13
+ Approval requested...`);else if(n.state==="approval-responded")t.push(`## ${a}
14
+ Approval responded...`);else if(n.state==="output-available"){const o=xe(n.input).slice(0,40),c=xe(n.output).slice(0,40);t.push(n.output!=null?`## ${a}
15
+ Input: ${o||"[No input]"}...
16
+ Output: ${c||"[No output]"}...`:`## ${a}
17
+ Input: ${o||"[No input]"}...
18
+ Output: Tool responded with no output`)}else if(n.state==="output-error"){const o=xe(n.input).slice(0,40);t.push(n.errorText?`## ${a}
19
+ Input: ${o||"[No input]"}...
20
+ Error: ${n.errorText}`:`## ${a}
21
+ Input: ${o||"[No input]"}...
22
+ Error: Tool responded with an error`)}else if(n.state==="output-denied"){const o=xe(n.input).slice(0,40);t.push(`## ${a}
23
+ Input: ${o||"[No input]"}...
24
+ Output: Tool execution was denied`)}}}return t.length>0?t.join(`
25
+
26
+ `):null}function ut(s){const e=s&&typeof s=="object"&&"created_at"in s?s.created_at:void 0;return typeof e=="string"||e instanceof Date?Ve(e):null}function pa(s){const e=s&&typeof s=="object"&&"timeout"in s?s.timeout:void 0;return Math.min(typeof e=="number"?e:3e4,12e4)}function Te(s){const e=$.c(7),{icon:t,label:n}=s;let a;e[0]!==t?(a=l.jsx(Tt,{asChild:!0,children:l.jsx("span",{className:"flex items-center",children:t})}),e[0]=t,e[1]=a):a=e[1];let o;e[2]!==n?(o=l.jsx(Ct,{side:"top",children:n}),e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==a||e[5]!==o?(c=l.jsxs(It,{children:[a,o]}),e[4]=a,e[5]=o,e[6]=c):c=e[6],c}function ga(s){const e=$.c(19),{annotations:t,toolMeta:n}=s,a=U();let o;e[0]!==n?(o=_t(n),e[0]=n,e[1]=o):o=e[1];const c=!!o;if(!t&&!c)return null;let i;e[2]!==c||e[3]!==a?(i=c&&l.jsx(Te,{icon:l.jsx(jt,{}),label:a("chat.generic.annotation.interactive")}),e[2]=c,e[3]=a,e[4]=i):i=e[4];let u;e[5]!==t?.readOnlyHint||e[6]!==a?(u=t?.readOnlyHint&&l.jsx(Te,{icon:l.jsx(hn,{}),label:a("chat.generic.annotation.readOnly")}),e[5]=t?.readOnlyHint,e[6]=a,e[7]=u):u=e[7];let r;e[8]!==t?.destructiveHint||e[9]!==a?(r=t?.destructiveHint&&l.jsx(Te,{icon:l.jsx(Pt,{}),label:a("chat.generic.annotation.destructive")}),e[8]=t?.destructiveHint,e[9]=a,e[10]=r):r=e[10];let m;e[11]!==t?.openWorldHint||e[12]!==a?(m=t?.openWorldHint&&l.jsx(Te,{icon:l.jsx(Ue,{}),label:a("chat.generic.annotation.openWorld")}),e[11]=t?.openWorldHint,e[12]=a,e[13]=m):m=e[13];let d;return e[14]!==i||e[15]!==u||e[16]!==r||e[17]!==m?(d=l.jsxs(l.Fragment,{children:[i,u,r,m]}),e[14]=i,e[15]=u,e[16]=r,e[17]=m,e[18]=d):d=e[18],d}function xa(s){return s<1?`${Math.round(s*1e3)}ms`:s<10?`${s.toFixed(1)}s`:`${Math.round(s)}s`}function ha(s){const e=$.c(13),{latency:t,outputBytes:n}=s,a=typeof t=="number"&&t>0,o=typeof n=="number"&&n>=0;if(!a&&!o)return null;let c;e[0]!==a||e[1]!==t?(c=a&&l.jsx("span",{children:xa(t)}),e[0]=a,e[1]=t,e[2]=c):c=e[2];let i;e[3]!==o||e[4]!==a?(i=a&&o&&l.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[3]=o,e[4]=a,e[5]=i):i=e[5];let u;e[6]!==o||e[7]!==n?(u=o&&l.jsx("span",{children:ea(n)}),e[6]=o,e[7]=n,e[8]=u):u=e[8];let r;return e[9]!==c||e[10]!==i||e[11]!==u?(r=l.jsxs("span",{className:"inline-flex items-center gap-1.5 text-2xs font-mono tabular-nums text-muted-foreground/60 px-1 leading-none",children:[c,i,u]}),e[9]=c,e[10]=i,e[11]=u,e[12]=r):r=e[12],r}function ba(s,e,t,n){switch(s){case"input-streaming":case"input-available":return n?n("chat.generic.preparing"):"Preparing...";case"approval-requested":return n?n("chat.generic.waitingForApproval"):"Waiting for your approval";case"output-denied":return n?n("chat.generic.cancelled"):"Cancelled";case"output-error":return t??(n?n("chat.generic.failed"):"Failed");case"output-available":{if(e==null)return n?n("chat.generic.done"):"Done";if(typeof e=="string"){const a=e.trim();return a.length>100?a.slice(0,100)+"…":a}if(typeof e=="object"){for(const a of Object.keys(e)){const o=e[a];if(typeof o=="string"&&o.trim()){const c=o.trim();return c.length>100?c.slice(0,100)+"…":c}}return""}return String(e).slice(0,100)}default:return""}}function dt(s){const e=$.c(76),{part:t,annotations:n,latency:a,outputBytes:o,isLastMessage:c,toolMeta:i}=s,u=U(),r="toolName"in t&&typeof t.toolName=="string"?t.toolName:t.type==="dynamic-tool"?u("chat.generic.dynamicTool"):t.type.replace("tool-","")||"Tool",m=$t(r),d=je(),f=sn(),{org:p}=me(),{openSidePanel:g}=cn(),x=ve()?.taskId??null,{addOrReplaceEager:h}=Zn(x),{openPanel:y}=Ze(),b=i&&typeof i=="object"&&i!==null&&"connectionId"in i&&i.connectionId!=null&&i.connectionId!==""?String(i.connectionId):f?.selectedVirtualMcp?.id??null,{toolDef:N}=ta(b?r:null,b,p.id,p.slug),j=N?._meta??i,w=Mt(j),k=At(m,w),S=sa[k],v=N?.title??(S?.labelKey?u(S.labelKey):void 0)??Qs(k);let _;e[0]!==j?(_=_t(j),e[0]=j,e[1]=_):_=e[1];const T=_,M=!!T&&t.state==="output-available",P=b?`${b}:${r}`:null,L=!!n?.destructiveHint,A=M&&!!b&&!L&&!!x;let I;e[2]!==h||e[3]!==b||e[4]!==y||e[5]!==t||e[6]!==r?(I=()=>{if(!b)return;const J="input"in t&&t.input&&typeof t.input=="object"?t.input:{};h({toolName:r,appId:b,args:J}),y(cs(b,r))},e[2]=h,e[3]=b,e[4]=y,e[5]=t,e[6]=r,e[7]=I):I=e[7];const E=I;let C;e[8]!==A||e[9]!==E?(C=J=>J==="fullscreen"&&A?(E(),"fullscreen"):"inline",e[8]=A,e[9]=E,e[10]=C):C=e[10];const R=C;let D;e[11]!==d||e[12]!==g?(D=J=>{const se=dn(J.content);se.content.length>0&&(g(),d?.sendMessage(se))},e[11]=d,e[12]=g,e[13]=D):D=e[13];const B=D,H=t.state==="approval-requested"&&c===!1,W=t.state==="output-denied"||H,G=t.state==="output-available"&&typeof t.output=="object"&&t.output!=null&&"isError"in t.output&&t.output.isError===!0;let Q;e[14]!==t.state?(Q=ge(t.state),e[14]=t.state,e[15]=Q):Q=e[15];const te=Q,X=H||te==="approval"?"idle":G?"error":te;let Z,le;if(e[16]!==X||e[17]!==G||e[18]!==H||e[19]!==t||e[20]!==u||e[21]!==k){Z=t.state==="output-error"?Ee(t):void 0;const J=k==="bash"&&X==="loading"&&t.input&&typeof t.input=="object"&&typeof t.input.command=="string"?t.input.command:null;let se;e[24]!==J?(se=J!==null?da(J):null,e[24]=J,e[25]=se):se=e[25];const ne=se;let ke;e[26]!==t.input||e[27]!==ne?(ke=ne!==null?Math.min(ne,pa(t.input)):null,e[26]=t.input,e[27]=ne,e[28]=ke):ke=e[28];const nt=ke,at="toolCallId"in t?t.toolCallId:"";le=nt!==null?l.jsx(ra,{toolCallId:at,durationMs:nt,anchorMs:ut(t)}):X==="loading"?l.jsx(ca,{toolCallId:at,anchorMs:ut(t)}):H?u("chat.generic.cancelled"):G?u("chat.generic.failed"):ba(t.state,t.output,Z,u),e[16]=X,e[17]=G,e[18]=H,e[19]=t,e[20]=u,e[21]=k,e[22]=Z,e[23]=le}else Z=e[22],le=e[23];const ee=le;let V="";t.input!==void 0&&(V=`# Input
27
+ `+Ce(t.input)),t.state==="output-error"?(V&&(V=V+`
28
+
29
+ `),V=V+(`# Error
30
+ `+(Z??""))):t.output!==void 0&&!M&&(V&&(V=V+`
31
+
32
+ `),V=V+(`# Output
33
+ `+Ce(t.output)));let ae;e:{if(W){let ne;e[29]===Symbol.for("react.memo_cache_sentinel")?(ne=l.jsx(bn,{}),e[29]=ne):ne=e[29],ae=ne;break e}if(M){let ne;e[30]===Symbol.for("react.memo_cache_sentinel")?(ne=l.jsx(jt,{className:"size-4 text-muted-foreground"}),e[30]=ne):ne=e[30],ae=ne;break e}const J=S?.icon;if(J){let ne;e[31]!==J?(ne=l.jsx(J,{className:"size-4 text-muted-foreground"}),e[31]=J,e[32]=ne):ne=e[32],ae=ne;break e}let se;e[33]===Symbol.for("react.memo_cache_sentinel")?(se=l.jsx(ks,{className:"size-4 text-muted-foreground"}),e[33]=se):se=e[33],ae=se}let F;e[34]!==n||e[35]!==i?(F=l.jsx(ga,{annotations:n,toolMeta:i}),e[34]=n,e[35]=i,e[36]=F):F=e[36];let O;e[37]!==a||e[38]!==o?(O=l.jsx(ha,{latency:a,outputBytes:o}),e[37]=a,e[38]=o,e[39]=O):O=e[39];let q;e[40]!==F||e[41]!==O?(q=l.jsxs(l.Fragment,{children:[F,O]}),e[40]=F,e[41]=O,e[42]=q):q=e[42];const oe=V||null;let re;e[43]!==X||e[44]!==v||e[45]!==W||e[46]!==ee||e[47]!==q||e[48]!==oe||e[49]!==ae?(re=l.jsx(Y,{icon:ae,iconDestructive:W,trailing:q,title:v,summary:ee,state:X,detail:oe}),e[43]=X,e[44]=v,e[45]=W,e[46]=ee,e[47]=q,e[48]=oe,e[49]=ae,e[50]=re):re=e[50];let ue;e[51]!==A||e[52]!==E||e[53]!==u?(ue=A&&l.jsx("div",{className:"flex justify-end mt-1.5 mb-1",children:l.jsxs("button",{type:"button",onClick:E,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground rounded-lg [@media(hover:hover)]:hover:bg-accent [@media(hover:hover)]:hover:text-foreground transition-colors",children:[l.jsx(Ss,{className:"size-3.5"}),u("chat.generic.openInPanel")]})}),e[51]=A,e[52]=E,e[53]=u,e[54]=ue):ue=e[54];let ie;e[55]!==A||e[56]!==f||e[57]!==b||e[58]!==v||e[59]!==B||e[60]!==R||e[61]!==M||e[62]!==j||e[63]!==p.id||e[64]!==p.slug||e[65]!==t.input||e[66]!==t.output||e[67]!==P||e[68]!==u||e[69]!==k||e[70]!==T?(ie=M&&T&&b&&p?.id&&l.jsx(l.Fragment,{children:l.jsx(rs,{fallback:J=>{const{resetError:se}=J;return l.jsxs("div",{className:"mt-2 flex items-center gap-2 px-3 py-2.5 border border-dashed border-destructive/30 bg-destructive/5 rounded-lg",children:[l.jsx(Pt,{size:16,className:"shrink-0 text-destructive"}),l.jsx("span",{className:"flex-1 text-xs text-destructive font-medium",children:u("chat.generic.failedToLoad",{toolName:v})}),l.jsxs(ye,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 shrink-0",onClick:se,children:[l.jsx(bt,{className:"size-3.5"}),u("chat.generic.retry")]})]})},children:l.jsx(z.Suspense,{fallback:l.jsx("div",{className:"mt-2 flex items-center justify-center h-12 border border-border/75 rounded-lg overflow-hidden p-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[l.jsx(is,{className:"size-4"}),l.jsx("span",{className:"text-sm",children:u("chat.generic.loadingApp")})]})}),children:l.jsx(va,{uiResourceUri:T,connectionId:b,orgId:p.id,orgSlug:p.slug,toolName:k,toolInput:t.input,toolResult:t.output,toolMeta:j,onMessage:B,onUpdateModelContext:P&&f?J=>f.setAppContext(P,J):void 0,onTeardown:P&&f?()=>f.clearAppContext(P):void 0,onRequestDisplayMode:A?R:void 0})})})}),e[55]=A,e[56]=f,e[57]=b,e[58]=v,e[59]=B,e[60]=R,e[61]=M,e[62]=j,e[63]=p.id,e[64]=p.slug,e[65]=t.input,e[66]=t.output,e[67]=P,e[68]=u,e[69]=k,e[70]=T,e[71]=ie):ie=e[71];let ce;return e[72]!==re||e[73]!==ue||e[74]!==ie?(ce=l.jsxs("div",{children:[re,ue,ie]}),e[72]=re,e[73]=ue,e[74]=ie,e[75]=ce):ce=e[75],ce}function Kt(s){return typeof s=="object"&&s!=null&&"type"in s&&s.type==="mcpToolCall"}function ya(s){if(s!=null)return Kt(s)?s.arguments??void 0:s}function ja(s){if(s==null)return;if(Kt(s)&&s.result!=null)return s.result;if(typeof s=="object"&&"content"in s&&Array.isArray(s.content)){const t=s.content;if(t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"type"in t[0])return s}const e=typeof s=="string"?s:JSON.stringify(s);return{structuredContent:typeof s=="object"&&!Array.isArray(s)?s:void 0,content:[{type:"text",text:e}]}}function va(s){const e=$.c(27),{uiResourceUri:t,connectionId:n,orgId:a,orgSlug:o,toolName:c,toolInput:i,toolResult:u,toolMeta:r,onMessage:m,onUpdateModelContext:d,onTeardown:f,onRequestDisplayMode:p}=s;let g;e[0]!==n||e[1]!==a||e[2]!==o?(g={connectionId:n,orgId:a,orgSlug:o},e[0]=n,e[1]=a,e[2]=o,e[3]=g):g=e[3];const x=gn(g);let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={type:"object"},e[4]=h):h=e[4];let y;e[5]!==r?(y=r!=null&&{_meta:r},e[5]=r,e[6]=y):y=e[6];let b;e[7]!==y||e[8]!==c?(b={name:c,inputSchema:h,...y},e[7]=y,e[8]=c,e[9]=b):b=e[9];const N=b;let j;e[10]!==N?(j={tool:N},e[10]=N,e[11]=j):j=e[11];let w;e[12]!==i?(w=ya(i),e[12]=i,e[13]=w):w=e[13];let k;e[14]!==u?(k=ja(u),e[14]=u,e[15]=k):k=e[15];let S;return e[16]!==x||e[17]!==m||e[18]!==p||e[19]!==f||e[20]!==d||e[21]!==a||e[22]!==j||e[23]!==w||e[24]!==k||e[25]!==t?(S=l.jsx("div",{className:"mt-2 border border-border/75 rounded-lg overflow-hidden p-3",children:l.jsx(fn,{resourceURI:t,orgId:a,toolInfo:j,toolInput:w,toolResult:k,client:x,onMessage:m,onUpdateModelContext:d,onTeardown:f,onRequestDisplayMode:p})}),e[16]=x,e[17]=m,e[18]=p,e[19]=f,e[20]=d,e[21]=a,e[22]=j,e[23]=w,e[24]=k,e[25]=t,e[26]=S):S=e[26],S}const ft="studio-storage://",mt="mesh-storage://";function tt(s){return s.startsWith(ft)?s.slice(ft.length):s.startsWith(mt)?s.slice(mt.length):null}function qt(s,e){const t=tt(s);return t!==null?`/api/${e}/files/${t}`:s}function Wt(s){const e=$.c(7),{srcs:t,alt:n}=s;let a;if(e[0]!==n||e[1]!==t){let c;e[3]!==n?(c=i=>l.jsx(vn,{src:i,alt:n,children:l.jsx("img",{src:i,alt:n,className:"max-w-sm max-h-80 object-contain rounded-lg border border-border hover:border-foreground/20 transition-colors"})},i),e[3]=n,e[4]=c):c=e[4],a=t.map(c),e[0]=n,e[1]=t,e[2]=a}else a=e[2];let o;return e[5]!==a?(o=l.jsx("div",{className:"flex flex-wrap gap-2",children:a}),e[5]=a,e[6]=o):o=e[6],o}const Sa=Oe({image_url:us({protocol:/^https$/})});function ka(s){if(typeof s!="string")return null;try{const e=Sa.safeParse(JSON.parse(s.split(`
34
+ `,1)[0]??""));return e.success?e.data.image_url:null}catch{return null}}function Na(s){return Array.isArray(s?.images)?s.images:void 0}function wa(s){if(!s?.usage)return null;const e=s.usage.inputTokens??0,t=s.usage.outputTokens??0,n=e+t;return n?{inputTokens:e,outputTokens:t,reasoningTokens:0,totalTokens:n,cost:0,cacheReadTokens:0,cacheWriteTokens:0}:null}function _a(s){const e=$.c(14),{uri:t,orgSlug:n}=s,a=U();let o;e[0]!==n||e[1]!==t?(o=qt(t,n),e[0]=n,e[1]=t,e[2]=o):o=e[2];const c=o;let i;e[3]!==a||e[4]!==t?(i=tt(t)!==null?t.slice(t.lastIndexOf("/")+1):a("chat.generateImage.reference"),e[3]=a,e[4]=t,e[5]=i):i=e[5];const u=i;let r;e[6]!==u?(r=l.jsx(Tt,{asChild:!0,children:l.jsx("span",{className:"inline-flex items-center gap-1 px-1 py-0.5 rounded bg-muted text-muted-foreground text-xs cursor-default select-none",children:u})}),e[6]=u,e[7]=r):r=e[7];let m;e[8]!==u||e[9]!==c?(m=l.jsx(Ct,{side:"top",className:"max-w-sm p-1.5",children:l.jsx("img",{src:c,alt:u,className:"max-w-full max-h-64 object-contain rounded"})}),e[8]=u,e[9]=c,e[10]=m):m=e[10];let d;return e[11]!==r||e[12]!==m?(d=l.jsxs(It,{children:[r,m]}),e[11]=r,e[12]=m,e[13]=d):d=e[13],d}function Ta(s){const e=$.c(64),{part:t,latency:n}=s,a=U(),o=yt();let c;e[0]!==t.state?(c=ge(t.state),e[0]=t.state,e[1]=c):c=e[1];const i=c,u=t.input,r=t.output,m=Na(r);let d;e[2]!==r?(d=wa(r),e[2]=r,e[3]=d):d=e[3];const f=d,g=Et()?r?.model:void 0,x=Array.isArray(u?.referenceImages)?u.referenceImages.filter(Ca):void 0;let h;e[4]!==n?(h=n!=null&&n>0?l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground/60",children:be(n)}):null,e[4]=n,e[5]=h):h=e[5];const y=h;if(i==="loading"){let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(_e,{size:14}),e[6]=I):I=e[6];let E;e[7]!==a?(E=a("chat.generateImage.generatingImage"),e[7]=a,e[8]=E):E=e[8];let C;e[9]!==u?(C=u?.prompt?`"${u.prompt.slice(0,80)}…"`:void 0,e[9]=u,e[10]=C):C=e[10];let R;return e[11]!==E||e[12]!==C?(R=l.jsx(Y,{icon:I,title:E,summary:C,state:"loading"}),e[11]=E,e[12]=C,e[13]=R):R=e[13],R}if(r?.background){let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(_e,{size:14}),e[14]=I):I=e[14];let E;e[15]!==a?(E=a("chat.generateImage.imageQueuedGeneratingInBackground"),e[15]=a,e[16]=E):E=e[16];let C;e[17]!==u?(C=u?.prompt?`"${u.prompt.slice(0,80)}…"`:void 0,e[17]=u,e[18]=C):C=e[18];let R;return e[19]!==E||e[20]!==C?(R=l.jsx(Y,{icon:I,title:E,summary:C,state:"idle"}),e[19]=E,e[20]=C,e[21]=R):R=e[21],R}if(i==="error"||!m||m.length===0){let I;e[22]!==t||e[23]!==i?(I=i==="error"?Ee(t):void 0,e[22]=t,e[23]=i,e[24]=I):I=e[24];const E=I;let C="";u!==void 0&&(C=`# Input
35
+ `+Ce(u)),E?(C&&(C=C+`
36
+
37
+ `),C=C+(`# Error
38
+ `+E)):r!==void 0&&(C&&(C=C+`
39
+
40
+ `),C=C+(`# Output
41
+ `+Ce(r)));let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=l.jsx(_e,{size:14}),e[25]=R):R=e[25];let D;e[26]!==a?(D=a("chat.generateImage.imageGeneration"),e[26]=a,e[27]=D):D=e[27];let B;e[28]!==i||e[29]!==a?(B=a(i==="error"?"chat.generateImage.failed":"chat.generateImage.noImagesGenerated"),e[28]=i,e[29]=a,e[30]=B):B=e[30];const H=i==="error"?"error":"idle",W=C||null;let G;return e[31]!==y||e[32]!==D||e[33]!==B||e[34]!==H||e[35]!==W||e[36]!==f?(G=l.jsx(Y,{icon:R,title:D,summary:B,state:H,usage:f,trailing:y,detail:W}),e[31]=y,e[32]=D,e[33]=B,e[34]=H,e[35]=W,e[36]=f,e[37]=G):G=e[37],G}const b="flex flex-col gap-2";let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(_e,{size:14,className:"text-special"}),e[38]=N):N=e[38];let j;e[39]!==a?(j=a("chat.generateImage.generatedImage"),e[39]=a,e[40]=j):j=e[40];let w;e[41]!==u?(w=u?.prompt&&l.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:u.prompt}),e[41]=u,e[42]=w):w=e[42];const k=x&&x.length>0&&l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx("span",{className:"text-2xs text-muted-foreground/50",children:a("chat.generateImage.references")}),x.map((I,E)=>{const C=I.uri??I.url;return l.jsx(_a,{uri:C,orgSlug:o.slug},E)})]});let S;e[43]!==w||e[44]!==k?(S=l.jsxs("div",{className:"flex flex-col gap-1 pb-2 pl-6",children:[w,k]}),e[43]=w,e[44]=k,e[45]=S):S=e[45];let v;e[46]!==y||e[47]!==g||e[48]!==j||e[49]!==S||e[50]!==f?(v=l.jsx(Y,{icon:N,title:j,summary:g,state:"idle",usage:f,trailing:y,children:S}),e[46]=y,e[47]=g,e[48]=j,e[49]=S,e[50]=f,e[51]=v):v=e[51];const _=Wt;let T;e[52]!==o?(T=I=>{const E=I.uri??I.url;return E?[qt(E,o.slug)]:[]},e[52]=o,e[53]=T):T=e[53];const M=m.flatMap(T);let P;e[54]!==u?.prompt||e[55]!==a?(P=u?.prompt??a("chat.generateImage.generatedImageAlt"),e[54]=u?.prompt,e[55]=a,e[56]=P):P=e[56];let L;e[57]!==_||e[58]!==M||e[59]!==P?(L=l.jsx(_,{srcs:M,alt:P}),e[57]=_,e[58]=M,e[59]=P,e[60]=L):L=e[60];let A;return e[61]!==v||e[62]!==L?(A=l.jsxs("div",{className:b,children:[v,L]}),e[61]=v,e[62]=L,e[63]=A):A=e[63],A}function Ca(s){return s.uri??s.url}function Ia(s,e){const t=tt(s);return t!==null?`/api/${e}/files/${t}`:s}function $a(s){if(!s?.usage)return null;const e=s.usage.inputTokens??0,t=s.usage.outputTokens??0,n=e+t;if(!n)return null;const a={providerMetadata:s.usage.providerMetadata};return{inputTokens:e,outputTokens:t,reasoningTokens:0,totalTokens:n,cost:nn(a),cacheReadTokens:0,cacheWriteTokens:0}}function Ma(s){try{return new URL(s).hostname.replace(/^www\./,"")}catch{return s}}function Aa(s){try{return`${new URL(s).origin}/favicon.ico`}catch{return""}}function Pa(s){const e=$.c(16),{citation:t,index:n}=s;let a;e[0]!==t.url?(a=Ma(t.url),e[0]=t.url,e[1]=a):a=e[1];const o=a;let c;e[2]!==t.url?(c=Aa(t.url),e[2]=t.url,e[3]=c):c=e[3];const i=c,u=t.title||o;let r;e[4]!==i?(r=l.jsx("img",{src:i,alt:"",className:"size-3.5 rounded-sm shrink-0",onError:Ea}),e[4]=i,e[5]=r):r=e[5];let m;e[6]!==u?(m=l.jsx("span",{className:"truncate max-w-[180px]",children:u}),e[6]=u,e[7]=m):m=e[7];const d=n+1;let f;e[8]!==d?(f=l.jsxs("span",{className:"text-2xs text-muted-foreground/50 tabular-nums shrink-0",children:["[",d,"]"]}),e[8]=d,e[9]=f):f=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(ds,{size:10,className:"shrink-0 opacity-0 group-hover/src:opacity-100 transition-opacity"}),e[10]=p):p=e[10];let g;return e[11]!==t.url||e[12]!==r||e[13]!==m||e[14]!==f?(g=l.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"group/src inline-flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:border-border hover:text-foreground",children:[r,m,f,p]}),e[11]=t.url,e[12]=r,e[13]=m,e[14]=f,e[15]=g):g=e[15],g}function Ea(s){s.target.style.display="none"}function La(s,e){return s.replace(/\[(\d+)\]/g,(t,n)=>{const a=parseInt(n,10)-1,o=e[a];return o?`[\\[${n}\\]](${o.url})`:t})}const ze=5;function Ra(s){const e=$.c(13),{citations:t}=s,n=U(),[a,o]=z.useState(!1),c=t.length>ze;let i;e[0]!==t||e[1]!==a?(i=a?t:t.slice(0,ze),e[0]=t,e[1]=a,e[2]=i):i=e[2];const u=i;let r;e[3]!==u?(r=u.map(Fa),e[3]=u,e[4]=r):r=e[4];let m;e[5]!==t.length||e[6]!==a||e[7]!==c||e[8]!==n?(m=c&&l.jsx("button",{type:"button",onClick:()=>o(za),className:"inline-flex items-center rounded-lg border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:border-border hover:text-foreground",children:a?n("chat.webSearch.showLess"):n("chat.webSearch.showMore",{count:t.length-ze})}),e[5]=t.length,e[6]=a,e[7]=c,e[8]=n,e[9]=m):m=e[9];let d;return e[10]!==r||e[11]!==m?(d=l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,m]}),e[10]=r,e[11]=m,e[12]=d):d=e[12],d}function za(s){return!s}function Fa(s,e){return l.jsx(Pa,{citation:s,index:e},s.url)}function Da(s){const e=$.c(61),{part:t,latency:n,streamingText:a}=s,o=U(),c=yt();let i;e[0]!==t.state?(i=ge(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i,r=t.input,m=t.output;let d,f,p;e[2]!==c||e[3]!==m?(d=m?.uri?Ia(m.uri,c.slug):void 0,p=ht,f=pe.webSearchBlob(d??""),e[2]=c,e[3]=m,e[4]=d,e[5]=f,e[6]=p):(d=e[4],f=e[5],p=e[6]);let g;e[7]!==d?(g=async()=>{const Q=await fetch(d);if(!Q.ok)throw new Error(`Failed to fetch: ${Q.status}`);return Q.text()},e[7]=d,e[8]=g):g=e[8];const x=!!d;let h;e[9]!==f||e[10]!==g||e[11]!==x?(h={queryKey:f,queryFn:g,enabled:x,staleTime:1/0},e[9]=f,e[10]=g,e[11]=x,e[12]=h):h=e[12];const{data:y}=p(h),b=u==="loading",N=u!=="loading"&&u!=="error",j=Et(),w=m?.citations;let k;e[13]!==m?(k=$a(m),e[13]=m,e[14]=k):k=e[14];const S=k,v=m?.content??y??a;let _;e[15]!==w||e[16]!==v?(_=v&&w?.length?La(v,w):v,e[15]=w,e[16]=v,e[17]=_):_=e[17];const T=_;let M;e[18]!==n?(M=n!=null&&n>0?l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground/60",children:be(n)}):null,e[18]=n,e[19]=M):M=e[19];const P=M;if(u==="error"){let Q;e[20]===Symbol.for("react.memo_cache_sentinel")?(Q=l.jsx(Ue,{size:14}),e[20]=Q):Q=e[20];let te;e[21]!==o?(te=o("chat.webSearch.title"),e[21]=o,e[22]=te):te=e[22];let X;e[23]!==o?(X=o("chat.webSearch.failed"),e[23]=o,e[24]=X):X=e[24];let Z;return e[25]!==P||e[26]!==te||e[27]!==X||e[28]!==S?(Z=l.jsx(Y,{icon:Q,title:te,summary:X,state:"error",usage:S,trailing:P}),e[25]=P,e[26]=te,e[27]=X,e[28]=S,e[29]=Z):Z=e[29],Z}const L=b?"animate-pulse":"text-brand-blue";let A;e[30]!==L?(A=K(L),e[30]=L,e[31]=A):A=e[31];let I;e[32]!==A?(I=l.jsx(Ue,{size:14,className:A}),e[32]=A,e[33]=I):I=e[33];let E;e[34]!==b||e[35]!==o?(E=o(b?"chat.webSearch.researching":"chat.webSearch.title"),e[34]=b,e[35]=o,e[36]=E):E=e[36];let C;e[37]!==r||e[38]!==N||e[39]!==m?.model||e[40]!==j?(C=N?(j?m?.model:void 0)??r?.query?.slice(0,60):r?.query?`"${r.query.slice(0,80)}"`:void 0,e[37]=r,e[38]=N,e[39]=m?.model,e[40]=j,e[41]=C):C=e[41];const R=b?"loading":"idle";let D;e[42]!==r?(D=r?.query&&l.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:r.query}),e[42]=r,e[43]=D):D=e[43];let B;e[44]!==T||e[45]!==t.toolCallId?(B=T?l.jsx("div",{className:"max-h-96 overflow-y-auto overflow-x-hidden rounded-lg border border-border/40 bg-muted/20 px-4 py-3 min-w-0",children:l.jsx("div",{className:"prose prose-sm prose-neutral dark:prose-invert max-w-none text-sm leading-relaxed break-words",children:l.jsx(Lt,{id:t.toolCallId,text:T})})}):l.jsx("div",{className:"rounded-lg border border-border/40 bg-muted/20 px-4 py-3",children:l.jsxs("div",{className:"space-y-2 animate-pulse",children:[l.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-3/4"}),l.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-1/2"})]})}),e[44]=T,e[45]=t.toolCallId,e[46]=B):B=e[46];let H;e[47]!==w?(H=w&&w.length>0&&l.jsx(Ra,{citations:w}),e[47]=w,e[48]=H):H=e[48];let W;e[49]!==D||e[50]!==B||e[51]!==H?(W=l.jsxs("div",{className:"pl-6 pb-3 flex flex-col gap-1 min-w-0",children:[D,B,H]}),e[49]=D,e[50]=B,e[51]=H,e[52]=W):W=e[52];let G;return e[53]!==P||e[54]!==I||e[55]!==E||e[56]!==C||e[57]!==R||e[58]!==W||e[59]!==S?(G=l.jsx(Y,{icon:I,title:E,summary:C,state:R,usage:S,trailing:P,defaultOpen:!0,children:W}),e[53]=P,e[54]=I,e[55]=E,e[56]=C,e[57]=R,e[58]=W,e[59]=S,e[60]=G):G=e[60],G}function Oa(s){const e=$.c(16),{part:t}=s,n=U();if(!t.state.startsWith("output-"))return null;let a;e[0]!==t.input?.prompt||e[1]!==n?(a=t.input?.prompt?.trim()||n("chat.userAskQuestion.question"),e[0]=t.input?.prompt,e[1]=n,e[2]=a):a=e[2];const o=a,c=t.state==="output-error"||t.state==="output-denied",i=t.state==="output-denied";let u;e[3]!==i||e[4]!==t||e[5]!==n?(u=i?n("chat.userAskQuestion.skippedAnswer"):t.state==="output-error"?Ee(t)??n("chat.subtask.errorLabel"):t.output?.response??"",e[3]=i,e[4]=t,e[5]=n,e[6]=u):u=e[6];const r=u;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(Ns,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),e[7]=m):m=e[7];let d;e[8]!==o?(d=l.jsxs("div",{className:"flex items-start gap-2",children:[m,l.jsx("span",{className:"text-sm text-muted-foreground leading-snug",children:o})]}),e[8]=o,e[9]=d):d=e[9];let f;e[10]!==r||e[11]!==c?(f=r&&l.jsx("div",{className:"ml-6 pl-2 border-l border-border/50",children:l.jsx("span",{className:K("text-sm leading-snug",c?"text-muted-foreground/50 italic":"text-foreground/70"),children:r})}),e[10]=r,e[11]=c,e[12]=f):f=e[12];let p;return e[13]!==d||e[14]!==f?(p=l.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[d,f]}),e[13]=d,e[14]=f,e[15]=p):p=e[15],p}function Ba(s){const e=$.c(14),{part:t}=s,n=U();if(!t.state.startsWith("output-")||Ls(t))return null;const a=t.output?.accepted===!0;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsx(Nt,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),e[0]=o):o=e[0];const c=t.input?.title;let i;e[1]!==c?(i=l.jsx("span",{className:"text-sm leading-snug text-muted-foreground",children:c}),e[1]=c,e[2]=i):i=e[2];const u=a?"text-foreground/70":"text-muted-foreground/50 italic";let r;e[3]!==u?(r=K("text-sm leading-snug shrink-0",u),e[3]=u,e[4]=r):r=e[4];let m;e[5]!==a||e[6]!==n?(m=n(a?"chat.suggestTask.accepted":"chat.suggestTask.declined"),e[5]=a,e[6]=n,e[7]=m):m=e[7];let d;e[8]!==r||e[9]!==m?(d=l.jsx("span",{className:r,children:m}),e[8]=r,e[9]=m,e[10]=d):d=e[10];let f;return e[11]!==i||e[12]!==d?(f=l.jsxs("div",{className:"my-1.5 flex items-start gap-2",children:[o,i,d]}),e[11]=i,e[12]=d,e[13]=f):f=e[13],f}const Gt=z.createContext(new Map);function Ro(s){const e=$.c(5),{messages:t,children:n}=s;let a;if(e[0]!==t){a=new Map;for(const c of t){const i=c.metadata?.subtaskJobId;if(!i)continue;const u=a.get(i);u?u.push(c):a.set(i,[c])}e[0]=t,e[1]=a}else a=e[1];let o;return e[2]!==a||e[3]!==n?(o=l.jsx(Gt.Provider,{value:a,children:n}),e[2]=a,e[3]=n,e[4]=o):o=e[4],o}function Ua(s){const e=$.c(3),t=z.useContext(Gt);let n;return e[0]!==s||e[1]!==t?(n=s?t.get(s)??[]:[],e[0]=s,e[1]=t,e[2]=n):n=e[2],n}function Ha(s){return new ReadableStream({async start(e){const t=s.getReader(),n=new TextDecoder;let a="";try{for(;;){const{done:o,value:c}=await t.read();if(o)break;a+=n.decode(c,{stream:!0});let i;for(;(i=a.indexOf(`
42
+
43
+ `))!==-1;){const u=a.slice(0,i);a=a.slice(i+2);const r=u.split(`
44
+ `).filter(m=>m.startsWith("data:")).map(m=>m.slice(5).trim()).join(`
45
+ `);if(r)try{e.enqueue(JSON.parse(r))}catch{}}}}finally{t.releaseLock(),e.close()}}})}function Ka(s){const{orgSlug:e,threadId:t,jobId:n,enabled:a}=s,[o,c]=z.useState([]),[i,u]=z.useState(!1);return z.useEffect(()=>{if(!a||!n||!t)return;const r=new AbortController;return c([]),u(!0),(async()=>{try{const m=await fetch(`/api/${encodeURIComponent(e)}/decopilot/threads/${encodeURIComponent(t)}/jobs/${encodeURIComponent(n)}/stream`,{headers:{accept:"text/event-stream"},credentials:"include",signal:r.signal});if(!m.ok||!m.body)return;for await(const d of en({stream:tn(Ha(m.body),void 0)})){if(r.signal.aborted)return;c([d])}}catch{}finally{r.signal.aborted||u(!1)}})(),()=>r.abort()},[a,n,t,e]),{messages:o,streaming:i}}function qa(s,e){if(s&&typeof s=="object"&&!Array.isArray(s)){const t=s;if(typeof t.text=="string"||typeof t.error=="string"||typeof t.finishReason=="string"){if(typeof t.error=="string"&&t.error.length>0)return e("chat.subtask.failedWithError",{error:t.error});const a=typeof t.text=="string"?t.text.trim():"",o=t.finishReason==="length";return a?(o?`${e("chat.subtask.stepLimitPartial")}
46
+
47
+ `:"")+a:e(o?"chat.subtask.stepLimitNoOutput":"chat.subtask.completedNoOutput")}}return ma(s)}function Vt(s){return!!s&&typeof s=="object"&&s.background===!0}function Jt({part:s,subtaskMeta:e},t){const n=s.state==="input-streaming"||s.state==="input-available",a=s.state==="output-available"&&s.preliminary===!0,o=s.state==="output-available"&&!s.preliminary,c=s.state==="output-error",i=ge(s.state,"preliminary"in s?s.preliminary:!1),u=i==="approval"?"idle":i,r=t(n?"chat.subtask.startingEllipsis":a?"chat.subtask.runningEllipsis":o?"chat.subtask.completedTitle":c?"chat.subtask.failedTitle":"chat.subtask.subtaskNoun"),m=s.input?.prompt??"",d=s.state==="approval-requested"?t("chat.subtask.awaitingApproval"):m.length>120?m.slice(0,120)+"…":m;return{fallbackTitle:r,summary:d,usage:e?.usage,state:u}}function Qt(s){return s.state==="input-available"?!0:s.state==="output-available"?"preliminary"in s&&s.preliminary===!0:!1}function Xt(s){const e=$.c(4),t=ve()?.taskId??null,{org:n}=me();if(!t)return null;let a;return e[0]!==n||e[1]!==t||e[2]!==s?(a=async()=>{if(t===null)return;const o=await fetch(`/api/${encodeURIComponent(n.slug)}/decopilot/flip/${encodeURIComponent(t)}`,{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({toolCallId:s})});if(!o.ok)throw new Error(`flip failed: ${o.status}`)},e[0]=n,e[1]=t,e[2]=s,e[3]=a):a=e[3],a}function Wa(s){const e=$.c(10),{onFlip:t}=s,n=U(),[a,o]=z.useState(!1);let c;e[0]!==t?(c=async m=>{m.stopPropagation(),o(!0);try{await t()}catch{o(!1)}},e[0]=t,e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=K("shrink-0 text-xs text-muted-foreground/70 px-2 py-1 rounded-lg transition-colors","[@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent","disabled:opacity-50"),e[2]=i):i=e[2];let u;e[3]!==a||e[4]!==n?(u=n(a?"chat.subtask.flipping":"chat.subtask.flipToBackground"),e[3]=a,e[4]=n,e[5]=u):u=e[5];let r;return e[6]!==a||e[7]!==c||e[8]!==u?(r=l.jsx("button",{type:"button",disabled:a,onClick:c,className:i,children:u}),e[6]=a,e[7]=c,e[8]=u,e[9]=r):r=e[9],r}function st(s){const e=$.c(54),{icon:t,title:n,summary:a,state:o,usage:c,latency:i,onOpenChange:u,onFlip:r,children:m}=s,[d,f]=z.useState(!1);let p;e[0]!==u?(p=G=>{f(G),u?.(G)},e[0]=u,e[1]=p):p=e[1];const g=p,x=o==="loading",h=o==="error";let y;e[2]!==g?(y=()=>g(!0),e[2]=g,e[3]=y):y=e[3];let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=K("group/tool flex items-center gap-2 flex-1 min-w-0 py-2.5 text-left rounded-lg transition-colors","[@media(hover:hover)]:hover:bg-accent"),e[4]=b):b=e[4];const N=h?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75";let j;e[5]!==N?(j=K("relative shrink-0 size-4 flex items-center justify-center [&>svg]:size-4",N),e[5]=N,e[6]=j):j=e[6];let w;e[7]!==t||e[8]!==j?(w=l.jsx("div",{className:j,children:t}),e[7]=t,e[8]=j,e[9]=w):w=e[9];const k=h?"text-warning/80":"text-foreground",S=x&&"shimmer";let v;e[10]!==k||e[11]!==S?(v=K("shrink-0 text-sm font-normal",k,S),e[10]=k,e[11]=S,e[12]=v):v=e[12];let _;e[13]!==v||e[14]!==n?(_=l.jsx("span",{className:v,children:n}),e[13]=v,e[14]=n,e[15]=_):_=e[15];let T;e[16]!==x||e[17]!==a?(T=a?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:K(x&&"shimmer"),children:a})})}):l.jsx("div",{className:"flex-1"}),e[16]=x,e[17]=a,e[18]=T):T=e[18];let M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=l.jsx(fs,{className:"size-3.5 shrink-0 text-muted-foreground/40 opacity-0 transition-opacity [@media(hover:hover)]:group-hover/tool:opacity-100"}),e[19]=M):M=e[19];let P;e[20]!==i?(P=l.jsx(fe,{latency:i}),e[20]=i,e[21]=P):P=e[21];let L;e[22]!==c?(L=l.jsx(kt,{usage:c}),e[22]=c,e[23]=L):L=e[23];let A;e[24]!==_||e[25]!==T||e[26]!==P||e[27]!==L||e[28]!==y||e[29]!==w?(A=l.jsxs("button",{type:"button",onClick:y,className:b,children:[w,_,T,M,P,L]}),e[24]=_,e[25]=T,e[26]=P,e[27]=L,e[28]=y,e[29]=w,e[30]=A):A=e[30];let I;e[31]!==x||e[32]!==r?(I=r&&x?l.jsx(Wa,{onFlip:r}):null,e[31]=x,e[32]=r,e[33]=I):I=e[33];let E;e[34]!==A||e[35]!==I?(E=l.jsxs("div",{className:"flex items-center gap-1 w-full",children:[A,I]}),e[34]=A,e[35]=I,e[36]=E):E=e[36];let C;e[37]!==t?(C=l.jsx("span",{className:"flex items-center [&>svg]:size-4 [&>svg]:text-muted-foreground/75",children:t}),e[37]=t,e[38]=C):C=e[38];let R;e[39]!==C||e[40]!==n?(R=l.jsx(Sn,{className:"px-4 py-3 border-b border-border shrink-0",children:l.jsxs(kn,{className:"flex items-center gap-2 text-sm font-medium",children:[C,n]})}),e[39]=C,e[40]=n,e[41]=R):R=e[41];let D;e[42]!==m?(D=l.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-4 py-4",children:m}),e[42]=m,e[43]=D):D=e[43];let B;e[44]!==R||e[45]!==D?(B=l.jsxs(Nn,{side:"right",className:"w-full sm:max-w-2xl flex flex-col p-0 gap-0",children:[R,D]}),e[44]=R,e[45]=D,e[46]=B):B=e[46];let H;e[47]!==d||e[48]!==g||e[49]!==B?(H=l.jsx(wn,{open:d,onOpenChange:g,children:B}),e[47]=d,e[48]=g,e[49]=B,e[50]=H):H=e[50];let W;return e[51]!==E||e[52]!==H?(W=l.jsxs(l.Fragment,{children:[E,H]}),e[51]=E,e[52]=H,e[53]=W):W=e[53],W}function Yt(s){const e=$.c(22),{part:t}=s,n=U(),a=t.state==="output-error";let o;e[0]!==t.input?.prompt||e[1]!==n?(o=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[0]=t.input?.prompt,e[1]=n,e[2]=o):o=e[2];const c=o;let i;if(e[3]!==a||e[4]!==t||e[5]!==c||e[6]!==n){const u=a?Ee(t):qa(t.output,n)??"";let r;e[8]!==n?(r=n("chat.subtask.taskLabel"),e[8]=n,e[9]=r):r=e[9];let m;e[10]!==r?(m=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:r}),e[10]=r,e[11]=m):m=e[11];let d;e[12]!==c?(d=l.jsx("p",{className:"text-sm text-foreground/90 whitespace-pre-wrap wrap-break-word",children:c}),e[12]=c,e[13]=d):d=e[13];let f;e[14]!==m||e[15]!==d?(f=l.jsxs("section",{children:[m,d]}),e[14]=m,e[15]=d,e[16]=f):f=e[16];let p;e[17]!==a||e[18]!==n?(p=n(a?"chat.subtask.errorLabel":"chat.subtask.resultLabel"),e[17]=a,e[18]=n,e[19]=p):p=e[19];let g;e[20]!==p?(g=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:p}),e[20]=p,e[21]=g):g=e[21],i=l.jsxs("div",{className:"flex flex-col gap-4",children:[f,l.jsxs("section",{children:[g,u.trim()?l.jsx(Lt,{id:`${t.toolCallId}-result`,text:u}):l.jsx("p",{className:"text-sm text-muted-foreground/60 italic",children:n("chat.subtask.running")})]})]}),e[3]=a,e[4]=t,e[5]=c,e[6]=n,e[7]=i}else i=e[7];return i}const Fe=600;function Ga(s){const e=$.c(12),{part:t}=s,n=t.type??"";let a;e[0]!==t.toolName||e[1]!==n?(a=n==="dynamic-tool"?t.toolName??"tool":n.slice(5),e[0]=t.toolName,e[1]=n,e[2]=a):a=e[2];const o=a;let c;if(e[3]!==t.input){const f=t.input!=null?JSON.stringify(t.input):"";c=f.length>80?`${f.slice(0,80)}…`:f||void 0,e[3]=t.input,e[4]=c}else c=e[4];const i=c;let u;if(e[5]!==t.input){const f=t.input!=null?JSON.stringify(t.input,null,2):null;u=f&&f.length>Fe?`${f.slice(0,Fe)}
48
+ … (${f.length-Fe} more characters)`:f,e[5]=t.input,e[6]=u}else u=e[6];const r=u;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(vt,{}),e[7]=m):m=e[7];let d;return e[8]!==r||e[9]!==o||e[10]!==i?(d=l.jsx(Y,{icon:m,title:o,summary:i,state:"idle",detail:r,detailVariant:"code"}),e[8]=r,e[9]=o,e[10]=i,e[11]=d):d=e[11],d}function Va(s){const e=$.c(19),{jobId:t,prompt:n,items:a,streaming:o}=s,c=U();let i;e[0]!==c?(i=c("chat.subtask.taskLabel"),e[0]=c,e[1]=i):i=e[1];let u;e[2]!==i?(u=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:i}),e[2]=i,e[3]=u):u=e[3];let r;e[4]!==n?(r=l.jsx("p",{className:"text-sm text-foreground/90 whitespace-pre-wrap wrap-break-word",children:n}),e[4]=n,e[5]=r):r=e[5];let m;e[6]!==u||e[7]!==r?(m=l.jsxs("section",{children:[u,r]}),e[6]=u,e[7]=r,e[8]=m):m=e[8];let d;e[9]!==a||e[10]!==t||e[11]!==o||e[12]!==c?(d=a.length===0?l.jsx("p",{className:"text-sm text-muted-foreground/60 italic py-1",children:c("chat.subtask.runningInBackground")}):a.map((g,x)=>{const h=g,y=h.type??"";return y==="text"?h.text?.trim()?l.jsx($e,{id:`${t}-sub-${x}`,part:g,animate:o},`${t}-sub-${x}`):null:y==="dynamic-tool"||y.startsWith("tool-")&&y!=="tool-todo_write"&&y!=="tool-update_interests"?l.jsx(Ga,{part:h},`${t}-sub-${x}`):null}),e[9]=a,e[10]=t,e[11]=o,e[12]=c,e[13]=d):d=e[13];let f;e[14]!==d?(f=l.jsx("section",{className:"flex flex-col gap-3 sm:gap-2",children:d}),e[14]=d,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==f?(p=l.jsxs("div",{className:"flex flex-col gap-4",children:[m,f]}),e[16]=m,e[17]=f,e[18]=p):p=e[18],p}function Zt(s){const e=$.c(32),{part:t}=s,n=U(),a=t.output?.jobId,o=ve()?.taskId??null,{org:c}=me(),[i,u]=z.useState(!1),r=Ua(a),m=o??"",d=i&&!!o;let f;e[0]!==a||e[1]!==c.slug||e[2]!==m||e[3]!==d?(f={orgSlug:c.slug,threadId:m,jobId:a,enabled:d},e[0]=a,e[1]=c.slug,e[2]=m,e[3]=d,e[4]=f):f=e[4];const p=Ka(f);let g;e[5]!==p.messages?(g=p.messages.flatMap(Qa),e[5]=p.messages,e[6]=g):g=e[6];const x=g;let h;e[7]!==r?(h=r.flatMap(Ja),e[7]=r,e[8]=h):h=e[8];const y=h,b=x.length>0?x:y;let N;e[9]!==t.input?.prompt||e[10]!==n?(N=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[9]=t.input?.prompt,e[10]=n,e[11]=N):N=e[11];const j=N;let w;e[12]!==j?(w=j.length>120?`${j.slice(0,120)}…`:j,e[12]=j,e[13]=w):w=e[13];const k=w,S=r.length===0;let v;e[14]!==n?(v=n("chat.subtask.subtaskNoun"),e[14]=n,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(Je,{}),e[16]=_):_=e[16];let T;e[17]!==v?(T=l.jsx(Se,{icon:void 0,name:v,size:"2xs",className:"rounded-xs",fallbackIcon:_}),e[17]=v,e[18]=T):T=e[18];let M;e[19]!==n?(M=n("chat.subtask.subtaskNoun"),e[19]=n,e[20]=M):M=e[20];const P=S?"loading":"idle",L=p.streaming||S;let A;e[21]!==b||e[22]!==a||e[23]!==j||e[24]!==L?(A=l.jsx(Va,{jobId:a,prompt:j,items:b,streaming:L}),e[21]=b,e[22]=a,e[23]=j,e[24]=L,e[25]=A):A=e[25];let I;return e[26]!==k||e[27]!==T||e[28]!==M||e[29]!==P||e[30]!==A?(I=l.jsx(st,{icon:T,title:M,summary:k,state:P,onOpenChange:u,children:A}),e[26]=k,e[27]=T,e[28]=M,e[29]=P,e[30]=A,e[31]=I):I=e[31],I}function Ja(s){return s.parts??[]}function Qa(s){return s.parts??[]}function Xa(s){const e=$.c(24),t=U(),n=Xt(s.part.toolCallId);if(Vt(s.part.output)){let x;return e[0]!==s?(x=l.jsx(Zt,{...s}),e[0]=s,e[1]=x):x=e[1],x}let a;e[2]!==s||e[3]!==t?(a=Jt(s,t),e[2]=s,e[3]=t,e[4]=a):a=e[4];const{fallbackTitle:o,summary:c,usage:i,state:u}=a;let r;e[5]!==t?(r=t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(Je,{}),e[7]=m):m=e[7];let d;e[8]!==r?(d=l.jsx(Se,{icon:void 0,name:r,size:"2xs",className:"rounded-xs",fallbackIcon:m}),e[8]=r,e[9]=d):d=e[9];let f;e[10]!==n||e[11]!==s.part?(f=n&&Qt(s.part)?n:void 0,e[10]=n,e[11]=s.part,e[12]=f):f=e[12];let p;e[13]!==s.part?(p=l.jsx(Yt,{part:s.part}),e[13]=s.part,e[14]=p):p=e[14];let g;return e[15]!==o||e[16]!==s.latency||e[17]!==u||e[18]!==c||e[19]!==d||e[20]!==f||e[21]!==p||e[22]!==i?(g=l.jsx(st,{icon:d,title:o,summary:c,state:u,usage:i,latency:s.latency,onFlip:f,children:p}),e[15]=o,e[16]=s.latency,e[17]=u,e[18]=c,e[19]=d,e[20]=f,e[21]=p,e[22]=i,e[23]=g):g=e[23],g}function Ya(s){const e=$.c(26),t=U(),n=Rt(s.part.input?.agent_id),a=Xt(s.part.toolCallId);if(Vt(s.part.output)){let b;return e[0]!==s?(b=l.jsx(Zt,{...s}),e[0]=s,e[1]=b):b=e[1],b}let o;e[2]!==s||e[3]!==t?(o=Jt(s,t),e[2]=s,e[3]=t,e[4]=o):o=e[4];const{fallbackTitle:c,summary:i,usage:u,state:r}=o,m=n?.icon;let d;e[5]!==t||e[6]!==n?.title?(d=n?.title??t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=n?.title,e[7]=d):d=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Je,{}),e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==d?(p=l.jsx(Se,{icon:m,name:d,size:"2xs",className:"rounded-xs",fallbackIcon:f}),e[9]=m,e[10]=d,e[11]=p):p=e[11];const g=n?.title??c;let x;e[12]!==a||e[13]!==s.part?(x=a&&Qt(s.part)?a:void 0,e[12]=a,e[13]=s.part,e[14]=x):x=e[14];let h;e[15]!==s.part?(h=l.jsx(Yt,{part:s.part}),e[15]=s.part,e[16]=h):h=e[16];let y;return e[17]!==s.latency||e[18]!==r||e[19]!==i||e[20]!==p||e[21]!==g||e[22]!==x||e[23]!==h||e[24]!==u?(y=l.jsx(st,{icon:p,title:g,summary:i,state:r,usage:u,latency:s.latency,onFlip:x,children:h}),e[17]=s.latency,e[18]=r,e[19]=i,e[20]=p,e[21]=g,e[22]=x,e[23]=h,e[24]=u,e[25]=y):y=e[25],y}function Za(s){const e=$.c(28),{part:t}=s,n=U();if(!t.state.startsWith("output-"))return null;const a=t.input?.plan??"",c=t.output?.approved===!0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(He,{className:"size-4 text-special shrink-0"}),e[0]=i):i=e[0];let u;e[1]!==n?(u=n("chat.proposePlan.implementationPlan"),e[1]=n,e[2]=u):u=e[2];let r;e[3]!==u?(r=l.jsx("span",{className:"text-sm font-medium text-foreground/80",children:u}),e[3]=u,e[4]=r):r=e[4];let m;e[5]!==c||e[6]!==n?(m=c&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-success bg-success/10 px-1.5 py-0.5 rounded-md",children:[l.jsx(gt,{size:12}),n("chat.proposePlan.approved")]}),e[5]=c,e[6]=n,e[7]=m):m=e[7];let d;e[8]!==c||e[9]!==t.state||e[10]!==n?(d=!c&&t.state==="output-available"&&l.jsx("span",{className:"text-xs text-muted-foreground/70 italic",children:n("chat.proposePlan.rejected")}),e[8]=c,e[9]=t.state,e[10]=n,e[11]=d):d=e[11];let f;e[12]!==r||e[13]!==m||e[14]!==d?(f=l.jsxs("div",{className:"flex items-center gap-2",children:[i,r,m,d]}),e[12]=r,e[13]=m,e[14]=d,e[15]=f):f=e[15];let p;e[16]!==n?(p=n("chat.proposePlan.viewPlan"),e[16]=n,e[17]=p):p=e[17];let g;e[18]!==p?(g=l.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:p}),e[18]=p,e[19]=g):g=e[19];let x;e[20]!==a?(x=l.jsx("div",{className:"mt-1 pl-2 border-l-2 border-special/30 prose prose-sm max-w-none text-sm",children:l.jsx($e,{id:"plan-content",part:{type:"text",text:a}})}),e[20]=a,e[21]=x):x=e[21];let h;e[22]!==g||e[23]!==x?(h=l.jsxs("details",{className:"ml-6",children:[g,x]}),e[22]=g,e[23]=x,e[24]=h):h=e[24];let y;return e[25]!==h||e[26]!==f?(y=l.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[f,h]}),e[25]=h,e[26]=f,e[27]=y):y=e[27],y}function We(s){const e=$.c(4),{connection_id:t,iconSize:n}=s,a=n===void 0?"xs":n,o=Rt(t);if(!o)return null;let c;return e[0]!==o.icon||e[1]!==o.title||e[2]!==a?(c=l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx(Se,{icon:o.icon,name:o.title,size:a})}),e[0]=o.icon,e[1]=o.title,e[2]=a,e[3]=c):c=e[3],c}We.Fallback=function({iconSize:e="xs"}){const t=e==="sm"?"size-6":"size-5";return l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:K(t,"rounded bg-muted animate-pulse")})})};function he(s){const e=$.c(18),{connectionIds:t,maxVisibleIcons:n,iconSize:a,className:o}=s,c=n===void 0?2:n,i=a===void 0?"xs":a;if(t.length===0)return null;let u,r,m;if(e[0]!==o||e[1]!==t||e[2]!==i||e[3]!==c){const p=t.slice(0,c);u=t.length-c,e[7]!==o?(r=K("flex items-center justify-end -space-x-2",o),e[7]=o,e[8]=r):r=e[8];let g;e[9]!==i?(g=x=>l.jsx(z.Suspense,{fallback:l.jsx(We.Fallback,{iconSize:i}),children:l.jsx(We,{connection_id:x,iconSize:i})},x),e[9]=i,e[10]=g):g=e[10],m=p.map(g),e[0]=o,e[1]=t,e[2]=i,e[3]=c,e[4]=u,e[5]=r,e[6]=m}else u=e[4],r=e[5],m=e[6];let d;e[11]!==i||e[12]!==u?(d=u>0&&l.jsx("div",{className:K("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",i==="sm"?"size-8":"size-6"),children:l.jsxs("span",{className:K(i==="sm"?"text-sm":"text-xs","font-medium text-muted-foreground"),"aria-label":`and ${u} more`,children:["+",u]})}),e[11]=i,e[12]=u,e[13]=d):d=e[13];let f;return e[14]!==r||e[15]!==m||e[16]!==d?(f=l.jsxs("div",{className:r,children:[m,d]}),e[14]=r,e[15]=m,e[16]=d,e[17]=f):f=e[17],f}he.Fallback=function({maxVisibleIcons:e=2,totalCount:t,iconSize:n="xs"}){const a=n==="sm"?"size-6":"size-5",o=n==="sm"?"size-8":"size-6",c=t!==void 0&&t>e;return l.jsxs("div",{className:"flex items-center -space-x-2",children:[Array.from({length:e}).map((i,u)=>l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:K(a,"rounded bg-muted animate-pulse")})},u)),c&&l.jsx("div",{className:K("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",o),children:l.jsx("div",{className:K(n==="sm"?"h-3.5 w-5":"h-3 w-4","rounded bg-muted animate-pulse")})})]})};const el="This document certifies that the bearer agent has been granted authorized access to the tools and capabilities described herein. The agent is permitted to operate within the scope defined by its instructions and shall act in accordance with the constraints set forth by the issuing organization. This credential remains valid for the duration of the agent's active status. Unauthorized modification of this agent's permissions or scope is prohibited. The issuing authority reserves the right to revoke access at any time. All actions performed by this agent are subject to audit and review by the organization administrator. ",pt=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function tl(s){const e=$.c(105),{part:t,latency:n}=s,a=U(),o=zt(),c=ge(t.state),i=z.useRef(null),u=z.useRef(null),r=z.useRef(null),m=z.useRef(null),d=z.useRef(null);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{pt?.matches||(d.current=i.current?.getBoundingClientRect()??null,i.current&&(i.current.style.willChange="transform"))},e[0]=f):f=e[0];const p=f;let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=F=>{if(pt?.matches)return;const O=d.current,q=i.current;if(!O||!q)return;const oe=(F.clientX-O.left)/O.width*100,re=(F.clientY-O.top)/O.height*100;q.style.transform=`perspective(800px) rotateY(${(oe-50)*.05}deg) rotateX(${(re-50)*-.05}deg)`,u.current&&(u.current.style.opacity="1",u.current.style.transform=`translate(${(oe-50)*.15}px, ${(re-50)*.15}px)`),r.current&&(r.current.style.opacity="0.45"),m.current&&(m.current.style.opacity="0.45")},e[1]=g):g=e[1];const x=g;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const F=i.current;F&&(F.style.transform="none",F.style.willChange="auto"),u.current&&(u.current.style.opacity="0.4",u.current.style.transform="translate(0, 0)"),r.current&&(r.current.style.opacity="0.3"),m.current&&(m.current.style.opacity="0.3"),d.current=null},e[2]=h):h=e[2];const y=h;if(c==="loading"){let F;e[3]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{className:"animate-pulse"}),e[3]=F):F=e[3];let O;e[4]!==a?(O=a("chat.agentCreate.creating"),e[4]=a,e[5]=O):O=e[5];let q;return e[6]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"loading",defaultOpen:!0}),e[6]=O,e[7]=q):q=e[7],q}if(c==="approval"){let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[8]=F):F=e[8];let O;e[9]!==a?(O=a("chat.agentCreate.createAgent"),e[9]=a,e[10]=O):O=e[10];let q;return e[11]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"idle"}),e[11]=O,e[12]=q):q=e[12],q}if(c==="error"){let F;e[13]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[13]=F):F=e[13];let O;e[14]!==t.state||e[15]!==a?(O=t.state==="output-denied"?a("chat.agentCreate.cancelled"):a("chat.agentCreate.couldntCreate"),e[14]=t.state,e[15]=a,e[16]=O):O=e[16];let q;e[17]!==n?(q=l.jsx(fe,{latency:n}),e[17]=n,e[18]=q):q=e[18];let oe;return e[19]!==O||e[20]!==q?(oe=l.jsx(Y,{icon:F,title:O,state:"error",trailing:q}),e[19]=O,e[20]=q,e[21]=oe):oe=e[21],oe}let b,N,j,w,k,S,v,_,T,M,P,L,A,I,E,C,R,D,B,H,W,G,Q;if(e[22]!==n||e[23]!==o||e[24]!==t.output||e[25]!==a){R=Symbol.for("react.early_return_sentinel");e:{const F=Me(t.output)?.item;if(!F?.id||!F?.title){let ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(ie=l.jsx(de,{}),e[49]=ie):ie=e[49];let ce;e[50]!==a?(ce=a("chat.agentCreate.created"),e[50]=a,e[51]=ce):ce=e[51];let J;e[52]!==n?(J=l.jsx(fe,{latency:n}),e[52]=n,e[53]=J):J=e[53];let se;e[54]!==ce||e[55]!==J?(se=l.jsx(Y,{icon:ie,title:ce,state:"idle",trailing:J}),e[54]=ce,e[55]=J,e[56]=se):se=e[56],R=se;break e}const O=(F.connections??[]).map(sl);let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=l.jsx(de,{className:"text-success"}),e[57]=q):q=e[57];let oe;e[58]!==n?(oe=l.jsx(fe,{latency:n}),e[58]=n,e[59]=oe):oe=e[59],C=l.jsx(Y,{icon:q,title:a("chat.agentCreate.agentCreated",{name:F.title}),state:"idle",trailing:oe}),E="mt-2 overflow-hidden surface p-2.5",j=i,w="relative overflow-hidden rounded-lg bg-accent/25 p-2",e[60]===Symbol.for("react.memo_cache_sentinel")?(k={transition:"transform 0.3s ease-out"},e[60]=k):k=e[60],S=p,v=x,_=y,e[61]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx("div",{ref:u,className:"pointer-events-none absolute inset-[-20%] z-[1] select-none rounded-lg",style:{background:"linear-gradient(135deg, hsla(280, 60%, 80%, 0.35) 0%, transparent 35%), linear-gradient(315deg, hsla(190, 70%, 80%, 0.35) 0%, transparent 35%), linear-gradient(225deg, hsla(140, 55%, 80%, 0.3) 0%, transparent 30%), linear-gradient(45deg, hsla(320, 55%, 82%, 0.3) 0%, transparent 30%)",opacity:.4,transition:"opacity 0.3s ease, transform 0.3s ease-out"},"aria-hidden":"true"}),e[61]=T):T=e[61];let re;e[62]===Symbol.for("react.memo_cache_sentinel")?(re={textAlign:"justify",wordBreak:"break-all"},e[62]=re):re=e[62],e[63]===Symbol.for("react.memo_cache_sentinel")?(M=l.jsx("p",{className:"pointer-events-none absolute inset-0 z-[1] select-none overflow-hidden text-[6px] font-light leading-[1.5] tracking-[0.06px] text-background opacity-50 mix-blend-overlay",style:re,"aria-hidden":"true",children:el.repeat(6)}),P=l.jsx("img",{src:"/stamp.svg",alt:"",className:"pointer-events-none absolute -right-10 -top-10 size-[140px] opacity-50 select-none","aria-hidden":"true"}),e[63]=M,e[64]=P):(M=e[63],P=e[64]),e[65]===Symbol.for("react.memo_cache_sentinel")?(L=l.jsx("img",{ref:r,src:"/left-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 left-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[65]=L):L=e[65],e[66]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx("img",{ref:m,src:"/right-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 right-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[66]=A):A=e[66],I=l.jsxs("div",{className:"relative",children:[l.jsxs("div",{className:"flex items-center gap-2.5 p-2",children:[l.jsx(Xe,{icon:F.icon,name:F.title,size:"md"}),l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:F.title})})]}),F.description&&l.jsx("div",{className:"px-2 pt-1 pr-16",children:l.jsx("p",{className:"text-sm leading-snug text-muted-foreground line-clamp-2",children:F.description})})]}),Q="relative z-[3] flex items-center gap-2.5 px-2 pt-6 pb-1";const ue=O.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:O.length}),children:l.jsx(he,{connectionIds:O,iconSize:"xs",maxVisibleIcons:3,className:"flex items-center justify-start -space-x-1"})});e[67]!==ue?(N=l.jsx("div",{className:"flex-1 min-w-0",children:ue}),e[67]=ue,e[68]=N):N=e[68],G="flex items-center gap-2 shrink-0",b=ye,D="sm",B="h-7",H=()=>o(F.id),W=a("chat.agentCreate.seeAgentLabel",{name:F.title})}e[22]=n,e[23]=o,e[24]=t.output,e[25]=a,e[26]=b,e[27]=N,e[28]=j,e[29]=w,e[30]=k,e[31]=S,e[32]=v,e[33]=_,e[34]=T,e[35]=M,e[36]=P,e[37]=L,e[38]=A,e[39]=I,e[40]=E,e[41]=C,e[42]=R,e[43]=D,e[44]=B,e[45]=H,e[46]=W,e[47]=G,e[48]=Q}else b=e[26],N=e[27],j=e[28],w=e[29],k=e[30],S=e[31],v=e[32],_=e[33],T=e[34],M=e[35],P=e[36],L=e[37],A=e[38],I=e[39],E=e[40],C=e[41],R=e[42],D=e[43],B=e[44],H=e[45],W=e[46],G=e[47],Q=e[48];if(R!==Symbol.for("react.early_return_sentinel"))return R;let te;e[69]!==a?(te=a("chat.agentCreate.seeAgent"),e[69]=a,e[70]=te):te=e[70];let X;e[71]!==b||e[72]!==te||e[73]!==D||e[74]!==B||e[75]!==H||e[76]!==W?(X=l.jsx(b,{size:D,className:B,onClick:H,"aria-label":W,children:te}),e[71]=b,e[72]=te,e[73]=D,e[74]=B,e[75]=H,e[76]=W,e[77]=X):X=e[77];let Z;e[78]!==X||e[79]!==G?(Z=l.jsx("div",{className:G,children:X}),e[78]=X,e[79]=G,e[80]=Z):Z=e[80];let le;e[81]!==N||e[82]!==Z||e[83]!==Q?(le=l.jsxs("div",{className:Q,children:[N,Z]}),e[81]=N,e[82]=Z,e[83]=Q,e[84]=le):le=e[84];let ee;e[85]!==j||e[86]!==w||e[87]!==k||e[88]!==S||e[89]!==v||e[90]!==_||e[91]!==T||e[92]!==M||e[93]!==P||e[94]!==L||e[95]!==A||e[96]!==I||e[97]!==le?(ee=l.jsxs("div",{ref:j,className:w,style:k,onMouseEnter:S,onMouseMove:v,onMouseLeave:_,children:[T,M,P,L,A,I,le]}),e[85]=j,e[86]=w,e[87]=k,e[88]=S,e[89]=v,e[90]=_,e[91]=T,e[92]=M,e[93]=P,e[94]=L,e[95]=A,e[96]=I,e[97]=le,e[98]=ee):ee=e[98];let V;e[99]!==E||e[100]!==ee?(V=l.jsx("div",{className:E,children:ee}),e[99]=E,e[100]=ee,e[101]=V):V=e[101];let ae;return e[102]!==C||e[103]!==V?(ae=l.jsxs(l.Fragment,{children:[C,V]}),e[102]=C,e[103]=V,e[104]=ae):ae=e[104],ae}function sl(s){return s.connection_id}function nl(s){const e=$.c(24),{agent:t}=s,n=zt();if(!t.id)return null;let a;e[0]!==t.connections?(a=t.connections??[],e[0]=t.connections,e[1]=a):a=e[1];let o;e[2]!==a?(o=a.map(al),e[2]=a,e[3]=o):o=e[3];const c=o;let i;e[4]!==t.id||e[5]!==n?(i=()=>n(t.id),e[4]=t.id,e[5]=n,e[6]=i):i=e[6];let u;e[7]!==t.icon||e[8]!==t.title?(u=l.jsx(Xe,{icon:t.icon,name:t.title,size:"sm"}),e[7]=t.icon,e[8]=t.title,e[9]=u):u=e[9];let r;e[10]!==t.title?(r=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[10]=t.title,e[11]=r):r=e[11];let m;e[12]!==t.description?(m=t.description&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[12]=t.description,e[13]=m):m=e[13];let d;e[14]!==r||e[15]!==m?(d=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r,m]}),e[14]=r,e[15]=m,e[16]=d):d=e[16];let f;e[17]!==c?(f=c.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:c.length}),children:l.jsx(he,{connectionIds:c,iconSize:"xs",maxVisibleIcons:3})}),e[17]=c,e[18]=f):f=e[18];let p;return e[19]!==i||e[20]!==u||e[21]!==d||e[22]!==f?(p=l.jsxs("button",{type:"button",onClick:i,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[u,d,f]}),e[19]=i,e[20]=u,e[21]=d,e[22]=f,e[23]=p):p=e[23],p}function al(s){return s.connection_id}function ll(s){const e=$.c(59),{part:t,latency:n}=s,a=U(),o=Qe(),{org:c}=me();let i;e[0]!==t.state?(i=ge(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,m,d,f,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Me(t.output);if(m=Array.isArray(b?.items)?b.items.filter(ms):[],u==="loading"){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(de,{className:"animate-pulse"}),e[13]=k):k=e[13];let S;e[14]!==a?(S=a("chat.agentList.loading"),e[14]=a,e[15]=S):S=e[15];let v;e[16]!==S?(v=l.jsx(Y,{icon:k,title:S,state:"loading"}),e[16]=S,e[17]=v):v=e[17],g=v;break e}if(u==="approval"){let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(de,{}),e[18]=k):k=e[18];let S;e[19]!==a?(S=a("chat.agentList.listAgents"),e[19]=a,e[20]=S):S=e[20];let v;e[21]!==S?(v=l.jsx(Y,{icon:k,title:S,state:"idle"}),e[21]=S,e[22]=v):v=e[22],g=v;break e}if(u==="error"){let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(de,{}),e[23]=k):k=e[23];let S;e[24]!==t.state||e[25]!==a?(S=t.state==="output-denied"?a("chat.agentList.unavailable"):a("chat.agentList.couldntLoad"),e[24]=t.state,e[25]=a,e[26]=S):S=e[26];let v;e[27]!==n?(v=l.jsx(fe,{latency:n}),e[27]=n,e[28]=v):v=e[28];let _;e[29]!==S||e[30]!==v?(_=l.jsx(Y,{icon:k,title:S,state:"error",trailing:v}),e[29]=S,e[30]=v,e[31]=_):_=e[31],g=_;break e}if(m.length===0){let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(de,{}),e[32]=k):k=e[32];let S;e[33]!==a?(S=a("chat.agentList.noAgents"),e[33]=a,e[34]=S):S=e[34];let v;e[35]!==a?(v=a("chat.agentList.noAgentsDesc"),e[35]=a,e[36]=v):v=e[36];let _;e[37]!==n?(_=l.jsx(fe,{latency:n}),e[37]=n,e[38]=_):_=e[38];let T;e[39]!==S||e[40]!==v||e[41]!==_?(T=l.jsx(Y,{icon:k,title:S,summary:v,state:"idle",trailing:_}),e[39]=S,e[40]=v,e[41]=_,e[42]=T):T=e[42],g=T;break e}const N=m.slice(0,Dt);r=m.length-N.length;let j;e[43]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(de,{className:"text-success"}),e[43]=j):j=e[43];let w;e[44]!==n?(w=l.jsx(fe,{latency:n}),e[44]=n,e[45]=w):w=e[45],p=l.jsx(Y,{icon:j,title:m.length===1?a("chat.agentList.oneAgent"):a("chat.agentList.multiAgents",{count:m.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",f=N.map(ol)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=m,e[9]=d,e[10]=f,e[11]=p,e[12]=g}else r=e[7],m=e[8],d=e[9],f=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[46]!==r||e[47]!==m||e[48]!==o||e[49]!==c||e[50]!==a?(x=r>0&&l.jsx(Ot,{count:m.length,noun:a("chat.agentList.agentsNoun"),onClick:()=>o({to:"/$org/settings/projects",params:{org:c.slug}})}),e[46]=r,e[47]=m,e[48]=o,e[49]=c,e[50]=a,e[51]=x):x=e[51];let h;e[52]!==d||e[53]!==f||e[54]!==x?(h=l.jsxs("div",{className:d,children:[f,x]}),e[52]=d,e[53]=f,e[54]=x,e[55]=h):h=e[55];let y;return e[56]!==p||e[57]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[56]=p,e[57]=h,e[58]=y):y=e[58],y}function ol(s){return l.jsx(nl,{agent:s},s.id)}const rl={active:"bg-success",inactive:"bg-muted-foreground",error:"bg-destructive"};function il(s){const e=$.c(27),{connection:t}=s,n=Qe(),{org:a}=me(),o=t.slug,c=t.description||t.app_name,i=!o||void 0;let u;e[0]!==n||e[1]!==a||e[2]!==o?(u=()=>o&&n({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:o}}),e[0]=n,e[1]=a,e[2]=o,e[3]=u):u=e[3];let r;e[4]!==t.icon||e[5]!==t.title?(r=l.jsx(Se,{icon:t.icon,name:t.title,size:"sm"}),e[4]=t.icon,e[5]=t.title,e[6]=r):r=e[6];let m;e[7]!==t.title?(m=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[7]=t.title,e[8]=m):m=e[8];let d;e[9]!==c?(d=c&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:c}),e[9]=c,e[10]=d):d=e[10];let f;e[11]!==m||e[12]!==d?(f=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[m,d]}),e[11]=m,e[12]=d,e[13]=f):f=e[13];const p=rl[t.status]??"bg-muted-foreground";let g;e[14]!==p?(g=K("size-2 shrink-0 rounded-full",p),e[14]=p,e[15]=g):g=e[15];let x;e[16]!==g?(x=l.jsx("span",{className:g,"aria-hidden":"true"}),e[16]=g,e[17]=x):x=e[17];let h;e[18]!==t.status?(h=l.jsx("span",{className:"sr-only",children:t.status}),e[18]=t.status,e[19]=h):h=e[19];let y;return e[20]!==i||e[21]!==h||e[22]!==u||e[23]!==r||e[24]!==f||e[25]!==x?(y=l.jsxs("button",{type:"button","aria-disabled":i,onClick:u,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer aria-disabled:cursor-default aria-disabled:hover:bg-card",children:[r,f,x,h]}),e[20]=i,e[21]=h,e[22]=u,e[23]=r,e[24]=f,e[25]=x,e[26]=y):y=e[26],y}function cl(s){const e=$.c(54),{part:t,latency:n}=s,a=U(),o=Qe(),{org:c}=me();let i;e[0]!==t.state?(i=ge(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,m,d,f,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Me(t.output);if(m=(Array.isArray(b?.items)?b.items:[]).filter(dl),u==="loading"||u==="approval"){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(we,{className:"animate-pulse"}),e[13]=k):k=e[13];let S;e[14]!==a?(S=a("chat.connectionList.loadingTitle"),e[14]=a,e[15]=S):S=e[15];let v;e[16]!==S?(v=l.jsx(Y,{icon:k,title:S,state:"loading"}),e[16]=S,e[17]=v):v=e[17],g=v;break e}if(u==="error"){let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(we,{}),e[18]=k):k=e[18];let S;e[19]!==t.state||e[20]!==a?(S=t.state==="output-denied"?a("chat.connectionList.unavailableTitle"):a("chat.connectionList.errorTitle"),e[19]=t.state,e[20]=a,e[21]=S):S=e[21];let v;e[22]!==n?(v=l.jsx(fe,{latency:n}),e[22]=n,e[23]=v):v=e[23];let _;e[24]!==S||e[25]!==v?(_=l.jsx(Y,{icon:k,title:S,state:"error",trailing:v}),e[24]=S,e[25]=v,e[26]=_):_=e[26],g=_;break e}if(m.length===0){let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(we,{}),e[27]=k):k=e[27];let S;e[28]!==a?(S=a("chat.connectionList.emptyTitle"),e[28]=a,e[29]=S):S=e[29];let v;e[30]!==a?(v=a("chat.connectionList.emptySummary"),e[30]=a,e[31]=v):v=e[31];let _;e[32]!==n?(_=l.jsx(fe,{latency:n}),e[32]=n,e[33]=_):_=e[33];let T;e[34]!==S||e[35]!==v||e[36]!==_?(T=l.jsx(Y,{icon:k,title:S,summary:v,state:"idle",trailing:_}),e[34]=S,e[35]=v,e[36]=_,e[37]=T):T=e[37],g=T;break e}const N=m.slice(0,Dt);r=m.length-N.length;let j;e[38]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{className:"text-success"}),e[38]=j):j=e[38];let w;e[39]!==n?(w=l.jsx(fe,{latency:n}),e[39]=n,e[40]=w):w=e[40],p=l.jsx(Y,{icon:j,title:m.length===1?a("chat.connectionList.singleConnection"):a("chat.connectionList.multipleConnections",{count:m.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",f=N.map(ul)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=m,e[9]=d,e[10]=f,e[11]=p,e[12]=g}else r=e[7],m=e[8],d=e[9],f=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[41]!==r||e[42]!==m||e[43]!==o||e[44]!==c||e[45]!==a?(x=r>0&&l.jsx(Ot,{count:m.length,noun:a("chat.connectionList.connectionNoun"),onClick:()=>o({to:"/$org/settings/connections",params:{org:c.slug}})}),e[41]=r,e[42]=m,e[43]=o,e[44]=c,e[45]=a,e[46]=x):x=e[46];let h;e[47]!==d||e[48]!==f||e[49]!==x?(h=l.jsxs("div",{className:d,children:[f,x]}),e[47]=d,e[48]=f,e[49]=x,e[50]=h):h=e[50];let y;return e[51]!==p||e[52]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[51]=p,e[52]=h,e[53]=y):y=e[53],y}function ul(s){return l.jsx(il,{connection:s},s.id)}function dl(s){return s.connection_type!=="VIRTUAL"}function fl(){const s=$.c(46),e=U(),t=ve(),{sendMessage:n,isStreaming:a,messages:o}=an(),{org:c}=me(),i=t?.virtualMcpId,{prompts:u}=un(c.slug),r=i??null;let m;s[0]!==c.id||s[1]!==c.slug||s[2]!==r?(m={connectionId:r,orgId:c.id,orgSlug:c.slug},s[0]=c.id,s[1]=c.slug,s[2]=r,s[3]=m):m=s[3];let d;s[4]!==i?(d=!!i&&rt(i),s[4]=i,s[5]=d):d=s[5];let f;s[6]!==d?(f={enabled:d},s[6]=d,s[7]=f):f=s[7];const p=xn(m,f),[g,x]=z.useState(null);if(!i||a||!rt(i)||!o.some(ml))return null;let y;if(s[8]!==u||s[9]!==i){let C;s[11]!==i?(C=R=>R.agentId===i&&R.promptName,s[11]=i,s[12]=C):C=s[12],y=u.find(C),s[8]=u,s[9]=i,s[10]=y}else y=s[10];const b=y;if(!b)return null;let N;s[13]!==p||s[14]!==n||s[15]!==e?(N=async(C,R)=>{if(!p){Be.error(e("chat.nextActionChip.mcpClientNotAvailable"));return}try{const D=await Tn(p,C.name,R);await n({type:"doc",content:[{type:"paragraph",content:[Rs({id:C.name,name:At(C.name,Mt(C._meta)),metadata:D.messages,char:"/",kind:"prompt",args:R}),{type:"text",text:" "}]}]})}catch(D){console.error("[next-action-chip] failed",D),Be.error(e("chat.nextActionChip.failedLoadPrompt"))}},s[13]=p,s[14]=n,s[15]=e,s[16]=N):N=s[16];const j=N;let w;s[17]!==b._meta||s[18]!==b.arguments||s[19]!==b.description||s[20]!==b.promptName||s[21]!==b.title||s[22]!==j?(w=()=>{const C={name:b.promptName,title:b.title,description:b.description,arguments:b.arguments,_meta:b._meta};if(C.arguments&&C.arguments.length>0){x(C);return}j(C)},s[17]=b._meta,s[18]=b.arguments,s[19]=b.description,s[20]=b.promptName,s[21]=b.title,s[22]=j,s[23]=w):w=s[23];const k=w;let S;s[24]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(_n,{className:"size-3 shrink-0 text-special"}),s[24]=S):S=s[24];let v;s[25]!==e?(v=e("chat.nextActionChip.next"),s[25]=e,s[26]=v):v=s[26];let _;s[27]!==v?(_=l.jsx("span",{className:"font-medium text-foreground/80",children:v}),s[27]=v,s[28]=_):_=s[28];let T;s[29]!==b.title?(T=l.jsx("span",{className:"truncate",children:b.title}),s[29]=b.title,s[30]=T):T=s[30];let M;s[31]===Symbol.for("react.memo_cache_sentinel")?(M=l.jsx(St,{className:"size-3 shrink-0 transition-transform duration-150 group-hover:translate-x-0.5"}),s[31]=M):M=s[31];let P;s[32]!==k||s[33]!==T||s[34]!==_?(P=l.jsxs(ye,{type:"button",variant:"outline",size:"sm",onClick:k,className:"group mt-3 self-start text-muted-foreground",children:[S,_,T,M]}),s[32]=k,s[33]=T,s[34]=_,s[35]=P):P=s[35];let L;s[36]===Symbol.for("react.memo_cache_sentinel")?(L=C=>x(C),s[36]=L):L=s[36];let A;s[37]!==g||s[38]!==j?(A=async C=>{const R=g;x(null),R&&await j(R,C)},s[37]=g,s[38]=j,s[39]=A):A=s[39];let I;s[40]!==g||s[41]!==A?(I=l.jsx(zs,{prompt:g,setPrompt:L,onSubmit:A}),s[40]=g,s[41]=A,s[42]=I):I=s[42];let E;return s[43]!==P||s[44]!==I?(E=l.jsxs(l.Fragment,{children:[P,I]}),s[43]=P,s[44]=I,s[45]=E):E=s[45],E}function ml(s){return s.role==="user"||s.parts.some(pl)}function pl(s){return s.type==="tool-user_ask"&&s.state==="output-available"}function gl(s){const e=$.c(25),{event:t}=s,n=U(),[a,o]=z.useState(!1);let c;e[0]!==t.data?(c=JSON.stringify(t.data,null,2),e[0]=t.data,e[1]=c):c=e[1];const i=c;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>o(xl),e[2]=u):u=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx(ws,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=r):r=e[3];let m;e[4]!==n?(m=n("chat.triggerEventPart.triggeredByEvent"),e[4]=n,e[5]=m):m=e[5];let d;e[6]!==m?(d=l.jsx("span",{className:"font-medium",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==t.type?(f=l.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:t.type}),e[8]=t.type,e[9]=f):f=e[9];const p=a&&"rotate-180";let g;e[10]!==p?(g=K("ml-auto size-4 shrink-0 text-muted-foreground transition-transform",p),e[10]=p,e[11]=g):g=e[11];let x;e[12]!==g?(x=l.jsx(Cn,{className:g}),e[12]=g,e[13]=x):x=e[13];let h;e[14]!==d||e[15]!==f||e[16]!==x?(h=l.jsxs("button",{type:"button",onClick:u,className:"flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer",children:[r,d,f,x]}),e[14]=d,e[15]=f,e[16]=x,e[17]=h):h=e[17];let y;e[18]!==t.source||e[19]!==a||e[20]!==i?(y=a&&l.jsxs("div",{className:"border-t border-border/60 px-3 py-2",children:[l.jsx("div",{className:"mb-2 text-xs text-muted-foreground",children:t.source}),l.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words text-xs text-foreground",children:i})]}),e[18]=t.source,e[19]=a,e[20]=i,e[21]=y):y=e[21];let b;return e[22]!==h||e[23]!==y?(b=l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background overflow-hidden text-left",children:[h,y]}),e[22]=h,e[23]=y,e[24]=b):b=e[24],b}function xl(s){return!s}const hl=[Os,Bs,Us];function bl(s){const e=$.c(6),{tiptapDoc:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={attributes:{class:"prose prose-sm max-w-none text-[14px]! focus:outline-none"}},e[0]=n):n=e[0];let a;e[1]!==t?(a={extensions:hl,content:t,editable:!1,editorProps:n},e[1]=t,e[2]=a):a=e[2];const o=Fs(a);if(!o)return null;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=K(Ds,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"),e[3]=c):c=e[3];let i;return e[4]!==o?(i=l.jsx(Hs,{editor:o,className:c}),e[4]=o,e[5]=i):i=e[5],i}function es(s){const e=$.c(35),{message:t,className:n,onScrollToPair:a}=s,{id:o,parts:c,metadata:i}=t,[u,r]=z.useState(!1),[m,d]=z.useState(!1),f=z.useRef(!1);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=L=>{L&&!f.current&&(f.current=!0,d(L.scrollHeight>L.clientHeight))},e[0]=p):p=e[0];const g=p;if(!c||c.length===0)return null;let x;e[1]!==a?(x=()=>{r(!0),a?.()},e[1]=a,e[2]=x):x=e[2];const h=x,y=i?.tiptapDoc;let b;e[3]!==n?(b=K("message-block flex w-full min-w-0 flex-col items-end px-2.5 text-foreground",n),e[3]=n,e[4]=b):b=e[4];let N,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(N=()=>r(!0),j=()=>r(!1),e[5]=N,e[6]=j):(N=e[5],j=e[6]);let w;e[7]!==u||e[8]!==m?(w=K("px-4 py-2.5 transition-[max-height,opacity] duration-300 ease-out",u?"max-h-[50vh] overflow-auto opacity-100":K("max-h-[168px] overflow-hidden opacity-99",m&&"mask-b-from-1%")),e[7]=u,e[8]=m,e[9]=w):w=e[9];let k;if(e[10]!==o||e[11]!==c){let L;e[13]!==o?(L=(A,I)=>A.type==="data-trigger-event"?l.jsx(gl,{event:A.data},`${o}-${I}`):null,e[13]=o,e[14]=L):L=e[14],k=c.map(L),e[10]=o,e[11]=c,e[12]=k}else k=e[12];let S;e[15]!==y||e[16]!==o||e[17]!==i||e[18]!==c?(S=y?l.jsx(bl,{tiptapDoc:i.tiptapDoc}):c.map((L,A)=>L.type==="text"?c[A-1]?.type==="data-trigger-event"?null:l.jsx($e,{id:o,part:L},`${o}-${A}`):null),e[15]=y,e[16]=o,e[17]=i,e[18]=c,e[19]=S):S=e[19];let v;e[20]!==k||e[21]!==S?(v=l.jsxs("div",{className:"flex flex-col gap-2",children:[k,S]}),e[20]=k,e[21]=S,e[22]=v):v=e[22];let _;e[23]!==w||e[24]!==v?(_=l.jsx("div",{ref:g,className:w,children:v}),e[23]=w,e[24]=v,e[25]=_):_=e[25];let T;e[26]!==h||e[27]!==_?(T=l.jsx("div",{tabIndex:0,onClick:h,onFocus:N,onBlur:j,className:"max-w-[85%] min-w-0 cursor-pointer rounded-2xl bg-muted text-sm wrap-break-word overflow-wrap-anywhere outline-none",children:_}),e[26]=h,e[27]=_,e[28]=T):T=e[28];let M;e[29]!==t?(M=l.jsx(et,{message:t,className:"mt-1 mr-1"}),e[29]=t,e[30]=M):M=e[30];let P;return e[31]!==T||e[32]!==M||e[33]!==b?(P=l.jsx(l.Fragment,{children:l.jsxs("div",{className:b,children:[T,M]})}),e[31]=T,e[32]=M,e[33]=b,e[34]=P):P=e[34],P}function ts(s){const e=$.c(10),{message:t,pending:n}=s,a=U();let o;e[0]!==n||e[1]!==a?(o=a(n?"chat.liveMessage.pending":"chat.liveMessage.readByAgent"),e[0]=n,e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=l.jsx("span",{className:"self-end px-3 text-xs text-muted-foreground",children:o}),e[3]=o,e[4]=c):c=e[4];let i;e[5]!==t?(i=l.jsx(es,{message:t}),e[5]=t,e[6]=i):i=e[6];let u;return e[7]!==c||e[8]!==i?(u=l.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[c,i]}),e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function yl(s){const e=$.c(5),{part:t}=s,{read:n}=wt();let a;if(e[0]!==t||e[1]!==n){const i=ln(t);a=i?n.get(i):void 0,e[0]=t,e[1]=n,e[2]=a}else a=e[2];const o=a;if(!o)return null;let c;return e[3]!==o?(c=l.jsx(ts,{message:o,pending:!1}),e[3]=o,e[4]=c):c=e[4],c}function jl(s){const e=new Map;for(let t=s.length-1;t>=0;t--){const n=s[t]?.parts;if(n)for(const a of n){const o=a;if(o.type!=="data-deck-updated")continue;const c=o.data;if(!c?.path)continue;const i=`deck:${c.path}`;e.has(i)||e.set(i,{tabId:ps(c.path),label:c.name||c.path,kind:c.kind==="page"?"page":"deck"})}}return Array.from(e.values())}function vl(){const s=$.c(9),e=U(),{openPanel:t}=Ze(),n=je()?.messages??[],a=jl(n);if(a.length===0)return null;const o=a.some(kl),c=a.some(Sl),i=e(o?c?"chat.threadHtmlPreviews.slidesAndPages":"chat.threadHtmlPreviews.slides":"chat.threadHtmlPreviews.pages"),u="flex flex-col gap-1.5 py-2";let r;s[0]!==i?(r=l.jsx("div",{className:"text-xs text-muted-foreground/70",children:i}),s[0]=i,s[1]=r):r=s[1];const m="flex flex-wrap gap-2";let d;s[2]!==t?(d=x=>l.jsxs(ye,{type:"button",variant:"outline",className:"max-w-full",onClick:()=>t(x.tabId),children:[x.kind==="deck"?l.jsx(In,{className:"size-3.5 shrink-0 text-muted-foreground"}):l.jsx(_s,{className:"size-3.5 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"truncate font-medium text-foreground",children:x.label})]},x.tabId),s[2]=t,s[3]=d):d=s[3];const f=a.map(d);let p;s[4]!==f?(p=l.jsx("div",{className:m,children:f}),s[4]=f,s[5]=p):p=s[5];let g;return s[6]!==r||s[7]!==p?(g=l.jsxs("div",{className:u,children:[r,p]}),s[6]=r,s[7]=p,s[8]=g):g=s[8],g}function Sl(s){return s.kind==="page"}function kl(s){return s.kind==="deck"}function Nl(s){const e=$.c(29),{file:t}=s,n=U(),{openPanel:a}=Ze();let o;e[0]!==t.key||e[1]!==a?(o=()=>a(gs(t.key)),e[0]=t.key,e[1]=a,e[2]=o):o=e[2];const c=o;let i;e[3]!==t.filename?(i=l.jsx(Mn,{filename:t.filename,className:"h-5 w-4 shrink-0"}),e[3]=t.filename,e[4]=i):i=e[4];let u;e[5]!==t.filename||e[6]!==c?(u=l.jsx("button",{type:"button",onClick:c,className:"min-w-0 flex-1 truncate text-left text-sm font-medium text-foreground hover:underline",title:t.filename,children:t.filename}),e[5]=t.filename,e[6]=c,e[7]=u):u=e[7];const r=t.downloadUrl,m=t.filename;let d;e[8]!==n?(d=n("chat.outputFileRow.download"),e[8]=n,e[9]=d):d=e[9];let f;e[10]!==t.filename||e[11]!==n?(f=n("chat.outputFileRow.downloadFile",{filename:t.filename}),e[10]=t.filename,e[11]=n,e[12]=f):f=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(Ts,{className:"size-3.5"}),e[13]=p):p=e[13];let g;e[14]!==t.downloadUrl||e[15]!==t.filename||e[16]!==d||e[17]!==f?(g=l.jsx("a",{href:r,download:m,className:"hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:block group-focus-within:block",title:d,"aria-label":f,children:p}),e[14]=t.downloadUrl,e[15]=t.filename,e[16]=d,e[17]=f,e[18]=g):g=e[18];let x;e[19]!==n?(x=n("chat.outputFileRow.open"),e[19]=n,e[20]=x):x=e[20];let h;e[21]!==c||e[22]!==x?(h=l.jsx(ye,{variant:"outline",size:"sm",className:"h-7 shrink-0 px-2.5 text-xs",onClick:c,children:x}),e[21]=c,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==i||e[26]!==u||e[27]!==g?(y=l.jsxs("div",{className:"group flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2",children:[i,u,g,h]}),e[24]=h,e[25]=i,e[26]=u,e[27]=g,e[28]=y):y=e[28],y}function wl(s){return s.split("/").pop()??s}const _l=/(^|\/)output\//;function Tl(s){const e=new Set;for(const t of s.parts??[]){const n=t;if(n.state==="output-available"&&n.type==="tool-write"){const a=n.input?.path;a&&_l.test(a)&&e.add(wl(a))}}return e}function Cl(s){const e=$.c(4),{threadId:t,message:n}=s,a=Tl(n),o=a.size>0;let c;e[0]!==o?(c={enabled:o},e[0]=o,e[1]=c):c=e[1];const{data:i}=$n(t,c);if(a.size===0)return null;const u=(i??[]).filter(f=>a.has(f.filename));if(u.length===0)return null;const r="flex flex-col gap-1.5 py-2",m=u.map(Il);let d;return e[2]!==m?(d=l.jsx("div",{className:r,children:m}),e[2]=m,e[3]=d):d=e[3],d}function Il(s){return l.jsx(Nl,{file:s},s.key)}function $l(s){return s.type==="reasoning"}function Ml(s){const e=[],t=new Set,n=new Map,a=new Map,o=new Map;if(s){let i=null;for(let u=0;u<s.parts.length;u++){const r=s.parts[u];if($l(r)){i||(i={parts:[],startIndex:u},e.push(i)),i.parts.push(r),t.add(u);continue}if(i=null,r.type==="data-tool-metadata"&&"id"in r&&"data"in r){const m=r.data,d={};m.annotations&&(d.annotations=m.annotations),typeof m.latencyMs=="number"&&Number.isFinite(m.latencyMs)&&(d.latencySeconds=m.latencyMs/1e3),typeof m.outputBytes=="number"&&Number.isFinite(m.outputBytes)&&m.outputBytes>=0&&(d.outputBytes=m.outputBytes),m._meta&&typeof m._meta=="object"&&(d._meta=m._meta),n.set(r.id,d);continue}if(r.type==="data-tool-subtask-metadata"&&"id"in r){a.set(r.id,r.data);continue}if(r.type==="data-web-search"&&"id"in r&&"data"in r){const m=r.id,d=r.data;o.set(m,d.text??"");continue}}}const c=[];if(s)for(let i=0;i<s.parts.length;i++){const u=s.parts[i];if(u.type!=="step-start"){if(t.has(i)){const r=e.find(m=>m.startIndex===i);r&&c.push({kind:"reasoning-group",group:r});continue}u.type.startsWith("data-")&&u.type!==Ae||c.push({kind:"part",index:i})}}return{reasoningGroups:e,renderOrder:c,dataParts:{toolMetadata:n,toolSubtaskMetadata:a,webSearchStreaming:o}}}const Al=3;function Pl(s,e){let t=-1;for(let o=s.length-1;o>=0;o--){const c=s[o];if(c.kind==="part"&&e[c.index]?.type==="text"){t=o;break}}if(t===-1)return{collapsed:[],tail:s};const n=s.findLastIndex(o=>o.kind==="part"&&e[o.index]?.type===Ae),a=n!==-1&&n<t?n:t;return{collapsed:s.slice(0,a),tail:s.slice(a)}}function Ge(s,e){return s.kind==="part"&&e[s.index]?.type!==Ae}function El(s,e){let t=0,n=0;for(const a of s)if(a.kind==="reasoning-group")n++;else{const o=e[a.index]?.type;o==="text"?n++:(o==="dynamic-tool"||o?.startsWith("tool-"))&&o!=="tool-todo_write"&&o!=="tool-update_interests"&&t++}return{toolCalls:t,messages:n}}function Ll(s){const e=$.c(10),{toolCalls:t,messages:n}=s,a=U();let o;e[0]!==n||e[1]!==a||e[2]!==t?(o=t>0&&l.jsxs(l.Fragment,{children:[l.jsx(vt,{className:"size-3.5 shrink-0"}),l.jsxs("span",{children:[a("chat.assistant.toolCallPlural",{count:t}),n>0?",":""]})]}),e[0]=n,e[1]=a,e[2]=t,e[3]=o):o=e[3];let c;e[4]!==n||e[5]!==a?(c=n>0&&l.jsxs(l.Fragment,{children:[l.jsx(Cs,{className:"size-3.5 shrink-0"}),l.jsx("span",{children:a("chat.assistant.messagePlural",{count:n})})]}),e[4]=n,e[5]=a,e[6]=c):c=e[6];let i;return e[7]!==o||e[8]!==c?(i=l.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[o,c]}),e[7]=o,e[8]=c,e[9]=i):i=e[9],i}function Rl(s){const e=$.c(28),{items:t,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r}=s;let m;e[0]!==t||e[1]!==n.parts?(m=El(t,n.parts),e[0]=t,e[1]=n.parts,e[2]=m):m=e[2];const{toolCalls:d,messages:f}=m;if(d===0&&f===0)return null;let p;e[3]!==f||e[4]!==d?(p=l.jsx(Ll,{toolCalls:d,messages:f}),e[3]=f,e[4]=d,e[5]=p):p=e[5];let g;if(e[6]!==i||e[7]!==r||e[8]!==u||e[9]!==o||e[10]!==t||e[11]!==n||e[12]!==a||e[13]!==c){let y;e[15]!==i||e[16]!==r||e[17]!==u||e[18]!==o||e[19]!==n||e[20]!==a||e[21]!==c?(y=(b,N)=>ss({item:b,renderIndex:N,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r,isLastVisiblePart:!1}),e[15]=i,e[16]=r,e[17]=u,e[18]=o,e[19]=n,e[20]=a,e[21]=c,e[22]=y):y=e[22],g=t.map(y),e[6]=i,e[7]=r,e[8]=u,e[9]=o,e[10]=t,e[11]=n,e[12]=a,e[13]=c,e[14]=g}else g=e[14];let x;e[23]!==g?(x=l.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:g}),e[23]=g,e[24]=x):x=e[24];let h;return e[25]!==p||e[26]!==x?(h=l.jsx(Y,{icon:null,alwaysChevron:!0,title:p,state:"idle",children:x}),e[25]=p,e[26]=x,e[27]=h):h=e[27],h}function ss({item:s,renderIndex:e,message:t,reasoningGroups:n,isReasoningActive:a,totalDuration:o,dataParts:c,isLoading:i,isLast:u,isLastVisiblePart:r,renderOrder:m}){if(s.kind==="reasoning-group"){const{group:g}=s,x=g===n[n.length-1],h=a&&x;if(!g.parts.some(N=>N.text?.trim())&&!h)return null;const b=n.length===1?o:null;return l.jsx(Jn,{duration:b,parts:g.parts,isStreaming:h},`${t.id}-reasoning-${g.startIndex}`)}const d=t.parts[s.index],f=r||(m?m.findLastIndex(g=>Ge(g,t.parts))===e:!1),p=f?on(rn(),t.metadata?.usage):null;return l.jsx(zl,{part:d,id:t.id,usageStats:f&&l.jsx(Ks,{usage:p,duration:o,timestamp:!i&&l.jsx(et,{message:t})}),dataParts:c,isLoading:i,isLastMessage:u},`${t.id}-${s.index}`)}function zl(s){const e=$.c(118),{part:t,id:n,usageStats:a,dataParts:o,isLoading:c,isLastMessage:i}=s;let u;e[0]!==o.toolMetadata?(u=f=>o.toolMetadata.get(f),e[0]=o.toolMetadata,e[1]=u):u=e[1];const r=u;let m;e[2]!==o.toolSubtaskMetadata?(m=f=>o.toolSubtaskMetadata.get(f),e[2]=o.toolSubtaskMetadata,e[3]=m):m=e[3];const d=m;switch(t.type){case"dynamic-tool":{let f;e[4]!==r||e[5]!==t.toolCallId?(f=r(t.toolCallId)?.annotations,e[4]=r,e[5]=t.toolCallId,e[6]=f):f=e[6];let p;e[7]!==r||e[8]!==t.toolCallId?(p=r(t.toolCallId)?.latencySeconds,e[7]=r,e[8]=t.toolCallId,e[9]=p):p=e[9];let g;e[10]!==r||e[11]!==t.toolCallId?(g=r(t.toolCallId)?.outputBytes,e[10]=r,e[11]=t.toolCallId,e[12]=g):g=e[12];let x;e[13]!==r||e[14]!==t.toolCallId?(x=r(t.toolCallId)?._meta,e[13]=r,e[14]=t.toolCallId,e[15]=x):x=e[15];let h;return e[16]!==i||e[17]!==t||e[18]!==f||e[19]!==p||e[20]!==g||e[21]!==x?(h=l.jsx(dt,{part:t,annotations:f,latency:p,outputBytes:g,isLastMessage:i,toolMeta:x}),e[16]=i,e[17]=t,e[18]=f,e[19]=p,e[20]=g,e[21]=x,e[22]=h):h=e[22],h}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let f;e[23]!==r||e[24]!==t.toolCallId?(f=r(t.toolCallId)?.latencySeconds,e[23]=r,e[24]=t.toolCallId,e[25]=f):f=e[25];let p;return e[26]!==t||e[27]!==f?(p=l.jsx(Oa,{part:t,latency:f}),e[26]=t,e[27]=f,e[28]=p):p=e[28],p}case"tool-suggest_task":{let f;return e[29]!==t?(f=l.jsx(Ba,{part:t}),e[29]=t,e[30]=f):f=e[30],f}case"tool-propose_plan":{let f;return e[31]!==t?(f=l.jsx(Za,{part:t}),e[31]=t,e[32]=f):f=e[32],f}case"tool-generate_image":{let f;e[33]!==r||e[34]!==t.toolCallId?(f=r(t.toolCallId)?.latencySeconds,e[33]=r,e[34]=t.toolCallId,e[35]=f):f=e[35];let p;return e[36]!==t||e[37]!==f?(p=l.jsx(Ta,{part:t,latency:f}),e[36]=t,e[37]=f,e[38]=p):p=e[38],p}case"tool-web_search":case"tool-deep_research":{let f;e[39]!==r||e[40]!==t.toolCallId?(f=r(t.toolCallId)?.latencySeconds,e[39]=r,e[40]=t.toolCallId,e[41]=f):f=e[41];let p;e[42]!==o.webSearchStreaming||e[43]!==t.toolCallId?(p=o.webSearchStreaming.get(t.toolCallId),e[42]=o.webSearchStreaming,e[43]=t.toolCallId,e[44]=p):p=e[44];let g;return e[45]!==t||e[46]!==f||e[47]!==p?(g=l.jsx(Da,{part:t,latency:f,streamingText:p}),e[45]=t,e[46]=f,e[47]=p,e[48]=g):g=e[48],g}case"tool-subtask":{let f;e[49]!==d||e[50]!==t.toolCallId?(f=d(t.toolCallId),e[49]=d,e[50]=t.toolCallId,e[51]=f):f=e[51];let p;e[52]!==r||e[53]!==t.toolCallId?(p=r(t.toolCallId)?.annotations,e[52]=r,e[53]=t.toolCallId,e[54]=p):p=e[54];let g;e[55]!==r||e[56]!==t.toolCallId?(g=r(t.toolCallId)?.latencySeconds,e[55]=r,e[56]=t.toolCallId,e[57]=g):g=e[57];let x;e[58]!==t||e[59]!==f||e[60]!==p||e[61]!==g?(x={part:t,subtaskMeta:f,annotations:p,latency:g},e[58]=t,e[59]=f,e[60]=p,e[61]=g,e[62]=x):x=e[62];const h=x;let y;return e[63]!==h?(y=l.jsx(z.Suspense,{fallback:l.jsx(Xa,{...h}),children:l.jsx(Ya,{...h})}),e[63]=h,e[64]=y):y=e[64],y}case"text":{const f=!!a&&!c,p=c&&i;let g;return e[65]!==n||e[66]!==t||e[67]!==f||e[68]!==p||e[69]!==a?(g=l.jsx($e,{id:n,part:t,extraActions:a,copyable:!0,alwaysShowActions:f,animate:p}),e[65]=n,e[66]=t,e[67]=f,e[68]=p,e[69]=a,e[70]=g):g=e[70],g}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const f=t;if(f.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let p;e[71]!==f.toolCallId||e[72]!==r?(p=r(f.toolCallId)?.latencySeconds,e[71]=f.toolCallId,e[72]=r,e[73]=p):p=e[73];let g;return e[74]!==f||e[75]!==p?(g=l.jsx(tl,{part:f,latency:p}),e[74]=f,e[75]=p,e[76]=g):g=e[76],g}if(f.type==="tool-TASK_BOARD_ITEM_CREATE"){let p;e[77]!==f?(p=On(f),e[77]=f,e[78]=p):p=e[78];const g=p;if(g){let x;return e[79]!==g?(x=l.jsx(Bn,{task:g}),e[79]=g,e[80]=x):x=e[80],x}}if(f.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let p;e[81]!==f.toolCallId||e[82]!==r?(p=r(f.toolCallId)?.latencySeconds,e[81]=f.toolCallId,e[82]=r,e[83]=p):p=e[83];let g;return e[84]!==f||e[85]!==p?(g=l.jsx(ll,{part:f,latency:p}),e[84]=f,e[85]=p,e[86]=g):g=e[86],g}if(f.type==="tool-COLLECTION_CONNECTIONS_LIST"){let p;e[87]!==f.toolCallId||e[88]!==r?(p=r(f.toolCallId)?.latencySeconds,e[87]=f.toolCallId,e[88]=r,e[89]=p):p=e[89];let g;return e[90]!==f||e[91]!==p?(g=l.jsx(cl,{part:f,latency:p}),e[90]=f,e[91]=p,e[92]=g):g=e[92],g}if(f.type.startsWith("tool-")){const p=f;let g;e[93]!==o.toolMetadata||e[94]!==p.toolCallId?(g=o.toolMetadata.get(p.toolCallId),e[93]=o.toolMetadata,e[94]=p.toolCallId,e[95]=g):g=e[95];const x=g;let h;e[96]!==f.type||e[97]!==p.output?(h=f.type.endsWith("__get_screenshot")?ka(p.output):null,e[96]=f.type,e[97]=p.output,e[98]=h):h=e[98];const y=h,b=x?.annotations,N=x?.latencySeconds,j=x?.outputBytes,w=x?._meta;let k;e[99]!==f||e[100]!==i||e[101]!==b||e[102]!==N||e[103]!==j||e[104]!==w?(k=l.jsx(dt,{part:f,annotations:b,latency:N,outputBytes:j,isLastMessage:i,toolMeta:w}),e[99]=f,e[100]=i,e[101]=b,e[102]=N,e[103]=j,e[104]=w,e[105]=k):k=e[105];const S=k;if(!y)return S;let v;e[106]!==y?(v=[y],e[106]=y,e[107]=v):v=e[107];let _;e[108]!==p.type?(_=p.type.slice(5),e[108]=p.type,e[109]=_):_=e[109];let T;e[110]!==v||e[111]!==_?(T=l.jsx(Wt,{srcs:v,alt:_}),e[110]=v,e[111]=_,e[112]=T):T=e[112];let M;return e[113]!==S||e[114]!==T?(M=l.jsxs("div",{className:"flex flex-col gap-2",children:[S,T]}),e[113]=S,e[114]=T,e[115]=M):M=e[115],M}if(t.type===Ae){let p;return e[116]!==t?(p=l.jsx(yl,{part:t}),e[116]=t,e[117]=p):p=e[117],p}return f.type.startsWith("data-")||console.warn(`[chat] unknown message part type: ${f.type}`),null}}}function Fl(s){const e=$.c(3),{pending:t,children:n}=s;if(!t||t.length===0)return n;let a;return e[0]!==n||e[1]!==t?(a=l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[n,t]}),e[0]=n,e[1]=t,e[2]=a):a=e[2],a}function Dl(s){const e=$.c(9),{isRunInProgress:t}=s,n=U();if(t){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("chat.assistant.resumingTask"),e[1]=n,e[2]=i):i=e[2];let u;return e[3]!==i?(u=l.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:l.jsxs("span",{className:"flex items-center gap-1.5",children:[c,l.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:i})]})}),e[3]=i,e[4]=u):u=e[4],u}let a;e[5]!==n?(a=n("chat.assistant.noResponseGenerated"),e[5]=n,e[6]=a):a=e[6];let o;return e[7]!==a?(o=l.jsx("div",{className:"text-sm text-muted-foreground/60 py-2",children:a}),e[7]=a,e[8]=o):o=e[8],o}function Ol(s){const e=$.c(7),{className:t,children:n}=s;let a;e[0]!==t?(a=K("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",t),e[0]=t,e[1]=a):a=e[1];let o;e[2]!==n?(o=l.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:l.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-sm wrap-break-word overflow-wrap-anywhere bg-transparent",children:n})}),e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==a||e[5]!==o?(c=l.jsx("div",{className:a,children:o}),e[4]=a,e[5]=o,e[6]=c):c=e[6],c}function Bl(s){const e=$.c(18),{message:t,turnStartedAt:n,status:a,className:o,isLast:c}=s,i=c===void 0?!1:c,u=U(),{isRunInProgress:r}=je()??{},m=r===void 0?!1:r,d=ve()?.taskId??null,f=a==="streaming",g=f||a==="submitted";let x;e[0]!==n?(x=Ve(n),e[0]=n,e[1]=x):x=e[1];const h=x;let y;e[2]!==g?(y=()=>g?Date.now():null,e[2]=g,e[3]=y):y=e[3];const[b,N]=z.useState(y),[j,w]=z.useState(g);j!==g&&(w(g),N(()=>g?Date.now():null));const k=h??b,{reasoningGroups:S,renderOrder:v,dataParts:_}=Ml(t),T=t!==null&&v.length>0,M=t&&t.parts.length>0?t.parts[t.parts.length-1]:null,P=f&&M?.type==="reasoning";let L;if(e[4]!==t){const ee=t?.metadata?.reasoning_start_at?new Date(t.metadata.reasoning_start_at):null,V=t?.metadata?.reasoning_end_at?new Date(t.metadata.reasoning_end_at):new Date;L=ee!==null?V.getTime()-ee.getTime():null,e[4]=t,e[5]=L}else L=e[5];const A=L;let I;e[6]!==i||e[7]!==t?(I=!i||!t||!t.parts.some(Hl),e[6]=i,e[7]=t,e[8]=I):I=e[8];const E=I,C=!g&&T&&E&&(()=>{let ee=0;for(const V of v)if(V.kind==="part"){const ae=t.parts[V.index]?.type;(ae==="dynamic-tool"||ae?.startsWith("tool-"))&&ee++}return ee>=Al})(),{collapsed:R,tail:D}=C?Pl(v,t.parts):{collapsed:[],tail:v};let B;e[9]!==t?(B=ee=>t?Ge(ee,t.parts):!1,e[9]=t,e[10]=B):B=e[10];const H=D.findLast(B),W=!!t&&H?.kind==="part"&&t.parts[H.index]?.type==="text",{pending:G}=wt();let Q;e[11]!==i||e[12]!==G?(Q=i?G.map(Ul):null,e[11]=i,e[12]=G,e[13]=Q):Q=e[13];const te=Q,X=Ol,Z=T?l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[t.metadata?.resumedFromBackground&&l.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/60 select-none",children:[l.jsx(bt,{className:"size-3 shrink-0"}),l.jsx("span",{children:u("chat.assistant.resumedBackgroundTask")})]}),R.length>0&&l.jsx(Rl,{items:R,message:t,reasoningGroups:S,isReasoningActive:P,totalDuration:A,dataParts:_,isLoading:g,isLast:i}),D.map((ee,V)=>{const ae=R.length+V,F=D.findLastIndex(O=>Ge(O,t.parts))===V;return ss({item:ee,renderIndex:ae,message:t,reasoningGroups:S,isReasoningActive:P,totalDuration:A,dataParts:_,isLoading:g,isLast:i,isLastVisiblePart:F,renderOrder:v})}),d&&l.jsx(Cl,{threadId:d,message:t}),te,i&&(g||m)&&k!==null&&l.jsx(Wn,{startedAt:k}),i&&!g&&d&&l.jsxs(l.Fragment,{children:[l.jsx(vl,{}),E&&l.jsx(fl,{})]}),!g&&!W&&l.jsx(et,{message:t})]}):l.jsx(Fl,{pending:te,children:g?l.jsx(Vn,{startedAt:k}):l.jsx(Dl,{isRunInProgress:i&&m})});let le;return e[14]!==X||e[15]!==o||e[16]!==Z?(le=l.jsx(X,{className:o,children:Z}),e[14]=X,e[15]=o,e[16]=Z,e[17]=le):le=e[17],le}function Ul(s){return l.jsx(ts,{message:s,pending:!0},s.id)}function Hl(s){const e=s.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const t=s.state;return t==="input-streaming"||t==="input-available"||t==="approval-requested"}function zo(s){const e=[],t=s.filter(n=>n.role!=="system"&&!n.metadata?.internal&&!n.metadata?.subtaskJobId);for(let n=0;n<t.length;n++){const a=t[n];if(a)if(a.role==="user"){const o=t[n+1];o&&o.role==="assistant"?(e.push({user:a,assistant:o}),n++):e.push({user:a,assistant:null})}else a.role==="assistant"&&e.push({user:null,assistant:a})}return e}function Fo(s){const e=$.c(19),{pair:t,isLastPair:n,status:a}=s,o=z.useRef(null),c=z.useRef(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o.current&&o.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=i):i=e[0];const u=i;let r;e[1]!==n||e[2]!==t.assistant?.metadata?.resumedFromBackground||e[3]!==a?(r=y=>{if(o.current=y,!n||!y||c.current||(c.current=!0,t.assistant?.metadata?.resumedFromBackground))return;if(a==="submitted"||a==="streaming"){y.scrollIntoView({behavior:"smooth",block:"start"});return}const b=y.closest("[data-chat-scroller]");b?b.scrollTop=b.scrollHeight:y.scrollIntoView({behavior:"instant",block:"start"})},e[1]=n,e[2]=t.assistant?.metadata?.resumedFromBackground,e[3]=a,e[4]=r):r=e[4];const m=r,d=!t.user&&"pt-8 sm:pt-6";let f;e[5]!==d?(f=K("flex flex-col pb-2 sm:pb-2",d),e[5]=d,e[6]=f):f=e[6];let p;e[7]!==t.user?(p=t.user&&l.jsx("div",{className:"mt-4 mb-6",children:l.jsx(es,{message:t.user,onScrollToPair:u})}),e[7]=t.user,e[8]=p):p=e[8];const g=t.user?.created_at??null;let x;e[9]!==n||e[10]!==t.assistant||e[11]!==a||e[12]!==g?(x=l.jsx(Bl,{message:t.assistant,turnStartedAt:g,status:a,isLast:n}),e[9]=n,e[10]=t.assistant,e[11]=a,e[12]=g,e[13]=x):x=e[13];let h;return e[14]!==m||e[15]!==f||e[16]!==p||e[17]!==x?(h=l.jsxs("div",{ref:m,className:f,children:[p,x]}),e[14]=m,e[15]=f,e[16]=p,e[17]=x,e[18]=h):h=e[18],h}export{An as G,Fo as M,Nl as O,Ro as S,Fn as a,ea as f,zo as u};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-C4oSGu0z.js","assets/index-6k36ehsW.js","assets/index-yFD0_BNc.css","assets/editor-D_TP8Zgm.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
- import{r as R,b8 as Ue,c as W,b as X,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,bx as Ke,n as We,by as ce,bz as Ge,e as He,bo as Se,bA as pe,bl as Te,bm as Ye,bn as he}from"./index-6k36ehsW.js";import{C as qe,c as Xe,a as Ze,S as Qe,M as es,v as ss}from"./held-block-view-8Ktr6QKV.js";import{b as Le}from"./use-never-published-DAOoxMmV.js";import{c as ts,u as ns}from"./hosted-reconcile-BfDZiVDB.js";import{b as ls,a as as}from"./repository-binding--4TzKXBA.js";import{b as $e}from"./UserCheck01-CLDfWEEJ.js";import{K as Ae,e as os,U as is,Z as rs}from"./agent-icon-m6DF-jGw.js";import{c as cs}from"./Tool01-C5c4fHOY.js";import{i as ds}from"./SearchMd-lt6LFgc6.js";import{L as _e}from"./label-B05fQV9w.js";import{S as us}from"./switch-C9KE8PCO.js";import{T as fs}from"./textarea-zXJwvg1C.js";import{u as ms}from"./use-copy-BosHh8hs.js";import{D as xs}from"./section-array-field-BmxRdqC1.js";import{a2 as ps,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-BfB5E3lf.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-Cw0RWK3h.js";import{X as Ss}from"./category-tree-CwYyvh-H.js";import{i as Ts}from"./ChevronSelectorVertical-oMR2kCqB.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-D0_H05ec.js";import{a as Rs,b as Ps,P as Os}from"./popover-CH9oXjqN.js";import{u as Ls}from"./chat-context-BW-slB_k.js";import{a as $s}from"./MessageCircle01-MLX2eDnv.js";import{i as As}from"./Play-BkcMWNbk.js";import{S as zs}from"./scroll-area-CT5pMPAI.js";import{c as ue,T as fe,a as me}from"./tooltip-CpNT29Lg.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-C4oSGu0z.js";import{S as Is}from"./save-status-DUiju85M.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-C4oSGu0z.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=X(),{handleCopy:a,copied:i}=ms();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(cs,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:xs,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-C0bUrX9K.js","assets/index-B2vvUsuK.js","assets/index-C4wvi2v7.css","assets/editor-CGkWZSA7.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
+ import{r as R,b8 as Ue,c as W,b as X,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,bx as Ke,n as We,by as ce,bz as Ge,e as He,bo as Se,bA as pe,bl as Te,bm as Ye,bn as he}from"./index-B2vvUsuK.js";import{C as qe,c as Xe,a as Ze,S as Qe,M as es,v as ss}from"./held-block-view-DUdsae86.js";import{b as Le}from"./use-never-published-BnWhN5r2.js";import{c as ts,u as ns}from"./hosted-reconcile-DH-KyBYi.js";import{b as ls,a as as}from"./repository-binding-DC98qYdg.js";import{b as $e}from"./UserCheck01-CpLKejEQ.js";import{K as Ae,e as os,U as is,Z as rs}from"./agent-icon-ButaHLCM.js";import{c as cs}from"./Tool01-DJqLAFcI.js";import{i as ds}from"./SearchMd-DhrJsmFj.js";import{L as _e}from"./label-BLEP0nH0.js";import{S as us}from"./switch-CavZ0Td_.js";import{T as fs}from"./textarea-C5yT2rai.js";import{u as ms}from"./use-copy-_EjHpFlu.js";import{D as xs}from"./section-array-field-RxYDyVUT.js";import{a2 as ps,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-DI5QMuI-.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-CrihrdT0.js";import{X as Ss}from"./category-tree-DUNY9TG8.js";import{i as Ts}from"./ChevronSelectorVertical-Bj17dUxw.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-BA_BVypg.js";import{a as Rs,b as Ps,P as Os}from"./popover-BN8yB-gL.js";import{u as Ls}from"./chat-context-DsLpz7ew.js";import{a as $s}from"./MessageCircle01-DjShhQqZ.js";import{i as As}from"./Play-DatgPxza.js";import{S as zs}from"./scroll-area-CXINzzvW.js";import{c as ue,T as fe,a as me}from"./tooltip-C0XDZQqg.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-C0bUrX9K.js";import{S as Is}from"./save-status-5VC4rIi2.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-C0bUrX9K.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=X(),{handleCopy:a,copied:i}=ms();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(cs,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:xs,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
3
3
  `)||n.length>80,e[0]=n,e[1]=a):a=e[1];const[i]=R.useState(a);let r;return e[2]!==l||e[3]!==i||e[4]!==t||e[5]!==n?(r=i?s.jsx(fs,{id:l,value:n,rows:Math.min(8,Math.max(3,n.split(`
4
4
  `).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=X(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=X();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(us,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,r),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=X(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(hs(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Ys(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=X(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=ps(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(qs),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(C=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(ds,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let Y;e[25]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=Y):Y=e[26];let q;e[27]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=q):q=e[28],e[29]!==j||e[30]!==Y||e[31]!==q?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:Y,"aria-label":q,className:"pl-8"})]})}),e[29]=j,e[30]=Y,e[31]=q,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Z=L;let Q;e[51]!==Z||e[52]!==c||e[53]!==p||e[54]!==i?(Q=p&&c&&i?i(c,Z):Z,e[51]=Z,e[52]=c,e[53]=p,e[54]=i,e[55]=Q):Q=e[55];const ee=Q;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&&ee;let H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function qs(o){return o.blocks.length>0}function At(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ls(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ts({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ns(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(qe,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Ys,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function zt(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function It(o,e,l){if(bs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=ys(l??void 0);if(!l||js(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function Mt(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=X(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Xs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Xs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Zs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Xe(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Qs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Qs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Jt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=gs(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Vt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Dt(o){return lt[o]??o}function Ft(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ut(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Kt(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(vs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Wt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=X(),g=d?.virtualMcpId,v=as(g===e?e:null)?.metadata?.siteSlug??null,E=Ze(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Z,Q]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},Y=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},q=async z=>{const oe=ss(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{Q(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Zs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Z&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Qe,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:Y,onSave:z=>{Y(z),H()}})})]})]}),Z&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{Q(!1),G(!1)}})]}),s.jsx(es,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:q})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=X();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==p?(C=s.jsxs("div",{className:p,children:[w,T]}),e[50]=w,e[51]=T,e[52]=p,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Gt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&Ye(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Ht(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,Mt as P,Wt as R,At as S,nt as a,Ft as b,It as c,Dt as d,et as e,Zs as f,zt as g,Vt as h,Ut as l,Jt as m,Ht as n,Gt as p,Kt as r};
@@ -1 +1 @@
1
- import{c as b,b as P,j as t,n as w,m as N}from"./index-6k36ehsW.js";import{ChatLayout as C}from"./index-_N6kCtM_.js";import{i as y,n as $,a as z}from"./TrendUp01-Me2ucQTV.js";import{B as I}from"./badge-BMdL2EZN.js";import"./use-mobile-Bwg13Khk.js";import"./tooltip-CpNT29Lg.js";import"./index-CbxeeWwk.js";import"./MessageCircle01-MLX2eDnv.js";import"./XClose-DNnGTtOa.js";import"./thread-button-D0_qm01C.js";import"./use-sidebar-collapsed-UNm7xHPV.js";import"./sheet-D0InrjqO.js";import"./use-chat-layout-state-DuyGxNZ8.js";import"./use-panel-navigate-BAJB306G.js";import"./thread-route-DISRw9NA.js";import"./use-project-scope-DVgj2Lmp.js";import"./repository-binding--4TzKXBA.js";import"./use-mcp-client-Dn7GJEfR.js";import"./auth-DTCWUZG7.js";import"./toolbar-icon-button-Cl7Yg4qZ.js";import"./use-in-settings-CSXNVGfX.js";import"./resizable-COGor2Ly.js";import"./route-page-header-ZxjL9WRx.js";import"./LayoutLeft-DtDmaSrQ.js";import"./use-current-view-CQkQuEPS.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};
1
+ import{c as b,b as P,j as t,n as w,m as N}from"./index-B2vvUsuK.js";import{ChatLayout as C}from"./index-DgVQUrlP.js";import{i as y,n as $,a as z}from"./TrendUp01-Dnr3ECEr.js";import{B as I}from"./badge-CaU7DsCB.js";import"./use-mobile-DFpIEPum.js";import"./tooltip-C0XDZQqg.js";import"./index-BYSU1KyF.js";import"./MessageCircle01-DjShhQqZ.js";import"./XClose-BbVr5nc7.js";import"./thread-button-jA6lXOHW.js";import"./use-sidebar-collapsed-Cynyx51j.js";import"./sheet-DsBIaG5c.js";import"./use-chat-layout-state-CYDJQho2.js";import"./use-panel-navigate-BvdMbLN8.js";import"./thread-route-NC2TJMv2.js";import"./use-project-scope-TiMALD5Y.js";import"./repository-binding-DC98qYdg.js";import"./use-mcp-client-C25DU1dz.js";import"./auth-DlYbrS5R.js";import"./toolbar-icon-button-BleYd0k2.js";import"./use-in-settings-CKmb_d-Z.js";import"./resizable-CDUVHUkS.js";import"./route-page-header-B-0s5BiJ.js";import"./LayoutLeft-19qu82-A.js";import"./use-current-view-DJmYWR9r.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};
@@ -1 +1 @@
1
- import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-6k36ehsW.js";import{u as A}from"./use-entitlements-CtKDjSCc.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
1
+ import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-B2vvUsuK.js";import{u as A}from"./use-entitlements-D-BsJsBn.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
@@ -1,4 +1,4 @@
1
- import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-6k36ehsW.js";import{s as Oe}from"./Plus-D84NDH53.js";import{B as Fe}from"./badge-BMdL2EZN.js";import{a as Me,b as ze,P as Ve}from"./popover-CH9oXjqN.js";import{a as ce,T as Ge}from"./toggle-group--KiJldtG.js";import{g as Ke}from"./use-ai-providers-CL55euJG.js";import{u as ie,d as he,a as qe}from"./use-entitlements-CtKDjSCc.js";import{u as Qe,P as Ye}from"./plan-ladder-C-nHzfvE.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1
+ import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-B2vvUsuK.js";import{s as Oe}from"./Plus-GSWEwEm-.js";import{B as Fe}from"./badge-CaU7DsCB.js";import{a as Me,b as ze,P as Ve}from"./popover-BN8yB-gL.js";import{a as ce,T as Ge}from"./toggle-group-B2L0Fh-A.js";import{g as Ke}from"./use-ai-providers-CGeOv9zD.js";import{u as ie,d as he,a as qe}from"./use-entitlements-D-BsJsBn.js";import{u as Qe,P as Ye}from"./plan-ladder-CpzLELQm.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
2
  - a positive number
3
3
  - less than the value passed to \`max\` (or ${oe} if no \`max\` prop is set)
4
4
  - \`null\` or \`undefined\` if the progress is indeterminate.
@@ -1 +1 @@
1
- import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-6k36ehsW.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
1
+ import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-B2vvUsuK.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};