decocms 4.618.1 → 4.619.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 (436) hide show
  1. package/dist/client/assets/{AlertCircle-GoAGGV0G.js → AlertCircle-CS5y5cdF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BCH9fczV.js → AreaChart-6i9ddKAo.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DuGHc_Gh.js → ArrowLeft-CnpYebJt.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CMJyKdyB.js → ArrowRight-CTIzvrRD.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-s5a8DQxj.js → ArrowUp-B_rPxUl3.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-DZs1-yi9.js → BookOpen01-0vmOJP7K.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BFVvuNgw.js → CartesianChart-BLh4dFJB.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-iNQ2kTf5.js → CategoricalChart-CwzUkCwO.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-vIQcB0iT.js → CheckCircle-CVSsEuJs.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-Dm2xO7jf.js → ChevronDown-BkddO6nk.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Cvgyclsz.js → ChevronSelectorVertical-B_EPXu-J.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BKdcyIOm.js → ChevronUp-hmtO7NfN.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BUXydXso.js → CreditCard01-CYAMo28t.js} +1 -1
  14. package/dist/client/assets/{Eye-DwRCQHLk.js → Eye-NyWbd_Et.js} +1 -1
  15. package/dist/client/assets/{File02-Y4Nh84qP.js → File02-B0o8Z6Rd.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-DlIWxzRc.js → Fingerprint04-DFly9X11.js} +1 -1
  17. package/dist/client/assets/{Globe04-5yHQa01g.js → Globe04-Bu51hlDK.js} +1 -1
  18. package/dist/client/assets/{Image01-BRABRo3v.js → Image01-Xgs_5RZR.js} +1 -1
  19. package/dist/client/assets/{Key01-DfLmV_su.js → Key01-B6wydByr.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-owMYqid0.js → LayoutLeft-ww8XIIKY.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-CyjdgWmP.js → LinkBroken01-CothmVOv.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-zc37Krdu.js → MessageCircle01-BoiiT0Ka.js} +1 -1
  23. package/dist/client/assets/{Minus-CFYZtYi9.js → Minus-DjGZhteG.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DUhT2Mcw.js → Monitor01-BnNa35fy.js} +1 -1
  25. package/dist/client/assets/{Play-C_9Fb_Ik.js → Play-DYcX2TsV.js} +1 -1
  26. package/dist/client/assets/{Plus-BoPsX_T8.js → Plus-BlCDSK3_.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-ChigmKEb.js → ReferenceLine-ysfQtWpe.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BGRe_18c.js → SearchMd-B2ZqlWzx.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-CoN4FBW5.js → ShoppingBag01-CO-Ik7_a.js} +1 -1
  30. package/dist/client/assets/{Sun-uwKn4QPm.js → Sun-C31h0XVy.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CHtrDs50.js → SwitchHorizontal01-B9krqVlE.js} +1 -1
  32. package/dist/client/assets/{Tool01-D90Wr5xR.js → Tool01-D_bTJJvK.js} +1 -1
  33. package/dist/client/assets/{Tooltip-Vyb5xIGx.js → Tooltip-BDg85pZn.js} +1 -1
  34. package/dist/client/assets/{Trash01-Ctp9Olbr.js → Trash01-CvVvZjMc.js} +1 -1
  35. package/dist/client/assets/{Upload01-DgxprpI7.js → Upload01-DAa882sM.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-CA8kXGn8.js → UserCheck01-B7Ux1cXt.js} +1 -1
  37. package/dist/client/assets/{UserSquare-dgrNjiXb.js → UserSquare-fSKR9s5Z.js} +1 -1
  38. package/dist/client/assets/{Users01-BasqfwpC.js → Users01-CYXQ60-Z.js} +1 -1
  39. package/dist/client/assets/{XClose-BUxhnZ3x.js → XClose-BvzwUB-E.js} +1 -1
  40. package/dist/client/assets/{Zap-CxPsn4FS.js → Zap-BALSokOc.js} +1 -1
  41. package/dist/client/assets/{access-gate-4Yp7vAaA.js → access-gate-JiR82oco.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-D2t3ivnz.js → add-connection-dialog-DYa3N2eg.js} +1 -1
  43. package/dist/client/assets/agent-app-Ccrencfm.js +1 -0
  44. package/dist/client/assets/{agent-assets-DDFIPSsr.js → agent-assets-DThFx4M4.js} +1 -1
  45. package/dist/client/assets/{agent-automation-B7CVzf5F.js → agent-automation-BNyRdPpc.js} +1 -1
  46. package/dist/client/assets/{agent-automations-5RoGEa0z.js → agent-automations-DJGo3Vpm.js} +1 -1
  47. package/dist/client/assets/{agent-blog-Sl8lv70B.js → agent-blog-SWKAlIDs.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-CeGtmOXI.js → agent-blog-post-BMj1nG5H.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-CMOhhL4x.js → agent-business-case-DWa8MdFx.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-DN3_psfi.js → agent-calendar-Dc34MYin.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-DmT72SWM.js → agent-capabilities-B0JydJjP.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-B2mB08r7.js → agent-connect-sources-BzvV2s_2.js} +1 -1
  53. package/dist/client/assets/agent-deck-t8ah4YL3.js +1 -0
  54. package/dist/client/assets/{agent-e2e-63TLdzRb.js → agent-e2e-CVKnE_cq.js} +1 -1
  55. package/dist/client/assets/agent-experiments-B6WL8a55.js +1 -0
  56. package/dist/client/assets/agent-file-DzOVJ5jJ.js +1 -0
  57. package/dist/client/assets/{agent-hosting-DR49fQQv.js → agent-hosting-CzWiy0GX.js} +1 -1
  58. package/dist/client/assets/{agent-icon-DoabtHNW.js → agent-icon-qKbICqBE.js} +1 -1
  59. package/dist/client/assets/agent-library-CkWv-QK0.js +1 -0
  60. package/dist/client/assets/agent-library-file-BeuXNSru.js +1 -0
  61. package/dist/client/assets/agent-overview-vn0B99S2.js +1 -0
  62. package/dist/client/assets/{agent-releases-CjOdbsoc.js → agent-releases-DVlreX78.js} +1 -1
  63. package/dist/client/assets/agent-settings-C8Vbd4tx.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-CZ2oqt5O.js → agent-site-editor-BscJQYUu.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-znS9yeFa.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-DFaZauTr.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-Bshkv5l8.js +1 -0
  68. package/dist/client/assets/agent-view-DbsCo68i.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-wWwEqBbc.js → agent-view-guard-2l72ULUX.js} +1 -1
  70. package/dist/client/assets/ai-providers-BuJXSSAm.js +1 -0
  71. package/dist/client/assets/{alert-C5EpdwBA.js → alert-pq0Y8AC8.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-BjczT6mc.js → analytics-sections-BcskhJEQ.js} +1 -1
  73. package/dist/client/assets/api-keys-C3uBLxjm.js +1 -0
  74. package/dist/client/assets/{api-keys-CV36tutN.js → api-keys-SpdE7FiC.js} +1 -1
  75. package/dist/client/assets/{app-editor--um7u6Wc.js → app-editor-1yI1PePZ.js} +1 -1
  76. package/dist/client/assets/{asset-utils-D7ZsoUjl.js → asset-utils-tz_LHKas.js} +1 -1
  77. package/dist/client/assets/{auth-IBAsOARn.js → auth-AT-S53oU.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-DPqMCEC6.js → auth-catchall-CFacQ3p_.js} +1 -1
  79. package/dist/client/assets/{auth-entry-Bk_VrJBw.js → auth-entry-BuYf9qZf.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-zr8fqIYk.js → auth-split-layout-Bdnex8hf.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-BmdGjqM8.js → authenticate-and-persist-oauth-BOJ6RO7H.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-kZcPBX-Y.js → automation-list-row-Du2hwkkk.js} +1 -1
  83. package/dist/client/assets/{automation-runs-NP4ibGIs.js → automation-runs-Bg2KLqhb.js} +1 -1
  84. package/dist/client/assets/{automations-D7IUlLWI.js → automations-BJ-1CA9i.js} +1 -1
  85. package/dist/client/assets/{badge-DONoxQO7.js → badge-CFiK0EOx.js} +1 -1
  86. package/dist/client/assets/{block-document-Dlll0MPP.js → block-document-DUVkY9ea.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-LApXEaVX.js → blocks-preview-workspace-context-B9duZzas.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-CTy1iAF5.js → blocks-tab-states-DC7kOtf6.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-BGp0zYxW.js → blog-preview-url-sQQ4EaTX.js} +1 -1
  90. package/dist/client/assets/{blog-schema-CGys1Vfw.js → blog-schema-jwHNvUT9.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-D3KL0oEF.js → blog-source-gate-CdJyl3s4.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-BFq59z60.js → blog-view-gate-CH_KIbwu.js} +1 -1
  93. package/dist/client/assets/{buckets-C-9n1VRF.js → buckets-B4_-T0ED.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-CcS36Qyr.js → build-improve-prompt-doc-BviIkkQs.js} +1 -1
  95. package/dist/client/assets/{calendar-BRx4DiEx.js → calendar-C02ezVcS.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-C6JoLBp9.js → capability-load-error-C7VfNWgD.js} +1 -1
  97. package/dist/client/assets/{category-editor-B-RRxjlW.js → category-editor-DqRDNx2v.js} +1 -1
  98. package/dist/client/assets/{category-tree-CW0acTf_.js → category-tree-dngYOFzN.js} +1 -1
  99. package/dist/client/assets/{chart-BhhOak8o.js → chart-D2etphpL.js} +1 -1
  100. package/dist/client/assets/chat-context-CvQ-sM5v.js +43 -0
  101. package/dist/client/assets/{chat-draft-C93TMi7F.js → chat-draft-CPECGWWa.js} +1 -1
  102. package/dist/client/assets/{checkbox-CkODjqKt.js → checkbox-DR7-Iy_E.js} +1 -1
  103. package/dist/client/assets/{choose-editor-CUGLPz2R.js → choose-editor-C-XxlJ7G.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-DISNojzj.js → cli-auth-success-BvJuyvyk.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-DLMpcsg9.js → cms-settings-editor-CTMXFNOv.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-DgvuEc1i.js → cms-store-drafts-q3yACtXx.js} +1 -1
  107. package/dist/client/assets/{collapsible-BdVp5Lcb.js → collapsible-BKxoPjIN.js} +1 -1
  108. package/dist/client/assets/{collection-detail-CYRLagxm.js → collection-detail-iP9tRfV6.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-CrLnf-_h.js → collection-display-button-BVsx6EDz.js} +1 -1
  110. package/dist/client/assets/{collection-search-DL8nJQx4.js → collection-search-CphnxlYD.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-fYA2bGN6.js → collection-table-wrapper-BfQjodPV.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-9jbbjBDw.js → collection-tabs-C9T1HZQP.js} +1 -1
  113. package/dist/client/assets/{combobox-B9eEiOM0.js → combobox-BTP9T0Pc.js} +1 -1
  114. package/dist/client/assets/{command-D5O7M-Cf.js → command-Cqqhh_W6.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-D_ernmuP.js → companion-mcps-section-SEt2U7bz.js} +1 -1
  116. package/dist/client/assets/{config-BOn4tvAD.js → config-DGvqEncS.js} +1 -1
  117. package/dist/client/assets/{connect-key-BddF4e4b.js → connect-key-DVNtQy7y.js} +1 -1
  118. package/dist/client/assets/{connect-layout-CNgkeyZs.js → connect-layout-sx7G_FMd.js} +1 -1
  119. package/dist/client/assets/{connect-B9Or7Mba.js → connect-obEE-StP.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-F5S3IN4q.js → connect-source-dialog-DnCXZ3Bm.js} +1 -1
  121. package/dist/client/assets/{connection-BxF6Rdiu.js → connection-BZJlBrLd.js} +1 -1
  122. package/dist/client/assets/{connection-card-Ca3jxrTD.js → connection-card-B8Lj_r0P.js} +1 -1
  123. package/dist/client/assets/{connection-detail-B5pUbex_.js → connection-detail-CVYzedpa.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-oAW0sDLm.js → connection-form-helpers-veDVCb9w.js} +1 -1
  125. package/dist/client/assets/{connection-slug-B7w04sZ1.js → connection-slug-DOi8cWyk.js} +1 -1
  126. package/dist/client/assets/{connections-C0U7G-PU.js → connections-k9zhxlcM.js} +1 -1
  127. package/dist/client/assets/{content-changes-DXqxs3Wb.js → content-changes-CFJfbWRJ.js} +1 -1
  128. package/dist/client/assets/{content-tab-C23eyWcW.js → content-tab-Cq6li-sw.js} +3 -3
  129. package/dist/client/assets/{context-LlVd3qyN.js → context-DCQPaz03.js} +1 -1
  130. package/dist/client/assets/{context-menu-DJtvu4JZ.js → context-menu-BfINdeF4.js} +1 -1
  131. package/dist/client/assets/{context-shell-0fpmlncZ.js → context-shell-DkTSiVhx.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-97eVCkRr.js → create-organization-dialog-pttnLi8P.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-DVtdyKrr.js → daily-pulse-BMeIrOO8.js} +1 -1
  134. package/dist/client/assets/{delete-copy-rajlpHzK.js → delete-copy-BI2Sd04D.js} +1 -1
  135. package/dist/client/assets/{device-hint-DVUadRrt.js → device-hint-XFntojbN.js} +1 -1
  136. package/dist/client/assets/{discover-CCbrOrMD.js → discover-DCJNP2ov.js} +1 -1
  137. package/dist/client/assets/{domain-settings-CcAHeKi4.js → domain-settings-C369ETrU.js} +1 -1
  138. package/dist/client/assets/{drawer-DO0sMAej.js → drawer-DtT_qu3U.js} +1 -1
  139. package/dist/client/assets/{editor-UaRoONxx.js → editor-DpPPqPRR.js} +1 -1
  140. package/dist/client/assets/{editor-classes-DMpdrv32.js → editor-classes-Bw4_cV_9.js} +1 -1
  141. package/dist/client/assets/{empty-state-UX_DOq42.js → empty-state-CWawuVzh.js} +1 -1
  142. package/dist/client/assets/{empty-state-C4MgLcBg.js → empty-state-l9Tatoxd.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-loxGESO7.js → experiments-tab-choice-DLka__Fj.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-DXA3Rt-s.js → extract-connection-data-DjE1yVUY.js} +1 -1
  145. package/dist/client/assets/{feature-gate-Bc8aW-U-.js → feature-gate-wF4resWq.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-hqI35k49.js → feature-paywall-DF7aqMQM.js} +1 -1
  147. package/dist/client/assets/{file-explorer-DE4Pg5Zn.js → file-explorer-Bm3jEOW7.js} +1 -1
  148. package/dist/client/assets/{file-preview-BKJnTrOe.js → file-preview-p0rGgJtU.js} +1 -1
  149. package/dist/client/assets/{file-share-button--SjJonFb.js → file-share-button-BAJCRraz.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-R4tsODq6.js → file-type-icon-CEKCIITa.js} +1 -1
  151. package/dist/client/assets/{folder-icon-DC-T6LMD.js → folder-icon-DCqfnk5g.js} +1 -1
  152. package/dist/client/assets/{form-DwGozYbG.js → form-eUXxZ5Qg.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-CoKnARJv.js → frame-navigation-DlTZKvqt.js} +1 -1
  154. package/dist/client/assets/{gateway-client-C5MrdR_p.js → gateway-client-BYWq7W1f.js} +1 -1
  155. package/dist/client/assets/{general-BiR6hkWa.js → general-dOdvSQ1l.js} +1 -1
  156. package/dist/client/assets/{github-icon-YYYF_UPl.js → github-icon-PNZqrJY6.js} +1 -1
  157. package/dist/client/assets/{held-block-view-CRIGJWyy.js → held-block-view-CPPtRU-n.js} +1 -1
  158. package/dist/client/assets/{home-Crikv5tf.js → home-B2gF0aRT.js} +1 -1
  159. package/dist/client/assets/{home-overview-CJ86tdHp.js → home-overview-DkyPJx_z.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-CTronLZo.js → hosted-reconcile-DEHcrXPf.js} +1 -1
  161. package/dist/client/assets/{icon-button-DFliy54K.js → icon-button-CfgrKbmG.js} +1 -1
  162. package/dist/client/assets/{index-DdK1k8EY.js → index-B1yf8QQv.js} +1 -1
  163. package/dist/client/assets/{index-DJ-fS83G.js → index-BHLuDBD-.js} +1 -1
  164. package/dist/client/assets/{index-BVDmO57n.js → index-BUHQM-fc.js} +1 -1
  165. package/dist/client/assets/{index-B9Qs-0Gp.js → index-Bp_BkLlL.js} +1 -1
  166. package/dist/client/assets/{index-D5QLXgD8.js → index-CEoORQx_.js} +1 -1
  167. package/dist/client/assets/{index-DRuy-mDa.js → index-CdR9qfQl.js} +1 -1
  168. package/dist/client/assets/{index-BH4xxzAP.js → index-CePbUNpp.js} +1 -1
  169. package/dist/client/assets/{index-w1wolPTy.js → index-CorQG-PM.js} +1 -1
  170. package/dist/client/assets/{index-BFFHlwFA.js → index-D9pnpNHk.js} +1 -1
  171. package/dist/client/assets/{index-BKFaN6Ld.js → index-DQFWZMPO.js} +1 -1
  172. package/dist/client/assets/{index-DDritN78.js → index-DYf9rJn2.js} +1 -1
  173. package/dist/client/assets/{index-DoEtSiIe.js → index-FRxLT_js.js} +5 -5
  174. package/dist/client/assets/{index-D4CqkEu4.js → index-K-FtkPVI.js} +1 -1
  175. package/dist/client/assets/{index-BTNa7cC6.js → index-UwOo6lse.js} +1 -1
  176. package/dist/client/assets/{index-CcrP-nDa.js → index-VEcIOiWN.js} +1 -1
  177. package/dist/client/assets/{index-FcoC7l5_.js → index-oOJhkPK6.js} +1 -1
  178. package/dist/client/assets/{index-redirect-CbsKaCLd.js → index-redirect-DVZANI8q.js} +1 -1
  179. package/dist/client/assets/{index-C_NkXLoh.js → index-xNvvPF5K.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-BRGiYBJv.js → infiniteQueryObserver-CZ7GCbwa.js} +1 -1
  181. package/dist/client/assets/{infra-billing-mbjUHJA6.js → infra-billing-CBaX0rFG.js} +1 -1
  182. package/dist/client/assets/{input-DIuJhVNp.js → input-B0jMF0e_.js} +1 -1
  183. package/dist/client/assets/{input-C6McKl01.js → input-DS1fkrsU.js} +3 -3
  184. package/dist/client/assets/{integration-icon-DvT6X8cI.js → integration-icon-BTN_yWEk.js} +1 -1
  185. package/dist/client/assets/{item-actions-BSnXs1TT.js → item-actions-iEQmPVrr.js} +1 -1
  186. package/dist/client/assets/{jira-icon-pZDG9IEF.js → jira-icon-DXOB8Lmw.js} +1 -1
  187. package/dist/client/assets/{label-G4Rj_cXa.js → label-DKoCaul6.js} +1 -1
  188. package/dist/client/assets/{layout-CTvR7VG1.js → layout-DbhvOsyV.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-BYL3pyxT.js → legacy-admin-welcome-dialog-B3iJcsKr.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-Df5JF_SK.js → legacy-agents-deep-em6yOC_F.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-oBYkuRmD.js → legacy-main-redirect-CehX4Bni.js} +1 -1
  192. package/dist/client/assets/library-Dly_OLLg.js +1 -0
  193. package/dist/client/assets/{library-tab-DJQybwNu.js → library-tab-ekrJ9bue.js} +1 -1
  194. package/dist/client/assets/{login-DdaMpBPE.js → login-DJDyJ1ju.js} +1 -1
  195. package/dist/client/assets/{markdown-DeZATUv_.js → markdown-we-cHxXq.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-pvE5c1WF.js → mcp-app-renderer-BAfMgB1Z.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-BkAlBGe_.js → mcp-oauth-Ci6yqFTl.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-C4zfq49i.js → mcp-oauth-Ds0j31F2.js} +1 -1
  199. package/dist/client/assets/{members-Dhg3sD3K.js → members-BcSHOsjX.js} +1 -1
  200. package/dist/client/assets/{memory-ls8FI-ER.js → memory-BowPTmEv.js} +1 -1
  201. package/dist/client/assets/{mock-board-UBlWXoTV.js → mock-board-CW6QKw2v.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-BwfJ8i7M.js → monaco-editor-B5PTOxIz.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-CBrA5DNm.js → monitoring-stats-row-DJXMqCN0.js} +1 -1
  204. package/dist/client/assets/{monitoring-CQc-Jc5R.js → monitoring-xIY_IPi8.js} +1 -1
  205. package/dist/client/assets/{multi-select-D3r33Eqf.js → multi-select-DuNPPMuZ.js} +1 -1
  206. package/dist/client/assets/{mustache-DKc6J7pv.js → mustache-Bwl2DYO1.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-BAentWbs.js → named-rule-step-DS5kGuIs.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-B12Mihtd.js → named-rule-view-Z5BTjESF.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-CT39WKMt.js → new-project-dialog-HgjtDq4l.js} +1 -1
  210. package/dist/client/assets/{new-project-store-DYc4RZIM.js → new-project-store-CKvMs4hG.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ByK2SiJO.js → oauth-callback-DmgNmP6n.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-Beze5ATE.js → oauth-callback-ai-provider-CSpD6uGn.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-C7XByUpM.js → oauth-consent-Cr-15ieV.js} +1 -1
  214. package/dist/client/assets/{onboarding-DxARgVon.js → onboarding-Ete3lfiA.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-BZPG3E07.js → openai-conversation-BCGRvpnO.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DtHZp47L.js → optimistic-project-sidebar-views-B_55Z4kz.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-BjMh6dP-.js → order-monitor-day-Clbe0SA4.js} +1 -1
  218. package/dist/client/assets/{organization-choice-B7oZjoV-.js → organization-choice-B_iJSsFB.js} +1 -1
  219. package/dist/client/assets/{orgs-Dnp8mGIE.js → orgs-BFePKqBY.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-Ox_H5E7F.js → own-accounts-section-CSwSnoe4.js} +1 -1
  221. package/dist/client/assets/{pair-C9Fumckp.js → pair-DhT-6yBR.js} +1 -1
  222. package/dist/client/assets/{parse-sections-Bbp8QY_-.js → parse-sections-BZeGOsxE.js} +2 -2
  223. package/dist/client/assets/plan-BO0tgjWI.js +1 -0
  224. package/dist/client/assets/{plan-ladder-DNa_CJD5.js → plan-ladder-aYguFL8S.js} +1 -1
  225. package/dist/client/assets/{plan-page-DA2CBoO7.js → plan-page-B07fHd07.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-DnVnSftp.js → plan-usage-card-D_4-ZHg-.js} +1 -1
  227. package/dist/client/assets/{popover-mrQ4T9ru.js → popover-BI-lpUhu.js} +1 -1
  228. package/dist/client/assets/{post-calendar-D-RLnzxz.js → post-calendar-Bh8YSwE0.js} +1 -1
  229. package/dist/client/assets/{post-editor-BpIis1xH.js → post-editor-BbMWUU2h.js} +1 -1
  230. package/dist/client/assets/{preview-content-DTs-hWSP.js → preview-content-c-gz2Si_.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-CGhTVXYZ.js → preview-dialog-BFH4K3zp.js} +1 -1
  232. package/dist/client/assets/{preview-panel-CS2evrdt.js → preview-panel-5axMxyLP.js} +1 -1
  233. package/dist/client/assets/{preview-tab-C8EYcsK2.js → preview-tab-DrWOVhIi.js} +3 -3
  234. package/dist/client/assets/{primitives-DCeh9ZFM.js → primitives-phHVGNAI.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-BuD1Uiqo.js → product-picker-dialog-BJO35u0n.js} +1 -1
  236. package/dist/client/assets/{profile-Drm_c_7P.js → profile-1_I-_x94.js} +1 -1
  237. package/dist/client/assets/{project-app-view-BK0cCPsD.js → project-app-view-TcCrX4oT.js} +1 -1
  238. package/dist/client/assets/{project-apps-CSkPT54a.js → project-apps-55s0I8iz.js} +1 -1
  239. package/dist/client/assets/{project-icon-BxqBM24K.js → project-icon-piFAIvmP.js} +1 -1
  240. package/dist/client/assets/{project-index-BcbyhrUz.js → project-index-C209sCKL.js} +1 -1
  241. package/dist/client/assets/project-reports-_pvoxKuL.js +1 -0
  242. package/dist/client/assets/project-tasks-TZDHHmpj.js +1 -0
  243. package/dist/client/assets/{projects-Bt0tB7bD.js → projects-DJz5LDl0.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-CUxxduZa.js → projects-empty-state-Bjbej4Jx.js} +1 -1
  245. package/dist/client/assets/{prompts-Cypbuo50.js → prompts-C3wMciT-.js} +1 -1
  246. package/dist/client/assets/record-editor-CEpespPR.js +1 -0
  247. package/dist/client/assets/{redirect-editor-C4dWTnRQ.js → redirect-editor-CXYG17gC.js} +1 -1
  248. package/dist/client/assets/{reports-BJDaNojR.js → reports-BAWCIXn8.js} +1 -1
  249. package/dist/client/assets/reports-CPxs2BgN.js +1 -0
  250. package/dist/client/assets/{reports-onboarding-CH17bHGS.js → reports-onboarding-B3L3kaVX.js} +1 -1
  251. package/dist/client/assets/{reports-tab-muq1g1pm.js → reports-tab-UTeYJ_79.js} +2 -2
  252. package/dist/client/assets/repositories-Bj1ogpqH.js +1 -0
  253. package/dist/client/assets/{repositories-Bf8CqdKD.js → repositories-Dj3HbYDX.js} +1 -1
  254. package/dist/client/assets/{repository-binding-BAQCDq-W.js → repository-binding-DjFY5b0y.js} +1 -1
  255. package/dist/client/assets/{repository-picker-BBkgoOlP.js → repository-picker-BHJB5432.js} +1 -1
  256. package/dist/client/assets/{require-capability-FcSdruCZ.js → require-capability-BtI4Tyqp.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-DPL2sBE1.js → required-auth-layout-ChAYpVpn.js} +1 -1
  258. package/dist/client/assets/{reset-password-D15aZJot.js → reset-password-CtG7aWDw.js} +1 -1
  259. package/dist/client/assets/{resizable-DwqWjQSo.js → resizable-BL8CU-aJ.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-De0SSCOI.js → resolve-tab-icon-Ds9JNWyg.js} +1 -1
  261. package/dist/client/assets/{review-settings-X9fyjheP.js → review-settings-DNfSW4xg.js} +1 -1
  262. package/dist/client/assets/{role-color-BX_AhYik.js → role-color-Kmb8GwCh.js} +1 -1
  263. package/dist/client/assets/{roles-B-siyM42.js → roles-DXacyEKl.js} +1 -1
  264. package/dist/client/assets/route-ChWaxiqL.js +1 -0
  265. package/dist/client/assets/{route-CNMBOzJN.js → route-CvOWJgQ8.js} +1 -1
  266. package/dist/client/assets/{route-Cz_N3YLd.js → route-DhGhu9Ec.js} +1 -1
  267. package/dist/client/assets/{route-page-header-nTLU5ayk.js → route-page-header-D4_8Ct3f.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-DiUyKbJU.js → sandbox-git-api-CuR5rUpq.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-CRyp43o1.js → sandbox-lifecycle-context-Bt4OsDeb.js} +1 -1
  270. package/dist/client/assets/{save-status-CQe-z40L.js → save-status-DbwiLwGt.js} +1 -1
  271. package/dist/client/assets/{schema-C5ZQLddp.js → schema-D1mfj_VD.js} +1 -1
  272. package/dist/client/assets/{schema-CG6ylG0z.js → schema-DFMNr5Cf.js} +1 -1
  273. package/dist/client/assets/{scroll-area-KLotig-P.js → scroll-area-BBpO5xX_.js} +1 -1
  274. package/dist/client/assets/{search-input-wk0beNbE.js → search-input-Dij8WCfy.js} +1 -1
  275. package/dist/client/assets/{search-toggle-CMYcoB9P.js → search-toggle-BJsu_1mi.js} +1 -1
  276. package/dist/client/assets/{secret-picker-j7H2EK7l.js → secret-picker-D6eOapYQ.js} +1 -1
  277. package/dist/client/assets/{secrets-B9rKvRSV.js → secrets-ctTTJkDR.js} +1 -1
  278. package/dist/client/assets/{section-array-field-yz7QHNSD.js → section-array-field-D4XW_wJ4.js} +1 -1
  279. package/dist/client/assets/{sections-44_mUmcy.js → sections-B5mL2aQs.js} +1 -1
  280. package/dist/client/assets/{sections-editor-vs42n8iz.js → sections-editor-Dx_9N0tS.js} +1 -1
  281. package/dist/client/assets/{select-OlcoUSVg.js → select-D5aPAOxI.js} +1 -1
  282. package/dist/client/assets/{select-model-D0BbDHat.js → select-model-3J7FOs0F.js} +1 -1
  283. package/dist/client/assets/{seo-editor-D1i_wsxL.js → seo-editor-DP1v2Hug.js} +1 -1
  284. package/dist/client/assets/{separator-CunLPufQ.js → separator-Dy_gHFOY.js} +1 -1
  285. package/dist/client/assets/{session-runtime-CZKHty5X.js → session-runtime-CVF2LvNW.js} +1 -1
  286. package/dist/client/assets/settings-tab-BI3y61p6.js +1 -0
  287. package/dist/client/assets/{sheet-De8qzGNI.js → sheet-Dps_OtzY.js} +1 -1
  288. package/dist/client/assets/{shell-layout-596_q4a1.js → shell-layout-B7ONrK1S.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-DXu7he69.js → site-draft-actions-DhANjN0X.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-UnsYH70N.js → site-draft-view-BYqJs7J2.js} +1 -1
  291. package/dist/client/assets/site-editor-0AMhqN9R.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-B-FDGvtN.js → site-editor-toast-D2oMdvIY.js} +1 -1
  293. package/dist/client/assets/{skills-BjbKR2I7.js → skills-DxDybFRs.js} +1 -1
  294. package/dist/client/assets/{slider-c-3WdQpH.js → slider-w4rF_qju.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-B0hCRAsX.js → sortable.esm-MHH13t78.js} +1 -1
  296. package/dist/client/assets/{sso-D4qQzdCn.js → sso-Dl9I7AOe.js} +1 -1
  297. package/dist/client/assets/{suggestion-CIik1sqO.js → suggestion-SjSKJeBU.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-BQUmZAhN.js → super-agent-icon-Cc4Ciwsy.js} +1 -1
  299. package/dist/client/assets/{switch-C5tCt-1T.js → switch-CEzsWFkp.js} +1 -1
  300. package/dist/client/assets/{synced-repos-CBI3cJpx.js → synced-repos-CNS7qyVv.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-DrXbuC1r.js → tab-icon-glyph-BJZJf5lc.js} +1 -1
  302. package/dist/client/assets/{table-RDPVkrI6.js → table-DdZpQzqo.js} +1 -1
  303. package/dist/client/assets/{tabs-Bh3jtZIY.js → tabs-JKAPr-O4.js} +1 -1
  304. package/dist/client/assets/{task-board-BRF3ZwKz.js → task-board-B_oKjzEP.js} +1 -1
  305. package/dist/client/assets/{task-key-CajjdR3t.js → task-key-BWDMUi9g.js} +1 -1
  306. package/dist/client/assets/{task-route-DltlnXMA.js → task-route-Cr6uckKl.js} +1 -1
  307. package/dist/client/assets/{task-status-CS7Ps1ks.js → task-status-BkYGOB1i.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-BM7xNDXS.js → taskboard-analytics-nugCG6C8.js} +1 -1
  309. package/dist/client/assets/tasks-9sGiiD4G.js +1 -0
  310. package/dist/client/assets/{tasks-BeWBUFN3.js → tasks-DGRvo6F8.js} +1 -1
  311. package/dist/client/assets/{textarea-CP9TQ5HN.js → textarea-Cipr2aDL.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-CyVeHqD_.js → thread-analytics-CUyAWSkz.js} +1 -1
  313. package/dist/client/assets/{thread-button-B51gC6ln.js → thread-button-DEmMau3d.js} +1 -1
  314. package/dist/client/assets/{thread-intent-R2KI8ie_.js → thread-intent-CoFgTbor.js} +1 -1
  315. package/dist/client/assets/{thread-route-B5gjf6Cd.js → thread-route-BRmRa2CS.js} +1 -1
  316. package/dist/client/assets/{thread-route-D-UE3Db_.js → thread-route-TTLcBPLy.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-B9XdKhNS.js → thread-sheet-body-DU2O97KV.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-5TsTBsYK.js → time-range-picker-CBoxldZD.js} +1 -1
  319. package/dist/client/assets/{toggle-group-CtXgLS7e.js → toggle-group-4Uqc6vzQ.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-WN2Xo0Mj.js → tool-set-selector-DoFKwoWc.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-Ce7Zk4Z1.js → toolbar-icon-button-DnvtDhiO.js} +1 -1
  322. package/dist/client/assets/{tooltip-DhlWzeQv.js → tooltip-C6OYlSV-.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-BkLzQGib.js → tooltipContext-D2O58pOO.js} +1 -1
  324. package/dist/client/assets/{track-xlpKzX88.js → track-D2uS6dpC.js} +1 -1
  325. package/dist/client/assets/{types-rurFGFZy.js → types-cOzCnmYI.js} +1 -1
  326. package/dist/client/assets/{url-slug-CiUrNKts.js → url-slug-DgA17VrJ.js} +1 -1
  327. package/dist/client/assets/{usage-stats-CLeyhHyT.js → usage-stats-X4jMwPwX.js} +1 -1
  328. package/dist/client/assets/use-ai-providers-BDyMN-N5.js +1 -0
  329. package/dist/client/assets/{use-api-keys-B_vZqtxC.js → use-api-keys-CsFZ7MWC.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-CaZ5oLnq.js → use-apply-named-rule-CnSwu1YP.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-C_ce63qF.js +1 -0
  332. package/dist/client/assets/{use-automations-CLa8yUdj.js → use-automations-DGxEZMH1.js} +1 -1
  333. package/dist/client/assets/{use-autosave-CwP_nadT.js → use-autosave-JaDxGSls.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-DA-pr0Uy.js +1 -0
  335. package/dist/client/assets/use-blog-view-DhODFkA8.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-x3sd6PWp.js → use-chat-layout-state-D4d4l3oL.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-Bn8BUqaj.js → use-cms-publish-actions-CdubuGTA.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-CkgH2aNV.js → use-connect-companion-DCQqrJld.js} +1 -1
  339. package/dist/client/assets/{use-connection-BO-ZUzee.js → use-connection-DoUaPNkI.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-By62We3p.js → use-content-sync-Cxyhqioh.js} +1 -1
  341. package/dist/client/assets/{use-copy-CjEnyhFT.js → use-copy-nYlH4I4g.js} +1 -1
  342. package/dist/client/assets/{use-current-view-C2fbVQ-O.js → use-current-view-1HEoI3qR.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-DQRGqxvr.js → use-date-fns-locale-DxgiZ7Lq.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-DN03qSfm.js → use-debounced-autosave-Bi5JPKsx.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-DqHSmPMR.js → use-debounced-value-ZpPSvQwP.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-5H0OzCE5.js → use-deco-credits-DcRWtP9o.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-DwNDOIa1.js → use-decopilot-events-B-T0Hrvx.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-nP_FtjiY.js → use-delete-block-DP79Au-4.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-BBTdkJYy.js → use-delete-connection-4Fx-JLmK.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-Bh76rlF7.js → use-deployment-admin-BmC0uFFM.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-4v7LU4jM.js → use-entitlements-CmxoG1H2.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-DQSkfUDT.js → use-fast-preview-draft-url-DXFM6T8R.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-J6lDtEfO.js → use-file-configs-Wy-M6u4j.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-2psZYBx1.js → use-id-selection-65R8Y0Rr.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-LMUeu63D.js → use-in-settings-CG5n8E8Q.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-_58TtHpK.js → use-inbox-feed-DxcWHUtc.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-uxxC9xbL.js → use-infinite-scroll-DxkQp5Qv.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-Dlx4kfO9.js → use-join-requests-CyJQy1RH.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-D5zQhSWJ.js → use-main-panel-tabs-DJGu6nFZ.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-FhB3trZz.js → use-mcp-auth-status-BabDSoXH.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-86j-Nolb.js → use-mcp-client-rOHZbD3Y.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-CPXLXWTp.js → use-mcp-prompts-Cq6mpthN.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-BeJ4_Tij.js → use-mcp-tools-DfFo5hFt.js} +1 -1
  364. package/dist/client/assets/{use-mobile-BjsAkqwr.js → use-mobile-eRuVOAzy.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-CCDsEu9Z.js → use-move-blocks-DWNb-nFG.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-C-BC28kE.js → use-navigate-to-agent-CoxxT5G0.js} +1 -1
  367. package/dist/client/assets/{use-never-published-C4cAqdmZ.js → use-never-published-ZzuVsx8k.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-C62_MbqW.js → use-org-fs-Bjw5czAm.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-BzvGZbQ2.js → use-org-notice-QAyxiINx.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-SmfSLgc1.js → use-org-repo-syncs-CvKMwzFX.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-CypQjzG8.js → use-org-sso-CFsTaV-A.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-CgKOO7Ms.js → use-organization-settings-BQz13Hmn.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-DHff9CS9.js → use-panel-navigate-DRtgWUMv.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-Dug5CWyl.js → use-project-native-view-presence-BIFke35D.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-AMUoXt2c.js → use-project-scope-BEEh5L8P.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-qXhoWNgp.js → use-recent-apps-DnI5Ea5w.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-CiiYsnje.js → use-reports-diagnostic-KjDTU46X.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-A8aB0HnP.js → use-sandbox-events-B1e4GG__.js} +1 -1
  379. package/dist/client/assets/{use-secrets-DumIaW5z.js → use-secrets-DG4KpaBa.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-BcIQh9cw.js → use-section-preview-base-CTUunTIy.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-iTcR18ZK.js → use-sidebar-collapsed-Cvh_KEOx.js} +1 -1
  382. package/dist/client/assets/{use-tags-Bm6VkRP9.js → use-tags-oUXL8Eao.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-CcKWYx4U.js → use-task-board-analytics-CY3DJsc5.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-Db89Oevz.js → use-task-board-item-prs-DSrWn6bY.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-BVQx7Wft.js → use-task-board-items-BbyDm5G0.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-C468T8Y7.js → use-task-board-prompts-CqjpsSVo.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-FjAJnVQn.js → use-task-metadata-BYbicOrw.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-BnMyEJ2l.js → use-thread-outputs-OIyH_XWf.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-hbAZo1QG.js → use-view-draft-kind-BaIs6zLO.js} +1 -1
  390. package/dist/client/assets/use-voice-input-IeU241I1.js +1 -0
  391. package/dist/client/assets/useInfiniteQuery-D_gObArx.js +1 -0
  392. package/dist/client/assets/{useQueries-CuzZgNOl.js → useQueries-D35FEy3E.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-DTGymExJ.js +1 -0
  394. package/dist/client/assets/{users-QlOHt7jV.js → users-D7EeASCC.js} +1 -1
  395. package/dist/client/assets/{utils-CzRFs-0R.js → utils-CfyLtUqt.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-DaLwTMzO.js → variant-calendar-C6gDTqNE.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-BBj0ymp1.js → variant-matcher-override-BugDO5Is.js} +1 -1
  398. package/dist/client/assets/{view-header-CRFbPvFT.js → view-header-BpDzpk8m.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-K5tXQmiD.js → virtual-mcp-DFw2lKMC.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-C0me6Edt.js → watch-sse-pool-DGsiEkeQ.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +651 -651
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-CKN609Ao.js +0 -1
  405. package/dist/client/assets/agent-deck-B4OrR3A7.js +0 -1
  406. package/dist/client/assets/agent-experiments-D6tEEJ7A.js +0 -1
  407. package/dist/client/assets/agent-file-BbWhb5MG.js +0 -1
  408. package/dist/client/assets/agent-library-DB8Gnwn6.js +0 -1
  409. package/dist/client/assets/agent-library-file-Cc6xu5fG.js +0 -1
  410. package/dist/client/assets/agent-overview-Dp6TUwUW.js +0 -1
  411. package/dist/client/assets/agent-settings-Bl07TGrR.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-D7ZiHs5k.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-D7tLGQbd.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-BwKMWPep.js +0 -1
  415. package/dist/client/assets/agent-view-DkN5uE0f.js +0 -1
  416. package/dist/client/assets/ai-providers-DTKly69Q.js +0 -1
  417. package/dist/client/assets/api-keys-BCHOPkMm.js +0 -1
  418. package/dist/client/assets/chat-context-vJ6R-Clt.js +0 -43
  419. package/dist/client/assets/library-mSFHNE8F.js +0 -1
  420. package/dist/client/assets/plan-Bkifmwdt.js +0 -1
  421. package/dist/client/assets/project-reports-C1LMMcEB.js +0 -1
  422. package/dist/client/assets/project-tasks-CYJZp2Uh.js +0 -1
  423. package/dist/client/assets/record-editor-BsKWufWE.js +0 -1
  424. package/dist/client/assets/reports-oGZqT3QW.js +0 -1
  425. package/dist/client/assets/repositories-JzZI0XMl.js +0 -1
  426. package/dist/client/assets/route-CalpiHU1.js +0 -1
  427. package/dist/client/assets/settings-tab-VZsLRrpt.js +0 -1
  428. package/dist/client/assets/site-editor-2NiQbUmg.js +0 -1
  429. package/dist/client/assets/tasks-BVcnl5hV.js +0 -1
  430. package/dist/client/assets/use-ai-providers-BwkzkRi2.js +0 -1
  431. package/dist/client/assets/use-ask-in-chat-CuhqUmC7.js +0 -1
  432. package/dist/client/assets/use-blocks-v8-project-BLAijVCk.js +0 -1
  433. package/dist/client/assets/use-blog-view-DJnS2ipo.js +0 -1
  434. package/dist/client/assets/use-voice-input-DJjQBO4e.js +0 -1
  435. package/dist/client/assets/useInfiniteQuery-9vIAXgqG.js +0 -1
  436. package/dist/client/assets/useSuspenseInfiniteQuery-CucINu-S.js +0 -1
@@ -1 +1 @@
1
- import{c as B,b as H,j as s,I as ce,ap as Te,X as De,B as X,Z as Ae,_ as ke,an as ee,i as le,K as R,b9 as Ue,Y as Z,a9 as je,J as Ee,e3 as Oe,m as Re,a6 as oe,a as Se,q as re,e as Y,t as q,r as J,ax as Ce,x as qe,w as Fe,h as $e,v as Be,D as Le,aI as ze,aH as Me,y as Qe,aJ as He,aK as fe,aM as Ge,aL as Ve,aN as We,aO as Ye,bc as Je,aP as Xe,aQ as Ze,aR as et,l as tt,gl as st,gZ as it}from"./index-DoEtSiIe.js";import{s as nt}from"./Plus-BoPsX_T8.js";import{f as lt,g as ot,e as rt}from"./use-ai-providers-BwkzkRi2.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as me}from"./badge-DONoxQO7.js";import{c as pe,T as ge,a as he}from"./tooltip-DhlWzeQv.js";import{c as at,i as ct,b as dt}from"./Tool01-D90Wr5xR.js";import{S as ut}from"./switch-C5tCt-1T.js";import{G as ft}from"./github-icon-YYYF_UPl.js";import{s as mt}from"./Trash01-Ctp9Olbr.js";import{u as pt,f as gt}from"./use-date-fns-locale-DQRGqxvr.js";import{g as Pe}from"./openai-compatible-presets-BKGfVqEx.js";import{s as ht}from"./Eye-DwRCQHLk.js";function de(t){const e=B.c(32),{icon:i,title:o,status:l,meta:r,summary:m,action:f,children:c}=t,p=H();let g;e[0]!==i?(g=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=g):g=e[1];let n;e[2]!==o?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:o}),e[2]=o,e[3]=n):n=e[3];let a;e[4]!==l||e[5]!==p?(a=l==="linked"&&s.jsx(me,{variant:"success",size:"sm",children:p("settings.ownAccounts.linked")}),e[4]=l,e[5]=p,e[6]=a):a=e[6];let d;e[7]!==l||e[8]!==p?(d=l==="expired"&&s.jsx(me,{variant:"warning",size:"sm",children:p("settings.ownAccounts.expired")}),e[7]=l,e[8]=p,e[9]=d):d=e[9];let u;e[10]!==n||e[11]!==a||e[12]!==d?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[n,a,d]}),e[10]=n,e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==u||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18];let y;e[19]!==m?(y=m&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:m}),e[19]=m,e[20]=y):y=e[20];let C;e[21]!==f?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:f}),e[21]=f,e[22]=C):C=e[22];let b;e[23]!==g||e[24]!==x||e[25]!==y||e[26]!==C?(b=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[g,x,y,C]}),e[23]=g,e[24]=x,e[25]=y,e[26]=C,e[27]=b):b=e[27];let j;return e[28]!==c||e[29]!==b||e[30]!==o?(j=s.jsxs("div",{role:"group","aria-label":o,children:[b,c]}),e[28]=c,e[29]=b,e[30]=o,e[31]=j):j=e[31],j}function be(t){const e=B.c(7),{src:i,alt:o}=t;if(!i){let r;e[0]!==o?(r=o.charAt(0),e[0]=o,e[1]=r):r=e[1];let m;return e[2]!==r?(m=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=m):m=e[3],m}let l;return e[4]!==o||e[5]!==i?(l=s.jsx("img",{src:i,alt:o,className:"size-5 object-contain"}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}function ue(t){const e=B.c(10),{children:i}=t,o=H();let l;e[0]!==o?(l=o("settings.ownAccounts.more"),e[0]=o,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Te,{size:16}),e[2]=r):r=e[2];let m;e[3]!==l?(m=s.jsx(De,{asChild:!0,children:s.jsx(X,{variant:"ghost",size:"icon-sm","aria-label":l,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=l,e[4]=m):m=e[4];let f;e[5]!==i?(f=s.jsx(Ae,{align:"end",children:i}),e[5]=i,e[6]=f):f=e[6];let c;return e[7]!==m||e[8]!==f?(c=s.jsxs(ke,{children:[m,f]}),e[7]=m,e[8]=f,e[9]=c):c=e[9],c}function ye(t){const e=B.c(23),{hint:i,submitLabel:o,pending:l,value:r,onChange:m,onSubmit:f,inputProps:c}=t;let p;e[0]!==f?(p=y=>{y.preventDefault(),f()},e[0]=f,e[1]=p):p=e[1];let g;e[2]!==i?(g=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=g):g=e[3];let n;e[4]!==m?(n=y=>m(y.target.value),e[4]=m,e[5]=n):n=e[5];let a;e[6]!==c||e[7]!==n||e[8]!==r?(a=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=a):a=e[9];let d;e[10]!==l||e[11]!==r?(d=r.trim().length===0||l,e[10]=l,e[11]=r,e[12]=d):d=e[12];let u;e[13]!==o||e[14]!==d?(u=s.jsx(X,{type:"submit",disabled:d,children:o}),e[13]=o,e[14]=d,e[15]=u):u=e[15];let h;e[16]!==a||e[17]!==u?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[a,u]}),e[16]=a,e[17]=u,e[18]=h):h=e[18];let x;return e[19]!==p||e[20]!==g||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:p,children:[g,h]}),e[19]=p,e[20]=g,e[21]=h,e[22]=x):x=e[22],x}const _e={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function Ne(t){const e=B.c(12),{provider:i,orgId:o,userId:l,linkedAt:r,enabled:m}=t,f=ee();let c;e[0]!==r||e[1]!==o||e[2]!==i||e[3]!==l?(c=R.subscriptionUsageSnapshot(o,l,i,r),e[0]=r,e[1]=o,e[2]=i,e[3]=l,e[4]=c):c=e[4];let p;e[5]!==i||e[6]!==f?(p=()=>f.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=f,e[7]=p):p=e[7];const g=m&&!!l;let n;return e[8]!==c||e[9]!==p||e[10]!==g?(n={queryKey:c,queryFn:p,enabled:g,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=p,e[10]=g,e[11]=n):n=e[11],le(n)}function Ke(t){const e=B.c(22),{provider:i,query:o}=t,l=H(),[r]=Ee(),m=o.data;if(o.isPending){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{className:"h-4 w-32"}),e[0]=n):n=e[0],n}if(o.isError||m?.status!=="available"){const n=_e[i];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(je,{}),e[1]=a):a=e[1];let d;e[2]!==l?(d=l("settings.subscriptionUsage.viewUsage"),e[2]=l,e[3]=d):d=e[3];let u;return e[4]!==n||e[5]!==d?(u=s.jsx(X,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[a,d]})}),e[4]=n,e[5]=d,e[6]=u):u=e[6],u}if(m.limitReached){let n;e[7]!==l?(n=l("settings.subscriptionUsage.limitReached"),e[7]=l,e[8]=n):n=e[8];let a;return e[9]!==n?(a=s.jsx(me,{variant:"destructive",size:"sm",children:n}),e[9]=n,e[10]=a):a=e[10],a}let f;e[11]!==r?(f=n=>new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(n)),e[11]=r,e[12]=f):f=e[12];const c=f;let p;if(e[13]!==c||e[14]!==l||e[15]!==m.windows){let n;e[17]!==c||e[18]!==l?(n=a=>{const d=Math.round(a.usedPercent);return s.jsxs(pe,{children:[s.jsx(ge,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(a,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(a,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,d)}%`},className:Re("h-full rounded-full",xt(d))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[d,"%"]})]})}),a.resetAt&&s.jsx(he,{children:l("settings.subscriptionUsage.resets",{date:c(a.resetAt)})})]},a.id)},e[17]=c,e[18]=l,e[19]=n):n=e[19],p=m.windows.slice(0,2).map(n),e[13]=c,e[14]=l,e[15]=m.windows,e[16]=p}else p=e[16];let g;return e[20]!==p?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:p}),e[20]=p,e[21]=g):g=e[21],g}function we(t){const e=B.c(18),{provider:i,query:o}=t,l=H(),r=o.isFetching;let m;e[0]!==o?(m=()=>{o.refetch()},e[0]=o,e[1]=m):m=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ue,{}),e[2]=f):f=e[2];let c;e[3]!==l?(c=l("settings.subscriptionUsage.refresh"),e[3]=l,e[4]=c):c=e[4];let p;e[5]!==o.isFetching||e[6]!==m||e[7]!==c?(p=s.jsxs(Z,{disabled:r,onSelect:m,children:[f,c]}),e[5]=o.isFetching,e[6]=m,e[7]=c,e[8]=p):p=e[8];const g=_e[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(je,{}),e[9]=n):n=e[9];let a;e[10]!==l?(a=l("settings.subscriptionUsage.openProvider"),e[10]=l,e[11]=a):a=e[11];let d;e[12]!==g||e[13]!==a?(d=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",children:[n,a]})}),e[12]=g,e[13]=a,e[14]=d):d=e[14];let u;return e[15]!==p||e[16]!==d?(u=s.jsxs(s.Fragment,{children:[p,d]}),e[15]=p,e[16]=d,e[17]=u):u=e[17],u}function bt(){const t=B.c(38),e=H(),{org:i}=oe(),{data:o}=Se.useSession(),l=o?.user.id??"",r=ee(),m=re();let f;t[0]!==i.id||t[1]!==l?(f=R.claudeSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=f):f=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const p=!!l;let g;t[5]!==f||t[6]!==c||t[7]!==p?(g={queryKey:f,queryFn:c,enabled:p},t[5]=f,t[6]=c,t[7]=p,t[8]=g):g=t[8];const n=le(g);let a;t[9]!==i.id||t[10]!==m||t[11]!==l?(a=async()=>{await m.cancelQueries({queryKey:R.subscriptionUsage(i.id,l,"claude")}),m.removeQueries({queryKey:R.subscriptionUsage(i.id,l,"claude")}),await m.invalidateQueries({queryKey:R.claudeSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=a):a=t[12];const d=a;let u;t[13]!==r?(u=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=u):u=t[14];let h;t[15]!==d||t[16]!==e?(h=async()=>{await d(),q.success(e("settings.claudeSubscription.connected"))},t[15]=d,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==u||t[19]!==h?(x={mutationFn:u,onSuccess:h,onError:vt},t[18]=u,t[19]=h,t[20]=x):x=t[20];const y=Y(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let b;t[23]!==d||t[24]!==e?(b=async()=>{await d(),q.success(e("settings.claudeSubscription.disconnected"))},t[23]=d,t[24]=e,t[25]=b):b=t[25];let j;t[26]!==C||t[27]!==b?(j={mutationFn:C,onSuccess:b,onError:yt},t[26]=C,t[27]=b,t[28]=j):j=t[28];const v=Y(j),S=n.data?.connected===!0,P=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let _;return t[29]!==y||t[30]!==S||t[31]!==v||t[32]!==P||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==l?(_={orgId:i.id,userId:l,status:n,connected:S,expired:P,linkedAt:K,connect:y,disconnect:v},t[29]=y,t[30]=S,t[31]=v,t[32]=P,t[33]=i.id,t[34]=n,t[35]=K,t[36]=l,t[37]=_):_=t[37],_}function yt(t){return q.error(t.message)}function vt(t){return q.error(t.message)}function jt(){const t=B.c(33),e=H(),[i,o]=J.useState(""),[l,r]=J.useState(!1),{orgId:m,userId:f,connected:c,expired:p,linkedAt:g,connect:n,disconnect:a}=bt();let d;t[0]!==c||t[1]!==g||t[2]!==m||t[3]!==f?(d={provider:"claude",orgId:m,userId:f,linkedAt:g,enabled:c},t[0]=c,t[1]=g,t[2]=m,t[3]=f,t[4]=d):d=t[4];const u=Ne(d);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let y;t[9]!==e?(y=e("settings.claudeSubscription.title"),t[9]=e,t[10]=y):y=t[10];const C=c?"linked":p?"expired":null;let b;t[11]!==c||t[12]!==u?(b=c?s.jsx(Ke,{provider:"claude",query:u}):null,t[11]=c,t[12]=u,t[13]=b):b=t[13];let j;t[14]!==c||t[15]!==a||t[16]!==l||t[17]!==e||t[18]!==u?(j=c?s.jsxs(ue,{children:[s.jsx(we,{provider:"claude",query:u}),s.jsx(Ce,{}),s.jsx(Z,{variant:"destructive",disabled:a.isPending,onSelect:()=>a.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(X,{variant:"outline",size:"sm",onClick:()=>{r(St),o("")},children:e(l?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=a,t[16]=l,t[17]=e,t[18]=u,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==l||t[23]!==e||t[24]!==i?(v=!c&&l&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:o,onSubmit:()=>n.mutate(i,{onSuccess:()=>{o(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=l,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==y||t[28]!==C||t[29]!==b||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:y,status:C,summary:b,action:j,children:v}),t[26]=x,t[27]=y,t[28]=C,t[29]=b,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=B.c(63),e=H(),{org:i}=oe(),{data:o}=Se.useSession(),l=o?.user.id??"",r=ee(),m=re(),[f,c]=J.useState(""),[p,g]=J.useState(!1);let n;t[0]!==i.id||t[1]!==l?(n=R.codexSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=n):n=t[2];let a;t[3]!==r?(a=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=a):a=t[4];const d=!!l;let u;t[5]!==n||t[6]!==a||t[7]!==d?(u={queryKey:n,queryFn:a,enabled:d},t[5]=n,t[6]=a,t[7]=d,t[8]=u):u=t[8];const h=le(u);let x;t[9]!==i.id||t[10]!==m||t[11]!==l?(x=async()=>{await m.cancelQueries({queryKey:R.subscriptionUsage(i.id,l,"codex")}),m.removeQueries({queryKey:R.subscriptionUsage(i.id,l,"codex")}),await m.invalidateQueries({queryKey:R.codexSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=x):x=t[12];const y=x;let C;t[13]!==r||t[14]!==f?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:f}),t[13]=r,t[14]=f,t[15]=C):C=t[15];let b;t[16]!==y||t[17]!==e?(b=async()=>{c(""),g(!1),await y(),q.success(e("settings.codexSubscription.connected"))},t[16]=y,t[17]=e,t[18]=b):b=t[18];let j;t[19]!==C||t[20]!==b?(j={mutationFn:C,onSuccess:b,onError:Nt},t[19]=C,t[20]=b,t[21]=j):j=t[21];const v=Y(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let P;t[24]!==y||t[25]!==e?(P=async()=>{await y(),q.success(e("settings.codexSubscription.disconnected"))},t[24]=y,t[25]=e,t[26]=P):P=t[26];let K;t[27]!==S||t[28]!==P?(K={mutationFn:S,onSuccess:P,onError:_t},t[27]=S,t[28]=P,t[29]=K):K=t[29];const _=Y(K),N=h.data?.connected===!0,F=h.data?.linkedAt??null;let w;t[30]!==N||t[31]!==i.id||t[32]!==F||t[33]!==l?(w={provider:"codex",orgId:i.id,userId:l,linkedAt:F,enabled:N},t[30]=N,t[31]=i.id,t[32]=F,t[33]=l,t[34]=w):w=t[34];const T=Ne(w);let $;t[35]!==e?($=e("settings.codexSubscription.title"),t[35]=e,t[36]=$):$=t[36];let E;t[37]!==$?(E=s.jsx(be,{src:xe.codex,alt:$}),t[37]=$,t[38]=E):E=t[38];let I;t[39]!==e?(I=e("settings.codexSubscription.title"),t[39]=e,t[40]=I):I=t[40];const O=N?"linked":null;let D;t[41]!==N||t[42]!==T?(D=N?s.jsx(Ke,{provider:"codex",query:T}):null,t[41]=N,t[42]=T,t[43]=D):D=t[43];let A;t[44]!==N||t[45]!==_||t[46]!==p||t[47]!==e||t[48]!==T?(A=N?s.jsxs(ue,{children:[s.jsx(we,{provider:"codex",query:T}),s.jsx(Ce,{}),s.jsx(Z,{variant:"destructive",disabled:_.isPending,onSelect:()=>_.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(X,{variant:"outline",size:"sm",onClick:()=>{g(Pt),c("")},children:e(p?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=_,t[46]=p,t[47]=e,t[48]=T,t[49]=A):A=t[49];let k;t[50]!==v||t[51]!==N||t[52]!==p||t[53]!==e||t[54]!==f?(k=!N&&p&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:f,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=N,t[52]=p,t[53]=e,t[54]=f,t[55]=k):k=t[55];let U;return t[56]!==E||t[57]!==I||t[58]!==O||t[59]!==D||t[60]!==A||t[61]!==k?(U=s.jsx(de,{icon:E,title:I,status:O,summary:D,action:A,children:k}),t[56]=E,t[57]=I,t[58]=O,t[59]=D,t[60]=A,t[61]=k,t[62]=U):U=t[62],U}function Pt(t){return!t}function _t(t){return q.error(t.message)}function Nt(t){return q.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function wt(){const t=B.c(72),e=H(),{org:i}=oe(),o=ee(),l=re(),[r,m]=J.useState(""),[f,c]=J.useState(!1);let p;t[0]!==i.id?(p=R.githubCopilot(i.id),t[0]=i.id,t[1]=p):p=t[1];let g;t[2]!==o?(g=()=>o.call("GITHUB_COPILOT_STATUS",{}),t[2]=o,t[3]=g):g=t[3];let n;t[4]!==p||t[5]!==g?(n={queryKey:p,queryFn:g},t[4]=p,t[5]=g,t[6]=n):n=t[6];const a=le(n);let d;t[7]!==i.id||t[8]!==l?(d=()=>l.invalidateQueries({queryKey:R.githubCopilot(i.id)}),t[7]=i.id,t[8]=l,t[9]=d):d=t[9];const u=d;let h;t[10]!==o||t[11]!==r?(h=()=>o.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=o,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==u||t[14]!==e?(x=async()=>{m(""),c(!1),await u(),q.success(e("settings.githubCopilot.connected"))},t[13]=u,t[14]=e,t[15]=x):x=t[15];let y;t[16]!==h||t[17]!==x?(y={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=y):y=t[18];const C=Y(y);let b;t[19]!==o?(b=()=>o.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=o,t[20]=b):b=t[20];let j;t[21]!==u||t[22]!==e?(j=async()=>{await u(),q.success(e("settings.githubCopilot.disconnected"))},t[21]=u,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==b||t[25]!==j?(v={mutationFn:b,onSuccess:j,onError:Dt},t[24]=b,t[25]=j,t[26]=v):v=t[26];const S=Y(v);let P;t[27]!==o?(P=W=>o.call("GITHUB_COPILOT_SHARE",{shared:W}),t[27]=o,t[28]=P):P=t[28];let K;t[29]!==u||t[30]!==P?(K={mutationFn:P,onSuccess:u,onError:Tt},t[29]=u,t[30]=P,t[31]=K):K=t[31];const _=Y(K),N=a.data?.connected===!0,F=a.data?.orgShare??null,w=F&&!F.sharedByMe?F:null,T=w?.sharedBy.name??"",$=F?.sharedByMe===!0,E=_.isPending||w!==null;let I;t[32]!==_?(I=W=>_.mutate(W),t[32]=_,t[33]=I):I=t[33];let O;t[34]!==e?(O=e("settings.githubCopilot.shareTitle"),t[34]=e,t[35]=O):O=t[35];let D;t[36]!==$||t[37]!==E||t[38]!==I||t[39]!==O?(D=s.jsx(ut,{checked:$,disabled:E,onCheckedChange:I,"aria-label":O}),t[36]=$,t[37]=E,t[38]=I,t[39]=O,t[40]=D):D=t[40];const A=D;let k;t[41]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(ft,{size:18,className:"text-foreground"}),t[41]=k):k=t[41];let U;t[42]!==e?(U=e("settings.githubCopilot.title"),t[42]=e,t[43]=U):U=t[43];const V=N?"linked":null;let L;t[44]!==w||t[45]!==T||t[46]!==e?(L=w?e(w.coversMe?"settings.githubCopilot.sharedBy":"settings.githubCopilot.ownPlanUsed",{name:T}):null,t[44]=w,t[45]=T,t[46]=e,t[47]=L):L=t[47];let z;t[48]!==N||t[49]!==w||t[50]!==A||t[51]!==T||t[52]!==e?(z=N?s.jsxs("div",{className:"flex shrink-0 items-center gap-2 text-meta",children:[s.jsx("span",{children:e("settings.githubCopilot.shareTitle")}),s.jsxs(pe,{children:[s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground","aria-label":e("settings.githubCopilot.shareDescription"),children:s.jsx(at,{size:13})})}),s.jsx(he,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}),w?s.jsxs(pe,{children:[s.jsx(ge,{asChild:!0,children:s.jsx("span",{children:A})}),s.jsx(he,{className:"max-w-64",children:e("settings.githubCopilot.shareTaken",{name:T})})]}):A]}):null,t[48]=N,t[49]=w,t[50]=A,t[51]=T,t[52]=e,t[53]=z):z=t[53];let M;t[54]!==N||t[55]!==S||t[56]!==f||t[57]!==e?(M=N?s.jsx(ue,{children:s.jsx(Z,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(X,{variant:"outline",size:"sm",onClick:()=>{c(It),m("")},children:e(f?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[54]=N,t[55]=S,t[56]=f,t[57]=e,t[58]=M):M=t[58];let Q;t[59]!==C||t[60]!==N||t[61]!==f||t[62]!==e||t[63]!==r?(Q=!N&&f&&s.jsx(ye,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:m,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[59]=C,t[60]=N,t[61]=f,t[62]=e,t[63]=r,t[64]=Q):Q=t[64];let G;return t[65]!==U||t[66]!==V||t[67]!==L||t[68]!==z||t[69]!==M||t[70]!==Q?(G=s.jsx(de,{icon:k,title:U,status:V,meta:L,summary:z,action:M,children:Q}),t[65]=U,t[66]=V,t[67]=L,t[68]=z,t[69]=M,t[70]=Q,t[71]=G):G=t[71],G}function It(t){return!t}function Tt(t){return q.error(t.message)}function Dt(t){return q.error(t.message)}function At(t){return q.error(t.message)}const kt=t=>He({label:fe().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:fe().optional(),baseUrl:fe().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:o}){return t&&!!e&&e!==i&&!o}function Et({providerKey:t,provider:e,preset:i,maskedKey:o,currentLabel:l,currentBaseUrl:r,onCancel:m,onSuccess:f}){const{org:c}=oe(),p=ee(),g=re(),n=H(),[a,d]=J.useState(!1),u=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:y,handleSubmit:C,watch:b,setError:j,formState:{errors:v}}=ze({resolver:Me(x),defaultValues:{label:l,apiKey:"",baseUrl:r??""}}),S=b("apiKey")??"",{mutate:P,isPending:K}=Y({mutationFn:async _=>{let N;_.apiKey&&(u?N=JSON.stringify({baseUrl:_.baseUrl||r||"",apiKey:_.apiKey}):N=_.apiKey),await p.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:_.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{g.invalidateQueries({queryKey:R.aiProviderKeys(c.id)}),g.invalidateQueries({queryKey:R.aiProviders(c.id)}),q.success(n("settings.editProviderDialog.providerUpdated")),f()},onError:_=>q.error(n("settings.editProviderDialog.failedToUpdate",{error:_.message}))});return s.jsxs("form",{onSubmit:C(_=>{if(Ut({isOpenAICompatible:u,baseUrl:_.baseUrl,currentBaseUrl:r,apiKey:_.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}P(_)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...y("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),u&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...y("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:a&&S?"text":"password",placeholder:o,...y("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>d(!a),"aria-label":n(a?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(ct,{size:14}):s.jsx(ht,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Qe,{children:[s.jsx(X,{type:"button",variant:"ghost",size:"sm",onClick:m,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(X,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=B.c(31),{providerKey:i,provider:o,open:l,onOpenChange:r}=t,m=H(),f=ee(),c=o.id==="openai-compatible"&&i.presetId?Pe(i.presetId):void 0,p=c?.name??o.name;let g;e[0]!==i.id?(g=R.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=g):g=e[1];let n;e[2]!==i.id||e[3]!==f?(n=()=>f.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=f,e[4]=n):n=e[4];let a;e[5]!==l||e[6]!==g||e[7]!==n?(a={queryKey:g,queryFn:n,enabled:l,staleTime:0},e[5]=l,e[6]=g,e[7]=n,e[8]=a):a=e[8];const{data:d,isLoading:u}=le(a),h=Le,x=Be,y="sm:max-w-md",C=Fe,b=qe,j=m("settings.editProviderDialog.editTitle",{name:p});let v;e[9]!==b||e[10]!==j?(v=s.jsx(b,{children:j}),e[9]=b,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let P;e[15]!==u||e[16]!==r||e[17]!==c||e[18]!==d||e[19]!==o||e[20]!==i?(P=u||!d?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx($e,{})}):s.jsx(Et,{providerKey:i,provider:o,preset:c,maskedKey:d.maskedKey,currentLabel:d.label,currentBaseUrl:d.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=u,e[16]=r,e[17]=c,e[18]=d,e[19]=o,e[20]=i,e[21]=P):P=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==P?(K=s.jsxs(x,{className:y,children:[S,P]}),e[22]=x,e[23]=S,e[24]=P,e[25]=K):K=e[25];let _;return e[26]!==h||e[27]!==r||e[28]!==l||e[29]!==K?(_=s.jsx(h,{open:l,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=l,e[29]=K,e[30]=_):_=e[30],_}function Rt(t){const e=B.c(86),{providerKey:i,provider:o}=t,{org:l}=oe(),r=ee(),m=re(),[f,c]=J.useState(!1),[p,g]=J.useState(!1),n=H(),a=pt(),d=o?.id==="openai-compatible";let u;e[0]!==d||e[1]!==i.presetId?(u=d&&i.presetId?Pe(i.presetId):void 0,e[0]=d,e[1]=i.presetId,e[2]=u):u=e[2];const h=u;let x;e[3]!==d||e[4]!==h||e[5]!==o?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:d?n("settings.aiProviders.customOpenAiCompatible"):o?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=d,e[4]=h,e[5]=o?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const y=x,C=h?.logo??o?.logo??xe[i.providerId];let b;e:{if(d){b=i.label;break e}let ne;e[9]!==a||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:a})}),e[9]=a,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],b=ne}const j=b;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==l||e[18]!==i.id||e[19]!==m||e[20]!==n?(S=()=>{m.invalidateQueries({queryKey:R.aiProviderKeys(l.id)}),m.invalidateQueries({queryKey:R.aiProviders(l.id)}),m.invalidateQueries({queryKey:R.aiProviderModels(l.id,i.id)}),q.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=l,e[18]=i.id,e[19]=m,e[20]=n,e[21]=S):S=e[21];let P;e[22]!==n?(P=ne=>q.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=P):P=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==P?(K={mutationFn:v,onSuccess:S,onError:P},e[24]=v,e[25]=S,e[26]=P,e[27]=K):K=e[27];const{mutate:_,isPending:N}=Y(K);let F;e[28]!==y||e[29]!==C?(F=s.jsx(be,{src:C,alt:y}),e[28]=y,e[29]=C,e[30]=F):F=e[30];let w;e[31]!==o||e[32]!==n?(w=o?s.jsxs(Z,{onSelect:()=>g(!0),children:[s.jsx(dt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=o,e[32]=n,e[33]=w):w=e[33];let T,$;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=()=>c(!0),$=s.jsx(mt,{}),e[34]=T,e[35]=$):(T=e[34],$=e[35]);let E;e[36]!==n?(E=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=E):E=e[37];let I;e[38]!==N||e[39]!==E?(I=s.jsxs(Z,{variant:"destructive",disabled:N,onSelect:T,children:[$,E]}),e[38]=N,e[39]=E,e[40]=I):I=e[40];let O;e[41]!==I||e[42]!==w?(O=s.jsxs(ue,{children:[w,I]}),e[41]=I,e[42]=w,e[43]=O):O=e[43];let D;e[44]!==j||e[45]!==y||e[46]!==O||e[47]!==F?(D=s.jsx(de,{icon:F,title:y,meta:j,action:O}),e[44]=j,e[45]=y,e[46]=O,e[47]=F,e[48]=D):D=e[48];let A;e[49]!==p||e[50]!==o||e[51]!==i?(A=o?s.jsx(Ot,{providerKey:i,provider:o,open:p,onOpenChange:g}):null,e[49]=p,e[50]=o,e[51]=i,e[52]=A):A=e[52];let k;e[53]!==n?(k=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=k):k=e[54];let U;e[55]!==k?(U=s.jsx(Ve,{children:k}),e[55]=k,e[56]=U):U=e[56];let V;e[57]!==i.label?(V=s.jsxs(Ge,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let L;e[59]!==U||e[60]!==V?(L=s.jsxs(We,{children:[U,V]}),e[59]=U,e[60]=V,e[61]=L):L=e[61];let z;e[62]!==n?(z=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=z):z=e[63];let M;e[64]!==z?(M=s.jsx(Ye,{children:z}),e[64]=z,e[65]=M):M=e[65];let Q;e[66]!==_?(Q=()=>_(),e[66]=_,e[67]=Q):Q=e[67];let G;e[68]!==n?(G=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=G):G=e[69];let W;e[70]!==Q||e[71]!==G?(W=s.jsx(Je,{onClick:Q,variant:"destructive",children:G}),e[70]=Q,e[71]=G,e[72]=W):W=e[72];let te;e[73]!==M||e[74]!==W?(te=s.jsxs(Xe,{children:[M,W]}),e[73]=M,e[74]=W,e[75]=te):te=e[75];let se;e[76]!==L||e[77]!==te?(se=s.jsxs(Ze,{children:[L,te]}),e[76]=L,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==f||e[80]!==se?(ie=s.jsx(et,{open:f,onOpenChange:c,children:se}),e[79]=f,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==D||e[83]!==A||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[D,A,ie]}),e[82]=D,e[83]=A,e[84]=ie,e[85]=ae):ae=e[85],ae}function es(t){const e=t.filter(i=>lt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(o=>o.id===i.providerId)??null}))}const Ie="own-accounts";function ts(t){const e=B.c(29),{onAddKey:i}=t,o=H(),l=ot(),r=rt(),m=qt(l,r?.providers??[]);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:$t},e[0]=f):f=e[0];const c=tt(f),p=Ie;let g;e[1]!==c?(g=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=g):g=e[2];const n=it;let a;e[3]!==o?(a=o("settings.ownAccounts.title"),e[3]=o,e[4]=a):a=e[4];const d=st;let u,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(wt,{}),e[5]=u,e[6]=h,e[7]=x):(u=e[5],h=e[6],x=e[7]);const y=m.map(Ft);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(nt,{size:16})}),e[8]=C):C=e[8];let b;e[9]!==o?(b=o("settings.ownAccounts.addApiKey"),e[9]=o,e[10]=b):b=e[10];let j;e[11]!==i||e[12]!==b?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,b]}),e[11]=i,e[12]=b,e[13]=j):j=e[13];let v;e[14]!==d||e[15]!==j||e[16]!==u||e[17]!==h||e[18]!==x||e[19]!==y?(v=s.jsxs(d,{children:[u,h,x,y,j]}),e[14]=d,e[15]=j,e[16]=u,e[17]=h,e[18]=x,e[19]=y,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==a?(S=s.jsx(n,{title:a,children:v}),e[21]=n,e[22]=v,e[23]=a,e[24]=S):S=e[24];let P;return e[25]!==S||e[26]!==p||e[27]!==g?(P=s.jsx("div",{id:p,ref:g,children:S}),e[25]=S,e[26]=p,e[27]=g,e[28]=P):P=e[28],P}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ie}export{Ie as O,ts as a,es as g,bt as u};
1
+ import{c as B,b as H,j as s,I as ce,ap as Te,X as De,B as X,Z as Ae,_ as ke,an as ee,i as le,K as R,b9 as Ue,Y as Z,a9 as je,J as Ee,e3 as Oe,m as Re,a6 as oe,a as Se,q as re,e as Y,t as q,r as J,ax as Ce,x as qe,w as Fe,h as $e,v as Be,D as Le,aI as ze,aH as Me,y as Qe,aJ as He,aK as fe,aM as Ge,aL as Ve,aN as We,aO as Ye,bc as Je,aP as Xe,aQ as Ze,aR as et,l as tt,gl as st,gZ as it}from"./index-FRxLT_js.js";import{s as nt}from"./Plus-BlCDSK3_.js";import{g as lt,h as ot,f as rt}from"./use-ai-providers-BDyMN-N5.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as me}from"./badge-CFiK0EOx.js";import{c as pe,T as ge,a as he}from"./tooltip-C6OYlSV-.js";import{c as at,i as ct,b as dt}from"./Tool01-D_bTJJvK.js";import{S as ut}from"./switch-CEzsWFkp.js";import{G as ft}from"./github-icon-PNZqrJY6.js";import{s as mt}from"./Trash01-CvVvZjMc.js";import{u as pt,f as gt}from"./use-date-fns-locale-DxgiZ7Lq.js";import{g as Pe}from"./openai-compatible-presets-BKGfVqEx.js";import{s as ht}from"./Eye-NyWbd_Et.js";function de(t){const e=B.c(32),{icon:i,title:o,status:l,meta:r,summary:m,action:f,children:c}=t,p=H();let g;e[0]!==i?(g=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=g):g=e[1];let n;e[2]!==o?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:o}),e[2]=o,e[3]=n):n=e[3];let a;e[4]!==l||e[5]!==p?(a=l==="linked"&&s.jsx(me,{variant:"success",size:"sm",children:p("settings.ownAccounts.linked")}),e[4]=l,e[5]=p,e[6]=a):a=e[6];let d;e[7]!==l||e[8]!==p?(d=l==="expired"&&s.jsx(me,{variant:"warning",size:"sm",children:p("settings.ownAccounts.expired")}),e[7]=l,e[8]=p,e[9]=d):d=e[9];let u;e[10]!==n||e[11]!==a||e[12]!==d?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[n,a,d]}),e[10]=n,e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==u||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18];let y;e[19]!==m?(y=m&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:m}),e[19]=m,e[20]=y):y=e[20];let C;e[21]!==f?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:f}),e[21]=f,e[22]=C):C=e[22];let b;e[23]!==g||e[24]!==x||e[25]!==y||e[26]!==C?(b=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[g,x,y,C]}),e[23]=g,e[24]=x,e[25]=y,e[26]=C,e[27]=b):b=e[27];let j;return e[28]!==c||e[29]!==b||e[30]!==o?(j=s.jsxs("div",{role:"group","aria-label":o,children:[b,c]}),e[28]=c,e[29]=b,e[30]=o,e[31]=j):j=e[31],j}function be(t){const e=B.c(7),{src:i,alt:o}=t;if(!i){let r;e[0]!==o?(r=o.charAt(0),e[0]=o,e[1]=r):r=e[1];let m;return e[2]!==r?(m=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=m):m=e[3],m}let l;return e[4]!==o||e[5]!==i?(l=s.jsx("img",{src:i,alt:o,className:"size-5 object-contain"}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}function ue(t){const e=B.c(10),{children:i}=t,o=H();let l;e[0]!==o?(l=o("settings.ownAccounts.more"),e[0]=o,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Te,{size:16}),e[2]=r):r=e[2];let m;e[3]!==l?(m=s.jsx(De,{asChild:!0,children:s.jsx(X,{variant:"ghost",size:"icon-sm","aria-label":l,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=l,e[4]=m):m=e[4];let f;e[5]!==i?(f=s.jsx(Ae,{align:"end",children:i}),e[5]=i,e[6]=f):f=e[6];let c;return e[7]!==m||e[8]!==f?(c=s.jsxs(ke,{children:[m,f]}),e[7]=m,e[8]=f,e[9]=c):c=e[9],c}function ye(t){const e=B.c(23),{hint:i,submitLabel:o,pending:l,value:r,onChange:m,onSubmit:f,inputProps:c}=t;let p;e[0]!==f?(p=y=>{y.preventDefault(),f()},e[0]=f,e[1]=p):p=e[1];let g;e[2]!==i?(g=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=g):g=e[3];let n;e[4]!==m?(n=y=>m(y.target.value),e[4]=m,e[5]=n):n=e[5];let a;e[6]!==c||e[7]!==n||e[8]!==r?(a=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=a):a=e[9];let d;e[10]!==l||e[11]!==r?(d=r.trim().length===0||l,e[10]=l,e[11]=r,e[12]=d):d=e[12];let u;e[13]!==o||e[14]!==d?(u=s.jsx(X,{type:"submit",disabled:d,children:o}),e[13]=o,e[14]=d,e[15]=u):u=e[15];let h;e[16]!==a||e[17]!==u?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[a,u]}),e[16]=a,e[17]=u,e[18]=h):h=e[18];let x;return e[19]!==p||e[20]!==g||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:p,children:[g,h]}),e[19]=p,e[20]=g,e[21]=h,e[22]=x):x=e[22],x}const _e={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function Ne(t){const e=B.c(12),{provider:i,orgId:o,userId:l,linkedAt:r,enabled:m}=t,f=ee();let c;e[0]!==r||e[1]!==o||e[2]!==i||e[3]!==l?(c=R.subscriptionUsageSnapshot(o,l,i,r),e[0]=r,e[1]=o,e[2]=i,e[3]=l,e[4]=c):c=e[4];let p;e[5]!==i||e[6]!==f?(p=()=>f.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=f,e[7]=p):p=e[7];const g=m&&!!l;let n;return e[8]!==c||e[9]!==p||e[10]!==g?(n={queryKey:c,queryFn:p,enabled:g,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=p,e[10]=g,e[11]=n):n=e[11],le(n)}function Ke(t){const e=B.c(22),{provider:i,query:o}=t,l=H(),[r]=Ee(),m=o.data;if(o.isPending){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{className:"h-4 w-32"}),e[0]=n):n=e[0],n}if(o.isError||m?.status!=="available"){const n=_e[i];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(je,{}),e[1]=a):a=e[1];let d;e[2]!==l?(d=l("settings.subscriptionUsage.viewUsage"),e[2]=l,e[3]=d):d=e[3];let u;return e[4]!==n||e[5]!==d?(u=s.jsx(X,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[a,d]})}),e[4]=n,e[5]=d,e[6]=u):u=e[6],u}if(m.limitReached){let n;e[7]!==l?(n=l("settings.subscriptionUsage.limitReached"),e[7]=l,e[8]=n):n=e[8];let a;return e[9]!==n?(a=s.jsx(me,{variant:"destructive",size:"sm",children:n}),e[9]=n,e[10]=a):a=e[10],a}let f;e[11]!==r?(f=n=>new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(n)),e[11]=r,e[12]=f):f=e[12];const c=f;let p;if(e[13]!==c||e[14]!==l||e[15]!==m.windows){let n;e[17]!==c||e[18]!==l?(n=a=>{const d=Math.round(a.usedPercent);return s.jsxs(pe,{children:[s.jsx(ge,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(a,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(a,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,d)}%`},className:Re("h-full rounded-full",xt(d))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[d,"%"]})]})}),a.resetAt&&s.jsx(he,{children:l("settings.subscriptionUsage.resets",{date:c(a.resetAt)})})]},a.id)},e[17]=c,e[18]=l,e[19]=n):n=e[19],p=m.windows.slice(0,2).map(n),e[13]=c,e[14]=l,e[15]=m.windows,e[16]=p}else p=e[16];let g;return e[20]!==p?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:p}),e[20]=p,e[21]=g):g=e[21],g}function we(t){const e=B.c(18),{provider:i,query:o}=t,l=H(),r=o.isFetching;let m;e[0]!==o?(m=()=>{o.refetch()},e[0]=o,e[1]=m):m=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ue,{}),e[2]=f):f=e[2];let c;e[3]!==l?(c=l("settings.subscriptionUsage.refresh"),e[3]=l,e[4]=c):c=e[4];let p;e[5]!==o.isFetching||e[6]!==m||e[7]!==c?(p=s.jsxs(Z,{disabled:r,onSelect:m,children:[f,c]}),e[5]=o.isFetching,e[6]=m,e[7]=c,e[8]=p):p=e[8];const g=_e[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(je,{}),e[9]=n):n=e[9];let a;e[10]!==l?(a=l("settings.subscriptionUsage.openProvider"),e[10]=l,e[11]=a):a=e[11];let d;e[12]!==g||e[13]!==a?(d=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",children:[n,a]})}),e[12]=g,e[13]=a,e[14]=d):d=e[14];let u;return e[15]!==p||e[16]!==d?(u=s.jsxs(s.Fragment,{children:[p,d]}),e[15]=p,e[16]=d,e[17]=u):u=e[17],u}function bt(){const t=B.c(38),e=H(),{org:i}=oe(),{data:o}=Se.useSession(),l=o?.user.id??"",r=ee(),m=re();let f;t[0]!==i.id||t[1]!==l?(f=R.claudeSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=f):f=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const p=!!l;let g;t[5]!==f||t[6]!==c||t[7]!==p?(g={queryKey:f,queryFn:c,enabled:p},t[5]=f,t[6]=c,t[7]=p,t[8]=g):g=t[8];const n=le(g);let a;t[9]!==i.id||t[10]!==m||t[11]!==l?(a=async()=>{await m.cancelQueries({queryKey:R.subscriptionUsage(i.id,l,"claude")}),m.removeQueries({queryKey:R.subscriptionUsage(i.id,l,"claude")}),await m.invalidateQueries({queryKey:R.claudeSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=a):a=t[12];const d=a;let u;t[13]!==r?(u=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=u):u=t[14];let h;t[15]!==d||t[16]!==e?(h=async()=>{await d(),q.success(e("settings.claudeSubscription.connected"))},t[15]=d,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==u||t[19]!==h?(x={mutationFn:u,onSuccess:h,onError:vt},t[18]=u,t[19]=h,t[20]=x):x=t[20];const y=Y(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let b;t[23]!==d||t[24]!==e?(b=async()=>{await d(),q.success(e("settings.claudeSubscription.disconnected"))},t[23]=d,t[24]=e,t[25]=b):b=t[25];let j;t[26]!==C||t[27]!==b?(j={mutationFn:C,onSuccess:b,onError:yt},t[26]=C,t[27]=b,t[28]=j):j=t[28];const v=Y(j),S=n.data?.connected===!0,P=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let _;return t[29]!==y||t[30]!==S||t[31]!==v||t[32]!==P||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==l?(_={orgId:i.id,userId:l,status:n,connected:S,expired:P,linkedAt:K,connect:y,disconnect:v},t[29]=y,t[30]=S,t[31]=v,t[32]=P,t[33]=i.id,t[34]=n,t[35]=K,t[36]=l,t[37]=_):_=t[37],_}function yt(t){return q.error(t.message)}function vt(t){return q.error(t.message)}function jt(){const t=B.c(33),e=H(),[i,o]=J.useState(""),[l,r]=J.useState(!1),{orgId:m,userId:f,connected:c,expired:p,linkedAt:g,connect:n,disconnect:a}=bt();let d;t[0]!==c||t[1]!==g||t[2]!==m||t[3]!==f?(d={provider:"claude",orgId:m,userId:f,linkedAt:g,enabled:c},t[0]=c,t[1]=g,t[2]=m,t[3]=f,t[4]=d):d=t[4];const u=Ne(d);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let y;t[9]!==e?(y=e("settings.claudeSubscription.title"),t[9]=e,t[10]=y):y=t[10];const C=c?"linked":p?"expired":null;let b;t[11]!==c||t[12]!==u?(b=c?s.jsx(Ke,{provider:"claude",query:u}):null,t[11]=c,t[12]=u,t[13]=b):b=t[13];let j;t[14]!==c||t[15]!==a||t[16]!==l||t[17]!==e||t[18]!==u?(j=c?s.jsxs(ue,{children:[s.jsx(we,{provider:"claude",query:u}),s.jsx(Ce,{}),s.jsx(Z,{variant:"destructive",disabled:a.isPending,onSelect:()=>a.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(X,{variant:"outline",size:"sm",onClick:()=>{r(St),o("")},children:e(l?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=a,t[16]=l,t[17]=e,t[18]=u,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==l||t[23]!==e||t[24]!==i?(v=!c&&l&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:o,onSubmit:()=>n.mutate(i,{onSuccess:()=>{o(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=l,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==y||t[28]!==C||t[29]!==b||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:y,status:C,summary:b,action:j,children:v}),t[26]=x,t[27]=y,t[28]=C,t[29]=b,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=B.c(63),e=H(),{org:i}=oe(),{data:o}=Se.useSession(),l=o?.user.id??"",r=ee(),m=re(),[f,c]=J.useState(""),[p,g]=J.useState(!1);let n;t[0]!==i.id||t[1]!==l?(n=R.codexSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=n):n=t[2];let a;t[3]!==r?(a=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=a):a=t[4];const d=!!l;let u;t[5]!==n||t[6]!==a||t[7]!==d?(u={queryKey:n,queryFn:a,enabled:d},t[5]=n,t[6]=a,t[7]=d,t[8]=u):u=t[8];const h=le(u);let x;t[9]!==i.id||t[10]!==m||t[11]!==l?(x=async()=>{await m.cancelQueries({queryKey:R.subscriptionUsage(i.id,l,"codex")}),m.removeQueries({queryKey:R.subscriptionUsage(i.id,l,"codex")}),await m.invalidateQueries({queryKey:R.codexSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=x):x=t[12];const y=x;let C;t[13]!==r||t[14]!==f?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:f}),t[13]=r,t[14]=f,t[15]=C):C=t[15];let b;t[16]!==y||t[17]!==e?(b=async()=>{c(""),g(!1),await y(),q.success(e("settings.codexSubscription.connected"))},t[16]=y,t[17]=e,t[18]=b):b=t[18];let j;t[19]!==C||t[20]!==b?(j={mutationFn:C,onSuccess:b,onError:Nt},t[19]=C,t[20]=b,t[21]=j):j=t[21];const v=Y(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let P;t[24]!==y||t[25]!==e?(P=async()=>{await y(),q.success(e("settings.codexSubscription.disconnected"))},t[24]=y,t[25]=e,t[26]=P):P=t[26];let K;t[27]!==S||t[28]!==P?(K={mutationFn:S,onSuccess:P,onError:_t},t[27]=S,t[28]=P,t[29]=K):K=t[29];const _=Y(K),N=h.data?.connected===!0,F=h.data?.linkedAt??null;let w;t[30]!==N||t[31]!==i.id||t[32]!==F||t[33]!==l?(w={provider:"codex",orgId:i.id,userId:l,linkedAt:F,enabled:N},t[30]=N,t[31]=i.id,t[32]=F,t[33]=l,t[34]=w):w=t[34];const T=Ne(w);let $;t[35]!==e?($=e("settings.codexSubscription.title"),t[35]=e,t[36]=$):$=t[36];let E;t[37]!==$?(E=s.jsx(be,{src:xe.codex,alt:$}),t[37]=$,t[38]=E):E=t[38];let I;t[39]!==e?(I=e("settings.codexSubscription.title"),t[39]=e,t[40]=I):I=t[40];const O=N?"linked":null;let D;t[41]!==N||t[42]!==T?(D=N?s.jsx(Ke,{provider:"codex",query:T}):null,t[41]=N,t[42]=T,t[43]=D):D=t[43];let A;t[44]!==N||t[45]!==_||t[46]!==p||t[47]!==e||t[48]!==T?(A=N?s.jsxs(ue,{children:[s.jsx(we,{provider:"codex",query:T}),s.jsx(Ce,{}),s.jsx(Z,{variant:"destructive",disabled:_.isPending,onSelect:()=>_.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(X,{variant:"outline",size:"sm",onClick:()=>{g(Pt),c("")},children:e(p?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=_,t[46]=p,t[47]=e,t[48]=T,t[49]=A):A=t[49];let k;t[50]!==v||t[51]!==N||t[52]!==p||t[53]!==e||t[54]!==f?(k=!N&&p&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:f,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=N,t[52]=p,t[53]=e,t[54]=f,t[55]=k):k=t[55];let U;return t[56]!==E||t[57]!==I||t[58]!==O||t[59]!==D||t[60]!==A||t[61]!==k?(U=s.jsx(de,{icon:E,title:I,status:O,summary:D,action:A,children:k}),t[56]=E,t[57]=I,t[58]=O,t[59]=D,t[60]=A,t[61]=k,t[62]=U):U=t[62],U}function Pt(t){return!t}function _t(t){return q.error(t.message)}function Nt(t){return q.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function wt(){const t=B.c(72),e=H(),{org:i}=oe(),o=ee(),l=re(),[r,m]=J.useState(""),[f,c]=J.useState(!1);let p;t[0]!==i.id?(p=R.githubCopilot(i.id),t[0]=i.id,t[1]=p):p=t[1];let g;t[2]!==o?(g=()=>o.call("GITHUB_COPILOT_STATUS",{}),t[2]=o,t[3]=g):g=t[3];let n;t[4]!==p||t[5]!==g?(n={queryKey:p,queryFn:g},t[4]=p,t[5]=g,t[6]=n):n=t[6];const a=le(n);let d;t[7]!==i.id||t[8]!==l?(d=()=>l.invalidateQueries({queryKey:R.githubCopilot(i.id)}),t[7]=i.id,t[8]=l,t[9]=d):d=t[9];const u=d;let h;t[10]!==o||t[11]!==r?(h=()=>o.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=o,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==u||t[14]!==e?(x=async()=>{m(""),c(!1),await u(),q.success(e("settings.githubCopilot.connected"))},t[13]=u,t[14]=e,t[15]=x):x=t[15];let y;t[16]!==h||t[17]!==x?(y={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=y):y=t[18];const C=Y(y);let b;t[19]!==o?(b=()=>o.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=o,t[20]=b):b=t[20];let j;t[21]!==u||t[22]!==e?(j=async()=>{await u(),q.success(e("settings.githubCopilot.disconnected"))},t[21]=u,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==b||t[25]!==j?(v={mutationFn:b,onSuccess:j,onError:Dt},t[24]=b,t[25]=j,t[26]=v):v=t[26];const S=Y(v);let P;t[27]!==o?(P=W=>o.call("GITHUB_COPILOT_SHARE",{shared:W}),t[27]=o,t[28]=P):P=t[28];let K;t[29]!==u||t[30]!==P?(K={mutationFn:P,onSuccess:u,onError:Tt},t[29]=u,t[30]=P,t[31]=K):K=t[31];const _=Y(K),N=a.data?.connected===!0,F=a.data?.orgShare??null,w=F&&!F.sharedByMe?F:null,T=w?.sharedBy.name??"",$=F?.sharedByMe===!0,E=_.isPending||w!==null;let I;t[32]!==_?(I=W=>_.mutate(W),t[32]=_,t[33]=I):I=t[33];let O;t[34]!==e?(O=e("settings.githubCopilot.shareTitle"),t[34]=e,t[35]=O):O=t[35];let D;t[36]!==$||t[37]!==E||t[38]!==I||t[39]!==O?(D=s.jsx(ut,{checked:$,disabled:E,onCheckedChange:I,"aria-label":O}),t[36]=$,t[37]=E,t[38]=I,t[39]=O,t[40]=D):D=t[40];const A=D;let k;t[41]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(ft,{size:18,className:"text-foreground"}),t[41]=k):k=t[41];let U;t[42]!==e?(U=e("settings.githubCopilot.title"),t[42]=e,t[43]=U):U=t[43];const V=N?"linked":null;let L;t[44]!==w||t[45]!==T||t[46]!==e?(L=w?e(w.coversMe?"settings.githubCopilot.sharedBy":"settings.githubCopilot.ownPlanUsed",{name:T}):null,t[44]=w,t[45]=T,t[46]=e,t[47]=L):L=t[47];let z;t[48]!==N||t[49]!==w||t[50]!==A||t[51]!==T||t[52]!==e?(z=N?s.jsxs("div",{className:"flex shrink-0 items-center gap-2 text-meta",children:[s.jsx("span",{children:e("settings.githubCopilot.shareTitle")}),s.jsxs(pe,{children:[s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground","aria-label":e("settings.githubCopilot.shareDescription"),children:s.jsx(at,{size:13})})}),s.jsx(he,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}),w?s.jsxs(pe,{children:[s.jsx(ge,{asChild:!0,children:s.jsx("span",{children:A})}),s.jsx(he,{className:"max-w-64",children:e("settings.githubCopilot.shareTaken",{name:T})})]}):A]}):null,t[48]=N,t[49]=w,t[50]=A,t[51]=T,t[52]=e,t[53]=z):z=t[53];let M;t[54]!==N||t[55]!==S||t[56]!==f||t[57]!==e?(M=N?s.jsx(ue,{children:s.jsx(Z,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(X,{variant:"outline",size:"sm",onClick:()=>{c(It),m("")},children:e(f?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[54]=N,t[55]=S,t[56]=f,t[57]=e,t[58]=M):M=t[58];let Q;t[59]!==C||t[60]!==N||t[61]!==f||t[62]!==e||t[63]!==r?(Q=!N&&f&&s.jsx(ye,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:m,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[59]=C,t[60]=N,t[61]=f,t[62]=e,t[63]=r,t[64]=Q):Q=t[64];let G;return t[65]!==U||t[66]!==V||t[67]!==L||t[68]!==z||t[69]!==M||t[70]!==Q?(G=s.jsx(de,{icon:k,title:U,status:V,meta:L,summary:z,action:M,children:Q}),t[65]=U,t[66]=V,t[67]=L,t[68]=z,t[69]=M,t[70]=Q,t[71]=G):G=t[71],G}function It(t){return!t}function Tt(t){return q.error(t.message)}function Dt(t){return q.error(t.message)}function At(t){return q.error(t.message)}const kt=t=>He({label:fe().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:fe().optional(),baseUrl:fe().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:o}){return t&&!!e&&e!==i&&!o}function Et({providerKey:t,provider:e,preset:i,maskedKey:o,currentLabel:l,currentBaseUrl:r,onCancel:m,onSuccess:f}){const{org:c}=oe(),p=ee(),g=re(),n=H(),[a,d]=J.useState(!1),u=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:y,handleSubmit:C,watch:b,setError:j,formState:{errors:v}}=ze({resolver:Me(x),defaultValues:{label:l,apiKey:"",baseUrl:r??""}}),S=b("apiKey")??"",{mutate:P,isPending:K}=Y({mutationFn:async _=>{let N;_.apiKey&&(u?N=JSON.stringify({baseUrl:_.baseUrl||r||"",apiKey:_.apiKey}):N=_.apiKey),await p.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:_.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{g.invalidateQueries({queryKey:R.aiProviderKeys(c.id)}),g.invalidateQueries({queryKey:R.aiProviders(c.id)}),q.success(n("settings.editProviderDialog.providerUpdated")),f()},onError:_=>q.error(n("settings.editProviderDialog.failedToUpdate",{error:_.message}))});return s.jsxs("form",{onSubmit:C(_=>{if(Ut({isOpenAICompatible:u,baseUrl:_.baseUrl,currentBaseUrl:r,apiKey:_.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}P(_)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...y("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),u&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...y("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:a&&S?"text":"password",placeholder:o,...y("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>d(!a),"aria-label":n(a?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(ct,{size:14}):s.jsx(ht,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Qe,{children:[s.jsx(X,{type:"button",variant:"ghost",size:"sm",onClick:m,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(X,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=B.c(31),{providerKey:i,provider:o,open:l,onOpenChange:r}=t,m=H(),f=ee(),c=o.id==="openai-compatible"&&i.presetId?Pe(i.presetId):void 0,p=c?.name??o.name;let g;e[0]!==i.id?(g=R.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=g):g=e[1];let n;e[2]!==i.id||e[3]!==f?(n=()=>f.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=f,e[4]=n):n=e[4];let a;e[5]!==l||e[6]!==g||e[7]!==n?(a={queryKey:g,queryFn:n,enabled:l,staleTime:0},e[5]=l,e[6]=g,e[7]=n,e[8]=a):a=e[8];const{data:d,isLoading:u}=le(a),h=Le,x=Be,y="sm:max-w-md",C=Fe,b=qe,j=m("settings.editProviderDialog.editTitle",{name:p});let v;e[9]!==b||e[10]!==j?(v=s.jsx(b,{children:j}),e[9]=b,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let P;e[15]!==u||e[16]!==r||e[17]!==c||e[18]!==d||e[19]!==o||e[20]!==i?(P=u||!d?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx($e,{})}):s.jsx(Et,{providerKey:i,provider:o,preset:c,maskedKey:d.maskedKey,currentLabel:d.label,currentBaseUrl:d.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=u,e[16]=r,e[17]=c,e[18]=d,e[19]=o,e[20]=i,e[21]=P):P=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==P?(K=s.jsxs(x,{className:y,children:[S,P]}),e[22]=x,e[23]=S,e[24]=P,e[25]=K):K=e[25];let _;return e[26]!==h||e[27]!==r||e[28]!==l||e[29]!==K?(_=s.jsx(h,{open:l,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=l,e[29]=K,e[30]=_):_=e[30],_}function Rt(t){const e=B.c(86),{providerKey:i,provider:o}=t,{org:l}=oe(),r=ee(),m=re(),[f,c]=J.useState(!1),[p,g]=J.useState(!1),n=H(),a=pt(),d=o?.id==="openai-compatible";let u;e[0]!==d||e[1]!==i.presetId?(u=d&&i.presetId?Pe(i.presetId):void 0,e[0]=d,e[1]=i.presetId,e[2]=u):u=e[2];const h=u;let x;e[3]!==d||e[4]!==h||e[5]!==o?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:d?n("settings.aiProviders.customOpenAiCompatible"):o?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=d,e[4]=h,e[5]=o?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const y=x,C=h?.logo??o?.logo??xe[i.providerId];let b;e:{if(d){b=i.label;break e}let ne;e[9]!==a||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:a})}),e[9]=a,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],b=ne}const j=b;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==l||e[18]!==i.id||e[19]!==m||e[20]!==n?(S=()=>{m.invalidateQueries({queryKey:R.aiProviderKeys(l.id)}),m.invalidateQueries({queryKey:R.aiProviders(l.id)}),m.invalidateQueries({queryKey:R.aiProviderModels(l.id,i.id)}),q.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=l,e[18]=i.id,e[19]=m,e[20]=n,e[21]=S):S=e[21];let P;e[22]!==n?(P=ne=>q.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=P):P=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==P?(K={mutationFn:v,onSuccess:S,onError:P},e[24]=v,e[25]=S,e[26]=P,e[27]=K):K=e[27];const{mutate:_,isPending:N}=Y(K);let F;e[28]!==y||e[29]!==C?(F=s.jsx(be,{src:C,alt:y}),e[28]=y,e[29]=C,e[30]=F):F=e[30];let w;e[31]!==o||e[32]!==n?(w=o?s.jsxs(Z,{onSelect:()=>g(!0),children:[s.jsx(dt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=o,e[32]=n,e[33]=w):w=e[33];let T,$;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=()=>c(!0),$=s.jsx(mt,{}),e[34]=T,e[35]=$):(T=e[34],$=e[35]);let E;e[36]!==n?(E=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=E):E=e[37];let I;e[38]!==N||e[39]!==E?(I=s.jsxs(Z,{variant:"destructive",disabled:N,onSelect:T,children:[$,E]}),e[38]=N,e[39]=E,e[40]=I):I=e[40];let O;e[41]!==I||e[42]!==w?(O=s.jsxs(ue,{children:[w,I]}),e[41]=I,e[42]=w,e[43]=O):O=e[43];let D;e[44]!==j||e[45]!==y||e[46]!==O||e[47]!==F?(D=s.jsx(de,{icon:F,title:y,meta:j,action:O}),e[44]=j,e[45]=y,e[46]=O,e[47]=F,e[48]=D):D=e[48];let A;e[49]!==p||e[50]!==o||e[51]!==i?(A=o?s.jsx(Ot,{providerKey:i,provider:o,open:p,onOpenChange:g}):null,e[49]=p,e[50]=o,e[51]=i,e[52]=A):A=e[52];let k;e[53]!==n?(k=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=k):k=e[54];let U;e[55]!==k?(U=s.jsx(Ve,{children:k}),e[55]=k,e[56]=U):U=e[56];let V;e[57]!==i.label?(V=s.jsxs(Ge,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let L;e[59]!==U||e[60]!==V?(L=s.jsxs(We,{children:[U,V]}),e[59]=U,e[60]=V,e[61]=L):L=e[61];let z;e[62]!==n?(z=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=z):z=e[63];let M;e[64]!==z?(M=s.jsx(Ye,{children:z}),e[64]=z,e[65]=M):M=e[65];let Q;e[66]!==_?(Q=()=>_(),e[66]=_,e[67]=Q):Q=e[67];let G;e[68]!==n?(G=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=G):G=e[69];let W;e[70]!==Q||e[71]!==G?(W=s.jsx(Je,{onClick:Q,variant:"destructive",children:G}),e[70]=Q,e[71]=G,e[72]=W):W=e[72];let te;e[73]!==M||e[74]!==W?(te=s.jsxs(Xe,{children:[M,W]}),e[73]=M,e[74]=W,e[75]=te):te=e[75];let se;e[76]!==L||e[77]!==te?(se=s.jsxs(Ze,{children:[L,te]}),e[76]=L,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==f||e[80]!==se?(ie=s.jsx(et,{open:f,onOpenChange:c,children:se}),e[79]=f,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==D||e[83]!==A||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[D,A,ie]}),e[82]=D,e[83]=A,e[84]=ie,e[85]=ae):ae=e[85],ae}function es(t){const e=t.filter(i=>lt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(o=>o.id===i.providerId)??null}))}const Ie="own-accounts";function ts(t){const e=B.c(29),{onAddKey:i}=t,o=H(),l=ot(),r=rt(),m=qt(l,r?.providers??[]);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:$t},e[0]=f):f=e[0];const c=tt(f),p=Ie;let g;e[1]!==c?(g=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=g):g=e[2];const n=it;let a;e[3]!==o?(a=o("settings.ownAccounts.title"),e[3]=o,e[4]=a):a=e[4];const d=st;let u,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(wt,{}),e[5]=u,e[6]=h,e[7]=x):(u=e[5],h=e[6],x=e[7]);const y=m.map(Ft);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(nt,{size:16})}),e[8]=C):C=e[8];let b;e[9]!==o?(b=o("settings.ownAccounts.addApiKey"),e[9]=o,e[10]=b):b=e[10];let j;e[11]!==i||e[12]!==b?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,b]}),e[11]=i,e[12]=b,e[13]=j):j=e[13];let v;e[14]!==d||e[15]!==j||e[16]!==u||e[17]!==h||e[18]!==x||e[19]!==y?(v=s.jsxs(d,{children:[u,h,x,y,j]}),e[14]=d,e[15]=j,e[16]=u,e[17]=h,e[18]=x,e[19]=y,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==a?(S=s.jsx(n,{title:a,children:v}),e[21]=n,e[22]=v,e[23]=a,e[24]=S):S=e[24];let P;return e[25]!==S||e[26]!==p||e[27]!==g?(P=s.jsx("div",{id:p,ref:g,children:S}),e[25]=S,e[26]=p,e[27]=g,e[28]=P):P=e[28],P}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ie}export{Ie as O,ts as a,es as g,bt as u};
@@ -1,4 +1,4 @@
1
- import{c as $,r as z,j as l,g9 as be,b as U,av as De,m as K,a_ as gt,gc as Ve,aJ as Oe,aK as Ne,bn as ns,a6 as me,q as xt,L as lt,K as pe,gd as ot,an as as,e as ls,t as Be,i as ht,ak as os,R as rs,h as is,B as ye,b9 as bt,aj as cs,ge as us,gf as yt,a9 as ds,F as fs,C as Je,d as Qe,dO as ms,gg as rt,ew as ps,gh as gs}from"./index-DoEtSiIe.js";import{e as xs,A as Xe,ax as hs,a7 as bs,a as it,ay as ys,k as js,Z as vs,az as Ss,aA as jt,aB as ks,a6 as Ue,aC as Ns,aD as vt,aE as de,aF as we,g as ws,b as _s,aw as Ts,aG as Cs}from"./agent-icon-DoabtHNW.js";import{t as Ie,f as Is,b as $s}from"./Tool01-D90Wr5xR.js";import{i as St}from"./ArrowRight-CMJyKdyB.js";import{b as Ms,C as As,a as Ps}from"./collapsible-BdVp5Lcb.js";import{u as Es}from"./use-copy-CjEnyhFT.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-CLeyhHyT.js";import{h as Nt}from"./UserCheck01-CA8kXGn8.js";import{t as qs}from"./task-key-CajjdR3t.js";import{a as Gs}from"./use-task-board-items-BVQx7Wft.js";import{l as Ws}from"./config-BOn4tvAD.js";import{t as Vs}from"./task-route-DltlnXMA.js";import{a as Js}from"./repository-binding-BAQCDq-W.js";import{u as Me,t as Qs,g as ge}from"./utils-CVEq3hMx.js";import{i as Xs,s as Ys}from"./UserSquare-dgrNjiXb.js";import{l as Zs,c as en,r as tn,m as sn}from"./thread-intent-R2KI8ie_.js";import{f as je,y as nn,u as ve,z as an,b as ln,B as wt,E as on,F as Ae,G as rn,H as cn}from"./chat-context-vJ6R-Clt.js";import{a as Ye,u as un,b as dn}from"./shell-layout-596_q4a1.js";import{c as fn}from"./content-blocks-o63cs2vh.js";import{M as mn}from"./mcp-app-renderer-pvE5c1WF.js";import{g as _t}from"./types-rurFGFZy.js";import{o as pn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as Tt,a as Ct,c as It}from"./tooltip-DhlWzeQv.js";import{c as gn,u as xn,a as hn}from"./use-mcp-client-86j-Nolb.js";import{s as $t,g as Mt,a as At}from"./gateway-client-C5MrdR_p.js";import{i as Pt}from"./AlertCircle-GoAGGV0G.js";import{s as bn}from"./Eye-DwRCQHLk.js";import{s as yn}from"./XClose-BUxhnZ3x.js";import{n as He}from"./BookOpen01-DZs1-yi9.js";import{s as jn}from"./File02-Y4Nh84qP.js";import{i as vn}from"./SearchMd-BGRe_18c.js";import{a as Ze}from"./use-panel-navigate-DHff9CS9.js";import{a as _e}from"./Image01-BRABRo3v.js";import{b as Et}from"./use-entitlements-4v7LU4jM.js";import{I as Sn,M as Lt}from"./markdown-DeZATUv_.js";import{c as kn,S as Nn,a as wn,b as _n}from"./sheet-De8qzGNI.js";import{I as Se}from"./integration-icon-DvT6X8cI.js";import{u as Rt}from"./use-connection-BO-ZUzee.js";import{u as zt}from"./use-navigate-to-agent-C-BC28kE.js";import{g as Tn}from"./use-mcp-prompts-CPXLXWTp.js";import{t as Cn}from"./ChevronDown-Dm2xO7jf.js";import{i as In}from"./Monitor01-DUhT2Mcw.js";import{a as $n}from"./use-thread-outputs-BnMyEJ2l.js";import{F as Mn}from"./file-type-icon-R4tsODq6.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}=Gs();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=Ws(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=Zs(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 Gn(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 Wn=2e4;function Vn(s){const e=$.c(9),{startedAt:t}=s,n=U(),a=Ye(1e3),o=je(),i=(t!==null?a-t:0)>=Wn;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(`
1
+ import{c as $,r as z,j as l,g9 as be,b as U,av as De,m as K,a_ as gt,gc as Ve,aJ as Oe,aK as Ne,bn as ns,a6 as me,q as xt,L as lt,K as pe,gd as ot,an as as,e as ls,t as Be,i as ht,ak as os,R as rs,h as is,B as ye,b9 as bt,aj as cs,ge as us,gf as yt,a9 as ds,F as fs,C as Je,d as Qe,dO as ms,gg as rt,ew as ps,gh as gs}from"./index-FRxLT_js.js";import{e as xs,A as Xe,ax as hs,a7 as bs,a as it,ay as ys,k as js,Z as vs,az as Ss,aA as jt,aB as ks,a6 as Ue,aC as Ns,aD as vt,aE as de,aF as we,g as ws,b as _s,aw as Ts,aG as Cs}from"./agent-icon-qKbICqBE.js";import{t as Ie,f as Is,b as $s}from"./Tool01-D_bTJJvK.js";import{i as St}from"./ArrowRight-CTIzvrRD.js";import{b as Ms,C as As,a as Ps}from"./collapsible-BKxoPjIN.js";import{u as Es}from"./use-copy-nYlH4I4g.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-X4jMwPwX.js";import{h as Nt}from"./UserCheck01-B7Ux1cXt.js";import{t as qs}from"./task-key-BWDMUi9g.js";import{a as Gs}from"./use-task-board-items-BbyDm5G0.js";import{l as Ws}from"./config-DGvqEncS.js";import{t as Vs}from"./task-route-Cr6uckKl.js";import{a as Js}from"./repository-binding-DjFY5b0y.js";import{u as Me,t as Qs,g as ge}from"./utils-CVEq3hMx.js";import{i as Xs,s as Ys}from"./UserSquare-fSKR9s5Z.js";import{l as Zs,c as en,r as tn,m as sn}from"./thread-intent-CoFgTbor.js";import{f as je,y as nn,u as ve,z as an,b as ln,B as wt,E as on,F as Ae,G as rn,H as cn}from"./chat-context-CvQ-sM5v.js";import{a as Ye,u as un,b as dn}from"./shell-layout-B7ONrK1S.js";import{c as fn}from"./content-blocks-o63cs2vh.js";import{M as mn}from"./mcp-app-renderer-BAfMgB1Z.js";import{g as _t}from"./types-cOzCnmYI.js";import{o as pn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as Tt,a as Ct,c as It}from"./tooltip-C6OYlSV-.js";import{c as gn,u as xn,a as hn}from"./use-mcp-client-rOHZbD3Y.js";import{s as $t,g as Mt,a as At}from"./gateway-client-BYWq7W1f.js";import{i as Pt}from"./AlertCircle-CS5y5cdF.js";import{s as bn}from"./Eye-NyWbd_Et.js";import{s as yn}from"./XClose-BvzwUB-E.js";import{n as He}from"./BookOpen01-0vmOJP7K.js";import{s as jn}from"./File02-B0o8Z6Rd.js";import{i as vn}from"./SearchMd-B2ZqlWzx.js";import{a as Ze}from"./use-panel-navigate-DRtgWUMv.js";import{a as _e}from"./Image01-Xgs_5RZR.js";import{b as Et}from"./use-entitlements-CmxoG1H2.js";import{I as Sn,M as Lt}from"./markdown-we-cHxXq.js";import{c as kn,S as Nn,a as wn,b as _n}from"./sheet-Dps_OtzY.js";import{I as Se}from"./integration-icon-BTN_yWEk.js";import{u as Rt}from"./use-connection-DoUaPNkI.js";import{u as zt}from"./use-navigate-to-agent-CoxxT5G0.js";import{g as Tn}from"./use-mcp-prompts-Cq6mpthN.js";import{t as Cn}from"./ChevronDown-BkddO6nk.js";import{i as In}from"./Monitor01-BnNa35fy.js";import{a as $n}from"./use-thread-outputs-OIyH_XWf.js";import{F as Mn}from"./file-type-icon-CEKCIITa.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}=Gs();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=Ws(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=Zs(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 Gn(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 Wn=2e4;function Vn(s){const e=$.c(9),{startedAt:t}=s,n=U(),a=Ye(1e3),o=je(),i=(t!==null?a-t:0)>=Wn;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
2
  `).trim().split(`
3
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
4
 
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-BwfJ8i7M.js","assets/index-DoEtSiIe.js","assets/index-DOMlzk_A.css","assets/editor-UaRoONxx.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
- import{r as R,bb as Ue,c as W,b as X,m as ne,j as s,B as K,b8 as ye,h as je,I as ge,t as Pe,a_ as ve,a9 as Oe,bA as Ke,n as We,bB as ce,bC as Ge,e as qe,br as Se,bD as xe,bo as Te,bp as He,bq as he}from"./index-DoEtSiIe.js";import{C as Ye,c as Xe,a as Qe,S as Ze,M as es,v as ss}from"./held-block-view-CRIGJWyy.js";import{b as Le}from"./use-never-published-C4cAqdmZ.js";import{c as ts,u as ns}from"./hosted-reconcile-CTronLZo.js";import{b as ls,a as as}from"./repository-binding-BAQCDq-W.js";import{b as $e}from"./UserCheck01-CA8kXGn8.js";import{L as Ae,e as os,V as rs,_ as is}from"./agent-icon-DoabtHNW.js";import{c as cs}from"./Tool01-D90Wr5xR.js";import{i as ds}from"./SearchMd-BGRe_18c.js";import{L as _e}from"./label-G4Rj_cXa.js";import{S as us}from"./switch-C5tCt-1T.js";import{T as fs}from"./textarea-CP9TQ5HN.js";import{u as ms}from"./use-copy-CjEnyhFT.js";import{D as ps}from"./section-array-field-yz7QHNSD.js";import{a2 as xs,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-B-FDGvtN.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-CTy1iAF5.js";import{X as Ss}from"./category-tree-CW0acTf_.js";import{i as Ts}from"./ChevronSelectorVertical-Cvgyclsz.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-D5O7M-Cf.js";import{a as Rs,b as Ps,P as Os}from"./popover-mrQ4T9ru.js";import{u as Ls}from"./chat-context-vJ6R-Clt.js";import{a as $s}from"./MessageCircle01-zc37Krdu.js";import{i as As}from"./Play-C_9Fb_Ik.js";import{S as zs}from"./scroll-area-KLotig-P.js";import{c as ue,T as fe,a as me}from"./tooltip-DhlWzeQv.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-BwfJ8i7M.js";import{S as Is}from"./save-status-CQe-z40L.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-BwfJ8i7M.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:r}=ms();let i;e[0]!==n?(i=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=i):i=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 p;e[3]!==t?(p=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=p):p=e[4];let b;e[5]!==p?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:p}),e[5]=p,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 x;e[9]!==h?(x=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=x):x=e[10];let y;e[11]!==b||e[12]!==x?(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,x]})]}),e[11]=b,e[12]=x,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]!==r?(d=r?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=r,e[19]=d):d=e[19];let u;e[20]!==r||e[21]!==t?(u=t(r?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=r,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]!==r||e[28]!==t?(g=r?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=r,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:ps,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]!==i||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:i,children:[y,C]}),e[52]=i,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-B5PTOxIz.js","assets/index-FRxLT_js.js","assets/index-DOMlzk_A.css","assets/editor-DpPPqPRR.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
+ import{r as R,bb as Ue,c as W,b as X,m as ne,j as s,B as K,b8 as ye,h as je,I as ge,t as Pe,a_ as ve,a9 as Oe,bA as Ke,n as We,bB as ce,bC as Ge,e as qe,br as Se,bD as xe,bo as Te,bp as He,bq as he}from"./index-FRxLT_js.js";import{C as Ye,c as Xe,a as Qe,S as Ze,M as es,v as ss}from"./held-block-view-CPPtRU-n.js";import{b as Le}from"./use-never-published-ZzuVsx8k.js";import{c as ts,u as ns}from"./hosted-reconcile-DEHcrXPf.js";import{b as ls,a as as}from"./repository-binding-DjFY5b0y.js";import{b as $e}from"./UserCheck01-B7Ux1cXt.js";import{L as Ae,e as os,V as rs,_ as is}from"./agent-icon-qKbICqBE.js";import{c as cs}from"./Tool01-D_bTJJvK.js";import{i as ds}from"./SearchMd-B2ZqlWzx.js";import{L as _e}from"./label-DKoCaul6.js";import{S as us}from"./switch-CEzsWFkp.js";import{T as fs}from"./textarea-Cipr2aDL.js";import{u as ms}from"./use-copy-nYlH4I4g.js";import{D as ps}from"./section-array-field-D4XW_wJ4.js";import{a2 as xs,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-D2oMdvIY.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-DC7kOtf6.js";import{X as Ss}from"./category-tree-dngYOFzN.js";import{i as Ts}from"./ChevronSelectorVertical-B_EPXu-J.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-Cqqhh_W6.js";import{a as Rs,b as Ps,P as Os}from"./popover-BI-lpUhu.js";import{u as Ls}from"./chat-context-CvQ-sM5v.js";import{a as $s}from"./MessageCircle01-BoiiT0Ka.js";import{i as As}from"./Play-DYcX2TsV.js";import{S as zs}from"./scroll-area-BBpO5xX_.js";import{c as ue,T as fe,a as me}from"./tooltip-C6OYlSV-.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-B5PTOxIz.js";import{S as Is}from"./save-status-DbwiLwGt.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-B5PTOxIz.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:r}=ms();let i;e[0]!==n?(i=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=i):i=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 p;e[3]!==t?(p=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=p):p=e[4];let b;e[5]!==p?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:p}),e[5]=p,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 x;e[9]!==h?(x=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=x):x=e[10];let y;e[11]!==b||e[12]!==x?(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,x]})]}),e[11]=b,e[12]=x,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]!==r?(d=r?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=r,e[19]=d):d=e[19];let u;e[20]!==r||e[21]!==t?(u=t(r?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=r,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]!==r||e[28]!==t?(g=r?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=r,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:ps,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]!==i||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:i,children:[y,C]}),e[52]=i,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[r]=R.useState(a);let i;return e[2]!==l||e[3]!==r||e[4]!==t||e[5]!==n?(i=r?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]=r,e[4]=t,e[5]=n,e[6]=i):i=e[6],i}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=X(),[r,i]=R.useState(String(n));let f;e[0]!==r?(f=Ee(r),e[0]=r,e[1]=f):f=e[1];const p=f===null;let b;e[2]!==t?(b=m=>{i(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]!==p||e[6]!==b||e[7]!==r?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:r,"aria-invalid":p,onChange:b}),e[4]=l,e[5]=p,e[6]=b,e[7]=r,e[8]=h):h=e[8];let x;e[9]!==p||e[10]!==a?(x=p&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=p,e[10]=a,e[11]=x):x=e[11];let y;return e[12]!==h||e[13]!==x?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,x]}),e[12]=h,e[13]=x,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:r}=o,i=X();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const p=f;if(typeof n=="boolean"){let m;e[2]!==p||e[3]!==l?(m=s.jsx(_e,{htmlFor:p,className:"min-w-0 truncate",children:l}),e[2]=p,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==r||e[6]!==t?(d=g=>r(t,g),e[5]=r,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==p||e[9]!==d||e[10]!==n?(u=s.jsx(us,{id:p,checked:n,onCheckedChange:d}),e[8]=p,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]!==p||e[16]!==l?(m=s.jsx(_e,{htmlFor:p,className:"min-w-0 truncate",children:l}),e[15]=p,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==p||e[19]!==r||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:p,value:n,onChange:c=>r(t,c)}):s.jsx(Ks,{id:p,value:n,onChange:c=>r(t,c)}),e[18]=p,e[19]=r,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]!==r||e[29]!==t||e[30]!==i||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,i),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]!==i||e[42]!==n?(_=Array.isArray(n)?i("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=i,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:i("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:r},O)}),e[26]=a,e[27]=l,e[28]=r,e[29]=t,e[30]=i,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]!==i?(h=i("sandbox.schemaless.notSet"),e[60]=i,e[61]=h):h=e[61];let x;e[62]!==h?(x=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=x):x=e[63];let y;return e[64]!==b||e[65]!==x?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,x]}),e[64]=b,e[65]=x,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 qs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=X(),[r,i]=R.useState(()=>(t?.(o),e)),[f,p]=R.useState(0),[b,h]=R.useState(null),[x,y]=R.useState(!1),m=v=>{i(v),l(o,v)},d=typeof r.__resolveType=="string"?r.__resolveType:null,u=Object.entries(r).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),p(v=>v+1)):h(JSON.stringify(r,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(r,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[x&&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 Hs(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:r,v8:i,copyEpochOf:f,site:p,initialKey:b,compact:h}=o,x=i===void 0?!1:i,y=p===void 0?null:p,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]!==x?(E=A=>{A!==c&&(t?.(),!x&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=x,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),!x&&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=xs(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(Ys),pe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const ie=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==ie?(C=ne("flex min-h-0 flex-col",ie),e[21]=ie,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 H;e[25]!==u?(H=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=H):H=e[26];let Y;e[27]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=Y):Y=e[28],e[29]!==j||e[30]!==H||e[31]!==Y?(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:H,"aria-label":Y,className:"pl-8"})]})}),e[29]=j,e[30]=H,e[31]=Y,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=pe===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]!==x?(L=c&&te(T)?s.jsx(qs,{blockKey:c,block:T,onOpenBlock:x?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]=x,e[50]=L):L=e[50];const Q=L;let Z;e[51]!==Q||e[52]!==c||e[53]!==x||e[54]!==r?(Z=x&&c&&r?r(c,Q):Q,e[51]=Q,e[52]=c,e[53]=x,e[54]=r,e[55]=Z):Z=e[55];const ee=Z;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 re=!d&&ee;let q;e[64]!==V||e[65]!==re?(q=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,re]}),e[64]=V,e[65]=re,e[66]=q):q=e[66];let le;return e[67]!==G||e[68]!==q?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,q]}),e[67]=G,e[68]=q,e[69]=le):le=e[69],le}function Ys(o){return o.blocks.length>0}function At(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:r,compact:i}=o,f=ls(n)?.metadata;let p;e[0]!==f?(p=Ke(f),e[0]=f,e[1]=p):p=e[1];const b=p;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 x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x={holdsCopy:!0},e[6]=x):x=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,x);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(Ye,{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]!==i||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==r||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Hs,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:r,compact:i}),e[24]=i,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=r,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:r}=o,i=X(),[f,p]=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 x;e[5]!==h?.name||e[6]!==i?(x=h?.name??i("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=i,e[7]=x):x=e[7];let y;e[8]!==x?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:x}),e[8]=x,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]!==r||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:r,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=r,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]!==i?(j=i("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=i,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]!==i?(E=i("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=i,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]!==i?(S=i("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=i,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),p(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==i?(_=i("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=i,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),p(!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:p,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 Qs(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 r;e[3]!==a?(r={onSelect:a},e[3]=a,e[4]=r):r=e[4];let i;if(e[5]!==l||e[6]!==n){let p;e[8]!==n?(p=(b,h)=>({key:`block-${h}`,label:Xe(b),onSelect:()=>n(h)}),e[8]=n,e[9]=p):p=e[9],i=l.map(p),e[5]=l,e[6]=n,e[7]=i}else i=e[7];let f;return e[10]!==r||e[11]!==i?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:r,items:i}),e[10]=r,e[11]=i,e[12]=f):f=e[12],f}const Zs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Zs[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 r of Object.keys(a))l.add(r);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,r]of Object.entries(l))if(a.includes(e))for(const i of Object.keys(r))t.add(i);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const r=gs(a,o);if(r.hidden)continue;const i=r.title&&r.title!==a?r.title:ce(a);n.push({resolveType:a,title:i})}return n.sort((a,r)=>a.title.localeCompare(r.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 r=a,i=r.__resolveType;typeof i=="string"&&(ze.has(i)||Je.has(Ne(i))||Ve(o,i,l)&&n.push({key:t,resolveType:i,title:typeof r.name=="string"&&r.name?r.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??{},r=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:r}}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(i){throw i instanceof DOMException&&i.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):i}const t=await n.text();let a=null,r=!1;try{a=t?JSON.parse(t):null,r=!0}catch{}if(!n.ok){const i=r&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(i)}return r?a:t}function rt(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],qe(l)}function Wt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:r,target:i,initialValue:f,isCreating:p,onCreate:b,onSaveReferencedBlock:h,onBack:x,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=Qe(i.resolveType,t),k=!E&&ks(i.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),[Q,Z]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:re,flush:q,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:i.mode==="saved"}),A=rt({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{q()},[]);const F=et(r),pe=i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??i.resolveType,ie={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),i.mode==="saved"&&re(i.blockKey,{__resolveType:i.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},H=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)}},Y=async z=>{const oe=ss(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:i.resolveType,..._}),L(!1)},M=()=>{Z(!0),A.mutate({resolveType:i.resolveType,props:_})},U=()=>{n&&window.open(at(n,i.resolveType,_,Date.now()),"_blank","noopener")},De=[i.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(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:x}),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:[x&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:x,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),i.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")]}),i.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:p,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(rs,{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:i.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:pe,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",Q&&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(Ze,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:ie},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:H,onSave:z=>{H(z),q()}})})]})]}),Q&&s.jsx(it,{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:()=>{Z(!1),G(!1)}})]}),s.jsx(es,{open:I,onOpenChange:L,defaultBlockId:"",isPending:p,onSubmit:Y})]})}function it(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:r,onClose:i}=o,f=X();let p;e[0]!==n.data?(p=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=p):p=e[1];const b=p,h=t?"flex-1":"h-[45%] shrink-0";let x;e[2]!==h?(x=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=x):x=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]!==r||e[9]!==l||e[10]!==f?(d=r&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"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]=r,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(is,{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]!==i||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":k,children:S}),e[33]=i,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]!==x?(C=s.jsxs("div",{className:x,children:[w,T]}),e[50]=w,e[51]=T,e[52]=x,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??"",r=Se(a);if(!r&&a!==""&&xe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const i=r?n.section:void 0,f=r?i?.__resolveType??"":a;if(Te(f,l)){const b=r?i:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&He(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!==""&&xe(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 x=he(h[0],l)?.__resolveType,y=x?ce(x):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:r}}const p=r?n.section?.__resolveType??a:a;return r&&p!==""&&xe(p)&&p in e?{index:t,resolveType:a,label:be(p,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(p)||`Section ${t+1}`,isLazy:r}})}function qt(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,Qs as f,zt as g,Vt as h,Ut as l,Jt as m,qt as n,Gt as p,Kt as r};
@@ -0,0 +1 @@
1
+ import{c as m,j as i}from"./index-FRxLT_js.js";import{ChatLayout as p}from"./index-oOJhkPK6.js";import{C as e,P as a}from"./plan-page-B07fHd07.js";import{u as n}from"./use-organization-settings-BQz13Hmn.js";import"./use-mobile-eRuVOAzy.js";import"./tooltip-C6OYlSV-.js";import"./index-D9pnpNHk.js";import"./MessageCircle01-BoiiT0Ka.js";import"./XClose-BvzwUB-E.js";import"./thread-button-DEmMau3d.js";import"./use-sidebar-collapsed-Cvh_KEOx.js";import"./sheet-Dps_OtzY.js";import"./use-chat-layout-state-D4d4l3oL.js";import"./use-panel-navigate-DRtgWUMv.js";import"./thread-route-TTLcBPLy.js";import"./use-project-scope-BEEh5L8P.js";import"./repository-binding-DjFY5b0y.js";import"./use-mcp-client-rOHZbD3Y.js";import"./auth-AT-S53oU.js";import"./toolbar-icon-button-DnvtDhiO.js";import"./use-in-settings-CG5n8E8Q.js";import"./resizable-BL8CU-aJ.js";import"./route-page-header-D4_8Ct3f.js";import"./LayoutLeft-ww8XIIKY.js";import"./use-current-view-1HEoI3qR.js";import"./agent-icon-qKbICqBE.js";import"./AlertCircle-CS5y5cdF.js";import"./UserCheck01-B7Ux1cXt.js";import"./Tool01-D_bTJJvK.js";import"./ArrowUp-B_rPxUl3.js";import"./ArrowLeft-CnpYebJt.js";import"./ArrowRight-CTIzvrRD.js";import"./BookOpen01-0vmOJP7K.js";import"./Globe04-Bu51hlDK.js";import"./CheckCircle-CVSsEuJs.js";import"./ChevronDown-BkddO6nk.js";import"./ChevronSelectorVertical-B_EPXu-J.js";import"./ChevronUp-hmtO7NfN.js";import"./UserSquare-fSKR9s5Z.js";import"./LinkBroken01-CothmVOv.js";import"./CreditCard01-CYAMo28t.js";import"./File02-B0o8Z6Rd.js";import"./SwitchHorizontal01-B9krqVlE.js";import"./Eye-NyWbd_Et.js";import"./Fingerprint04-DFly9X11.js";import"./Image01-Xgs_5RZR.js";import"./Key01-B6wydByr.js";import"./Minus-DjGZhteG.js";import"./Monitor01-BnNa35fy.js";import"./Sun-C31h0XVy.js";import"./Play-DYcX2TsV.js";import"./Plus-BlCDSK3_.js";import"./SearchMd-B2ZqlWzx.js";import"./ShoppingBag01-CO-Ik7_a.js";import"./Trash01-CvVvZjMc.js";import"./Upload01-DAa882sM.js";import"./Users01-CYXQ60-Z.js";import"./Zap-BALSokOc.js";import"./badge-CFiK0EOx.js";import"./chat-context-CvQ-sM5v.js";import"./use-view-draft-kind-BaIs6zLO.js";import"./use-blog-view-DhODFkA8.js";import"./thread-intent-CoFgTbor.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DGsiEkeQ.js";import"./task-board-B_oKjzEP.js";import"./schema-DFMNr5Cf.js";import"./session-runtime-CVF2LvNW.js";import"./use-entitlements-CmxoG1H2.js";import"./use-ai-providers-BDyMN-N5.js";import"./use-decopilot-events-B-T0Hrvx.js";import"./use-org-fs-Bjw5czAm.js";import"./useInfiniteQuery-D_gObArx.js";import"./infiniteQueryObserver-CZ7GCbwa.js";import"./textarea-Cipr2aDL.js";import"./shell-layout-B7ONrK1S.js";import"./use-deployment-admin-BmC0uFFM.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-QAyxiINx.js";import"./command-Cqqhh_W6.js";import"./index-CdR9qfQl.js";import"./integration-icon-BTN_yWEk.js";import"./project-icon-piFAIvmP.js";import"./use-navigate-to-agent-CoxxT5G0.js";import"./use-debounced-value-ZpPSvQwP.js";import"./new-project-dialog-HgjtDq4l.js";import"./label-DKoCaul6.js";import"./repository-picker-BHJB5432.js";import"./github-icon-PNZqrJY6.js";import"./collection-search-CphnxlYD.js";import"./new-project-store-CKvMs4hG.js";import"./legacy-admin-welcome-dialog-B3iJcsKr.js";import"./drawer-DtT_qu3U.js";import"./required-auth-layout-ChAYpVpn.js";import"./use-org-sso-CFsTaV-A.js";import"./index-UwOo6lse.js";import"./input-DS1fkrsU.js";import"./usage-stats-X4jMwPwX.js";import"./utils-CVEq3hMx.js";import"./markdown-we-cHxXq.js";import"./use-copy-nYlH4I4g.js";import"./gateway-client-BYWq7W1f.js";import"./form-eUXxZ5Qg.js";import"./icon-button-CfgrKbmG.js";import"./file-type-icon-CEKCIITa.js";import"./chat-draft-CPECGWWa.js";import"./use-voice-input-IeU241I1.js";import"./popover-BI-lpUhu.js";import"./index-BUHQM-fc.js";import"./checkbox-DR7-Iy_E.js";import"./select-D5aPAOxI.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-JKAPr-O4.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DcRWtP9o.js";import"./toggle-group-4Uqc6vzQ.js";import"./input-B0jMF0e_.js";import"./suggestion-SjSKJeBU.js";import"./use-mcp-prompts-Cq6mpthN.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DF7aqMQM.js";import"./plan-ladder-aYguFL8S.js";import"./add-connection-dialog-DYa3N2eg.js";import"./extract-connection-data-DjE1yVUY.js";import"./metadata-D72DunRR.js";import"./connection-BZJlBrLd.js";import"./url-slug-DgA17VrJ.js";import"./connection-card-B8Lj_r0P.js";import"./connection-slug-DOi8cWyk.js";import"./use-connection-DoUaPNkI.js";import"./schema-D1mfj_VD.js";import"./connection-form-helpers-veDVCb9w.js";import"./authenticate-and-persist-oauth-BOJ6RO7H.js";import"./mcp-oauth-Ds0j31F2.js";import"./mcp-oauth-Ci6yqFTl.js";import"./collection-tabs-C9T1HZQP.js";import"./use-infinite-scroll-DxkQp5Qv.js";import"./useSuspenseInfiniteQuery-DTGymExJ.js";import"./use-task-board-items-BbyDm5G0.js";import"./pair-DhT-6yBR.js";import"./collapsible-BKxoPjIN.js";import"./task-key-BWDMUi9g.js";import"./config-DGvqEncS.js";import"./task-route-Cr6uckKl.js";import"./project-index-C209sCKL.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BAfMgB1Z.js";import"./types-cOzCnmYI.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-OIyH_XWf.js";import"./content-changes-CFJfbWRJ.js";import"./agent-capabilities-B0JydJjP.js";import"./use-date-fns-locale-DxgiZ7Lq.js";function mr(){const o=m.c(2),r=n("plan_page_enabled");let t;return o[0]!==r?(t=i.jsx(p.Content,{children:r?i.jsx(a,{}):i.jsx(e,{kind:"plan"})}),o[0]=r,o[1]=t):t=o[1],t}export{mr as default};
@@ -1 +1 @@
1
- import{c as f,a6 as g,an as P,K as _,i as y,m as h,j as d}from"./index-DoEtSiIe.js";import{u as A}from"./use-entitlements-4v7LU4jM.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,an as P,K as _,i as y,m as h,j as d}from"./index-FRxLT_js.js";import{u as A}from"./use-entitlements-CmxoG1H2.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{c as T,b as L,j as n,n as Q,m as V,r as G,B as F,aJ as te,aK as X,bn as Se,ct as _e,bF as ke,an as Pe,a6 as Ce,E as Y,ex as pe,a as Ie,av as Ae,t as $e}from"./index-DoEtSiIe.js";import{o as De,bp as Ee,a as qe,aq as Te}from"./agent-icon-DoabtHNW.js";import{i as ie,s as Me}from"./UserSquare-dgrNjiXb.js";import{B as xe}from"./badge-DONoxQO7.js";import{i as Re}from"./ArrowLeft-DuGHc_Gh.js";import{i as le}from"./ArrowRight-CMJyKdyB.js";import{a7 as Oe,a8 as q,a9 as ze,c as ge,aa as Be,ab as Fe,ac as Ge,ad as Le,ae as Ke}from"./chat-context-vJ6R-Clt.js";import{T as ae}from"./textarea-CP9TQ5HN.js";import{a as Ue}from"./shell-layout-596_q4a1.js";import"./index-BTNa7cC6.js";import{g as he,h as Xe,i as He}from"./use-organization-settings-CgKOO7Ms.js";import{d as oe}from"./delay-CnY5UFtP.js";import{u as Je,f as We}from"./use-date-fns-locale-DQRGqxvr.js";import{u as Qe}from"./use-org-fs-C62_MbqW.js";import{P as Ye}from"./schema-CG6ylG0z.js";const Ve={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:ie,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:De,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:Ee,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function Ze(t){const e=T.c(4),{className:l}=t;let a;e[0]!==l?(a=V("block h-2 rounded-full bg-muted",l),e[0]=l,e[1]=a):a=e[1];let s;return e[2]!==a?(s=n.jsx("span",{className:a}),e[2]=a,e[3]=s):s=e[3],s}const et=[{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 tt(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col gap-5",children:et.map(st)}),t[0]=e):e=t[0],e}function st(t){return n.jsxs("div",{className:"flex flex-col gap-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:n.jsx(ie,{size:14})}),n.jsx(Ze,{className:t.title}),n.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:t.value})]}),n.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:V("h-full rounded-full",t.fill,t.tone)})})]},t.value)}function ts(t){const e=T.c(30),{kind:l}=t,a=L(),s=Ve[l];let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[i,n.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:n.jsx(tt,{})})]}),e[1]=r):r=e[1];let d;e[2]!==a?(d=a("home.comingSoon.badge"),e[2]=a,e[3]=d):d=e[3];let o;e[4]!==d?(o=n.jsx(xe,{variant:"muted",children:d}),e[4]=d,e[5]=o):o=e[5];let u;e[6]!==s.heading||e[7]!==a?(u=a(s.heading),e[6]=s.heading,e[7]=a,e[8]=u):u=e[8];let c;e[9]!==u?(c=n.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:u}),e[9]=u,e[10]=c):c=e[10];let m;e[11]!==s.description||e[12]!==a?(m=a(s.description),e[11]=s.description,e[12]=a,e[13]=m):m=e[13];let p;e[14]!==m?(p=n.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:m}),e[14]=m,e[15]=p):p=e[15];let f;e[16]!==o||e[17]!==c||e[18]!==p?(f=n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,c,p]}),e[16]=o,e[17]=c,e[18]=p,e[19]=f):f=e[19];let x;if(e[20]!==s.points||e[21]!==a){let b;e[23]!==a?(b=j=>{const{Icon:w,labelKey:y,tone:E}=j;return n.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[n.jsx("span",{className:V("flex size-9 shrink-0 items-center justify-center rounded-lg",E),children:n.jsx(w,{size:18})}),n.jsx("span",{className:"text-sm text-foreground",children:a(y)})]},y)},e[23]=a,e[24]=b):b=e[24],x=s.points.map(b),e[20]=s.points,e[21]=a,e[22]=x}else x=e[22];let g;e[25]!==x?(g=n.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:x}),e[25]=x,e[26]=g):g=e[26];let h;return e[27]!==g||e[28]!==f?(h=n.jsx(Q,{children:n.jsx(Q.Content,{children:n.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:[r,f,g]})})}),e[27]=g,e[28]=f,e[29]=h):h=e[29],h}const nt=["plan.guide.thinking1","plan.guide.thinking2","plan.guide.thinking3","plan.guide.thinking4","plan.guide.thinking5","plan.guide.thinking6","plan.guide.thinking7","plan.guide.thinking8"],it=["plan.guide.building1","plan.guide.building2","plan.guide.building3","plan.guide.building4","plan.guide.building5","plan.guide.building6","plan.guide.building7","plan.guide.building8","plan.guide.building17","plan.guide.building9","plan.guide.building10","plan.guide.building11","plan.guide.building12","plan.guide.building13","plan.guide.building14","plan.guide.building15","plan.guide.building16"],ne=7e3,lt=5e3,ce=Oe.length;function de(t){const e=T.c(19),{phrases:l,offset:a,building:s,filled:i}=t,r=s===void 0?!1:s,d=L(),o=Ue(ne),u=l[(Math.floor(o/ne)+a)%l.length];let c;e[0]!==r||e[1]!==i?(c=r?n.jsx("div",{className:"plan-guide-tiles","aria-hidden":"true",children:Array.from({length:ce},(b,j)=>n.jsx("span",{"data-tile":i===void 0?void 0:j<i?"filled":"waiting",style:{animationDelay:`${j*90}ms`}},j))}):n.jsxs("div",{className:"plan-guide-dots","aria-hidden":"true",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]}),e[0]=r,e[1]=i,e[2]=c):c=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={animationDelay:`${ne-lt}ms`},e[3]=m):m=e[3];let p;e[4]!==u||e[5]!==d?(p=d(u),e[4]=u,e[5]=d,e[6]=p):p=e[6];let f;e[7]!==p?(f=n.jsx("span",{className:"plan-guide-shimmer",style:m,children:p}),e[7]=p,e[8]=f):f=e[8];let x;e[9]!==u||e[10]!==f?(x=n.jsx("p",{className:"plan-guide-reveal text-base",children:f},u),e[9]=u,e[10]=f,e[11]=x):x=e[11];let g;e[12]!==i||e[13]!==d?(g=i!==void 0&&i>0&&n.jsx("p",{className:"text-xs text-muted-foreground",children:d("plan.case.buildingProgress",{filled:i,total:ce})}),e[12]=i,e[13]=d,e[14]=g):g=e[14];let h;return e[15]!==c||e[16]!==x||e[17]!==g?(h=n.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center gap-5 animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[c,x,g]}),e[15]=c,e[16]=x,e[17]=g,e[18]=h):h=e[18],h}function at({text:t,delay:e}){return t.split(/\s+/).map((l,a)=>n.jsxs(G.Fragment,{children:[n.jsx("span",{className:"plan-guide-reveal inline-block",style:{animationDelay:`${e+a*be}ms`},children:l})," "]},a))}const be=45,rt=350;function ot(t){const e=T.c(7),{done:l,current:a,total:s}=t,r=Math.max(s===void 0?0:s,l+(a?1:0));if(r===0)return null;let d;if(e[0]!==r||e[1]!==a||e[2]!==l){let o;e[4]!==a||e[5]!==l?(o=(u,c)=>n.jsx("span",{className:V("h-1.5 rounded-full transition-all duration-500 animate-in zoom-in-0 fade-in-0 motion-reduce:animate-none",a&&c===l?"w-5 bg-foreground":c<l?"w-1.5 bg-muted-foreground/40":"w-1.5 bg-muted-foreground/15")},c),e[4]=a,e[5]=l,e[6]=o):o=e[6],d=n.jsx("div",{className:"ml-auto flex items-center gap-1.5","aria-hidden":"true",children:Array.from({length:r},o)}),e[0]=r,e[1]=a,e[2]=l,e[3]=d}else d=e[3];return d}function ct(t){const e=T.c(72),{view:l,onAnswer:a,skipLabel:s}=t,i=L(),[r,d]=G.useState(""),[o,u]=G.useState(null);let c;e[0]!==r?(c=r.trim(),e[0]=r,e[1]=c):c=e[1];const m=c.length>0,p=l.reaction?rt:0;let f;if(e[2]!==l.question.text){let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P=/\s+/,e[4]=P):P=e[4],f=l.question.text.split(P),e[2]=l.question.text,e[3]=f}else f=e[3];const x=p+f.length*be+150,g=x+l.question.options.length*70+100;let h;e[5]!==o||e[6]!==a?(h=P=>{if(o===null){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(P);return}u(P)}},e[5]=o,e[6]=a,e[7]=h):h=e[7];const b=h;let j;e[8]!==r||e[9]!==b||e[10]!==m?(j=P=>{P.preventDefault(),m&&b(r)},e[8]=r,e[9]=b,e[10]=m,e[11]=j):j=e[11];const w=j;let y;e[12]!==o||e[13]!==a?(y=P=>{P.target===P.currentTarget&&o!==null&&a(o)},e[12]=o,e[13]=a,e[14]=y):y=e[14];const E=o!==null&&"animate-out fade-out-0 slide-out-to-top-4 fill-mode-forwards duration-300 delay-150";let C;e[15]!==E?(C=V("flex w-full flex-col gap-6",E),e[15]=E,e[16]=C):C=e[16];let D;e[17]!==l.reaction?(D=l.reaction&&n.jsx("p",{className:"plan-guide-reveal text-base text-muted-foreground",children:l.reaction}),e[17]=l.reaction,e[18]=D):D=e[18];let _;e[19]!==p||e[20]!==l.question.text?(_=n.jsx("h2",{className:"text-2xl font-medium text-balance text-foreground md:text-3xl",children:n.jsx(at,{text:l.question.text,delay:p})}),e[19]=p,e[20]=l.question.text,e[21]=_):_=e[21];let I;e[22]!==D||e[23]!==_?(I=n.jsxs("div",{className:"flex flex-col gap-3",children:[D,_]}),e[22]=D,e[23]=_,e[24]=I):I=e[24];let v;e[25]!==b||e[26]!==o||e[27]!==x||e[28]!==l.question.options?(v=l.question.options.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:l.question.options.map((P,ye)=>n.jsx(F,{type:"button",variant:"outline","aria-pressed":o===P,className:V("h-auto rounded-full px-4 py-2 text-left whitespace-normal transition-[background-color,color,opacity,transform] duration-200 hover:-translate-y-0.5 animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-both duration-500 motion-reduce:animate-none motion-reduce:hover:translate-y-0",o===P&&"border-foreground bg-foreground text-background hover:bg-foreground hover:text-background",o!==null&&o!==P&&"opacity-30"),style:{animationDelay:`${x+ye*70}ms`},onClick:()=>b(P),children:P},P))}),e[25]=b,e[26]=o,e[27]=x,e[28]=l.question.options,e[29]=v):v=e[29];const N=`${g}ms`;let k;e[30]!==N?(k={animationDelay:N},e[30]=N,e[31]=k):k=e[31];let S;e[32]!==i?(S=i("plan.guide.answerLabel"),e[32]=i,e[33]=S):S=e[33];let A;e[34]!==i?(A=i("plan.guide.answerPlaceholder"),e[34]=i,e[35]=A):A=e[35];let $;e[36]===Symbol.for("react.memo_cache_sentinel")?($=P=>d(P.target.value),e[36]=$):$=e[36];let M;e[37]!==w?(M=P=>{P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&w(P)},e[37]=w,e[38]=M):M=e[38];let R;e[39]!==r||e[40]!==S||e[41]!==A||e[42]!==M?(R=n.jsx(ae,{autoFocus:!0,"aria-label":S,placeholder:A,value:r,onChange:$,onKeyDown:M,className:"min-h-24 text-[15px] transition-shadow"}),e[39]=r,e[40]=S,e[41]=A,e[42]=M,e[43]=R):R=e[43];let O;e[44]!==b?(O=()=>b(""),e[44]=b,e[45]=O):O=e[45];let z;e[46]!==s||e[47]!==i?(z=s??i("plan.guide.skip"),e[46]=s,e[47]=i,e[48]=z):z=e[48];let K;e[49]!==O||e[50]!==z?(K=n.jsx(F,{type:"button",variant:"ghost",onClick:O,children:z}),e[49]=O,e[50]=z,e[51]=K):K=e[51];const B=!m;let U;e[52]!==i?(U=i("plan.guide.continue"),e[52]=i,e[53]=U):U=e[53];let Z;e[54]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(le,{className:"transition-transform duration-200 group-hover:translate-x-0.5"}),e[54]=Z):Z=e[54];let H;e[55]!==B||e[56]!==U?(H=n.jsxs(F,{type:"submit",disabled:B,className:"group transition-all duration-200",children:[U,Z]}),e[55]=B,e[56]=U,e[57]=H):H=e[57];let J;e[58]!==K||e[59]!==H?(J=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[K,H]}),e[58]=K,e[59]=H,e[60]=J):J=e[60];let W;e[61]!==k||e[62]!==R||e[63]!==J?(W=n.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in-0 fill-mode-both duration-500 motion-reduce:animate-none",style:k,children:[R,J]}),e[61]=k,e[62]=R,e[63]=J,e[64]=W):W=e[64];let ee;return e[65]!==w||e[66]!==I||e[67]!==v||e[68]!==W||e[69]!==y||e[70]!==C?(ee=n.jsxs("form",{onSubmit:w,onAnimationEnd:y,className:C,children:[I,v,W]}),e[65]=w,e[66]=I,e[67]=v,e[68]=W,e[69]=y,e[70]=C,e[71]=ee):ee=e[71],ee}function dt(t){const e=T.c(7),{state:l,onAnswer:a}=t,{view:s}=l;switch(s.phase){case"thinking":{const i=l.step*3+l.idea.length;let r;return e[0]!==i?(r=n.jsx(de,{phrases:nt,offset:i}),e[0]=i,e[1]=r):r=e[1],r}case"asking":{let i;return e[2]!==a||e[3]!==l.step||e[4]!==s?(i=n.jsx(ct,{view:s,onAnswer:a},l.step),e[2]=a,e[3]=l.step,e[4]=s,e[5]=i):i=e[5],i}case"building":{let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(de,{phrases:it,offset:0,building:!0}),e[6]=i):i=e[6],i}}}function ut({guide:t}){const e=L();return n.jsxs("div",{ref:t.screenRef,className:"flex h-full min-h-0 flex-col animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[n.jsxs("div",{className:"flex items-center gap-3 px-4 pt-4 md:px-8 animate-in fade-in-0 slide-in-from-top-1 duration-500 motion-reduce:animate-none",children:[n.jsxs(F,{variant:"ghost",size:"sm",onClick:t.cancel,children:[n.jsx(Re,{}),e("plan.guide.back")]}),n.jsxs("p",{className:"min-w-0 truncate text-sm text-muted-foreground",children:[n.jsx("span",{className:"text-meta mr-2",children:e("plan.guide.yourIdea")}),t.state.idea]}),n.jsx(ot,{done:t.state.answers.length,current:t.state.view.phase==="asking"})]}),n.jsx("div",{className:"flex min-h-0 flex-1 overflow-auto",children:n.jsx("div",{className:"m-auto flex w-full max-w-2xl justify-center px-4 py-10 md:px-8",children:n.jsx(dt,{state:t.state,onAnswer:t.answer})})})]})}function mt(t){const e=T.c(34),{draft:l,onResume:a,onDiscard:s}=t,i=L();let r;e[0]!==i?(r=i("plan.guide.resume.heading"),e[0]=i,e[1]=r):r=e[1];let d;e[2]!==i?(d=i("plan.guide.resume.heading"),e[2]=i,e[3]=d):d=e[3];let o;e[4]!==d?(o=n.jsx("h2",{className:"text-sm font-medium text-foreground",children:d}),e[4]=d,e[5]=o):o=e[5];let u;e[6]!==i?(u=i("plan.guide.resume.description"),e[6]=i,e[7]=u):u=e[7];let c;e[8]!==u?(c=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[8]=u,e[9]=c):c=e[9];let m;e[10]!==o||e[11]!==c?(m=n.jsxs("div",{className:"flex flex-col gap-1",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12];let p;e[13]!==l.idea?(p=n.jsx("p",{className:"line-clamp-2 text-sm text-foreground",children:l.idea}),e[13]=l.idea,e[14]=p):p=e[14];let f;e[15]!==i?(f=i("plan.guide.resume.discard"),e[15]=i,e[16]=f):f=e[16];let x;e[17]!==s||e[18]!==f?(x=n.jsx(F,{type:"button",variant:"ghost",size:"sm",onClick:s,children:f}),e[17]=s,e[18]=f,e[19]=x):x=e[19];let g;e[20]!==i?(g=i("plan.guide.resume.continue"),e[20]=i,e[21]=g):g=e[21];let h;e[22]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(le,{}),e[22]=h):h=e[22];let b;e[23]!==a||e[24]!==g?(b=n.jsxs(F,{type:"button",size:"sm",onClick:a,children:[g,h]}),e[23]=a,e[24]=g,e[25]=b):b=e[25];let j;e[26]!==b||e[27]!==x?(j=n.jsxs("div",{className:"flex justify-end gap-2",children:[x,b]}),e[26]=b,e[27]=x,e[28]=j):j=e[28];let w;return e[29]!==r||e[30]!==j||e[31]!==m||e[32]!==p?(w=n.jsxs("section",{"aria-label":r,className:"flex flex-col gap-3 rounded-xl border border-border bg-muted/40 p-4",children:[m,p,j]}),e[29]=r,e[30]=j,e[31]=m,e[32]=p,e[33]=w):w=e[33],w}function je(t,e){return t.map(({question:l,answer:a})=>`- ${l.trim()}
1
+ import{c as T,b as L,j as n,n as Q,m as V,r as G,B as F,aJ as te,aK as X,bn as Se,ct as _e,bF as ke,an as Pe,a6 as Ce,E as Y,ex as pe,a as Ie,av as Ae,t as $e}from"./index-FRxLT_js.js";import{o as De,bp as Ee,a as qe,aq as Te}from"./agent-icon-qKbICqBE.js";import{i as ie,s as Me}from"./UserSquare-fSKR9s5Z.js";import{B as xe}from"./badge-CFiK0EOx.js";import{i as Re}from"./ArrowLeft-CnpYebJt.js";import{i as le}from"./ArrowRight-CTIzvrRD.js";import{a7 as Oe,a8 as q,a9 as ze,c as ge,aa as Be,ab as Fe,ac as Ge,ad as Le,ae as Ke}from"./chat-context-CvQ-sM5v.js";import{T as ae}from"./textarea-Cipr2aDL.js";import{a as Ue}from"./shell-layout-B7ONrK1S.js";import"./index-UwOo6lse.js";import{g as he,h as Xe,i as He}from"./use-organization-settings-BQz13Hmn.js";import{d as oe}from"./delay-CnY5UFtP.js";import{u as Je,f as We}from"./use-date-fns-locale-DxgiZ7Lq.js";import{u as Qe}from"./use-org-fs-Bjw5czAm.js";import{P as Ye}from"./schema-DFMNr5Cf.js";const Ve={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:ie,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:De,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:Ee,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function Ze(t){const e=T.c(4),{className:l}=t;let a;e[0]!==l?(a=V("block h-2 rounded-full bg-muted",l),e[0]=l,e[1]=a):a=e[1];let s;return e[2]!==a?(s=n.jsx("span",{className:a}),e[2]=a,e[3]=s):s=e[3],s}const et=[{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 tt(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col gap-5",children:et.map(st)}),t[0]=e):e=t[0],e}function st(t){return n.jsxs("div",{className:"flex flex-col gap-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:n.jsx(ie,{size:14})}),n.jsx(Ze,{className:t.title}),n.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:t.value})]}),n.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:V("h-full rounded-full",t.fill,t.tone)})})]},t.value)}function ts(t){const e=T.c(30),{kind:l}=t,a=L(),s=Ve[l];let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[i,n.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:n.jsx(tt,{})})]}),e[1]=r):r=e[1];let d;e[2]!==a?(d=a("home.comingSoon.badge"),e[2]=a,e[3]=d):d=e[3];let o;e[4]!==d?(o=n.jsx(xe,{variant:"muted",children:d}),e[4]=d,e[5]=o):o=e[5];let u;e[6]!==s.heading||e[7]!==a?(u=a(s.heading),e[6]=s.heading,e[7]=a,e[8]=u):u=e[8];let c;e[9]!==u?(c=n.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:u}),e[9]=u,e[10]=c):c=e[10];let m;e[11]!==s.description||e[12]!==a?(m=a(s.description),e[11]=s.description,e[12]=a,e[13]=m):m=e[13];let p;e[14]!==m?(p=n.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:m}),e[14]=m,e[15]=p):p=e[15];let f;e[16]!==o||e[17]!==c||e[18]!==p?(f=n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,c,p]}),e[16]=o,e[17]=c,e[18]=p,e[19]=f):f=e[19];let x;if(e[20]!==s.points||e[21]!==a){let b;e[23]!==a?(b=j=>{const{Icon:w,labelKey:y,tone:E}=j;return n.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[n.jsx("span",{className:V("flex size-9 shrink-0 items-center justify-center rounded-lg",E),children:n.jsx(w,{size:18})}),n.jsx("span",{className:"text-sm text-foreground",children:a(y)})]},y)},e[23]=a,e[24]=b):b=e[24],x=s.points.map(b),e[20]=s.points,e[21]=a,e[22]=x}else x=e[22];let g;e[25]!==x?(g=n.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:x}),e[25]=x,e[26]=g):g=e[26];let h;return e[27]!==g||e[28]!==f?(h=n.jsx(Q,{children:n.jsx(Q.Content,{children:n.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:[r,f,g]})})}),e[27]=g,e[28]=f,e[29]=h):h=e[29],h}const nt=["plan.guide.thinking1","plan.guide.thinking2","plan.guide.thinking3","plan.guide.thinking4","plan.guide.thinking5","plan.guide.thinking6","plan.guide.thinking7","plan.guide.thinking8"],it=["plan.guide.building1","plan.guide.building2","plan.guide.building3","plan.guide.building4","plan.guide.building5","plan.guide.building6","plan.guide.building7","plan.guide.building8","plan.guide.building17","plan.guide.building9","plan.guide.building10","plan.guide.building11","plan.guide.building12","plan.guide.building13","plan.guide.building14","plan.guide.building15","plan.guide.building16"],ne=7e3,lt=5e3,ce=Oe.length;function de(t){const e=T.c(19),{phrases:l,offset:a,building:s,filled:i}=t,r=s===void 0?!1:s,d=L(),o=Ue(ne),u=l[(Math.floor(o/ne)+a)%l.length];let c;e[0]!==r||e[1]!==i?(c=r?n.jsx("div",{className:"plan-guide-tiles","aria-hidden":"true",children:Array.from({length:ce},(b,j)=>n.jsx("span",{"data-tile":i===void 0?void 0:j<i?"filled":"waiting",style:{animationDelay:`${j*90}ms`}},j))}):n.jsxs("div",{className:"plan-guide-dots","aria-hidden":"true",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]}),e[0]=r,e[1]=i,e[2]=c):c=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={animationDelay:`${ne-lt}ms`},e[3]=m):m=e[3];let p;e[4]!==u||e[5]!==d?(p=d(u),e[4]=u,e[5]=d,e[6]=p):p=e[6];let f;e[7]!==p?(f=n.jsx("span",{className:"plan-guide-shimmer",style:m,children:p}),e[7]=p,e[8]=f):f=e[8];let x;e[9]!==u||e[10]!==f?(x=n.jsx("p",{className:"plan-guide-reveal text-base",children:f},u),e[9]=u,e[10]=f,e[11]=x):x=e[11];let g;e[12]!==i||e[13]!==d?(g=i!==void 0&&i>0&&n.jsx("p",{className:"text-xs text-muted-foreground",children:d("plan.case.buildingProgress",{filled:i,total:ce})}),e[12]=i,e[13]=d,e[14]=g):g=e[14];let h;return e[15]!==c||e[16]!==x||e[17]!==g?(h=n.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center gap-5 animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[c,x,g]}),e[15]=c,e[16]=x,e[17]=g,e[18]=h):h=e[18],h}function at({text:t,delay:e}){return t.split(/\s+/).map((l,a)=>n.jsxs(G.Fragment,{children:[n.jsx("span",{className:"plan-guide-reveal inline-block",style:{animationDelay:`${e+a*be}ms`},children:l})," "]},a))}const be=45,rt=350;function ot(t){const e=T.c(7),{done:l,current:a,total:s}=t,r=Math.max(s===void 0?0:s,l+(a?1:0));if(r===0)return null;let d;if(e[0]!==r||e[1]!==a||e[2]!==l){let o;e[4]!==a||e[5]!==l?(o=(u,c)=>n.jsx("span",{className:V("h-1.5 rounded-full transition-all duration-500 animate-in zoom-in-0 fade-in-0 motion-reduce:animate-none",a&&c===l?"w-5 bg-foreground":c<l?"w-1.5 bg-muted-foreground/40":"w-1.5 bg-muted-foreground/15")},c),e[4]=a,e[5]=l,e[6]=o):o=e[6],d=n.jsx("div",{className:"ml-auto flex items-center gap-1.5","aria-hidden":"true",children:Array.from({length:r},o)}),e[0]=r,e[1]=a,e[2]=l,e[3]=d}else d=e[3];return d}function ct(t){const e=T.c(72),{view:l,onAnswer:a,skipLabel:s}=t,i=L(),[r,d]=G.useState(""),[o,u]=G.useState(null);let c;e[0]!==r?(c=r.trim(),e[0]=r,e[1]=c):c=e[1];const m=c.length>0,p=l.reaction?rt:0;let f;if(e[2]!==l.question.text){let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P=/\s+/,e[4]=P):P=e[4],f=l.question.text.split(P),e[2]=l.question.text,e[3]=f}else f=e[3];const x=p+f.length*be+150,g=x+l.question.options.length*70+100;let h;e[5]!==o||e[6]!==a?(h=P=>{if(o===null){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(P);return}u(P)}},e[5]=o,e[6]=a,e[7]=h):h=e[7];const b=h;let j;e[8]!==r||e[9]!==b||e[10]!==m?(j=P=>{P.preventDefault(),m&&b(r)},e[8]=r,e[9]=b,e[10]=m,e[11]=j):j=e[11];const w=j;let y;e[12]!==o||e[13]!==a?(y=P=>{P.target===P.currentTarget&&o!==null&&a(o)},e[12]=o,e[13]=a,e[14]=y):y=e[14];const E=o!==null&&"animate-out fade-out-0 slide-out-to-top-4 fill-mode-forwards duration-300 delay-150";let C;e[15]!==E?(C=V("flex w-full flex-col gap-6",E),e[15]=E,e[16]=C):C=e[16];let D;e[17]!==l.reaction?(D=l.reaction&&n.jsx("p",{className:"plan-guide-reveal text-base text-muted-foreground",children:l.reaction}),e[17]=l.reaction,e[18]=D):D=e[18];let _;e[19]!==p||e[20]!==l.question.text?(_=n.jsx("h2",{className:"text-2xl font-medium text-balance text-foreground md:text-3xl",children:n.jsx(at,{text:l.question.text,delay:p})}),e[19]=p,e[20]=l.question.text,e[21]=_):_=e[21];let I;e[22]!==D||e[23]!==_?(I=n.jsxs("div",{className:"flex flex-col gap-3",children:[D,_]}),e[22]=D,e[23]=_,e[24]=I):I=e[24];let v;e[25]!==b||e[26]!==o||e[27]!==x||e[28]!==l.question.options?(v=l.question.options.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:l.question.options.map((P,ye)=>n.jsx(F,{type:"button",variant:"outline","aria-pressed":o===P,className:V("h-auto rounded-full px-4 py-2 text-left whitespace-normal transition-[background-color,color,opacity,transform] duration-200 hover:-translate-y-0.5 animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-both duration-500 motion-reduce:animate-none motion-reduce:hover:translate-y-0",o===P&&"border-foreground bg-foreground text-background hover:bg-foreground hover:text-background",o!==null&&o!==P&&"opacity-30"),style:{animationDelay:`${x+ye*70}ms`},onClick:()=>b(P),children:P},P))}),e[25]=b,e[26]=o,e[27]=x,e[28]=l.question.options,e[29]=v):v=e[29];const N=`${g}ms`;let k;e[30]!==N?(k={animationDelay:N},e[30]=N,e[31]=k):k=e[31];let S;e[32]!==i?(S=i("plan.guide.answerLabel"),e[32]=i,e[33]=S):S=e[33];let A;e[34]!==i?(A=i("plan.guide.answerPlaceholder"),e[34]=i,e[35]=A):A=e[35];let $;e[36]===Symbol.for("react.memo_cache_sentinel")?($=P=>d(P.target.value),e[36]=$):$=e[36];let M;e[37]!==w?(M=P=>{P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&w(P)},e[37]=w,e[38]=M):M=e[38];let R;e[39]!==r||e[40]!==S||e[41]!==A||e[42]!==M?(R=n.jsx(ae,{autoFocus:!0,"aria-label":S,placeholder:A,value:r,onChange:$,onKeyDown:M,className:"min-h-24 text-[15px] transition-shadow"}),e[39]=r,e[40]=S,e[41]=A,e[42]=M,e[43]=R):R=e[43];let O;e[44]!==b?(O=()=>b(""),e[44]=b,e[45]=O):O=e[45];let z;e[46]!==s||e[47]!==i?(z=s??i("plan.guide.skip"),e[46]=s,e[47]=i,e[48]=z):z=e[48];let K;e[49]!==O||e[50]!==z?(K=n.jsx(F,{type:"button",variant:"ghost",onClick:O,children:z}),e[49]=O,e[50]=z,e[51]=K):K=e[51];const B=!m;let U;e[52]!==i?(U=i("plan.guide.continue"),e[52]=i,e[53]=U):U=e[53];let Z;e[54]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(le,{className:"transition-transform duration-200 group-hover:translate-x-0.5"}),e[54]=Z):Z=e[54];let H;e[55]!==B||e[56]!==U?(H=n.jsxs(F,{type:"submit",disabled:B,className:"group transition-all duration-200",children:[U,Z]}),e[55]=B,e[56]=U,e[57]=H):H=e[57];let J;e[58]!==K||e[59]!==H?(J=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[K,H]}),e[58]=K,e[59]=H,e[60]=J):J=e[60];let W;e[61]!==k||e[62]!==R||e[63]!==J?(W=n.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in-0 fill-mode-both duration-500 motion-reduce:animate-none",style:k,children:[R,J]}),e[61]=k,e[62]=R,e[63]=J,e[64]=W):W=e[64];let ee;return e[65]!==w||e[66]!==I||e[67]!==v||e[68]!==W||e[69]!==y||e[70]!==C?(ee=n.jsxs("form",{onSubmit:w,onAnimationEnd:y,className:C,children:[I,v,W]}),e[65]=w,e[66]=I,e[67]=v,e[68]=W,e[69]=y,e[70]=C,e[71]=ee):ee=e[71],ee}function dt(t){const e=T.c(7),{state:l,onAnswer:a}=t,{view:s}=l;switch(s.phase){case"thinking":{const i=l.step*3+l.idea.length;let r;return e[0]!==i?(r=n.jsx(de,{phrases:nt,offset:i}),e[0]=i,e[1]=r):r=e[1],r}case"asking":{let i;return e[2]!==a||e[3]!==l.step||e[4]!==s?(i=n.jsx(ct,{view:s,onAnswer:a},l.step),e[2]=a,e[3]=l.step,e[4]=s,e[5]=i):i=e[5],i}case"building":{let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(de,{phrases:it,offset:0,building:!0}),e[6]=i):i=e[6],i}}}function ut({guide:t}){const e=L();return n.jsxs("div",{ref:t.screenRef,className:"flex h-full min-h-0 flex-col animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[n.jsxs("div",{className:"flex items-center gap-3 px-4 pt-4 md:px-8 animate-in fade-in-0 slide-in-from-top-1 duration-500 motion-reduce:animate-none",children:[n.jsxs(F,{variant:"ghost",size:"sm",onClick:t.cancel,children:[n.jsx(Re,{}),e("plan.guide.back")]}),n.jsxs("p",{className:"min-w-0 truncate text-sm text-muted-foreground",children:[n.jsx("span",{className:"text-meta mr-2",children:e("plan.guide.yourIdea")}),t.state.idea]}),n.jsx(ot,{done:t.state.answers.length,current:t.state.view.phase==="asking"})]}),n.jsx("div",{className:"flex min-h-0 flex-1 overflow-auto",children:n.jsx("div",{className:"m-auto flex w-full max-w-2xl justify-center px-4 py-10 md:px-8",children:n.jsx(dt,{state:t.state,onAnswer:t.answer})})})]})}function mt(t){const e=T.c(34),{draft:l,onResume:a,onDiscard:s}=t,i=L();let r;e[0]!==i?(r=i("plan.guide.resume.heading"),e[0]=i,e[1]=r):r=e[1];let d;e[2]!==i?(d=i("plan.guide.resume.heading"),e[2]=i,e[3]=d):d=e[3];let o;e[4]!==d?(o=n.jsx("h2",{className:"text-sm font-medium text-foreground",children:d}),e[4]=d,e[5]=o):o=e[5];let u;e[6]!==i?(u=i("plan.guide.resume.description"),e[6]=i,e[7]=u):u=e[7];let c;e[8]!==u?(c=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[8]=u,e[9]=c):c=e[9];let m;e[10]!==o||e[11]!==c?(m=n.jsxs("div",{className:"flex flex-col gap-1",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12];let p;e[13]!==l.idea?(p=n.jsx("p",{className:"line-clamp-2 text-sm text-foreground",children:l.idea}),e[13]=l.idea,e[14]=p):p=e[14];let f;e[15]!==i?(f=i("plan.guide.resume.discard"),e[15]=i,e[16]=f):f=e[16];let x;e[17]!==s||e[18]!==f?(x=n.jsx(F,{type:"button",variant:"ghost",size:"sm",onClick:s,children:f}),e[17]=s,e[18]=f,e[19]=x):x=e[19];let g;e[20]!==i?(g=i("plan.guide.resume.continue"),e[20]=i,e[21]=g):g=e[21];let h;e[22]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(le,{}),e[22]=h):h=e[22];let b;e[23]!==a||e[24]!==g?(b=n.jsxs(F,{type:"button",size:"sm",onClick:a,children:[g,h]}),e[23]=a,e[24]=g,e[25]=b):b=e[25];let j;e[26]!==b||e[27]!==x?(j=n.jsxs("div",{className:"flex justify-end gap-2",children:[x,b]}),e[26]=b,e[27]=x,e[28]=j):j=e[28];let w;return e[29]!==r||e[30]!==j||e[31]!==m||e[32]!==p?(w=n.jsxs("section",{"aria-label":r,className:"flex flex-col gap-3 rounded-xl border border-border bg-muted/40 p-4",children:[m,p,j]}),e[29]=r,e[30]=j,e[31]=m,e[32]=p,e[33]=w):w=e[33],w}function je(t,e){return t.map(({question:l,answer:a})=>`- ${l.trim()}
2
2
  ${a.trim()||e}`).join(`
3
3
  `)}function ft(t,e){const l=e.idea.trim(),a=e.objective?.trim(),s=e.casePath,i=a?t("plan.prompt.withObjective",{idea:l,objective:a,casePath:s}):t("plan.prompt.withoutObjective",{idea:l,casePath:s});if(!e.answers)return i;const r=je(e.answers,t("plan.prompt.skipped"));return`${i}
4
4
 
@@ -1,4 +1,4 @@
1
- import{r as Y,j as s,d_ as me,hW as ye,c as G,m as Z,c1 as Pe,b as q,a6 as se,an as X,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aL as we,aM as Ee,aN as Ae,aO as Ie,bc as Ue,aP as De,aQ as Te,aR as Re,gl as le,gZ as ne,i as xe,e3 as pe,b9 as $e,at as Be,av as Le,L as ke,gK as He}from"./index-DoEtSiIe.js";import{s as Oe}from"./Plus-BoPsX_T8.js";import{B as Fe}from"./badge-DONoxQO7.js";import{a as Me,b as ze,P as Ve}from"./popover-mrQ4T9ru.js";import{a as ce,T as Ge}from"./toggle-group-CtXgLS7e.js";import{g as Ke}from"./use-ai-providers-BwkzkRi2.js";import{u as ie,c as he,a as qe}from"./use-entitlements-4v7LU4jM.js";import{u as Qe,P as Ye}from"./plan-ladder-DNa_CJD5.js";var re="Progress",oe=100,[Ze]=ye(re),[Xe,Je]=Ze(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(Xe,{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 je="ProgressIndicator",be=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(je,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})});be.displayName=je;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,d_ as me,hW as ye,c as G,m as Z,c1 as Pe,b as q,a6 as se,an as X,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aL as we,aM as Ee,aN as Ae,aO as Ie,bc as Ue,aP as De,aQ as Te,aR as Re,gl as le,gZ as ne,i as xe,e3 as pe,b9 as $e,at as Be,av as Le,L as ke,gK as He}from"./index-FRxLT_js.js";import{s as Oe}from"./Plus-BlCDSK3_.js";import{B as Fe}from"./badge-CFiK0EOx.js";import{a as Me,b as ze,P as Ve}from"./popover-BI-lpUhu.js";import{a as ce,T as Ge}from"./toggle-group-4Uqc6vzQ.js";import{h as Ke}from"./use-ai-providers-BDyMN-N5.js";import{u as ie,c as he,a as qe}from"./use-entitlements-CmxoG1H2.js";import{u as Qe,P as Ye}from"./plan-ladder-aYguFL8S.js";var re="Progress",oe=100,[Ze]=ye(re),[Xe,Je]=Ze(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(Xe,{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 je="ProgressIndicator",be=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(je,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})});be.displayName=je;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,c7 as _,j as c,c9 as j,ca as x,c8 as w,c4 as z,c5 as G,c6 as H,ce as E,cn as K,e4 as b,ci as q,ck as U,co as V,cj as W,cl as Z,cm as B,cp as J,cq as Q,cc as X,c as R,m as Y}from"./index-DoEtSiIe.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=V("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 q(a)},[]),c.jsx(U,{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 W(),c.jsx(Z,{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,c7 as _,j as c,c9 as j,ca as x,c8 as w,c4 as z,c5 as G,c6 as H,ce as E,cn as K,e4 as b,ci as q,ck as U,co as V,cj as W,cl as Z,cm as B,cp as J,cq as Q,cc as X,c as R,m as Y}from"./index-FRxLT_js.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=V("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 q(a)},[]),c.jsx(U,{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 W(),c.jsx(Z,{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};