@vellumai/web 0.10.4 → 0.10.5-dev.202607022329.d89bf2f

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 (270) hide show
  1. package/dist/assets/{AnimatePresence-k-NoyzmC.js → AnimatePresence-uY0BR2n2.js} +1 -1
  2. package/dist/assets/{BundleConfirmPage-BcXA4t1n.js → BundleConfirmPage-BEQyQVeN.js} +1 -1
  3. package/dist/assets/{Combination-4Qc3vrtW.js → Combination-UBPhVLWy.js} +1 -1
  4. package/dist/assets/{about-page-BQQ9OMS-.js → about-page-Ck4iLq7E.js} +1 -1
  5. package/dist/assets/account-page-DmI8Zm1K.js +1 -0
  6. package/dist/assets/{account-shell-DLtzg6bW.js → account-shell-CL67zFht.js} +1 -1
  7. package/dist/assets/acp-run-detail-panel-gEL8OqNU.js +5 -0
  8. package/dist/assets/{add-credits-modal-p8hs2R5Q.js → add-credits-modal-BnXqKqkz.js} +1 -1
  9. package/dist/assets/advanced-page-BQvsLeue.js +1 -0
  10. package/dist/assets/ai-page-BcR8KPT5.js +1 -0
  11. package/dist/assets/{animated-avatar-BSEt2q64.js → animated-avatar-CEC1DGcI.js} +1 -1
  12. package/dist/assets/{api-Deex2etA.js → api-DnqFanVx.js} +1 -1
  13. package/dist/assets/api-key-screen-Ct1qhQGe.js +1 -0
  14. package/dist/assets/{archive-page-CjnYMSCA.js → archive-page-Dp4CDPFL.js} +1 -1
  15. package/dist/assets/assistant-api-BFL8kRU6.js +1 -0
  16. package/dist/assets/{assistant-feature-flag-store-oe00IJMB.js → assistant-feature-flag-store-C94SGLWJ.js} +1 -1
  17. package/dist/assets/{assistant-identity-store-iWGqR8uz.js → assistant-identity-store-cODRsfVo.js} +1 -1
  18. package/dist/assets/{assistant-status-panel-CUEIZEyr.js → assistant-status-panel-CWYmm239.js} +1 -1
  19. package/dist/assets/auth-store-DfeW0asJ.js +2 -0
  20. package/dist/assets/background-task-detail-panel-CH7efUDj.js +1 -0
  21. package/dist/assets/billing-page-tzTltPcQ.js +3 -0
  22. package/dist/assets/{bookmarks-page-G8JL2TRr.js → bookmarks-page-DQNTR2lx.js} +1 -1
  23. package/dist/assets/{browser-B4y6LCLX.js → browser-DM38C5zq.js} +2 -2
  24. package/dist/assets/build-state-C1h3J6U4.js +1 -0
  25. package/dist/assets/{button-D7s2Q_uG.js → button-D-AX8Voo.js} +1 -1
  26. package/dist/assets/by-tool-use-id-index-Dbdu-8Kf.js +1 -0
  27. package/dist/assets/chat-rA5AbKPD.js +1 -0
  28. package/dist/assets/{checkbox-BqCzUvXM.js → checkbox-ueHEk2G-.js} +1 -1
  29. package/dist/assets/{client-feature-flag-store-k_bI655l.js → client-feature-flag-store-CWOJ-CVU.js} +1 -1
  30. package/dist/assets/{client-identity-B8CM527c.js → client-identity-KGlckm6M.js} +1 -1
  31. package/dist/assets/{command-palette-0moHjYai.js → command-palette-Dlt7m1I6.js} +1 -1
  32. package/dist/assets/{command-palette-window-page-utfVpPv0.js → command-palette-window-page-DGfCcu4v.js} +1 -1
  33. package/dist/assets/{community-page-BLtaVXOe.js → community-page-BhuuMsyS.js} +1 -1
  34. package/dist/assets/{confirm-dialog-CfOXCE1N.js → confirm-dialog-bfBx6UYv.js} +1 -1
  35. package/dist/assets/{connect-page-Cu_qaH-z.js → connect-page-iwfq05E5.js} +1 -1
  36. package/dist/assets/{consent-controls-CwEkJRom.js → consent-controls-BzFFpG2p.js} +1 -1
  37. package/dist/assets/{contacts-gateway-B23m6emG.js → contacts-gateway-BDJYh797.js} +1 -1
  38. package/dist/assets/contacts-page-route-6RKPZpDS.js +9 -0
  39. package/dist/assets/{conversation-list-fetchers-B5KLYIZZ.js → conversation-list-fetchers-COStMaVO.js} +1 -1
  40. package/dist/assets/conversation-store-B8D6wE18.js +1 -0
  41. package/dist/assets/{danger-zone-redirect-page-ChVePZyJ.js → danger-zone-redirect-page-DK4QwO4q.js} +1 -1
  42. package/dist/assets/debug-page-D33Lzv5V.js +4 -0
  43. package/dist/assets/{deploy-dialogs-DYPOGbGL.js → deploy-dialogs-BhpmZiBK.js} +1 -1
  44. package/dist/assets/{detail-card-acc7KIet.js → detail-card-Bga8Jc8y.js} +1 -1
  45. package/dist/assets/detail-panel-stop-button-Dt15JaIv.js +1 -0
  46. package/dist/assets/detail-shell-BlzaPKeI.js +4 -0
  47. package/dist/assets/{developer-page-nLBkSigq.js → developer-page-D-cN0uAY.js} +1 -1
  48. package/dist/assets/{devices-page-CFg1FAIT.js → devices-page-Bi8jZe8c.js} +1 -1
  49. package/dist/assets/diagnostics-BAjanSbk.js +1 -0
  50. package/dist/assets/{dictation-overlay-page-CIIcRSZr.js → dictation-overlay-page-BurDS8z_.js} +1 -1
  51. package/dist/assets/{dist-B0Gf-knw.js → dist-CGS5MDkK.js} +1 -1
  52. package/dist/assets/{dist-cApvLul2.js → dist-Ddn3FnfV.js} +1 -1
  53. package/dist/assets/{document-viewer-page-CNWyP82k.js → document-viewer-page-BiaJTF17.js} +1 -1
  54. package/dist/assets/{dropdown-CL8VmqrY.js → dropdown-ChWAdhLG.js} +1 -1
  55. package/dist/assets/{earn-credits-modal-BkXk_l9a.js → earn-credits-modal-CAUyJwmh.js} +1 -1
  56. package/dist/assets/{emails-page-C9mr_lzm.js → emails-page-CAXZA30r.js} +1 -1
  57. package/dist/assets/esm--RA963YO.js +2 -0
  58. package/dist/assets/esm-BSRBg0oR.js +2 -0
  59. package/dist/assets/esm-CJ8uY1wn.js +2 -0
  60. package/dist/assets/esm-DTj81fJQ.js +1 -0
  61. package/dist/assets/{esm-B_Dgz4mc.js → esm-O9mDOR47.js} +2 -2
  62. package/dist/assets/esm-cB02a8J9.js +2 -0
  63. package/dist/assets/feature-flag-catalog-C8w5_UfU.js +1 -0
  64. package/dist/assets/{file-editor-BWfAnSsG.js → file-editor-ZqIEJw6T.js} +1 -1
  65. package/dist/assets/general-page-DIvhLrLC.js +1 -0
  66. package/dist/assets/hatching-screen-C0HPTyMQ.js +1 -0
  67. package/dist/assets/home-page-route-B3-EkviT.js +1 -0
  68. package/dist/assets/hosting-screen-DWqZD5MS.js +1 -0
  69. package/dist/assets/identity-page-route-HyRfxaiP.js +1 -0
  70. package/dist/assets/index-F6qy8udC.css +2 -0
  71. package/dist/assets/index-FlO-C4WJ.js +129 -0
  72. package/dist/assets/{input-C8kfrq9r.js → input-D4W4p0pZ.js} +1 -1
  73. package/dist/assets/{inspect-page-BWSvIJ2d.js → inspect-page-Dh2BRN8h.js} +4 -4
  74. package/dist/assets/{install-s7InKiDi.js → install-DwGUGZQw.js} +1 -1
  75. package/dist/assets/integrations-page-DwiPISi_.js +1 -0
  76. package/dist/assets/{intelligence-layout-B_UDPu0L.js → intelligence-layout-DZ-lWsS-.js} +1 -1
  77. package/dist/assets/{keyboard-shortcuts-page-E8rGDLiG.js → keyboard-shortcuts-page-CI4UDQMl.js} +1 -1
  78. package/dist/assets/{library-detail-page-BlrRC_ny.js → library-detail-page-Dijlp-Ed.js} +1 -1
  79. package/dist/assets/{library-page-Dct5o6_9.js → library-page-CI_i8xZv.js} +1 -1
  80. package/dist/assets/{list-row-Cw9JYESP.js → list-row-Di0MK3wu.js} +1 -1
  81. package/dist/assets/local-mode-CgrENuVf.js +39 -0
  82. package/dist/assets/{login-flow-BtdVqmTm.js → login-flow-Ds9vsrwI.js} +1 -1
  83. package/dist/assets/login-page-CCwMU8NR.js +1 -0
  84. package/dist/assets/{logout-page-BCcEjyS2.js → logout-page-DYzv53xW.js} +1 -1
  85. package/dist/assets/{logs-layout-Btvxnin8.js → logs-layout-BCn0lQCq.js} +1 -1
  86. package/dist/assets/{memory-router-playground-page-D5ruL9dQ.js → memory-router-playground-page-DgSeE_5U.js} +1 -1
  87. package/dist/assets/{menu-C_97pis4.js → menu-BLJEjTFD.js} +1 -1
  88. package/dist/assets/messages-ChEiS3wF.js +13 -0
  89. package/dist/assets/{metric-card-DqAVWY-G.js → metric-card-B5-OTPcX.js} +1 -1
  90. package/dist/assets/{mobile-sidebar-drawer-BBHy-x2N.js → mobile-sidebar-drawer-dkZfF4ic.js} +1 -1
  91. package/dist/assets/{modal-D0Q3UWD0.js → modal-BNAVT2FK.js} +1 -1
  92. package/dist/assets/mutation-error-Iab5I7oz.js +1 -0
  93. package/dist/assets/native-biometric-BK6_QtW5.js +6 -0
  94. package/dist/assets/{native-file-Bm3eyig_.js → native-file-DIJL6af-.js} +2 -2
  95. package/dist/assets/{notifications-page-cOGpYgqy.js → notifications-page-Dla1bt2V.js} +1 -1
  96. package/dist/assets/{oauth-complete-page-C2RjDFuA.js → oauth-complete-page-BMqf56bD.js} +1 -1
  97. package/dist/assets/{oauth-popup-complete-page-Cwy2jqJN.js → oauth-popup-complete-page-CdaOFiQI.js} +1 -1
  98. package/dist/assets/{page-shell-5T-Jxz7G.js → page-shell-rqT8-trD.js} +1 -1
  99. package/dist/assets/pairing-page-BDCtiLsq.js +1 -0
  100. package/dist/assets/{panel-item-nGTDevWP.js → panel-item-Q1g7DFJw.js} +1 -1
  101. package/dist/assets/{password-reset-page-yn0MrnNq.js → password-reset-page-T_0pamrF.js} +1 -1
  102. package/dist/assets/platform-detection-Ceodt3Hu.js +1 -0
  103. package/dist/assets/platform-loopback-page-BnZPdxIk.js +1 -0
  104. package/dist/assets/{plugin-detail-page-sX6m5HV3.js → plugin-detail-page-3mf9oR80.js} +1 -1
  105. package/dist/assets/plugins-page-TAy4hev4.js +1 -0
  106. package/dist/assets/plugins-surface-gCrqfOas.js +1 -0
  107. package/dist/assets/{popover-CL-JL6vG.js → popover-BUj2v1xo.js} +1 -1
  108. package/dist/assets/{prechat-qvhqEHmK.js → prechat-RG0Q0UrS.js} +1 -1
  109. package/dist/assets/prechat-route-CtfsGLw2.js +1 -0
  110. package/dist/assets/{prefs-OrKWJGM_.js → prefs-ef69V836.js} +1 -1
  111. package/dist/assets/privacy-page-BB9GR4ZD.js +1 -0
  112. package/dist/assets/privacy-screen-onaZtGUE.js +1 -0
  113. package/dist/assets/provider-callback-page-yXBMI0Uv.js +1 -0
  114. package/dist/assets/provider-key-Bf5qJwbE.js +1 -0
  115. package/dist/assets/provider-signup-page-8w9h5zSj.js +1 -0
  116. package/dist/assets/{quick-input-page-DA2vqGas.js → quick-input-page-CyO-UVOQ.js} +1 -1
  117. package/dist/assets/react-query.gen-BwkZCSTW.js +1 -0
  118. package/dist/assets/remote-gateway-session-BigLiDPm.js +1 -0
  119. package/dist/assets/{research-mock-page-DRkJQuq2.js → research-mock-page-COuqgh_8.js} +1 -1
  120. package/dist/assets/research-onboarding-route-B7TnjNJV.js +61 -0
  121. package/dist/assets/{resolved-assistants-store-Cp4J43BK.js → resolved-assistants-store-Dqf0LJrA.js} +1 -1
  122. package/dist/assets/return-to-yMLvlnXN.js +1 -0
  123. package/dist/assets/{review-terms-screen-Cmcw1D67.js → review-terms-screen-BLPeTbkx.js} +1 -1
  124. package/dist/assets/{schedules-B7I0imdw.js → schedules-D_sclJNA.js} +1 -1
  125. package/dist/assets/sdk.gen-zA5ns5LT.js +1 -0
  126. package/dist/assets/select-assistant-screen-C99Fb0km.js +1 -0
  127. package/dist/assets/{settings-layout-B9Uu1igg.js → settings-layout-sq8M5TJV.js} +1 -1
  128. package/dist/assets/share-feedback-modal-sXMDmgKy.js +1 -0
  129. package/dist/assets/{sidebar-tree-CHyPnNA0.js → sidebar-tree-rpSGyrYj.js} +1 -1
  130. package/dist/assets/signup-page-BhFDh2Lp.js +1 -0
  131. package/dist/assets/{signup-shell-DgwKMvn2.js → signup-shell-DMX1tgqB.js} +1 -1
  132. package/dist/assets/skills-page-QKhhIUlC.js +1 -0
  133. package/dist/assets/{sound-manager-BnZ7SwXM.js → sound-manager-45n1b-Bl.js} +1 -1
  134. package/dist/assets/{sounds-page-ZCBq6ru9.js → sounds-page-DBXH5tQz.js} +1 -1
  135. package/dist/assets/{src-mai-NajT.js → src-B-I7oowl.js} +3 -3
  136. package/dist/assets/{stat-square-B0S3fO7O.js → stat-square-8mff1dLC.js} +1 -1
  137. package/dist/assets/subagent-detail-panel-jJiEVAKj.js +4 -0
  138. package/dist/assets/subagent-store-C0UOU-pG.js +3 -0
  139. package/dist/assets/{system-events-page-CQUZjHbp.js → system-events-page-BODl2I6C.js} +1 -1
  140. package/dist/assets/{system-events-redirect-page-B6WgM0Vv.js → system-events-redirect-page-C16Xg1C_.js} +1 -1
  141. package/dist/assets/{tag-B_-QAvJF.js → tag-CW6WC4fE.js} +1 -1
  142. package/dist/assets/{tiptap-document-editor-tDTTC-Je.js → tiptap-document-editor-B_8p2exF.js} +2 -2
  143. package/dist/assets/{toast-2TW5tj1Y.js → toast-sdJJ6aTV.js} +1 -1
  144. package/dist/assets/tool-detail-panel-C3ycGHP8.js +2 -0
  145. package/dist/assets/trace-page-C5Oc1vIh.js +1 -0
  146. package/dist/assets/{upgrade-cancel-page-BVr06o5p.js → upgrade-cancel-page-DsiFRuzo.js} +1 -1
  147. package/dist/assets/{upgrade-success-page-CIBIIMbB.js → upgrade-success-page-DKb4tC71.js} +1 -1
  148. package/dist/assets/{usage-page-CcGNq6p_.js → usage-page-BJy1XgXv.js} +1 -1
  149. package/dist/assets/{use-active-assistant-id-D4UJEQM5.js → use-active-assistant-id-BVzVN4_g.js} +1 -1
  150. package/dist/assets/use-is-org-ready-NO84DVDo.js +1 -0
  151. package/dist/assets/use-onboarding-login-ULmWc73o.js +1 -0
  152. package/dist/assets/{use-reduced-motion-DmsjJfoE.js → use-reduced-motion-BG6r0Z46.js} +1 -1
  153. package/dist/assets/use-skill-categories-Bgl1CV8z.js +1 -0
  154. package/dist/assets/{utils-Bg9t-lBx.js → utils-P-AuKiE9.js} +1 -1
  155. package/dist/assets/viewer-store-BR99G-Ii.js +1 -0
  156. package/dist/assets/{voice-page-BOFy-jR_.js → voice-page-C8R_9E8j.js} +1 -1
  157. package/dist/assets/{weather-forecast-display-bZDWJOMu.js → weather-forecast-display-0tn6PGg8.js} +1 -1
  158. package/dist/assets/{web-CReVlJcu.js → web-CxyEb7Lp.js} +1 -1
  159. package/dist/assets/{web-BpH9TOnx.js → web-DFw1Yfb1.js} +1 -1
  160. package/dist/assets/{web-Cd-q_a1I.js → web-DGDlV45i.js} +1 -1
  161. package/dist/assets/{web-BlDBGu36.js → web-GWxiW7or.js} +1 -1
  162. package/dist/assets/{web-Cly_79wU.js → web-YggPvEM4.js} +1 -1
  163. package/dist/assets/{web-CWJUzKI_.js → web-b9SjJqdc.js} +1 -1
  164. package/dist/assets/{web-CFYymSzw.js → web-lNls6p99.js} +1 -1
  165. package/dist/assets/{welcome-screen-Cka_lktU.js → welcome-screen-BPSvhAJD.js} +1 -1
  166. package/dist/assets/workflow-detail-panel-CpusEKvv.js +1 -0
  167. package/dist/assets/workspace-page-BnQ2Z57D.js +1 -0
  168. package/dist/index.html +77 -74
  169. package/package.json +1 -1
  170. package/dist/assets/account-page-cTyLtFgE.js +0 -1
  171. package/dist/assets/acp-run-detail-panel-DaNqQ4AU.js +0 -5
  172. package/dist/assets/advanced-page-CK4tCgvV.js +0 -1
  173. package/dist/assets/ai-page-Bf5G1nk8.js +0 -1
  174. package/dist/assets/api-key-screen-BToN0-XM.js +0 -1
  175. package/dist/assets/assistant-api-D8xSkh-5.js +0 -1
  176. package/dist/assets/auth-store-B2Zo6DUE.js +0 -7
  177. package/dist/assets/billing-page-Cjqv3hFX.js +0 -3
  178. package/dist/assets/build-state-CtsLvNgP.js +0 -1
  179. package/dist/assets/chat-CdO26JJs.js +0 -1
  180. package/dist/assets/contacts-page-route-Swz0yPYv.js +0 -9
  181. package/dist/assets/conversation-store-SjqDbOcn.js +0 -1
  182. package/dist/assets/debug-page-CVw2bzGN.js +0 -4
  183. package/dist/assets/detail-shell-CoKg1S7U.js +0 -3
  184. package/dist/assets/diagnostics-CGIesPpg.js +0 -1
  185. package/dist/assets/esm-BPR7F84K.js +0 -1
  186. package/dist/assets/esm-C7SZoG5u.js +0 -2
  187. package/dist/assets/esm-CMxBpGk-.js +0 -2
  188. package/dist/assets/esm-XqRGVrcj.js +0 -2
  189. package/dist/assets/esm-oLFwK0Kw.js +0 -2
  190. package/dist/assets/feature-flag-catalog-C7oM7PZ_.js +0 -1
  191. package/dist/assets/funnel-CUPE93jb.js +0 -1
  192. package/dist/assets/general-page-Cx6tlYeL.js +0 -1
  193. package/dist/assets/hatching-screen-DbVpuOai.js +0 -1
  194. package/dist/assets/home-page-route-CweAnlJn.js +0 -1
  195. package/dist/assets/hosting-screen-DpWTAyj2.js +0 -1
  196. package/dist/assets/identity-page-route-TiI1OQgN.js +0 -1
  197. package/dist/assets/index-0XgM92Lz.js +0 -130
  198. package/dist/assets/index-N8IeZea9.css +0 -2
  199. package/dist/assets/integrations-page-CMYurvd3.js +0 -1
  200. package/dist/assets/local-mode-CvrNMtPF.js +0 -39
  201. package/dist/assets/login-page-sS8t_Aik.js +0 -1
  202. package/dist/assets/messages-B5v7xWiw.js +0 -13
  203. package/dist/assets/mutation-error-NiVTbM-q.js +0 -1
  204. package/dist/assets/pairing-page-DHF2ThH-.js +0 -1
  205. package/dist/assets/platform-loopback-page-DSx9flbF.js +0 -1
  206. package/dist/assets/plugins-page-_kqpdU-W.js +0 -1
  207. package/dist/assets/plugins-surface-KFX25A-q.js +0 -1
  208. package/dist/assets/prechat-route-D2HszqA0.js +0 -1
  209. package/dist/assets/privacy-page-BJfuoXgs.js +0 -1
  210. package/dist/assets/privacy-screen-BGNcisJ2.js +0 -1
  211. package/dist/assets/provider-callback-page-LZHmOo01.js +0 -1
  212. package/dist/assets/provider-key-DIchy_Bc.js +0 -1
  213. package/dist/assets/provider-signup-page-D327vCgu.js +0 -1
  214. package/dist/assets/react-query.gen-CsMIK93J.js +0 -1
  215. package/dist/assets/research-onboarding-route-Dk-9KwG_.js +0 -37
  216. package/dist/assets/return-to-D0TfUwsP.js +0 -1
  217. package/dist/assets/sdk.gen-BwKkHEki.js +0 -1
  218. package/dist/assets/select-assistant-screen-oJuFe0vU.js +0 -1
  219. package/dist/assets/share-feedback-modal-DN1agJEb.js +0 -1
  220. package/dist/assets/signup-page-BaIcYI50.js +0 -1
  221. package/dist/assets/skills-page-wOVBvBdB.js +0 -1
  222. package/dist/assets/subagent-detail-panel-C_GwZcyl.js +0 -4
  223. package/dist/assets/subagent-store-BANqfUgA.js +0 -3
  224. package/dist/assets/three-dot-indicator-DAKo-L_x.js +0 -1
  225. package/dist/assets/tool-detail-panel-DIk8Db76.js +0 -2
  226. package/dist/assets/trace-page-TdKZ1dXH.js +0 -1
  227. package/dist/assets/use-is-org-ready-Dj2-PRLz.js +0 -1
  228. package/dist/assets/use-onboarding-login-CyEAqbC7.js +0 -1
  229. package/dist/assets/viewer-store-BKkbfdPD.js +0 -1
  230. package/dist/assets/workflow-detail-panel-C_rq6yGi.js +0 -1
  231. package/dist/assets/workspace-page-4CJ_pIeB.js +0 -1
  232. package/dist/skills/meet-join/assets/icon.svg +0 -1
  233. /package/dist/assets/{app-info-VB6EcPqh.js → app-info-DJQFoVxX.js} +0 -0
  234. /package/dist/assets/{avatar-bundled-components-DUNo-SZc.js → avatar-bundled-components-w37NPF4o.js} +0 -0
  235. /package/dist/assets/{avatar-svg-compositor-DMVZdMXC.js → avatar-svg-compositor-CNy1XmWD.js} +0 -0
  236. /package/dist/assets/{build.umd-BO4u00Aj.js → build.umd-4R02MPXx.js} +0 -0
  237. /package/dist/assets/{composer-focus-CpeV_gfi.js → composer-focus-n921WsjZ.js} +0 -0
  238. /package/dist/assets/{conversation-selection-DA_7HozA.js → conversation-selection-CNssqGbG.js} +0 -0
  239. /package/dist/assets/{definitions-DiTBkL0Z.js → definitions-BughTGuV.js} +0 -0
  240. /package/dist/assets/{dist-FMUOufe0.js → dist-Ztj3rqLK.js} +0 -0
  241. /package/dist/assets/{edit-chat-session-B8pCxoj8.js → edit-chat-session-DcCgw5Qy.js} +0 -0
  242. /package/dist/assets/{effective-timezone-CND2iNaq.js → effective-timezone-B99h9zr7.js} +0 -0
  243. /package/dist/assets/{emoji-catalog-data-Bg0TbcxL.js → emoji-catalog-data-D8lRMt3A.js} +0 -0
  244. /package/dist/assets/{environment-store-DX2nQ26G.js → environment-store-CnVyTyZ7.js} +0 -0
  245. /package/dist/assets/{format-9aopHqZI.js → format-BDkwdD2m.js} +0 -0
  246. /package/dist/assets/{format-date-C4llqVi6.js → format-date-D4tzd1DT.js} +0 -0
  247. /package/dist/assets/{format-file-size-CCd1QKOV.js → format-file-size-BflZ4oxc.js} +0 -0
  248. /package/dist/assets/{haptics-sqdfYVvS.js → haptics-BE_0g4mc.js} +0 -0
  249. /package/dist/assets/{impersonate-version-flag-v7MjXJjg.js → impersonate-version-flag-DyVWQf97.js} +0 -0
  250. /package/dist/assets/{lib-BUVy-xYr.js → lib-BNGjysgr.js} +0 -0
  251. /package/dist/assets/{llm-dimension-lLHLPAPE.js → llm-dimension-8g-Go8uq.js} +0 -0
  252. /package/dist/assets/{misc-Bm2e0rTa.js → misc-CFzLzLPH.js} +0 -0
  253. /package/dist/assets/{native-deep-link-DGAUYRAY.js → native-deep-link-C2-dXaz_.js} +0 -0
  254. /package/dist/assets/{pdf-RkJbZQTD.js → pdf-B-YWzK66.js} +0 -0
  255. /package/dist/assets/{prechat-names-DqbiM_xi.js → prechat-names-NPlBAwCy.js} +0 -0
  256. /package/dist/assets/{proxy-i05YF9w2.js → proxy-BgtfAoJj.js} +0 -0
  257. /package/dist/assets/{public-asset-B78MSgNd.js → public-asset-C2P77n3W.js} +0 -0
  258. /package/dist/assets/{react-query.gen-DiTBi6eG.js → react-query.gen-gQ1_8EHv.js} +0 -0
  259. /package/dist/assets/{routes-Cj4wRAOK.js → routes-C6gxiCrz.js} +0 -0
  260. /package/dist/assets/{semver-ilCx6Qwk.js → semver-0cyB3qXO.js} +0 -0
  261. /package/dist/assets/{setting-row-DodPe3yk.js → setting-row-BGQgDyhv.js} +0 -0
  262. /package/dist/assets/{status-badge-pill-Bwe3k-op.js → status-badge-pill-j3ke1d9o.js} +0 -0
  263. /package/dist/assets/{step-indicator-dots-DjUaEVje.js → step-indicator-dots-Bc6X141I.js} +0 -0
  264. /package/dist/assets/{typed-storage-CNJeje_7.js → typed-storage-DjORmu8t.js} +0 -0
  265. /package/dist/assets/{usage-window-CL2KEFPC.js → usage-window-B-YOzKJi.js} +0 -0
  266. /package/dist/assets/{use-bus-subscription-CNRtVrPC.js → use-bus-subscription-BNaztnO7.js} +0 -0
  267. /package/dist/assets/{use-is-mobile-BGESxQUL.js → use-is-mobile-jACt_z2d.js} +0 -0
  268. /package/dist/assets/{workflow-status-PqQ1OqJN.js → workflow-status-ByHycBJ_.js} +0 -0
  269. /package/dist/assets/{xterm-CRS9jN9Y.js → xterm-B8LaLTHh.js} +0 -0
  270. /package/dist/assets/{xterm-addon-fit-gN9udZ6n.js → xterm-addon-fit--RE59D-m.js} +0 -0
@@ -0,0 +1,61 @@
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-BG-GkiMq.js";import{t as n}from"./react-DJZBPgpf.js";import{O as r,t as i}from"./button-D-AX8Voo.js";import{d as a,r as o}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./jsx-runtime-CVSDxk6A.js";import{t as l}from"./cn-DvW5mxZR.js";import{t as u}from"./tag-CW6WC4fE.js";import{t as d}from"./input-D4W4p0pZ.js";import{n as f,t as p}from"./create-selectors-BE0_e_Ed.js";import{t as m}from"./arrow-left-CP-EhDNF.js";import{t as h}from"./chevron-left-DghyKSEE.js";import{t as g}from"./chevron-right-B6vEpVY0.js";import{n as _,t as v}from"./animated-avatar-CEC1DGcI.js";import{t as y}from"./loader-circle-BFRVtR3K.js";import{t as b}from"./pencil-B90pDI55.js";import{t as x}from"./x-DxL-bCuT.js";import{$ as S,An as C,B as w,cn as T,jn as E,sn as D}from"./sdk.gen-zA5ns5LT.js";import{r as ee}from"./api-errors-DPruG7q9.js";import{A as te,B as O,L as k,R as A,n as j,z as ne}from"./auth-store-DfeW0asJ.js";import{a as M,o as re,r as N}from"./api-DnqFanVx.js";import{a as ie}from"./routes-C6gxiCrz.js";import{t as P}from"./platform-detection-Ceodt3Hu.js";import{t as ae}from"./client-feature-flag-store-CWOJ-CVU.js";import{c as oe,l as se}from"./prechat-RG0Q0UrS.js";import{A as ce,B as le,C as ue,D as de,E as fe,F as pe,I as F,L as me,M as he,N as ge,O as _e,P as ve,R as I,S as ye,T as L,V as R,_ as be,a as xe,b as z,d as B,f as Se,g as Ce,i as we,j as Te,k as Ee,m as De,o as Oe,p as ke,r as Ae,s as je,t as V,v as Me,w as Ne,x as Pe,y as Fe}from"./proxy-BgtfAoJj.js";import{t as Ie}from"./AnimatePresence-uY0BR2n2.js";import{t as H}from"./use-reduced-motion-BG6r0Z46.js";import{$n as Le,Ma as U,Si as Re,hn as ze,in as Be,it as W,ki as Ve,on as He,qt as Ue,rn as We,rt as Ge,sn as Ke,xt as qe,yt as Je}from"./index-FlO-C4WJ.js";import{t as Ye}from"./prechat-names-NPlBAwCy.js";var Xe=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function Ze(e,t){return he(e)?e[Xe(0,e.length,t)]:e}var Qe=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return $e(this.animations,`duration`)}get iterationDuration(){return $e(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function $e(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var et=class extends Qe{then(e,t){return this.finished.finally(e).then(()=>{})}};function tt(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=fe(i,a,o);return t?s(r):s}function nt(e,t){return e in t}var rt=class extends je{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(nt(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Se()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},G=e(n(),1);function it(e){let t=R(()=>ye(e)),{isStatic:n}=(0,G.useContext)(Ae);if(n){let[,n]=(0,G.useState)(e);(0,G.useEffect)(()=>t.on(`change`,n),[])}return t}function at(e,t){let n=it(t()),r=()=>n.set(t());return r(),le(()=>{let t=()=>Te.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),ce(r)}}),n}function ot(e){Pe.current=[],e();let t=at(Pe.current,e);return Pe.current=void 0,t}function st(e,t,n,r){if(typeof e==`function`)return ot(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return lt(e,t,n,r);let i=typeof t==`function`?t:tt(t,n,r),a=Array.isArray(e)?ct(e,i):ct([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function ct(e,t){let n=R(()=>[]);return at(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function lt(e,t,n,r){let i=R(()=>Object.keys(n)),a=R(()=>({}));for(let o of i)a[o]=st(e,t,n[o],r);return a}function ut(e){e.values.forEach(e=>e.stop())}function dt(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&z(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{dt(e,t)})})}function ft(e,t){if(Array.isArray(t))return dt(e,t);if(typeof t==`string`)return dt(e,[t]);z(e,t)}function pt(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){F(e,`controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.`);let i=[];return t.forEach(e=>{i.push(be(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return F(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{ft(e,n)})},stop(){t.forEach(e=>{ut(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function mt(e){return typeof e==`object`&&!Array.isArray(e)}function ht(e,t,n,r){return e==null?[]:typeof e==`string`&&mt(t)?Ce(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function gt(e,t,n){return e*(t+1)+n*t}function _t(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function vt(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(I(e,i),r--)}}function yt(e,t,n,r,i,a){vt(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Ee(i,a,r[o]),easing:Ze(n,o)})}function bt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function xt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var St=`easeInOut`,Ct=20;function wt(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,_t(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=_t(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Dt(e),{delay:l=0,times:u=Ne(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=ue(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&At(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=ve(b));let r=_e(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&L(u,T),c.length===1&&c.unshift(null),m&&me(m<Ct,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Ct} or apply repeat at the sequence level instead.`),m&&m<Ct){let e=b>0?_/b:0;b=gt(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?ge(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:Ze(f,e-1))}bt(u,m,e)}let E=w+b;yt(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Fe(p)){let e=Tt(p,s);_(m,h,Et(`default`,e))}else{let e=ht(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Tt(r,s);for(let e in m)_(m[e],Ot(h,e),Et(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(xt);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(pe(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(St)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Tt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Et(e,t){return t[e]||(t[e]=[]),t[e]}function Dt(e){return Array.isArray(e)?e:[e]}function Ot(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var kt=e=>typeof e==`number`,At=e=>e.every(kt);function jt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=De(e)&&!ke(e)?new xe(t):new Oe(t);n.mount(e),B.set(e,n)}function Mt(e){let t=new rt({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),B.set(e,t)}function Nt(e,t){return Fe(e)||typeof e==`number`||typeof e==`string`&&!mt(t)}function Pt(e,t,n,r){let i=[];if(Nt(e,t))i.push(we(e,mt(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=ht(e,t,r),o=a.length;F(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?jt:Mt;B.has(r)||s(r);let c=B.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...Me(c,{...t,transition:l},{}))}}return i}function Ft(e,t,n){let r=[];return wt(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=ye(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:de}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Pt(n,e,t))}),r}function It(e){return Array.isArray(e)&&e.some(Array.isArray)}function Lt(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),It(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Ft(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Pt(e,i,{...c,...r},t)}let l=new et(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{I(t.animations,l)})),l}return i}var Rt=Lt();function zt(){let e=R(pt);return le(e.mount,[]),e}var Bt=12;function Vt(e,t){let n=e.slice(0,Bt).map(e=>`- ${e.name} — ${e.description}`).join(`
2
+ `);return n?`
3
+ Capabilities you can offer me — specialized skillsets you can invoke on my behalf, not generic chat:
4
+ ${n}
5
+
6
+ Add a "plugins" array as the FIRST key in your JSON object, ${t?`before "claims" and "suggestions"`:`before "claims"`}: the 1-2 capabilities from the list above (exact names) that best fit who I am — judged by what you researched about my real role, stack, and day-to-day work. (Emit it first so setup can start while you finish the rest.) These get set up for me automatically as part of getting started, so pick by overall fit to ME, not to any single suggestion. Prefer fewer over forcing a match; use [] if nothing clearly fits. Example: "plugins": ["<exact name from the list above>"]. ${t?`Don't reference the setup in the claims or suggestions text.`:`Don't reference the setup in the claims text.`}
7
+ `:``}function Ht({firstName:e,lastName:t,occupation:n,hobby:r},i=[],{includeSuggestions:a=!0}={}){let o=[e.trim(),t.trim()].filter(Boolean).join(` `),s=n.trim(),c=r?.trim()??``,l=Vt(i,a),u=l?`"plugins": ["<exact name from the list above>"], `:``,d=[o?`My name is ${o}.`:``,s?`I work as ${s}.`:``,c?`My hobby is ${c}.`:``].filter(Boolean).join(` `)||`I'd like you to get to know me before we start working together.`,f=a?` "suggestions": [ { "suggestion": "I'll find the 3 newest arXiv eval papers worth your time", "prompt": "Find me the 3 newest arXiv eval papers worth reading." }, { "suggestion": "I'll draft a crisp summary of the latest model-serving trade-offs", "prompt": "Draft me a short summary of the latest model-serving trade-offs." }, { "suggestion": "Connect GitHub and I'll triage your stalest issues", "prompt": "Connect to GitHub and triage my oldest open issues." }, { "suggestion": "I'll plan a weekend climbing trip near Boulder", "prompt": "Plan me a weekend climbing trip near Boulder." } ]`:``,p=`{ ${u}"claims": [ { "claim": "Senior engineer at an AI infra startup", "confidence": "confident", "sources": ["https://linkedin.com/in/example-user"] }, { "claim": "Based in Boulder, CO", "confidence": "confident", "sources": ["https://linkedin.com/in/example-user"] }, { "claim": "Active climber on Mountain Project", "confidence": "maybe", "sources": [] }, { "claim": "Focused on evals or model serving infrastructure", "confidence": "guessing", "sources": ["https://github.com/example-user"] } ]${f?`,${f}`:``} }`;return`${d}
8
+
9
+ Get to know me. Search the web for what's publicly known about the person matching my name and role, and infer a handful of things about who I am: what I do, my role, where I'm based, what I'm into, anything that would help you assist me better. Lean on public sources (LinkedIn, company pages, social profiles, articles, personal sites, GitHub). It's fine to make reasonable inferences and label them honestly.
10
+
11
+ Treat the name, role, and hobby I provided above as first-party context from me. Use public sources to enrich that context, not to override or correct it. If public sources use a different title or omit part of my stated role, do not frame my stated role as wrong; mention the public title only as supporting nuance when it is useful, and keep ${a?`claims and suggestions`:`claims`} aligned with my stated role.
12
+
13
+ CRITICAL: your final reply must be ONLY a JSON object. No preamble, no explanation, no prose, nothing before or after it. Do your thinking and searching, then respond with exactly this shape and nothing else:
14
+
15
+ ${p}
16
+
17
+ Rules for "claims":
18
+
19
+ AT MOST 5 claims, typically 3 to 4. Aim for at least one "confident" and at least one "guessing"; the rest "maybe".
20
+ Phrase each claim in third person as a short headline ("Senior engineer at an AI infra startup", "Based in Boulder, CO", "Active climber on Mountain Project"). No multi-clause sentences, no em-dash asides, no explanations. Good: "Contributed to Chirps (vector-DB security)". Bad: "You've done real work in vector database security. You contributed to Chirps, a tool for scanning vector DBs for sensitive data".
21
+ Each claim must be independently true-or-false so I can remove the ones that are wrong.
22
+ "confidence" is one of: "confident" (well supported by what you found), "maybe" (plausible but unverified), "guessing" (a hunch from limited signal).
23
+ "sources": 0 to 3 URLs you actually used as evidence for that specific claim. Use [] for pure inferences.
24
+ ${a?`Rules for "suggestions":
25
+
26
+ Each suggestion is an object with two fields:
27
+ "suggestion": the offer in YOUR voice (the assistant), exactly as it appears on the clickable card — first-person "I" refers to you (whatever your name). Pattern: "I'll [verb] [specific artifact]" or "Connect me to [integration] and I'll [verb] [artifact]." Lead with the offer; no intake question in front of it — you gather the details in the follow-up conversation after the click.
28
+ "prompt": the same offer re-voiced as the message sent on the user's behalf when they click, in the USER's first person ("I"/"my" = the user) — what they'd say to take you up on it (suggestion "I'll find you 3 papers" → prompt "Find me 3 papers worth reading"). State the request; don't echo the assistant-voiced wording and don't ask a question back.
29
+
30
+ Generate EXACTLY 4 suggestions covering four DIFFERENT capabilities, each making me think "wait, you can do that?" Draw on your range — a quick researched answer, a recurring brief or monitor, a doc drafted in a live editor, an integration (GitHub, Gmail, Calendar, Slack, Linear) connected with a first action, or a hobby hook if research surfaced one — but pick what genuinely fits; don't force a fixed set.
31
+ Ground every suggestion in what you actually learned about me — my real role, stack, industry, and (if given) hobby. Specific to me, not generic assistant stuff; skip bare "summarize" or "draft a post."
32
+ CRITICAL: every suggestion must be a fast win you can deliver in the first reply, never a long-running build. NEVER suggest building an app, dashboard, tool, site, or tracker, or any multi-step "build me a ___" project — those kill the first impression. The ambitious build can come later in the conversation, never on the first card.
33
+ Keep each SHORT and skimmable: under 10 words, ONE clause, ONE artifact, no lists of three ("X, Y, and Z"). The reader scans four cards in seconds — a long line loses them.
34
+ `:``}${l}
35
+ ${a?`Don't include anything sensitive or private. If you found very little, lean on "guessing" claims and broadly useful suggestions for my role.`:`Don't include anything sensitive or private. If you found very little, lean on "guessing" claims.`}
36
+ Keep every string value simple so the JSON always parses: one line, no line breaks inside a value, and NO double-quote characters inside a value — use single quotes (or none) for emphasis, quoted names, or tool names. Output ONLY the JSON object. No code fence, no extra text.`}var Ut=3e3,Wt=3e5,Gt=`Failed to start your assistant. Please try again.`,Kt=`Your assistant is taking longer than expected. Please try again.`,qt=e=>new Promise(t=>setTimeout(t,e));function Jt(){let[e,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)(null),s=(0,G.useRef)(!1),c=(0,G.useRef)([]),l=(0,G.useRef)(null),u=(0,G.useCallback)(e=>{if(!l.current){l.current={kind:`ready`,id:e},n(!0);for(let t of c.current)t.resolve(e);c.current=[]}},[]),d=(0,G.useCallback)(e=>{if(l.current)return;l.current={kind:`error`,message:e},o(e);let t=Error(e);for(let e of c.current)e.reject(t);c.current=[]},[]);return{start:(0,G.useCallback)(()=>{if(s.current)return;s.current=!0;let e=Date.now(),n=()=>Date.now()-e>=Wt;(async()=>{let e;try{let t=await re();if(t.ok)e=t.data.id,i(t.data.id);else{if(A(t.status,t.error)){d(k);return}if(!O(t.status)){d(ee(t.error,void 0,Gt));return}}}catch(e){t(e,{context:`research_background_hatch`})}let r;for(;!r;){if(n()){d(Kt);return}try{let t=await N(e);e&&!t.ok&&t.status===404&&(e=void 0,t=await N());let n=ne(t);if(n.kind===`active`&&t.ok){r=t.data.id,i(r);break}if(n.kind===`error`){d(n.message);return}}catch(e){t(e,{context:`research_background_hatch_poll`})}await qt(Ut)}for(;;){try{if((await M(r)).ok)break}catch{}if(n()){d(Kt);return}await qt(Ut)}u(r)})()},[d,u]),ready:e,assistantId:r,error:a,awaitReady:(0,G.useCallback)(()=>{let e=l.current;return e?.kind===`ready`?Promise.resolve(e.id):e?.kind===`error`?Promise.reject(Error(e.message)):new Promise((e,t)=>{c.current.push({resolve:e,reject:t})})},[])}}async function Yt(e,n){try{await w({path:{assistant_id:e,id:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_archive`})}}var Xt=[`admin-copilot`],Zt=[{plugin:`marketing-expert`,keywords:[`founder`,`cofounder`,`co founder`,`ceo`,`cmo`,`chief executive`,`chief marketing`,`entrepreneur`,`marketing`,`marketer`,`growth`,`brand`,`content`,`copywriter`,`copywriting`,`seo`,`demand gen`,`demand generation`,`sales`,`account executive`,`business development`,`creator`,`social media`,`community manager`]},{plugin:`git-workflow`,keywords:`developer.swe.programmer.coder.devops.dev ops.sre.site reliability.software engineer.software architect.backend engineer.back end engineer.frontend engineer.front end engineer.full stack engineer.fullstack engineer.platform engineer.infrastructure engineer.data engineer.machine learning engineer.ml engineer.qa engineer.embedded engineer.security engineer.staff engineer.principal engineer.solutions architect.tech lead.technical lead.engineering manager.engineering lead.head of engineering.director of engineering.vp of engineering.vp engineering.cto`.split(`.`)}];function Qt(e){return` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `).trim()} `}function $t(e,t){return e.includes(` ${t} `)}function en(e){let t=Qt(e),n=[];for(let{plugin:e,keywords:r}of Zt)r.some(e=>$t(t,e))&&n.push(e);return n}function tn(e,t){let n=[...Xt,...en(e)],r=new Set,i=[];for(let e of n)!t.has(e)||r.has(e)||(r.add(e),i.push(e));return i}var nn=1500,rn=12e4,an=2;function on({complete:e,stableReads:t}){return e&&t>=an}function sn({sawCompletePayload:e}){return e?`done`:`error`}function cn({sawCompletePayload:e}){return e}var ln=`vellum-ai`,un=new Set([`simple-memory`,`level-up`]);function dn(e){let t=e.trim().split(/(?<=\.)\s/)[0]?.trim()??e.trim();return t.length>100?`${t.slice(0,97).trimEnd()}…`:t}function fn(e){return e?.split(`/`)[0]?.trim()??``}function pn(e){let t=[],n=new Set;for(let r of e){let e=r.name?.trim(),i=r.description?.trim();!e||!i||fn(r.source?.repo)===ln&&(un.has(e)||(n.add(e),t.push({name:e,description:dn(i)})))}return{capabilities:t,validNames:n}}async function mn(e){try{return pn((await E({path:{assistant_id:e},throwOnError:!1})).data?.matches??[])}catch(e){return t(e,{context:`research_onboarding_catalog`}),{capabilities:[],validNames:new Set}}}async function hn(e,n){try{await C({path:{assistant_id:e},body:{name:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_install`})}}var gn=e=>new Promise(t=>setTimeout(t,e));function _n({role:e,validNames:t,modelPlugins:n}){return[...new Set([...tn(e,t),...n.filter(e=>t.has(e))])]}function vn(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||n.role!==`assistant`)continue;let r=n.contentBlocks;if(r&&r.length>0){let e=r.filter(e=>e.type===`text`).map(e=>e.text).join(`
37
+ `).trim();if(e)return e}return(n.content??``).trim()}return``}function yn(){let[e,n]=(0,G.useState)({status:`idle`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),r=(0,G.useRef)(0),i=(0,G.useRef)(null),a=(0,G.useRef)(new Map),o=(0,G.useRef)(Promise.resolve()),c=s(),l=(0,G.useCallback)(({awaitAssistantId:e,subject:s,conversationTitle:l,resumeConversationId:u,onConversationCreated:d,includeSuggestions:f=!0})=>{let p=JSON.stringify(s);if(i.current===p)return;i.current=p;let m=r.current+1;r.current=m;let h=()=>r.current!==m,g=()=>{};o.current=new Promise(e=>{g=e}),a.current.clear(),n({status:`running`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),(async()=>{let r,i,o=!1;try{let t=await e();if(r=t,h())return;let{capabilities:c,validNames:p}=await mn(t);if(h())return;let m=Object.fromEntries(c.map(e=>[e.name,e.description]));n(e=>({...e,pluginCatalog:m})),p.size===0&&g();let _=a.current,v=tn(s.occupation,p);for(let e of v)_.has(e)||_.set(e,hn(t,e));v.length>0&&n(e=>({...e,installedPlugins:v}));let y=async e=>{let n={conversationId:e,content:Ht(s,c,{includeSuggestions:f}),sourceChannel:`vellum`,interface:`web`,clientOs:P(),clientMessageId:crypto.randomUUID()};try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(n.clientTimezone=e)}catch{}return!!(await T({path:{assistant_id:t},body:n,throwOnError:!1})).response?.ok},b=async()=>{let e=await S({path:{assistant_id:t},body:{conversationType:`standard`,...l?{title:l}:{}},throwOnError:!1});i=e.data?.id;let n=e.data?.id;if(!(!e.response?.ok||!n))return d?.(n),n},x;if(u){let e=await D({path:{assistant_id:t},query:{conversationId:u},throwOnError:!1});if(h())return;if(e.response?.ok&&(x=u,i=u,!(e.data?.messages??[]).some(e=>e.role===`user`))){if(!await y(x)){n(e=>({...e,status:`error`}));return}if(h())return}}if(!x){if(x=await b(),h())return;if(!x){n(e=>({...e,status:`error`}));return}if(!await y(x)){n(e=>({...e,status:`error`}));return}if(h())return}let C=Date.now()+rn,w=``,E=0;for(;Date.now()<C;){if(await gn(nn),h())return;let e=await D({path:{assistant_id:t},query:{conversationId:x},throwOnError:!1});if(h())return;let r=vn(e.data?.messages??[]);if(r){let{claims:e,suggestions:i,plugins:a,pluginsResolved:c,complete:l}=He(r),u=a.filter(e=>p.has(e));for(let e of u)_.has(e)||_.set(e,hn(t,e));if(c&&g(),n({status:`running`,claims:e,suggestions:i,installedPlugins:_n({role:s.occupation,validNames:p,modelPlugins:u}),pluginCatalog:m}),l&&(o=!0),E=r===w?E+1:0,w=r,on({complete:l,stableReads:E}))break}}if(h())return;n(e=>({...e,status:sn({sawCompletePayload:o})}))}catch(e){if(h())return;t(e,{context:`research_onboarding_runner`}),n(e=>({...e,status:`error`}))}finally{g(),cn({sawCompletePayload:o})&&r&&i&&(await Yt(r,i),Le(c,r))}})()},[c]),u=(0,G.useCallback)(async()=>{await o.current,await Promise.all([...a.current.values()])},[]),d=(0,G.useCallback)((e,t)=>{if(r.current+=1,n(e),t&&e.installedPlugins.length>0){let n=a.current;n.clear();for(let r of e.installedPlugins)n.set(r,(async()=>{try{await hn(await t(),r)}catch{}})())}},[]);return{...e,start:l,awaitPluginInstalls:u,hydrate:d}}function bn({removedClaims:e,rejectedAll:t}){if(t)return[`Correction: none of what you found in that web search is actually me —`,`it looks like you matched someone else with a similar name. Please`,`disregard everything from that search and don't remember any of it as`,`true about me. We'll build up what you actually know about me from here,`,`as we talk.`].join(` `);let n=e.map(e=>e.trim()).filter(Boolean);return n.length===0?null:[`Quick correction on what you found about me — these aren't true, so please`,`disregard them and don't remember them as facts about me:`,``,...n.map(e=>`- ${e}`)].join(`
38
+ `)}async function xn({assistantId:e,conversationId:n,removedClaims:r,rejectedAll:i}){let a=bn({removedClaims:r,rejectedAll:i});if(a){try{let t={conversationId:n,content:a,sourceChannel:`vellum`,interface:`web`,clientOs:P(),clientMessageId:crypto.randomUUID()};await T({path:{assistant_id:e},body:t,throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_correction`})}await Yt(e,n)}}var Sn={companionCoworker:`companion-coworker`,genzBoomer:`genz-boomer`,executeCollaborate:`execute-collaborate`,playfulSerious:`playful-serious`,politeUnfiltered:`polite-unfiltered`},Cn=1500,wn=12e4,Tn=2,En=e=>new Promise(t=>setTimeout(t,e)),Dn=e=>Math.max(0,Math.min(100,Math.round(e)));function On(e,t){let n=t=>Dn(e[t]??50),r=n(Sn.companionCoworker),i=n(Sn.executeCollaborate),a=n(Sn.playfulSerious),o=n(Sn.politeUnfiltered);return`<system-message>
39
+ ${t?.trim()||`The user`} wants to customize your personality.
40
+ This is what they want you to be:
41
+ Companion (0-100): ${100-r}
42
+ Coworker (0-100): ${r}
43
+ Voice Style (0 = Gen Z, 100 = Boomer): ${n(Sn.genzBoomer)}
44
+ Execute Independently (0 - 100): ${100-i}
45
+ Collaborative (0 - 100): ${i}
46
+ Playfulness (0 - 100): ${100-a}
47
+ Seriousness (0 - 100): ${a}
48
+ Politeness (0 - 100): ${100-o}
49
+ Unfiltered Rawness/Crassness (0 - 100): ${o}
50
+
51
+ Rewrite your own identity files (IDENTITY.md and SOUL.md) to reflect your new personality — first person, in a voice and style that matches it. Do not touch users/guardian.md or anything else under users/: that is your user's profile (their name, work, preferences), not your identity.
52
+
53
+ Overwrite each file completely with file_write: write the whole file fresh in one pass. This is a from-scratch rewrite, not an edit — do not append to what's already there, do not patch individual lines, and leave none of the current default wording behind. Fill in every IDENTITY.md placeholder (the _(not yet chosen)_ / _(not yet established)_ fields).
54
+
55
+ Keep your existing name exactly as it is — this changes your personality, not who you are. Do not rename yourself, and if your name is already set, carry it through verbatim (don't treat it as a placeholder to fill).
56
+
57
+ Each rewritten file must still be complete: SOUL.md keeps everything you operate by — how you use memory, your boundaries, your compliance stance — re-expressed in your new voice rather than dropped. When you finish, both files should read top-to-bottom as this new personality, with nothing left in the generic default voice.
58
+ </system-message>`}function kn(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||n.role!==`assistant`)continue;let r=n.contentBlocks;if(r&&r.length>0){let e=r.filter(e=>e.type===`text`).map(e=>e.text).join(`
59
+ `).trim();if(e)return e}return(n.content??``).trim()}return``}async function An({awaitAssistantId:e,values:n,userName:r}){let i,a;try{i=await e();let t=await S({path:{assistant_id:i},body:{conversationType:`standard`,title:`Updating personality`},throwOnError:!1});if(a=t.data?.id,!t.response?.ok||!a)return;let o={conversationId:a,content:On(n,r),sourceChannel:`vellum`,interface:`vellum`,clientMessageId:crypto.randomUUID()};if(!(await T({path:{assistant_id:i},body:o,throwOnError:!1})).response?.ok)return;let s=Date.now()+wn,c=``,l=0;for(;Date.now()<s;){await En(Cn);let e=kn((await D({path:{assistant_id:i},query:{conversationId:a},throwOnError:!1})).data?.messages??[]);if(e&&(l=e===c?l+1:0,c=e,l>=Tn))break}}catch(e){t(e,{context:`research_onboarding_personality`})}finally{if(i&&a)try{await w({path:{assistant_id:i,id:a},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_personality_archive`})}}}function jn(e){return e?`research_onboarding:${e}`:null}function Mn(e){let t=jn(e);if(!t)return null;try{let e=localStorage.getItem(t);return e?JSON.parse(e):null}catch{return null}}function Nn(e,t){let n=jn(e);if(n)try{localStorage.setItem(n,JSON.stringify(t))}catch{}}function Pn(e){let t=jn(e);if(t)try{localStorage.removeItem(t)}catch{}}function Fn(e){return e.research?.status===`done`?`suggestions`:e.step===`meeting`?e.checkinBooked?`looking`:`letschat`:e.step}function In(e,t){if(!e)return null;let n=new Date(e);if(Number.isNaN(n.getTime()))return null;try{return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`,...t?{timeZone:t}:{}}).format(n)}catch{return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(n)}}var K=c(),Ln={w:1280,h:800};function Rn(){return typeof window>`u`?Ln:{w:window.innerWidth,h:window.innerHeight}}function zn(){let[e,t]=(0,G.useState)(null),[n,r]=(0,G.useState)(()=>Rn());return(0,G.useLayoutEffect)(()=>{if(!e)return;let t=()=>{let t=e.getBoundingClientRect();r({w:t.width,h:t.height})};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e]),{ref:t,size:n}}var Bn=(0,G.createContext)(null);function Vn({size:e,children:t}){return(0,K.jsx)(Bn.Provider,{value:e,children:t})}function Hn(){let e=(0,G.useContext)(Bn),[t,n]=(0,G.useState)(()=>Rn());return(0,G.useEffect)(()=>{if(e)return;let t=()=>n(Rn());return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),e??t}var Un={x:.5,y:.4},Wn=[-8,6,9,0,7,-6,5,0,-7,4,-5,6];function Gn(e){return Wn[e%Wn.length]??0}var Kn=[1,0,1,0,1,0,1,0,1,0,0],qn=[.72,1],Jn=[.4,1],Yn=[10,20],Xn=50;function Zn(e){return qn[Kn[e]??1]??1}function Qn(e){return Jn[Kn[e]??1]??1}function $n(e){return Yn[Kn[e]??1]??20}function er(e,t){return Math.round(Math.max(130,Math.min(Math.min(e,t)*.4,420)))}function tr(e,t){return Math.round(Math.max(110,Math.min(Math.min(e,t)*.21,205)))}function nr(e,t,n){let r=n*.4,i=n*.48;return[{x:i,y:i},{x:e*.3,y:r},{x:e*.72,y:r},{x:e-i,y:i},{x:e-r,y:t*.72},{x:e-i,y:t-i},{x:i,y:t-i},{x:r,y:t*.5},{x:e-r,y:t*.3},{x:e*.38,y:t-r},{x:e*.62,y:t-r}]}function rr(e,t,n,r,i){let a=e.x-t,o=e.y-n,s=Math.hypot(a,o)||1,c=Math.max(r,i);return{x:e.x+a/s*c,y:e.y+o/s*c}}function ir({components:e,characters:t,centerChar:n,edgeOrder:r,entering:i,exiting:a,onEnterComplete:o,onSelectChar:s}){let{w:c,h:l}=Hn(),u=H(),d=c<640,f=new Set([4,7,8,9,10]),p=e=>d&&f.has(e),m=er(c,l),h=m/2,g=m/2,_=tr(c,l)/m,y=tr(c,l),b=(0,G.useMemo)(()=>{let e=new Map;return r.forEach((t,n)=>e.set(t,n)),e},[r]),x=Un.x*c,S=Un.y*l,C=x-h,w=S-h,T=(0,G.useMemo)(()=>nr(c,l,g),[c,l,g]);return(0,K.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-0 overflow-hidden`,children:[(0,K.jsx)(`div`,{className:`absolute rounded-[50%] bg-[var(--aux-black,#000)] opacity-20 blur-md`,style:{width:y*.62,height:16,left:x-y*.31,top:S+y*.4}}),t.map((t,r)=>{let d=r===n,f=!u&&i?.char===r,g=!u&&a?.char===r;if(f){let n=T[i.fromSlot],a=rr(n,x,S,c,l),s=Zn(i.fromSlot),u=Qn(i.fromSlot);return(0,K.jsx)(V.div,{className:`absolute left-0 top-0`,style:{width:m,height:m,zIndex:Xn},initial:!1,animate:{x:[n.x-h,a.x-h,a.x-h,C,C,C],y:[n.y-h,a.y-h,a.y-h,w,w,w],scale:[s,s,s,_*.7,_*1.08,_],opacity:[u,u,0,0,1,1]},transition:{duration:.85,times:[0,.28,.34,.42,.72,1],ease:[`easeIn`,`linear`,`linear`,`easeOut`,`easeOut`]},onAnimationComplete:()=>o(r),children:(0,K.jsx)(v,{components:e,traits:t,size:m})},r)}if(g){if(p(a.toSlot))return null;let n=T[a.toSlot],i=rr(n,x,S,c,l),o=Zn(a.toSlot),s=Qn(a.toSlot);return(0,K.jsx)(V.div,{className:`absolute left-0 top-0`,style:{width:m,height:m,zIndex:$n(a.toSlot)},initial:!1,animate:{x:[C,C,i.x-h,i.x-h,n.x-h,n.x-h],y:[w,w,i.y-h,i.y-h,n.y-h,n.y-h],scale:[_,_*.6,o,o,o*1.1,o],opacity:[1,0,0,s,s,s]},transition:{duration:.85,times:[0,.28,.34,.45,.78,1],ease:[`easeIn`,`linear`,`linear`,`easeOut`,`easeOut`]},children:(0,K.jsx)(`div`,{style:{transform:`rotate(${Gn(a.toSlot)}deg)`},children:(0,K.jsx)(v,{components:e,traits:t,size:m,breathe:!1})})},r)}let y=b.get(r)??0;if(!d&&p(y))return null;let E=d?{x,y:S}:T[y];return(0,K.jsx)(V.div,{className:`absolute left-0 top-0 ${d?``:`pointer-events-auto cursor-pointer`}`,style:{width:m,height:m,zIndex:d?Xn:$n(y)},initial:!1,animate:{x:E.x-h,y:E.y-h,scale:d?_:Zn(y),opacity:d?1:Qn(y)},transition:u?{duration:0}:{type:`spring`,stiffness:230,damping:26},onClick:d?void 0:()=>s(r),children:(0,K.jsx)(`div`,{style:{transform:d?void 0:`rotate(${Gn(b.get(r)??0)}deg)`},children:(0,K.jsx)(v,{components:e,traits:t,size:m,breathe:d})})},r)})]})}var ar=[{bodyShape:`urchin`,eyeStyle:`goofy`,color:`teal`},{bodyShape:`blob`,eyeStyle:`grumpy`,color:`purple`},{bodyShape:`star`,eyeStyle:`surprised`,color:`orange`},{bodyShape:`blob`,eyeStyle:`gentle`,color:`pink`},{bodyShape:`ninja`,eyeStyle:`angry`,color:`yellow`},{bodyShape:`urchin`,eyeStyle:`curious`,color:`pink`},{bodyShape:`burst`,eyeStyle:`quirky`,color:`orange`},{bodyShape:`ghost`,eyeStyle:`bashful`,color:`green`},{bodyShape:`sprout`,eyeStyle:`dazed`,color:`orange`},{bodyShape:`star`,eyeStyle:`goofy`,color:`teal`},{bodyShape:`flower`,eyeStyle:`angry`,color:`pink`},{bodyShape:`cloud`,eyeStyle:`curious`,color:`yellow`}],q=p(f((e,t)=>({characters:[],selectedIndex:0,ensureGenerated:()=>{t().characters.length>0||e({characters:ar,selectedIndex:0})},setSelectedIndex:t=>e({selectedIndex:t}),selectNext:()=>e(e=>({selectedIndex:e.characters.length===0?0:(e.selectedIndex+1)%e.characters.length})),selectPrev:()=>e(e=>({selectedIndex:e.characters.length===0?0:(e.selectedIndex-1+e.characters.length)%e.characters.length}))})));function or(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function sr(){let e=W(),t=q.use.characters(),n=q.use.ensureGenerated(),r=H(),{w:i,h:a}=or();(0,G.useEffect)(()=>{e&&n(e)},[e,n]);let o=er(i,a),s=(0,G.useMemo)(()=>nr(i,a,o/2),[i,a,o]),c=i<640,l=new Set([4,7,8,9,10]);return!e||t.length===0?null:(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none fixed inset-0 z-0 overflow-hidden`,children:t.map((t,n)=>{if(n===0)return null;let i=n-1;if(c&&l.has(i))return null;let a=s[i];if(!a)return null;let u=Wn[i%Wn.length]??0,d=o*Zn(i),f=Qn(i),p=$n(i);return(0,K.jsx)(`div`,{className:`absolute`,style:{left:a.x-d/2,top:a.y-d/2,width:d,height:d,zIndex:p,animation:r?void 0:`character-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${.1+n*.05}s both`},children:(0,K.jsx)(`div`,{style:{opacity:f,transform:`rotate(${u}deg)`},children:(0,K.jsx)(v,{components:e,traits:t,size:d,breathe:!1})})},n)})})}var cr=l(`flex w-full items-center gap-1.5 rounded-md border bg-[var(--field-bg)] px-3`,`border-[var(--field-border)] transition-[border-color,background-color] duration-150 ease-out`,`focus-within:border-[var(--border-active)]`),lr=l(`min-w-0 flex-1 bg-transparent text-body-medium-lighter text-[var(--content-default)]`,`placeholder:text-[var(--content-tertiary)] outline-none`);function J(e){return e.trim().toLowerCase()}function ur(e,t,n=[],r=8){let i=J(t),a=new Set(n.map(J)),o=[];for(let t of e)if(!a.has(J(t))&&((i.length===0||J(t).includes(i))&&o.push(t),o.length>=r))break;return o}function dr({id:e,options:t,highlighted:n,showAddHint:r,onPick:i,onHover:a}){return(0,K.jsxs)(`ul`,{id:e,role:`listbox`,className:l(`absolute left-0 right-0 top-full z-50 mt-1.5 max-h-60 overflow-auto`,`rounded-lg bg-[var(--surface-lift)] p-1 shadow-[var(--shadow-popover)]`,`animate-[fadeInUp_0.12s_ease-out]`),children:[t.map((t,r)=>(0,K.jsx)(`li`,{id:`${e}-opt-${r}`,role:`option`,"aria-selected":r===n,onMouseDown:e=>{e.preventDefault(),i(t.value)},onMouseEnter:()=>a(r),className:l(`flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5`,`text-body-medium-lighter text-[var(--content-default)]`,r===n?`bg-[var(--surface-base)]`:`bg-transparent`),children:t.isAdd?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ve,{size:15,className:`shrink-0 text-[var(--content-tertiary)]`}),(0,K.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Add “`,t.value,`”`]}),(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-body-small-default text-[var(--content-tertiary)]`,children:`↵ Enter`})]}):t.value},t.isAdd?`__add__${t.value}`:t.value)),r&&(0,K.jsx)(`li`,{role:`presentation`,className:`mt-0.5 border-t border-[var(--border-base)] px-2.5 pb-0.5 pt-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:`Type anything and press ↵ to add your own`})]})}function fr({htmlFor:e,required:t,children:n}){return(0,K.jsxs)(`label`,{htmlFor:e,className:`text-body-small-default text-[var(--content-secondary)]`,children:[n,t?(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`}):null]})}function pr(e,t){(0,G.useEffect)(()=>{function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])}function mr({label:e,placeholder:t,values:n,onChange:r,suggestions:i}){let a=(0,G.useId)(),o=`tac-${a}`,s=`tac-list-${a}`,c=(0,G.useRef)(null),[d,f]=(0,G.useState)(``),[p,m]=(0,G.useState)(!1),[h,g]=(0,G.useState)(-1),_=(0,G.useMemo)(()=>ur(i,d,n),[i,d,n]),v=d.trim(),y=(0,G.useMemo)(()=>{if(!v)return!1;let e=J(v);return!(n.some(t=>J(t)===e)||_.some(t=>J(t)===e))},[v,n,_]),b=(0,G.useMemo)(()=>{let e=_.map(e=>({value:e,isAdd:!1}));return y?[...e,{value:v,isAdd:!0}]:e},[_,y,v]);pr(c,()=>m(!1)),(0,G.useEffect)(()=>{g(e=>e>=b.length?b.length-1:e)},[b.length]);let x=p&&b.length>0,S=!y;function C(e){let t=e.trim();t&&(n.some(e=>J(e)===J(t))||r([...n,t]),f(``),g(-1))}function w(e){r(n.filter(t=>t!==e))}function T(e){e.key===`ArrowDown`?(e.preventDefault(),m(!0),g(e=>Math.min(e+1,b.length-1))):e.key===`ArrowUp`?(e.preventDefault(),g(e=>Math.max(e-1,0))):e.key===`Enter`?x&&h>=0?(e.preventDefault(),C(b[h].value)):d.trim()&&(e.preventDefault(),C(d)):e.key===`,`?(e.preventDefault(),C(d)):e.key===`Backspace`&&d.length===0&&n.length>0?w(n[n.length-1]):e.key===`Escape`&&m(!1)}return(0,K.jsxs)(`div`,{ref:c,className:`relative flex flex-col gap-1.5`,children:[(0,K.jsx)(fr,{htmlFor:o,children:e}),(0,K.jsxs)(`div`,{className:l(cr,`min-h-9 flex-wrap py-1.5`),children:[(0,K.jsx)(Re,{size:16,"aria-hidden":!0,className:`shrink-0 self-center text-[var(--content-tertiary)]`}),n.map(e=>(0,K.jsx)(u,{onRemove:()=>w(e),removeLabel:`Remove ${e}`,className:`border border-[var(--border-base)] bg-[var(--surface-base)]`,children:e},e)),(0,K.jsx)(`input`,{id:o,role:`combobox`,"aria-expanded":x,"aria-controls":s,"aria-autocomplete":`list`,"aria-activedescendant":h>=0?`${s}-opt-${h}`:void 0,autoComplete:`off`,className:l(lr,`h-6 w-24`),placeholder:n.length===0?t:``,value:d,onChange:e=>{f(e.target.value),m(!0)},onFocus:()=>m(!0),onKeyDown:T})]}),x&&(0,K.jsx)(dr,{id:s,options:b,highlighted:h,showAddHint:S,onPick:C,onHover:g})]})}var hr=`Reading.Writing.Cooking.Baking.Gardening.Photography.Painting.Drawing.Hiking.Running.Cycling.Swimming.Yoga.Climbing.Weightlifting.Gaming.Board games.Chess.Traveling.Cars.Woodworking.Knitting.Playing guitar.Playing piano.Singing.Dancing.Fishing.Camping.Surfing.Skiing.Snowboarding.Coffee.Wine.Birdwatching.Pottery.Investing.Podcasts.Movies.Soccer.Basketball.Tennis.Golf.Meditation.Volunteering.Astronomy.3D printing`.split(`.`);function Y(e,t){return{animation:`fadeInUp 0.4s ease-out ${e}s both`,...t==null?{}:{position:`relative`,zIndex:t}}}function gr({initialFirstName:e=``,initialLastName:t=``,onSubmit:n}){let[r,a]=(0,G.useState)(e),[o,s]=(0,G.useState)(t),[c,l]=(0,G.useState)(``),[u,f]=(0,G.useState)([]),p=r.trim().length>0&&c.trim().length>0;function m(){p&&n({firstName:r,lastName:o,role:c,hobbies:u})}return(0,K.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,children:(0,K.jsxs)(We,{showCreatureFooter:!1,children:[(0,K.jsx)(sr,{}),(0,K.jsxs)(`form`,{className:`relative z-10 mx-auto flex min-h-screen w-full max-w-sm flex-col items-center justify-center px-6 py-16 text-[var(--content-default)]`,onSubmit:e=>{e.preventDefault(),m()},children:[(0,K.jsx)(`h1`,{className:`text-center font-serif text-[2.75rem] leading-[1.05] tracking-tight`,style:Y(.05),children:`Let's start with you.`}),(0,K.jsx)(`p`,{className:`mt-3 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:Y(.12),children:`A few details so I can get to know you.`}),(0,K.jsxs)(`div`,{className:`mt-10 flex w-full flex-col gap-5`,children:[(0,K.jsx)(`div`,{style:Y(.2,40),children:(0,K.jsx)(d,{label:(0,K.jsxs)(K.Fragment,{children:[`What should I call you?`,(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`})]}),placeholder:`Your name`,value:r,onChange:e=>a(e.target.value),autoFocus:!0,required:!0,fullWidth:!0})}),(0,K.jsx)(`div`,{style:Y(.27,30),children:(0,K.jsx)(d,{label:`And your last name?`,placeholder:`Your last name (optional)`,value:o,onChange:e=>s(e.target.value),fullWidth:!0})}),(0,K.jsx)(`div`,{style:Y(.34,20),children:(0,K.jsx)(d,{label:`Your role`,placeholder:`What do you do for work?`,value:c,onChange:e=>l(e.target.value),required:!0,fullWidth:!0})}),(0,K.jsx)(`div`,{style:Y(.41,10),children:(0,K.jsx)(mr,{label:`Any hobbies?`,placeholder:`Cars, books, growing tomatoes?`,values:u,onChange:f,suggestions:hr})})]}),(0,K.jsx)(`div`,{className:`mt-10 w-full`,style:Y(.5),children:(0,K.jsx)(i,{type:`submit`,variant:`primary`,size:`regular`,rightIcon:(0,K.jsx)(U,{size:16}),fullWidth:!0,disabled:!p,className:`h-11 text-base`,children:`Continue`})})]})]})})}var _r=`#1A1A1A`,vr=`#FFFFFF`;function yr(e){let t=/^#?([0-9a-f]{6})$/i.exec(e);if(!t)return 0;let n=parseInt(t[1],16),r=n>>16&255,i=n>>8&255,a=n&255;return(r*299+i*587+a*114)/1e3/255}function br(e,t){let n=/^#?([0-9a-f]{6})$/i.exec(e);if(!n)return e;let r=parseInt(n[1],16),i=e=>Math.max(0,Math.min(255,Math.round((r>>e&255)*t)));return`#${(1<<24|i(16)<<16|i(8)<<8|i(0)).toString(16).slice(1)}`}function xr(e){let t=yr(e)>.6;return{bg:e,isLight:t,fg:t?_r:vr,fgDeep:br(e,.6),fgMuted:t?`rgba(0,0,0,0.6)`:`rgba(255,255,255,0.65)`,wash:t?`rgba(0,0,0,0.08)`:`rgba(255,255,255,0.12)`}}function X(){let e=W(),t=q.use.characters(),n=q.use.selectedIndex();return(0,G.useMemo)(()=>{let r=t[n],i=e?.colors.find(e=>e.id===r?.color)?.hex;return xr(i??`var(--surface-base)`)},[e,t,n])}function Z({onBack:e,onNext:t,tone:n}){let r=X(),i=n?n===`dark`?`#1A1A1A`:`#FFFFFF`:r.fg,a=n?n===`dark`?`rgba(0,0,0,0.08)`:`rgba(255,255,255,0.12)`:r.wash;return(0,K.jsxs)(`div`,{className:`absolute left-4 top-6 z-10 flex items-center gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:e,"aria-label":`Back`,className:`flex cursor-pointer h-8 w-8 items-center justify-center rounded-md transition-colors duration-150`,style:{color:i},onMouseEnter:e=>e.currentTarget.style.backgroundColor=a,onMouseLeave:e=>e.currentTarget.style.backgroundColor=`transparent`,children:(0,K.jsx)(h,{className:`h-5 w-5`})}),t?(0,K.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Forward`,className:`flex cursor-pointer h-8 w-8 items-center justify-center rounded-md transition-colors duration-150`,style:{color:i},onMouseEnter:e=>e.currentTarget.style.backgroundColor=a,onMouseLeave:e=>e.currentTarget.style.backgroundColor=`transparent`,children:(0,K.jsx)(g,{className:`h-5 w-5`})}):null]})}var Sr=[`Ziggy`,`Quill`,`Luna`,`Remy`,`Cleo`,`Cade`];function Cr(e,t){let n=[];for(let r=0;r<e;r++)r!==t&&n.push(r);return{centerChar:t,edgeOrder:n}}function wr({onContinue:e,onBack:t,onForward:n}){let r=W(),a=q.use.characters(),o=q.use.ensureGenerated(),s=q.use.selectedIndex(),c=q.use.setSelectedIndex();(0,G.useEffect)(()=>{r&&o(r)},[r,o]);let l=a.length,[u,d]=(0,G.useState)(null),[f,p]=(0,G.useState)(``),[h,g]=(0,G.useState)(!1),v=(0,G.useRef)(!1),y=(0,G.useRef)(null),{ref:x,size:S}=zn(),[C,w]=(0,G.useState)(null);(0,G.useEffect)(()=>{l>0&&u===null&&d(Cr(l,s))},[l,s,u]),(0,G.useEffect)(()=>{u&&c(u.centerChar)},[u,c]);let T=u?.centerChar;(0,G.useEffect)(()=>{T!=null&&!v.current&&p(Sr[T%Sr.length])},[T]),(0,G.useEffect)(()=>{h&&(y.current?.focus(),y.current?.select())},[h]);function E(e){if(!u||e===u.centerChar)return;let t=u.edgeOrder.indexOf(e);if(t<0)return;let n=[...u.edgeOrder];n[t]=u.centerChar,w({entering:{char:e,fromSlot:t},exiting:{char:u.centerChar,toSlot:t}}),d({centerChar:e,edgeOrder:n})}let D=()=>u&&E((u.centerChar+1)%l),ee=()=>u&&E((u.centerChar-1+l)%l),te=(0,G.useMemo)(()=>u?a[u.centerChar]:void 0,[u,a]),O=!!r&&!!u&&!!te;function k(){te&&e({traits:te,name:f.trim()})}function A(){v.current=!0,p(e=>{let t=Sr.filter(t=>t!==e),n=t.length>0?t:Sr;return n[Math.floor(Math.random()*n.length)]})}let j=`pointer-events-auto z-10 flex cursor-pointer h-10 w-10 items-center justify-center rounded-full bg-[color-mix(in_srgb,var(--content-default)_10%,transparent)] text-[var(--content-default)] transition-colors duration-150 hover:bg-[color-mix(in_srgb,var(--content-default)_18%,transparent)]`;return(0,K.jsx)(`div`,{ref:x,"data-theme":`dark`,className:`relative h-full overflow-hidden bg-[var(--surface-base)] text-[var(--content-default)]`,children:(0,K.jsxs)(Vn,{size:S,children:[O&&(0,K.jsx)(ir,{components:r,characters:a,centerChar:u.centerChar,edgeOrder:u.edgeOrder,entering:C?.entering??null,exiting:C?.exiting??null,onEnterComplete:e=>w(t=>t?.entering.char===e?null:t),onSelectChar:E}),(0,K.jsx)(Z,{tone:`light`,onBack:t,onNext:n?k:void 0}),(0,K.jsx)(`h1`,{className:`absolute left-1/2 top-[19%] z-10 -translate-x-1/2 whitespace-nowrap text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`,animation:`fadeInUp 0.4s ease-out both`},children:`Give me a face and a name`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":`Previous character`,onClick:ee,className:`absolute left-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${j}`,children:(0,K.jsx)(m,{className:`h-4 w-4`})}),(0,K.jsx)(`button`,{type:`button`,"aria-label":`Next character`,onClick:D,className:`absolute right-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${j}`,children:(0,K.jsx)(U,{className:`h-4 w-4`})}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[51%] z-10 flex -translate-x-1/2 flex-col items-center gap-12`,children:[h?(0,K.jsx)(`input`,{ref:y,value:f,onChange:e=>{v.current=!0,p(e.target.value)},onBlur:()=>g(!1),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),g(!1))},placeholder:`Name your assistant`,"aria-label":`Assistant name`,className:`w-[234px] rounded-2xl border border-[var(--border-element)] bg-transparent px-4 py-2.5 text-center text-lg text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none transition-colors duration-150 focus:border-[var(--border-active)]`}):(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>g(!0),"aria-label":`Edit name`,className:`flex cursor-pointer items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-medium ${f?`text-[var(--content-default)]`:`text-[var(--content-tertiary)]`}`,children:f||`Name your assistant`}),(0,K.jsx)(b,{className:`h-5 w-5 text-[var(--content-tertiary)]`})]}),(0,K.jsx)(`button`,{type:`button`,onClick:A,"aria-label":`Shuffle name`,title:`Shuffle name`,className:`cursor-pointer text-[var(--content-tertiary)] transition-[transform,color] duration-300 hover:rotate-180 hover:text-[var(--content-default)]`,children:(0,K.jsx)(_,{className:`h-5 w-5`})})]}),(0,K.jsx)(i,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,K.jsx)(U,{size:16}),disabled:!O,onClick:k,className:`h-11 w-[234px] text-base`,children:`Continue`})]})]})})}var Tr=`absolute left-1/2 top-[30%] z-10 flex w-full -translate-x-1/2 flex-col items-center gap-8 px-6 text-center`,Er=/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,Dr=/[MmLlHhVvCcSsQqTtAaZz][^MmLlHhVvCcSsQqTtAaZz]*/g;function Or(e){let t=1/0,n=1/0,r=-1/0,i=-1/0,a=0,o=0,s=(e,a)=>{e<t&&(t=e),a<n&&(n=a),e>r&&(r=e),a>i&&(i=a)},c=e.match(Dr)??[];for(let e of c){let t=e[0],n=t.toUpperCase();if(n===`Z`)continue;let r=t!==n,i=(e.slice(1).match(Er)??[]).map(Number);if(n===`H`)for(let e of i)a=r?a+e:e,s(a,o);else if(n===`V`)for(let e of i)o=r?o+e:e,s(a,o);else if(n===`A`)for(let e=0;e+7<=i.length;e+=7){let t=i[e+5],n=i[e+6];a=r?a+t:t,o=r?o+n:n,s(a,o)}else{let e=a,t=o;for(let n=0;n+2<=i.length;n+=2){let c=r?e+i[n]:i[n],l=r?t+i[n+1]:i[n+1];s(c,l),n+2>=i.length-i.length%2&&(a=c,o=l)}}}return t===1/0?{x:0,y:0,w:0,h:0}:{x:t,y:n,w:r-t,h:i-n}}function kr(e){let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y)),r=Math.max(...e.map(e=>e.x+e.w)),i=Math.max(...e.map(e=>e.y+e.h));return{x:t,y:n,w:r-t,h:i-n}}var Ar=.25,jr=.46,Mr=.3,Nr=.85,Pr=40,Fr=14,Ir=8;function Lr({entrance:e=!1,entranceDelay:t=0,bumpNonce:n=0,settleBlink:r=!0}){let i=W(),a=q.use.characters(),o=q.use.selectedIndex(),s=H(),{w:c,h:l}=Hn(),[u,d]=(0,G.useState)({x:0,y:0});(0,G.useEffect)(()=>{if(s)return;let e=e=>{d({x:(e.clientX/window.innerWidth-.5)*2,y:(e.clientY/window.innerHeight-.5)*2})};return window.addEventListener(`mousemove`,e),()=>window.removeEventListener(`mousemove`,e)},[s]);let f=e&&!s,p=zt();(0,G.useEffect)(()=>{n>0&&!s&&p.start({y:[0,-34,8,0],transition:{duration:.45,ease:`easeOut`}})},[n,s,p]);let[m,h]=(0,G.useState)(!1),[g,_]=(0,G.useState)(!e);(0,G.useEffect)(()=>{if(s||!g)return;let e=!1,t,n=n=>{e||(h(!0),t=setTimeout(()=>{e||(h(!1),t=setTimeout(n,140))},140))},i=()=>{t=setTimeout(()=>n(i),2500+Math.random()*4e3)};return r?n(()=>n(i)):i(),()=>{e=!0,clearTimeout(t)}},[s,g,r]);let v=a.length>0?a[o]:void 0,y=(0,G.useMemo)(()=>{if(!i||!v)return null;let e=i.eyeStyles.find(e=>e.id===v.eyeStyle);return e?{paths:e.paths,bbox:kr(e.paths.map(e=>Or(e.svgPath)))}:null},[i,v]);if(!y)return null;let b=c*Nr,x=Math.min(Math.min(c,l)*Mr,b*y.bbox.h/y.bbox.w),S=x*y.bbox.w/y.bbox.h,C=(c-S)/2,w=l-(1-Ar)*x,T=Pr/100*l-(w+x/2),E=(jr-Ar)*x,D=y.bbox.x+y.bbox.w/2,ee=y.bbox.y+y.bbox.h/2;return(0,K.jsx)(V.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[2]`,style:{left:C,top:w,width:S,height:x,transformOrigin:`center`},initial:f?{y:T,scale:.35}:!1,animate:f?{y:[T,E,0],scale:[.35,1,1]}:{y:0,scale:1},transition:f?{duration:1,delay:t,times:[0,.7,1],ease:`easeInOut`}:{duration:0},onAnimationComplete:()=>_(!0),children:(0,K.jsx)(V.div,{animate:p,children:(0,K.jsx)(`div`,{style:{transform:`translate(${u.x*Fr}px, ${u.y*Ir}px)`,transition:`transform 0.5s cubic-bezier(0.22, 1, 0.36, 1)`},children:(0,K.jsx)(`svg`,{viewBox:`${y.bbox.x} ${y.bbox.y} ${y.bbox.w} ${y.bbox.h}`,width:S,height:x,style:{overflow:`visible`,display:`block`},children:(0,K.jsx)(`g`,{style:{transform:m?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${D}px ${ee}px`,transition:`transform 0.14s ease-in-out`},children:y.paths.map((e,t)=>(0,K.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})})})}var Rr=200,zr=40;function Br({firstName:e,assistantName:t,onContinue:n,onBack:r,onForward:a}){let o=W(),s=q.use.characters(),c=q.use.selectedIndex(),l=H(),{ref:u,size:{w:d,h:f}}=zn(),p=X(),m=s.length>0?s[c]:void 0,h=(0,G.useMemo)(()=>{if(!o||!m)return null;let e=o.bodyShapes.find(e=>e.id===m.bodyShape),t=o.colors.find(e=>e.id===m.color);return!e||!t?null:{body:e,color:t.hex}},[o,m]),g=e.trim()?`Hey, ${e.trim()}!`:`Hey!`,_=t?.trim()?`I’m ${t.trim()}, your new AI assistant`:`I’m your new AI assistant`;if(!h)return(0,K.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,style:{backgroundColor:`var(--surface-base)`}});let v=1.25*Math.max(d,f),y=v*h.body.viewBox.height/h.body.viewBox.width,b=(d-v)/2,x=(f-y)/2,S=Rr/v,C=(zr/100-.5)*f;return(0,K.jsx)(`div`,{ref:u,"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`},children:(0,K.jsxs)(Vn,{size:{w:d,h:f},children:[(0,K.jsx)(V.div,{className:`absolute inset-0 z-0`,style:{backgroundColor:h.color},initial:l?!1:{opacity:0},animate:{opacity:1},transition:l?{duration:0}:{duration:.6,delay:.35}}),(0,K.jsx)(V.svg,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,viewBox:`0 0 ${h.body.viewBox.width} ${h.body.viewBox.height}`,width:v,height:y,style:{left:b,top:x,transformOrigin:`center`},initial:l?!1:{scale:S,y:C},animate:{scale:1,y:0},transition:l?{duration:0}:{type:`spring`,stiffness:78,damping:18,mass:1},children:(0,K.jsx)(`path`,{d:h.body.svgPath,fill:h.color})}),(0,K.jsx)(Lr,{entrance:!0}),(0,K.jsx)(V.div,{initial:l?!1:{opacity:0},animate:{opacity:1},transition:l?{duration:0}:{duration:.4,delay:1},children:(0,K.jsx)(Z,{onBack:r,onNext:a})}),(0,K.jsxs)(`div`,{className:Tr,children:[(0,K.jsxs)(V.h1,{className:`text-center leading-[1.05]`,style:{fontFamily:`var(--font-serif)`},initial:l?!1:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:l?{duration:0}:{type:`spring`,stiffness:260,damping:11,delay:1},children:[(0,K.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:p.fgDeep},children:g}),(0,K.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:p.fg},children:_})]}),(0,K.jsx)(V.div,{initial:l?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:l?{duration:0}:{duration:.4,delay:1.15},children:(0,K.jsx)(i,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,K.jsx)(U,{size:16}),onClick:n,className:`h-11 w-[234px] text-base`,children:`Continue`})})]})]})})}var Vr=.3,Hr=.85,Ur=.25;function Wr(){let e=W(),t=q.use.characters(),n=q.use.selectedIndex(),r=t.length>0?t[n]:void 0,{w:i,h:a}=Hn(),o=(0,G.useMemo)(()=>{if(!e||!r)return null;let t=e.eyeStyles.find(e=>e.id===r.eyeStyle);return t?{paths:t.paths,bbox:kr(t.paths.map(e=>Or(e.svgPath)))}:null},[e,r]),s=o?Math.min(Math.min(i,a)*Vr,i*Hr*o.bbox.h/o.bbox.w):0;return{art:o,eyesW:o?s*o.bbox.w/o.bbox.h:0,eyesH:s,restCy:a-Ur*s,centerX:i/2,w:i,h:a}}function Gr({art:e,eyesW:t,eyesH:n,centerX:r,eyeCy:i,eyeScale:a,eyeX:o,blinking:s,className:c=`pointer-events-none absolute top-0 z-0`}){let l=st(i,e=>e-n/2),u=e.bbox.x+e.bbox.w/2,d=e.bbox.y+e.bbox.h/2;return(0,K.jsx)(V.div,{"aria-hidden":`true`,className:c,style:{left:r-t/2,top:0,x:o,y:l,width:t,height:n,scale:a,transformOrigin:`center`},children:(0,K.jsx)(`svg`,{viewBox:`${e.bbox.x} ${e.bbox.y} ${e.bbox.w} ${e.bbox.h}`,width:t,height:n,style:{overflow:`visible`,display:`block`},children:(0,K.jsx)(`g`,{style:{transform:s?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${u}px ${d}px`,transition:`transform 0.13s ease-in-out`},children:e.paths.map((e,t)=>(0,K.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})}var Kr={green:[`pink`,`purple`,`orange`,`yellow`],orange:[`teal`,`purple`,`green`,`yellow`],pink:[`teal`,`green`,`yellow`,`purple`],purple:[`yellow`,`teal`,`green`,`orange`],teal:[`pink`,`orange`,`yellow`,`purple`],yellow:[`purple`,`teal`,`pink`,`green`]};function qr(e,t){let n=Kr[e];return n&&n.length>0?n:t.filter(t=>t!==e)}var Jr=new Set([`orange`,`pink`,`red`]);function Yr(e,t){return Jr.has(e)&&Jr.has(t)}function Xr(e,t,n){let r=qr(e,t),i=[];for(let e of r){if(i.length>=n)break;i.some(t=>Yr(t,e))||i.push(e)}for(let e of r){if(i.length>=n)break;i.includes(e)||i.push(e)}return i}var Zr=`You’ve used AI that just answers questions`,Qr=`The more I help`,$r=`I’m different`,ei=`The better I get`,ti=`and the less you have to do`,ni=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],ri=290;function ii({firstH:e,secondH:t,color:n,firstText:r,secondText:i,revealed:a,carouseled:o,revealFrom:s,revealDuration:c,reduce:l}){let u=s===`bottom`?`inset(100% 0 0 0)`:`inset(0 0 100% 0)`;return!e||!t?null:(0,K.jsx)(V.div,{className:`relative w-full overflow-hidden`,initial:!1,animate:{height:o?t:e},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`},children:(0,K.jsxs)(V.div,{className:`flex flex-col`,style:{color:n},initial:!1,animate:{y:o?-e:0},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`},children:[(0,K.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:e},children:(0,K.jsx)(V.span,{className:`block`,initial:!1,animate:{clipPath:a?`inset(0% 0 0% 0)`:u},transition:l?{duration:0}:{duration:c,ease:`easeOut`},children:r})}),(0,K.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:t},children:(0,K.jsx)(`span`,{className:`block`,children:i})})]})})}function ai({onContinue:e,onBack:t,onForward:n}){let r=X(),a=H(),{art:o,eyesW:s,eyesH:c,restCy:l,centerX:u,w:d,h:f}=Wr(),p=W(),m=q.use.characters(),h=q.use.selectedIndex(),g=m.length>0?m[h]:void 0,_=f>0&&f<=800,y=_?.17:.22,b=_?`top-[17%]`:`top-[22%]`,x=it(0),S=it(1),C=(0,G.useMemo)(()=>!p||!g?`orange`:Xr(g.color,p.colors.map(e=>e.id),1)[0]??`orange`,[p,g]),w=Math.min(220,Math.max(150,d*.16)),T=-w,E=-w*.4,D=it(-220),ee=(0,G.useMemo)(()=>!p||!g?[]:Xr(g.color,p.colors.map(e=>e.id),3),[p,g]),te=Math.max(.42,Math.min(d/1100,1)),O=Math.round(ri*te),k=-O*1.1,A=-O*.42,j=it(-320),[ne,M]=(0,G.useState)(!!a),[re,N]=(0,G.useState)(!!a),[ie,P]=(0,G.useState)(!1),[ae,oe]=(0,G.useState)(!1),[se,ce]=(0,G.useState)(!1),[le,ue]=(0,G.useState)(!1),[de,fe]=(0,G.useState)(!!a),pe=Math.min(d,768)-48,F=(0,G.useRef)(null),me=(0,G.useRef)(null),he=(0,G.useRef)(null),ge=(0,G.useRef)(null),_e=(0,G.useRef)(null),[ve,I]=(0,G.useState)(0),[ye,L]=(0,G.useState)(0),[R,be]=(0,G.useState)(0),[xe,z]=(0,G.useState)(0),[B,Se]=(0,G.useState)(0);return(0,G.useLayoutEffect)(()=>{F.current?.offsetHeight&&I(F.current.offsetHeight),me.current?.offsetHeight&&L(me.current.offsetHeight),he.current?.offsetHeight&&be(he.current.offsetHeight),ge.current?.offsetHeight&&z(ge.current.offsetHeight),_e.current?.offsetHeight&&Se(_e.current.offsetHeight)},[pe]),(0,G.useEffect)(()=>{x.set(l),ue(!0)},[l,x]),(0,G.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{P(!0),oe(!0),ce(!0)},1400);return()=>clearTimeout(e)},[a]),(0,G.useEffect)(()=>{if(a||!o)return;x.set(l),S.set(1),D.set(T),j.set(k),M(!1),N(!1),P(!1),oe(!1);let e=Math.max(c*.5,f*y-36),t=[],n=[],r=!1,i=e=>(t.push(e),e),s=e=>new Promise(t=>{n.push(setTimeout(t,e))});return(async()=>{if(await s(200),r||(M(!0),await Promise.all([i(Rt(x,e,{duration:.55,ease:`easeOut`})),i(Rt(S,.55,{duration:.55,ease:`easeOut`}))]),r)||(N(!0),await Promise.all([i(Rt(x,l,{type:`spring`,stiffness:210,damping:15})),i(Rt(S,1,{duration:.45,ease:`easeOut`}))]),r)||(await s(900),r)||(P(!0),oe(!0),await i(Rt(D,[T,E,E,T],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`})),r)||(await s(150),r))return;ce(!0);let t=i(Rt(j,[k,A,A,k],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`}));await s(700),!r&&(fe(!0),await t)})(),()=>{r=!0,t.forEach(e=>e.stop()),n.forEach(clearTimeout)}},[a,o,f,y,c,l,x,S,D,T,E,j,k,A]),(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:r.fg},children:[(0,K.jsx)(Z,{onBack:t,onNext:n}),(0,K.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none invisible absolute -left-[9999px] top-0 text-[clamp(2.25rem,5.5vw,4.5rem)] leading-[1.15]`,style:{width:pe,fontFamily:`var(--font-serif)`},children:[(0,K.jsx)(`span`,{ref:F,className:`block`,children:Zr}),(0,K.jsx)(`span`,{ref:me,className:`block`,children:Qr}),(0,K.jsx)(`span`,{ref:he,className:`block`,children:$r}),(0,K.jsx)(`span`,{ref:ge,className:`block`,children:ei}),(0,K.jsx)(`span`,{ref:_e,className:`block`,children:ti})]}),le&&o&&(0,K.jsx)(Gr,{art:o,eyesW:s,eyesH:c,centerX:u,eyeCy:x,eyeScale:S,blinking:!1}),!a&&p&&(0,K.jsx)(V.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{left:Math.max(16,d*.05),top:0,y:D,width:w,height:w},children:(0,K.jsx)(v,{components:p,traits:{bodyShape:`blob`,eyeStyle:`goofy`,color:C},size:w,breathe:!1})}),!a&&p&&(0,K.jsx)(V.div,{"aria-hidden":`true`,className:`pointer-events-none absolute right-0 top-0 z-[1] flex items-start`,style:{right:-Math.round(O*.12),y:j},children:ni.map((e,t)=>(0,K.jsx)(`div`,{style:{width:O,height:O,marginLeft:t===0?0:-O*.34,zIndex:ni.length-t},children:(0,K.jsx)(v,{components:p,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:ee[t]??`teal`},size:O,breathe:!1})},e.bodyShape))}),(0,K.jsxs)(`div`,{className:`${Tr.replace(`top-[30%]`,b)} max-w-3xl`,children:[(0,K.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-[clamp(2.25rem,5.5vw,4.5rem)] leading-[1.15]`,style:{fontFamily:`var(--font-serif)`},children:[(0,K.jsx)(ii,{firstH:ve,secondH:ye,color:r.fgDeep,firstText:Zr,secondText:Qr,revealed:ne,carouseled:ie,revealFrom:`bottom`,revealDuration:.55,reduce:!!a}),(0,K.jsx)(ii,{firstH:R,secondH:xe,color:r.fg,firstText:$r,secondText:ei,revealed:re,carouseled:ae,revealFrom:`top`,revealDuration:.45,reduce:!!a}),(0,K.jsx)(V.div,{className:`relative w-full overflow-hidden`,style:{color:r.fg},initial:!1,animate:{height:se?B:0},transition:a?{duration:0}:{duration:.5,ease:`easeInOut`},children:B>0&&(0,K.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:B},children:(0,K.jsx)(V.span,{className:`block`,initial:!1,animate:{clipPath:se?`inset(0% 0 0% 0)`:`inset(100% 0 0 0)`},transition:a?{duration:0}:{duration:.5,ease:`easeOut`},children:ti})})})]}),de&&(0,K.jsx)(V.div,{initial:a?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:a?{duration:0}:{duration:.4},children:(0,K.jsx)(i,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,K.jsx)(U,{size:16}),onClick:e,className:`h-11 w-[234px] text-base`,children:`Continue`})})]})]})}function oi({idSuffix:e}){let t=`cf-${e}`,n=`cr-${e}`,r=`cg-${e}`,i=`cs-${e}`;return(0,K.jsxs)(`svg`,{viewBox:`0 0 100 100`,width:`100%`,height:`100%`,style:{display:`block`,position:`absolute`,inset:0},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:n,x1:`0.12`,y1:`0.05`,x2:`0.85`,y2:`0.95`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF0AE`}),(0,K.jsx)(`stop`,{offset:`50%`,stopColor:`#F4C231`}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`#D29B1A`})]}),(0,K.jsxs)(`radialGradient`,{id:t,cx:`42%`,cy:`36%`,r:`82%`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF6CE`}),(0,K.jsx)(`stop`,{offset:`55%`,stopColor:`#F8CB3E`}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`#EEB52C`})]}),(0,K.jsxs)(`radialGradient`,{id:r,cx:`36%`,cy:`24%`,r:`44%`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`0.85`}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]}),(0,K.jsxs)(`radialGradient`,{id:i,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`1`}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]})]}),(0,K.jsx)(`circle`,{cx:`50`,cy:`50`,r:`49`,fill:`url(#${n})`}),(0,K.jsx)(`circle`,{cx:`50`,cy:`50`,r:`45.5`,fill:`none`,stroke:`#FFF6CF`,strokeOpacity:`0.6`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeDasharray:`70 210`,transform:`rotate(-128 50 50)`}),(0,K.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`url(#${t})`}),(0,K.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,stroke:`#C28F18`,strokeOpacity:`0.35`,strokeWidth:`1.4`}),(0,K.jsxs)(`g`,{fontFamily:`var(--font-sans), system-ui, sans-serif`,fontWeight:900,fontSize:`58`,textAnchor:`middle`,children:[(0,K.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#C88E16`,transform:`translate(1.3 1.6)`,children:`$`}),(0,K.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#FFF6CF`,opacity:`0.7`,transform:`translate(-1.3 -1.5)`,children:`$`}),(0,K.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#F4C12A`,children:`$`})]}),(0,K.jsx)(`ellipse`,{cx:`38`,cy:`28`,rx:`22`,ry:`14`,fill:`url(#${r})`}),(0,K.jsx)(`ellipse`,{cx:`34`,cy:`24`,rx:`7`,ry:`4.5`,fill:`url(#${i})`})]})}function si({size:e,tiltX:t=0,tiltY:n=0,shadow:r=!0,spinning:i=!1,className:a}){return(0,K.jsxs)(`div`,{style:{position:`relative`,width:e,height:e},children:[r&&(0,K.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,left:`50%`,bottom:-e*.14,width:e*.74,height:e*.16,transform:`translateX(-50%)`,background:`radial-gradient(ellipse at center, rgba(0,0,0,0.22), rgba(0,0,0,0) 70%)`,filter:`blur(2px)`}}),(0,K.jsx)(`div`,{style:{width:e,height:e,perspective:e*10},children:(0,K.jsxs)(V.div,{className:a,style:{width:e,height:e,position:`relative`,transformStyle:`preserve-3d`},initial:!1,animate:{rotateX:t,rotateY:i?[n,n+360,n+760,n+1180]:n},transition:i?{duration:.95,times:[0,.32,.62,1],ease:`easeInOut`}:{duration:0},children:[(0,K.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(0.5px)`},children:(0,K.jsx)(oi,{idSuffix:`front`})}),(0,K.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(-0.5px) rotateY(180deg)`},children:(0,K.jsx)(oi,{idSuffix:`back`})})]})})]})}var ci=.3,li=.95;function ui({onClaim:e,onBumpEyes:t,onBack:n,onForward:r}){let i=H(),a=X(),{h:o}=Hn(),[s,c]=(0,G.useState)(!1);function l(){if(!s){if(c(!0),i){e();return}window.setTimeout(t,ci*1e3)}}let u=o*.42,d=-o*.08,f=o*.9;return(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,K.jsx)(Z,{onBack:n,onNext:r}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[26%] flex w-full max-w-xl -translate-x-1/2 flex-col items-center gap-3 px-6 text-center`,children:[(0,K.jsx)(`h1`,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Here are some free credits to get started`}),(0,K.jsx)(`div`,{className:`mt-8 flex flex-col items-center gap-4`,children:(0,K.jsx)(V.div,{animate:s&&!i?{y:[0,u,d,f],scale:[1,1,1,.2],opacity:[1,1,1,0]}:{},transition:{duration:li,times:[0,ci/li,.62,1],ease:[`easeIn`,`easeOut`,`easeIn`]},onAnimationComplete:()=>{s&&e()},children:(0,K.jsx)(si,{size:88,spinning:s&&!i})})}),!s&&(0,K.jsxs)(`button`,{type:`button`,onClick:l,className:`mt-6 flex cursor-pointer h-11 w-[234px] items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition-transform duration-150 active:scale-[0.97]`,style:{backgroundColor:a.isLight?`#1A1A1A`:`#FFFFFF`,color:a.isLight?`#FFFFFF`:`#1A1A1A`},children:[`Claim`,(0,K.jsx)(U,{className:`h-4 w-4`})]})]})]})}function di(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function fi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function pi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function mi(...e){return t=>{let n=!1,r=e.map(e=>{let r=pi(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():pi(e[t],null)}}}}function Q(...e){return G.useCallback(mi(...e),e)}function hi(e,t=[]){let n=[];function r(t,r){let i=G.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=G.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=G.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>G.createContext(e));return function(n){let r=n?.[e]||t;return G.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,gi(i,...t)]}function gi(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return G.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var _i=globalThis?.document?G.useLayoutEffect:()=>{},vi=G.useInsertionEffect||_i;function yi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=bi({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=G.useRef(e!==void 0);G.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,G.useCallback(t=>{if(s){let n=xi(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function bi({defaultProp:e,onChange:t}){let[n,r]=G.useState(e),i=G.useRef(n),a=G.useRef(t);return vi(()=>{a.current=t},[t]),G.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function xi(e){return typeof e==`function`}var Si=G.createContext(void 0);function Ci(e){let t=G.useContext(Si);return e||t||`ltr`}function wi(e){let t=G.useRef({value:e,previous:e});return G.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ti(e){let[t,n]=G.useState(void 0);return _i(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}r();function Ei(e){let t=Di(e),n=G.forwardRef((e,n)=>{let{children:r,...i}=e,a=G.Children.toArray(r),o=a.find(ki);if(o){let e=o.props.children,r=a.map(t=>t===o?G.Children.count(e)>1?G.Children.only(null):G.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:G.isValidElement(e)?G.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Di(e){let t=G.forwardRef((e,t)=>{let{children:n,...r}=e;if(G.isValidElement(n)){let e=ji(n),i=Ai(r,n.props);return n.type!==G.Fragment&&(i.ref=t?mi(t,e):e),G.cloneElement(n,i)}return G.Children.count(n)>1?G.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Oi=Symbol(`radix.slottable`);function ki(e){return G.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Oi}function Ai(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ji(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mi=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ei(`Primitive.${t}`),r=G.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ni(e){let t=Pi(e),n=G.forwardRef((e,n)=>{let{children:r,...i}=e,a=G.Children.toArray(r),o=a.find(Ii);if(o){let e=o.props.children,r=a.map(t=>t===o?G.Children.count(e)>1?G.Children.only(null):G.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:G.isValidElement(e)?G.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Pi(e){let t=G.forwardRef((e,t)=>{let{children:n,...r}=e;if(G.isValidElement(n)){let e=Ri(n),i=Li(r,n.props);return n.type!==G.Fragment&&(i.ref=t?mi(t,e):e),G.cloneElement(n,i)}return G.Children.count(n)>1?G.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fi=Symbol(`radix.slottable`);function Ii(e){return G.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Fi}function Li(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Ri(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zi(e){let t=e+`CollectionProvider`,[n,r]=hi(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=G.useRef(null),a=G.useRef(new Map).current;return(0,K.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Ni(s),l=G.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,K.jsx)(c,{ref:Q(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ni(u),p=G.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=G.useRef(null),s=Q(t,o),c=a(u,n);return G.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,K.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return G.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Bi=[`PageUp`,`PageDown`],Vi=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Hi={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},Ui=`Slider`,[Wi,Gi,Ki]=zi(Ui),[qi,Ji]=hi(Ui,[Ki]),[Yi,Xi]=qi(Ui),Zi=G.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=G.useRef(new Set),_=G.useRef(0),v=o===`horizontal`?ea:ta,[y=[],b]=yi({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=G.useRef(y);function S(e){T(e,ha(y,e))}function C(e){T(e,_.current)}function w(){let e=x.current[_.current];y[_.current]!==e&&f(y)}function T(e,t,{commit:n}={commit:!1}){let o=ba(a),s=di(xa(Math.round((e-r)/a)*a+r,o),[r,i]);b((e=[])=>{let r=fa(e,s,t);if(va(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,K.jsx)(Yi,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,K.jsx)(Wi.Provider,{scope:e.__scopeSlider,children:(0,K.jsx)(Wi.Slot,{scope:e.__scopeSlider,children:(0,K.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:fi(h.onPointerDown,()=>{s||(x.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:S,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:w,onHomeKeyDown:()=>!s&&T(r,0,{commit:!0}),onEndKeyDown:()=>!s&&T(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=Bi.includes(e.key)||e.shiftKey&&Vi.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});Zi.displayName=Ui;var[Qi,$i]=qi(Ui,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),ea=G.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=G.useState(null),p=Q(t,e=>f(e)),m=G.useRef(void 0),h=Ci(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=ya([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,K.jsx)(Qi,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,K.jsx)(na,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=Hi[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),ta=G.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=G.useRef(null),d=Q(t,u),f=G.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=ya([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,K.jsx)(Qi,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,K.jsx)(na,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=Hi[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),na=G.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=Xi(Ui,n);return(0,K.jsx)(Mi.span,{...l,ref:t,onKeyDown:fi(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Bi.concat(Vi).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:fi(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:fi(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:fi(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),ra=`SliderTrack`,ia=G.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=Xi(ra,n);return(0,K.jsx)(Mi.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});ia.displayName=ra;var aa=`SliderRange`,oa=G.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=Xi(aa,n),a=$i(aa,n),o=Q(t,G.useRef(null)),s=i.values.length,c=i.values.map(e=>pa(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,K.jsx)(Mi.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});oa.displayName=aa;var sa=`SliderThumb`,ca=G.forwardRef((e,t)=>{let n=Gi(e.__scopeSlider),[r,i]=G.useState(null),a=Q(t,e=>i(e)),o=G.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,K.jsx)(la,{...e,ref:a,index:o})}),la=G.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=Xi(sa,n),s=$i(sa,n),[c,l]=G.useState(null),u=Q(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=Ti(c),p=o.values[r],m=p===void 0?0:pa(p,o.min,o.max),h=ma(r,o.values.length),g=f?.[s.size],_=g?ga(g,m,s.direction):0;return G.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,K.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,K.jsx)(Wi.ItemSlot,{scope:e.__scopeSlider,children:(0,K.jsx)(Mi.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:fi(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,K.jsx)(da,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});ca.displayName=sa;var ua=`RadioBubbleInput`,da=G.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=G.useRef(null),a=Q(i,r),o=wi(t);return G.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,K.jsx)(Mi.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});da.displayName=ua;function fa(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function pa(e,t,n){return di(100/(n-t)*(e-t),[0,100])}function ma(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function ha(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function ga(e,t,n){let r=e/2;return(r-ya([0,50],[0,r])(t)*n)*n}function _a(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function va(e,t){if(t>0){let n=_a(e);return Math.min(...n)>=t}return!0}function ya(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ba(e){return(String(e).split(`.`)[1]||``).length}function xa(e,t){let n=10**t;return Math.round(e*n)/n}var Sa=Zi,Ca=ia,wa=ca;Ge();var Ta=640,Ea=[{id:`companion-coworker`,left:`Companion`,right:`Coworker`,leftAvatar:{bodyShape:`blob`,eyeStyle:`gentle`,color:`pink`},rightAvatar:{bodyShape:`ninja`,eyeStyle:`curious`,color:`purple`}},{id:`genz-boomer`,left:`Gen Z`,right:`Baby Boomer`,leftAvatar:{bodyShape:`burst`,eyeStyle:`quirky`,color:`yellow`},rightAvatar:{bodyShape:`cloud`,eyeStyle:`dazed`,color:`green`}},{id:`execute-collaborate`,left:`Independent`,right:`Collaborative`,leftAvatar:{bodyShape:`star`,eyeStyle:`angry`,color:`orange`},rightAvatar:{bodyShape:`flower`,eyeStyle:`goofy`,color:`teal`}},{id:`playful-serious`,left:`Playful`,right:`Serious`,leftAvatar:{bodyShape:`star`,eyeStyle:`goofy`,color:`yellow`},rightAvatar:{bodyShape:`blob`,eyeStyle:`grumpy`,color:`purple`}},{id:`polite-unfiltered`,left:`Polite`,right:`Unfiltered`,leftAvatar:{bodyShape:`sprout`,eyeStyle:`bashful`,color:`green`},rightAvatar:{bodyShape:`urchin`,eyeStyle:`surprised`,color:`orange`}}],Da=[`9%`,`27%`,`45%`,`62%`,`79%`],Oa=50,ka=`rgba(36, 41, 46, 0.2)`,Aa=`#FDFDFC`,ja=.16;function Ma(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=r[i-1],o=e[i+1],s=e[i]??``,c=e=>e===t||e===a;if(!c(s)){r.push(s);continue}let l=n.find(e=>!c(e)&&e!==o)??n.find(e=>!c(e))??s;r.push(l)}return r}function Na(){let[e,t]=(0,G.useState)(()=>typeof window>`u`?1280:window.innerWidth);return(0,G.useEffect)(()=>{let e=()=>t(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Pa({components:e,traits:t,side:n,top:r,size:i,progress:a}){let o=Math.max(0,Math.min(1,a)),s=100+ja*100,c=n===`left`?-100+s*o:100-s*o;return(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute`,style:{[n]:`calc(50% - 50vw)`,top:r,width:i,height:i,opacity:Math.min(1,o*1.6),transform:`translate(${c}%, -50%) scale(${.8+.2*o})`,transformOrigin:`${n} center`,transition:`transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease`,willChange:`transform, opacity`},children:(0,K.jsx)(v,{components:e,traits:t,size:i,breathe:!1})})}function Fa({axis:e,value:t,onValueChange:n,fg:r,disabled:i}){return(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-1.5 sm:flex-nowrap`,children:[(0,K.jsx)(`span`,{className:`order-1 flex-1 text-left text-base sm:w-32 sm:flex-none sm:text-right sm:text-[17px]`,style:{color:r},children:e.left}),(0,K.jsx)(`span`,{className:`order-2 flex-1 text-right text-base sm:order-3 sm:w-32 sm:flex-none sm:text-left sm:text-[17px]`,style:{color:r},children:e.right}),(0,K.jsxs)(Sa,{className:`relative order-3 flex h-6 w-full touch-none items-center select-none sm:order-2 sm:w-auto sm:flex-1`,value:[t],onValueChange:e=>n(e[0]??Oa),disabled:i,min:0,max:100,step:1,"aria-label":`${e.left} to ${e.right}`,children:[(0,K.jsx)(Ca,{className:`relative h-3 w-full grow rounded-full`,style:{backgroundColor:ka}}),(0,K.jsx)(wa,{className:`block h-6 w-6 cursor-grab rounded-full shadow-sm transition-transform active:scale-95 active:cursor-grabbing keyboard-focus:outline-none keyboard-focus:ring-2 keyboard-focus:ring-white/70 data-[disabled]:cursor-not-allowed data-[disabled]:active:scale-100`,style:{backgroundColor:Aa}})]})]})}function Ia({components:e,values:t,sideAvatars:n,size:r}){return(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 -z-10`,children:Ea.map((i,a)=>{let o=t[i.id]??Oa,s=Math.max(0,(Oa-o)/Oa),c=Math.max(0,(o-Oa)/Oa),l=Da[a]??`50%`,u=n[a];return u?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(Pa,{components:e,traits:u.left,side:`left`,top:l,size:r,progress:s}),(0,K.jsx)(Pa,{components:e,traits:u.right,side:`right`,top:l,size:r,progress:c})]},i.id):null})})}function La({values:e,onValueChange:t,locked:n,onContinue:r,onBack:i,onForward:a}){let o=X(),s=W(),c=Na(),l=c>=Ta,u=q.use.characters()[q.use.selectedIndex()]?.color,d=Math.round(Math.min(300,Math.max(160,c*.16))),f=(0,G.useMemo)(()=>{let e=s?.colors.map(e=>e.id)??[],t=Ma(Ea.map(e=>e.leftAvatar.color),u,e),n=Ma(Ea.map(e=>e.rightAvatar.color),u,e);return Ea.map((e,r)=>({left:{...e.leftAvatar,color:t[r]??e.leftAvatar.color},right:{...e.rightAvatar,color:n[r]??e.rightAvatar.color}}))},[s,u]);return(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:o.fg},children:[(0,K.jsx)(Z,{onBack:i,onNext:a}),l&&s&&(0,K.jsx)(Ia,{components:s,values:e,sideAvatars:f,size:d}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] flex w-full max-w-2xl -translate-x-1/2 flex-col items-center gap-10 px-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`h1`,{className:`text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Create my personality`}),n?(0,K.jsx)(`p`,{className:`text-center text-[15px]`,style:{color:o.fgMuted},children:`Personality locked — chat with your assistant to make any more updates`}):(0,K.jsx)(`p`,{className:`max-w-md text-center text-[15px]`,style:{color:o.fgMuted},children:`How do you want me to talk to you? You can always ask me to change my personality later.`})]}),(0,K.jsx)(`div`,{className:`flex w-full flex-col gap-8 sm:gap-11`,style:{opacity:n?.7:1},children:Ea.map(r=>(0,K.jsx)(Fa,{axis:r,value:e[r.id]??Oa,onValueChange:e=>t(r.id,e),fg:o.fg,disabled:n},r.id))}),(0,K.jsxs)(`button`,{type:`button`,onClick:r,className:`mt-4 flex h-11 w-[234px] cursor-pointer items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition-transform duration-150 active:scale-[0.97]`,style:{backgroundColor:o.isLight?`#1A1A1A`:`#FFFFFF`,color:o.isLight?`#FFFFFF`:`#1A1A1A`},children:[`Continue`,(0,K.jsx)(U,{className:`h-4 w-4`})]})]})]})}function Ra({assistantId:e,assistantReady:t,onConnected:n,onSkip:r,onBack:i,onForward:a,missingCalendarScope:o=!1,onRetry:s,hatchError:c=null}){let l=X(),{handleConnect:u,oauthInProgress:d}=Ue({assistantId:e??``,onConnect:n}),f=()=>{s?.(),u()},p=!e||!t,m=p||d;return(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:l.fg},children:[(0,K.jsx)(Z,{onBack:i,onNext:a}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[26%] flex w-[360px] -translate-x-1/2 flex-col items-center gap-5 text-center`,children:[(0,K.jsx)(`h1`,{className:`text-[2.6rem] leading-tight`,style:{fontFamily:`var(--font-serif)`},children:p?`Waking up`:o?`Access not enabled`:`Let me make this easy`}),(0,K.jsx)(`p`,{className:`text-[16px]`,style:{color:l.fgMuted},children:p?`Your assistant is getting ready`:o?`Check the box next to the Google Calendar permission so I can book the check-in.`:`Connect your Google Calendar so I can find time to check in and start helping.`}),(0,K.jsxs)(`div`,{className:`mt-6 flex w-[234px] flex-col items-center gap-4`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:f,disabled:m,className:`flex cursor-pointer h-11 w-full items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition-transform duration-150 enabled:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-60`,style:{backgroundColor:l.isLight?`#1A1A1A`:`#FFFFFF`,color:l.isLight?`#FFFFFF`:`#1A1A1A`},children:p?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(y,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Starting assistant…`]}):d?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(y,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization…`]}):o?`Try again`:`Connect Calendar →`}),(!p||c)&&(0,K.jsx)(`button`,{type:`button`,onClick:r,disabled:d,className:`cursor-pointer text-body-small-default transition-opacity hover:opacity-100 disabled:opacity-60`,style:{color:l.fgMuted},children:`Skip for now`})]})]})]})}var za=xr(`#17191C`);function Ba(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Va(){let e=W(),t=q.use.characters(),n=q.use.selectedIndex();return{components:e,chosen:t.length>0?t[n]:void 0}}function Ha({size:e=64,isStreaming:t=!1}){let{components:n,chosen:r}=Va();return!n||!r?(0,K.jsx)(`div`,{style:{width:e,height:e}}):(0,K.jsx)(`div`,{className:`shrink-0`,style:{width:e,height:e},children:(0,K.jsx)(v,{components:n,traits:r,size:e,isStreaming:t})})}var Ua=64,Wa=4500,Ga=7e3;function Ka({onDone:e,onBack:t,onForward:n,scheduledTime:r,awaitingTime:i}){let{components:a,chosen:o}=Va(),s=H(),{w:c,h:l}=Ba(),u=r?`Check-in scheduled for tomorrow at ${r}!`:`Check-in scheduled!`;(0,G.useEffect)(()=>{let t=setTimeout(e,i&&!r?Ga:Wa);return()=>clearTimeout(t)},[e,i,r]);let d=(0,G.useRef)(null),[f,p]=(0,G.useState)(null);(0,G.useLayoutEffect)(()=>{let e=()=>{let e=d.current?.getBoundingClientRect();e&&p({cx:e.left+e.width/2,cy:e.top+e.height/2})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let m=1.3*Math.max(c,l)/Ua,h=f?c/2-f.cx:0,g=f?l*.88-f.cy:0,_=l*.05;return(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden text-white`,children:[(0,K.jsx)(Z,{onBack:t,onNext:n,tone:`light`}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] flex w-full max-w-xl -translate-x-1/2 items-start gap-3 px-6`,children:[(0,K.jsx)(`div`,{ref:d,className:`relative shrink-0`,style:{width:Ua,height:Ua},children:a&&o&&f&&(0,K.jsx)(V.div,{className:`absolute inset-0`,style:{transformOrigin:`center`},initial:s?!1:{scale:m,x:h,y:g},animate:{x:[h,h,0,0],y:[g,g+_,0,0],scale:[m,m,1.07,1]},transition:s?{duration:0}:{duration:1.1,times:[0,.18,.82,1],ease:[`easeOut`,`easeIn`,`easeOut`]},children:(0,K.jsx)(v,{components:a,traits:o,size:Ua})})}),(0,K.jsx)(V.span,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:s?!1:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:s?{duration:0}:{duration:.4,delay:.9},children:u})]})]})}var qa=[`Searching the web to get to know you…`,`Reading public profiles…`,`Skimming the highlights…`,`Connecting the dots…`,`Piecing it together…`],Ja=[`Updating my personality…`,`Finding my voice…`,`Getting into character…`],Ya=`Almost there…`,Xa=[...qa,Ya],Za=[...Ja,Ya],Qa=2800;function $a({onDone:e,onBack:t,onAdvance:n,onForward:r,ready:i}){let a=za,[o,s]=(0,G.useState)(0);return(0,G.useEffect)(()=>{n?.(o);let t=o>=Xa.length-1;if(i&&t){let t=setTimeout(e,Qa);return()=>clearTimeout(t)}let r=setTimeout(()=>s(e=>(e+1)%Xa.length),Qa);return()=>clearTimeout(r)},[o,i,e,n]),(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,K.jsx)(Z,{onBack:t,onNext:r}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] flex w-full max-w-xl -translate-x-1/2 items-start gap-3 px-6`,children:[(0,K.jsx)(Ha,{isStreaming:!0}),(0,K.jsx)(Ie,{mode:`wait`,children:(0,K.jsx)(V.p,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:Xa[o]},o)})]})]})}function eo({onDone:e,ready:t}){let n=za,[r,i]=(0,G.useState)(0);return(0,G.useEffect)(()=>{let n=Za.length-1;if(t){if(r!==n){i(n);return}let t=setTimeout(e,Qa);return()=>clearTimeout(t)}let a=setTimeout(()=>i(e=>(e+1)%Za.length),Qa);return()=>clearTimeout(a)},[r,t,e]),(0,K.jsx)(`div`,{className:`absolute inset-0 z-10`,style:{color:n.fg},children:(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] flex w-full max-w-xl -translate-x-1/2 items-start gap-3 px-6`,children:[(0,K.jsx)(Ha,{isStreaming:!0}),(0,K.jsx)(Ie,{mode:`wait`,children:(0,K.jsx)(V.p,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:Za[r]},r)})]})})}function to({claims:e,loading:t,onContinue:n,onRejectAll:r,onBack:i,onForward:a}){let o=za,s=H(),[c,l]=(0,G.useState)(()=>new Set),u=e.filter(e=>!c.has(e.claim)),d=u.length>0,f=!t;return(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:o.fg},children:[(0,K.jsx)(Z,{onBack:i,onNext:a}),(0,K.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(Ha,{}),(0,K.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`This is what I found about you`})]}),(0,K.jsx)(`p`,{className:`mb-7 mt-2 text-[15px]`,style:{color:o.fgMuted},children:d?t?`Still checking the rest. You can review these as they come in.`:`I searched the web. Feel free to remove anything that isn’t true`:t?`Still putting this together…`:`I didn’t turn up much — we can fill it in as we chat.`}),(0,K.jsx)(`div`,{className:`flex flex-col gap-3`,children:(0,K.jsx)(Ie,{children:u.map(e=>(0,K.jsxs)(V.div,{layout:!0,initial:s?!1:{opacity:0,y:10},animate:{opacity:1,y:0},exit:s?void 0:{opacity:0,scale:.95},className:`flex items-center justify-between gap-3 rounded-2xl px-5 py-4 text-[15px]`,style:{backgroundColor:o.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,K.jsx)(`span`,{children:e.claim}),(0,K.jsx)(`button`,{type:`button`,"aria-label":`Remove "${e.claim}"`,onClick:()=>l(t=>new Set(t).add(e.claim)),className:`flex cursor-pointer h-6 w-6 shrink-0 items-center justify-center rounded-full transition-opacity hover:opacity-100`,style:{color:o.fgMuted},children:(0,K.jsx)(x,{className:`h-4 w-4`})})]},e.claim))})}),d&&f&&(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`mt-5 self-start cursor-pointer text-[14px] underline underline-offset-2 transition-opacity hover:opacity-80`,style:{color:o.fgMuted},children:`This is not me`}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>n([...c]),disabled:!f,className:`mt-8 flex cursor-pointer h-11 w-[200px] items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition duration-150 enabled:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-60`,style:{backgroundColor:o.isLight?`#1A1A1A`:`#FFFFFF`,color:o.isLight?`#FFFFFF`:`#1A1A1A`},children:[f?`Continue`:`Still searching…`,f&&(0,K.jsx)(U,{className:`h-4 w-4`})]})]})]})}var no=[{suggestion:`I'll pull together a quick brief on what's new in your field`,prompt:`Give me a quick brief on what's new in my field right now.`},{suggestion:`I'll send a weekly briefing on news in your space`,prompt:`Set up a weekly briefing on news in my space.`},{suggestion:`I'll help you get on top of your week`,prompt:`Help me get on top of my week.`},{suggestion:`I'll draft something from a few rough notes`,prompt:`Draft something from a few rough notes I'll give you.`}];function ro({label:e,tone:t}){return(0,K.jsx)(`span`,{className:`inline-flex items-center whitespace-nowrap rounded-full px-2.5 py-[3px] text-[12px] font-medium align-middle`,style:{backgroundColor:t.bg,color:t.fg},children:e})}function io(e,t){return e.map((n,r)=>{let i=``;return r>0&&(i=r===e.length-1?e.length===2?` and `:`, and `:`, `),(0,K.jsxs)(G.Fragment,{children:[i,(0,K.jsx)(ro,{label:n,tone:t})]},n)})}var $=64,ao=$;function oo({pluginLabels:e,tone:t,pillTone:n,reduce:r,slotRef:i,revealed:a}){let o=e.length>1;return(0,K.jsxs)(`div`,{className:`mt-12 flex items-center gap-3`,children:[(0,K.jsx)(`div`,{ref:i,className:`shrink-0`,style:{width:ao,height:ao}}),(0,K.jsxs)(V.p,{className:`text-[14px]`,style:{color:t.fg},initial:!1,animate:{opacity:+!!a,x:a?0:-6},transition:r?{duration:0}:{duration:.35},children:[`Already set up the `,io(e,n),` plugin`,o?`s`:``,` `,`to help with your work`]})]})}function so({head:e,note:t,flyToNote:n,reduce:r,onLanded:i}){let{components:a,chosen:o}=Va();if(!a||!o)return null;let s=$/2,c=n&&t?t:e,l={x:c.x-s,y:c.y-s};return(0,K.jsx)(V.div,{className:`pointer-events-none absolute left-0 top-0`,style:{width:$,height:$,transformOrigin:`center`},initial:!1,animate:l,transition:r?{duration:0}:n&&t?{type:`spring`,duration:.9,bounce:.45}:{duration:.4},onAnimationComplete:()=>{n&&t&&i()},children:(0,K.jsx)(v,{components:a,traits:o,size:$})})}function co({suggestions:e,loading:t,installedPlugins:n=[],onSuggestionClick:r,onSkip:i,onBack:a,onForward:o}){let s=za,c=X(),l=H(),u=e.length>0?e:t?[]:no,d=n.map(Ke).filter(e=>e.length>0),f=d.length>0,p=(0,G.useRef)(null),m=(0,G.useRef)(null),h=(0,G.useRef)(null),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(!1),[b,x]=(0,G.useState)(!1);(0,G.useLayoutEffect)(()=>{let e=()=>{let e=p.current,t=m.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=e=>({x:e.left-n.left+e.width/2,y:e.top-n.top+e.height/2}),i=h.current;_({head:r(t.getBoundingClientRect()),note:i?r(i.getBoundingClientRect()):void 0})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u.length,f]);let S=g?.note?.y;return(0,G.useEffect)(()=>{!f||S===void 0||v||y(!0)},[f,S,v]),(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:s.fg},children:[(0,K.jsx)(Z,{onBack:a,onNext:o}),(0,K.jsxs)(`div`,{ref:p,className:`absolute left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6`,children:[(0,K.jsxs)(`div`,{className:`flex items-center`,children:[(0,K.jsx)(V.div,{ref:m,className:`shrink-0`,style:{height:$},initial:!1,animate:v?{width:0,marginRight:0}:{width:$,marginRight:12},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`}}),(0,K.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Here’s what we could do first`})]}),(0,K.jsx)(`p`,{className:`mb-7 mt-2 text-[15px]`,style:{color:s.fgMuted},children:u.length>0?(0,K.jsxs)(K.Fragment,{children:[`Pick one to jump in — or start your own thing.`,` `,(0,K.jsx)(`button`,{type:`button`,onClick:i,className:`cursor-pointer underline underline-offset-2 transition-opacity hover:opacity-80`,style:{color:s.fg},children:`Skip to Chat`})]}):`Putting together a few ideas…`}),(0,K.jsx)(`div`,{className:`flex flex-col gap-3`,children:u.map((e,t)=>(0,K.jsx)(V.button,{type:`button`,onClick:()=>r(e),initial:l?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:l?{duration:0}:{duration:.3,delay:t*.06},className:`cursor-pointer rounded-2xl px-5 py-4 text-left text-[15px] transition-transform duration-150 hover:scale-[1.01] active:scale-[0.99]`,style:{backgroundColor:s.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:(0,K.jsx)(`span`,{children:e.suggestion})},`${t}-${e.suggestion}`))}),f&&(0,K.jsx)(oo,{pluginLabels:d,tone:s,pillTone:c,reduce:l,slotRef:h,revealed:b}),g&&(0,K.jsx)(so,{head:g.head,note:g.note,flyToNote:v&&f&&g.note!==void 0,reduce:l,onLanded:()=>x(!0)})]})]})}function lo({installedPlugins:e=[],pluginCatalog:t={},onStart:n,onBack:r,onForward:i}){let a=za,o=H(),[s,c]=(0,G.useState)(!1),l=e.map(e=>({name:e,displayName:Ke(e),description:t[e]?.trim()??``})).filter(e=>e.displayName.length>0),u=l.length>0,d=(0,G.useRef)(null),f=(0,G.useRef)(null),p=(0,G.useRef)(null),[m,h]=(0,G.useState)(null),[g,_]=(0,G.useState)(!1),[v,y]=(0,G.useState)(!1);(0,G.useLayoutEffect)(()=>{let e=()=>{let e=d.current,t=f.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=e=>({x:e.left-n.left+e.width/2,y:e.top-n.top+e.height/2}),i=p.current;h({head:r(t.getBoundingClientRect()),note:i?r(i.getBoundingClientRect()):void 0})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l.length]);let b=m?.note?.y;return(0,G.useEffect)(()=>{b===void 0||g||_(!0)},[b,g]),(0,K.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,K.jsx)(Z,{onBack:r,onNext:i}),(0,K.jsxs)(`div`,{ref:d,className:`absolute left-1/2 top-1/2 z-10 flex w-full max-w-xl -translate-x-1/2 -translate-y-1/2 flex-col px-6`,children:[(0,K.jsxs)(`div`,{className:`flex items-center`,children:[(0,K.jsx)(V.div,{ref:f,className:`shrink-0`,style:{height:$},initial:!1,animate:g?{width:0,marginRight:0}:{width:$,marginRight:12},transition:o?{duration:0}:{duration:.5,ease:`easeInOut`}}),(0,K.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`You’re all set`})]}),u&&(0,K.jsx)(`div`,{className:`mt-4 flex flex-col gap-3`,children:l.map((e,t)=>(0,K.jsxs)(V.div,{initial:o?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:o?{duration:0}:{duration:.3,delay:t*.06},className:`rounded-2xl px-5 py-4`,style:{backgroundColor:a.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,K.jsx)(`div`,{className:`text-[15px] font-medium`,children:e.displayName}),e.description&&(0,K.jsx)(`div`,{className:`mt-1 text-[13px] leading-snug`,style:{color:a.fgMuted},children:e.description})]},e.name))}),(0,K.jsxs)(`div`,{className:`mt-16 flex items-center gap-3`,children:[(0,K.jsx)(`div`,{ref:p,className:`shrink-0`,style:{width:ao}}),(0,K.jsx)(V.p,{className:`text-[15px]`,style:{color:a.fg},initial:!1,animate:{opacity:+!!v,x:v?0:-6},transition:o?{duration:0}:{duration:.35},children:`I’ve set myself up with plugins around who you are.`})]}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{s||(c(!0),Promise.resolve().then(n).catch(()=>c(!1)))},disabled:s,className:`mt-16 flex cursor-pointer h-11 w-[200px] items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition duration-150 enabled:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-60`,style:{backgroundColor:a.isLight?`#1A1A1A`:`#FFFFFF`,color:a.isLight?`#FFFFFF`:`#1A1A1A`},children:[s?`Starting…`:`Let's chat`,!s&&(0,K.jsx)(U,{className:`h-4 w-4`})]}),m&&(0,K.jsx)(so,{head:m.head,note:m.note,flyToNote:g&&m.note!==void 0,reduce:o,onLanded:()=>y(!0)})]})]})}var uo=[{bodyShape:`sprout`,eyeStyle:`curious`,colorIdx:0,base:230,pos:e=>({left:-e*.32,top:`40%`})},{bodyShape:`flower`,eyeStyle:`goofy`,colorIdx:1,base:230,pos:e=>({right:-e*.32,top:`40%`})},{bodyShape:`star`,eyeStyle:`dazed`,colorIdx:2,base:240,mobile:!0,pos:e=>({left:`16%`,bottom:-e*.42}),mobilePos:e=>({left:-e*.3,bottom:-e*.3})},{bodyShape:`burst`,eyeStyle:`angry`,colorIdx:0,base:240,mobile:!0,pos:e=>({right:`16%`,bottom:-e*.42}),mobilePos:e=>({right:-e*.3,bottom:-e*.3})},{bodyShape:`blob`,eyeStyle:`gentle`,colorIdx:1,base:220,pos:e=>({left:`42%`,bottom:-e*.5})},{bodyShape:`urchin`,eyeStyle:`curious`,colorIdx:2,base:220,mobile:!0,pos:e=>({left:-e*.28,bottom:`16%`}),mobilePos:e=>({left:-e*.3,top:-e*.3})},{bodyShape:`burst`,eyeStyle:`quirky`,colorIdx:0,base:220,mobile:!0,pos:e=>({right:-e*.28,bottom:`16%`}),mobilePos:e=>({right:-e*.3,top:-e*.3})},{bodyShape:`flower`,eyeStyle:`quirky`,colorIdx:1,base:230,pos:e=>({left:`30%`,bottom:-e*.4})}],fo=`#17191C`,po=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],mo=290;function ho({peekLevel:e=0,eyesBumpNonce:t=0,darkBg:n=!1,showBottomEyes:r=!0,showTopTeam:i=!1}){let a=W(),o=q.use.characters(),s=q.use.selectedIndex(),c=H(),{w:l}=Hn(),u=Math.max(.42,Math.min(l/1100,1)),d=l<640,f=o.length>0?o[s]:void 0,{bg:p,peekColors:m}=(0,G.useMemo)(()=>!a||!f?{bg:`var(--surface-base)`,peekColors:[]}:{bg:a.colors.find(e=>e.id===f.color)?.hex??`var(--surface-base)`,peekColors:Xr(f.color,a.colors.map(e=>e.id),3)},[a,f]);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(V.div,{className:`absolute inset-0 z-0`,initial:!1,animate:{backgroundColor:n?fo:p},transition:c?{duration:0}:{duration:1,ease:`easeInOut`}}),r&&(0,K.jsx)(Lr,{bumpNonce:t,settleBlink:!1}),i&&a&&(0,K.jsx)(`div`,{className:`pointer-events-none absolute right-0 z-[1] flex items-start`,style:{top:-Math.round(mo*u)*.42,right:-Math.round(mo*u)*.12},children:po.map((e,t)=>{let n=Math.round(mo*u);return(0,K.jsx)(V.div,{style:{width:n,height:n,marginLeft:t===0?0:-n*.34,zIndex:po.length-t},initial:c?!1:{y:-140,opacity:0},animate:{y:0,opacity:1},transition:c?{duration:0}:{type:`spring`,stiffness:200,damping:18,delay:t*.1},children:(0,K.jsx)(v,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:m[t]??`teal`},size:n,breathe:!1})},e.bodyShape)})}),a&&(0,K.jsx)(Ie,{children:(d?uo.filter(e=>e.mobile):uo).slice(0,Math.max(0,e)).map((e,t)=>{let n=Math.round(e.base*u),r=d&&e.mobilePos?e.mobilePos(n):e.pos(n);return(0,K.jsx)(V.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{...r,width:n,height:n},initial:c?!1:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:c?void 0:{scale:0,opacity:0},transition:c?{duration:0}:{type:`spring`,stiffness:220,damping:16,delay:.1},children:(0,K.jsx)(v,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:m[e.colorIdx]??`teal`},size:n,breathe:!1})},`peek-${t}`)})})]})}var go=`You're about to begin your first conversation.
60
+ Respond with a warm and engaging greeting. Be interesting, be real. This is your chance to get to know and impress the user.
61
+ Keep it short! For this opening greeting only, don't use \`recall\` or read any files — just say hello. (This applies to the greeting alone; use your tools normally for everything the user asks afterward.)`;function _o(e){return{firstName:e.firstName,lastName:e.lastName,occupation:e.role,hobby:e.hobbies.join(`, `)}}function vo(e){let t=e.firstName.trim();return t?`Getting to know ${t}`:`Getting to know you`}Ge();function yo(){let e=a(),t=j.use.user(),n=t?.id??null,r=ze.use.enterFocus(),i=ze.use.exitFocus(),s=ze.use.setPendingAvatarTraits(),c=ze.use.requestSidebarCollapse(),l=ae.use.researchOnboarding(),u=ae.use.personalityOnboarding(),d=ae.use.hydrated(),[f,p]=(0,G.useState)(`form`),{ref:m,size:h}=zn(),[g,_]=(0,G.useState)([]),[v,y]=(0,G.useState)(!1);function b(e){p(e)}function x(e,t=`completed`){qe(Je[f],{userId:n,outcome:t}),_([]),b(e)}function S(e){_(e=>[...e,f]),b(e)}function C(){let e=g[g.length-1];e&&(_(e=>e.slice(0,-1)),b(e))}let w=g.length>0?C:void 0,[T,E]=(0,G.useState)(null),[D,ee]=(0,G.useState)(null),[O,k]=(0,G.useState)({}),[A,ne]=(0,G.useState)(!1),[M,re]=(0,G.useState)(null),[N,P]=(0,G.useState)(null),[ce,le]=(0,G.useState)(!1),[ue,de]=(0,G.useState)(!1),[fe,pe]=(0,G.useState)(!1),[F,me]=(0,G.useState)(0),[he,ge]=(0,G.useState)(0),{start:_e,ready:ve,assistantId:I,error:ye,awaitReady:L}=Jt(),R=yn(),{start:be,hydrate:xe}=R,z=(0,G.useRef)(Promise.resolve()),B=(0,G.useRef)(Promise.resolve()),[Se,Ce]=(0,G.useState)(!1),we=R.status===`idle`||R.status===`running`,Te=!we&&R.claims.length===0;(0,G.useEffect)(()=>{i(),s(null),l&&d&&_e()},[i,s,_e,l,d]),(0,G.useLayoutEffect)(()=>{if(v||!n)return;let e=Mn(n);e?.formValues&&(E(e.formValues),ee(e.faceValues),P(e.checkinTime),de(e.checkinBooked),re(e.researchConversationId??null),e.research&&xe({...e.research,pluginCatalog:e.research.pluginCatalog??{}},L),p(Fn(e)),_([])),y(!0)},[v,n,xe,L]),(0,G.useEffect)(()=>{!v||!T||Nn(n,{step:f,formValues:T,faceValues:D,checkinTime:N,checkinBooked:ue,research:R.status===`done`?{status:`done`,claims:R.claims,suggestions:R.suggestions,installedPlugins:R.installedPlugins,pluginCatalog:R.pluginCatalog}:null,...M?{researchConversationId:M}:{}})},[v,n,f,T,D,N,ue,M,R.status,R.claims,R.suggestions,R.installedPlugins,R.pluginCatalog]),(0,G.useEffect)(()=>{!v||!l||!d||!T||R.status!==`idle`||be({awaitAssistantId:L,subject:_o(T),conversationTitle:vo(T),...M?{resumeConversationId:M}:{},onConversationCreated:re,includeSuggestions:!u})},[v,l,d,T,M,R.status,be,L,u]),(0,G.useEffect)(()=>{f===`results`&&Te&&(_([]),p(`suggestions`))},[f,Te]);function Ee(t,i,a,{skip:o=!1,hidden:l=!1}={}){Pn(n);let{firstName:u,lastName:d,role:f,hobbies:p}=t,m=[u.trim(),d.trim()].filter(Boolean).join(` `),h=u.trim(),g=!o&&a===void 0;se({tools:[],tasks:[],tone:Ye,...m?{userName:m}:{},...f.trim()?{occupation:f.trim()}:{},...o?{}:{initialMessage:a??Ht({firstName:u,lastName:d,occupation:f,hobby:p.join(`, `)}),...l?{initialMessageHidden:!0}:{}},...g?{title:h?`Getting to know ${h}`:`Getting to know you`}:{},...i?.name?.trim()?{assistantName:i.name.trim()}:{}});let _=i?.name?.trim();_&&oe(_),s(i?.traits??null),g&&r(),o||te.markExpectingFirstMessage(),c(),te.checkAssistant(I??void 0).finally(()=>{e(`${ie.assistant}?onboarding=1`,{replace:!0})})}async function De(){T&&(await Promise.all([R.awaitPluginInstalls(),z.current,B.current]),Ee(T,D,go,{hidden:!0}))}function Oe(e){E(e),R.start({awaitAssistantId:L,subject:_o(e),conversationTitle:vo(e),onConversationCreated:re,includeSuggestions:!u}),x(`face`)}function ke(e){if(e.length>0&&!e.includes(`https://www.googleapis.com/auth/calendar.events`)){pe(!0);return}if(pe(!1),I&&T){let e=[T.firstName.trim(),T.lastName.trim()].filter(Boolean).join(` `);P(null),de(!1),le(!0),Be({assistantId:I,userName:e||void 0,assistantName:D?.name?.trim()||void 0}).then(e=>{e.scheduled&&(de(!0),P(In(e.start,e.timeZone)))}).finally(()=>le(!1))}x(`meeting`)}if(!l)return d?(0,K.jsx)(o,{to:ie.assistant,replace:!0}):null;if([`different`,`personality`,`integration`,`letschat`,`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(f)&&T){let e=[`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(f);return(0,K.jsx)(`div`,{ref:m,"data-theme":`dark`,className:`relative h-full overflow-hidden`,children:(0,K.jsxs)(Vn,{size:h,children:[(0,K.jsx)(ho,{eyesBumpNonce:F,peekLevel:[`looking`,`results`,`suggestions`,`finishing`].includes(f)?he:0,darkBg:e,showBottomEyes:!e&&f!==`different`}),f===`different`&&(0,K.jsx)(ai,{onContinue:()=>x(u?`personality`:`integration`),onBack:()=>S(`intro`),onForward:w}),f===`personality`&&(0,K.jsx)(La,{values:O,onValueChange:(e,t)=>k(n=>({...n,[e]:t})),locked:A,onContinue:()=>{A||(Ce(!0),B.current=An({awaitAssistantId:L,values:O,userName:T?.firstName?.trim()||void 0}).finally(()=>Ce(!1)),ne(!0)),x(`integration`)},onBack:()=>S(`different`),onForward:w}),f===`integration`&&(0,K.jsx)(ui,{onClaim:()=>x(`letschat`),onBumpEyes:()=>me(e=>e+1),onBack:()=>S(u?`personality`:`different`),onForward:w}),f===`letschat`&&(0,K.jsx)(Ra,{assistantId:I,assistantReady:ve,hatchError:ye,onConnected:ke,missingCalendarScope:fe,onRetry:()=>pe(!1),onSkip:()=>{pe(!1),x(`looking`,`skipped`)},onBack:()=>S(`integration`),onForward:w}),f===`meeting`&&(0,K.jsx)(Ka,{scheduledTime:N??void 0,awaitingTime:ce,onDone:()=>x(`looking`),onBack:()=>S(`letschat`),onForward:w}),f===`looking`&&(0,K.jsx)($a,{onDone:()=>x(Te?`suggestions`:`results`),onBack:()=>S(`letschat`),onAdvance:e=>ge(Math.min(e+1,4)),onForward:w,ready:!we}),f===`results`&&(0,K.jsx)(to,{claims:R.claims,loading:we,onContinue:e=>{M&&I&&e.length>0&&(z.current=xn({assistantId:I,conversationId:M,removedClaims:e,rejectedAll:!1})),x(`suggestions`)},onRejectAll:()=>{M&&I&&(z.current=xn({assistantId:I,conversationId:M,removedClaims:R.claims.map(e=>e.claim),rejectedAll:!0})),x(`suggestions`,`skipped`)},onBack:()=>S(`looking`),onForward:w}),f===`suggestions`&&u&&(0,K.jsx)(lo,{installedPlugins:R.installedPlugins,pluginCatalog:R.pluginCatalog,onStart:async()=>{if(qe(Je.suggestions,{userId:n,outcome:`completed`}),Se){_([]),p(`finishing`);return}await De()},onBack:()=>S(Te?`looking`:`results`),onForward:w}),f===`suggestions`&&!u&&(0,K.jsx)(co,{suggestions:R.suggestions,loading:we,installedPlugins:R.installedPlugins,onSuggestionClick:async e=>{qe(Je.suggestions,{userId:n,outcome:`completed`}),await Promise.all([R.awaitPluginInstalls(),z.current]),Ee(T,D,e.prompt)},onSkip:async()=>{qe(Je.suggestions,{userId:n,outcome:`skipped`}),await Promise.all([R.awaitPluginInstalls(),z.current]),Ee(T,D,void 0,{skip:!0})},onBack:()=>S(Te?`looking`:`results`),onForward:w}),f===`finishing`&&(0,K.jsx)(eo,{ready:!Se,onDone:()=>void De()})]})})}return f===`intro`&&T?(0,K.jsx)(Br,{firstName:T.firstName,assistantName:D?.name,onContinue:()=>x(`different`),onBack:()=>S(`face`),onForward:w}):f===`face`&&T?(0,K.jsx)(wr,{onContinue:e=>{ee(e),x(`intro`)},onBack:()=>S(`form`),onForward:w}):(0,K.jsx)(gr,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:Oe})}export{yo as ResearchOnboardingRoute};
@@ -1 +1 @@
1
- import{n as e,t}from"./create-selectors-BE0_e_Ed.js";import{X as n,d as r,dt as i,f as a,lt as o,p as s,ut as c}from"./local-mode-CvrNMtPF.js";function l(e,t){return e.filter(e=>e.isLocal||e.organizationId==null||e.organizationId===t)}var u=e((e,t)=>({assistants:[],activeAssistantId:null,selectedAssistantId:c(),assistantsHydrated:!1,setFromLockfile:n=>{let i=m(n),a=new Map(t().assistants.map(e=>[e.id,e]));e({assistants:n.assistants.map(e=>({id:e.assistantId,name:e.name,hatchedAt:e.hatchedAt,cloud:e.cloud,runtimeVersion:e.resources?.runtimeVersion,currentReleaseVersion:a.get(e.assistantId)?.currentReleaseVersion,releaseChannel:a.get(e.assistantId)?.releaseChannel,isActiveLockfileAssistant:i===e.assistantId,isLocal:r(e),isPlatformHosted:s(e),organizationId:e.organizationId})),assistantsHydrated:!0}),d(t,e)},setFromApi:t=>e({assistantsHydrated:!0,assistants:t.map(e=>{let t=p(e.id);return{id:e.id,name:e.name,hatchedAt:e.created,cloud:t.cloud,runtimeVersion:t.runtimeVersion,currentReleaseVersion:e.current_release_version,releaseChannel:e.release_channel,isActiveLockfileAssistant:t.isActiveLockfileAssistant,isLocal:e.is_local,isPlatformHosted:!e.is_local}})}),upsertFromApi:t=>e(e=>{let n={id:t.id,name:t.name,hatchedAt:t.created,currentReleaseVersion:t.current_release_version,releaseChannel:t.release_channel,isLocal:t.is_local,isPlatformHosted:!t.is_local},r=e.assistants.findIndex(e=>e.id===t.id);if(r>=0){let i=[...e.assistants],a=p(t.id);return i[r]={...n,cloud:a.cloud??i[r].cloud,organizationId:i[r].organizationId,runtimeVersion:a.runtimeVersion??i[r].runtimeVersion,isActiveLockfileAssistant:a.isActiveLockfileAssistant??i[r].isActiveLockfileAssistant},{assistants:i}}let i=p(t.id);return{assistants:[...e.assistants,{...n,cloud:i.cloud,organizationId:i.organizationId,runtimeVersion:i.runtimeVersion,isActiveLockfileAssistant:i.isActiveLockfileAssistant}]}}),remove:t=>e(e=>({assistants:e.assistants.filter(e=>e.id!==t)})),clear:()=>e({assistants:[]}),setActiveAssistantId:t=>e({activeAssistantId:t}),setSelectedAssistant:t=>{t==null?o():i(t),e({selectedAssistantId:t})}}));function d(e,t){let{assistants:n,selectedAssistantId:r,assistantsHydrated:i}=e();!i||r==null||n.some(e=>e.id===r)||(o(),t({selectedAssistantId:null}))}var f=t(u);function p(e){let t=n.getState().lockfile,r=t?.assistants.find(t=>t.assistantId===e),i=t?m(t):null;return{cloud:r?.cloud,organizationId:r?.organizationId,runtimeVersion:r?.resources?.runtimeVersion,isActiveLockfileAssistant:t?i===e:void 0}}function m(e){return e.activeAssistant&&e.assistants.some(t=>t.assistantId===e.activeAssistant)?e.activeAssistant:e.assistants.length===1?e.assistants[0]?.assistantId??null:null}a()&&n.subscribe(e=>{e.lockfile&&e.committed&&u.getState().setFromLockfile(e.lockfile)}),typeof window<`u`&&window.addEventListener(`storage`,e=>{(e.key===null||e.key===`vellum:selectedAssistantId`)&&u.setState({selectedAssistantId:c()})});export{f as n,l as t};
1
+ import{n as e,t}from"./create-selectors-BE0_e_Ed.js";import{Z as n,d as r,dt as i,f as a,ft as o,p as s,ut as c}from"./local-mode-CgrENuVf.js";function l(e,t){return e.filter(e=>e.isLocal||e.organizationId==null||e.organizationId===t)}var u=e((e,t)=>({assistants:[],activeAssistantId:null,selectedAssistantId:i(),assistantsHydrated:!1,setFromLockfile:n=>{let i=m(n),a=new Map(t().assistants.map(e=>[e.id,e]));e({assistants:n.assistants.map(e=>({id:e.assistantId,name:e.name,hatchedAt:e.hatchedAt,cloud:e.cloud,runtimeVersion:e.resources?.runtimeVersion,currentReleaseVersion:a.get(e.assistantId)?.currentReleaseVersion,releaseChannel:a.get(e.assistantId)?.releaseChannel,isActiveLockfileAssistant:i===e.assistantId,isLocal:r(e),isPlatformHosted:s(e),organizationId:e.organizationId})),assistantsHydrated:!0}),d(t,e)},setFromApi:t=>e({assistantsHydrated:!0,assistants:t.map(e=>{let t=p(e.id);return{id:e.id,name:e.name,hatchedAt:e.created,cloud:t.cloud,runtimeVersion:t.runtimeVersion,currentReleaseVersion:e.current_release_version,releaseChannel:e.release_channel,isActiveLockfileAssistant:t.isActiveLockfileAssistant,isLocal:e.is_local,isPlatformHosted:!e.is_local}})}),upsertFromApi:t=>e(e=>{let n={id:t.id,name:t.name,hatchedAt:t.created,currentReleaseVersion:t.current_release_version,releaseChannel:t.release_channel,isLocal:t.is_local,isPlatformHosted:!t.is_local},r=e.assistants.findIndex(e=>e.id===t.id);if(r>=0){let i=[...e.assistants],a=p(t.id);return i[r]={...n,cloud:a.cloud??i[r].cloud,organizationId:i[r].organizationId,runtimeVersion:a.runtimeVersion??i[r].runtimeVersion,isActiveLockfileAssistant:a.isActiveLockfileAssistant??i[r].isActiveLockfileAssistant},{assistants:i}}let i=p(t.id);return{assistants:[...e.assistants,{...n,cloud:i.cloud,organizationId:i.organizationId,runtimeVersion:i.runtimeVersion,isActiveLockfileAssistant:i.isActiveLockfileAssistant}]}}),remove:t=>e(e=>({assistants:e.assistants.filter(e=>e.id!==t)})),clear:()=>e({assistants:[]}),setActiveAssistantId:t=>e({activeAssistantId:t}),setSelectedAssistant:t=>{t==null?c():o(t),e({selectedAssistantId:t})}}));function d(e,t){let{assistants:n,selectedAssistantId:r,assistantsHydrated:i}=e();!i||r==null||n.some(e=>e.id===r)||(c(),t({selectedAssistantId:null}))}var f=t(u);function p(e){let t=n.getState().lockfile,r=t?.assistants.find(t=>t.assistantId===e),i=t?m(t):null;return{cloud:r?.cloud,organizationId:r?.organizationId,runtimeVersion:r?.resources?.runtimeVersion,isActiveLockfileAssistant:t?i===e:void 0}}function m(e){return e.activeAssistant&&e.assistants.some(t=>t.assistantId===e.activeAssistant)?e.activeAssistant:e.assistants.length===1?e.assistants[0]?.assistantId??null:null}a()&&n.subscribe(e=>{e.lockfile&&e.committed&&u.getState().setFromLockfile(e.lockfile)}),typeof window<`u`&&window.addEventListener(`storage`,e=>{(e.key===null||e.key===`vellum:selectedAssistantId`)&&u.setState({selectedAssistantId:i()})});export{f as n,l as t};
@@ -0,0 +1 @@
1
+ function e(e){return e===`vellum.ai`||e.endsWith(`.vellum.ai`)}var t=/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;function n(n,r){if(!n)return r;if(t.test(n)){try{let t=new URL(n);if(t.protocol===`https:`&&e(t.hostname))return n}catch{}return r}return n.startsWith(`//`)||n.includes(`\\`)||!n.startsWith(`/`)?r:n}export{n as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-C_ZTVhv8.js";import{d as s,i as c,n as l}from"./auth-store-B2Zo6DUE.js";import{t as u}from"./return-to-D0TfUwsP.js";import{a as d}from"./routes-Cj4wRAOK.js";import{c as f,d as p,f as m,l as h,s as g,u as _}from"./prefs-OrKWJGM_.js";import{Qt as v,fi as y,sr as b}from"./index-0XgM92Lz.js";import{n as x,t as S}from"./consent-controls-CwEkJRom.js";var C=e(t(),1),w={},T={"2026-06-22":[`Introduces Together AI as a new managed model provider`]};function E(e){return w[e]??[]}function D(e){return T[e]??[]}var O=a();function k(){let e=r(),[t]=i(),a=l.use.user()?.id??null,w=l.use.logout(),T=o(),k=c(),[A,j]=m(),[M,N]=h(),[P,F]=_(),[I,L]=p(),[R]=g(),[z]=f(),[B]=(0,C.useState)(()=>!A),[V]=(0,C.useState)(()=>!M),[H]=(0,C.useState)(()=>!R),[U]=(0,C.useState)(()=>!z),W=!B&&!V&&!H&&!U,G=B||W,K=V||W,q=H||W,J=U||W,Y=!W&&!B&&!V,X=W?`Terms & privacy`:Y?`Review your privacy preferences`:`Updated terms`,Z=W?`Review your terms and privacy preferences anytime.`:Y?`Confirm your privacy preferences to continue.`:`We've updated our terms. Please review and accept to continue.`,Q=(0,C.useCallback)(()=>{s({userId:a,tos:A,privacy:M,shareAnalytics:P,shareDiagnostics:I,hasPlatformSession:k}),e(u(t.get(`returnTo`),d.assistant),{replace:!0})},[M,k,e,t,P,I,A,a]),$=(0,C.useCallback)(async()=>{await w(),b(d.account.login)},[w]),ee=G&&!A||K&&!M;return(0,O.jsx)(v,{showCreatureFooter:!1,children:(0,O.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${T?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,O.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full border border-[var(--border-subtle)] bg-[var(--surface-lift)]`,style:{animation:`fadeInUp 0.5s ease-out 0.05s both`},children:(0,O.jsx)(y,{className:`h-6 w-6 text-[var(--content-secondary)]`,strokeWidth:1.75})}),(0,O.jsx)(`h1`,{className:`mt-5 ${T?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,style:{animation:`fadeInUp 0.5s ease-out 0.12s both`},children:X}),(0,O.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${T?`mt-3`:`mt-3.5`}`,style:{animation:`fadeInUp 0.5s ease-out 0.2s both`},children:Z}),(q||J)&&(0,O.jsx)(x,{electron:T,showAnalytics:q,showDiagnostics:J,shareAnalytics:P,shareDiagnostics:I,onShareAnalyticsChange:F,onShareDiagnosticsChange:L,className:`mt-9 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.28s both`}}),(K||G)&&(0,O.jsx)(S,{electron:T,showPrivacy:K,showTos:G,privacyConsent:M,tosAccepted:A,onPrivacyChange:N,onTosChange:j,privacyNotes:K?D(`2026-06-22`):[],tosNotes:G?E(`2026-06-08`):[],className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.36s both`}}),(0,O.jsxs)(`div`,{className:`mt-9 flex w-full flex-col ${T?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.44s both`},children:[(0,O.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:ee,onClick:Q,className:T?void 0:`h-11 text-base`,children:`Continue`}),(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:$,className:T?void 0:`h-11 text-base`,children:`Log out`})]})]})})}export{k as ReviewTermsScreen};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D-AX8Voo.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-C_ZTVhv8.js";import{d as s,i as c,n as l}from"./auth-store-DfeW0asJ.js";import{t as u}from"./return-to-yMLvlnXN.js";import{a as d}from"./routes-C6gxiCrz.js";import{c as f,d as p,f as m,l as h,s as g,u as _}from"./prefs-ef69V836.js";import{rn as v,ur as y,yi as b}from"./index-FlO-C4WJ.js";import{n as x,t as S}from"./consent-controls-BzFFpG2p.js";var C=e(t(),1),w={},T={"2026-06-22":[`Introduces Together AI as a new managed model provider`]};function E(e){return w[e]??[]}function D(e){return T[e]??[]}var O=a();function k(){let e=r(),[t]=i(),a=l.use.user()?.id??null,w=l.use.logout(),T=o(),k=c(),[A,j]=m(),[M,N]=h(),[P,F]=_(),[I,L]=p(),[R]=g(),[z]=f(),[B]=(0,C.useState)(()=>!A),[V]=(0,C.useState)(()=>!M),[H]=(0,C.useState)(()=>!R),[U]=(0,C.useState)(()=>!z),W=!B&&!V&&!H&&!U,G=B||W,K=V||W,q=H||W,J=U||W,Y=!W&&!B&&!V,X=W?`Terms & privacy`:Y?`Review your privacy preferences`:`Updated terms`,Z=W?`Review your terms and privacy preferences anytime.`:Y?`Confirm your privacy preferences to continue.`:`We've updated our terms. Please review and accept to continue.`,Q=(0,C.useCallback)(()=>{s({userId:a,tos:A,privacy:M,shareAnalytics:P,shareDiagnostics:I,hasPlatformSession:k}),e(u(t.get(`returnTo`),d.assistant),{replace:!0})},[M,k,e,t,P,I,A,a]),$=(0,C.useCallback)(async()=>{await w(),y(d.account.login)},[w]),ee=G&&!A||K&&!M;return(0,O.jsx)(v,{showCreatureFooter:!1,children:(0,O.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${T?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,O.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full border border-[var(--border-subtle)] bg-[var(--surface-lift)]`,style:{animation:`fadeInUp 0.5s ease-out 0.05s both`},children:(0,O.jsx)(b,{className:`h-6 w-6 text-[var(--content-secondary)]`,strokeWidth:1.75})}),(0,O.jsx)(`h1`,{className:`mt-5 ${T?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,style:{animation:`fadeInUp 0.5s ease-out 0.12s both`},children:X}),(0,O.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${T?`mt-3`:`mt-3.5`}`,style:{animation:`fadeInUp 0.5s ease-out 0.2s both`},children:Z}),(q||J)&&(0,O.jsx)(x,{electron:T,showAnalytics:q,showDiagnostics:J,shareAnalytics:P,shareDiagnostics:I,onShareAnalyticsChange:F,onShareDiagnosticsChange:L,className:`mt-9 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.28s both`}}),(K||G)&&(0,O.jsx)(S,{electron:T,showPrivacy:K,showTos:G,privacyConsent:M,tosAccepted:A,onPrivacyChange:N,onTosChange:j,privacyNotes:K?D(`2026-06-22`):[],tosNotes:G?E(`2026-06-08`):[],className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.36s both`}}),(0,O.jsxs)(`div`,{className:`mt-9 flex w-full flex-col ${T?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.44s both`},children:[(0,O.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:ee,onClick:Q,className:T?void 0:`h-11 text-base`,children:`Continue`}),(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:$,className:T?void 0:`h-11 text-base`,children:`Log out`})]})]})})}export{k as ReviewTermsScreen};
@@ -1 +1 @@
1
- import{An as e}from"./sdk.gen-BwKkHEki.js";import{n as t,r as n,t as r}from"./api-errors-DPruG7q9.js";function i(e){let t=e.llm?.profiles;if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!r)continue;let t=r.label?.trim()||e,i=r.description?.trim()||void 0;n[e]={id:e,displayName:t,...i?{description:i}:{}}}return n}function a(e){let t=e,n=t.description??``;return{...e,description:n,cadenceDescription:t.cadenceDescription??n}}async function o(i){let{data:o,error:s,response:c}=await e({path:{assistant_id:i},throwOnError:!1});if(t(c,s,`Failed to load schedules.`),!c.ok)throw new r(c.status,n(s,c,`Failed to load schedules.`));return(o?.schedules??[]).map(a)}export{i as n,o as t};
1
+ import{zn as e}from"./sdk.gen-zA5ns5LT.js";import{n as t,r as n,t as r}from"./api-errors-DPruG7q9.js";function i(e){let t=e.llm?.profiles;if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!r)continue;let t=r.label?.trim()||e,i=r.description?.trim()||void 0;n[e]={id:e,displayName:t,...i?{description:i}:{}}}return n}function a(e){let t=e,n=t.description??``;return{...e,description:n,cadenceDescription:t.cadenceDescription??n}}async function o(i){let{data:o,error:s,response:c}=await e({path:{assistant_id:i},throwOnError:!1});if(t(c,s,`Failed to load schedules.`),!c.ok)throw new r(c.status,n(s,c,`Failed to load schedules.`));return(o?.schedules??[]).map(a)}export{i as n,o as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./client.gen-DU1JkKSB.js";var n=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/apps`,...e}),r=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/apps/{id}/delete`,...e}),i=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/apps/{id}/open`,...e}),a=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/apps/{id}/publish`,...e}),o=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/apps/{id}/publish-status`,...e}),s=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/apps/{id}/share-cloud`,...e}),c=e=>(e.client??t).post({bodySerializer:null,url:`/v1/assistants/{assistant_id}/apps/import-bundle`,...e,headers:{"Content-Type":`application/octet-stream`,...e.headers}}),l=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/apps/shared/{token}`,...e}),u=n=>(n.client??t).post({...e,url:`/v1/assistants/{assistant_id}/attachments`,...n,headers:{"Content-Type":null,...n.headers}}),d=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/attachments/{id}/content`,...e}),f=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/avatar/character-components`,...e}),p=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/avatar/image`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),m=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/avatar/render-from-traits`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),h=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/avatar/state`,...e}),g=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/background-tools`,...e}),_=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/background-tools/cancel`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),v=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/backups`,...e}),y=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/backups/create`,...e}),b=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/backups/restore`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),x=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/bookmarks`,...e}),S=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/bookmarks`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),C=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/bookmarks/by-message/{messageId}`,...e}),w=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/channels/available`,...e}),T=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/channels/readiness`,...e}),E=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/config`,...e}),D=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),O=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/config/llm/call-sites`,...e}),k=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/config/llm/profiles`,...e}),A=e=>(e.client??t).put({url:`/v1/assistants/{assistant_id}/config/llm/profiles/{name}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),j=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/confirm`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),M=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/consolidation/config`,...e}),N=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/consolidation/run-now`,...e}),P=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/consolidation/runs`,...e}),F=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/contact-channels/{contactChannelId}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),I=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/contacts`,...e}),L=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/contacts/merge`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),R=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/conversation-starters`,...e}),z=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/conversations`,...e}),B=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),V=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{conversationId}/slack-channel/resolve`,...e}),H=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/conversations/{id}`,...e}),U=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/analyze`,...e}),W=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/archive`,...e}),G=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/cancel`,...e}),K=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/conversations/{id}/compaction`,...e}),q=e=>(e.client??t).put({url:`/v1/assistants/{assistant_id}/conversations/{id}/inference-profile`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),J=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/conversations/{id}/name`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Y=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/slash`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),X=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/surface`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Z=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/unarchive`,...e}),Q=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/undo`,...e}),$=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/archive/bulk`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ee=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/fork`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),te=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/conversations/llm-context`,...e}),ne=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/reorder`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),re=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/seen`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ie=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/seen/bulk`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ae=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/conversations/unread`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),oe=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/credentials/inspect`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),se=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/dictation`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ce=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/disk-pressure/acknowledge`,...e}),le=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/disk-pressure/status`,...e}),ue=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/documents`,...e}),de=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/documents`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),fe=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/documents/{id}`,...e}),pe=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/documents/{id}/comments`,...e}),me=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/documents/{id}/comments`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),he=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/documents/{id}/comments/{commentId}`,...e}),ge=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/documents/{id}/comments/{commentId}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),_e=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/documents/{id}/conversations`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ve=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/documents/{id}/pdf`,...e}),ye=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/groups`,...e}),be=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/groups`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),xe=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/groups/{groupId}`,...e}),Se=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/groups/{groupId}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ce=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/healthz`,...e}),we=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/heartbeat/config`,...e}),Te=e=>(e.client??t).put({url:`/v1/assistants/{assistant_id}/heartbeat/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ee=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/heartbeat/run-now`,...e}),De=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/heartbeat/runs`,...e}),Oe=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/home/feed`,...e}),ke=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/home/feed/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ae=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/home/feed/{id}/actions/{actionId}`,...e}),je=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/home/feed/mark-all`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Me=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/home/state`,...e}),Ne=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/identity`,...e}),Pe=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/inference/chatgpt-subscription/auth`,...e}),Fe=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/inference/chatgpt-subscription/auth/exchange`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ie=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/inference/provider-connections`,...e}),Le=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/inference/provider-connections`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Re=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/inference/provider-connections/{name}`,...e}),ze=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/inference/provider-connections/{name}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Be=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/integrations/a2a/invite`,...e}),Ve=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e}),He=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e}),Ue=e=>(e.client??t).patch({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),We=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ge=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/integrations/telegram/config`,...e}),Ke=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/integrations/telegram/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),qe=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/integrations/twilio/credentials`,...e}),Je=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/integrations/twilio/credentials`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ye=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/integrations/vercel/config`,...e}),Xe=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/integrations/vercel/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ze=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/llm-request-logs/{id}/context`,...e}),Qe=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/llm-request-logs/{id}/payload`,...e}),$e=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/logs/export`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),et=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/memory/v2/concept-page`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),tt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/memory/v2/now-text`,...e}),nt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/memory/v2/router-prompt-template`,...e}),rt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/memory/v2/simulate-router`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),it=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/memory/worker/start`,...e}),at=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/memory/worker/status`,...e}),ot=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/memory/worker/stop`,...e}),st=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/messages`,...e}),ct=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/messages`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),lt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/messages/{id}/llm-context`,...e}),ut=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/messages/queued/{id}`,...e}),dt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/messages/queued/{id}/steer`,...e}),ft=e=>(e.client??t).put({url:`/v1/assistants/{assistant_id}/model/image-gen`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),pt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/notification-intent-result`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),mt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/oauth/apps`,...e}),ht=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/oauth/apps`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),gt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/oauth/apps/{appId}/connect`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),_t=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/oauth/apps/{appId}/connections`,...e}),vt=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/oauth/apps/{id}`,...e}),yt=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/oauth/connections/{id}`,...e}),bt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/oauth/providers`,...e}),xt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/oauth/providers/{providerKey}`,...e}),St=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/onboarding/checkin`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ct=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/pending-interactions`,...e}),wt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/plugins`,...e}),Tt=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/plugins/{name}`,...e}),Et=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/plugins/{name}`,...e}),Dt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/plugins/{name}/disable`,...e}),Ot=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/plugins/{name}/enable`,...e}),kt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/plugins/{name}/inspect`,...e}),At=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/plugins/{name}/upgrade`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),jt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/plugins/install`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Mt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/plugins/search`,...e}),Nt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/question-response`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Pt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/retrospective/config`,...e}),Ft=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/retrospective/runs`,...e}),It=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/schedules`,...e}),Lt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/schedules`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Rt=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/schedules/{id}`,...e}),zt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/schedules/{id}/run`,...e}),Bt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/schedules/{id}/runs`,...e}),Vt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/schedules/{id}/toggle`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ht=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/schedules/usage-summary`,...e}),Ut=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/search/global`,...e}),Wt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/secret`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Gt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/secrets`,...e}),Kt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/secrets`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),qt=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/secrets/read`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Jt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/skills`,...e}),Yt=e=>(e.client??t).delete({url:`/v1/assistants/{assistant_id}/skills/{id}`,...e}),Xt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/skills/{id}/files`,...e}),Zt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/skills/{id}/files/content`,...e}),Qt=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/skills/categories`,...e}),$t=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/skills/install`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),en=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/sounds/available`,...e}),tn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/sounds/config`,...e}),nn=e=>(e.client??t).put({url:`/v1/assistants/{assistant_id}/sounds/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),rn=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/stt/transcribe`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),an=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/subagents/{id}`,...e}),on=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/subagents/{id}/abort`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),sn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/suggestion`,...e}),cn=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/surface-actions`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ln=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/surfaces/{surfaceId}`,...e}),un=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/trace-events`,...e}),dn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/tts/providers`,...e}),fn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/usage/breakdown`,...e}),pn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/usage/daily`,...e}),mn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/usage/series`,...e}),hn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/usage/totals`,...e}),gn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/workflows/runs/{id}`,...e}),_n=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/workflows/runs/{id}/abort`,...e}),vn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/workflows/runs/{id}/journal`,...e}),yn=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/workspace/delete`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),bn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/workspace/file`,...e}),xn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/workspace/file/content`,...e}),Sn=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/workspace/mkdir`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Cn=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/workspace/rename`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),wn=e=>(e.client??t).get({url:`/v1/assistants/{assistant_id}/workspace/tree`,...e}),Tn=e=>(e.client??t).post({url:`/v1/assistants/{assistant_id}/workspace/write`,...e,headers:{"Content-Type":`application/json`,...e.headers}});export{B as $,en as $n,et as $t,j as A,jt as An,je as At,W as B,Lt as Bn,Ve as Bt,w as C,Tt as Cn,Tn as Cr,we as Ct,A as D,kt as Dn,Ae as Dt,O as E,Et as En,De as Et,I as F,Rt as Fn,Re as Ft,J as G,Kt as Gn,Ke as Gt,K as H,Ut as Hn,Ue as Ht,L as I,zt as In,ze as It,Z as J,Zt as Jn,Ye as Jt,Y as K,qt as Kn,qe as Kt,$ as L,Bt as Ln,Ie as Lt,N as M,Nt as Mn,Ne as Mt,P as N,Pt as Nn,Fe as Nt,k as O,At as On,ke as Ot,F as P,Ft as Pn,Pe as Pt,te as Q,$t as Qn,$e as Qt,V as R,Vt as Rn,Le as Rt,S,Ct as Sn,wn as Sr,Ce as St,E as T,Ot as Tn,Ee as Tt,H as U,Wt as Un,We as Ut,G as V,Ht as Vn,He as Vt,q as W,Gt as Wn,Ge as Wt,ee as X,Qt as Xn,Ze as Xt,Q as Y,Xt as Yn,Xe as Yt,z as Z,Jt as Zn,Qe as Zt,y as _,ht as _n,yn as _r,de as _t,s as a,ot as an,sn as ar,oe as at,C as b,bt as bn,Sn as br,ye as bt,l as c,ct as cn,un as cr,le as ct,f as d,ft as dn,pn as dr,pe as dt,tt as en,tn as er,ne as et,p as f,pt as fn,mn as fr,me as ft,g,mt as gn,vn as gr,ue as gt,_ as h,vt as hn,gn as hr,ve as ht,o as i,at as in,an as ir,R as it,M as j,Mt as jn,Me as jt,D as k,wt as kn,Oe as kt,d as l,ut as ln,dn as lr,he as lt,h as m,_t as mn,_n as mr,fe as mt,i as n,rt as nn,rn as nr,re as nt,n as o,lt as on,cn as or,se as ot,m as p,gt as pn,hn as pr,_e as pt,X as q,Yt as qn,Je as qt,a as r,it as rn,on as rr,ae as rt,c as s,st as sn,ln as sr,ce as st,r as t,nt as tn,nn as tr,ie as tt,u,dt as un,fn as ur,ge as ut,v,yt as vn,xn as vr,xe as vt,T as w,Dt as wn,Te as wt,x,St as xn,Cn as xr,be as xt,b as y,xt as yn,bn as yr,Se as yt,U as z,It as zn,Be as zt};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D-AX8Voo.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./confirm-dialog-bfBx6UYv.js";import{t as s}from"./modal-BNAVT2FK.js";import{A as c,N as l,O as u,st as d,t as f,tt as p,u as ee}from"./local-mode-CgrENuVf.js";import{t as m}from"./is-electron-C_ZTVhv8.js";import{n as h}from"./resolved-assistants-store-Dqf0LJrA.js";import{t as g}from"./check-D6WkI0gF.js";import{D as _,O as v,i as y,n as b}from"./auth-store-DfeW0asJ.js";import{a as x}from"./routes-C6gxiCrz.js";import{t as S}from"./use-onboarding-login-ULmWc73o.js";import{Dn as C,On as te,Yi as w,pa as T,rn as E}from"./index-FlO-C4WJ.js";import{r as D}from"./format-date-D4tzd1DT.js";var O=e(t(),1),k=a();function A({open:e,assistantName:t,isPending:r,errorMessage:i,onCancel:a,onRepair:c,onRetire:l}){let[u,d]=(0,O.useState)(`menu`);(0,O.useEffect)(()=>{e&&d(`menu`)},[e]);let f=i?(0,k.jsx)(`span`,{className:`mt-3 block text-body-small-default text-[var(--system-negative-strong)]`,children:i}):null;return u===`confirm-repair`?(0,k.jsx)(o,{open:e,title:`Repair Assistant?`,message:(0,k.jsxs)(k.Fragment,{children:[`Repairing re-provisions this assistant’s authentication token. Any other devices or browser sessions connected to it will be signed out and need to reconnect.`,f]}),confirmLabel:`Repair`,isPending:r,onConfirm:c,onCancel:()=>d(`menu`)}):u===`confirm-retire`?(0,k.jsx)(C,{open:e,isPending:r,extraMessage:f,onConfirm:l,onCancel:()=>d(`menu`)}):(0,k.jsx)(s.Root,{open:e,onOpenChange:e=>{!e&&!r&&a()},children:(0,k.jsxs)(s.Content,{size:`sm`,hideCloseButton:!0,onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),r||a()},children:[(0,k.jsx)(s.Header,{children:(0,k.jsx)(s.Title,{children:`Can’t Authenticate Assistant`})}),(0,k.jsxs)(s.Body,{children:[(0,k.jsxs)(s.Description,{children:[`The authentication token for `,t,` is missing or can no longer be refreshed, so this assistant can’t be connected. You can repair it, retire it, or pick a different assistant.`]}),f,(0,k.jsxs)(`div`,{className:`mt-5 flex w-full flex-col gap-2`,children:[(0,k.jsx)(n,{variant:`primary`,fullWidth:!0,disabled:r,onClick:()=>d(`confirm-repair`),children:`Wake & Repair`}),(0,k.jsx)(n,{variant:`dangerOutline`,fullWidth:!0,disabled:r,onClick:()=>d(`confirm-retire`),children:`Retire Assistant`}),(0,k.jsx)(n,{variant:`outlined`,fullWidth:!0,disabled:r,onClick:a,children:`Cancel`})]})]})]})})}function j(e){return e.name?e.name:e.isLocal?`Local Assistant`:`Cloud Assistant`}function M(e){if(e.hatchedAt)return`Created ${D(e.hatchedAt)}`}function N(){let e=r(),[t]=i(),a=t.get(`fromLogin`)===`1`,o=t.get(`noAutoSkip`)===`1`,s=m(),g=y(),C=h.use.assistants(),w=_.use.currentOrganizationId(),{loading:T,error:D,login:M,cancel:N}=S(),F=e=>e.isLocal||g,I=C.filter(F),L=C.some(e=>e.isPlatformHosted)&&!g,[R,z]=(0,O.useState)(null),[B,V]=(0,O.useState)(!1),[H,U]=(0,O.useState)(!1),[W,G]=(0,O.useState)(null),[K,q]=(0,O.useState)(null),[J,Y]=(0,O.useState)(!1),[ne,X]=(0,O.useState)(null);(0,O.useEffect)(()=>{if(R!=null||I.length===0)return;let e=v(w);z(I.find(t=>t.id===e)?.id??I[0].id)},[R,I,w]);let Z=async t=>{V(!0),G(null);try{t.isLocal?await b.getState().connectLocalAssistant(t.id):await b.getState().connectPlatformAssistant(t.id),e(x.assistant,{replace:!0})}catch(e){console.error(`selectAssistant.handleConnect failed`,e),t.isLocal&&u()&&(c(e)||d(e)||e instanceof f)&&ee(t.id)?q(t):G(`Failed to connect. Please try again.`),V(!1)}},Q=()=>{q(null),Y(!1),X(null),U(!1)},re=async()=>{if(!(!K||J)){Y(!0),X(null);try{let e=await l(K.id,{repairGuardian:!0});if(e.ok){p(),Q(),Z(K);return}X(e.error||`Repair failed. Please try again.`)}catch(e){console.error(`selectAssistant.recoveryRepair failed`,e),X(`Repair failed. Please try again.`)}Y(!1)}},ie=async()=>{if(!(!K||J)){Y(!0),X(null);try{let t=await te(K.id);if(t.ok){Q(),e(t.nextRoute,{replace:!0});return}X(t.error)}catch(e){console.error(`selectAssistant.recoveryRetire failed`,e),X(`Failed to retire assistant. Please try again.`)}Y(!1)}};(0,O.useEffect)(()=>{a||o||B||H||C.length!==0&&C.length===1&&I.length===1&&(U(!0),Z(I[0]))},[C.length,I.length]);let ae=()=>{let e=C.find(e=>e.id===R);e&&Z(e)},oe=()=>{e(x.welcome)},$=D??W;return H&&!$&&!K?(0,k.jsx)(E,{children:(0,k.jsx)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-xl flex-col items-center justify-center px-6 text-[var(--content-default)]`,children:(0,k.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Connecting to your assistant…`})})}):(0,k.jsxs)(E,{children:[(0,k.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${s?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`min-h-screen px-6 pb-40 pt-16`} text-[var(--content-default)]`,children:[(0,k.jsx)(`h1`,{className:s?`text-title-large`:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Choose an Assistant`}),(0,k.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)] ${s?`mt-3.5`:`mt-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Select which assistant you’d like to use.`}),$&&(0,k.jsx)(`p`,{className:`mt-4 text-body-small-default text-[var(--system-negative-strong)]`,children:$}),(0,k.jsx)(`div`,{className:`flex w-full flex-col ${s?`mt-8 gap-2`:`mt-10 gap-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`},children:C.map(e=>{let t=F(e);return(0,k.jsx)(P,{assistant:e,selected:R===e.id,disabled:!t,badge:!t&&e.isPlatformHosted?`Requires Account`:void 0,onSelect:()=>{t&&z(e.id)}},e.id)})}),(0,k.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${s?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:[I.length>0&&(0,k.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:ae,disabled:!R||B,children:B?`Connecting…`:`Continue`}),(0,k.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:()=>void e(`${x.onboarding.hosting}?from=select-assistant`),disabled:B||T,children:`Create New Assistant`}),L&&(0,k.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:T?N:()=>void M(),disabled:B,children:T?`Cancel`:`Log In`}),(0,k.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:oe,disabled:B||T,children:`Back`})]})]}),(0,k.jsx)(A,{open:K!=null,assistantName:K?j(K):``,isPending:J,errorMessage:ne??void 0,onCancel:Q,onRepair:()=>void re(),onRetire:()=>void ie()})]})}function P({assistant:e,selected:t,disabled:n,badge:r,onSelect:i}){let a=M(e),o=m();return(0,k.jsxs)(`button`,{type:`button`,onClick:i,disabled:n,className:[`group flex w-full items-center border text-left`,o?`gap-3 rounded-lg p-3`:`gap-4 rounded-2xl px-5 py-4`,`transition-all duration-200 ease-out`,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-[var(--surface-secondary)]`,t&&!n?`border-[var(--primary-base)] bg-[var(--primary-base)]/[0.08] shadow-[inset_0_0_0_1px_var(--primary-base)]`:`border-[var(--border-element)] bg-transparent`].join(` `),children:[(0,k.jsx)(`div`,{className:[`flex shrink-0 items-center justify-center transition-colors duration-200`,o?`h-8 w-8 rounded-lg`:`h-10 w-10 rounded-xl`,t&&!n?`bg-[var(--primary-base)]/15 text-[var(--primary-base)]`:`bg-[var(--surface-tertiary)] text-[var(--content-secondary)]`].join(` `),children:e.isLocal?(0,k.jsx)(w,{className:`h-5 w-5`}):(0,k.jsx)(T,{className:`h-5 w-5`})}),(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:j(e)}),r&&(0,k.jsx)(`span`,{className:`rounded-full bg-[var(--surface-tertiary)] px-2 py-0.5 text-[var(--content-tertiary)] ${o?`text-label-medium-default`:`text-body-small-default`}`,children:r})]}),a&&(0,k.jsx)(`span`,{className:`mt-0.5 block text-[var(--content-tertiary)] ${o?`text-label-medium-default`:`text-body-small-default`}`,children:a})]}),!n&&(0,k.jsx)(`div`,{className:[`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 transition-all duration-200`,t?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)] group-hover:border-[var(--content-tertiary)]`].join(` `),children:t&&(0,k.jsx)(g,{className:`h-3 w-3 text-[var(--surface-base)]`,strokeWidth:3})})]})}export{N as SelectAssistantScreen};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,i as r,u as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-C_ZTVhv8.js";import{t as s}from"./log-in-CEw63CGU.js";import{i as c}from"./auth-store-B2Zo6DUE.js";import{a as l}from"./routes-Cj4wRAOK.js";import{t as u}from"./client-feature-flag-store-k_bI655l.js";import{t as d}from"./use-onboarding-login-CyEAqbC7.js";import{t as f}from"./assistant-feature-flag-store-oe00IJMB.js";import{Dn as p,Fi as m,Ft as h,or as g}from"./index-0XgM92Lz.js";import{n as _,t as v}from"./sidebar-tree-CHyPnNA0.js";var y=e(t(),1),b=a();function x(){let e=f.use.settingsDeveloperNav(),t=u.use.platformNotifications(),a=u.use.bookmarks(),x=p({platformHostedOnly:!0}),S=p(),{pathname:C}=i(),w=n(),T=c(),{login:E}=d(),D=(0,y.useMemo)(()=>h.filter(e=>!(e.id===`notifications`&&(!t||x===`gated`)||e.id===`billing`&&S!==`full`||e.id===`bookmarks`&&!a||e.id===`devices`&&x===`gated`||e.id===`keyboard-shortcuts`&&!o()||e.id===`developer`)),[t,x,S,a]),O=(0,y.useMemo)(()=>{let t=[];return e&&t.push(...h.filter(e=>e.id===`developer`)),t.push(T?{id:`logout`,label:`Log Out`,icon:m,onSelect:()=>void g(w)}:{id:`login`,label:`Log In`,icon:s,onSelect:()=>void E()}),t},[e,T,w,E]),k=(0,y.useMemo)(()=>{if(C===l.settings.root)return`Settings`;let e=h.find(e=>C===e.href||C.startsWith(e.href+`/`));return e?e.label:`Settings`},[C]);return(0,b.jsx)(_,{backHref:l.assistant,sidebar:(0,b.jsx)(v,{items:D,bottomItems:O,indexPath:l.settings.root}),title:k,children:(0,b.jsx)(r,{})})}export{x as SettingsLayout};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,i as r,u as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-C_ZTVhv8.js";import{t as s}from"./log-in-CEw63CGU.js";import{i as c}from"./auth-store-DfeW0asJ.js";import{a as l}from"./routes-C6gxiCrz.js";import{t as u}from"./client-feature-flag-store-CWOJ-CVU.js";import{t as d}from"./use-onboarding-login-ULmWc73o.js";import{t as f}from"./assistant-feature-flag-store-C94SGLWJ.js";import{Fr as p,Hi as m,It as h,lr as g}from"./index-FlO-C4WJ.js";import{n as _,t as v}from"./sidebar-tree-rpSGyrYj.js";var y=e(t(),1),b=a();function x(){let e=f.use.settingsDeveloperNav(),t=u.use.platformNotifications(),a=u.use.bookmarks(),x=p({platformHostedOnly:!0}),S=p(),{pathname:C}=i(),w=n(),T=c(),{login:E}=d(),D=(0,y.useMemo)(()=>h.filter(e=>!(e.id===`notifications`&&(!t||x===`gated`)||e.id===`billing`&&S!==`full`||e.id===`bookmarks`&&!a||e.id===`devices`&&x===`gated`||e.id===`keyboard-shortcuts`&&!o()||e.id===`developer`)),[t,x,S,a]),O=(0,y.useMemo)(()=>{let t=[];return e&&t.push(...h.filter(e=>e.id===`developer`)),t.push(T?{id:`logout`,label:`Log Out`,icon:m,onSelect:()=>void g(w)}:{id:`login`,label:`Log In`,icon:s,onSelect:()=>void E()}),t},[e,T,w,E]),k=(0,y.useMemo)(()=>{if(C===l.settings.root)return`Settings`;let e=h.find(e=>C===e.href||C.startsWith(e.href+`/`));return e?e.label:`Settings`},[C]);return(0,b.jsx)(_,{backHref:l.assistant,sidebar:(0,b.jsx)(v,{items:D,bottomItems:O,indexPath:l.settings.root}),title:k,children:(0,b.jsx)(r,{})})}export{x as SettingsLayout};
@@ -0,0 +1 @@
1
+ import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{O as r,n as i,t as a}from"./button-D-AX8Voo.js";import{t as o}from"./useMutation-Lj4VunQV.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./dropdown-ChWAdhLG.js";import{t as l}from"./notice-CqRgVmeL.js";import{n as u,t as ee}from"./input-D4W4p0pZ.js";import{t as d}from"./toggle-X_kQW5my.js";import{t as f}from"./is-electron-C_ZTVhv8.js";import{t as p}from"./bug-DDcuQ3au.js";import{t as m}from"./info-ciQS_i3y.js";import{t as te}from"./loader-circle-BFRVtR3K.js";import{t as h}from"./x-DxL-bCuT.js";import{Qt as g}from"./sdk.gen-zA5ns5LT.js";import{n as _}from"./auth-store-DfeW0asJ.js";import{t as v}from"./dist-Ztj3rqLK.js";import{n as y}from"./diagnostics-BAjanSbk.js";import{t as b}from"./impersonate-version-flag-DyVWQf97.js";import{L as ne}from"./react-query.gen-gQ1_8EHv.js";import{Pi as x,Vi as re,qi as S,ua as ie,xi as ae,zi as C}from"./index-FlO-C4WJ.js";var w=e(n(),1),oe=e(r(),1),T=`vellum:debug:`;function E(){let e={};if(typeof window>`u`)return e;try{for(let t=0;t<window.localStorage.length;t++){let n=window.localStorage.key(t);if(n===null||!n.startsWith(T))continue;let r=window.localStorage.getItem(n);r!==null&&(e[n]=r)}}catch{}return e}function D(){return{collectedAt:new Date().toISOString(),resolved:{impersonateAssistantVersion:b()},overrides:E()}}var O=t({ShareFeedbackModal:()=>z}),k=s(),A=[{value:`bug_report`,label:`Bug Report`,icon:p,includesLogsByDefault:!0},{value:`feature_request`,label:`Feature Request`,icon:S,includesLogsByDefault:!1},{value:`other`,label:`Other`,icon:C,includesLogsByDefault:!1}],j=[{value:`past_hour`,label:`Past hour`,cutoffMs:3600*1e3},{value:`past_24_hours`,label:`Past 24 hours`,cutoffMs:1440*60*1e3},{value:`all_time`,label:`All time`,cutoffMs:null}],M=j.map(e=>({value:e.value,label:e.label})),N=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`video/mp4`,`video/quicktime`,`video/webm`]),P=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`mp4`,`mov`,`webm`]),F=10,I=50*1024*1024,se={bug_report:`bug_report`,feature_request:`feature_request`,other:`other`};function ce(){return f()?`electron`:v.getPlatform()===`ios`?`ios`:`web`}function le(e){if(e.size>I)return!1;if(e.type&&N.has(e.type))return!0;if(!e.type){let t=e.name.split(`.`).pop()?.toLowerCase();return t?P.has(t):!1}return!1}function L(e,t){let n=Math.ceil(t.length/512),r=new Uint8Array(512+n*512),i=new TextEncoder,a=(e,t,n)=>{let a=i.encode(e);r.set(a.slice(0,n),t)},o=(e,t,n)=>{a(e.toString(8).padStart(n-1,`0`)+`\0`,t,n)};a(e,0,100),o(420,100,8),o(0,108,8),o(0,116,8),o(t.length,124,12),o(Math.floor(Date.now()/1e3),136,12);for(let e=148;e<156;e++)r[e]=32;r[156]=48,a(`ustar\0`,257,6),a(`00`,263,2);let s=0;for(let e=0;e<512;e++)s+=r[e];return o(s,148,7),r[155]=32,r.set(t,512),r}async function R(e,t){try{let n={};t.window.startTime!=null&&(n.startTime=t.window.startTime,n.endTime=t.window.endTime),t.activeConversationId&&(n.conversationId=t.activeConversationId);let{data:r,error:i}=await g({path:{assistant_id:e},body:n,parseAs:`blob`,throwOnError:!1});if(i||!(r instanceof Blob))return null;let a=await r.arrayBuffer();return new Uint8Array(a)}catch{return null}}async function ue(e,t,n,r){if(typeof CompressionStream>`u`)return null;let i=new Date,a=j.find(t=>t.value===e),o=i.getTime(),s=a?.cutoffMs==null?null:o-a.cutoffMs,c=s==null?null:new Date(s).toISOString(),l=null;try{l=r?.()??null}catch{l=null}let u=y(l),ee={collected_at:i.toISOString(),time_range:e,cutoff:c,log_window:{start_time_ms:s,end_time_ms:o},assistant_id:t,active_conversation_id:n,user_agent:typeof navigator<`u`?navigator.userAgent:``,language:typeof navigator<`u`?navigator.language:``,platform:typeof navigator<`u`?navigator.platform:``,url:typeof window<`u`?window.location.href:``,viewport:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:null,screen:typeof screen<`u`?{width:screen.width,height:screen.height}:null,connection:typeof navigator<`u`&&`connection`in navigator?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,deviceMemory:typeof navigator<`u`&&`deviceMemory`in navigator?navigator.deviceMemory:null,hardwareConcurrency:typeof navigator<`u`?navigator.hardwareConcurrency:null},d=new TextEncoder().encode(JSON.stringify(ee,null,2)),p=new TextEncoder().encode(JSON.stringify(u,null,2)),m=[L(`web-client-context.json`,d),L(`web-chat-diagnostics.json`,p)],te=new TextEncoder().encode(JSON.stringify(D(),null,2));m.push(L(`web-debug-flags.json`,te));try{let e=typeof window<`u`?window._vellumDebug?.chat:null;if(e){let t={clientMessages:e.getClientMessages?.()??null,transcriptItems:e.getTranscriptItems?.()??null,pendingInteractions:e.listPendingInteractions?.()??null,thinkingIndicator:e.thinkingIndicator?.()??null,streamingRing:e.streamingRing?.()??null,reconciliationDiagnostics:e.getReconciliationDiagnostics?.()??null},n=new TextEncoder().encode(JSON.stringify(t,null,2));m.push(L(`web-chat-debug-api-triage.json`,n))}}catch{}try{let e=typeof window<`u`?window._vellumDebug?.events:null;if(e){let t={focus:typeof document<`u`?{hasFocus:typeof document.hasFocus==`function`?document.hasFocus():null,visibilityState:document.visibilityState}:null,clients:e.getClients().map(({abortSignal:e,...t})=>({...t,aborted:e.aborted})),events:e.getEvents()},n=new TextEncoder().encode(JSON.stringify(t,null,2));m.push(L(`web-sse-liveness-triage.json`,n))}}catch{}if(f()&&window.vellum?.feedback){try{let e=await window.vellum.feedback.diagnostics(),t=new TextEncoder().encode(JSON.stringify(e,null,2));m.push(L(`electron-diagnostics.json`,t))}catch{}try{let e=await window.vellum.feedback.logs();if(e){let t=new TextEncoder().encode(e);m.push(L(`electron-main-logs.txt`,t))}}catch{}}if(t){let e=await R(t,{window:{startTime:s,endTime:o},activeConversationId:n});e&&m.push(L(`platform-logs.tar.gz`,e))}m.push(new Uint8Array(1024));let h=m.reduce((e,t)=>e+t.length,0),g=new Uint8Array(h),_=0;for(let e of m)g.set(e,_),_+=e.length;let v=new Blob([g.buffer]),b=await new Response(v.stream().pipeThrough(new CompressionStream(`gzip`))).blob();return new File([b],`web-client-logs-${i.getTime()}.tar.gz`,{type:`application/gzip`})}function z({open:e,onClose:t,initialReason:n,onSubmitted:r,assistantId:s,assistantVersion:p,activeConversationId:g,getDiagnosticsSnapshot:v}){let y=_.use.user(),b=y?.email,S=y?.isStaff??!1,C=(0,w.useId)(),T=(0,w.useRef)(null),E=(0,w.useRef)(null),D=(0,w.useRef)(null),O=(0,w.useRef)(null),[j,N]=(0,w.useState)(n??`bug_report`),[P,I]=(0,w.useState)(``),[L,R]=(0,w.useState)(``),[z,B]=(0,w.useState)(A.find(e=>e.value===(n??`bug_report`))?.includesLogsByDefault??!0),[pe,V]=(0,w.useState)(!1),[H,U]=(0,w.useState)(`past_hour`),[W,G]=(0,w.useState)([]),[K,q]=(0,w.useState)(null),[me,J]=(0,w.useState)(!1),[Y,he]=(0,w.useState)(!1),[X,ge]=(0,w.useState)(!1),Z=o(ne()),[_e,Q]=(0,w.useState)(!1),$=Z.isPending||_e,ve=!b,ye=(0,w.useMemo)(()=>P.trim().length>0&&L.trim().length>0,[P,L]);(0,w.useEffect)(()=>{if(!e)return;let t=n??`bug_report`;N(t),I(``),R(b??``),B(A.find(e=>e.value===t)?.includesLogsByDefault??!0),V(!1),U(`past_hour`),G([]),he(!1),ge(!1),q(null),Q(!1),Z.reset();let r=setTimeout(()=>{b?D.current?.focus():O.current?.focus()},50);return()=>clearTimeout(r)},[e]),(0,w.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let be=e=>{N(e),pe||B(A.find(t=>t.value===e)?.includesLogsByDefault??!1)},xe=()=>{B(e=>!e),V(!0)},Se=(0,w.useCallback)(e=>{e.key===`Escape`&&!$&&t()},[t,$]),Ce=(0,w.useCallback)(e=>{e.target===T.current&&!$&&t()},[t,$]),we=(0,w.useCallback)(e=>{G(t=>{let n=F-t.length;if(n<=0)return t;let r=new Set(t.map(e=>`${e.name}:${e.size}`)),i=[];for(let t of e){if(i.length>=n)break;if(!le(t))continue;let e=`${t.name}:${t.size}`;r.has(e)||(r.add(e),i.push(t))}return i.length>0?[...t,...i]:t})},[]),Te=e=>{e.target.files&&we(Array.from(e.target.files)),e.target.value=``},Ee=e=>{e.preventDefault(),J(!1),e.dataTransfer.files?.length&&we(Array.from(e.dataTransfer.files))},De=e=>{e.preventDefault(),J(!0)},Oe=e=>{e.preventDefault(),e.currentTarget===e.target&&J(!1)},ke=e=>{G(t=>t.filter((t,n)=>n!==e))};return e?(0,oe.createPortal)((0,k.jsx)(`div`,{ref:T,role:`dialog`,"aria-modal":`true`,"aria-labelledby":C,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:Se,onClick:Ce,onDrop:Ee,onDragOver:De,onDragLeave:Oe,children:(0,k.jsxs)(`div`,{className:`mx-4 flex w-full max-w-lg flex-col rounded-xl border p-6 shadow-xl`,style:{backgroundColor:`var(--surface-lift)`,borderColor:`var(--border-base)`,maxHeight:`calc(100vh - 2rem)`},children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-4`,style:{borderColor:`var(--border-subtle)`},children:[(0,k.jsx)(`h2`,{id:C,className:`!m-0 text-title-small text-[var(--content-default)]`,children:`Share Feedback`}),(0,k.jsx)(a,{variant:`ghost`,iconOnly:(0,k.jsx)(h,{}),onClick:t,disabled:$,"aria-label":`Close`,tintColor:`var(--content-secondary)`})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-3.5 overflow-y-auto pt-4 ${$?`pointer-events-none opacity-60`:``}`,children:[S&&(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] px-3 py-2.5`,children:[(0,k.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,k.jsx)(d,{checked:X,onChange:()=>ge(e=>!e),"aria-label":`Download diagnostics directly`}),(0,k.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:`Download diagnostics directly`})]}),(0,k.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Admin only — builds the diagnostics archive locally and downloads it instead of submitting feedback or notifying Slack.`})]}),X?(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:`Time range`}),(0,k.jsx)(c,{options:M,value:H,onChange:U,"aria-label":`Diagnostics time range`})]}):(0,k.jsxs)(k.Fragment,{children:[ve&&(0,k.jsx)(ee,{id:`${C}-email`,ref:O,label:`Email`,type:`email`,placeholder:`you@example.com`,value:L,onChange:e=>R(e.target.value),leftIcon:(0,k.jsx)(re,{className:`h-4 w-4`,"aria-hidden":!0}),fullWidth:!0}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Category`}),(0,k.jsx)(`div`,{className:`flex gap-2`,children:A.map(e=>(0,k.jsx)(de,{option:e,isSelected:j===e.value,onSelect:()=>be(e.value)},e.value))})]}),(0,k.jsx)(`hr`,{className:`border-[var(--border-subtle)]`}),j===`bug_report`&&(0,k.jsxs)(l,{tone:`info`,children:[`Tip: Get faster support by posting in our`,` `,(0,k.jsx)(`a`,{href:`https://vellum.ai/community`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`Discord community`})]}),j===`feature_request`&&(0,k.jsxs)(l,{tone:`info`,children:[`Tip: Vote on features on our`,` `,(0,k.jsx)(`a`,{href:`https://vellum.ai/roadmap`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`public roadmap`})]}),(0,k.jsx)(u,{id:`${C}-message`,ref:D,label:j===`bug_report`?`What went wrong?`:j===`feature_request`?`Describe your idea`:`What's on your mind?`,rows:3,placeholder:j===`bug_report`?`What did you expect to happen, and what happened instead?`:j===`feature_request`?`What problem would this solve for you?`:`Share your thoughts...`,value:P,onChange:e=>I(e.target.value),fullWidth:!0}),j!==`feature_request`&&(0,k.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,k.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,k.jsx)(d,{checked:z,onChange:xe,"aria-label":`Include browser diagnostics`}),(0,k.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include diagnostics`})]}),(0,k.jsx)(i,{content:`Diagnostics include browser context, assistant logs, and timestamps — never passwords or credentials.`,children:(0,k.jsx)(`button`,{type:`button`,"aria-label":`About diagnostics`,className:`inline-flex items-center justify-center text-[var(--content-tertiary)]`,children:(0,k.jsx)(m,{className:`h-3.5 w-3.5`})})})]}),z&&(0,k.jsx)(c,{options:M,value:H,onChange:U,"aria-label":`Diagnostics time range`})]}),f()&&g&&j!==`feature_request`&&(0,k.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,k.jsx)(d,{checked:Y,onChange:()=>he(e=>!e),"aria-label":`Include the most recent conversation`}),(0,k.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include the most recent conversation`})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,k.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:[`Attachments`,W.length>0&&(0,k.jsxs)(`span`,{className:`text-[var(--content-tertiary)]`,children:[` · `,W.length,`/`,F]})]}),(0,k.jsx)(a,{variant:`outlined`,size:`compact`,leftIcon:(0,k.jsx)(x,{}),onClick:()=>E.current?.click(),disabled:W.length>=F,children:`Add files`}),(0,k.jsx)(`input`,{ref:E,type:`file`,multiple:!0,accept:`image/png,image/jpeg,image/gif,image/webp,video/mp4,video/quicktime,video/webm`,onChange:Te,className:`hidden`})]}),W.length>0&&(0,k.jsx)(`div`,{className:`flex gap-2 overflow-x-auto`,children:W.map((e,t)=>(0,k.jsx)(fe,{file:e,onRemove:()=>ke(t)},`${e.name}-${t}`))}),me&&(0,k.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Drop files to attach…`})]})]}),K&&(0,k.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--system-negative-strong)]`,children:K})]}),(0,k.jsx)(`div`,{className:`mt-4 flex items-center justify-end gap-2 border-t pt-4`,style:{borderColor:`var(--border-subtle)`},children:$?(0,k.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-body-medium-lighter text-[var(--content-secondary)]`,children:[(0,k.jsx)(te,{className:`h-4 w-4 animate-spin`}),X?`Preparing diagnostics…`:`Sending feedback…`]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(a,{variant:`ghost`,onClick:t,children:`Cancel`}),X?(0,k.jsx)(a,{variant:`primary`,leftIcon:(0,k.jsx)(ie,{}),onClick:async()=>{if(!$){q(null),Q(!0);try{let e=await ue(H,s??null,f()?Y?g??null:null:g??null,v);if(!e){q(`Diagnostics export isn't supported in this browser.`);return}let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=e.name,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),0),t()}catch(e){q(e instanceof Error?e.message:`Failed to build diagnostics. Please try again.`)}finally{Q(!1)}}},children:`Download diagnostics`}):(0,k.jsx)(a,{variant:`primary`,leftIcon:(0,k.jsx)(ae,{}),onClick:async()=>{if(!(!ye||$)){q(null),Q(!0);try{let e=z&&j!==`feature_request`?await ue(H,s??null,f()?Y?g??null:null:g??null,v):null;await Z.mutateAsync({headers:{"Content-Type":null},body:{message:P.trim(),classification:se[j],email:L.trim(),client:ce(),client_version:void 0,...s?{assistant_id:s}:{},...p?{assistant_version:p}:{},...e?{logs_file:e}:{},...W.length?{attachments:W}:{}},bodySerializer:e=>{let t=new FormData;for(let[n,r]of Object.entries(e))if(r!=null){if(n===`attachments`&&Array.isArray(r)){for(let e of r)t.append(`attachments`,e);continue}r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}}),r?.(),t()}catch(e){q(e instanceof Error?e.message:`Failed to submit feedback. Please try again.`)}finally{Q(!1)}}},disabled:!ye,children:`Submit`})]})})]})}),document.body):null}function de({option:e,isSelected:t,onSelect:n}){let r=e.icon;return(0,k.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-left transition-colors`,style:{borderColor:t?`var(--primary-base)`:`var(--border-base)`,backgroundColor:t?`color-mix(in oklab, var(--primary-base) 10%, transparent)`:`transparent`},children:[(0,k.jsx)(r,{className:`h-3.5 w-3.5 shrink-0`,style:{color:t?`var(--primary-base)`:`var(--content-secondary)`}}),(0,k.jsx)(`span`,{className:`text-body-small-default`,style:{color:t?`var(--primary-base)`:`var(--content-default)`},children:e.label})]})}function fe({file:e,onRemove:t}){let n=e.type.startsWith(`image/`),r=(0,w.useMemo)(()=>n?URL.createObjectURL(e):null,[e,n]);return(0,w.useEffect)(()=>{if(r)return()=>URL.revokeObjectURL(r)},[r]),(0,k.jsxs)(`div`,{className:`relative flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)]`,title:e.name,children:[n&&r?(0,k.jsx)(`img`,{src:r,alt:e.name,className:`h-full w-full object-cover`}):(0,k.jsx)(x,{className:`h-5 w-5 text-[var(--content-secondary)]`}),(0,k.jsx)(a,{variant:`ghost`,size:`compact`,iconOnly:(0,k.jsx)(h,{}),onClick:t,"aria-label":`Remove ${e.name}`,className:`absolute top-0.5 right-0.5 h-4 w-4 rounded-full bg-black/60 text-white hover:bg-black/70`,tintColor:`#fff`})]})}export{O as n,z as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,t as i,u as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./typography-BscuIPxA.js";import{r as c}from"./src-mai-NajT.js";import{t as l}from"./is-electron-C_ZTVhv8.js";import{t as u}from"./arrow-left-CP-EhDNF.js";import{t as d}from"./chevron-right-B6vEpVY0.js";import{a as f}from"./routes-Cj4wRAOK.js";import{n as p}from"./use-is-mobile-BGESxQUL.js";import{t as m}from"./haptics-sqdfYVvS.js";import{Hn as h,an as g,wn as _}from"./index-0XgM92Lz.js";var v=e(t(),1),y=20,b=100,x=.3,S=.7,C=10,w=.3,T=200,E=180,D=200,O=.25,k=50;function A(e){return Math.min(b,e*x)}function j(e,t){return Math.abs(t)>Math.abs(e)*S}function M(e,t){return Math.abs(e)<C&&Math.abs(t)<C?`pending`:j(e,t)||e<=0?`cancel`:`confirm`}function N(e,t){return e<=t?e:t+(e-t)*w}function P(e,t){return e>=t}function F(e){e.style.transition=``,e.style.transform=``,e.style.willChange=``,e.style.opacity=``}function I({containerRef:e,onBack:t,enabled:n,navKey:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(t),o=(0,v.useRef)(n),s=(0,v.useRef)(!1);(0,v.useLayoutEffect)(()=>{a.current=t,o.current=n},[t,n]),(0,v.useEffect)(()=>{if(!h())return;let t=e.current;if(!t)return;let n=new Set,r=!1,c=(e,t)=>{let i=setTimeout(()=>{n.delete(i),r||e()},t);n.add(i)},l=()=>F(t),u=()=>A(window.innerWidth),d=e=>{t.style.transform=e===0?``:`translateX(${e}px)`},f=(e,t)=>{for(let n=0;n<e.length;n+=1){let r=e[n];if(r&&r.identifier===t)return r}return null},p=e=>{if(i.current=null,e){t.style.transition=`transform ${T}ms ease-out`,d(0);let e=()=>{t.removeEventListener(`transitionend`,e),l()};t.addEventListener(`transitionend`,e,{once:!0}),c(l,T+k)}else l()},g=()=>{t.style.transition=`transform ${E}ms ease-in`,d(window.innerWidth);let e=!1,n=()=>{if(e||r)return;e=!0,t.removeEventListener(`transitionend`,n);let i=-(window.innerWidth*O);t.style.transition=`none`,t.style.transform=`translateX(${i}px)`,t.style.opacity=`0`,t.offsetWidth,s.current=!0,a.current(),c(()=>{s.current&&(s.current=!1,l())},D*2)};t.addEventListener(`transitionend`,n,{once:!0}),c(n,E+k)},_=e=>{if(!o.current||i.current||e.touches.length!==1)return;let t=e.touches[0];t&&(t.clientX>y||(i.current={touchId:t.identifier,startX:t.clientX,startY:t.clientY,confirmed:!1,hasFiredHaptic:!1}))},v=e=>{let n=i.current;if(!n)return;if(e.touches.length>1){p(!1);return}let r=f(e.touches,n.touchId);if(!r)return;let a=r.clientX-n.startX,o=r.clientY-n.startY;if(!n.confirmed){let e=M(a,o);if(e===`pending`)return;if(e===`cancel`){p(!1);return}n.confirmed=!0,t.style.transition=`none`,t.style.willChange=`transform`}let s=u();if(j(a,o)&&a<s){p(!0);return}let c=N(a,s);a>=s&&!n.hasFiredHaptic&&(n.hasFiredHaptic=!0,m.light()),d(c)},b=e=>{let t=i.current;if(!t)return;let n=f(e.changedTouches,t.touchId),r=n?n.clientX-t.startX:0;t.confirmed&&P(r,u())?(i.current=null,g()):t.confirmed?p(!0):p(!1)},x=()=>{i.current?.confirmed?p(!0):p(!1)};return document.addEventListener(`touchstart`,_,{passive:!0}),document.addEventListener(`touchmove`,v,{passive:!0}),document.addEventListener(`touchend`,b,{passive:!0}),document.addEventListener(`touchcancel`,x,{passive:!0}),()=>{r=!0;for(let e of n)clearTimeout(e);n.clear(),i.current=null,document.removeEventListener(`touchstart`,_),document.removeEventListener(`touchmove`,v),document.removeEventListener(`touchend`,b),document.removeEventListener(`touchcancel`,x),l()}},[e]),(0,v.useLayoutEffect)(()=>{if(!s.current)return;s.current=!1;let t=e.current;if(!t)return;let n=!1,r=()=>{n||(n=!0,t.removeEventListener(`transitionend`,r),F(t))};t.style.transition=`transform ${D}ms ease-out, opacity ${D}ms ease-out`,t.style.transform=``,t.style.opacity=``,t.addEventListener(`transitionend`,r,{once:!0});let i=setTimeout(r,D+k);return()=>{clearTimeout(i),t.removeEventListener(`transitionend`,r),F(t)}},[r,e])}var L=o();function R({sidebar:e,children:t,actions:o,backHref:c,title:d=`Settings`,menuRoute:m=f.settings.root}){let{pathname:h}=a(),y=r(),b=h===m,x=p(),S=(0,v.useRef)(null),C=b?c:m;I({containerRef:S,onBack:(0,v.useCallback)(()=>{y(C)},[y,C]),enabled:x&&!b,navKey:h});let w=l(),T=b?`Back from ${d}`:`Back to ${d} menu`,E=(0,L.jsx)(n,{variant:`ghost`,iconOnly:(0,L.jsx)(u,{}),"aria-label":T,tintColor:`var(--content-secondary)`,onClick:()=>y(C)}),D=(0,L.jsx)(n,{asChild:!0,variant:`outlined`,"aria-label":`Back from ${d}`,className:`h-8 w-8 px-0`,tintColor:`var(--content-secondary)`,children:(0,L.jsx)(i,{to:c,className:`flex items-center justify-center no-underline`,children:(0,L.jsx)(u,{size:16,"aria-hidden":`true`})})});return(0,L.jsxs)(`div`,{ref:S,className:`flex h-full min-h-0 w-full flex-1 flex-col gap-4 p-4 sm:p-6 md:gap-0`,style:{paddingTop:w?`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 3.75rem)`:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`},children:[(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 md:hidden`,children:[E,(0,L.jsx)(s,{as:`h1`,variant:`body-large-default`,className:`flex-1 truncate text-center`,style:{color:`var(--content-tertiary)`,lineHeight:1.4},children:d}),(0,L.jsx)(`div`,{className:`h-10 w-10 shrink-0`,"aria-hidden":`true`})]}),w?(0,L.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 pb-4 empty:hidden`,children:[(0,L.jsx)(_,{placement:`electron`,className:`px-0 pt-0`}),(0,L.jsx)(g,{placement:`electron`,className:`px-0 pt-0`})]}):null,(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden md:rounded-[12px] md:border md:border-[var(--border-base)] md:bg-[var(--surface-overlay)]`,children:[(0,L.jsxs)(`div`,{className:`hidden shrink-0 items-center justify-between gap-4 px-6 py-5 md:flex`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[D,(0,L.jsx)(`h1`,{className:`text-title-large truncate`,style:{color:`var(--content-emphasised)`,lineHeight:1.2},children:d})]}),(0,L.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:o})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[(0,L.jsx)(`aside`,{className:`hidden w-64 shrink-0 overflow-y-auto md:block`,"aria-label":`${d} navigation`,children:e}),b?(0,L.jsx)(`div`,{className:`flex min-w-0 min-h-0 flex-1 flex-col overflow-y-auto pb-6 md:hidden`,children:e}):null,(0,L.jsx)(`main`,{className:`min-w-0 min-h-0 flex-1 flex-col gap-4 overflow-y-auto pb-6 md:flex md:px-6 md:pt-0 ${b?`hidden`:`flex`}`,children:t})]})]})]})}function z({items:e,bottomItems:t,indexPath:n}){let{pathname:i}=a(),o=r(),s=(e,t,r)=>{let{href:a,onSelect:s}=e,l=a!=null&&(i===a||i.startsWith(a+`/`)||r&&n!=null&&i===n);return(0,L.jsxs)(v.Fragment,{children:[(0,L.jsx)(c.Item,{icon:e.icon,label:e.label,active:l,trailingIcon:a==null?void 0:d,trailingIconClassName:a==null?void 0:`md:hidden`,href:a,onSelect:s,onClick:a==null?void 0:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),o(a))}}),!t&&(0,L.jsx)(`div`,{role:`presentation`,"aria-hidden":!0,className:`my-2 h-px w-full bg-[var(--border-base)] md:hidden`})]},e.id)};return(0,L.jsxs)(`nav`,{"aria-label":`Sidebar navigation`,className:`flex min-h-full flex-col md:gap-2 md:px-6 md:pb-4`,children:[e.map((n,r)=>s(n,r===e.length-1&&!t?.length,r===0)),t&&t.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`flex-1`}),(0,L.jsx)(`div`,{role:`presentation`,"aria-hidden":!0,className:`mx-0 my-2 h-px w-full bg-[var(--border-base)] md:mx-0`}),t.map((e,n)=>s(e,n===t.length-1,!1))]})]})}export{R as n,z as t};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D-AX8Voo.js";import{d as r,t as i,u as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./typography-BscuIPxA.js";import{r as c}from"./src-B-I7oowl.js";import{t as l}from"./is-electron-C_ZTVhv8.js";import{t as u}from"./arrow-left-CP-EhDNF.js";import{t as d}from"./chevron-right-B6vEpVY0.js";import{a as f}from"./routes-C6gxiCrz.js";import{n as p}from"./use-is-mobile-jACt_z2d.js";import{t as m}from"./haptics-BE_0g4mc.js";import{Wn as h,kn as g,un as _}from"./index-FlO-C4WJ.js";var v=e(t(),1),y=20,b=100,x=.3,S=.7,C=10,w=.3,T=200,E=180,D=200,O=.25,k=50;function A(e){return Math.min(b,e*x)}function j(e,t){return Math.abs(t)>Math.abs(e)*S}function M(e,t){return Math.abs(e)<C&&Math.abs(t)<C?`pending`:j(e,t)||e<=0?`cancel`:`confirm`}function N(e,t){return e<=t?e:t+(e-t)*w}function P(e,t){return e>=t}function F(e){e.style.transition=``,e.style.transform=``,e.style.willChange=``,e.style.opacity=``}function I({containerRef:e,onBack:t,enabled:n,navKey:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(t),o=(0,v.useRef)(n),s=(0,v.useRef)(!1);(0,v.useLayoutEffect)(()=>{a.current=t,o.current=n},[t,n]),(0,v.useEffect)(()=>{if(!h())return;let t=e.current;if(!t)return;let n=new Set,r=!1,c=(e,t)=>{let i=setTimeout(()=>{n.delete(i),r||e()},t);n.add(i)},l=()=>F(t),u=()=>A(window.innerWidth),d=e=>{t.style.transform=e===0?``:`translateX(${e}px)`},f=(e,t)=>{for(let n=0;n<e.length;n+=1){let r=e[n];if(r&&r.identifier===t)return r}return null},p=e=>{if(i.current=null,e){t.style.transition=`transform ${T}ms ease-out`,d(0);let e=()=>{t.removeEventListener(`transitionend`,e),l()};t.addEventListener(`transitionend`,e,{once:!0}),c(l,T+k)}else l()},g=()=>{t.style.transition=`transform ${E}ms ease-in`,d(window.innerWidth);let e=!1,n=()=>{if(e||r)return;e=!0,t.removeEventListener(`transitionend`,n);let i=-(window.innerWidth*O);t.style.transition=`none`,t.style.transform=`translateX(${i}px)`,t.style.opacity=`0`,t.offsetWidth,s.current=!0,a.current(),c(()=>{s.current&&(s.current=!1,l())},D*2)};t.addEventListener(`transitionend`,n,{once:!0}),c(n,E+k)},_=e=>{if(!o.current||i.current||e.touches.length!==1)return;let t=e.touches[0];t&&(t.clientX>y||(i.current={touchId:t.identifier,startX:t.clientX,startY:t.clientY,confirmed:!1,hasFiredHaptic:!1}))},v=e=>{let n=i.current;if(!n)return;if(e.touches.length>1){p(!1);return}let r=f(e.touches,n.touchId);if(!r)return;let a=r.clientX-n.startX,o=r.clientY-n.startY;if(!n.confirmed){let e=M(a,o);if(e===`pending`)return;if(e===`cancel`){p(!1);return}n.confirmed=!0,t.style.transition=`none`,t.style.willChange=`transform`}let s=u();if(j(a,o)&&a<s){p(!0);return}let c=N(a,s);a>=s&&!n.hasFiredHaptic&&(n.hasFiredHaptic=!0,m.light()),d(c)},b=e=>{let t=i.current;if(!t)return;let n=f(e.changedTouches,t.touchId),r=n?n.clientX-t.startX:0;t.confirmed&&P(r,u())?(i.current=null,g()):t.confirmed?p(!0):p(!1)},x=()=>{i.current?.confirmed?p(!0):p(!1)};return document.addEventListener(`touchstart`,_,{passive:!0}),document.addEventListener(`touchmove`,v,{passive:!0}),document.addEventListener(`touchend`,b,{passive:!0}),document.addEventListener(`touchcancel`,x,{passive:!0}),()=>{r=!0;for(let e of n)clearTimeout(e);n.clear(),i.current=null,document.removeEventListener(`touchstart`,_),document.removeEventListener(`touchmove`,v),document.removeEventListener(`touchend`,b),document.removeEventListener(`touchcancel`,x),l()}},[e]),(0,v.useLayoutEffect)(()=>{if(!s.current)return;s.current=!1;let t=e.current;if(!t)return;let n=!1,r=()=>{n||(n=!0,t.removeEventListener(`transitionend`,r),F(t))};t.style.transition=`transform ${D}ms ease-out, opacity ${D}ms ease-out`,t.style.transform=``,t.style.opacity=``,t.addEventListener(`transitionend`,r,{once:!0});let i=setTimeout(r,D+k);return()=>{clearTimeout(i),t.removeEventListener(`transitionend`,r),F(t)}},[r,e])}var L=o();function R({sidebar:e,children:t,actions:o,backHref:c,title:d=`Settings`,menuRoute:m=f.settings.root}){let{pathname:h}=a(),y=r(),b=h===m,x=p(),S=(0,v.useRef)(null),C=b?c:m;I({containerRef:S,onBack:(0,v.useCallback)(()=>{y(C)},[y,C]),enabled:x&&!b,navKey:h});let w=l(),T=b?`Back from ${d}`:`Back to ${d} menu`,E=(0,L.jsx)(n,{variant:`ghost`,iconOnly:(0,L.jsx)(u,{}),"aria-label":T,tintColor:`var(--content-secondary)`,onClick:()=>y(C)}),D=(0,L.jsx)(n,{asChild:!0,variant:`outlined`,"aria-label":`Back from ${d}`,className:`h-8 w-8 px-0`,tintColor:`var(--content-secondary)`,children:(0,L.jsx)(i,{to:c,className:`flex items-center justify-center no-underline`,children:(0,L.jsx)(u,{size:16,"aria-hidden":`true`})})});return(0,L.jsxs)(`div`,{ref:S,className:`flex h-full min-h-0 w-full flex-1 flex-col gap-4 p-4 sm:p-6 md:gap-0`,style:{paddingTop:w?`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 3.75rem)`:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`},children:[(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 md:hidden`,children:[E,(0,L.jsx)(s,{as:`h1`,variant:`body-large-default`,className:`flex-1 truncate text-center`,style:{color:`var(--content-tertiary)`,lineHeight:1.4},children:d}),(0,L.jsx)(`div`,{className:`h-10 w-10 shrink-0`,"aria-hidden":`true`})]}),w?(0,L.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 pb-4 empty:hidden`,children:[(0,L.jsx)(g,{placement:`electron`,className:`px-0 pt-0`}),(0,L.jsx)(_,{placement:`electron`,className:`px-0 pt-0`})]}):null,(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden md:rounded-[12px] md:border md:border-[var(--border-base)] md:bg-[var(--surface-overlay)]`,children:[(0,L.jsxs)(`div`,{className:`hidden shrink-0 items-center justify-between gap-4 px-6 py-5 md:flex`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[D,(0,L.jsx)(`h1`,{className:`text-title-large truncate`,style:{color:`var(--content-emphasised)`,lineHeight:1.2},children:d})]}),(0,L.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:o})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[(0,L.jsx)(`aside`,{className:`hidden w-64 shrink-0 overflow-y-auto md:block`,"aria-label":`${d} navigation`,children:e}),b?(0,L.jsx)(`div`,{className:`flex min-w-0 min-h-0 flex-1 flex-col overflow-y-auto pb-6 md:hidden`,children:e}):null,(0,L.jsx)(`main`,{className:`min-w-0 min-h-0 flex-1 flex-col gap-4 overflow-y-auto pb-6 md:flex md:px-6 md:pt-0 ${b?`hidden`:`flex`}`,children:t})]})]})]})}function z({items:e,bottomItems:t,indexPath:n}){let{pathname:i}=a(),o=r(),s=(e,t,r)=>{let{href:a,onSelect:s}=e,l=a!=null&&(i===a||i.startsWith(a+`/`)||r&&n!=null&&i===n);return(0,L.jsxs)(v.Fragment,{children:[(0,L.jsx)(c.Item,{icon:e.icon,label:e.label,active:l,trailingIcon:a==null?void 0:d,trailingIconClassName:a==null?void 0:`md:hidden`,href:a,onSelect:s,onClick:a==null?void 0:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),o(a))}}),!t&&(0,L.jsx)(`div`,{role:`presentation`,"aria-hidden":!0,className:`my-2 h-px w-full bg-[var(--border-base)] md:hidden`})]},e.id)};return(0,L.jsxs)(`nav`,{"aria-label":`Sidebar navigation`,className:`flex min-h-full flex-col md:gap-2 md:px-6 md:pb-4`,children:[e.map((n,r)=>s(n,r===e.length-1&&!t?.length,r===0)),t&&t.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`flex-1`}),(0,L.jsx)(`div`,{role:`presentation`,"aria-hidden":!0,className:`mx-0 my-2 h-px w-full bg-[var(--border-base)] md:mx-0`}),t.map((e,n)=>s(e,n===t.length-1,!1))]})]})}export{R as n,z as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{h as n}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{f as i}from"./native-biometric-BK6_QtW5.js";import{n as a,r as o}from"./login-flow-Ds9vsrwI.js";import{t as s}from"./proxy-BgtfAoJj.js";import{t as c}from"./AnimatePresence-uY0BR2n2.js";import{pt as l}from"./index-FlO-C4WJ.js";import{t as u}from"./signup-shell-DMX1tgqB.js";var d=e(t(),1),f=r();function p({words:e}){let[t,n]=(0,d.useState)(0),r=(0,d.useMemo)(()=>e.reduce((e,t)=>e.length>=t.length?e:t),[e]);return(0,d.useEffect)(()=>{let t=setInterval(()=>{n(t=>(t+1)%e.length)},2400);return()=>clearInterval(t)},[e.length]),(0,f.jsxs)(`span`,{className:`signup__rotating`,children:[(0,f.jsxs)(`span`,{className:`signup__rotating-sizer`,"aria-hidden":!0,children:[r,`.`]}),(0,f.jsx)(c,{mode:`wait`,children:(0,f.jsxs)(s.em,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-16},transition:{duration:.3,ease:`easeInOut`},children:[e[t],`.`]},e[t])})]})}var m=[`Personal Intelligence`,`Software Engineer`,`Finance Ops`,`Household Manager`,`GTM Engineer`,`Product Lead`];function h({returnTo:e}){let[t,n]=(0,d.useState)(null),r=o(e,{authIntent:`signup`});return(0,f.jsxs)(u,{children:[(0,f.jsxs)(`h1`,{className:`signup__title`,children:[`Meet your new`,(0,f.jsx)(`br`,{}),(0,f.jsx)(p,{words:m})]}),(0,f.jsx)(`p`,{className:`signup__subtitle`,children:`The most powerful assistant that can handle your work and life admin tasks.`}),(0,f.jsx)(`div`,{className:`signup__buttons`,children:(0,f.jsx)(`button`,{type:`button`,className:`signup__btn`,onClick:()=>{n(null),i(a,r,{returnTo:e,intent:`signup`}).catch(e=>{console.error(`[signup] auth flow failed:`,e),n(`Something went wrong. Please try again.`)})},children:`Continue`})}),t&&(0,f.jsx)(`p`,{className:`signup__error`,children:t}),(0,f.jsxs)(`p`,{className:`signup__footer`,children:[`Already have an account?`,` `,(0,f.jsx)(`button`,{type:`button`,className:`signup__link`,onClick:()=>{n(null),i(a,o(e),{returnTo:e}).catch(e=>{console.error(`[signup] sign-in flow failed:`,e),n(`Something went wrong. Please try again.`)})},children:`Sign in`})]}),(0,f.jsxs)(`a`,{className:`signup__download`,href:`/downloads`,children:[(0,f.jsx)(l,{size:16}),`Download for macOS`]})]})}function g(){let[e]=n();return(0,f.jsx)(h,{returnTo:e.get(`returnTo`)})}export{g as SignupPage};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./public-asset-B78MSgNd.js";import{t as n}from"./proxy-i05YF9w2.js";var r=e();function i({children:e}){return(0,r.jsxs)(n.div,{"data-theme":`dark`,className:`signup`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:[(0,r.jsxs)(`div`,{className:`signup__left`,children:[(0,r.jsx)(`div`,{className:`signup__logo`,children:(0,r.jsx)(`img`,{src:t(`/vellum-logo-white.svg`),alt:`Vellum`,width:82,height:25})}),(0,r.jsx)(`div`,{className:`signup__form`,children:e})]}),(0,r.jsx)(n.div,{className:`signup__right`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.15},"aria-hidden":!0,children:(0,r.jsx)(`video`,{className:`signup__video`,src:t(`/vellum-scene-cut.mp4`),autoPlay:!0,loop:!0,muted:!0,playsInline:!0})})]})}export{i as t};
1
+ import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./public-asset-C2P77n3W.js";import{t as n}from"./proxy-BgtfAoJj.js";var r=e();function i({children:e}){return(0,r.jsxs)(n.div,{"data-theme":`dark`,className:`signup`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:[(0,r.jsxs)(`div`,{className:`signup__left`,children:[(0,r.jsx)(`div`,{className:`signup__logo`,children:(0,r.jsx)(`img`,{src:t(`/vellum-logo-white.svg`),alt:`Vellum`,width:82,height:25})}),(0,r.jsx)(`div`,{className:`signup__form`,children:e})]}),(0,r.jsx)(n.div,{className:`signup__right`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.15},"aria-hidden":!0,children:(0,r.jsx)(`video`,{className:`signup__video`,src:t(`/vellum-scene-cut.mp4`),autoPlay:!0,loop:!0,muted:!0,playsInline:!0})})]})}export{i as t};