@vellumai/web 0.10.8 → 0.10.9-dev.202607152225.ec6fdbf

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 (428) hide show
  1. package/dist/assets/{AnimatePresence-s1Z1HHWx.js → AnimatePresence-TZWSGjkI.js} +1 -1
  2. package/dist/assets/{BundleConfirmPage-C6bP7QB3.js → BundleConfirmPage-DgcqY17E.js} +1 -1
  3. package/dist/assets/{Combination-Cd_aWAsj.js → Combination-BJXmG5wD.js} +1 -1
  4. package/dist/assets/{a2a-invite-B9cylfIO.js → a2a-invite-hUo4WSAL.js} +1 -1
  5. package/dist/assets/{about-page-XGv9RAQu.js → about-page-BXF1KCN9.js} +1 -1
  6. package/dist/assets/account-page-BtKfeSgV.js +1 -0
  7. package/dist/assets/{account-shell-CdhP9l8T.js → account-shell-BVt4WGoT.js} +1 -1
  8. package/dist/assets/{acp-run-detail-panel-B1-zyOUe.js → acp-run-detail-panel-dcYWtQOo.js} +4 -4
  9. package/dist/assets/activity-steps-panel-GH3dyhG2.js +1 -0
  10. package/dist/assets/{add-credits-modal-PP1PX8Qv.js → add-credits-modal-XShL7AQ5.js} +1 -1
  11. package/dist/assets/ai-page-P438M1mx.js +1 -0
  12. package/dist/assets/animated-avatar-Y-A_0vmk.js +1 -0
  13. package/dist/assets/{api-_7pKLlYA.js → api-BsCfy4XV.js} +1 -1
  14. package/dist/assets/{api-BsQZ81K5.js → api-Dj9Z-j-6.js} +1 -1
  15. package/dist/assets/{api-key-screen-DTSP_-Da.js → api-key-screen-D5mqS5uB.js} +1 -1
  16. package/dist/assets/app-types-CTJGOi24.js +1 -0
  17. package/dist/assets/archive-redirect-page-BzPbcTFb.js +1 -0
  18. package/dist/assets/arrow-left-C2re-gYj.js +1 -0
  19. package/dist/assets/{assistant-feature-flag-store-DA8Oj9Mf.js → assistant-feature-flag-store-eHqy0FOb.js} +1 -1
  20. package/dist/assets/assistant-identity-store-Bc4hbSCe.js +1 -0
  21. package/dist/assets/assistant-status-panel-Dnnejpmx.js +1 -0
  22. package/dist/assets/auth-store-Ce9wqr8c.js +2 -0
  23. package/dist/assets/background-task-detail-panel-Dr2O-AOO.js +1 -0
  24. package/dist/assets/ban-Ih5bAOHZ.js +1 -0
  25. package/dist/assets/{bell-BQLonLMp.js → bell-BbESwsZk.js} +1 -1
  26. package/dist/assets/billing-page-Cuir7xDL.js +3 -0
  27. package/dist/assets/{bookmark-CNrithFf.js → bookmark-Dzconbsv.js} +1 -1
  28. package/dist/assets/{bookmarks-page-CjcavZv8.js → bookmarks-page-IeNT-se-.js} +1 -1
  29. package/dist/assets/{brain-BLDXGaUy.js → brain-CMiHVWFK.js} +1 -1
  30. package/dist/assets/browser-CUdEL48R.js +2 -0
  31. package/dist/assets/{bug-BsuQ5ciQ.js → bug-YmXTm_XW.js} +1 -1
  32. package/dist/assets/{build-state-PUXrUU4W.js → build-state-Cc8lgfTd.js} +1 -1
  33. package/dist/assets/button-BQVYX8n_.js +1 -0
  34. package/dist/assets/{calendar-h-mv1itX.js → calendar-D0labpMU.js} +1 -1
  35. package/dist/assets/card-D8zyWtZh.js +1 -0
  36. package/dist/assets/channels-page-route-HVoMtCIE.js +9 -0
  37. package/dist/assets/chat-CPqIbgZQ.js +1 -0
  38. package/dist/assets/chat-markdown-message-DekUplzJ.js +2 -0
  39. package/dist/assets/check-wF3S-AV4.js +1 -0
  40. package/dist/assets/checkbox-m-fy9ift.js +1 -0
  41. package/dist/assets/{chevron-down-qD-re7AW.js → chevron-down-DpYf9Gwq.js} +1 -1
  42. package/dist/assets/chevron-left-B_RAz34t.js +1 -0
  43. package/dist/assets/chevron-right-jRymmL7S.js +1 -0
  44. package/dist/assets/{chevron-up-3jCod9LW.js → chevron-up-DHI-QRpz.js} +1 -1
  45. package/dist/assets/{chunk-5KNZJZUH-DdS6bb-3.js → chunk-5KNZJZUH-SU6Q_tDT.js} +1 -1
  46. package/dist/assets/{circle-alert-zOqdmf25.js → circle-alert-CTnM6GCb.js} +1 -1
  47. package/dist/assets/circle-check-DqvTjWle.js +1 -0
  48. package/dist/assets/{client-feature-flag-store-DkJl-g9A.js → client-feature-flag-store-BWSPRAZI.js} +1 -1
  49. package/dist/assets/{client-identity-CadrtY_b.js → client-identity-C1M6QeKU.js} +1 -1
  50. package/dist/assets/{clipboard-copy-DF6K1xc6.js → clipboard-copy-DbekAYi3.js} +1 -1
  51. package/dist/assets/{cloud-off-Db1nySkc.js → cloud-off-Cj66Ozsp.js} +1 -1
  52. package/dist/assets/code-D1zl7aOd.js +1 -0
  53. package/dist/assets/{command-palette-6o4m7BM9.js → command-palette-D0KUPO0z.js} +1 -1
  54. package/dist/assets/{command-palette-window-page-BsJlr5bh.js → command-palette-window-page-C7FWkvBe.js} +1 -1
  55. package/dist/assets/{community-page-CJA4JfuC.js → community-page-DdajiWNT.js} +1 -1
  56. package/dist/assets/{confirm-dialog-CSkhRFRk.js → confirm-dialog-kE8y7s20.js} +1 -1
  57. package/dist/assets/{connect-page-DZgU3jCf.js → connect-page-8DGIdo6r.js} +1 -1
  58. package/dist/assets/consent-Bg13wifR.js +1 -0
  59. package/dist/assets/{consent-controls-Cnr1DzCr.js → consent-controls-9HzLiDGE.js} +1 -1
  60. package/dist/assets/{contacts-gateway-CW5CipBv.js → contacts-gateway-DsqzGIxS.js} +1 -1
  61. package/dist/assets/contacts-page-route-DKRLyHc9.js +1 -0
  62. package/dist/assets/{conversation-list-fetchers-DS9vmqfD.js → conversation-list-fetchers-CQ_dcy46.js} +1 -1
  63. package/dist/assets/{cpu-BJuB2Khn.js → cpu-CEyjQpZz.js} +1 -1
  64. package/dist/assets/{credential-entry-page-9H2HOu88.js → credential-entry-page-Bz05OQ1l.js} +1 -1
  65. package/dist/assets/credentials-page-DQUaGcSk.js +1 -0
  66. package/dist/assets/{credit-card-BuyWdO9t.js → credit-card-BY-vD21O.js} +1 -1
  67. package/dist/assets/danger-zone-redirect-page-BObfZbXc.js +1 -0
  68. package/dist/assets/debug-page-CHEFIcwt.js +4 -0
  69. package/dist/assets/{deploy-dialogs-paL_zcvG.js → deploy-dialogs-CHO7qgXb.js} +1 -1
  70. package/dist/assets/detail-card-ft5Na6Jw.js +1 -0
  71. package/dist/assets/{detail-panel-stop-button-y7O3HqJj.js → detail-panel-stop-button-DFd5vXbh.js} +1 -1
  72. package/dist/assets/developer-page-D5TyzQhJ.js +1 -0
  73. package/dist/assets/device-settings-BBwtGKJb.js +1 -0
  74. package/dist/assets/devices-redirect-page-C1LQBzrn.js +1 -0
  75. package/dist/assets/{diagnostics-COsnZMe5.js → diagnostics-BbfP585e.js} +1 -1
  76. package/dist/assets/{dictation-overlay-page-BkEBWrWm.js → dictation-overlay-page-DButFzu3.js} +1 -1
  77. package/dist/assets/{dist-CxHeCOEv.js → dist-Btg1osd6.js} +1 -1
  78. package/dist/assets/{dist-DqmYHxdg.js → dist-CxzJhU4a.js} +1 -1
  79. package/dist/assets/dist-Df9Kbc9v.js +1 -0
  80. package/dist/assets/{dist-HJ505Xnn.js → dist-URk13ITj.js} +1 -1
  81. package/dist/assets/document-viewer-page-ChwaY2Gu.js +1 -0
  82. package/dist/assets/{domain-field-C5a2iMot.js → domain-field-DKKi4dF-.js} +1 -1
  83. package/dist/assets/{download-CAuK-nZ6.js → download-B6XjnEzx.js} +1 -1
  84. package/dist/assets/dropdown-BxYrCXBS.js +1 -0
  85. package/dist/assets/edge-swipe-arbiter-store-CdpmheQU.js +1 -0
  86. package/dist/assets/effective-timezone-D6A5ISj1.js +1 -0
  87. package/dist/assets/{emails-page-7c9kVi_k.js → emails-page-DsPeayRI.js} +1 -1
  88. package/dist/assets/esm-BIBV_tQW.js +1 -0
  89. package/dist/assets/esm-BpVuRCaK.js +2 -0
  90. package/dist/assets/{esm-CT8NUp3h.js → esm-BtlRHesG.js} +2 -2
  91. package/dist/assets/esm-C0eM5us1.js +2 -0
  92. package/dist/assets/esm-Cjx6Josx.js +2 -0
  93. package/dist/assets/esm-_n61e_LE.js +2 -0
  94. package/dist/assets/esm-p7tDK3Q-.js +2 -0
  95. package/dist/assets/{external-link-Dqpx9nRm.js → external-link-Cczz6xJ4.js} +1 -1
  96. package/dist/assets/eye-C2rSrbD-.js +1 -0
  97. package/dist/assets/eye-off-BQ9J3pF2.js +1 -0
  98. package/dist/assets/feature-flag-catalog-CAYgyMOh.js +1 -0
  99. package/dist/assets/{file-DsyJLS2u.js → file-C8pjlmtk.js} +1 -1
  100. package/dist/assets/file-editor-BzlaskSf.js +1 -0
  101. package/dist/assets/file-markdown-wMH_OULm.js +2 -0
  102. package/dist/assets/{file-text-CYJz-GvF.js → file-text-DA128T4K.js} +1 -1
  103. package/dist/assets/folder-open-7DKBH5WB.js +1 -0
  104. package/dist/assets/general-page-DUGHbJWs.js +1 -0
  105. package/dist/assets/{globe-4qSOWE2N.js → globe-inD5tOKN.js} +1 -1
  106. package/dist/assets/haptics-CBEu5JKM.js +2 -0
  107. package/dist/assets/{hard-drive-rDxhoRUm.js → hard-drive-BXh9qCfi.js} +1 -1
  108. package/dist/assets/hatching-screen-BfL6mMQl.js +1 -0
  109. package/dist/assets/home-page-route-CRwgwG7m.js +1 -0
  110. package/dist/assets/{hosting-screen-BZLZular.js → hosting-screen-CiNC7D5K.js} +1 -1
  111. package/dist/assets/identity-page-route-CWHBHNdp.js +7 -0
  112. package/dist/assets/index-31nbLUeS.js +209 -0
  113. package/dist/assets/index-Bp6Atcow.css +2 -0
  114. package/dist/assets/{info-DsOyuMO9.js → info-DLFMsCl-.js} +1 -1
  115. package/dist/assets/ingest-B0ofnlye.js +1 -0
  116. package/dist/assets/input-6HVXMszw.js +1 -0
  117. package/dist/assets/inspect-page-CU5v4vjm.js +9 -0
  118. package/dist/assets/integrations-page-Bf9wNW1o.js +1 -0
  119. package/dist/assets/intelligence-layout-BnPHR15j.js +1 -0
  120. package/dist/assets/{key-round-CD3JWrs1.js → key-round-BggUE1Ns.js} +1 -1
  121. package/dist/assets/keyboard-shortcuts-redirect-page-ChK4kTis.js +1 -0
  122. package/dist/assets/latest-assistant-text-B12Sw3_u.js +24 -0
  123. package/dist/assets/library-detail-page-DBg_wsW2.js +1 -0
  124. package/dist/assets/library-page-BLEm33Z3.js +1 -0
  125. package/dist/assets/{link-2-4bMylQ5v.js → link-2-YnZe-oMg.js} +1 -1
  126. package/dist/assets/list-row-B9k-FoZv.js +1 -0
  127. package/dist/assets/loader-circle-C9QrtO3C.js +1 -0
  128. package/dist/assets/{local-mode-grqHUoNh.js → local-mode-Bskd5bsT.js} +1 -1
  129. package/dist/assets/{log-in--aqELu3z.js → log-in-Xv-AVlu8.js} +1 -1
  130. package/dist/assets/{login-flow-B6q00uIW.js → login-flow-CmlnYi0j.js} +1 -1
  131. package/dist/assets/login-page-CGHvLIez.js +1 -0
  132. package/dist/assets/{logout-page-BV0URcAd.js → logout-page-DuPCZ90A.js} +1 -1
  133. package/dist/assets/logs-layout-BRxIej3c.js +1 -0
  134. package/dist/assets/memory-page-route-pnpeSii_.js +1 -0
  135. package/dist/assets/{memory-router-playground-page-CQxX6mCn.js → memory-router-playground-page-LGFJw3s7.js} +1 -1
  136. package/dist/assets/menu-CLA56vz8.js +1 -0
  137. package/dist/assets/{messages-Bl6a3LUN.js → messages-DBgRkgBa.js} +2 -2
  138. package/dist/assets/{metric-card-DvXjHVCV.js → metric-card-C3DDH1u1.js} +1 -1
  139. package/dist/assets/mic-Dmvwrxe8.js +1 -0
  140. package/dist/assets/{middleware-pbPQ0upo.js → middleware-DL-IveDQ.js} +1 -1
  141. package/dist/assets/{minimize-2-Clnet2W7.js → minimize-2-B8VHIj-G.js} +1 -1
  142. package/dist/assets/{misc-BYQPh7vS.js → misc-CS-Pktrv.js} +1 -1
  143. package/dist/assets/mobile-sidebar-drawer-CfUSy_Ou.js +1 -0
  144. package/dist/assets/modal-bIQsMU63.js +1 -0
  145. package/dist/assets/{monitor-DfbL8_59.js → monitor-Cy7Q70-7.js} +1 -1
  146. package/dist/assets/{moon-B8qiwjrW.js → moon-jDX7sipq.js} +1 -1
  147. package/dist/assets/mutation-error-CFLGO21o.js +1 -0
  148. package/dist/assets/native-biometric-BvCjSInu.js +6 -0
  149. package/dist/assets/{native-file-DI99Emal.js → native-file-C6oXU5FE.js} +2 -2
  150. package/dist/assets/notice-BiZA71pR.js +1 -0
  151. package/dist/assets/notifications-page-clztNuMl.js +1 -0
  152. package/dist/assets/{oauth-complete-page-BlJm9tRJ.js → oauth-complete-page-BK-eCVgQ.js} +1 -1
  153. package/dist/assets/{oauth-popup-complete-page-BqUopTat.js → oauth-popup-complete-page-Cs2egwq6.js} +1 -1
  154. package/dist/assets/onboarding-store-tqBxGvkR.js +1 -0
  155. package/dist/assets/page-shell-BvXbg7Db.js +1 -0
  156. package/dist/assets/{pairing-page-B5GrCx4C.js → pairing-page-BE4ph4ik.js} +1 -1
  157. package/dist/assets/panel-item-CfuwAm7q.js +1 -0
  158. package/dist/assets/password-reset-page-8SeFGA1l.js +1 -0
  159. package/dist/assets/{pencil-CUIr0IFo.js → pencil-BOTCmXXR.js} +1 -1
  160. package/dist/assets/personality-page-DncIme1O.js +1 -0
  161. package/dist/assets/platform-detection-BTuzpl34.js +1 -0
  162. package/dist/assets/platform-loopback-page-LBbH5z8z.js +1 -0
  163. package/dist/assets/{plugin-detail-page-Byuqbr1N.js → plugin-detail-page-CiUmOJx4.js} +1 -1
  164. package/dist/assets/plugins-page-DGpvzJ6A.js +1 -0
  165. package/dist/assets/plugins-surface-B2vYGNIS.js +1 -0
  166. package/dist/assets/plus-D54jrPDF.js +1 -0
  167. package/dist/assets/popover-rW459udD.js +1 -0
  168. package/dist/assets/prechat-route-Blw5oByr.js +1 -0
  169. package/dist/assets/prefs-BhGkdtWC.js +1 -0
  170. package/dist/assets/privacy-page-DtJ7Ta9Q.js +1 -0
  171. package/dist/assets/privacy-screen-DCmdN-F6.js +1 -0
  172. package/dist/assets/{usage-window-C6gWu5Qu.js → profile-metadata-CbcuGTHP.js} +1 -1
  173. package/dist/assets/progress-bar-Wa6qo8OT.js +1 -0
  174. package/dist/assets/provider-callback-page-DqiHRsf7.js +1 -0
  175. package/dist/assets/{provider-key-3AHnKoz9.js → provider-key-BIMvWJCe.js} +1 -1
  176. package/dist/assets/provider-signup-page-D5rIiZ2o.js +1 -0
  177. package/dist/assets/puzzle-0_oQwgsv.js +1 -0
  178. package/dist/assets/{quick-input-page-Cv_CzapK.js → quick-input-page-BEwEfXyk.js} +1 -1
  179. package/dist/assets/react-query.gen-DjmYXavs.js +1 -0
  180. package/dist/assets/react-query.gen-JxTd3SS8.js +1 -0
  181. package/dist/assets/{refresh-cw-DevIHL7J.js → refresh-cw-BkscUrbN.js} +1 -1
  182. package/dist/assets/{remote-gateway-session-CbBWrPZH.js → remote-gateway-session-CBKZhJak.js} +1 -1
  183. package/dist/assets/{repeat-C8Im6j--.js → repeat-BRYsTqh_.js} +1 -1
  184. package/dist/assets/research-mock-page-VikWGUam.js +1 -0
  185. package/dist/assets/research-onboarding-route-BiLio9x3.js +42 -0
  186. package/dist/assets/{resize-errors-DqIkO0UI.js → resize-errors-yH10K9Qq.js} +1 -1
  187. package/dist/assets/{resolved-assistants-store-BSZbT8Ju.js → resolved-assistants-store-DAzPZ1eV.js} +1 -1
  188. package/dist/assets/{return-to-BwxkOGDI.js → return-to-ugSGJ0dm.js} +1 -1
  189. package/dist/assets/review-terms-screen-DybxZzqn.js +1 -0
  190. package/dist/assets/risk-b98f7VDW.js +3 -0
  191. package/dist/assets/routes-Bzvx8bnp.js +1 -0
  192. package/dist/assets/schedules-oC-weaYP.js +1 -0
  193. package/dist/assets/{sdk.gen-BwnFjFcp.js → sdk.gen-CFgJ4K6f.js} +1 -1
  194. package/dist/assets/sdk.gen-Z7XkRg5O.js +1 -0
  195. package/dist/assets/security-redirect-page-GKy7eRUs.js +1 -0
  196. package/dist/assets/{select-assistant-screen-Br-PNDO1.js → select-assistant-screen-BFDxdgLn.js} +1 -1
  197. package/dist/assets/{setting-row-CUka7_L9.js → setting-row-f2idXB8B.js} +1 -1
  198. package/dist/assets/settings-divider-BPEDTMBU.js +1 -0
  199. package/dist/assets/settings-layout-BlQX4ZgU.js +1 -0
  200. package/dist/assets/share-feedback-modal-CsAJJ_oZ.js +1 -0
  201. package/dist/assets/shield-check-kgUZeU9b.js +1 -0
  202. package/dist/assets/{sidebar-tree-C1_LiBB9.js → sidebar-tree-Osepkg7m.js} +1 -1
  203. package/dist/assets/signup-page-CL3T-Z4a.js +1 -0
  204. package/dist/assets/{signup-shell-DufHA5do.js → signup-shell-C2c8tEWo.js} +1 -1
  205. package/dist/assets/site-favicon-Bf4BKQG1.js +1 -0
  206. package/dist/assets/skill-detail-page-B1AuSkFK.js +1 -0
  207. package/dist/assets/{skill-detail-panel-BGoRUWNU.js → skill-detail-panel-CeOWb3Bf.js} +1 -1
  208. package/dist/assets/{skills-AtSQBwXr.js → skills-ByKs3Zjf.js} +1 -1
  209. package/dist/assets/skills-page-HoaDTYTI.js +1 -0
  210. package/dist/assets/{sound-manager-6UbdgQrj.js → sound-manager-DUFvLLrG.js} +1 -1
  211. package/dist/assets/sounds-redirect-page-BE1uLXxt.js +1 -0
  212. package/dist/assets/{sparkles-PGiR5v1g.js → sparkles-BK3KXCjl.js} +1 -1
  213. package/dist/assets/{src-zsLiFPw3.js → src-A8hMQd90.js} +39 -39
  214. package/dist/assets/{subagent-detail-panel-BGuVa8-m.js → subagent-detail-panel-DQJPOafB.js} +2 -2
  215. package/dist/assets/{subagent-store-Bz4irJre.js → subagent-store-UK3sycHi.js} +1 -1
  216. package/dist/assets/system-events-page-f63DiHJ0.js +1 -0
  217. package/dist/assets/system-events-redirect-page-BxksRhif.js +1 -0
  218. package/dist/assets/tag-D0AE0-aA.js +1 -0
  219. package/dist/assets/theme-preferences-DW9WTu2f.js +1 -0
  220. package/dist/assets/theme-stage-page-Bo5V4ZDW.js +1 -0
  221. package/dist/assets/{tiptap-document-editor-C-eOEBR_.js → tiptap-document-editor-ChljO0fw.js} +2 -2
  222. package/dist/assets/toast-B5Hr1kIL.js +1 -0
  223. package/dist/assets/toggle-CWrJ2t4S.js +1 -0
  224. package/dist/assets/{tool-detail-panel-wAuQ7gi8.js → tool-detail-panel-_oXYE81O.js} +2 -2
  225. package/dist/assets/{triangle-alert-Z0Gq0IuB.js → triangle-alert-CnjNKhNx.js} +1 -1
  226. package/dist/assets/typography-Cqi8q9o7.js +1 -0
  227. package/dist/assets/{upgrade-cancel-page-BGgPmDmT.js → upgrade-cancel-page-C4sJ4IHi.js} +1 -1
  228. package/dist/assets/{upgrade-success-page-TJBopZ0Z.js → upgrade-success-page-v7UtvYeb.js} +1 -1
  229. package/dist/assets/usage-redirect-page-DlxixrFd.js +1 -0
  230. package/dist/assets/{use-active-assistant-id-BWXi63qg.js → use-active-assistant-id-KipCgPNT.js} +1 -1
  231. package/dist/assets/use-assistant-identity-details-BpbmaZva.js +1 -0
  232. package/dist/assets/{use-edge-swipe-back-B4XlZ1Iu.js → use-edge-swipe-back-DTpbr5KC.js} +1 -1
  233. package/dist/assets/use-invite-link-dialog-2FBB54DX.js +1 -0
  234. package/dist/assets/use-is-org-ready-MUDnKy3r.js +1 -0
  235. package/dist/assets/use-onboarding-login-_LAXettN.js +1 -0
  236. package/dist/assets/{use-reduced-motion-Cj0Z8KSf.js → use-reduced-motion-BPBlq9_a.js} +1 -1
  237. package/dist/assets/use-skill-actions-CrU5Sgk_.js +1 -0
  238. package/dist/assets/use-skill-categories-BhT4D6gt.js +1 -0
  239. package/dist/assets/{use-skill-detail-files-Dpp521cY.js → use-skill-detail-files-DNY3WFns.js} +1 -1
  240. package/dist/assets/{user-plus-DMh4_UTz.js → user-plus-KuzSTM_D.js} +1 -1
  241. package/dist/assets/{utils-xg2dl_KJ.js → utils-CNB1P-cO.js} +1 -1
  242. package/dist/assets/{viewer-store-B8-Qnbx9.js → viewer-store-CFywMdJp.js} +1 -1
  243. package/dist/assets/voice-page-otevqz9B.js +1 -0
  244. package/dist/assets/{weather-forecast-display-Bix8rpji.js → weather-forecast-display-CcKGlN7f.js} +1 -1
  245. package/dist/assets/{web-RhBklijR.js → web-BPvLuAGE.js} +1 -1
  246. package/dist/assets/{web-D8PpvYf_.js → web-BUVD1SEs.js} +1 -1
  247. package/dist/assets/{web-C1L-cpPj.js → web-Bf269a_Y.js} +1 -1
  248. package/dist/assets/{web-CJiP8Lg6.js → web-CELqsarU.js} +1 -1
  249. package/dist/assets/{web-O1LOb-o9.js → web-CFPJ_DoC.js} +1 -1
  250. package/dist/assets/{web-BD2N6zhd.js → web-DFW5YV0h.js} +1 -1
  251. package/dist/assets/{web-BaubW4Pp.js → web-DyY0a6OS.js} +1 -1
  252. package/dist/assets/{web-Duw5A2aP.js → web-KeVAvkzP.js} +1 -1
  253. package/dist/assets/{welcome-screen-CVI4Hjnt.js → welcome-screen-C8axlf6E.js} +1 -1
  254. package/dist/assets/workflow-detail-panel-DkqCKrOL.js +1 -0
  255. package/dist/assets/{workflow-store-B7ofewCi.js → workflow-store-k8Si-dKc.js} +1 -1
  256. package/dist/assets/workspace-page-CS0P8RFO.js +1 -0
  257. package/dist/assets/x-BYcSiJRX.js +1 -0
  258. package/dist/index.html +146 -142
  259. package/dist/skills/chat-complex-documents/assets/icon.svg +26 -0
  260. package/package.json +1 -1
  261. package/dist/assets/account-page-Dno1SeJN.js +0 -1
  262. package/dist/assets/activity-steps-panel-BGyfMCXK.js +0 -1
  263. package/dist/assets/advanced-page-vCbMVJsK.js +0 -1
  264. package/dist/assets/ai-page-BIYybKux.js +0 -1
  265. package/dist/assets/animated-avatar-Cqpzb8O4.js +0 -1
  266. package/dist/assets/archive-0aqysuyd.js +0 -1
  267. package/dist/assets/archive-page-RZ2VP63A.js +0 -1
  268. package/dist/assets/arrow-left-DI9551VI.js +0 -1
  269. package/dist/assets/assistant-identity-store-CX03CK8q.js +0 -1
  270. package/dist/assets/assistant-status-panel-BC0RTDls.js +0 -1
  271. package/dist/assets/auth-store-C09YAZEu.js +0 -2
  272. package/dist/assets/background-task-detail-panel-BfnsD-3B.js +0 -1
  273. package/dist/assets/ban-CVKGuUAQ.js +0 -1
  274. package/dist/assets/billing-page-1z_L2m6q.js +0 -3
  275. package/dist/assets/browser-C6a_nhhZ.js +0 -2
  276. package/dist/assets/button-amTXFI-2.js +0 -1
  277. package/dist/assets/card-Bv5O5juh.js +0 -1
  278. package/dist/assets/channels-page-route-WjNmd0sS.js +0 -9
  279. package/dist/assets/chat-B8mgARYR.js +0 -1
  280. package/dist/assets/chat-markdown-message-BnX6bhgs.js +0 -2
  281. package/dist/assets/check-DFNrQERi.js +0 -1
  282. package/dist/assets/checkbox-EdyezNqo.js +0 -1
  283. package/dist/assets/chevron-left-BMF1xNfR.js +0 -1
  284. package/dist/assets/chevron-right-DqqmezXC.js +0 -1
  285. package/dist/assets/circle-check-VSiny8yl.js +0 -1
  286. package/dist/assets/cn-C36Yvcac.js +0 -1
  287. package/dist/assets/code-Czx7d7SK.js +0 -1
  288. package/dist/assets/contacts-page-route-P0neH-PV.js +0 -1
  289. package/dist/assets/copy-Cn1FKrEp.js +0 -1
  290. package/dist/assets/credentials-page-MkKE_19-.js +0 -1
  291. package/dist/assets/danger-zone-redirect-page-BWg7rn8D.js +0 -1
  292. package/dist/assets/debug-page-B88f4aDU.js +0 -4
  293. package/dist/assets/detail-card-xKZlkbz5.js +0 -1
  294. package/dist/assets/developer-page-BFMS6pwU.js +0 -1
  295. package/dist/assets/devices-page-B3D5iLhD.js +0 -1
  296. package/dist/assets/dist-BItmZQO6.js +0 -1
  297. package/dist/assets/document-viewer-page-B631L6-3.js +0 -1
  298. package/dist/assets/dropdown-ByHOpeOU.js +0 -1
  299. package/dist/assets/earn-credits-modal-CFla-iKl.js +0 -1
  300. package/dist/assets/edge-swipe-arbiter-store-BeOhrE7M.js +0 -1
  301. package/dist/assets/effective-timezone-C4nukIC4.js +0 -1
  302. package/dist/assets/esm-B54gzHCZ.js +0 -1
  303. package/dist/assets/esm-Bzs_witt.js +0 -2
  304. package/dist/assets/esm-C5J59K0j.js +0 -2
  305. package/dist/assets/esm-DEu9JbAE.js +0 -2
  306. package/dist/assets/esm-DZkj1VLJ.js +0 -2
  307. package/dist/assets/esm-DtJz1M8R.js +0 -2
  308. package/dist/assets/feature-flag-catalog-GgSNKkqP.js +0 -1
  309. package/dist/assets/file-editor-sT7eHxsw.js +0 -1
  310. package/dist/assets/file-markdown-Bq97tNxs.js +0 -2
  311. package/dist/assets/general-page-D-Gr2lkW.js +0 -1
  312. package/dist/assets/haptics-lMERs7us.js +0 -2
  313. package/dist/assets/hatching-screen-BlwicgIz.js +0 -1
  314. package/dist/assets/home-page-route-D24x4A0S.js +0 -1
  315. package/dist/assets/identity-page-route-BwOJeenx.js +0 -1
  316. package/dist/assets/index-C9GrLGul.css +0 -2
  317. package/dist/assets/index-yu6nDHvG.js +0 -113
  318. package/dist/assets/input-CoUmPnRU.js +0 -1
  319. package/dist/assets/inspect-page-1RejwSP_.js +0 -9
  320. package/dist/assets/integrations-page-BV5BiHPD.js +0 -1
  321. package/dist/assets/intelligence-layout-iQFO8in_.js +0 -1
  322. package/dist/assets/keyboard-shortcuts-page-jt13JtxS.js +0 -1
  323. package/dist/assets/library-detail-page-BAGWt1Lw.js +0 -1
  324. package/dist/assets/library-page-CqeoBhDY.js +0 -1
  325. package/dist/assets/list-row-D5MFdbkH.js +0 -1
  326. package/dist/assets/llm-dimension-DyYwG3mU.js +0 -1
  327. package/dist/assets/loader-circle-Cz7opInR.js +0 -1
  328. package/dist/assets/login-page-BQVTWuQc.js +0 -1
  329. package/dist/assets/logs-layout-DO3yfZqD.js +0 -1
  330. package/dist/assets/menu-Dy5QbnTj.js +0 -1
  331. package/dist/assets/mobile-sidebar-drawer-Epbt6p-k.js +0 -1
  332. package/dist/assets/modal-D5nLWNN9.js +0 -1
  333. package/dist/assets/mutation-error-DYv0eJ_i.js +0 -1
  334. package/dist/assets/native-biometric-Czaf9IqI.js +0 -6
  335. package/dist/assets/notice-DkcNAP8O.js +0 -1
  336. package/dist/assets/notifications-page-CXaZpD3s.js +0 -1
  337. package/dist/assets/page-shell-BUGBKCmv.js +0 -1
  338. package/dist/assets/panel-item-CouW2A55.js +0 -1
  339. package/dist/assets/password-reset-page-BCk9Si73.js +0 -1
  340. package/dist/assets/platform-detection-BrxvFUiR.js +0 -1
  341. package/dist/assets/platform-loopback-page-MZdCPXRI.js +0 -1
  342. package/dist/assets/plugins-page-Ci0CoSAN.js +0 -1
  343. package/dist/assets/plugins-surface-z3RTZS4H.js +0 -1
  344. package/dist/assets/plus-DItfr5ux.js +0 -1
  345. package/dist/assets/popover-CFL4WZTr.js +0 -1
  346. package/dist/assets/prechat-route-9JFn-w_1.js +0 -1
  347. package/dist/assets/prefs-B1Y3q3c8.js +0 -1
  348. package/dist/assets/privacy-page-BTpvj9ZP.js +0 -1
  349. package/dist/assets/privacy-screen-CUbVcDf_.js +0 -1
  350. package/dist/assets/progress-bar-Ca8gmE3B.js +0 -1
  351. package/dist/assets/provider-callback-page-fB2tIyqL.js +0 -1
  352. package/dist/assets/provider-signup-page-C4Dn-wtJ.js +0 -1
  353. package/dist/assets/react-query.gen-C6wVk6Rw.js +0 -1
  354. package/dist/assets/react-query.gen-DPzPS206.js +0 -1
  355. package/dist/assets/research-mock-page-1T92rXz3.js +0 -1
  356. package/dist/assets/research-onboarding-route-CmWgwOFk.js +0 -63
  357. package/dist/assets/review-terms-screen-DrD4vywk.js +0 -1
  358. package/dist/assets/risk-Dopd25rc.js +0 -3
  359. package/dist/assets/routes-BbeIx_F9.js +0 -1
  360. package/dist/assets/save-aD5JFIZf.js +0 -1
  361. package/dist/assets/schedules-BfKi12EZ.js +0 -1
  362. package/dist/assets/sdk.gen-CmKfVpgB.js +0 -1
  363. package/dist/assets/security-page-BYI7twYM.js +0 -1
  364. package/dist/assets/settings-layout-lddMUg7A.js +0 -1
  365. package/dist/assets/share-feedback-modal-DSwfhMsV.js +0 -1
  366. package/dist/assets/shortcut-keys-B2EE-634.js +0 -1
  367. package/dist/assets/signup-page-D6hAK-Us.js +0 -1
  368. package/dist/assets/site-favicon-fQHLTT6F.js +0 -1
  369. package/dist/assets/skill-detail-page-BlfgTyFC.js +0 -1
  370. package/dist/assets/skill-icon-cNkD2w1X.js +0 -1
  371. package/dist/assets/skills-page-DeIiyhVc.js +0 -1
  372. package/dist/assets/sounds-page-BgLLJ-o9.js +0 -1
  373. package/dist/assets/stat-square-CTHnQ1jc.js +0 -1
  374. package/dist/assets/system-events-page-C1hXOYmg.js +0 -1
  375. package/dist/assets/system-events-redirect-page-DbaFKRXH.js +0 -1
  376. package/dist/assets/tag-CV4v7fRF.js +0 -1
  377. package/dist/assets/toast-xTp-xwYL.js +0 -1
  378. package/dist/assets/toggle-CDfguvUz.js +0 -1
  379. package/dist/assets/typography-D5f7kt80.js +0 -1
  380. package/dist/assets/usage-page-DLWFk2P0.js +0 -1
  381. package/dist/assets/use-bus-subscription-C3H3CmM_.js +0 -1
  382. package/dist/assets/use-invite-link-dialog-BdnW1BHj.js +0 -1
  383. package/dist/assets/use-is-org-ready-jhEM-4rY.js +0 -1
  384. package/dist/assets/use-onboarding-login-B-1jrjFL.js +0 -1
  385. package/dist/assets/use-skill-actions-BpVxiQZY.js +0 -1
  386. package/dist/assets/use-skill-categories-CCxtjMC_.js +0 -1
  387. package/dist/assets/voice-page-BoCTB8Jx.js +0 -1
  388. package/dist/assets/workflow-detail-panel-CwZH3tDl.js +0 -1
  389. package/dist/assets/workspace-page-CwIsXk1j.js +0 -1
  390. package/dist/assets/x-CkSVp1Ok.js +0 -1
  391. /package/dist/assets/{app-info-Clwt3pCt.js → app-info-AJ6nA0RS.js} +0 -0
  392. /package/dist/assets/{avatar-bundled-components--1Wyhs4r.js → avatar-bundled-components-DgzHRe6Z.js} +0 -0
  393. /package/dist/assets/{avatar-svg-compositor-CnDf9Ibf.js → avatar-svg-compositor-C_lXkZLZ.js} +0 -0
  394. /package/dist/assets/{browser-timezone-2SnmKDjM.js → browser-timezone-DjbAts-Z.js} +0 -0
  395. /package/dist/assets/{build.umd-CxdKgGWo.js → build.umd-CVjrbvyL.js} +0 -0
  396. /package/dist/assets/{bundle-mjs-BZt35okJ.js → bundle-mjs-CK9sN9wG.js} +0 -0
  397. /package/dist/assets/{by-tool-use-id-index-BokzI3ZP.js → by-tool-use-id-index-CBaMK-eh.js} +0 -0
  398. /package/dist/assets/{composer-focus-BZr63Cvs.js → composer-focus-CpeV_gfi.js} +0 -0
  399. /package/dist/assets/{conversation-selection-BBHkzcfy.js → conversation-selection-DYJPsAjJ.js} +0 -0
  400. /package/dist/assets/{conversation-store-BljZWolF.js → conversation-store-CnRrUeSu.js} +0 -0
  401. /package/dist/assets/{createLucideIcon-IRfcSUxS.js → createLucideIcon-Bjb-Kuq7.js} +0 -0
  402. /package/dist/assets/{definitions-CaYcW4Yq.js → definitions-BaillmRO.js} +0 -0
  403. /package/dist/assets/{definitions-DScTW2c-.js → definitions-Ce8XXjMI.js} +0 -0
  404. /package/dist/assets/{dist-DS5iJwBJ2.js → dist-DyRKd0bN2.js} +0 -0
  405. /package/dist/assets/{domains-D3QF404Q.js → domains-CIIVdIa8.js} +0 -0
  406. /package/dist/assets/{emoji-catalog-data-D8lRMt3A.js → emoji-catalog-data-BNtUmdK0.js} +0 -0
  407. /package/dist/assets/{environment-store-C0f32873.js → environment-store-R_3zZFKL.js} +0 -0
  408. /package/dist/assets/{format-date-CghpPTDc.js → format-date-Cda44k2J.js} +0 -0
  409. /package/dist/assets/{format-file-size-DzVEncaw.js → format-file-size-BSrdQr7P.js} +0 -0
  410. /package/dist/assets/{native-deep-link-CJGNy9bj.js → native-deep-link-CbHUZ2h_.js} +0 -0
  411. /package/dist/assets/{onboarding-step-layout-2XcmxqFN.js → onboarding-step-layout-BfSOxqy3.js} +0 -0
  412. /package/dist/assets/{optimistic-lifecycle-BvfDBY8o.js → optimistic-lifecycle-CR11Vyrt.js} +0 -0
  413. /package/dist/assets/{pdf-C3Qukw-J.js → pdf-BjgNZTii.js} +0 -0
  414. /package/dist/assets/{pointer-Cdz7NGHe.js → pointer-CzC_8USk.js} +0 -0
  415. /package/dist/assets/{prechat-P1y7ZM6C.js → prechat-Ddpjms85.js} +0 -0
  416. /package/dist/assets/{prechat-names-clVy5Mee.js → prechat-names-DEWE0LUf.js} +0 -0
  417. /package/dist/assets/{proxy-o6cPThl2.js → proxy-Cadlowdl.js} +0 -0
  418. /package/dist/assets/{public-asset-GKv5zCfZ.js → public-asset-Budc22a_.js} +0 -0
  419. /package/dist/assets/{research-onboarding-persistence-DnuHyFyB.js → research-onboarding-persistence-BmACYjeE.js} +0 -0
  420. /package/dist/assets/{sdk.gen-BhtkuoSl.js → sdk.gen-C9oZyNeN.js} +0 -0
  421. /package/dist/assets/{status-badge-pill-0N6rTEBg.js → status-badge-pill-DQHLgr0r.js} +0 -0
  422. /package/dist/assets/{step-indicator-dots-D03TmFKG.js → step-indicator-dots-iS_Q2OX6.js} +0 -0
  423. /package/dist/assets/{three-dot-indicator-DNuHHwtA.js → three-dot-indicator-ByrGmGYU.js} +0 -0
  424. /package/dist/assets/{typed-storage-5IU6qVWg.js → typed-storage-BRvgA7pX.js} +0 -0
  425. /package/dist/assets/{use-copy-to-clipboard-BCTXSMa-.js → use-copy-to-clipboard-CtO2o7KE.js} +0 -0
  426. /package/dist/assets/{workflow-status-ZrbiLW5D.js → workflow-status-4RYJ-tdh.js} +0 -0
  427. /package/dist/assets/{xterm-CBmd_y-b.js → xterm-ChjrCiYv.js} +0 -0
  428. /package/dist/assets/{xterm-addon-fit-THPW0uy0.js → xterm-addon-fit-D_4nBxep.js} +0 -0
@@ -1,63 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-Dhiismgm.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-amTXFI-2.js";import{d as i,h as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as o}from"./QueryClientProvider-DKhXIxGb.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./cn-C36Yvcac.js";import{t as l}from"./arrow-left-DI9551VI.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import{t as d}from"./chevron-right-DqqmezXC.js";import{n as f,r as p,t as m}from"./animated-avatar-Cqpzb8O4.js";import{t as h}from"./loader-circle-Cz7opInR.js";import{t as g}from"./pencil-CUIr0IFo.js";import{t as _}from"./plus-DItfr5ux.js";import{t as v}from"./x-CkSVp1Ok.js";import{t as y}from"./tag-CV4v7fRF.js";import{t as b}from"./input-CoUmPnRU.js";import{i as x,r as S,t as C}from"./dist-CxHeCOEv.js";import{n as w,t as T}from"./create-selectors-8NePGNlX.js";import{b as E,ct as D,o as ee,p as te}from"./local-mode-grqHUoNh.js";import{Bn as O,V as k,et as A,gn as j,hn as ne,zn as re}from"./sdk.gen-BwnFjFcp.js";import{r as ie}from"./api-errors-CrWDzVca.js";import{A as ae,B as oe,L as M,R as se,n as ce,z as le}from"./auth-store-C09YAZEu.js";import{a as ue,o as de,r as fe}from"./api-_7pKLlYA.js";import{c as pe}from"./routes-BbeIx_F9.js";import{n as me}from"./platform-detection-BrxvFUiR.js";import{c as he,l as ge}from"./prechat-P1y7ZM6C.js";import{t as N}from"./browser-timezone-2SnmKDjM.js";import{c as _e}from"./conversation-list-fetchers-DS9vmqfD.js";import{i as ve,n as ye,r as be,t as xe}from"./research-onboarding-persistence-DnuHyFyB.js";import{A as P,B as Se,C as Ce,D as we,E as Te,F as Ee,I as F,L as De,M as Oe,N as ke,O as Ae,P as I,R as je,S as L,T as R,V as z,_ as Me,a as Ne,b as Pe,d as B,f as Fe,g as Ie,i as Le,j as Re,k as ze,m as Be,o as Ve,p as He,r as Ue,s as We,t as V,v as Ge,w as Ke,x as qe,y as Je}from"./proxy-o6cPThl2.js";import{t as Ye}from"./AnimatePresence-s1Z1HHWx.js";import{t as H}from"./use-reduced-motion-Cj0Z8KSf.js";import{Aa as U,Ai as Xe,_n as Ze,ar as Qe,gt as $e,in as et,mt as tt,nt as W,on as nt,qt as rt,rn as it,sn as at,tt as ot}from"./index-yu6nDHvG.js";import{n as st,t as ct}from"./onboarding-step-layout-2XcmxqFN.js";import{t as lt}from"./prechat-names-clVy5Mee.js";var ut=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function dt(e,t){return Oe(e)?e[ut(0,e.length,t)]:e}var ft=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 pt(this.animations,`duration`)}get iterationDuration(){return pt(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 pt(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 mt=class extends ft{then(e,t){return this.finished.finally(e).then(()=>{})}};function ht(...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=Te(i,a,o);return t?s(r):s}function gt(e,t){return e in t}var _t=class extends We{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(gt(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 Fe()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},G=e(n(),1);function vt(e){let t=z(()=>L(e)),{isStatic:n}=(0,G.useContext)(Ue);if(n){let[,n]=(0,G.useState)(e);(0,G.useEffect)(()=>t.on(`change`,n),[])}return t}function yt(e,t){let n=vt(t()),r=()=>n.set(t());return r(),Se(()=>{let t=()=>Re.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),P(r)}}),n}function bt(e){qe.current=[],e();let t=yt(qe.current,e);return qe.current=void 0,t}function xt(e,t,n,r){if(typeof e==`function`)return bt(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Ct(e,t,n,r);let i=typeof t==`function`?t:ht(t,n,r),a=Array.isArray(e)?St(e,i):St([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 St(e,t){let n=z(()=>[]);return yt(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Ct(e,t,n,r){let i=z(()=>Object.keys(n)),a=z(()=>({}));for(let o of i)a[o]=xt(e,t,n[o],r);return a}function wt(e){e.values.forEach(e=>e.stop())}function Tt(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Pe(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Tt(e,t)})})}function Et(e,t){if(Array.isArray(t))return Tt(e,t);if(typeof t==`string`)return Tt(e,[t]);Pe(e,t)}function Dt(){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(Me(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=>{Et(e,n)})},stop(){t.forEach(e=>{wt(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function Ot(e){return typeof e==`object`&&!Array.isArray(e)}function kt(e,t,n,r){return e==null?[]:typeof e==`string`&&Ot(t)?Ie(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function At(e,t,n){return e*(t+1)+n*t}function jt(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 Mt(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(je(e,i),r--)}}function Nt(e,t,n,r,i,a){Mt(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ze(i,a,r[o]),easing:dt(n,o)})}function Pt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Ft(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var It=`easeInOut`,Lt=20;function Rt(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,jt(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=jt(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Vt(e),{delay:l=0,times:u=Ke(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=Ce(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Wt(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=I(b));let r=Ae(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&&R(u,T),c.length===1&&c.unshift(null),m&&De(m<Lt,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Lt} or apply repeat at the sequence level instead.`),m&&m<Lt){let e=b>0?_/b:0;b=At(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`?ke(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`:dt(f,e-1))}Pt(u,m,e)}let E=w+b;Nt(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Je(p)){let e=zt(p,s);_(m,h,Bt(`default`,e))}else{let e=kt(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=zt(r,s);for(let e in m)_(m[e],Ht(h,e),Bt(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Ft);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(Ee(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(It)),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 zt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Bt(e,t){return t[e]||(t[e]=[]),t[e]}function Vt(e){return Array.isArray(e)?e:[e]}function Ht(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Ut=e=>typeof e==`number`,Wt=e=>e.every(Ut);function Gt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Be(e)&&!He(e)?new Ne(t):new Ve(t);n.mount(e),B.set(e,n)}function Kt(e){let t=new _t({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),B.set(e,t)}function qt(e,t){return Je(e)||typeof e==`number`||typeof e==`string`&&!Ot(t)}function Jt(e,t,n,r){let i=[];if(qt(e,t))i.push(Le(e,Ot(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=kt(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?Gt:Kt;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(...Ge(c,{...t,transition:l},{}))}}return i}function Yt(e,t,n){let r=[];return Rt(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=L(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:we}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Jt(n,e,t))}),r}function Xt(e){return Array.isArray(e)&&e.some(Array.isArray)}function Zt(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),Xt(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Yt(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Jt(e,i,{...c,...r},t)}let l=new mt(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{je(t.animations,l)})),l}return i}var Qt=Zt();function $t(){let e=z(Dt);return Se(e.mount,[]),e}var en=12;function tn(e,t){let n=e.slice(0,en).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 nn({firstName:e,lastName:t,occupation:n,hobby:r,timezone:i},a=[],{includeSuggestions:o=!0}={}){let s=[e.trim(),t.trim()].filter(Boolean).join(` `),c=n.trim(),l=r?.trim()??``,u=i?.trim()??``,d=tn(a,o),f=d?`"plugins": ["<exact name from the list above>"], `:``,p=[s?`My name is ${s}.`:``,c?`I work as ${c}.`:``,l?`My hobby is ${l}.`:``].filter(Boolean).join(` `),m=p?[p,u?`My timezone is ${u}.`:``].filter(Boolean).join(` `):`I'd like you to get to know me before we start working together.`,h=o?` "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." } ]`:``,g=`{ ${f}"claims": [ { "claim": "Senior engineer at an AI infra startup", "confidence": "confident", "sources": ["https://linkedin.com/in/example-user", "https://example-infra.com/about"] }, { "claim": "Based in Boulder, CO", "confidence": "maybe", "sources": ["https://linkedin.com/in/example-user"] }, { "claim": "Into climbing and the outdoors", "confidence": "guessing", "sources": [] } ]${h?`,${h}`:``} }`;return`${m}
8
-
9
- Get to know me. Search the web for what's publicly known about me, 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. Prefer sources people author about themselves — LinkedIn, a personal site, GitHub, an employer's team page, published work, public social profiles. Never fetch or cite people-search or background-check aggregators (Instant Checkmate, Spokeo, BeenVerified, TruePeopleSearch, Whitepages, and similar); data-broker directories (ZoomInfo, RocketReach, Apollo) may corroborate another source but must never be a claim's only basis.
10
-
11
- IDENTITY GATE — decide who a page is about before you use it: a name match alone is NEVER enough to attribute a page to me. Attribute it to me only when it also corroborates something I stated — my role, my hobby, or a location consistent with my timezone if I gave one. If several people share my name and none clears that bar, or you find no verifiable match at all, then I have no public profile you can use: return ONLY inferences from what I stated above, each labeled "guessing" with "sources": []. An honest near-empty card beats a stranger's biography. If my details above read as placeholder or joke input rather than a real identity, skip the web search and return an empty claims array.
12
-
13
- 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 ${o?`claims and suggestions`:`claims`} aligned with my stated role.
14
-
15
- 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:
16
-
17
- ${g}
18
-
19
- Rules for "claims":
20
-
21
- AT MOST 5 claims, typically 3 to 4. Never pad the list or inflate a confidence tier to seem thorough.
22
- 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".
23
- Each claim must be independently true-or-false so I can remove the ones that are wrong.
24
- Every specific in a claim (employer, title, publication, city) must appear in a source you actually fetched this turn — never synthesize or embellish specifics a source doesn't state.
25
- "confidence" is earned per the identity gate: "confident" needs 2+ independent gate-passing sources, "maybe" needs exactly one, and a claim with no sources is an inference from my stated details and must be "guessing".
26
- "sources": 0 to 3 URLs you actually used as evidence for that specific claim. Use [] for pure inferences.
27
- ${o?`Rules for "suggestions":
28
-
29
- Each suggestion is an object with two fields:
30
- "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.
31
- "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.
32
-
33
- 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.
34
- 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."
35
- 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.
36
- 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.
37
- `:``}${d}
38
- ${o?`Don't include anything sensitive or private. If the identity gate leaves you with very little, return only the honest "guessing" claims my stated details support, and lean on broadly useful suggestions for my role.`:`Don't include anything sensitive or private. If the identity gate leaves you with very little, return only the honest "guessing" claims my stated details support.`}
39
- 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.`}function rn({hostingParam:e,localMode:t,gatewayAuthSession:n}){return t?e===null?n:e!==`vellum-cloud`:!1}var an=3e3,on=3e5,sn=`Failed to start your assistant. Please try again.`,cn=`Your assistant is taking longer than expected. Please try again.`,ln=e=>new Promise(t=>setTimeout(t,e));function un({adoptExisting:e=!1,adoptAssistantId:n}={}){let[r,i]=(0,G.useState)(!1),[a,o]=(0,G.useState)(null),[s,c]=(0,G.useState)(null),l=(0,G.useRef)(!1),u=(0,G.useRef)([]),d=(0,G.useRef)(null),f=(0,G.useCallback)(e=>{if(!d.current){d.current={kind:`ready`,id:e},i(!0);for(let t of u.current)t.resolve(e);u.current=[]}},[]),p=(0,G.useCallback)(e=>{if(d.current)return;d.current={kind:`error`,message:e},c(e);let t=Error(e);for(let e of u.current)e.reject(t);u.current=[]},[]);return{start:(0,G.useCallback)(()=>{if(l.current)return;l.current=!0;let r=Date.now(),i=()=>Date.now()-r>=on;(async()=>{if(e&&n){let e=ee(n);if(e){o(e.assistantId),f(e.assistantId);return}}let r=e?n:void 0;if(!e)try{let e=await de();if(e.ok)r=e.data.id,o(e.data.id);else{if(se(e.status,e.error)){p(M);return}if(!oe(e.status)){p(ie(e.error,void 0,sn));return}}}catch(e){t(e,{context:`research_background_hatch`})}let a;for(;!a;){if(i()){p(cn);return}try{let e=await fe(r);r&&!e.ok&&e.status===404&&(r=void 0,e=await fe());let t=le(e);if(t.kind===`active`&&e.ok){a=e.data.id,o(a);break}if(t.kind===`error`){p(t.message);return}}catch(e){t(e,{context:`research_background_hatch_poll`})}await ln(an)}if(e)for(;!await E();){if(i()){p(cn);return}await ln(an)}else for(;;){try{if((await ue(a)).ok)break}catch{}if(i()){p(cn);return}await ln(an)}f(a)})()},[p,f,e,n]),ready:r,assistantId:a,error:s,awaitReady:(0,G.useCallback)(()=>{let e=d.current;return e?.kind===`ready`?Promise.resolve(e.id):e?.kind===`error`?Promise.reject(Error(e.message)):new Promise((e,t)=>{u.current.push({resolve:e,reject:t})})},[])}}async function dn(e,n){try{await k({path:{assistant_id:e,id:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_archive`})}}function fn(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(!(!n||n.role!==`assistant`))return(n.contentBlocks??[]).filter(e=>e.type===`text`).map(e=>e.text).join(`
40
- `).trim()}return``}var pn=[`admin-copilot`],mn=[{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 hn(e){return` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `).trim()} `}function gn(e,t){return e.includes(` ${t} `)}function _n(e){let t=hn(e),n=[];for(let{plugin:e,keywords:r}of mn)r.some(e=>gn(t,e))&&n.push(e);return n}function vn(e,t){let n=[...pn,..._n(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 yn=1500,bn=12e4,xn=2;function Sn({complete:e,stableReads:t}){return e&&t>=xn}function Cn({sawCompletePayload:e}){return e?`done`:`error`}function wn({sawCompletePayload:e}){return e}var Tn=`vellum-ai`,En=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 On(e){return e?.split(`/`)[0]?.trim()??``}function kn(e){let t=[],n=new Set;for(let r of e){let e=r.name?.trim(),i=r.description?.trim();!e||!i||On(r.source?.repo)===Tn&&(En.has(e)||(n.add(e),t.push({name:e,description:Dn(i)})))}return{capabilities:t,validNames:n}}async function An(e){try{return kn((await O({path:{assistant_id:e},throwOnError:!1})).data?.matches??[])}catch(e){return t(e,{context:`research_onboarding_catalog`}),{capabilities:[],validNames:new Set}}}async function jn(e,n){try{await re({path:{assistant_id:e},body:{name:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_install`})}}var Mn=e=>new Promise(t=>setTimeout(t,e));function Nn({role:e,validNames:t,modelPlugins:n}){return[...new Set([...vn(e,t),...n.filter(e=>t.has(e))])]}function Pn(){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),s=(0,G.useRef)(Promise.resolve()),c=o(),l=(0,G.useCallback)(({awaitAssistantId:e,subject:o,conversationTitle:l,resumeConversationId:u,onConversationCreated:d,includeSuggestions:f=!0})=>{let p=JSON.stringify(o);if(i.current===p)return;i.current=p;let m=r.current+1;r.current=m;let h=()=>r.current!==m,g=()=>{};s.current=new Promise(e=>{g=e}),a.current.clear(),n({status:`running`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),(async()=>{let r,i,s=!1;try{let t=await e();if(r=t,h())return;let{capabilities:c,validNames:p}=await An(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=vn(o.occupation,p);for(let e of v)_.has(e)||_.set(e,jn(t,e));v.length>0&&n(e=>({...e,installedPlugins:v}));let y=async e=>{let n={conversationId:e,content:nn(o,c,{includeSuggestions:f}),sourceChannel:`vellum`,interface:`web`,clientOs:me(),clientMessageId:crypto.randomUUID()};try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(n.clientTimezone=e)}catch{}return!!(await j({path:{assistant_id:t},body:n,throwOnError:!1})).response?.ok},b=async()=>{let e=await A({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 ne({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 S=Date.now()+bn,C=``,w=0;for(;Date.now()<S;){if(await Mn(yn),h())return;let e=await ne({path:{assistant_id:t},query:{conversationId:x},throwOnError:!1});if(h())return;let r=fn(e.data?.messages??[]);if(r){let{claims:e,suggestions:i,plugins:a,pluginsResolved:c,complete:l}=nt(r),u=a.filter(e=>p.has(e));for(let e of u)_.has(e)||_.set(e,jn(t,e));if(c&&g(),n({status:`running`,claims:e,suggestions:i,installedPlugins:Nn({role:o.occupation,validNames:p,modelPlugins:u}),pluginCatalog:m}),l&&(s=!0),w=r===C?w+1:0,C=r,Sn({complete:l,stableReads:w}))break}}if(h())return;n(e=>({...e,status:Cn({sawCompletePayload:s})}))}catch(e){if(h())return;t(e,{context:`research_onboarding_runner`}),n(e=>({...e,status:`error`}))}finally{g(),wn({sawCompletePayload:s})&&r&&i&&(await dn(r,i),Qe(c,r))}})()},[c]),u=(0,G.useCallback)(async()=>{await s.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 jn(await t(),r)}catch{}})())}},[]);return{...e,start:l,awaitPluginInstalls:u,hydrate:d}}function Fn({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(`
41
- `)}async function In({assistantId:e,conversationId:n,removedClaims:r,rejectedAll:i}){let a=Fn({removedClaims:r,rejectedAll:i});if(a){try{let t={conversationId:n,content:a,sourceChannel:`vellum`,interface:`web`,clientOs:me(),clientMessageId:crypto.randomUUID()};await j({path:{assistant_id:e},body:t,throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_correction`})}await dn(e,n)}}var Ln={companionCoworker:`companion-coworker`,genzBoomer:`genz-boomer`,executeCollaborate:`execute-collaborate`,playfulSerious:`playful-serious`,politeUnfiltered:`polite-unfiltered`},Rn=1500,zn=12e4,Bn=2;function Vn({processing:e,sawProcessing:t,hasReply:n,stableReads:r}){return e===void 0?n&&r>=Bn:!e&&(n||t)}var Hn=e=>new Promise(t=>setTimeout(t,e)),Un=e=>Math.max(0,Math.min(100,Math.round(e)));function Wn(e,t,n){let r=t=>Un(e[t]??50),i=r(Ln.companionCoworker),a=r(Ln.executeCollaborate),o=r(Ln.playfulSerious),s=r(Ln.politeUnfiltered),c=t?.trim()||`The user`,l=n?.trim(),u=l?`Your name is ${l}. Write exactly \`- **Name:** ${l}\` in IDENTITY.md — do not rename yourself or invent a different name, even if the file currently shows a placeholder or a different name. This changes your personality, not who you are.`:"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). Whatever the name ends up being, keep it on IDENTITY.md's `- **Name:** …` line.";return`<system-message>
42
- ${c} wants to customize your personality.
43
- This is what they want you to be:
44
- Companion (0-100): ${100-i}
45
- Coworker (0-100): ${i}
46
- Voice Style (0 = Gen Z, 100 = Boomer): ${r(Ln.genzBoomer)}
47
- Execute Independently (0 - 100): ${100-a}
48
- Collaborative (0 - 100): ${a}
49
- Playfulness (0 - 100): ${100-o}
50
- Seriousness (0 - 100): ${o}
51
- Politeness (0 - 100): ${100-s}
52
- Unfiltered Rawness/Crassness (0 - 100): ${s}
53
-
54
- 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.
55
-
56
- 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).
57
-
58
- ${u}
59
-
60
- 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.
61
- </system-message>`}async function Gn({awaitAssistantId:e,values:n,userName:r,assistantName:i}){let a,o;try{a=await e();let t=await A({path:{assistant_id:a},body:{conversationType:`standard`,title:`Updating personality`},throwOnError:!1});if(o=t.data?.id,!t.response?.ok||!o)return;let s={conversationId:o,content:Wn(n,r,i),sourceChannel:`vellum`,interface:`vellum`,clientMessageId:crypto.randomUUID()};if(!(await j({path:{assistant_id:a},body:s,throwOnError:!1})).response?.ok)return;let c=Date.now()+zn,l=``,u=0,d=!1;for(;Date.now()<c;){await Hn(Rn);let e=await ne({path:{assistant_id:a},query:{conversationId:o},throwOnError:!1}),t=fn(e.data?.messages??[]);if(t&&(u=t===l?u+1:0,l=t),e.data?.processing===!0&&(d=!0),Vn({processing:e.data?.processing,sawProcessing:d,hasReply:t.length>0,stableReads:u}))break}}catch(e){t(e,{context:`research_onboarding_personality`})}finally{if(a&&o)try{await k({path:{assistant_id:a,id:o},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_personality_archive`})}}}function Kn(e){let t=e?.trim();return`You're about to begin your first conversation.${t?`\nYour name is ${t} — introduce yourself as ${t}.`:``}
62
- Respond with a warm and engaging greeting. Be interesting, be real. This is your chance to get to know and impress the user.
63
- 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 qn(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=s(),Jn={w:1280,h:800};function Yn(){return typeof window>`u`?Jn:{w:window.innerWidth,h:window.innerHeight}}function Xn(){let[e,t]=(0,G.useState)(null),[n,r]=(0,G.useState)(()=>Yn());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 Zn=(0,G.createContext)(null);function Qn({size:e,children:t}){return(0,K.jsx)(Zn.Provider,{value:e,children:t})}function $n(){let e=(0,G.useContext)(Zn),[t,n]=(0,G.useState)(()=>Yn());return(0,G.useEffect)(()=>{if(e)return;let t=()=>n(Yn());return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),e??t}var er={x:.5,y:.4},tr=[-8,6,9,0,7,-6,5,0,-7,4,-5,6];function nr(e){return tr[e%tr.length]??0}var rr=[1,0,1,0,1,0,1,0,1,0,0],ir=[.72,1],ar=[.4,1],or=[10,20],sr=50;function cr(e){return ir[rr[e]??1]??1}function lr(e){return ar[rr[e]??1]??1}function ur(e){return or[rr[e]??1]??20}function dr(e,t){return Math.round(Math.max(130,Math.min(Math.min(e,t)*.4,420)))}function fr(e,t){return Math.round(Math.max(110,Math.min(Math.min(e,t)*.21,205)))}function pr(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 mr(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 hr({components:e,characters:t,centerChar:n,edgeOrder:r,entering:i,exiting:a,onEnterComplete:o,onSelectChar:s}){let{w:c,h:l}=$n(),u=H(),d=c<640,f=new Set([4,7,8,9,10]),p=e=>d&&f.has(e),h=dr(c,l),g=h/2,_=h/2,v=fr(c,l)/h,y=fr(c,l),b=(0,G.useMemo)(()=>{let e=new Map;return r.forEach((t,n)=>e.set(t,n)),e},[r]),x=er.x*c,S=er.y*l,C=x-g,w=S-g,T=(0,G.useMemo)(()=>pr(c,l,_),[c,l,_]);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,_=!u&&a?.char===r;if(f){let n=T[i.fromSlot],a=mr(n,x,S,c,l),s=cr(i.fromSlot),u=lr(i.fromSlot);return(0,K.jsx)(V.div,{className:`absolute left-0 top-0`,style:{width:h,height:h,zIndex:sr},initial:!1,animate:{x:[n.x-g,a.x-g,a.x-g,C,C,C],y:[n.y-g,a.y-g,a.y-g,w,w,w],scale:[s,s,s,v*.7,v*1.08,v],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)(m,{components:e,traits:t,size:h})},r)}if(_){if(p(a.toSlot))return null;let n=T[a.toSlot],i=mr(n,x,S,c,l),o=cr(a.toSlot),s=lr(a.toSlot);return(0,K.jsx)(V.div,{className:`absolute left-0 top-0`,style:{width:h,height:h,zIndex:ur(a.toSlot)},initial:!1,animate:{x:[C,C,i.x-g,i.x-g,n.x-g,n.x-g],y:[w,w,i.y-g,i.y-g,n.y-g,n.y-g],scale:[v,v*.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(${nr(a.toSlot)}deg)`},children:(0,K.jsx)(m,{components:e,traits:t,size:h,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:h,height:h,zIndex:d?sr:ur(y)},initial:!1,animate:{x:E.x-g,y:E.y-g,scale:d?v:cr(y),opacity:d?1:lr(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(${nr(b.get(r)??0)}deg)`},children:(0,K.jsx)(m,{components:e,traits:t,size:h,breathe:d})})},r)})]})}var gr=[{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=T(w((e,t)=>({characters:[],selectedIndex:0,ensureGenerated:()=>{t().characters.length>0||e({characters:gr,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 _r(){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 vr(){let e=W(),t=q.use.characters(),n=q.use.ensureGenerated(),r=H(),{w:i,h:a}=_r();(0,G.useEffect)(()=>{e&&n(e)},[e,n]);let o=dr(i,a),s=(0,G.useMemo)(()=>pr(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=tr[i%tr.length]??0,d=o*cr(i),f=lr(i),p=ur(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)(m,{components:e,traits:t,size:d,breathe:!1})})},n)})})}var yr=c(`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)]`),br=c(`min-w-0 flex-1 bg-transparent text-body-medium-lighter text-[var(--content-default)]`,`placeholder:text-[var(--content-tertiary)] outline-none`,ct);function J(e){return e.trim().toLowerCase()}function xr(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 Sr({id:e,options:t,highlighted:n,showAddHint:r,onPick:i,onHover:a}){return(0,K.jsxs)(`ul`,{id:e,role:`listbox`,className:c(`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:c(`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)(_,{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 Cr({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 wr(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 Tr({label:e,placeholder:t,values:n,onChange:r,suggestions:i}){let a=(0,G.useId)(),o=`tac-${a}`,s=`tac-list-${a}`,l=(0,G.useRef)(null),[u,d]=(0,G.useState)(``),[f,p]=(0,G.useState)(!1),[m,h]=(0,G.useState)(-1),g=(0,G.useMemo)(()=>xr(i,u,n),[i,u,n]),_=u.trim(),v=(0,G.useMemo)(()=>{if(!_)return!1;let e=J(_);return!(n.some(t=>J(t)===e)||g.some(t=>J(t)===e))},[_,n,g]),b=(0,G.useMemo)(()=>{let e=g.map(e=>({value:e,isAdd:!1}));return v?[...e,{value:_,isAdd:!0}]:e},[g,v,_]);wr(l,()=>p(!1)),(0,G.useEffect)(()=>{h(e=>e>=b.length?b.length-1:e)},[b.length]);let x=f&&b.length>0,S=!v;function C(e){let t=e.trim();t&&(n.some(e=>J(e)===J(t))||r([...n,t]),d(``),h(-1))}function w(e){r(n.filter(t=>t!==e))}function T(e){e.key===`ArrowDown`?(e.preventDefault(),p(!0),h(e=>Math.min(e+1,b.length-1))):e.key===`ArrowUp`?(e.preventDefault(),h(e=>Math.max(e-1,0))):e.key===`Enter`?x&&m>=0?(e.preventDefault(),C(b[m].value)):u.trim()&&(e.preventDefault(),C(u)):e.key===`,`?(e.preventDefault(),C(u)):e.key===`Backspace`&&u.length===0&&n.length>0?w(n[n.length-1]):e.key===`Escape`&&p(!1)}return(0,K.jsxs)(`div`,{ref:l,className:`relative flex flex-col gap-1.5`,children:[(0,K.jsx)(Cr,{htmlFor:o,children:e}),(0,K.jsxs)(`div`,{className:c(yr,`min-h-9 flex-wrap py-1.5`),children:[(0,K.jsx)(Xe,{size:16,"aria-hidden":!0,className:`shrink-0 self-center text-[var(--content-tertiary)]`}),n.map(e=>(0,K.jsx)(y,{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":m>=0?`${s}-opt-${m}`:void 0,autoComplete:`off`,className:c(br,`h-6 w-24`),placeholder:n.length===0?t:``,value:u,onChange:e=>{d(e.target.value),p(!0)},onFocus:()=>p(!0),onKeyDown:T})]}),x&&(0,K.jsx)(Sr,{id:s,options:b,highlighted:m,showAddHint:S,onPick:C,onHover:h})]})}var Er=`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 Dr({initialFirstName:e=``,initialLastName:t=``,onSubmit:n}){let[i,a]=(0,G.useState)(e),[o,s]=(0,G.useState)(t),[c,l]=(0,G.useState)(``),[u,d]=(0,G.useState)([]),f=i.trim().length>0&&c.trim().length>0;function p(){f&&n({firstName:i,lastName:o,role:c,hobbies:u})}return(0,K.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,children:(0,K.jsxs)(it,{showCreatureFooter:!1,children:[(0,K.jsx)(vr,{}),(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(),p()},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)(b,{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:i,onChange:e=>a(e.target.value),className:ct,autoFocus:!0,required:!0,fullWidth:!0})}),(0,K.jsx)(`div`,{style:Y(.27,30),children:(0,K.jsx)(b,{label:`And your last name?`,placeholder:`Your last name (optional)`,value:o,onChange:e=>s(e.target.value),className:ct,fullWidth:!0})}),(0,K.jsx)(`div`,{style:Y(.34,20),children:(0,K.jsx)(b,{label:`Your role`,placeholder:`What do you do for work?`,value:c,onChange:e=>l(e.target.value),className:ct,required:!0,fullWidth:!0})}),(0,K.jsx)(`div`,{style:Y(.41,10),children:(0,K.jsx)(Tr,{label:`Any hobbies?`,placeholder:`Cars, books, growing tomatoes?`,values:u,onChange:d,suggestions:Er})})]}),(0,K.jsx)(`div`,{className:`mt-10 w-full`,style:Y(.5),children:(0,K.jsx)(r,{type:`submit`,variant:`primary`,size:`regular`,rightIcon:(0,K.jsx)(U,{size:16}),fullWidth:!0,disabled:!f,className:`h-11 text-base`,children:`Continue`})})]})]})})}var Or=`#1A1A1A`,kr=`#FFFFFF`;function Ar(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 jr(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 Mr(e){let t=Ar(e)>.6;return{bg:e,isLight:t,fg:t?Or:kr,fgDeep:jr(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 Mr(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)(u,{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)(d,{className:`h-5 w-5`})}):null]})}var Nr=[`Ziggy`,`Quill`,`Luna`,`Remy`,`Cleo`,`Cade`];function Pr(e,t){let n=[];for(let r=0;r<e;r++)r!==t&&n.push(r);return{centerChar:t,edgeOrder:n}}function Fr({onContinue:e,onBack:t,onForward:n}){let i=W(),a=q.use.characters(),o=q.use.ensureGenerated(),s=q.use.selectedIndex(),c=q.use.setSelectedIndex();(0,G.useEffect)(()=>{i&&o(i)},[i,o]);let u=a.length,[d,f]=(0,G.useState)(null),[m,h]=(0,G.useState)(``),[_,v]=(0,G.useState)(!1),y=(0,G.useRef)(!1),b=(0,G.useRef)(null),{ref:x,size:S}=Xn(),[C,w]=(0,G.useState)(null);(0,G.useEffect)(()=>{u>0&&d===null&&f(Pr(u,s))},[u,s,d]),(0,G.useEffect)(()=>{d&&c(d.centerChar)},[d,c]);let T=d?.centerChar;(0,G.useEffect)(()=>{T!=null&&!y.current&&h(Nr[T%Nr.length])},[T]),(0,G.useEffect)(()=>{_&&(b.current?.focus(),b.current?.select())},[_]);function E(e){if(!d||e===d.centerChar)return;let t=d.edgeOrder.indexOf(e);if(t<0)return;let n=[...d.edgeOrder];n[t]=d.centerChar,w({entering:{char:e,fromSlot:t},exiting:{char:d.centerChar,toSlot:t}}),f({centerChar:e,edgeOrder:n})}let D=()=>d&&E((d.centerChar+1)%u),ee=()=>d&&E((d.centerChar-1+u)%u),te=(0,G.useMemo)(()=>d?a[d.centerChar]:void 0,[d,a]),O=!!i&&!!d&&!!te;function k(){te&&e({traits:te,name:m.trim()})}function A(){y.current=!0,h(e=>{let t=Nr.filter(t=>t!==e),n=t.length>0?t:Nr;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)(Qn,{size:S,children:[O&&(0,K.jsx)(hr,{components:i,characters:a,centerChar:d.centerChar,edgeOrder:d.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)(l,{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:[_?(0,K.jsx)(`input`,{ref:b,value:m,onChange:e=>{y.current=!0,h(e.target.value)},onBlur:()=>v(!1),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),v(!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:()=>v(!0),"aria-label":`Edit name`,className:`flex cursor-pointer items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-medium ${m?`text-[var(--content-default)]`:`text-[var(--content-tertiary)]`}`,children:m||`Name your assistant`}),(0,K.jsx)(g,{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)(p,{className:`h-5 w-5`})})]}),(0,K.jsx)(r,{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 Ir=/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,Lr=/[MmLlHhVvCcSsQqTtAaZz][^MmLlHhVvCcSsQqTtAaZz]*/g;function Rr(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(Lr)??[];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(Ir)??[]).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 zr(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 Br=.25,Vr=.46,Hr=.3,Ur=.85,Wr=40,Gr=14,Kr=8;function qr({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}=$n(),[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=$t();(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:zr(e.paths.map(e=>Rr(e.svgPath)))}:null},[i,v]);if(!y)return null;let b=c*Ur,x=Math.min(Math.min(c,l)*Hr,b*y.bbox.h/y.bbox.w),S=x*y.bbox.w/y.bbox.h,C=(c-S)/2,w=l-(1-Br)*x,T=Wr/100*l-(w+x/2),E=(Vr-Br)*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*Gr}px, ${u.y*Kr}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 Jr=200,Yr=40;function Xr({firstName:e,assistantName:t,onContinue:n,onBack:i,onForward:a}){let o=W(),s=q.use.characters(),c=q.use.selectedIndex(),l=H(),{ref:u,size:{w:d,h:f}}=Xn(),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=Jr/v,C=(Yr/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)(Qn,{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)(qr,{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:i,onNext:a})}),(0,K.jsxs)(`div`,{className:st,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)(r,{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 Zr=.3,Qr=.85,$r=.25;function ei(){let e=W(),t=q.use.characters(),n=q.use.selectedIndex(),r=t.length>0?t[n]:void 0,{w:i,h:a}=$n(),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:zr(t.paths.map(e=>Rr(e.svgPath)))}:null},[e,r]),s=o?Math.min(Math.min(i,a)*Zr,i*Qr*o.bbox.h/o.bbox.w):0;return{art:o,eyesW:o?s*o.bbox.w/o.bbox.h:0,eyesH:s,restCy:a-$r*s,centerX:i/2,w:i,h:a}}function ti({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=xt(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 ni={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 ri(e,t){let n=ni[e];return n&&n.length>0?n:t.filter(t=>t!==e)}var ii=new Set([`orange`,`pink`,`red`]);function ai(e,t){return ii.has(e)&&ii.has(t)}function oi(e,t,n){let r=ri(e,t),i=[];for(let e of r){if(i.length>=n)break;i.some(t=>ai(t,e))||i.push(e)}for(let e of r){if(i.length>=n)break;i.includes(e)||i.push(e)}return i}var si=`You’ve used AI that just answers questions`,ci=`The more I help`,li=`I’m different`,ui=`The better I get`,di=`and the less you have to do`,fi=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],pi=290;function mi({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 hi({onContinue:e,onBack:t,onForward:n}){let i=X(),a=H(),{art:o,eyesW:s,eyesH:c,restCy:l,centerX:u,w:d,h:f}=ei(),p=W(),h=q.use.characters(),g=q.use.selectedIndex(),_=h.length>0?h[g]:void 0,v=f>0&&f<=800,y=v?.17:.22,b=v?`top-[17%]`:`top-[22%]`,x=vt(0),S=vt(1),C=(0,G.useMemo)(()=>!p||!_?`orange`:oi(_.color,p.colors.map(e=>e.id),1)[0]??`orange`,[p,_]),w=Math.min(220,Math.max(150,d*.16)),T=-w,E=-w*.4,D=vt(-220),ee=(0,G.useMemo)(()=>!p||!_?[]:oi(_.color,p.colors.map(e=>e.id),3),[p,_]),te=Math.max(.42,Math.min(d/1100,1)),O=Math.round(pi*te),k=-O*1.1,A=-O*.42,j=vt(-320),[ne,re]=(0,G.useState)(!!a),[ie,ae]=(0,G.useState)(!!a),[oe,M]=(0,G.useState)(!1),[se,ce]=(0,G.useState)(!1),[le,ue]=(0,G.useState)(!1),[de,fe]=(0,G.useState)(!1),[pe,me]=(0,G.useState)(!!a),he=Math.min(d,768)-48,ge=(0,G.useRef)(null),N=(0,G.useRef)(null),_e=(0,G.useRef)(null),ve=(0,G.useRef)(null),ye=(0,G.useRef)(null),[be,xe]=(0,G.useState)(0),[P,Se]=(0,G.useState)(0),[Ce,we]=(0,G.useState)(0),[Te,Ee]=(0,G.useState)(0),[F,De]=(0,G.useState)(0);return(0,G.useLayoutEffect)(()=>{ge.current?.offsetHeight&&xe(ge.current.offsetHeight),N.current?.offsetHeight&&Se(N.current.offsetHeight),_e.current?.offsetHeight&&we(_e.current.offsetHeight),ve.current?.offsetHeight&&Ee(ve.current.offsetHeight),ye.current?.offsetHeight&&De(ye.current.offsetHeight)},[he]),(0,G.useEffect)(()=>{x.set(l),fe(!0)},[l,x]),(0,G.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{M(!0),ce(!0),ue(!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),re(!1),ae(!1),M(!1),ce(!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||(re(!0),await Promise.all([i(Qt(x,e,{duration:.55,ease:`easeOut`})),i(Qt(S,.55,{duration:.55,ease:`easeOut`}))]),r)||(ae(!0),await Promise.all([i(Qt(x,l,{type:`spring`,stiffness:210,damping:15})),i(Qt(S,1,{duration:.45,ease:`easeOut`}))]),r)||(await s(900),r)||(M(!0),ce(!0),await i(Qt(D,[T,E,E,T],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`})),r)||(await s(150),r))return;ue(!0);let t=i(Qt(j,[k,A,A,k],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`}));await s(700),!r&&(me(!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:i.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:he,fontFamily:`var(--font-serif)`},children:[(0,K.jsx)(`span`,{ref:ge,className:`block`,children:si}),(0,K.jsx)(`span`,{ref:N,className:`block`,children:ci}),(0,K.jsx)(`span`,{ref:_e,className:`block`,children:li}),(0,K.jsx)(`span`,{ref:ve,className:`block`,children:ui}),(0,K.jsx)(`span`,{ref:ye,className:`block`,children:di})]}),de&&o&&(0,K.jsx)(ti,{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)(m,{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:fi.map((e,t)=>(0,K.jsx)(`div`,{style:{width:O,height:O,marginLeft:t===0?0:-O*.34,zIndex:fi.length-t},children:(0,K.jsx)(m,{components:p,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:ee[t]??`teal`},size:O,breathe:!1})},e.bodyShape))}),(0,K.jsxs)(`div`,{className:`${st.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)(mi,{firstH:be,secondH:P,color:i.fgDeep,firstText:si,secondText:ci,revealed:ne,carouseled:oe,revealFrom:`bottom`,revealDuration:.55,reduce:!!a}),(0,K.jsx)(mi,{firstH:Ce,secondH:Te,color:i.fg,firstText:li,secondText:ui,revealed:ie,carouseled:se,revealFrom:`top`,revealDuration:.45,reduce:!!a}),(0,K.jsx)(V.div,{className:`relative w-full overflow-hidden`,style:{color:i.fg},initial:!1,animate:{height:le?F:0},transition:a?{duration:0}:{duration:.5,ease:`easeInOut`},children:F>0&&(0,K.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:F},children:(0,K.jsx)(V.span,{className:`block`,initial:!1,animate:{clipPath:le?`inset(0% 0 0% 0)`:`inset(100% 0 0 0)`},transition:a?{duration:0}:{duration:.5,ease:`easeOut`},children:di})})})]}),pe&&(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)(r,{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 gi({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 _i({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)(gi,{idSuffix:`front`})}),(0,K.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(-0.5px) rotateY(180deg)`},children:(0,K.jsx)(gi,{idSuffix:`back`})})]})})]})}var vi=.3,yi=.95;function bi({onClaim:e,onBumpEyes:t,onBack:n,onForward:r}){let i=H(),a=X(),{h:o}=$n(),[s,c]=(0,G.useState)(!1);function l(){if(!s){if(c(!0),i){e();return}window.setTimeout(t,vi*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:yi,times:[0,vi/yi,.62,1],ease:[`easeIn`,`easeOut`,`easeIn`]},onAnimationComplete:()=>{s&&e()},children:(0,K.jsx)(_i,{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`})]})]})]})}ot();var xi=640,Si=[{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`}}],Ci=[`9%`,`27%`,`45%`,`62%`,`79%`],Q=50,wi=.3*.75,Ti=`rgba(36, 41, 46, 0.2)`,Ei=`#FDFDFC`,Di=.16;function Oi(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 ki(){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 Ai({components:e,traits:t,side:n,top:r,size:i,progress:a}){let o=Math.max(0,Math.min(1,a)),s=100+Di*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)(m,{components:e,traits:t,size:i,breathe:!1})})}function ji({axis:e,value:t,onValueChange:n,fg:r,disabled:i}){return(0,K.jsxs)(`div`,{className:`flex w-full shrink-0 flex-wrap items-center gap-x-5 gap-y-1.5 sm:flex-nowrap`,style:{opacity:i?.7:1},children:[(0,K.jsx)(`span`,{className:`order-1 flex-1 text-left text-sm 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-sm sm:order-3 sm:w-32 sm:flex-none sm:text-left sm:text-[17px]`,style:{color:r},children:e.right}),(0,K.jsxs)(C,{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]??Q),disabled:i,min:0,max:100,step:1,"aria-label":`${e.left} to ${e.right}`,children:[(0,K.jsx)(x,{className:`relative h-2 w-full grow rounded-full sm:h-3`,style:{backgroundColor:Ti}}),(0,K.jsx)(S,{className:`block h-5 w-5 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 sm:h-6 sm:w-6`,style:{backgroundColor:Ei}})]})]})}function Mi({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:Si.map((i,a)=>{let o=t[i.id]??Q,s=Math.max(0,(Q-o)/Q),c=Math.max(0,(o-Q)/Q),l=Ci[a]??`50%`,u=n[a];return u?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(Ai,{components:e,traits:u.left,side:`left`,top:l,size:r,progress:s}),(0,K.jsx)(Ai,{components:e,traits:u.right,side:`right`,top:l,size:r,progress:c})]},i.id):null})})}function Ni({values:e,onValueChange:t,locked:n,onContinue:r,onBack:i,onForward:a}){let o=X(),s=W(),c=ki(),{w:l,h:u}=$n(),d=Math.round(wi*Math.min(l,u))+12,f=c>=xi,p=q.use.characters()[q.use.selectedIndex()]?.color,m=Math.round(Math.min(300,Math.max(160,c*.16))),h=(0,G.useMemo)(()=>{let e=s?.colors.map(e=>e.id)??[],t=Oi(Si.map(e=>e.leftAvatar.color),p,e),n=Oi(Si.map(e=>e.rightAvatar.color),p,e);return Si.map((e,r)=>({left:{...e.leftAvatar,color:t[r]??e.leftAvatar.color},right:{...e.rightAvatar,color:n[r]??e.rightAvatar.color}}))},[s,p]);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}),f&&s&&(0,K.jsx)(Mi,{components:s,values:e,sideAvatars:h,size:m}),(0,K.jsxs)(`div`,{className:`absolute inset-x-0 top-0 bottom-0 mx-auto flex w-full max-w-2xl flex-col items-center overflow-y-auto px-6`,style:{paddingBottom:d},children:[(0,K.jsx)(`div`,{className:`w-full min-h-14 shrink-[4]`,style:{flexBasis:Math.round(u*.14)}}),(0,K.jsxs)(`div`,{className:`flex shrink-0 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:`hidden max-w-md text-center text-[15px] sm:block`,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:`w-full min-h-3 shrink-[2] basis-10`}),Si.map((r,i)=>(0,K.jsxs)(G.Fragment,{children:[i>0&&(0,K.jsx)(`div`,{className:`w-full min-h-2.5 shrink basis-8 sm:basis-11`}),(0,K.jsx)(ji,{axis:r,value:e[r.id]??Q,onValueChange:e=>t(r.id,e),fg:o.fg,disabled:n})]},r.id)),(0,K.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-14`}),(0,K.jsxs)(`button`,{type:`button`,onClick:r,className:`flex h-11 w-[234px] shrink-0 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 Pi({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}=rt({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)(h,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Starting assistant…`]}):d?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(h,{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 Fi=Mr(`#17191C`);function Ii(){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 Li(){let e=W(),t=q.use.characters(),n=q.use.selectedIndex();return{components:e,chosen:t.length>0?t[n]:void 0}}function Ri({size:e=64,isAssistantBusy:t=!1}){let{components:n,chosen:r}=Li();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)(m,{components:n,traits:r,size:e,isAssistantBusy:t})})}var zi=64,Bi=4500,Vi=7e3;function Hi({onDone:e,onBack:t,onForward:n,scheduledTime:r,awaitingTime:i}){let{components:a,chosen:o}=Li(),s=H(),{w:c,h:l}=Ii(),u=r?`Check-in scheduled for tomorrow at ${r}!`:`Check-in scheduled!`;(0,G.useEffect)(()=>{let t=setTimeout(e,i&&!r?Vi:Bi);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 h=1.3*Math.max(c,l)/zi,g=f?c/2-f.cx:0,_=f?l*.88-f.cy:0,v=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:zi,height:zi},children:a&&o&&f&&(0,K.jsx)(V.div,{className:`absolute inset-0`,style:{transformOrigin:`center`},initial:s?!1:{scale:h,x:g,y:_},animate:{x:[g,g,0,0],y:[_,_+v,0,0],scale:[h,h,1.07,1]},transition:s?{duration:0}:{duration:1.1,times:[0,.18,.82,1],ease:[`easeOut`,`easeIn`,`easeOut`]},children:(0,K.jsx)(m,{components:a,traits:o,size:zi})})}),(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 Ui=[`Searching the web to get to know you…`,`Reading public profiles…`,`Skimming the highlights…`,`Connecting the dots…`,`Piecing it together…`],Wi=[`Updating my personality…`,`Finding my voice…`,`Getting into character…`],Gi=`Almost there…`,Ki=[...Ui,Gi],qi=[...Wi,Gi],Ji=2800;function Yi({onDone:e,onBack:t,onAdvance:n,onForward:r,ready:i}){let a=Fi,[o,s]=(0,G.useState)(0);return(0,G.useEffect)(()=>{n?.(o);let t=o>=Ki.length-1;if(i&&t){let t=setTimeout(e,Ji);return()=>clearTimeout(t)}let r=setTimeout(()=>s(e=>(e+1)%Ki.length),Ji);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)(Ri,{isAssistantBusy:!0}),(0,K.jsx)(Ye,{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:Ki[o]},o)})]})]})}function Xi({onDone:e,ready:t}){let n=Fi,[r,i]=(0,G.useState)(0);return(0,G.useEffect)(()=>{let n=qi.length-1;if(t){if(r!==n){i(n);return}let t=setTimeout(e,Ji);return()=>clearTimeout(t)}let a=setTimeout(()=>i(e=>(e+1)%qi.length),Ji);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)(Ri,{isAssistantBusy:!0}),(0,K.jsx)(Ye,{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:qi[r]},r)})]})})}function Zi({claims:e,loading:t,onContinue:n,onRejectAll:r,onBack:i,onForward:a}){let o=Fi,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 bottom-0 left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6 pb-8`,children:[(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-y-auto`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(Ri,{}),(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)(Ye,{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)(v,{className:`h-4 w-4`})})]},e.claim))})}),d&&f&&(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`mt-5 self-start shrink-0 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] shrink-0 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 $=64,Qi=$;function $i({head:e,note:t,flyToNote:n,reduce:r,onLanded:i}){let{components:a,chosen:o}=Li();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)(m,{components:a,traits:o,size:$})})}function ea({installedPlugins:e=[],pluginCatalog:t={},onStart:n,onBack:r,onForward:i}){let a=Fi,o=H(),[s,c]=(0,G.useState)(!1),l=e.map(e=>({name:e,displayName:at(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:Qi}}),(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)($i,{head:m.head,note:m.note,flyToNote:g&&m.note!==void 0,reduce:o,onLanded:()=>y(!0)})]})]})}var ta=[{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})}],na=`#17191C`,ra=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],ia=290;function aa({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}=$n(),u=Math.max(.42,Math.min(l/1100,1)),d=l<640,f=o.length>0?o[s]:void 0,{bg:p,peekColors:h}=(0,G.useMemo)(()=>!a||!f?{bg:`var(--surface-base)`,peekColors:[]}:{bg:a.colors.find(e=>e.id===f.color)?.hex??`var(--surface-base)`,peekColors:oi(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?na:p},transition:c?{duration:0}:{duration:1,ease:`easeInOut`}}),r&&(0,K.jsx)(qr,{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(ia*u)*.42,right:-Math.round(ia*u)*.12},children:ra.map((e,t)=>{let n=Math.round(ia*u);return(0,K.jsx)(V.div,{style:{width:n,height:n,marginLeft:t===0?0:-n*.34,zIndex:ra.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)(m,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:h[t]??`teal`},size:n,breathe:!1})},e.bodyShape)})}),a&&(0,K.jsx)(Ye,{children:(d?ta.filter(e=>e.mobile):ta).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)(m,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:h[e.colorIdx]??`teal`},size:n,breathe:!1})},`peek-${t}`)})})]})}var oa={established:!1,assistantName:null};async function sa(e,n={hasAnyActiveConversation:_e,fetchAssistantIdentity:f}){try{if(!await n.hasAnyActiveConversation(e))return oa}catch(e){return t(e,{context:`research_onboarding_established_check`}),oa}let r=await n.fetchAssistantIdentity(e).catch(()=>null);return{established:!0,assistantName:(typeof r?.name==`string`?r.name.trim():``)||null}}function ca({assistantName:e,onKeep:t,onRedo:n,onBack:i}){let a=e?.trim()||``,o=a||`your assistant`,s=a?`${a}'s`:`its`;return(0,K.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-primary)`},children:[(0,K.jsx)(Z,{onBack:i,tone:`light`}),(0,K.jsxs)(`div`,{className:`${st} max-w-xl`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,K.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:a?`${a} is already up and running`:`Your assistant is already up and running`}),(0,K.jsxs)(`p`,{className:`text-[15px]`,style:{color:`var(--content-secondary)`},children:[`You two have history — a personality, memories, and past conversations. Running setup again would overwrite who `,o,` is now.`]})]}),(0,K.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[(0,K.jsxs)(r,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:[`Keep `,o,` and start chatting`,(0,K.jsx)(U,{className:`h-4 w-4`})]}),(0,K.jsxs)(r,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:n,className:`h-11 text-base`,children:[`Start over and rebuild `,s,` personality`]})]})]})]})}var la=4e3;function ua(e){return{firstName:e.firstName,lastName:e.lastName,occupation:e.role,hobby:e.hobbies.join(`, `),timezone:N()}}function da(e){let t=e.firstName.trim();return t?`Getting to know ${t}`:`Getting to know you`}ot();function fa(){let e=i(),t=ce.use.user(),n=t?.id??null,r=Ze.use.enterFocus(),o=Ze.use.exitFocus(),s=Ze.use.setPendingAvatarTraits(),c=Ze.use.requestSidebarCollapse(),[l,u]=(0,G.useState)(`form`),{ref:d,size:f}=Xn(),[p,m]=(0,G.useState)([]),[h,g]=(0,G.useState)(!1);function _(e){u(e)}function v(e,t=`completed`){$e(tt[l],{userId:n,outcome:t}),m([]),_(e)}function y(e){m(e=>[...e,l]),_(e)}function b(){let e=p[p.length-1];e&&(m(e=>e.slice(0,-1)),_(e))}let x=p.length>0?b:void 0,[S,C]=(0,G.useState)(null),w=(0,G.useRef)(null),[T,E]=(0,G.useState)(null),[ee,O]=(0,G.useState)(null),k=(0,G.useRef)(!1),[A,j]=(0,G.useState)(null),[ne,re]=(0,G.useState)({}),[ie,oe]=(0,G.useState)(!1),[M,se]=(0,G.useState)(null),[le,ue]=(0,G.useState)(null),[de,fe]=(0,G.useState)(!1),[me,N]=(0,G.useState)(!1),[_e,P]=(0,G.useState)(!1),[Se,Ce]=(0,G.useState)(0),[we,Te]=(0,G.useState)(0),[Ee]=a(),F=rn({hostingParam:Ee.get(`hosting`),localMode:te(),gatewayAuthSession:D()}),De=Ee.get(`assistant`)??void 0,Oe=F,{start:ke,ready:Ae,assistantId:I,error:je,awaitReady:L}=un({adoptExisting:F,adoptAssistantId:De}),R=Pn(),{start:z,hydrate:Me}=R,Ne=(0,G.useRef)(Promise.resolve()),Pe=(0,G.useRef)(Promise.resolve()),[B,Fe]=(0,G.useState)(!1),Ie=R.status===`idle`||R.status===`running`,Le=!Ie&&R.claims.length===0;(0,G.useEffect)(()=>{o(),s(null),ke()},[o,s,ke]),(0,G.useEffect)(()=>{if(w.current)return;let e=L().then(e=>sa(e)).catch(()=>oa);w.current=e,e.then(E)},[L]),(0,G.useLayoutEffect)(()=>{if(h||!n)return;let e=ye(n);if(e?.formValues){C(e.formValues),j(e.faceValues),ue(e.checkinTime),N(e.checkinBooked),se(e.researchConversationId??null),e.research&&Me({...e.research,pluginCatalog:e.research.pluginCatalog??{}},L);let t=be(e);u(Oe&&(t===`letschat`||t===`meeting`)?`looking`:t),m([])}g(!0)},[h,n,Me,L,Oe]),(0,G.useEffect)(()=>{!h||!S||ve(n,{step:l,formValues:S,faceValues:A,checkinTime:le,checkinBooked:me,research:R.status===`done`?{status:`done`,claims:R.claims,suggestions:R.suggestions,installedPlugins:R.installedPlugins,pluginCatalog:R.pluginCatalog}:null,...M?{researchConversationId:M}:{}})},[h,n,l,S,A,le,me,M,R.status,R.claims,R.suggestions,R.installedPlugins,R.pluginCatalog]),(0,G.useEffect)(()=>{h&&(!S||R.status!==`idle`||z({awaitAssistantId:L,subject:ua(S),conversationTitle:da(S),...M?{resumeConversationId:M}:{},onConversationCreated:se,includeSuggestions:!1}))},[h,S,M,R.status,z,L,!0]),(0,G.useEffect)(()=>{l===`results`&&Le&&(m([]),u(`suggestions`))},[l,Le]);function Re(t,i,a,{skip:o=!1,hidden:l=!1}={}){xe(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;ge({tools:[],tasks:[],tone:lt,...m?{userName:m}:{},...f.trim()?{occupation:f.trim()}:{},...o?{}:{initialMessage:a??nn({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();_&&he(_),s(i?.traits??null),g&&r(),o||ae.markExpectingFirstMessage(),c(),ae.checkAssistant(I??void 0).finally(()=>{e(`${pe.assistant}?onboarding=1`,{replace:!0})})}async function ze(){S&&(await Promise.all([R.awaitPluginInstalls(),Ne.current,Pe.current]),Re(S,A,Kn(A?.name),{hidden:!0}))}function Be(e){R.start({awaitAssistantId:L,subject:ua(e),conversationTitle:da(e),onConversationCreated:se,includeSuggestions:!1})}async function Ve(e){if(!k.current&&(T??await Promise.race([w.current??Promise.resolve(null),new Promise(e=>{setTimeout(()=>e(null),la)})]))?.established){O(e),v(`existing`);return}C(e),Be(e),v(`face`)}function He(e){if(e.length>0&&!e.includes(`https://www.googleapis.com/auth/calendar.events`)){P(!0);return}if(P(!1),I&&S){let e=[S.firstName.trim(),S.lastName.trim()].filter(Boolean).join(` `);ue(null),N(!1),fe(!0),et({assistantId:I,userName:e||void 0,assistantName:A?.name?.trim()||void 0}).then(e=>{e.scheduled&&(N(!0),ue(qn(e.start,e.timeZone)))}).finally(()=>fe(!1))}v(`meeting`)}if([`different`,`personality`,`integration`,`letschat`,`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(l)&&S){let e=[`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(l);return(0,K.jsx)(`div`,{ref:d,"data-theme":`dark`,className:`relative h-full overflow-hidden`,children:(0,K.jsxs)(Qn,{size:f,children:[(0,K.jsx)(aa,{eyesBumpNonce:Se,peekLevel:[`looking`,`results`,`suggestions`,`finishing`].includes(l)?we:0,darkBg:e,showBottomEyes:!e&&l!==`different`}),l===`different`&&(0,K.jsx)(hi,{onContinue:()=>v(`personality`),onBack:()=>y(`intro`),onForward:x}),l===`personality`&&(0,K.jsx)(Ni,{values:ne,onValueChange:(e,t)=>re(n=>({...n,[e]:t})),locked:ie,onContinue:()=>{ie||(Fe(!0),Pe.current=Gn({awaitAssistantId:L,values:ne,userName:S?.firstName?.trim()||void 0,assistantName:A?.name?.trim()||void 0}).finally(()=>Fe(!1)),oe(!0)),v(`integration`)},onBack:()=>y(`different`),onForward:x}),l===`integration`&&(0,K.jsx)(bi,{onClaim:()=>v(Oe?`looking`:`letschat`),onBumpEyes:()=>Ce(e=>e+1),onBack:()=>y(`personality`),onForward:x}),l===`letschat`&&(0,K.jsx)(Pi,{assistantId:I,assistantReady:Ae,hatchError:je,onConnected:He,missingCalendarScope:_e,onRetry:()=>P(!1),onSkip:()=>{P(!1),v(`looking`,`skipped`)},onBack:()=>y(`integration`),onForward:x}),l===`meeting`&&(0,K.jsx)(Hi,{scheduledTime:le??void 0,awaitingTime:de,onDone:()=>v(`looking`),onBack:()=>y(`letschat`),onForward:x}),l===`looking`&&(0,K.jsx)(Yi,{onDone:()=>v(Le?`suggestions`:`results`),onBack:()=>y(Oe?`integration`:`letschat`),onAdvance:e=>Te(Math.min(e+1,4)),onForward:x,ready:!Ie}),l===`results`&&(0,K.jsx)(Zi,{claims:R.claims,loading:Ie,onContinue:e=>{M&&I&&e.length>0&&(Ne.current=In({assistantId:I,conversationId:M,removedClaims:e,rejectedAll:!1})),v(`suggestions`)},onRejectAll:()=>{M&&I&&(Ne.current=In({assistantId:I,conversationId:M,removedClaims:R.claims.map(e=>e.claim),rejectedAll:!0})),v(`suggestions`,`skipped`)},onBack:()=>y(`looking`),onForward:x}),l===`suggestions`&&(0,K.jsx)(ea,{installedPlugins:R.installedPlugins,pluginCatalog:R.pluginCatalog,onStart:async()=>{if($e(tt.suggestions,{userId:n,outcome:`completed`}),B){m([]),u(`finishing`);return}await ze()},onBack:()=>y(Le?`looking`:`results`),onForward:x}),l===`suggestions`&&!1,l===`finishing`&&(0,K.jsx)(Xi,{ready:!B,onDone:()=>void ze()})]})})}return l===`existing`?(0,K.jsx)(ca,{assistantName:T?.assistantName??null,onKeep:()=>{$e(tt.existing,{userId:n,outcome:`completed`}),xe(n),ae.checkAssistant(I??void 0).finally(()=>{e(pe.assistant,{replace:!0})})},onRedo:()=>{let e=ee;e&&(k.current=!0,$e(tt.existing,{userId:n,outcome:`skipped`}),C(e),Be(e),m([]),_(`face`))},onBack:()=>{O(null),y(`form`)}}):l===`intro`&&S?(0,K.jsx)(Xr,{firstName:S.firstName,assistantName:A?.name,onContinue:()=>v(`different`),onBack:()=>y(`face`),onForward:x}):l===`face`&&S?(0,K.jsx)(Fr,{onContinue:e=>{j(e),v(`intro`)},onBack:()=>y(`form`),onForward:x}):(0,K.jsx)(Dr,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:Ve})}export{fa as ResearchOnboardingRoute};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-amTXFI-2.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-y5bNUVyG.js";import{d as s,i as c,n as l}from"./auth-store-C09YAZEu.js";import{t as u}from"./return-to-BwxkOGDI.js";import{c as d}from"./routes-BbeIx_F9.js";import{c as f,d as p,f as m,l as h,p as g,u as _}from"./prefs-B1Y3q3c8.js";import{Di as v,hr as y,rn as b}from"./index-yu6nDHvG.js";import{n as x,t as S}from"./consent-controls-Cnr1DzCr.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]=g(),[M,N]=_(),[P,F]=p(),[I,L]=m(),[R]=f(),[z]=h(),[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)(b,{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)(v,{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,3 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{r as t,s as n}from"./local-settings-lVNyIOJ_.js";import{t as r}from"./react-DJZBPgpf.js";import{t as i}from"./createLucideIcon-IRfcSUxS.js";import{n as a,t as o}from"./create-selectors-8NePGNlX.js";import{n as s}from"./typed-storage-5IU6qVWg.js";import{a as c}from"./diagnostics-COsnZMe5.js";import{l}from"./chat-markdown-message-BnX6bhgs.js";import{t as u}from"./conversation-store-BljZWolF.js";import{c as ee,d as te}from"./messages-Bl6a3LUN.js";import{b as d,n as f,t as ne,v as re,w as p,x as ie}from"./chat-B8mgARYR.js";var ae=i(`bolt`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),oe=i(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),se=i(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),ce=i(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),le=e(r(),1),m=1e3,ue=15,de=0,h=new Map,g=[];function fe(e){let t=`sse-${++de}`,n={id:t,abortSignal:e,initiatedAt:Date.now(),establishedAt:null,lastTrafficAt:null,lastDataAt:null,dataFrames:0,keepalives:0,endedAt:null,endReason:null};h.set(t,n),Se();let r=()=>{xe(t,`aborted`)};return e.aborted?r():e.addEventListener(`abort`,r,{once:!0}),t}function pe(e){let t=h.get(e);t&&t.establishedAt===null&&(t.establishedAt=Date.now())}function me(e,t){let n=h.get(e);if(!n)return;let r=Date.now();n.lastTrafficAt=r,t?(n.lastDataAt=r,n.dataFrames++):n.keepalives++}function he(e,t){g.push({clientId:e,receivedAt:new Date().toISOString(),...t}),g.length>m&&g.shift()}var ge=`events-tail`;function _e(e){if(e.length===0)return;let t=new Set;for(let e of g)typeof e.seq==`number`&&t.add(e.seq);for(let n of e)typeof n.seq==`number`&&t.has(n.seq)||g.push({clientId:ge,receivedAt:new Date().toISOString(),...n});for(;g.length>m;)g.shift()}function ve(){return Array.from(h.values())}function ye(e=m){let t=Math.max(0,g.length-e);return g.slice(t)}function be(e,t){if(t===null)return null;let n=1/0;for(let e of g)typeof e.seq==`number`&&(n=Math.min(n,e.seq));return n!==1/0&&n>t+1?null:g.filter(n=>n.conversationId===e&&typeof n.seq==`number`&&n.seq>t).sort((e,t)=>e.seq-t.seq)}function xe(e,t){let n=h.get(e);n&&(n.endedAt===null?(n.endedAt=Date.now(),n.endReason=t):n.endReason===`aborted`&&t!==`aborted`&&(n.endReason=t),Se())}function Se(){let e=0;for(let t of h.values())t.endedAt!==null&&e++;if(!(e<=ue))for(let[t,n]of h){if(e<=ue)break;n.endedAt!==null&&(h.delete(t),e--)}}var Ce={phase:`idle`,pendingQueuedCount:0,activeToolCallCount:0,activeTurnId:null,lastTerminalReason:null,statusText:null,liveWebActivity:{}};function we(e){return e===`queued`||e===`thinking`||e===`streaming`||e===`awaiting_user_input`}function Te(e){return e===`thinking`}function _(e){return(e.phase===`idle`||e.phase===`errored`)&&!e.activeTurnId}var Ee=o(a()((e,t)=>({...Ce,requestSend:t=>e(e=>({phase:`thinking`,activeTurnId:t??e.activeTurnId,lastTerminalReason:null,activeToolCallCount:0,statusText:null})),acceptSend:t=>e(e=>({activeTurnId:t,...e.phase===`idle`||e.phase===`errored`?{phase:`thinking`,lastTerminalReason:null}:null})),onTextDelta:()=>{let n=t();if(n.phase===`idle`||n.phase===`errored`){if(!n.activeTurnId)return;e({phase:`streaming`});return}(n.phase===`thinking`||n.phase===`queued`)&&e({phase:`streaming`})},onToolUseStart:()=>{let n=t();_(n)||e({phase:n.phase===`idle`||n.phase===`errored`||n.phase===`queued`?`thinking`:n.phase,activeToolCallCount:n.activeToolCallCount+1})},onToolResult:()=>e(e=>({activeToolCallCount:Math.max(0,e.activeToolCallCount-1)})),onToolActivityMetadata:(n,r)=>{let i=t();_(i)||e({liveWebActivity:{...i.liveWebActivity,[n]:r}})},onActivityThinking:n=>{let r=t();_(r)||r.phase!==`awaiting_user_input`&&e({phase:`thinking`,statusText:n??null})},showSurface:n=>{_(t())||n&&e({phase:`awaiting_user_input`})},updateSurface:()=>{},dismissSurface:()=>{let n=t();n.phase===`awaiting_user_input`&&n.activeToolCallCount===0&&e({phase:`thinking`})},completeSurface:()=>{let n=t();n.phase===`awaiting_user_input`&&n.activeToolCallCount===0&&e({phase:`thinking`})},onSecretRequest:()=>{_(t())||e({phase:`awaiting_user_input`})},onConfirmationRequest:()=>{_(t())||e({phase:`awaiting_user_input`})},onQuestionRequest:()=>{_(t())||e({phase:`awaiting_user_input`})},onContactRequest:()=>{_(t())||e({phase:`awaiting_user_input`})},completeTurn:()=>{e({phase:t().pendingQueuedCount>0?`queued`:`idle`,activeTurnId:null,activeToolCallCount:0,lastTerminalReason:`complete`,statusText:null,liveWebActivity:{}})},handoffGeneration:()=>{_(t())||e({phase:`thinking`,activeToolCallCount:0,statusText:null})},cancelGeneration:()=>{e({phase:t().pendingQueuedCount>0?`queued`:`idle`,activeTurnId:null,activeToolCallCount:0,lastTerminalReason:`cancelled`,statusText:null,liveWebActivity:{}})},onStreamError:()=>e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,pendingQueuedCount:0,lastTerminalReason:`error`,statusText:null,liveWebActivity:{}}),onSessionError:()=>e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,pendingQueuedCount:0,lastTerminalReason:`session_error`,statusText:null,liveWebActivity:{}}),onTurnTimeout:()=>e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,pendingQueuedCount:0,lastTerminalReason:`timeout`,statusText:null,liveWebActivity:{}}),onPollReconciled:n=>{let r=t();n&&n!==r.activeTurnId||we(r.phase)&&e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,lastTerminalReason:`complete`,statusText:null,liveWebActivity:{}})},resetTurn:()=>e({...Ce}),enqueueMessage:()=>e(e=>({pendingQueuedCount:e.pendingQueuedCount+1})),dequeueMessage:()=>{let n=t(),r=Math.max(0,n.pendingQueuedCount-1);if(_(n)){e({pendingQueuedCount:r});return}e({phase:`thinking`,pendingQueuedCount:r})},deleteQueuedMessage:()=>{let n=t(),r=Math.max(0,n.pendingQueuedCount-1);if(r===0&&n.phase===`queued`){e({phase:`idle`,pendingQueuedCount:0,activeTurnId:null,lastTerminalReason:`complete`,statusText:null,liveWebActivity:{}});return}e({pendingQueuedCount:r})}}))),De=3670016,Oe=[.85,.75,.65,.5],ke=2e7,Ae=new Set([`image/jpeg`,`image/jpg`,`image/png`,`image/webp`,`image/heic`,`image/heif`,`image/bmp`,`image/tiff`]),je=new Set([`jpg`,`jpeg`,`png`,`webp`,`heic`,`heif`,`bmp`,`tif`,`tiff`]);function v(e){let t=e.type.trim().toLowerCase();if(Ae.has(t))return!0;let n=e.name.split(`.`).pop()?.trim().toLowerCase();return n?je.has(n):!1}function Me(e){return v(e)&&e.size>3670016}function Ne(e){let t=e.type.trim().toLowerCase();if(t===`image/heic`||t===`image/heif`)return!0;let n=e.name.split(`.`).pop()?.trim().toLowerCase();return n===`heic`||n===`heif`}function Pe(e){return Me(e)||Ne(e)}function Fe(e){let t=`attachment`,n=e.trim()||t;return/\.(?:jpe?g)$/i.test(n)?n:`${n.replace(/\.[^./\\]+$/,``)||t}.jpg`}async function Ie(e){if(!Pe(e)||await Re(e))return{status:`unchanged`,file:e};if(e.size>104857600)return{status:`failed`,error:`This image is too large to process safely. Please choose a smaller image.`};let t;try{t=await Le(e)}catch{return{status:`failed`,error:`Couldn't resize this image for upload. Try a smaller image.`}}try{let n;try{n=await Be(t,e.size)}catch{n=null}return!n||!Ne(e)&&n.size>=e.size?{status:`failed`,error:`Couldn't resize this image for upload. Try a smaller image.`}:{status:`resized`,file:new File([n],Fe(e.name),{type:`image/jpeg`,lastModified:e.lastModified})}}finally{t.close()}}async function Le(e){if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e,{imageOrientation:`from-image`});return{source:t,width:t.width,height:t.height,close:()=>t.close()}}catch{}if(typeof Image>`u`)throw Error(`No browser image decoder is available.`);let t=URL.createObjectURL(e);return await new Promise((e,n)=>{let r=new Image;r.onload=()=>{e({source:r,width:r.naturalWidth||r.width,height:r.naturalHeight||r.height,close:()=>URL.revokeObjectURL(t)})},r.onerror=()=>{URL.revokeObjectURL(t),n(Error(`Image decode failed.`))},r.src=t})}async function Re(e){if(!ze(e))return!1;let t;try{t=new Uint8Array(await e.slice(0,Math.min(e.size,1024*1024)).arrayBuffer())}catch{return!0}if(!b(t,0,`RIFF`)||!b(t,8,`WEBP`))return!1;let n=y(t,`VP8X`);return n>=0&&(t[n+8]??0)&2?!0:y(t,`ANIM`)>=0||y(t,`ANMF`)>=0}function ze(e){return e.type.trim().toLowerCase()===`image/webp`||/\.webp$/i.test(e.name)}function y(e,t){for(let n=0;n<=e.length-t.length;n+=1)if(b(e,n,t))return n;return-1}function b(e,t,n){if(t+n.length>e.length)return!1;for(let r=0;r<n.length;r+=1)if(e[t+r]!==n.charCodeAt(r))return!1;return!0}async function Be(e,t){let n=e.width*e.height,r=null;if(n<=ke)for(let t of Oe){let n=await S(e.source,e.width,e.height,t);if(r=x(r,n),n&&n.size<=3670016)return n}let i=r?.size??t,a=Math.min(Math.sqrt(De/i*.9),.95);for(let t=0;t<4;t+=1){let t=Math.max(Math.floor(e.width*a),1),n=Math.max(Math.floor(e.height*a),1),o=null;for(let i of Oe){let a=await S(e.source,t,n,i);if(r=x(r,a),o=x(o,a),a&&a.size<=3670016)return a}i=o?.size??i,a*=Math.min(Math.sqrt(De/i*.9),.9)}return null}function x(e,t){return t&&(!e||t.size<e.size)?t:e}async function S(e,t,n,r){if(typeof document>`u`)return null;let i=document.createElement(`canvas`);i.width=t,i.height=n;let a=i.getContext(`2d`);if(!a||typeof i.toBlob!=`function`)return null;a.fillStyle=`#fff`,a.fillRect(0,0,t,n),a.drawImage(e,0,0,t,n);try{return await new Promise(e=>{i.toBlob(t=>e(t),`image/jpeg`,r)})}finally{i.width=0,i.height=0}}var Ve=`vellum:chatDrafts:`;function He(e){return`${Ve}${e}`}function Ue(e){let n=t(He(e),``);if(!n)return new Map;try{let e=JSON.parse(n);return typeof e!=`object`||!e||Array.isArray(e)?new Map:new Map(Object.entries(e).filter(e=>typeof e[1]==`string`))}catch{return new Map}}function C(e,t){n(He(e),JSON.stringify(Object.fromEntries(t)))}function We(){return`att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Ge(e){return v(e)?`100 MB`:`50 MB`}function Ke(e){return e.size<=52428800?!0:v(e)&&e.size<=104857600}function qe(e){let t=e.replace(/[/\\]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n===-1?t:t.slice(n+1)}var w=new Map,T=null,E=new Map,D=new Set,Je=a()((e,t)=>({input:``,restoredDraftConversationId:null,attachments:[],attachmentLastError:null,setInput:t=>{e(e=>({input:typeof t==`function`?t(e.input):t}))},saveDraft:(e,t)=>{t.trim()?w.set(e,t):w.delete(e),T&&C(T,w)},clearDraft:e=>{w.delete(e),T&&C(T,w)},handleConversationSwitch:({previousKey:n,nextKey:r})=>{if(!(n!==null&&n!==r)||!n)return;let i=t().input;i.trim()?w.set(n,i):w.delete(n);let a=(r&&w.get(r))??``;e({input:a,restoredDraftConversationId:a.length>0&&r?r:null}),T&&C(T,w)},loadAssistantDrafts:(n,r)=>{if(T&&T!==n){let n=t().input;r&&(n.trim()?w.set(r,n):w.delete(r)),C(T,w),e({input:``,restoredDraftConversationId:null})}w=Ue(n),T=n},clearRestoredDraftNotice:()=>{e({restoredDraftConversationId:null})},restoreDraftIfEmpty:n=>{let r=w.get(n);r&&r.trim()&&!t().input.trim()&&e({input:r,restoredDraftConversationId:n})},addFiles:(t,n)=>{let r=Array.from(t);if(r.length===0)return;if(!n){e({attachmentLastError:`No active assistant. Please try again.`});return}let i=[],a=[];for(let e of r)Ke(e)?a.push(e):i.push(e);let o=i[0];if(e(o?{attachmentLastError:i.length===1?`${o.name} is larger than ${Ge(o)} and can't be attached.`:`${i.length} files are too large and can't be attached.`}:{attachmentLastError:null}),a.length===0)return;let s=a.map(e=>({pending:{kind:`uploading`,localId:We(),filename:e.name||`attachment`,mimeType:e.type||`application/octet-stream`,sizeBytes:e.size},file:e}));e(e=>({attachments:[...e.attachments,...s.map(e=>e.pending)]}));for(let{pending:t,file:r}of s)(async()=>{try{let i=await Ie(r);if(D.has(t.localId)){D.delete(t.localId);return}if(i.status===`failed`&&r.size>52428800){O(e,t.localId,i.error);return}let a=i.status===`failed`?r:i.file;if(a.size>52428800){O(e,t.localId,`This attachment is still larger than 50 MB after resizing. Try a smaller image.`);return}i.status===`resized`&&e(e=>({attachments:e.attachments.map(e=>e.localId===t.localId&&e.kind===`uploading`?{...e,filename:a.name||`attachment`,mimeType:a.type||`application/octet-stream`,sizeBytes:a.size}:e)}));let o=await ee(n,a);if(D.has(t.localId)){D.delete(t.localId);return}if(!o.ok){O(e,t.localId,o.error.detail??`Upload failed`);return}let s=a.type||`application/octet-stream`,c=o.filename??(a.name||`attachment`),u=o.mimeType??s,te=o.sizeBytes??a.size,d=a;if(u.startsWith(`image/`)&&u!==s){let e=await l(n,o.id);if(D.has(t.localId)){D.delete(t.localId);return}e&&(d=e)}let f=null;try{f=URL.createObjectURL(d),E.set(t.localId,f)}catch{f=null}e(e=>({attachments:e.attachments.map(e=>e.localId===t.localId?{kind:`uploaded`,localId:t.localId,id:o.id,filename:c,mimeType:u,sizeBytes:te,previewUrl:f,thumbnailUrl:null}:e)}))}catch{if(D.has(t.localId)){D.delete(t.localId);return}O(e,t.localId,`Upload failed`)}})()},addPathReferences:t=>{let n=[];for(let e of t){let t=e.trim();t&&n.push({kind:`path-reference`,localId:We(),path:t,filename:qe(t)||t})}n.length!==0&&e(e=>({attachments:[...e.attachments,...n],attachmentLastError:null}))},removeAttachment:t=>{e(e=>{let n=e.attachments.find(e=>e.localId===t);return n&&n.kind===`uploading`&&D.add(t),{attachments:e.attachments.filter(e=>e.localId!==t)}}),Ye(t)},resetAttachments:()=>{e(e=>{for(let t of e.attachments)t.kind===`uploading`&&D.add(t.localId);return{attachments:[],attachmentLastError:null}})},fullReset:()=>{e(e=>{for(let t of e.attachments)t.kind===`uploading`&&D.add(t.localId);return{attachments:[],attachmentLastError:null}}),E.forEach(e=>URL.revokeObjectURL(e)),E.clear()},dismissAttachmentError:()=>{e({attachmentLastError:null})}}));function O(e,t,n){e(e=>({attachments:e.attachments.map(e=>e.localId!==t||e.kind!==`uploading`?e:{kind:`failed`,localId:t,filename:e.filename,mimeType:e.mimeType,sizeBytes:e.sizeBytes,error:n})}))}function Ye(e){let t=E.get(e);t&&(URL.revokeObjectURL(t),E.delete(e))}function Xe(e){return e.reduce((e,t)=>t.kind===`uploading`?e+1:e,0)}function Ze(e){return e.filter(e=>e.kind===`uploaded`).map(e=>e.id)}function Qe(e){return e.filter(e=>e.kind===`path-reference`).map(e=>e.path)}var k=o(Je);function $e(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function et(e){let t=JSON.parse(e);return $e(t)?t:null}function A(e,t){let n=[...e??[]],r=n.findIndex(e=>e.type===`surface`&&e.surface.surfaceId===t.surfaceId);return r===-1?n.push({type:`surface`,surface:t}):n[r]={type:`surface`,surface:t},n}function tt(e,t){return e?.filter(e=>!(e.type===`surface`&&e.surface.surfaceId===t))}function nt(e,t){if(!e.surfaces?.length)return e;let n=!1,r=e.contentBlocks,i=e.surfaces.map(e=>{let i=t(e);return i!==e&&(n=!0,r=A(r,i)),i});return n?{...e,surfaces:i,contentBlocks:r}:e}function j(e,t){if(!e.surfaces?.length)return e;let n=e.surfaces.filter(t);if(n.length===e.surfaces.length)return e;let r=new Set(e.surfaces.filter(e=>!t(e)).map(e=>e.surfaceId));return{...e,surfaces:n,contentOrder:e.contentOrder?.filter(e=>!(e.type===`surface`&&r.has(e.id))),contentBlocks:e.contentBlocks?.filter(e=>!(e.type===`surface`&&r.has(e.surface.surfaceId)))}}var rt=500,it=s({keyFn:e=>`vellum:dismissed-surfaces:${e}`,scope:`user`,parseValue:e=>$e(e)?e:null,fallback:{},maxEntries:200});function at(e,t){let n=it.get(e,t);return n?new Set(n):new Set}function ot(e,t,n){let r=Array.from(n);r.length>rt&&(r=r.slice(r.length-rt)),it.set(e,t,r)}var st=[];function ct(e,t){if(!e)return st;if(t.size===0)return e;let n=!1,r=e.map(e=>{let r=j(e,e=>!t.has(e.surfaceId));return r!==e&&(n=!0),r});return n?r:e}function lt(e){if(!e||typeof e!=`object`)return!1;let t=e;return!(typeof t.tokens!=`number`||!Number.isFinite(t.tokens)||t.maxTokens!==null&&(typeof t.maxTokens!=`number`||!Number.isFinite(t.maxTokens))||t.fillRatio!==null&&(typeof t.fillRatio!=`number`||!Number.isFinite(t.fillRatio)))}var ut=s({keyFn:e=>`vellum:ctxwindow:${e}`,scope:`user`,parseValue:e=>lt(e)?e:null,fallback:{},maxEntries:200});function dt(e){return new Map(Object.entries(ut.load(e)))}function ft(e,t,n){ut.set(e,t,n)}var pt=`PROVIDER_BILLING`,mt=`PROVIDER_NOT_CONFIGURED`,ht=`MANAGED_KEY_INVALID`,gt=`credits_exhausted`,_t=`provider_billing`;function vt(e){return e?.errorCategory?e.errorCategory.endsWith(gt):e?.code===pt}function yt(e){return e?.errorCategory?e.errorCategory.endsWith(_t):!1}function bt(e){return vt(e)?`managed_credits`:yt(e)?`provider_billing`:null}function M(e){return bt(e)!==null||e?.code===mt||e?.displayAs===`modal`}function xt(e){return!!e&&!M(e)}function St(e){return e?.code===ht}var Ct={pendingSecret:null,isSubmittingSecret:!1,secretSaved:!1,pendingConfirmation:null,isSubmittingConfirmation:!1,pendingContactRequest:null,isSubmittingContactRequest:!1,contactRequestAccepted:!1,pendingQuestion:null,isSubmittingQuestion:!1,isQuestionCardDismissed:!1,inlineConfirmationToolCallId:null,unknownNudgeToolCallIds:new Set},N=o(a()((e,t)=>({...Ct,showSecret:n=>{let{pendingSecret:r}=t();if(r&&r.requestId===n.requestId){let t={};for(let e of Object.keys(n))n[e]!==void 0&&(t[e]=n[e]);e({pendingSecret:{...r,...t}});return}e({pendingSecret:n,isSubmittingSecret:!1,secretSaved:!1})},submitSecretStart:()=>e({isSubmittingSecret:!0}),submitSecretEnd:t=>e({isSubmittingSecret:!1,secretSaved:t??!1}),dismissSecret:()=>e({pendingSecret:null,isSubmittingSecret:!1}),updateSecret:(n,r)=>{let{pendingSecret:i}=t();!i||i.requestId!==n||e({pendingSecret:{...i,...r}})},showConfirmation:t=>e({pendingConfirmation:t,isSubmittingConfirmation:!1}),submitConfirmationStart:()=>e({isSubmittingConfirmation:!0}),submitConfirmationEnd:()=>e({isSubmittingConfirmation:!1}),dismissConfirmation:()=>e({pendingConfirmation:null,isSubmittingConfirmation:!1}),dismissConfirmationIfMatches:n=>{let{pendingConfirmation:r}=t();!r||r.requestId!==n||e({pendingConfirmation:null,isSubmittingConfirmation:!1})},updateConfirmation:(n,r)=>{let{pendingConfirmation:i}=t();!i||i.requestId!==n||e({pendingConfirmation:{...i,...r}})},setInlineConfirmationToolCallId:t=>e({inlineConfirmationToolCallId:t}),showContactRequest:t=>e({pendingContactRequest:t,isSubmittingContactRequest:!1,contactRequestAccepted:!1}),submitContactRequestStart:()=>e({isSubmittingContactRequest:!0}),submitContactRequestEnd:()=>e({isSubmittingContactRequest:!1}),dismissContactRequest:()=>e({pendingContactRequest:null,isSubmittingContactRequest:!1}),acceptContactRequest:()=>e({contactRequestAccepted:!0}),showQuestion:t=>e({pendingQuestion:t,isSubmittingQuestion:!1,isQuestionCardDismissed:!1}),submitQuestionStart:()=>e({isSubmittingQuestion:!0}),submitQuestionEnd:()=>e({isSubmittingQuestion:!1}),dismissQuestion:()=>e({pendingQuestion:null,isSubmittingQuestion:!1,isQuestionCardDismissed:!1}),dismissQuestionCard:()=>e({isQuestionCardDismissed:!0}),resetSecretAndConfirmation:()=>e({pendingSecret:null,isSubmittingSecret:!1,secretSaved:!1,pendingConfirmation:null,isSubmittingConfirmation:!1,inlineConfirmationToolCallId:null}),addUnknownNudgeToolCallId:n=>{let r=t().unknownNudgeToolCallIds;r.has(n)||e({unknownNudgeToolCallIds:new Set([...r,n])})},removeUnknownNudgeToolCallId:n=>{let r=t().unknownNudgeToolCallIds;if(!r.has(n))return;let i=new Set(r);i.delete(n),e({unknownNudgeToolCallIds:i})},resetAll:()=>e(Ct)})));function wt(e){if(e.length===0)return``;let t=e[0]??``;for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n][0];r&&i&&r!==` `&&r!==`
2
- `&&r!==` `&&i!==` `&&i!==`
3
- `&&i!==` `&&(t+=` `),t+=e[n]}return t}function P(e){let t=[];for(let n of e?.contentBlocks??[])n.type===`text`&&t.push(n.text);return wt(t)}function Tt(e){if(!(!e||e.length===0))return e.map(e=>{let{previewUrl:t,thumbnailUrl:n}=te(e.mimeType,e.data,e.thumbnailData,e.id!=null);return{id:e.id??e.filename,filename:e.filename,mimeType:e.mimeType,sizeBytes:e.sizeBytes??(e.data?Math.floor(e.data.length*3/4):0),previewUrl:t,thumbnailUrl:n}})}function F(e){let t=e[e.length-1];return!!t&&t.role===`assistant`}function Et(e,t){if(!t)return null;let n=e.length-1;for(;n>=0&&e[n].role===`user`&&e[n].queueStatus===`queued`;)n--;let r=e[n];return!r||r.role!==`assistant`?null:r.id}function I(e,t){return e.findIndex(e=>e.role===`assistant`&&(e.id===t||!!e.mergedMessageIds?.includes(t)))}function L(e,t){if(!t||e.id===t)return e;let n=e.mergedMessageIds??[];return n.includes(t)?e:{...e,mergedMessageIds:[...n,t]}}function R(e,t=Date.now()){if(!e.toolCalls?.some(e=>p(e)))return null;let n=t;return{toolCalls:e.toolCalls.map(e=>p(e)?{...e,completedAt:n}:e),contentBlocks:e.contentBlocks?.map(e=>e.type===`tool_use`&&p(e.toolCall)?{type:`tool_use`,toolCall:{...e.toolCall,completedAt:n}}:e)}}function Dt(e,t,n){return e.map(e=>e.id===t?{...e,queuePosition:n}:e)}function Ot(e,t){return e.map(e=>e.id===t?{...e,queueStatus:void 0,queuePosition:void 0}:e)}function kt(e,t){return e.filter(e=>e.id!==t)}function At(e,t,n,r=Date.now()){return[...e,{id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,textSegments:[t],contentOrder:[{type:`text`,id:`0`}],contentBlocks:[{type:`text`,text:t}],timestamp:r}]}function jt(e,t,n){n&&e[e.length-1]?.type===t.type?e[e.length-1]=t:e.push(t)}function z(e,t,n,r){let i=L(e[t],r),a=[...i.textSegments??[]],o=[...i.contentOrder??[]],s=[...i.contentBlocks??[]],c=o[o.length-1]?.type===`text`&&a.length>0;c?a[a.length-1]=a[a.length-1]+n:(o.push({type:`text`,id:String(a.length)}),a.push(n)),jt(s,{type:`text`,text:a[a.length-1]},c);let l=[...e];return l[t]={...i,textSegments:a,contentOrder:o,contentBlocks:s},l}function B(e,t,n,r){let i=L(e[t],r),a=[...i.thinkingSegments??[]],o=[...i.contentOrder??[]],s=[...i.contentBlocks??[]],c=o[o.length-1]?.type===`thinking`&&a.length>0;c?a[a.length-1]=a[a.length-1]+n:(o.push({type:`thinking`,id:String(a.length)}),a.push(n)),jt(s,{type:`thinking`,thinking:a[a.length-1]},c);let l=[...e];return l[t]={...i,thinkingSegments:a,contentOrder:o,contentBlocks:s},l}function Mt(e,t,n,r,i=Date.now()){if(n){let a=I(e,n);if(a>=0)return z(e,a,t,n);if(F(e))return z(e,e.length-1,t,n);let o=r?.();return o?z([...e,o],e.length,t,n):At(e,t,n,i)}return F(e)?z(e,e.length-1,t,void 0):At(e,t,n,i)}function Nt(e,t,n,r=Date.now()){return[...e,{id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,thinkingSegments:[t],contentOrder:[{type:`thinking`,id:`0`}],contentBlocks:[{type:`thinking`,thinking:t}],timestamp:r}]}function Pt(e,t,n,r,i=Date.now()){if(n){let a=I(e,n);if(a>=0)return B(e,a,t,n);if(F(e))return B(e,e.length-1,t,n);let o=r?.();return o?B([...e,o],e.length,t,n):Nt(e,t,n,i)}return F(e)?B(e,e.length-1,t,void 0):Nt(e,t,n,i)}function Ft(e,t=Date.now()){let n=!1,r=e.map(e=>{if(e.role!==`assistant`)return e;let r=R(e,t);return r?(n=!0,{...e,...r}):e});return n?r:e}function It(e,t,n=Date.now()){let r=e[e.length-1],i=Tt(t.attachments);if(r?.role!==`assistant`)return i?[...e,{id:t.messageId??crypto.randomUUID(),...t.messageId?{}:{isOptimistic:!0},role:`assistant`,timestamp:n,attachments:i}]:e;let a=R(r,n),o=r.isOptimistic===!0&&!!t.messageId;return[...e.slice(0,-1),{...r,...o?{id:t.messageId,isOptimistic:!1}:{},...i?{attachments:i}:{},...a??{}}]}function Lt(e,t){if(t!==void 0)return e.findIndex(e=>e.role===`user`&&e.clientMessageId===t);for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.role===`user`&&n.isOptimistic===!0)return t}return-1}function Rt(e,t,n=Date.now()){let r=t.messageId;if(r!==void 0&&e.some(e=>e.role===`user`&&(e.id===r||e.mergedMessageIds?.includes(r))))return e;let i=Lt(e,t.clientMessageId);if(i!==-1){if(r===void 0)return e;let t=[...e];return t[i]={...t[i],id:r,isOptimistic:!1,queueStatus:void 0,queuePosition:void 0},t}return[...e,{id:r??crypto.randomUUID(),...r===void 0?{isOptimistic:!0}:{},...t.clientMessageId?{clientMessageId:t.clientMessageId}:{},role:`user`,textSegments:[t.text],contentOrder:[{type:`text`,id:`0`}],contentBlocks:[{type:`text`,text:t.text}],timestamp:n}]}function zt(e,t=Date.now()){let n=e.length-1,r=e[n];if(!r||r.role!==`assistant`)return e;let i=R(r,t);if(!(P(r).trim().length>0||r.thinkingSegments!=null&&r.thinkingSegments.length>0||r.toolCalls!=null&&r.toolCalls.length>0||r.surfaces!=null&&r.surfaces.length>0))return e.slice(0,-1);let a=[...e];return a[n]={...r,...i??{}},a}function V(e,t){let n=[...e??[]],r=n.findIndex(e=>e.type===`tool_use`&&e.toolCall.id===t.id);return r===-1?n.push({type:`tool_use`,toolCall:t}):n[r]={type:`tool_use`,toolCall:t},n}function H(e,t,n,r){let i=L(e[t],r),a=i.toolCalls?.findIndex(e=>e.id===n.id)??-1,o=[...e];if(a!==-1){let e=[...i.toolCalls??[]],r={...e[a],...n};return e[a]=r,o[t]={...i,toolCalls:e,contentBlocks:V(i.contentBlocks,r)},o}return o[t]={...i,toolCalls:[...i.toolCalls??[],n],contentOrder:[...i.contentOrder??[],{type:`toolCall`,id:n.id}],contentBlocks:V(i.contentBlocks,n)},o}function Bt(e,t,n,r=Date.now()){if(n){let r=I(e,n);if(r>=0)return H(e,r,t,n);if(F(e))return H(e,e.length-1,t,n)}else if(F(e))return H(e,e.length-1,t);return[...e,{id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,toolCalls:[t],contentOrder:[{type:`toolCall`,id:t.id}],contentBlocks:[{type:`tool_use`,toolCall:t}],timestamp:r}]}function Vt(e,t){let n=-1,r=-1;if(t.toolUseId)for(let i=e.length-1;i>=0;i--){let a=e[i];if(a?.role!==`assistant`||!a.toolCalls?.length)continue;let o=a.toolCalls.findIndex(e=>e.id===t.toolUseId);if(o!==-1){n=i,r=o;break}}if(n===-1){if(n=e.findLastIndex(e=>e.role===`assistant`&&e.toolCalls&&e.toolCalls.length>0),n===-1)return e;let t=e[n];if(!t?.toolCalls)return e;r=t.toolCalls.findLastIndex(e=>p(e))}if(r===-1)return e;let i=e[n],a=i.toolCalls[r];if(!a)return e;let o=t.imageDataList===void 0?t.imageData===void 0?void 0:[t.imageData]:t.imageDataList,s=t.imageData===void 0?o?.[0]:t.imageData,c=[...i.toolCalls],l={...a,result:t.result,isError:t.isError,riskLevel:t.riskLevel,riskReason:t.riskReason,matchedTrustRuleId:t.matchedTrustRuleId,approvalMode:t.approvalMode,approvalReason:t.approvalReason,riskThreshold:t.riskThreshold,riskAllowlistOptions:t.riskAllowlistOptions,riskScopeOptions:t.riskScopeOptions,riskDirectoryScopeOptions:t.riskDirectoryScopeOptions,...s===void 0?{}:{imageData:s},...o===void 0?{}:{imageDataList:o},...t.activityMetadata===void 0?{}:{activityMetadata:t.activityMetadata},completedAt:t.completedAt??Date.now(),streamedOutput:void 0};c[r]=l;let u=[...e];return u[n]={...i,toolCalls:c,contentBlocks:V(i.contentBlocks,l)},u}var Ht=16384;function Ut(e){return e.length<=16384?e:e.slice(e.length-Ht)}function Wt(e,t){if(!t.chunk)return e;let n=-1,r=-1;if(t.toolUseId){if(t.messageId){let i=I(e,t.messageId);if(i>=0){let a=e[i].toolCalls?.findIndex(e=>e.id===t.toolUseId)??-1;a!==-1&&(n=i,r=a)}}if(n===-1)for(let i=e.length-1;i>=0;i--){let a=e[i];if(a?.role!==`assistant`||!a.toolCalls?.length)continue;let o=a.toolCalls.findIndex(e=>e.id===t.toolUseId);if(o!==-1){n=i,r=o;break}}}else{if(n=e.findLastIndex(e=>e.role===`assistant`&&e.toolCalls&&e.toolCalls.length>0),n===-1)return e;let t=e[n];if(!t?.toolCalls)return e;r=t.toolCalls.findLastIndex(e=>p(e))}if(n===-1||r===-1)return e;let i=e[n],a=i.toolCalls[r];if(!a)return e;let o={...a,streamedOutput:Ut((a.streamedOutput??``)+t.chunk)},s=[...i.toolCalls];s[r]=o;let c=[...e];return c[n]={...i,toolCalls:s,contentBlocks:V(i.contentBlocks,o)},c}function Gt(e,t,n,r=Date.now()){let i=-1;if(n&&(i=I(e,n)),i===-1){for(let t=e.length-1;t>=0;t--)if(e[t]?.role===`assistant`){i=t;break}}let a=[...e];if(i===-1)a.push({id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,surfaces:[t],contentOrder:[{type:`surface`,id:t.surfaceId}],contentBlocks:[{type:`surface`,surface:t}],timestamp:r});else{let r=L(e[i],n);if(r.contentOrder?.some(e=>e.type===`surface`&&e.id===t.surfaceId)||r.surfaces?.some(e=>e.surfaceId===t.surfaceId))return e;a[i]={...r,surfaces:[...r.surfaces??[],t],contentOrder:[...r.contentOrder??[],{type:`surface`,id:t.surfaceId}],contentBlocks:A(r.contentBlocks,t)}}return a}function Kt(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r],a=i.surfaces?.findIndex(e=>e.surfaceId===t)??-1;if(a===-1)continue;let o=i.surfaces[a],s={...o.data,...n};o.data.templateData&&n.templateData&&typeof o.data.templateData==`object`&&typeof n.templateData==`object`&&(s.templateData={...o.data.templateData,...n.templateData});let c={...o,data:s},l=[...e],u=[...i.surfaces];return u[a]=c,l[r]={...i,surfaces:u,contentBlocks:A(i.contentBlocks,c)},l}return e}function qt(e,t){for(let n=e.length-1;n>=0;n--){if(!e[n].surfaces?.some(e=>e.surfaceId===t))continue;let r=[...e];return r[n]={...e[n],surfaces:e[n].surfaces?.filter(e=>e.surfaceId!==t),contentOrder:e[n].contentOrder?.filter(e=>!(e.type===`surface`&&e.id===t)),contentBlocks:tt(e[n].contentBlocks,t)},r}return e}function Jt(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r].surfaces?.find(e=>e.surfaceId===t);if(!i)continue;let a={...i,completed:!0,completionSummary:n},o=[...e];return o[r]={...e[r],surfaces:e[r].surfaces?.map(e=>e.surfaceId===t?a:e),contentBlocks:A(e[r].contentBlocks,a)},o}return e}var Yt=[`choice`,`oauth_connect`,`form`,`confirmation`,`file_upload`,`card`,`list`,`table`,`browser_view`,`task_preferences`];function Xt(e){return e==null||e.hasPendingConfirmation||e.hasUncompletedVisibleSurface}function Zt(e,t){let n=!1,r=e.map(e=>{let r=re(e,e=>e.pendingConfirmation?.requestId===t?{...e,pendingConfirmation:void 0}:e);return r!==e&&(n=!0),r});return n?r:e}function Qt(e){let t=!1,n=e.map(e=>{let n=re(e,e=>e.pendingConfirmation?{...e,pendingConfirmation:void 0}:e);return n!==e&&(t=!0),n});return t?n:e}function $t(e,t){let n=new Set;for(let e of t)if(e.surfaces)for(let t of e.surfaces)ie(t)&&n.add(t.surfaceId);return n.size===0?{updatedMessages:e,dismissedIds:n}:{updatedMessages:e.map(e=>j(e,e=>!n.has(e.surfaceId))),dismissedIds:n}}function en(e,t,n,r){for(let i=e.length-1;i>=0;i--){let a=e[i].surfaces?.find(e=>e.surfaceId===t);if(!a)continue;if(!Yt.includes(a.surfaceType))return e;let o=a.actions?.find(e=>e.id===n),s=n===`cancel`||n===`dismiss`||o?.style===`secondary`,c=[...e];return c[i]=nt(e[i],e=>e.surfaceId===t?{...e,completed:!0,completionSummary:s?`Cancelled`:r??o?.label??void 0}:e),c}return e}function tn(e,t,n){return e&&ne[e]||t||n}function U(e){return typeof e==`string`?e:void 0}function nn(e){return typeof e==`boolean`?e:void 0}function rn(e){return Array.isArray(e)?e:void 0}function an(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function W(e){return Array.isArray(e)?e:void 0}function on(e){return{requestId:typeof e.requestId==`string`?e.requestId:``,label:U(e.label),service:U(e.service),field:U(e.field),description:U(e.description),placeholder:U(e.placeholder),allowOneTimeSend:nn(e.allowOneTimeSend),allowedTools:rn(e.allowedTools),allowedDomains:rn(e.allowedDomains),purpose:U(e.purpose)}}function sn(e){let t={requestId:typeof e.requestId==`string`?e.requestId:``,title:U(e.title),description:U(e.description),toolName:U(e.toolName),riskLevel:U(e.riskLevel),riskReason:U(e.riskReason),allowlistOptions:W(e.allowlistOptions),scopeOptions:W(e.scopeOptions),directoryScopeOptions:W(e.directoryScopeOptions),persistentDecisionsAllowed:nn(e.persistentDecisionsAllowed),input:an(e.input),toolUseId:U(e.toolUseId)};return{confData:t,state:{...t,confirmLabel:U(e.confirmLabel),denyLabel:U(e.denyLabel)}}}function cn(){return`turn-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function ln(e,t){let n=Date.parse(e);return Number.isFinite(n)?n:typeof t==`number`?t:0}function un(e,t,n){switch(t.type){case`assistant_text_delta`:return Mt(e,t.text,t.messageId,void 0,n);case`assistant_thinking_delta`:return Pt(e,t.thinking,t.messageId,void 0,n);case`message_complete`:return It(e,t,n);case`user_message_echo`:return Rt(e,{text:t.text,messageId:t.messageId,clientMessageId:t.clientMessageId},n);case`assistant_activity_state`:return t.phase===`idle`?Ft(e,n):e;case`conversation_error`:return zt(e,n);case`tool_use_preview_start`:return Bt(e,{id:t.toolUseId,name:t.toolName,input:{},previewStartedAt:typeof t.previewStartedAt==`number`?t.previewStartedAt:n},t.messageId,n);case`tool_use_start`:return Bt(e,{id:t.toolUseId??`tool-${n}`,name:t.toolName,input:t.input,startedAt:`startedAt`in t&&typeof t.startedAt==`number`?t.startedAt:n,...`previewStartedAt`in t&&typeof t.previewStartedAt==`number`?{previewStartedAt:t.previewStartedAt}:{}},t.messageId,n);case`tool_result`:return Vt(e,{toolUseId:t.toolUseId,result:t.result,isError:t.isError,riskLevel:t.riskLevel,riskReason:t.riskReason,matchedTrustRuleId:t.matchedTrustRuleId,approvalMode:t.approvalMode,approvalReason:t.approvalReason,riskThreshold:t.riskThreshold,riskAllowlistOptions:t.riskAllowlistOptions,riskScopeOptions:t.riskScopeOptions,riskDirectoryScopeOptions:t.riskDirectoryScopeOptions,imageData:t.imageData,imageDataList:t.imageDataList,activityMetadata:t.activityMetadata,completedAt:`completedAt`in t&&typeof t.completedAt==`number`?t.completedAt:n});case`tool_output_chunk`:return t.chunk?Wt(e,{chunk:t.chunk,toolUseId:t.toolUseId,messageId:t.messageId}):e;case`ui_surface_show`:{let r={surfaceId:t.surfaceId,surfaceType:t.surfaceType,title:t.title,data:t.data,actions:t.actions,display:t.display};return r.display=d(r),Gt(e,r,t.messageId,n)}case`ui_surface_update`:return Kt(e,t.surfaceId,t.data);case`ui_surface_dismiss`:return qt(e,t.surfaceId);case`ui_surface_complete`:return Jt(e,t.surfaceId,t.summary);case`confirmation_request`:return f(e,{requestId:t.requestId,toolName:t.toolName,riskLevel:t.riskLevel,riskReason:t.riskReason,allowlistOptions:t.allowlistOptions,scopeOptions:t.scopeOptions,directoryScopeOptions:t.directoryScopeOptions,persistentDecisionsAllowed:t.persistentDecisionsAllowed,input:t.input,toolUseId:t.toolUseId}).updatedMessages;case`interaction_resolved`:return t.kind===`confirmation`||t.kind===`acp_confirmation`?Zt(e,t.requestId):e;default:return e}}function dn(e,t,n){if(e!==void 0){if(typeof n!=`number`)return e;switch(t.type){case`assistant_turn_start`:case`assistant_text_delta`:case`assistant_thinking_delta`:return!0;case`assistant_activity_state`:return t.phase!==`idle`;case`message_complete`:return!1;default:return e}}}function fn(e,t){let{seq:n}=t;if(typeof n==`number`&&typeof e.seq==`number`&&n<=e.seq)return e;let r=ln(t.emittedAt,n),i=un(e.messages,t.message,r),a=typeof n==`number`?Math.max(e.seq??-1,n):e.seq??null,o=dn(e.processing,t.message,n);return{...e,messages:i,seq:a,processing:o}}function pn(e,t){return t.reduce(fn,e)}function mn(e,t){return t===null?e:pn(e,t)}function hn(e){return[...new Set([e.id,...e.mergedMessageIds??[]].filter(e=>typeof e==`string`&&e.length>0))]}function G(e){let t=hn(e);return e.clientMessageId&&!t.includes(e.clientMessageId)?[...t,e.clientMessageId]:t}var gn={hasMore:!1,oldestTimestamp:null,isLoadingOlder:!1};function _n(){return{snapshot:null,optimisticSends:[],error:null,notice:null,isLoadingHistory:!0,transcriptPagination:{...gn},contextWindowUsage:null,ephemeralMetaResults:[],compactionCircuitOpenUntil:null,dismissedSurfaceIds:new Set,streamingMessageIds:new Set,pendingQueuedMessageIds:[],requestIdToMessageId:new Map,pendingLocalDeletions:new Set,confirmationToolCallMap:new Map,expandedToolCallIds:new Set,expandedCardIds:new Map,contextWindowUsageByConversation:new Map,previousConversationId:null,previousAssistantId:null,draftConversationIdResolution:!1}}function K(e,t){return typeof t==`function`?t(e):t}function vn(e,t){if(e.length===0)return e;let n=new Map;for(let e of t)for(let t of G(e))n.has(t)||n.set(t,e);let r=e.filter(e=>{let t;for(let r of G(e))if(t=n.get(r),t)break;return t?!!e.attachments?.length&&!t.attachments?.length:!0});return r.length===e.length?e:r}var q=o(a()((e,t)=>({..._n(),seedSnapshot:(n,r)=>{let i=t().snapshot;if(r.seq==null&&i!==null&&typeof i.seq==`number`){c(`history_seed_skipped_anchorless`,{conversationId:n,liveSeq:i.seq});return}let a=be(n,r.seq??null);if(a===null&&i!==null&&typeof i.seq==`number`&&typeof r.seq==`number`&&r.seq<i.seq){c(`history_seed_skipped_stale_anchor`,{conversationId:n,liveSeq:i.seq,fetchedSeq:r.seq});return}let o=mn(r,a);e(e=>({snapshot:o,optimisticSends:vn(e.optimisticSends,o.messages)}))},applyEnvelopeToSnapshot:t=>e(e=>e.snapshot?{snapshot:fn(e.snapshot,t)}:{}),addOptimisticSend:t=>e(e=>({optimisticSends:[...e.optimisticSends,t]})),setOptimisticSends:t=>e(e=>({optimisticSends:K(e.optimisticSends,t)})),patchSnapshotMessages:t=>e(e=>e.snapshot?{snapshot:{...e.snapshot,messages:t(e.snapshot.messages)}}:{}),setError:t=>e(e=>({error:K(e.error,t)})),setNotice:t=>e(e=>({notice:K(e.notice,t)})),setIsLoadingHistory:t=>e({isLoadingHistory:t}),setTranscriptPagination:t=>e(e=>({transcriptPagination:K(e.transcriptPagination,t)})),setContextWindowUsage:t=>e(e=>({contextWindowUsage:K(e.contextWindowUsage,t)})),setCompactionCircuitOpenUntil:t=>e(e=>({compactionCircuitOpenUntil:K(e.compactionCircuitOpenUntil,t)})),switchToConversation:({assistantId:n,activeConversationId:r})=>{let i=t();if(i.draftConversationIdResolution){e({draftConversationIdResolution:!1});return}let a=i.previousConversationId;if(a&&a!==r&&a){let e=N.getState();(e.pendingSecret||e.pendingConfirmation)&&u.getState().addAttentionConversationId(a)}let o=i.previousAssistantId!==null&&i.previousAssistantId!==n,s=o||i.previousAssistantId===null;c(`conversation_switch_reset`,{assistantId:n,conversationId:r,outgoingConversationId:a??null}),k.getState().handleConversationSwitch({previousKey:a??null,nextKey:r}),Ee.getState().resetTurn(),N.getState().resetAll(),o?k.getState().fullReset():k.getState().resetAttachments();let l=s?dt(n):i.contextWindowUsageByConversation;e({snapshot:null,optimisticSends:[],ephemeralMetaResults:[],error:M(i.error)?i.error:null,notice:null,isLoadingHistory:!0,transcriptPagination:{...gn},contextWindowUsage:l.get(r)??null,compactionCircuitOpenUntil:null,dismissedSurfaceIds:at(n,r),streamingMessageIds:new Set,pendingQueuedMessageIds:[],requestIdToMessageId:new Map,pendingLocalDeletions:new Set,confirmationToolCallMap:new Map,expandedToolCallIds:new Set,expandedCardIds:new Map,contextWindowUsageByConversation:l,previousConversationId:r,previousAssistantId:n,draftConversationIdResolution:!1})},markDraftResolution:()=>e({draftConversationIdResolution:!0}),setConfirmationToolCall:(t,n)=>e(e=>{let r=new Map(e.confirmationToolCallMap);return r.set(t,n),{confirmationToolCallMap:r}}),deleteConfirmationToolCall:t=>e(e=>{let n=new Map(e.confirmationToolCallMap);return n.delete(t),{confirmationToolCallMap:n}}),clearConfirmationToolCallMap:()=>e({confirmationToolCallMap:new Map}),addDismissedSurfaceId:t=>e(e=>{let n=new Set(e.dismissedSurfaceIds);return n.add(t),{dismissedSurfaceIds:n}}),addDismissedSurfaceIds:t=>e(e=>{let n=new Set(e.dismissedSurfaceIds);for(let e of t)n.add(e);return{dismissedSurfaceIds:n}}),batchUpdateStreamingMessageIds:(t,n)=>e(e=>{let r=new Set(e.streamingMessageIds);for(let e of t)r.add(e);for(let e of n)r.delete(e);return{streamingMessageIds:r}}),pushPendingQueuedMessageId:t=>e(e=>({pendingQueuedMessageIds:[...e.pendingQueuedMessageIds,t]})),shiftPendingQueuedMessageId:()=>{let n=t().pendingQueuedMessageIds;if(n.length===0)return;let[r,...i]=n;return e({pendingQueuedMessageIds:i}),r},setRequestIdMapping:(t,n)=>e(e=>{let r=new Map(e.requestIdToMessageId);return r.set(t,n),{requestIdToMessageId:r}}),popRequestIdMapping:n=>{let r=t().requestIdToMessageId,i=r.get(n);if(i!==void 0){let t=new Map(r);t.delete(n),e({requestIdToMessageId:t})}return i},addPendingLocalDeletion:t=>e(e=>{let n=new Set(e.pendingLocalDeletions);return n.add(t),{pendingLocalDeletions:n}}),consumePendingLocalDeletion:n=>{let r=t().pendingLocalDeletions;if(!r.has(n))return!1;let i=new Set(r);return i.delete(n),e({pendingLocalDeletions:i}),!0},setExpandedToolCallId:(t,n)=>e(e=>{let r=new Set(e.expandedToolCallIds);return n?r.add(t):r.delete(t),{expandedToolCallIds:r}}),setExpandedCardId:(t,n)=>e(e=>{let r=new Map(e.expandedCardIds);return r.set(t,n),{expandedCardIds:r}}),setContextWindowUsageForConversation:(t,n)=>e(e=>{let r=new Map(e.contextWindowUsageByConversation);return r.set(t,n),{contextWindowUsageByConversation:r}}),addEphemeralMetaResult:t=>e(e=>({ephemeralMetaResults:[...e.ephemeralMetaResults,t]})),clearEphemeralMetaResults:()=>e(e=>e.ephemeralMetaResults.length===0?e:{ephemeralMetaResults:[]})})));function J(e,t){if(t.length===0)return e;let n=new Map;for(let e of t)for(let t of G(e))n.has(t)||n.set(t,e);let r=[],i=new Set;for(let t of e){let e;for(let r of G(t)){let t=n.get(r);if(t){e=t;break}}if(e){i.has(e)||(r.push(e),i.add(e));continue}r.push(t)}for(let e of t)i.has(e)||r.push(e);return r}function yn(){let e=q.use.snapshot(),t=q.use.optimisticSends(),n=q.use.dismissedSurfaceIds();return(0,le.useMemo)(()=>J(ct(e?.messages,n),t),[e,t,n])}function Y(e,t,n=`…`){return e.length<=t?e:e.slice(0,t-n.length)+n}function bn(e){if(!e)return null;let t=e.split(`/`),n=t[t.length-1];return!n||n===`.`?null:n}function X(e,t){return Y(e,t,`...`)}function xn(e){if(!e)return null;let t=e.replace(/\s+/g,` `).trim().match(/(?:^|&&\s*|\|\|\s*|;\s*)(?:\S*\/)?assistant\s+browser\s+([^\s;&|]+)/i);if(!t)return null;let n=t[1].toLowerCase();return new Set([`navigate`,`click`,`type`,`screenshot`,`snapshot`,`scroll`,`hover`,`select`,`drag`,`wait`,`back`,`forward`,`refresh`,`close`,`tab`,`press_key`,`wait_for`,`extract`,`fill_credential`]).has(n)?n:`unknown`}function Z(e,t){let n=e.toLowerCase();return n!==`bash`&&n!==`host_bash`?null:xn(t)}function Sn(e){switch(e){case`navigate`:return`Opened a page`;case`click`:return`Clicked on the page`;case`type`:return`Typed on the page`;case`screenshot`:return`Took a screenshot`;case`snapshot`:return`Captured page snapshot`;case`scroll`:return`Scrolled the page`;case`hover`:return`Hovered on the page`;case`select`:return`Selected on the page`;case`drag`:return`Dragged on the page`;case`wait`:return`Waited for the page`;case`back`:return`Went back`;case`forward`:return`Went forward`;case`refresh`:return`Refreshed the page`;case`close`:return`Closed the tab`;case`tab`:return`Switched tabs`;case`press_key`:return`Pressed a key`;case`wait_for`:return`Waited for a condition`;case`extract`:return`Extracted page content`;case`fill_credential`:return`Filled a credential`;case`unknown`:return`Used the browser`}}function Cn(e){switch(e){case`navigate`:return`Opening a page`;case`click`:return`Clicking on the page`;case`type`:return`Typing on the page`;case`screenshot`:return`Taking a screenshot`;case`snapshot`:return`Capturing page snapshot`;case`scroll`:return`Scrolling the page`;case`hover`:return`Hovering on the page`;case`select`:return`Selecting on the page`;case`drag`:return`Dragging on the page`;case`wait`:return`Waiting for the page`;case`back`:return`Going back`;case`forward`:return`Going forward`;case`refresh`:return`Refreshing the page`;case`close`:return`Closing the tab`;case`tab`:return`Switching tabs`;case`press_key`:return`Pressing a key`;case`wait_for`:return`Waiting for a condition`;case`extract`:return`Extracting page content`;case`fill_credential`:return`Filling a credential`;case`unknown`:return`Using the browser`}}function wn(e){switch(e){case`navigate`:case`back`:case`forward`:case`tab`:return`compass`;case`click`:case`hover`:case`select`:case`drag`:case`scroll`:return`compass`;case`screenshot`:case`snapshot`:return`camera`;case`type`:case`press_key`:case`fill_credential`:return`compass`;case`wait`:case`wait_for`:case`refresh`:case`close`:return`compass`;case`extract`:return`compass`;case`unknown`:return`compass`}}function Tn(e,t){let n=e.toLowerCase();if(n===`bash`||n===`host_bash`){let e=t.command??t.cmd;if(typeof e==`string`)return e.replace(/\s+/g,` `).trim()}if(n===`file_read`||n===`host_file_read`||n===`file_write`||n===`host_file_write`||n===`file_edit`||n===`host_file_edit`){let e=t.file_path??t.path??t.filePath;if(typeof e==`string`)return e}if(n===`grep`||n===`glob`){let e=t.pattern??t.query;if(typeof e==`string`)return e}if(n===`web_search`){let e=t.query??t.search;if(typeof e==`string`)return e}return``}function En(e,t=``){let n=e.toLowerCase(),r=t.replace(/\s+/g,` `).trim(),i=bn(r),a=Z(e,r);if(a)return Sn(a);switch(n){case`bash`:case`host_bash`:return r?`Ran \`${X(r,30)}\``:`Ran a command`;case`file_read`:case`host_file_read`:return i?`Read ${i}`:`Read a file`;case`file_write`:case`host_file_write`:return i?`Wrote ${i}`:`Wrote a file`;case`file_edit`:case`host_file_edit`:return i?`Edited ${i}`:`Edited a file`;case`grep`:return r?`Searched for '${X(r,25)}'`:`Searched files`;case`glob`:return r?`Searched for ${X(r,25)}`:`Found files`;case`web_search`:return r?`Searched '${X(r,25)}'`:`Searched the web`;case`web_fetch`:return`Fetched a webpage`;default:return`Used ${e.replace(/_/g,` `)}`}}function Dn(e,t=``,n){let r=Z(e,t);if(r)return Cn(r);if(n){let t=e.toLowerCase();if(t===`app_create`||t===`app_refresh`||t===`app_update`)return n}switch(e.toLowerCase()){case`bash`:case`host_bash`:return`Running a command`;case`file_read`:case`host_file_read`:return`Reading a file`;case`file_write`:case`host_file_write`:return`Writing a file`;case`file_edit`:case`host_file_edit`:return`Editing a file`;case`grep`:return`Searching files`;case`glob`:return`Finding files`;case`web_search`:return`Searching the web`;case`web_fetch`:return`Fetching a webpage`;case`app_create`:return`Building your app`;case`app_refresh`:case`app_update`:return`Refreshing your app`;default:return`Running ${e.replace(/_/g,` `)}`}}function On(e){return e.split(/[_-]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function kn(e,t=``){let n=Z(e,t);if(n)return wn(n);switch(e.toLowerCase()){case`bash`:case`host_bash`:return`terminal`;case`file_read`:case`host_file_read`:return`file-text`;case`file_write`:case`host_file_write`:return`file-plus`;case`file_edit`:case`host_file_edit`:return`pencil`;case`grep`:case`glob`:case`web_search`:return`search`;case`web_fetch`:return`globe`;default:return`wrench`}}var An=80;function Q(e,...t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim().length>0)return t}return``}function jn(e){if(!e)return``;let t=e.replace(/\/+$/,``),n=t.lastIndexOf(`/`);return n===-1?t:t.slice(n+1)}function Mn(e){if(!e.startsWith(`mcp__`))return null;let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return null;let r=t.slice(0,n),i=t.slice(n+2);return!r||!i?null:{serverName:r,toolMethod:i}}function $(e,t){let n=t&&typeof t==`object`?t:{},r=e.toLowerCase(),i=Q(n,`activity`,`reason`),a=Mn(e);if(a)return{title:`Using ${a.serverName}`,info:a.toolMethod,activity:i,iconName:`plug`};switch(r){case`bash`:case`host_bash`:return{title:`Working`,info:Y(Q(n,`command`,`cmd`).replace(/\s+/g,` `).trim(),An),activity:i,iconName:`terminal`};case`str_replace_editor`:case`text_editor`:{let e=Q(n,`command`).toLowerCase(),t=jn(Q(n,`path`,`file_path`,`filePath`));return e===`view`?{title:`Reading`,info:t,activity:i,iconName:`file`}:{title:`Editing`,info:t,activity:i,iconName:`pen`}}case`computer`:return{title:`Using computer`,info:Q(n,`action`),activity:i,iconName:`monitor`};case`skill_execute`:{let e=Q(n,`tool`);if(e){let t=n.input,r=$(e,t);return{...r,activity:i||r.activity}}return{title:`Using a skill`,info:Q(n,`skill`,`name`,`skillName`),activity:i,iconName:`sparkle`}}case`skill`:case`skill_invoke`:case`skill_load`:return{title:`Using a skill`,info:Q(n,`skill`,`name`,`skillName`),activity:i,iconName:`sparkle`};case`subagent_spawn`:return{title:`Spawning subagent`,info:Q(n,`label`,`objective`,`task`),activity:i,iconName:`user-plus`};default:return{title:e?`Running ${On(e)}`:`Running tool`,info:``,activity:i,iconName:`bolt`}}}function Nn(e){return $(e.name,e.input)}var Pn=[{open:`<thinking>`,close:`</thinking>`},{open:`<think>`,close:`</think>`}];function Fn(e){return Pn.some(t=>e.includes(t.open))}function In(e){if(!Fn(e))return null;let t=[],n=e=>{e.trim()&&t.push({type:`text`,text:e})},r=e=>{let n=e.trim();n&&t.push({type:`thinking`,thinking:n})},i=0;for(;;){let a=-1,o;for(let t of Pn){let n=e.indexOf(t.open,i);n!==-1&&(a===-1||n<a)&&(a=n,o=t)}if(!o)break;n(e.slice(i,a));let s=a+o.open.length,c=e.indexOf(o.close,s);if(c===-1)return r(e.slice(s)),t;r(e.slice(s,c)),i=c+o.close.length}return n(e.slice(i)),t}function Ln(e){return typeof e.id==`string`&&e.id.length>0}function Rn(e){return e.some(e=>e.type===`text`&&Fn(e.text))?e.flatMap(e=>{let t=e.type===`text`?In(e.text):null;return t?t.map(e=>e.type===`thinking`?{type:`thinking`,thinking:e.thinking}:{type:`text`,text:e.text}):[e]}):e}function zn(e,t){let n=t?.splitInlineThinking?Rn(e):e,r=[],i=null,a=()=>(i||(i={type:`activity`,items:[]},r.push(i)),i);for(let e of n)if(e.type===`thinking`){let t=a(),n=t.items[t.items.length-1];n?.type===`thinking`?(n.thinking=n.thinking?`${n.thinking}\n${e.thinking}`:e.thinking,e.startedAt!=null&&(n.startedAt=n.startedAt==null?e.startedAt:Math.min(n.startedAt,e.startedAt)),e.completedAt!=null&&(n.completedAt=n.completedAt==null?e.completedAt:Math.max(n.completedAt,e.completedAt))):t.items.push({type:`thinking`,thinking:e.thinking,startedAt:e.startedAt,completedAt:e.completedAt})}else if(e.type===`tool_use`){if(!Ln(e.toolCall))continue;a().items.push({type:`tool_use`,toolCall:e.toolCall})}else (e.type===`text`||e.type===`surface`)&&(i=null,r.push(e));return r}function Bn(e){let t=[],n=[];for(let r of e){if(r.type===`thinking`){r.thinking&&t.push({kind:`thinking`,text:r.thinking,startedAt:r.startedAt,completedAt:r.completedAt});continue}let e=r.toolCall;Vn(e)||(n.push(e),t.push({kind:`toolCall`,toolCall:e}))}return{cardItems:t,toolCalls:n}}function Vn(e){return!e.pendingConfirmation&&(e.name===`ui_show`||e.name===`ui_update`||e.name===`ui_dismiss`)}function Hn(e){if(e.name===`subagent_spawn`)return!0;if(e.name!==`skill_execute`)return!1;let t=e.input;return typeof t!=`object`||!t?!1:t.tool===`subagent_spawn`}function Un(e){if(e.name===`run_workflow`)return!0;if(e.name!==`skill_execute`)return!1;let t=e.input;return typeof t!=`object`||!t?!1:t.tool===`run_workflow`}function Wn(e){if(e.name===`acp_spawn`)return!0;if(e.name!==`skill_execute`)return!1;let t=e.input;return typeof t!=`object`||!t?!1:t.tool===`acp_spawn`}function Gn(e){if(e.name!==`bash`&&e.name!==`host_bash`)return!1;let t=e.input;return typeof t!=`object`||!t?!1:t.background===!0}var Kn=new Set([`low`,`medium`,`high`]);function qn(e){let t=e?.toLowerCase();return t&&Kn.has(t)?t:`medium`}function Jn(e){switch(e?.toLowerCase()){case`low`:return{bg:`bg-[var(--system-positive-strong)]`,text:`text-white`,label:`Low`};case`medium`:return{bg:`bg-[var(--system-mid-strong)]`,text:`text-black`,label:`Medium`};case`high`:return{bg:`bg-[var(--system-negative-strong)]`,text:`text-white`,label:`High`};case`workspace`:return{bg:`bg-[var(--surface-lift)]`,text:`text-[var(--content-secondary)]`,border:`border border-[var(--border-element)]`,label:`Workspace`};default:return{bg:`bg-[var(--content-secondary)]`,text:`text-white`,label:e??`Unknown`}}}function Yn(e){switch(e?.toLowerCase()){case`low`:return`Auto-approved at Conservative tolerance or higher`;case`medium`:return`Auto-approved at Relaxed tolerance or higher`;case`high`:return`Auto-approved only at Full Access tolerance`;default:return}}function Xn(e){switch(e?.toLowerCase()){case`low`:return{bg:`bg-[var(--system-positive-weak)]`,text:`text-[var(--system-positive-strong)]`,label:`Low`};case`medium`:return{bg:`bg-[var(--system-mid-weak)]`,text:`text-[var(--system-mid-strong)]`,label:`Medium`};case`high`:return{bg:`bg-[var(--system-negative-weak)]`,text:`text-[var(--system-negative-strong)]`,label:`High`};case`workspace`:return{bg:`bg-[var(--surface-lift)]`,text:`text-[var(--content-secondary)]`,label:`Workspace`};default:return{bg:`bg-[var(--surface-lift)]`,text:`text-[var(--content-secondary)]`,label:e?e.charAt(0).toUpperCase()+e.slice(1):`Unknown`}}}var Zn={unknown:2,low:0,medium:1,high:2},Qn={none:-1,low:0,medium:1,high:2};function $n(e,t,n){return e?.toLowerCase()!==`auto`||!n?!0:(Zn[(t??``).toLowerCase()]??-1)<=(Qn[n.toLowerCase()]??-1)}function er(e){switch(e){case`trust_rule_allowed`:return`· Auto-approved · Trust rule matched`;case`sandbox_auto_approve`:return null;case`platform_auto_approve`:return`· Auto-approved · Platform session`;default:return null}}function tr(e,t){return e===`sandbox_auto_approve`?{displayLevel:`workspace`,inherentRisk:t}:{displayLevel:t??`unknown`}}export{Ze as $,$t as A,F as B,J as C,Zt as D,G as E,Xt as F,xt as G,N as H,Ot as I,ot as J,M as K,Et as L,sn as M,on as N,Qt as O,tn as P,Qe as Q,kt as R,yn as S,hn as T,bt as U,P as V,St as W,nt as X,j as Y,et as Z,Dn as _,Yn as a,xe as at,On as b,Bn as c,_e as ct,Gn as d,me as dt,Xe as et,Un as f,fe as ft,Tn as g,ae as gt,$ as h,oe as ht,Xn as i,Ee as it,cn as j,en as k,zn as l,pe as lt,Nn as m,se as mt,er as n,we as nt,qn as o,ve as ot,Hn as p,ce as pt,ft as q,Jn as r,Te as rt,$n as s,ye as st,tr as t,k as tt,Wn as u,he as ut,kn as v,q as w,Y as x,En as y,Dt as z};
@@ -1 +0,0 @@
1
- import{t as e}from"./is-electron-y5bNUVyG.js";var t=e=>e,n=(e,t)=>`${e}/${t}`,r=t(`/assistant/logs/usage`),i=`message`,a={assistant:t(`/assistant`),about:t(`/assistant/about`),bundleConfirm:t(`/assistant/bundle/confirm`),remotePair:t(`/assistant/pair`),credentialEntry:t(`/assistant/credentials/enter`),quickInput:t(`/assistant/quick-input`),conversations:t(`/assistant/conversations`),conversation:e=>n(t(`/assistant/conversations`),e),conversationAtMessage:(e,r)=>`${n(t(`/assistant/conversations`),e)}?${i}=${encodeURIComponent(r)}`,conversationWithPrompt:(e,r,i)=>{let a=`${n(t(`/assistant/conversations`),e)}?prompt=${encodeURIComponent(r)}`;return i?`${a}&relay=${encodeURIComponent(i)}`:a},inspect:e=>`${n(t(`/assistant/conversations`),e)}/inspect`,logs:{root:t(`/assistant/logs`),usage:r,usageForSchedule:e=>`${r}?${new URLSearchParams({range:`7d`,groupBy:`schedule`,scheduleId:e}).toString()}`,emails:t(`/assistant/logs/emails`),systemEvents:t(`/assistant/logs/system-events`)},account:{root:t(`/account`),login:t(`/account/login`),signup:t(`/account/signup`),providerSignup:t(`/account/provider/signup`),providerCallback:t(`/account/provider/callback`),oauth:{popupComplete:t(`/account/oauth/popup-complete`),complete:t(`/account/oauth/complete`),desktopComplete:t(`/account/oauth/desktop-complete`)}},welcome:t(`/assistant/welcome`),selectAssistant:t(`/assistant/select-assistant`),reviewTerms:t(`/assistant/review-terms`),onboarding:{hosting:t(`/assistant/onboarding/hosting`),apiKey:t(`/assistant/onboarding/api-key`),privacy:t(`/assistant/onboarding/privacy`),prechat:t(`/assistant/onboarding/prechat`),hatching:t(`/assistant/onboarding/hatching`),research:t(`/assistant/onboarding/research`)},home:t(`/assistant/home`),schedules:{root:t(`/assistant/schedules`),detail:e=>n(t(`/assistant/schedules`),e)},identity:t(`/assistant/identity`),plugins:t(`/assistant/plugins`),skills:{root:t(`/assistant/skills`),detail:e=>n(t(`/assistant/skills`),encodeURIComponent(e))},workspace:t(`/assistant/workspace`),library:{root:t(`/assistant/library`),app:e=>n(t(`/assistant/library`),e)},document:e=>n(t(`/assistant/documents`),e),connect:t(`/assistant/connect`),channels:t(`/assistant/channels`),contacts:{root:t(`/assistant/contacts`)},settings:{root:t(`/assistant/settings`),general:t(`/assistant/settings/general`),ai:t(`/assistant/settings/ai`),integrations:t(`/assistant/settings/integrations`),credentials:t(`/assistant/settings/credentials`),notifications:t(`/assistant/settings/notifications`),keyboardShortcuts:t(`/assistant/settings/keyboard-shortcuts`),sounds:t(`/assistant/settings/sounds`),voice:t(`/assistant/settings/voice`),devices:t(`/assistant/settings/devices`),privacy:t(`/assistant/settings/privacy`),security:t(`/assistant/settings/security`),archive:t(`/assistant/settings/archive`),bookmarks:t(`/assistant/settings/bookmarks`),billing:t(`/assistant/settings/billing`),community:t(`/assistant/settings/community`),debug:t(`/assistant/settings/debug`),developer:t(`/assistant/settings/developer`),mcp:t(`/assistant/settings/mcp`),advanced:t(`/assistant/settings/advanced`),dangerZone:t(`/assistant/settings/danger-zone`),systemEvents:t(`/assistant/settings/system-events`),upgradeCancel:t(`/assistant/settings/billing/upgrade/cancel`),upgradeSuccess:t(`/assistant/settings/billing/upgrade/success`)},admin:{root:t(`/admin`)},docs:{hostingOptions:t(`/docs/hosting-options`),legal:{privacyPolicy:t(`/docs/privacy-policy`),termsOfUse:t(`/docs/vellum-terms-of-use`),dataSharing:t(`/docs/data-sharing`),prohibitedUse:t(`/docs/prohibited-use`),privacyAndData:t(`/docs/trust-security/privacy-and-data`)}}},o=[a.identity,a.plugins,a.skills.root,a.workspace,a.contacts.root,a.channels];function s(e){return o.some(t=>e===t||e.startsWith(`${t}/`))}function c(e){return e===a.assistant||e===`${a.assistant}/`||e.startsWith(`${a.conversations}/`)}function l(e){if(e===a.assistant||e===`${a.assistant}/`)return!0;let t=`${a.conversations}/`;if(!e.startsWith(t))return!1;let n=e.slice(t.length).replace(/\/+$/,``);return n.length>0&&!n.includes(`/`)}var u=`vellum.ai`;function d(e){return f(e)}function f(e){return`https://${u}${e}`}function p(){return e()?`${window.__VELLUM_CONFIG__?.webUrl??window.location.origin}${a.admin.root}`:a.admin.root}export{l as a,a as c,s as i,p as n,c as o,f as r,d as s,i as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./createLucideIcon-IRfcSUxS.js";var t=e(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]);export{t};
@@ -1 +0,0 @@
1
- import{Jn as e}from"./sdk.gen-BwnFjFcp.js";import{n as t,r as n,t as r}from"./api-errors-CrWDzVca.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 +0,0 @@
1
- import{t as e}from"./client.gen-DVfIRXUZ.js";var t=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/`,...t}),n=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/backups/`,...t}),r=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/backups/`,...t}),i=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/backups/{snapshot_name}/restore/`,...t}),a=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/history/`,...t}),o=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/history/{doctor_session_id}/`,...t}),s=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/`,...t}),c=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/{session_id}/`,...t}),l=t=>(t.client??e).sse.get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/{session_id}/events/`,...t}),u=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/{session_id}/messages/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),d=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/`,...t}),f=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),p=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/{id}/`,...t}),m=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/{id}/verification-status/`,...t}),h=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/`,...t}),g=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),_=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/{id}/`,...t}),v=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/{id}/status/`,...t}),y=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/emails/`,...t}),b=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/handle-available/`,...t}),x=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/maintenance-mode/enter/`,...t}),S=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/maintenance-mode/exit/`,...t}),C=t=>(t.client??e).post({security:[{name:`Authorization`,type:`apiKey`},{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/oauth/{provider}/start/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),w=t=>(t.client??e).get({security:[{name:`Authorization`,type:`apiKey`},{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/oauth/connections/`,...t}),T=t=>(t.client??e).post({security:[{name:`Authorization`,type:`apiKey`},{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/oauth/connections/{connection_id}/disconnect/`,...t}),E=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/push-tokens/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),D=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/push-tokens/{token}/`,...t}),O=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/release-channel/`,...t}),k=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/release-channel/preview/opt-in/`,...t}),A=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/release-channel/preview/opt-out/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),j=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/system-events/`,...t}),M=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),N=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/{session_id}/`,...t}),P=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/{session_id}/input/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),F=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/{session_id}/resize/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),I=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/`,...t}),L=t=>(t.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),R=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/operational/status/`,...t}),z=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/resize/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),B=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/restart/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),V=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/retire/`,...t}),H=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/rollback/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),U=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/sleep-policy/`,...t}),W=t=>(t.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/sleep-policy/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),G=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/upgrade/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),K=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/upgrade-policy/`,...t}),q=t=>(t.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/upgrade-policy/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),J=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/access-consent/`,...t}),Y=t=>(t?.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/access-consent/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),X=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/active/`,...t}),ee=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/hatch/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),Z=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/auth/live-voice-token/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),Q=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/feature-flags/client-flag-values/`,...t}),$=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/feedback/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),te=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/`,...t}),ne=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/`,...t}),re=t=>(t.client??e).put({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),ie=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/disable/`,...t}),ae=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/remove-payment-method/`,...t}),oe=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/setup-intent/`,...t}),se=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/invoices/`,...t}),ce=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/invoices/download/`,...t}),le=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/low-balance-alert/`,...t}),ue=t=>(t.client??e).put({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/low-balance-alert/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),de=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/plans/`,...t}),fe=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/portal-session/`,...t}),pe=t=>(t?.client??e).get({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/`,...t}),me=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/change-credit-tier/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),he=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/change-machine-tier/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),ge=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/change-storage-tier/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),_e=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/onboarding/`,...t}),ve=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/onboarding/domain/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),ye=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/upgrade/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),be=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/organizations/billing/summary/`,...t}),xe=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/summary/`,...t}),Se=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/top-ups/checkout-session/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),Ce=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/usage/series/`,...t}),we=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/usage/totals/`,...t}),Te=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/`,...t}),Ee=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/{id}/acknowledge/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),De=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/{id}/snooze/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),Oe=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/pause-rules/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),ke=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/pause-rules/{rule_id}/`,...t}),Ae=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/referral-codes/me/`,...t}),je=t=>(t?.client??e).get({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/releases/`,...t}),Me=t=>(t?.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/user/deletion-request/`,...t}),Ne=t=>(t?.client??e).get({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/user/mfa/factors/`,...t}),Pe=t=>(t?.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/user/mfa/factors/`,...t}),Fe=t=>(t.client??e).delete({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/user/mfa/factors/{id}/`,...t}),Ie=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/user/mfa/factors/verify/`,...t,headers:{"Content-Type":`application/json`,...t.headers}});export{Q as $,R as A,Ae as At,I as B,ee as C,we as Ct,w as D,Oe as Dt,S as E,Te as Et,A as F,Ne as Ft,M as G,W as H,O as I,Ie as It,F as J,N as K,z as L,D as M,Me as Mt,E as N,Pe as Nt,T as O,ke as Ot,k as P,Fe as Pt,Z as Q,B as R,b as S,Ce as St,x as T,Ee as Tt,U,H as V,j as W,q as X,G as Y,K as Z,g as _,pe as _t,i as a,re as at,v as b,be as bt,o as c,le as ct,l as d,fe as dt,$ as et,u as f,me as ft,m as g,_e as gt,d as h,ve as ht,r as i,oe as it,L as j,je as jt,C as k,De as kt,s as l,ue as lt,p as m,ge as mt,J as n,ae as nt,n as o,ce as ot,f as p,he as pt,P as q,X as r,ne as rt,a as s,se as st,Y as t,ie as tt,c as u,de as ut,_ as v,ye as vt,t as w,te as wt,y as x,Se as xt,h as y,xe as yt,V as z};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-amTXFI-2.js";import{r}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as i}from"./QueryClientProvider-DKhXIxGb.js";import{t as a}from"./useQuery-B45lW1Kk.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./copy-Cn1FKrEp.js";import{t as c}from"./loader-circle-Cz7opInR.js";import{t as l}from"./notice-DkcNAP8O.js";import{t as u}from"./input-CoUmPnRU.js";import{t as d}from"./modal-D5nLWNN9.js";import{n as f}from"./toast-xTp-xwYL.js";import{t as p}from"./confirm-dialog-CSkhRFRk.js";import{Pt as m}from"./sdk.gen-CmKfVpgB.js";import{c as h}from"./routes-BbeIx_F9.js";import{t as g}from"./client-feature-flag-store-DkJl-g9A.js";import{At as _,Mt as v,Nt as y,jt as b,kt as x}from"./react-query.gen-DPzPS206.js";import{D as S,Ur as C,wi as w}from"./index-yu6nDHvG.js";import{t as T}from"./detail-card-xKZlkbz5.js";var E=e(t(),1);function D(e){if(typeof e==`object`&&e&&`code`in e){let t=e.code;if(typeof t==`string`)return t}}var O=o();function k({open:e,onOpenChange:t}){let r=i(),[a,o]=(0,E.useState)(null),[l,p]=(0,E.useState)(``),[h,g]=(0,E.useState)(null),_=(0,E.useRef)(!1),v=(0,E.useRef)(e),S=()=>r.invalidateQueries({queryKey:y()}),C=e=>{m({path:{id:e}}).catch(()=>void 0).finally(()=>void S())},w=x({onSuccess:e=>{if(!v.current){C(e.factor_id);return}o(e)},onError:e=>{let n=D(e);n===`no_workos_account`?f.error(`Two-factor authentication is only available for Vellum platform accounts.`):n===`throttled`||n===`workos_rate_limited`?f.error(`Too many attempts. Try again in a minute.`):n===`factor_limit_reached`?f.error(`An authenticator app is already set up. Remove it before adding another.`):f.error(`Failed to start setup. Please try again.`),t(!1)}}),T=b({onSuccess:e=>{e.valid?(_.current=!0,f.success(`Two-factor authentication is on.`),S(),t(!1)):g(`That code didn't match. Check your authenticator app and try again.`)},onError:e=>{let n=D(e);if(n===`challenge_already_verified`){_.current=!0,f.success(`Two-factor authentication is on.`),S(),t(!1);return}if(n===`challenge_expired`||n===`challenge_not_found`){a&&C(a.factor_id),o(null),p(``),g(`This setup session expired. Scan the new QR code and try again.`),w.mutate({});return}if(n===`throttled`||n===`workos_rate_limited`){g(`Too many attempts. Wait a minute and try again.`);return}g(`Couldn't verify the code. Wait a moment and try again.`)}});(0,E.useEffect)(()=>{v.current=e,e&&(_.current=!1,o(null),p(``),g(null),w.mutate({}))},[e]);let k=e=>{!e&&T.isPending||(!e&&a&&!_.current&&C(a.factor_id),t(e))},A=()=>{a&&navigator.clipboard.writeText(a.secret).then(()=>f.success(`Setup key copied.`)).catch(()=>f.error(`Couldn't copy the setup key.`))},j=()=>{!a||l.length!==6||T.isPending||(g(null),T.mutate({body:{challenge_id:a.challenge_id,code:l}}))};return(0,O.jsx)(d.Root,{open:e,onOpenChange:k,children:(0,O.jsxs)(d.Content,{size:`sm`,children:[(0,O.jsxs)(d.Header,{children:[(0,O.jsx)(d.Title,{children:`Set up authenticator app`}),(0,O.jsx)(d.Description,{children:`Scan the QR code with an authenticator app such as Google Authenticator or 1Password, then enter the 6-digit code it shows.`})]}),(0,O.jsx)(d.Body,{children:a===null?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-10`,children:(0,O.jsx)(c,{className:`h-5 w-5 animate-spin text-[var(--content-tertiary)]`})}):(0,O.jsxs)(`form`,{className:`flex flex-col items-center gap-4`,onSubmit:e=>{e.preventDefault(),j()},children:[(0,O.jsx)(`img`,{src:a.qr_code,alt:`QR code for your authenticator app`,className:`h-44 w-44 rounded-lg bg-white p-2`}),(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,O.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Can't scan it? Enter this setup key manually:`}),(0,O.jsxs)(`button`,{type:`button`,onClick:A,className:`flex cursor-pointer items-center gap-2 self-start font-mono text-body-small-default text-[var(--content-default)] hover:text-[var(--content-emphasised)]`,children:[(0,O.jsx)(`span`,{className:`break-all text-left`,children:a.secret}),(0,O.jsx)(s,{className:`h-3.5 w-3.5 shrink-0`})]})]}),(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,O.jsx)(`label`,{htmlFor:`totp-code`,className:`text-body-small-default text-[var(--content-tertiary)]`,children:`6-digit code`}),(0,O.jsx)(u,{id:`totp-code`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:6,placeholder:`123456`,value:l,onChange:e=>p(e.target.value.replace(/\D/g,``).slice(0,6))}),h&&(0,O.jsx)(`p`,{role:`alert`,className:`text-body-small-default text-[var(--system-negative-strong)]`,children:h})]})]})}),(0,O.jsxs)(d.Footer,{children:[(0,O.jsx)(n,{variant:`outlined`,onClick:()=>k(!1),disabled:T.isPending,children:`Cancel`}),(0,O.jsx)(n,{onClick:j,disabled:a===null||l.length!==6||T.isPending,children:T.isPending?`Verifying…`:`Verify`})]})]})})}function A(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function j(){let e=i(),[t,r]=(0,E.useState)(!1),[o,s]=(0,E.useState)(null),u=a({...v()}),d=u.data??[],m=()=>e.invalidateQueries({queryKey:y()}),h=_({onSuccess:()=>{f.success(`Authenticator app removed.`),m()},onError:e=>{if(D(e)===`factor_not_found`){m();return}f.error(`Failed to remove the authenticator app. Please try again.`)}});return(0,O.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[u.isPending?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-[var(--content-tertiary)]`,children:[(0,O.jsx)(c,{className:`h-4 w-4 animate-spin`}),(0,O.jsx)(`span`,{className:`text-body-medium-default`,children:`Loading authenticator apps…`})]}):u.isError?(0,O.jsxs)(l,{tone:`error`,children:[`Couldn't load your authenticator apps.`,` `,(0,O.jsx)(`button`,{type:`button`,className:`cursor-pointer underline`,onClick:()=>void u.refetch(),children:`Try again`})]}):d.length===0?(0,O.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:`No authenticator app is set up. Add one to require a one-time code at sign-in.`}):(0,O.jsx)(`ul`,{className:`flex flex-col divide-y divide-[var(--border-base)]`,children:d.map(e=>(0,O.jsxs)(`li`,{className:`flex items-center justify-between gap-3 py-3`,children:[(0,O.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,O.jsx)(w,{className:`h-5 w-5 shrink-0 text-[var(--content-tertiary)]`}),(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Authenticator app`}),(0,O.jsxs)(`div`,{className:`truncate text-body-small-default text-[var(--content-tertiary)]`,children:[e.user,e.created_at?` · Added ${A(e.created_at)}`:``]})]})]}),(0,O.jsx)(n,{variant:`dangerOutline`,onClick:()=>s(e),disabled:h.isPending,children:`Remove`})]},e.id))}),!u.isPending&&!u.isError&&d.length===0&&(0,O.jsx)(n,{onClick:()=>r(!0),className:`self-start`,children:`Add authenticator app`}),(0,O.jsx)(k,{open:t,onOpenChange:r}),(0,O.jsx)(p,{open:o!==null,title:`Remove authenticator app`,message:`Signing in will no longer ask for a code from this app. You can set up a new authenticator app at any time.`,confirmLabel:`Remove`,destructive:!0,onConfirm:()=>{o&&h.mutate({path:{id:o.id}}),s(null)},onCancel:()=>s(null)})]})}function M(){let e=g.use.accountMfa(),t=g.use.hydrated(),n=C();return t&&!e?(0,O.jsx)(r,{replace:!0,to:h.settings.general}):!e||n===`gated`?null:(0,O.jsx)(`div`,{className:`space-y-4`,children:(0,O.jsx)(T,{title:`Two-Factor Authentication`,subtitle:`Require a code from an authenticator app when you sign in.`,children:n===`disabled`?(0,O.jsx)(S,{children:`Log in to the Vellum platform to manage two-factor authentication.`}):(0,O.jsx)(j,{})})})}export{M as SecurityPage};
@@ -1 +0,0 @@
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"./log-in--aqELu3z.js";import{t as s}from"./is-electron-y5bNUVyG.js";import{i as c}from"./auth-store-C09YAZEu.js";import{c as l}from"./routes-BbeIx_F9.js";import{t as u}from"./client-feature-flag-store-DkJl-g9A.js";import{t as d}from"./use-onboarding-login-B-1jrjFL.js";import{t as f}from"./assistant-feature-flag-store-DA8Oj9Mf.js";import{Ji as p,Pt as m,Ur as h,mr as g}from"./index-yu6nDHvG.js";import{n as _,t as v}from"./sidebar-tree-C1_LiBB9.js";var y=e(t(),1),b=a();function x(){let e=f.use.settingsDeveloperNav(),t=f.use.credentialsSettings(),a=u.use.platformNotifications(),x=u.use.bookmarks(),S=u.use.accountMfa(),C=h({platformHostedOnly:!0}),w=h(),{pathname:T}=i(),E=n(),D=c(),{login:O}=d(),k=(0,y.useMemo)(()=>m.filter(e=>!(e.id===`notifications`&&(!a||C===`gated`)||e.id===`billing`&&w!==`full`||e.id===`security`&&(!S||w===`gated`)||e.id===`bookmarks`&&!x||e.id===`credentials`&&!t||e.id===`devices`&&C===`gated`||e.id===`keyboard-shortcuts`&&!s()||e.id===`developer`)),[a,C,w,x,S,t]),A=(0,y.useMemo)(()=>{let t=[];return e&&t.push(...m.filter(e=>e.id===`developer`)),t.push(D?{id:`logout`,label:`Log Out`,icon:p,onSelect:()=>void g(E)}:{id:`login`,label:`Log In`,icon:o,onSelect:()=>void O()}),t},[e,D,E,O]),j=(0,y.useMemo)(()=>{if(T===l.settings.root)return`Settings`;let e=m.find(e=>T===e.href||T.startsWith(e.href+`/`));return e?e.label:`Settings`},[T]);return(0,b.jsx)(_,{backHref:l.assistant,sidebar:(0,b.jsx)(v,{items:k,bottomItems:A,indexPath:l.settings.root}),title:j,children:(0,b.jsx)(r,{})})}export{x as SettingsLayout};
@@ -1 +0,0 @@
1
- import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{F as r,n as i,t as a}from"./button-amTXFI-2.js";import{t as o}from"./useMutation-Lj4VunQV.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./bug-BsuQ5ciQ.js";import{t as l}from"./download-CAuK-nZ6.js";import{t as u}from"./info-DsOyuMO9.js";import{t as ee}from"./loader-circle-Cz7opInR.js";import{t as d}from"./x-CkSVp1Ok.js";import{t as f}from"./notice-DkcNAP8O.js";import{n as te,t as p}from"./input-CoUmPnRU.js";import{t as m}from"./toggle-CDfguvUz.js";import{t as h}from"./dropdown-ByHOpeOU.js";import{t as g}from"./is-electron-y5bNUVyG.js";import{in as _}from"./sdk.gen-BwnFjFcp.js";import{t as v}from"./impersonate-version-flag-BhxfH6iZ.js";import{n as y}from"./auth-store-C09YAZEu.js";import{t as b}from"./dist-DS5iJwBJ2.js";import{n as x}from"./diagnostics-COsnZMe5.js";import{L as S}from"./react-query.gen-DPzPS206.js";import{$i as C,Bi as w,Gi as T,ki as ne,qi as re}from"./index-yu6nDHvG.js";var E=e(n(),1),ie=e(r(),1),D=`vellum:debug:`;function ae(){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(D))continue;let r=window.localStorage.getItem(n);r!==null&&(e[n]=r)}}catch{}return e}function O(){return{collectedAt:new Date().toISOString(),resolved:{impersonateAssistantVersion:v()},overrides:ae()}}var k=t({ShareFeedbackModal:()=>z}),A=s(),j=[{value:`bug_report`,label:`Bug Report`,icon:c,includesLogsByDefault:!0},{value:`feature_request`,label:`Feature Request`,icon:C,includesLogsByDefault:!1},{value:`other`,label:`Other`,icon:T,includesLogsByDefault:!1}],M=[{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}],oe=M.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 g()?`electron`:b.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 _({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{diagnosticsProvider:i,doctorSessionId:a,extraLogFiles:o=[]}=r,s=new Date,c=M.find(t=>t.value===e),l=s.getTime(),u=c?.cutoffMs==null?null:l-c.cutoffMs,ee=u==null?null:new Date(u).toISOString(),d=null;try{d=i?.()??null}catch{d=null}let f=x(d),te={collected_at:s.toISOString(),time_range:e,cutoff:ee,log_window:{start_time_ms:u,end_time_ms:l},assistant_id:t,active_conversation_id:n,doctor_session_id:a??null,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},p=new TextEncoder,m=p.encode(JSON.stringify(te,null,2)),h=p.encode(JSON.stringify(f,null,2)),_=[L(`web-client-context.json`,m),L(`web-chat-diagnostics.json`,h)],v=new TextEncoder().encode(JSON.stringify(O(),null,2));_.push(L(`web-debug-flags.json`,v));for(let e of o){let t=e.contents.trim();t&&_.push(L(e.filename,p.encode(t)))}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));_.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));_.push(L(`web-sse-liveness-triage.json`,n))}}catch{}if(g()&&window.vellum?.feedback){try{let e=await window.vellum.feedback.diagnostics(),t=new TextEncoder().encode(JSON.stringify(e,null,2));_.push(L(`electron-diagnostics.json`,t))}catch{}try{let e=await window.vellum.feedback.logs();if(e){let t=new TextEncoder().encode(e);_.push(L(`electron-main-logs.txt`,t))}}catch{}}if(t){let e=await R(t,{window:{startTime:u,endTime:l},activeConversationId:n});e&&_.push(L(`platform-logs.tar.gz`,e))}_.push(new Uint8Array(1024));let y=_.reduce((e,t)=>e+t.length,0),b=new Uint8Array(y),S=0;for(let e of _)b.set(e,S),S+=e.length;let C=new Blob([b.buffer]),w=await new Response(C.stream().pipeThrough(new CompressionStream(`gzip`))).blob();return new File([w],`web-client-logs-${s.getTime()}.tar.gz`,{type:`application/gzip`})}function z({open:e,onClose:t,initialReason:n,initialMessage:r,onSubmitted:s,assistantId:c,assistantVersion:_,activeConversationId:v,doctorSessionId:b,doctorSessionLog:x,getDiagnosticsSnapshot:C}){let T=y.use.user(),D=T?.email,ae=T?.isStaff??!1,O=(0,E.useId)(),k=(0,E.useRef)(null),M=(0,E.useRef)(null),N=(0,E.useRef)(null),P=(0,E.useRef)(null),[I,L]=(0,E.useState)(n??`bug_report`),[R,z]=(0,E.useState)(``),[B,pe]=(0,E.useState)(``),[V,H]=(0,E.useState)(j.find(e=>e.value===(n??`bug_report`))?.includesLogsByDefault??!0),[me,he]=(0,E.useState)(!1),[U,W]=(0,E.useState)(`past_hour`),[G,K]=(0,E.useState)([]),[ge,q]=(0,E.useState)(null),[_e,J]=(0,E.useState)(!1),[Y,ve]=(0,E.useState)(!1),[X,ye]=(0,E.useState)(!1),Z=o(S()),[be,Q]=(0,E.useState)(!1),$=Z.isPending||be,xe=!D,Se=(0,E.useMemo)(()=>R.trim().length>0&&B.trim().length>0,[R,B]);(0,E.useEffect)(()=>{if(!e)return;let t=n??`bug_report`;L(t),z(r??``),pe(D??``),H(j.find(e=>e.value===t)?.includesLogsByDefault??!0),he(!1),W(`past_hour`),K([]),ve(!1),ye(!1),q(null),Q(!1),Z.reset();let i=setTimeout(()=>{D?N.current?.focus():P.current?.focus()},50);return()=>clearTimeout(i)},[e]),(0,E.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let Ce=e=>{L(e),me||H(j.find(t=>t.value===e)?.includesLogsByDefault??!1)},we=()=>{H(e=>!e),he(!0)},Te=x?.trim()?[{filename:`doctor-session.txt`,contents:x}]:[],Ee=(0,E.useCallback)(e=>{e.key===`Escape`&&!$&&t()},[t,$]),De=(0,E.useCallback)(e=>{e.target===k.current&&!$&&t()},[t,$]),Oe=(0,E.useCallback)(e=>{K(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})},[]),ke=e=>{e.target.files&&Oe(Array.from(e.target.files)),e.target.value=``},Ae=e=>{e.preventDefault(),J(!1),e.dataTransfer.files?.length&&Oe(Array.from(e.dataTransfer.files))},je=e=>{e.preventDefault(),J(!0)},Me=e=>{e.preventDefault(),e.currentTarget===e.target&&J(!1)},Ne=e=>{K(t=>t.filter((t,n)=>n!==e))};return e?(0,ie.createPortal)((0,A.jsx)(`div`,{ref:k,role:`dialog`,"aria-modal":`true`,"aria-labelledby":O,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:Ee,onClick:De,onDrop:Ae,onDragOver:je,onDragLeave:Me,children:(0,A.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,A.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-4`,style:{borderColor:`var(--border-subtle)`},children:[(0,A.jsx)(`h2`,{id:O,className:`!m-0 text-title-small text-[var(--content-default)]`,children:`Share Feedback`}),(0,A.jsx)(a,{variant:`ghost`,iconOnly:(0,A.jsx)(d,{}),onClick:t,disabled:$,"aria-label":`Close`,tintColor:`var(--content-secondary)`})]}),(0,A.jsxs)(`div`,{className:`flex flex-col gap-3.5 overflow-y-auto pt-4 ${$?`pointer-events-none opacity-60`:``}`,children:[ae&&(0,A.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,A.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,A.jsx)(m,{checked:X,onChange:()=>ye(e=>!e),"aria-label":`Download diagnostics directly`}),(0,A.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:`Download diagnostics directly`})]}),(0,A.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,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:`Time range`}),(0,A.jsx)(h,{options:oe,value:U,onChange:W,"aria-label":`Diagnostics time range`})]}):(0,A.jsxs)(A.Fragment,{children:[xe&&(0,A.jsx)(p,{id:`${O}-email`,ref:P,label:`Email`,type:`email`,placeholder:`you@example.com`,value:B,onChange:e=>pe(e.target.value),leftIcon:(0,A.jsx)(re,{className:`h-4 w-4`,"aria-hidden":!0}),fullWidth:!0}),(0,A.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,A.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Category`}),(0,A.jsx)(`div`,{className:`flex gap-2`,children:j.map(e=>(0,A.jsx)(de,{option:e,isSelected:I===e.value,onSelect:()=>Ce(e.value)},e.value))})]}),(0,A.jsx)(`hr`,{className:`border-[var(--border-subtle)]`}),I===`bug_report`&&(0,A.jsxs)(f,{tone:`info`,children:[`Tip: Get faster support by posting in our`,` `,(0,A.jsx)(`a`,{href:`https://vellum.ai/community`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`Discord community`})]}),I===`feature_request`&&(0,A.jsxs)(f,{tone:`info`,children:[`Tip: Vote on features on our`,` `,(0,A.jsx)(`a`,{href:`https://vellum.ai/roadmap`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`public roadmap`})]}),(0,A.jsx)(te,{id:`${O}-message`,ref:N,label:I===`bug_report`?`What went wrong?`:I===`feature_request`?`Describe your idea`:`What's on your mind?`,rows:3,placeholder:I===`bug_report`?`What did you expect to happen, and what happened instead?`:I===`feature_request`?`What problem would this solve for you?`:`Share your thoughts...`,value:R,onChange:e=>z(e.target.value),fullWidth:!0}),I!==`feature_request`&&(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,A.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,A.jsx)(m,{checked:V,onChange:we,"aria-label":`Include browser diagnostics`}),(0,A.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include diagnostics`})]}),(0,A.jsx)(i,{content:`Diagnostics include browser context, assistant logs, and timestamps — never passwords or credentials.`,children:(0,A.jsx)(`button`,{type:`button`,"aria-label":`About diagnostics`,className:`inline-flex items-center justify-center text-[var(--content-tertiary)]`,children:(0,A.jsx)(u,{className:`h-3.5 w-3.5`})})})]}),V&&(0,A.jsx)(h,{options:oe,value:U,onChange:W,"aria-label":`Diagnostics time range`})]}),g()&&v&&I!==`feature_request`&&(0,A.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,A.jsx)(m,{checked:Y,onChange:()=>ve(e=>!e),"aria-label":`Include the most recent conversation`}),(0,A.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include the most recent conversation`})]}),(0,A.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:[`Attachments`,G.length>0&&(0,A.jsxs)(`span`,{className:`text-[var(--content-tertiary)]`,children:[` · `,G.length,`/`,F]})]}),(0,A.jsx)(a,{variant:`outlined`,size:`compact`,leftIcon:(0,A.jsx)(w,{}),onClick:()=>M.current?.click(),disabled:G.length>=F,children:`Add files`}),(0,A.jsx)(`input`,{ref:M,type:`file`,multiple:!0,accept:`image/png,image/jpeg,image/gif,image/webp,video/mp4,video/quicktime,video/webm`,onChange:ke,className:`hidden`})]}),G.length>0&&(0,A.jsx)(`div`,{className:`flex gap-2 overflow-x-auto`,children:G.map((e,t)=>(0,A.jsx)(fe,{file:e,onRemove:()=>Ne(t)},`${e.name}-${t}`))}),_e&&(0,A.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Drop files to attach…`})]})]}),ge&&(0,A.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--system-negative-strong)]`,children:ge})]}),(0,A.jsx)(`div`,{className:`mt-4 flex items-center justify-end gap-2 border-t pt-4`,style:{borderColor:`var(--border-subtle)`},children:$?(0,A.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-body-medium-lighter text-[var(--content-secondary)]`,children:[(0,A.jsx)(ee,{className:`h-4 w-4 animate-spin`}),X?`Preparing diagnostics…`:`Sending feedback…`]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(a,{variant:`ghost`,onClick:t,children:`Cancel`}),X?(0,A.jsx)(a,{variant:`primary`,leftIcon:(0,A.jsx)(l,{}),onClick:async()=>{if(!$){q(null),Q(!0);try{let e=await ue(U,c??null,g()?Y?v??null:null:v??null,{diagnosticsProvider:C,doctorSessionId:b,extraLogFiles:Te});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,A.jsx)(a,{variant:`primary`,leftIcon:(0,A.jsx)(ne,{}),onClick:async()=>{if(!(!Se||$)){q(null),Q(!0);try{let e=V&&I!==`feature_request`?await ue(U,c??null,g()?Y?v??null:null:v??null,{diagnosticsProvider:C,doctorSessionId:b,extraLogFiles:Te}):null;await Z.mutateAsync({headers:{"Content-Type":null},body:{message:R.trim(),classification:se[I],email:B.trim(),client:ce(),client_version:void 0,...c?{assistant_id:c}:{},..._?{assistant_version:_}:{},...b?{doctor_session_id:b}:{},...e?{logs_file:e}:{},...G.length?{attachments:G}:{}},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}}),s?.(),t()}catch(e){q(e instanceof Error?e.message:`Failed to submit feedback. Please try again.`)}finally{Q(!1)}}},disabled:!Se,children:`Submit`})]})})]})}),document.body):null}function de({option:e,isSelected:t,onSelect:n}){let r=e.icon;return(0,A.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,A.jsx)(r,{className:`h-3.5 w-3.5 shrink-0`,style:{color:t?`var(--primary-base)`:`var(--content-secondary)`}}),(0,A.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,E.useMemo)(()=>n?URL.createObjectURL(e):null,[e,n]);return(0,E.useEffect)(()=>{if(r)return()=>URL.revokeObjectURL(r)},[r]),(0,A.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,A.jsx)(`img`,{src:r,alt:e.name,className:`h-full w-full object-cover`}):(0,A.jsx)(w,{className:`h-5 w-5 text-[var(--content-secondary)]`}),(0,A.jsx)(a,{variant:`ghost`,size:`compact`,iconOnly:(0,A.jsx)(d,{}),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{k as n,z as t};