@vellumai/web 0.10.9-staging.1 → 0.10.9
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.
- package/dist/assets/{a2a-invite-BgVgm24S.js → a2a-invite-CwD3hY_-.js} +1 -1
- package/dist/assets/{account-page-BYVwf7xV.js → account-page-uVMhWTmh.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-D7Shyx6k.js → acp-run-detail-panel-DKXp8jTf.js} +1 -1
- package/dist/assets/{activity-steps-panel-CuI8SWWZ.js → activity-steps-panel-Bq9yj1qu.js} +1 -1
- package/dist/assets/{add-credits-modal-B2t4geb6.js → add-credits-modal-DjQdNLWh.js} +1 -1
- package/dist/assets/{advanced-page-MbQr5gTH.js → advanced-page-CQPwr2B4.js} +1 -1
- package/dist/assets/{ai-page-BbtSlOOr.js → ai-page-CO4dBJpg.js} +1 -1
- package/dist/assets/{api-D2xHldt2.js → api-Dfrm6N2I.js} +1 -1
- package/dist/assets/{api-key-screen--mSD5piK.js → api-key-screen-DhFeDT-n.js} +1 -1
- package/dist/assets/{archive-page-Y2o3PaeP.js → archive-page-BLEqhIZ8.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-4edQKaeq.js → assistant-feature-flag-store-BA3GR2m5.js} +1 -1
- package/dist/assets/{assistant-status-panel-CdoOjV0m.js → assistant-status-panel-CW7lTRBE.js} +1 -1
- package/dist/assets/{auth-store-B8a9KLUt.js → auth-store-65JKPW7C.js} +2 -2
- package/dist/assets/{background-task-detail-panel-Dj6SWg-M.js → background-task-detail-panel-ChfmmS5C.js} +1 -1
- package/dist/assets/{billing-page-BAtqAcvw.js → billing-page-CaP8_CF9.js} +3 -3
- package/dist/assets/{bookmarks-page-BdcQABPJ.js → bookmarks-page-BdcnBpJK.js} +1 -1
- package/dist/assets/{browser-WjU02SUS.js → browser-Cnr7iqbJ.js} +2 -2
- package/dist/assets/{build-state-CTWX014G.js → build-state-D-aPe0DY.js} +1 -1
- package/dist/assets/{channels-page-route-DoG1IfDg.js → channels-page-route-DKkdGS4b.js} +1 -1
- package/dist/assets/{chat-markdown-message-B6ba9Nea.js → chat-markdown-message-Cp8stHaU.js} +2 -2
- package/dist/assets/{client-feature-flag-store-Bm7cFUky.js → client-feature-flag-store-Ri-a_LuI.js} +1 -1
- package/dist/assets/{client-identity-C5bng1El.js → client-identity-DfC94VQ4.js} +1 -1
- package/dist/assets/{command-palette-3Kt4aKqv.js → command-palette-Bu2Qjyle.js} +1 -1
- package/dist/assets/{command-palette-window-page-Ce_JAimQ.js → command-palette-window-page-CtQ40jMw.js} +1 -1
- package/dist/assets/{community-page-BwkGsQOO.js → community-page-DL_oR63v.js} +1 -1
- package/dist/assets/{connect-page-GobyNuEq.js → connect-page-BCb6nr8x.js} +1 -1
- package/dist/assets/{consent-controls-C7ZF8P6y.js → consent-controls-udcijSAB.js} +1 -1
- package/dist/assets/constants-BQVXM0At.js +1 -0
- package/dist/assets/{contacts-page-route-mJdb0p-P.js → contacts-page-route-CicU-jSI.js} +1 -1
- package/dist/assets/{credentials-page-D7wWekUv.js → credentials-page-DDM2V8iZ.js} +1 -1
- package/dist/assets/{danger-zone-redirect-page-BwbAORqw.js → danger-zone-redirect-page-BpM01x_c.js} +1 -1
- package/dist/assets/debug-page-BGhdwv9M.js +4 -0
- package/dist/assets/{deploy-dialogs-3Mkwr6Lr.js → deploy-dialogs-C6pCnoVj.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-B89ORnF4.js → detail-panel-stop-button-H9sXvWGa.js} +1 -1
- package/dist/assets/{developer-page-BepHaWqd.js → developer-page-DZdwzLQu.js} +1 -1
- package/dist/assets/{devices-page-Bvgt1Qx3.js → devices-page-ChwagiFL.js} +1 -1
- package/dist/assets/{diagnostics-BjIFTbZd.js → diagnostics-CUmYxbmM.js} +1 -1
- package/dist/assets/{dictation-overlay-page-DlScWKYV.js → dictation-overlay-page-BmLNyGeD.js} +1 -1
- package/dist/assets/{document-viewer-page-7mbMVgWm.js → document-viewer-page-B-ShLH6Y.js} +1 -1
- package/dist/assets/{earn-credits-modal-BLyGdcsU.js → earn-credits-modal-BILKTI_F.js} +1 -1
- package/dist/assets/{emails-page-kA5rCqOM.js → emails-page-D_ZdkIHT.js} +1 -1
- package/dist/assets/{esm-bqqA92jW.js → esm-BC-IlNg6.js} +2 -2
- package/dist/assets/{esm-BgQ9CqZD.js → esm-BVzHqFEK.js} +2 -2
- package/dist/assets/{esm-k-oyYh2U.js → esm-CE4Ehw9K.js} +2 -2
- package/dist/assets/{esm-B0Io_iMT.js → esm-D4S5VlIC.js} +2 -2
- package/dist/assets/{esm-CWRflJ6T.js → esm-Ddwl5DWt.js} +2 -2
- package/dist/assets/esm-ZgeaRH-O.js +2 -0
- package/dist/assets/feature-flag-catalog-DjfXrBPD.js +1 -0
- package/dist/assets/{general-page-yhD_Wuar.js → general-page-61s8VehJ.js} +1 -1
- package/dist/assets/{haptics-Dgz3Ixf7.js → haptics-BOswdY5A.js} +2 -2
- package/dist/assets/{hatching-screen-trN-MWFq.js → hatching-screen-DiUygZtk.js} +1 -1
- package/dist/assets/{home-page-route-CmuFehkr.js → home-page-route-1hEkRjdv.js} +1 -1
- package/dist/assets/{hosting-screen-Cxg-qKjE.js → hosting-screen-nru73FGU.js} +1 -1
- package/dist/assets/identity-page-route-CbHcVb6m.js +1 -0
- package/dist/assets/{index-CkKSY1-Q.js → index-B4Qq7TL7.js} +23 -23
- package/dist/assets/index-CCPsEVwr.css +2 -0
- package/dist/assets/{inspect-page-T3Y4-Vmv.js → inspect-page-DoA1sfxg.js} +3 -3
- package/dist/assets/{integrations-page-Ock6mFN1.js → integrations-page-vFP_lh3w.js} +1 -1
- package/dist/assets/intelligence-layout-oIGPC8W1.js +1 -0
- package/dist/assets/{keyboard-shortcuts-page-CG1twx2C.js → keyboard-shortcuts-page-BzeIMUpj.js} +1 -1
- package/dist/assets/{library-detail-page-C2iWMOjx.js → library-detail-page-D0Dv3ZLJ.js} +1 -1
- package/dist/assets/{library-page-BC0GGthr.js → library-page-D7I-sk41.js} +1 -1
- package/dist/assets/{login-flow-DdiUXQhA.js → login-flow-DYLpX6IU.js} +1 -1
- package/dist/assets/{login-page-CGmLnOmi.js → login-page-UotBWZu9.js} +1 -1
- package/dist/assets/{logout-page-4e8K14KD.js → logout-page-xucijGcq.js} +1 -1
- package/dist/assets/{logs-layout-wJKzizjg.js → logs-layout-JUd7Ag6q.js} +1 -1
- package/dist/assets/memory-page-route-DqM6EMFu.js +1 -0
- package/dist/assets/{memory-router-playground-page-FZC-VIVr.js → memory-router-playground-page-DikxzmKT.js} +1 -1
- package/dist/assets/{messages-BnurE-6y.js → messages-B2CZAuPN.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-BN_mMpOa.js → mobile-sidebar-drawer-BaL8el3Y.js} +1 -1
- package/dist/assets/{native-biometric-Dy5Vb7o0.js → native-biometric-B2cBAQ1U.js} +1 -1
- package/dist/assets/{native-file-H6DBFhbO.js → native-file-BZDk5eyB.js} +2 -2
- package/dist/assets/{notifications-page-D8wbor2x.js → notifications-page-BISnBOYH.js} +1 -1
- package/dist/assets/{oauth-complete-page-Ce1AmHXp.js → oauth-complete-page-SfFEsa_M.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-M9ID8MBR.js → oauth-popup-complete-page-D4Xoa-Gr.js} +1 -1
- package/dist/assets/{pairing-page-COwbBOrn.js → pairing-page-B5xnM6XX.js} +1 -1
- package/dist/assets/{password-reset-page-DfUZ0wSh.js → password-reset-page-NF13YMiM.js} +1 -1
- package/dist/assets/{platform-detection-DJWRuZPt.js → platform-detection-DGxL0AsS.js} +1 -1
- package/dist/assets/{platform-loopback-page-MtmBE9rf.js → platform-loopback-page-_IbNDHN2.js} +1 -1
- package/dist/assets/{plugin-detail-page-jrt28WVX.js → plugin-detail-page-_iCqtxl9.js} +1 -1
- package/dist/assets/{plugins-page-BkFE86Ch.js → plugins-page-DHiFqgxf.js} +1 -1
- package/dist/assets/{prechat-route-CyUlbfqD.js → prechat-route-BwML3ZL1.js} +1 -1
- package/dist/assets/{prefs-BLNqdDWZ.js → prefs-DNYLVDvB.js} +1 -1
- package/dist/assets/{privacy-page-DD2N7jR3.js → privacy-page-DhxWA9mA.js} +1 -1
- package/dist/assets/{privacy-screen-CiInQmTP.js → privacy-screen-DRGDGj0W.js} +1 -1
- package/dist/assets/{provider-callback-page-apRb9-js.js → provider-callback-page-BoO2JgZt.js} +1 -1
- package/dist/assets/{provider-signup-page-ajKQp8fF.js → provider-signup-page-DLVKMYZh.js} +1 -1
- package/dist/assets/{quick-input-page-Bfry352-.js → quick-input-page-7z8Ti2GI.js} +1 -1
- package/dist/assets/react-query.gen-DV9K_z-o.js +1 -0
- package/dist/assets/{research-mock-page-D_q1_UFd.js → research-mock-page-CoMthbl4.js} +1 -1
- package/dist/assets/{research-onboarding-route-CWQvTAZs.js → research-onboarding-route-CeTflgoE.js} +1 -1
- package/dist/assets/{review-terms-screen-DQscfsQA.js → review-terms-screen-DAZ66rIh.js} +1 -1
- package/dist/assets/{risk-CGuJt8eV.js → risk-BQ3NV8r8.js} +1 -1
- package/dist/assets/routes-BXlWEOF0.js +1 -0
- package/dist/assets/sdk.gen-9Cdt87h5.js +1 -0
- package/dist/assets/{security-page-PDmclL0z.js → security-page-BS1WxY0d.js} +1 -1
- package/dist/assets/{select-assistant-screen-NbYyB8gd.js → select-assistant-screen-z3B8ngdP.js} +1 -1
- package/dist/assets/{settings-layout-CXwmK0bq.js → settings-layout-DFzwR63d.js} +1 -1
- package/dist/assets/{share-feedback-modal-8FYv2LvY.js → share-feedback-modal-DH2dhWbo.js} +1 -1
- package/dist/assets/{sidebar-tree-DXcgyQSp.js → sidebar-tree-DWJkYLPh.js} +1 -1
- package/dist/assets/{signup-page-7ln71c_p.js → signup-page-D2LQXMnG.js} +1 -1
- package/dist/assets/site-favicon-DsYdnaxV.js +1 -0
- package/dist/assets/{skill-detail-page-D-KI1GRv.js → skill-detail-page-CcZFUjdw.js} +1 -1
- package/dist/assets/{skill-detail-panel-B6dgeIjw.js → skill-detail-panel-B4WEYtK9.js} +1 -1
- package/dist/assets/{skills-page-BANGKYGT.js → skills-page-Di8dGQGo.js} +1 -1
- package/dist/assets/{sounds-page-B5nmCucp.js → sounds-page-CF3gwgc9.js} +1 -1
- package/dist/assets/{subagent-detail-panel-B-XO_qpq.js → subagent-detail-panel-BqYWP0b9.js} +1 -1
- package/dist/assets/{system-events-page-3D8JNX2E.js → system-events-page-DdvtYv0_.js} +1 -1
- package/dist/assets/{system-events-redirect-page-CXWqj4sU.js → system-events-redirect-page-HeBGwZCZ.js} +1 -1
- package/dist/assets/{theme-stage-page-9uebvm3N.js → theme-stage-page-8v_hsKXd.js} +1 -1
- package/dist/assets/{tiptap-document-editor-BQsMI5MK.js → tiptap-document-editor-1QvKHdlQ.js} +1 -1
- package/dist/assets/{tool-detail-panel-C6bS4xqt.js → tool-detail-panel-DarSpKEx.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-DFVxgGMD.js → upgrade-cancel-page-wop4boqC.js} +1 -1
- package/dist/assets/{upgrade-success-page-CmS8UX41.js → upgrade-success-page-DWPEHzlo.js} +1 -1
- package/dist/assets/{usage-page-J9DnhUSp.js → usage-page-CB5oigmL.js} +1 -1
- package/dist/assets/{use-edge-swipe-back-CGjL1V81.js → use-edge-swipe-back-R9ItWgTp.js} +1 -1
- package/dist/assets/{use-invite-link-dialog-DiQ0mtix.js → use-invite-link-dialog-_LChrtmw.js} +1 -1
- package/dist/assets/use-is-org-ready-1Xighdsa.js +1 -0
- package/dist/assets/{use-onboarding-login-CymKDO-T.js → use-onboarding-login-BHrngniO.js} +1 -1
- package/dist/assets/{use-skill-actions-DgIZqg7U.js → use-skill-actions-mJaMNpfO.js} +1 -1
- package/dist/assets/{use-skill-categories-573c1Oen.js → use-skill-categories-Bit2V2fA.js} +1 -1
- package/dist/assets/{use-skill-detail-files-omgWFzAG.js → use-skill-detail-files-DDUUobr0.js} +1 -1
- package/dist/assets/{voice-page-CDyjR4fA.js → voice-page-Dfl4T4_g.js} +1 -1
- package/dist/assets/{weather-forecast-display-C5EykzzK.js → weather-forecast-display-DOXofTcV.js} +1 -1
- package/dist/assets/{web-BRWcXGs9.js → web-BrbVmY32.js} +1 -1
- package/dist/assets/{web-CKE5sM1b.js → web-CBHy41qN.js} +1 -1
- package/dist/assets/{welcome-screen-Dz0Avnjt.js → welcome-screen-kc41a0yS.js} +1 -1
- package/dist/assets/{workflow-detail-panel-D-1Pxr3t.js → workflow-detail-panel-Dctg7w-3.js} +1 -1
- package/dist/assets/{workspace-page-D5FdWIRh.js → workspace-page-BWn-Je40.js} +1 -1
- package/dist/index.html +27 -27
- package/package.json +1 -1
- package/dist/assets/debug-page-b1M-_rZF.js +0 -4
- package/dist/assets/esm-C9MocOv0.js +0 -2
- package/dist/assets/feature-flag-catalog-CM5COdiW.js +0 -1
- package/dist/assets/identity-page-route-CEUFy067.js +0 -1
- package/dist/assets/index-CnqTir5A.css +0 -2
- package/dist/assets/intelligence-layout-DzdGg3IO.js +0 -1
- package/dist/assets/react-query.gen-GVQbBTEp.js +0 -1
- package/dist/assets/routes-DYcJgn9k.js +0 -1
- package/dist/assets/sdk.gen-CmKfVpgB.js +0 -1
- package/dist/assets/site-favicon-BXY4qlvA.js +0 -1
- package/dist/assets/use-is-org-ready-B5vVKY9m.js +0 -1
- /package/dist/assets/{BundleConfirmPage-C02c50EO.js → BundleConfirmPage-DwVI7U0b.js} +0 -0
- /package/dist/assets/{build.umd-D88jX3tx.js → build.umd-t16r8k1T.js} +0 -0
- /package/dist/assets/{definitions-RERkHOnv.js → definitions-CK0CSdwt.js} +0 -0
- /package/dist/assets/{definitions-EvNC1i1H.js → definitions-Dj7uajgZ.js} +0 -0
- /package/dist/assets/{esm-D_FdLNK8.js → esm-wMYgN14J.js} +0 -0
- /package/dist/assets/{pdf-OTWpgOp2.js → pdf-jCZ1S_t-.js} +0 -0
- /package/dist/assets/{web-ClHk8mQB.js → web-6YTn0Mpt.js} +0 -0
- /package/dist/assets/{web-Qpx2h8tK.js → web-B6BDTvZe.js} +0 -0
- /package/dist/assets/{web-CU5yzmqR.js → web-BEtTYpif.js} +0 -0
- /package/dist/assets/{web-CTmLPP3c.js → web-C3rsbCeg.js} +0 -0
- /package/dist/assets/{web-8CyK9syi.js → web-CIdUPUaN.js} +0 -0
- /package/dist/assets/{web-CyGs80Wd.js → web-DGaEiOw7.js} +0 -0
- /package/dist/assets/{xterm-fGXm5t6D.js → xterm-CJZcgQLM.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-DNV09uVI.js → xterm-addon-fit-BmGG02AS.js} +0 -0
|
@@ -1 +1 @@
|
|
|
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{n as a}from"./QueryClientProvider-DKhXIxGb.js";import{t as o}from"./useQuery-B45lW1Kk.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./card-Bv5O5juh.js";import{t as l}from"./check-DFNrQERi.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import{t as d}from"./loader-circle-Cz7opInR.js";import{t as f}from"./pencil-CUIr0IFo.js";import{t as p}from"./x-CkSVp1Ok.js";import{t as m}from"./input-CoUmPnRU.js";import{l as h,p as g,s as _}from"./local-mode-Bskd5bsT.js";import{t as v}from"./is-electron-y5bNUVyG.js";import{n as y}from"./resolved-assistants-store-DAzPZ1eV.js";import{A as b,C as ee,a as x,j as S,n as C,o as w}from"./auth-store-B8a9KLUt.js";import{t as T}from"./client.gen-DVfIRXUZ.js";import{m as te}from"./native-biometric-Dy5Vb7o0.js";import{c as E}from"./routes-DYcJgn9k.js";import{i as D,s as O}from"./prefs-BLNqdDWZ.js";import{a as k}from"./platform-detection-DJWRuZPt.js";import{t as A}from"./client-feature-flag-store-Bm7cFUky.js";import{n as ne,t as re}from"./browser-WjU02SUS.js";import{c as j,l as ie,n as ae,t as M}from"./prechat-BBwYr5Qb.js";import{Ct as oe,b as N,r as se}from"./react-query.gen-GVQbBTEp.js";import{t as P}from"./public-asset-WikBpVQd.js";import{H as F,V as ce,_ as le,_t as ue,an as de,dt as fe,en as pe,g as me,gt as he,h as ge,nn as I,on as L,pa as R,pt as _e,rn as z,tn as B,ut as V,vt as ve}from"./index-CkKSY1-Q.js";import{t as H}from"./onboarding-step-layout-Cup_f9lB.js";import{n as U,r as ye}from"./prechat-names-Cjl3JzzN.js";import{t as be}from"./step-indicator-dots-B-KCGh9e.js";var W=e(t(),1);async function xe(){try{let{data:e,response:t}=await T.get({url:`/v1/onboarding/recipe/`,throwOnError:!1});if(!t?.ok||!e)return null;let n=e;return typeof n.cohort!=`string`||!Array.isArray(n.tasks)||typeof n.tone!=`string`||typeof n.bootstrap_template!=`string`||typeof n.initial_message!=`string`||!Array.isArray(n.skills)||typeof n.skip_prechat!=`boolean`?null:{cohort:n.cohort,tasks:n.tasks,tone:n.tone,bootstrapTemplate:n.bootstrap_template,initialMessage:n.initial_message,skills:n.skills,skipPrechat:n.skip_prechat}}catch{return null}}var G=s(),Se=[{label:`Push notifications`,detail:`stay in the loop even when the browser is closed`},{label:`Biometric login`,detail:`Face ID & Touch ID for instant, secure access`},{label:`Native haptics`,detail:`tactile feedback that feels part of the device`},{label:`Home screen access`,detail:`launch your assistant with a single tap`}];function Ce({onComplete:e}){function t(){le(),ge(),e()}return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col items-center justify-center px-6 pb-40 text-center`,children:[(0,G.jsx)(`div`,{className:`mb-8 flex size-16 items-center justify-center rounded-2xl border`,style:{background:`var(--surface-overlay)`,borderColor:`var(--border-element)`,boxShadow:`0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04)`,animation:`fadeInUp 0.3s ease-out both`},children:(0,G.jsxs)(`svg`,{width:`28`,height:`28`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--content-default)`},"aria-hidden":!0,children:[(0,G.jsx)(`rect`,{x:`5`,y:`2`,width:`14`,height:`20`,rx:`3`}),(0,G.jsx)(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`18.01`})]})}),(0,G.jsx)(`p`,{className:`text-label-small-default mb-3 uppercase tracking-[0.2em]`,style:{color:`var(--content-tertiary)`,animation:`fadeInUp 0.3s ease-out 0.05s both`},children:`One more thing`}),(0,G.jsx)(`h1`,{className:`mb-3 text-3xl font-semibold tracking-tight`,style:{color:`var(--content-default)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Your assistant, in your pocket.`}),(0,G.jsx)(`p`,{className:`text-body-medium-lighter mb-10 max-w-sm`,style:{color:`var(--content-secondary)`,animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`The iOS app keeps your assistant a tap away — with push notifications, biometric login, and native haptics.`}),(0,G.jsx)(`div`,{className:`mb-10 w-full rounded-xl border px-5 py-4`,style:{background:`var(--surface-overlay)`,borderColor:`var(--border-element)`,animation:`fadeInUp 0.3s ease-out 0.2s both`},children:(0,G.jsx)(`ul`,{className:`space-y-4`,children:Se.map((e,t)=>(0,G.jsxs)(`li`,{className:`flex items-start gap-3`,style:{animation:`fadeInUp 0.3s ease-out ${.25+t*.05}s both`},children:[(0,G.jsx)(`span`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full`,style:{background:`var(--system-positive-weak)`},children:(0,G.jsx)(l,{size:12,style:{color:`var(--system-positive-strong)`}})}),(0,G.jsxs)(`span`,{className:`text-left`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e.label}),(0,G.jsxs)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[` — `,e.detail]})]})]},e.label))})}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.45s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:`Download on the App Store`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:e,className:`h-11 text-base`,children:`Continue in browser`})]})]})})}var K=`google`,we=[{id:`gmail`,label:`Gmail`,logoSrc:P(`/images/integrations/gmail.svg`)},{id:`google-calendar`,label:`Google Calendar`,logoSrc:P(`/images/integrations/google-calendar.svg`)},{id:`google-drive`,label:`Google Drive`,logoSrc:P(`/images/integrations/google-drive.svg`)}];function Te({assistantId:e,assistantName:t,onConnect:r,onSkip:i,onBack:o}){let s=v(),c=a(),l=te(),f=(0,W.useRef)(null),p=(0,W.useRef)(null),m=(0,W.useRef)(null),h=(0,W.useRef)(null),g=(0,W.useRef)(null),_=(0,W.useRef)(null),y=(0,W.useRef)(null),[b,x]=(0,W.useState)(!1),S=(0,W.useCallback)(()=>{p.current=null,x(!1)},[]),C=(0,W.useCallback)(()=>{g.current&&=(window.removeEventListener(`message`,g.current),null),_.current&&=(window.removeEventListener(`storage`,_.current),null)},[]),w=(0,W.useCallback)(()=>{f.current&&!f.current.closed&&f.current.close(),f.current=null,m.current&&=(clearInterval(m.current),null),h.current&&=(clearTimeout(h.current),null)},[]),T=oe();(0,W.useEffect)(()=>()=>{m.current&&clearInterval(m.current),h.current&&clearTimeout(h.current),f.current&&!f.current.closed&&f.current.close(),g.current&&window.removeEventListener(`message`,g.current),_.current&&window.removeEventListener(`storage`,_.current),y.current&&=(y.current(),null)},[]);let D=(0,W.useCallback)(async e=>{try{return(await c.fetchQuery({...N({path:{assistant_id:e}}),staleTime:0})).find(e=>e.provider===K&&e.connected)??null}catch{return null}},[c]),O=(0,W.useCallback)(async()=>{let e=p.current?.platformAssistantId;w(),S(),r((e?await D(e):null)?.scopes_granted??[])},[S,w,D,r]),k=(0,W.useCallback)(e=>{e.type===`vellum:oauth-complete`&&(!p.current||e.requestId!==p.current.requestId||(e.oauthStatus===`connected`?O():(w(),S())))},[S,w,O]),A=(0,W.useCallback)(e=>{let t=p.current;if(!t)return;let n=pe(e,window.location.origin,t.requestId);n&&k(n)},[k]),j=(0,W.useCallback)(e=>{let t=p.current;if(!t)return;let n=B(e,t.requestId);n&&(k(n),window.localStorage.removeItem(z(t.requestId)))},[k]);de((0,W.useCallback)(e=>{let t=p.current;t&&e.requestId===t.requestId&&k({type:`vellum:oauth-complete`,requestId:e.requestId,oauthStatus:e.oauthStatus,oauthProvider:e.oauthProvider,oauthCode:e.oauthCode})},[k]));let ie=(0,W.useCallback)(()=>{let t=crypto.randomUUID();if(C(),g.current=A,_.current=j,l){x(!0),(async()=>{let n;try{n=await ee(e)}catch{S();return}p.current={requestId:t,platformAssistantId:n},T.mutate({path:{assistant_id:n,provider:K},body:{requested_scopes:[],redirect_after_connect:`${E.account.oauth.popupComplete}?requestId=${t}&native=1`}},{onSuccess(e){re(e.connect_url)},onError(){S()}})})(),window.addEventListener(`message`,A),window.addEventListener(`storage`,j),y.current&&y.current();let n=ne(()=>{let e=p.current;if(!e){n(),y.current=null;return}(async()=>{let t=await D(e.platformAssistantId);p.current&&(t?await O():S(),C(),n(),y.current=null)})()});y.current=n;return}let n=window.open(``,`_blank`,`width=500,height=600`);if(n===null){C();return}f.current=n,x(!0),window.addEventListener(`message`,A),window.addEventListener(`storage`,j),m.current=setInterval(()=>{f.current&&f.current.closed&&p.current&&!h.current&&(h.current=setTimeout(async()=>{h.current=null;let e=p.current;if(!e)return;let t=window.localStorage.getItem(z(e.requestId));if(t)try{let n=JSON.parse(t);if(I(n,e.requestId)){k(n),window.localStorage.removeItem(z(e.requestId)),C();return}}catch{}let n=await D(e.platformAssistantId);p.current&&(n?await O():(w(),S()),C())},1e3))},100),(async()=>{let n;try{n=await ee(e)}catch{w(),S(),C();return}p.current={requestId:t,platformAssistantId:n},T.mutate({path:{assistant_id:n,provider:K},body:{requested_scopes:[],redirect_after_connect:`${E.account.oauth.popupComplete}?requestId=${t}`}},{onSuccess(e){f.current&&!f.current.closed?f.current.location.href=e.connect_url:p.current&&(w(),S(),C())},onError(){w(),S(),C()}})})()},[e,S,w,D,k,A,j,O,l,C,T]),ae=t||`your assistant`,M=t||`Your assistant`;return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col items-center ${s?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:o,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${s?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Connect Google`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`mt-4 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`If you use Google, ${ae} can use Gmail, Calendar, and Drive with your permission.`}),(0,G.jsx)(`div`,{className:`mt-6 flex items-stretch justify-center gap-3`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:we.map(e=>(0,G.jsxs)(`div`,{className:`flex w-24 flex-col items-center gap-2.5 rounded-2xl bg-[var(--surface-lift)] px-3 pb-3 pt-4`,children:[(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:28,height:28,className:`h-7 w-7 object-contain`,loading:`eager`}),(0,G.jsx)(`span`,{className:`text-center text-xs leading-tight text-[var(--content-tertiary)]`,children:e.label})]},e.id))}),(0,G.jsx)(`p`,{className:`mt-8 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.25s both`},children:`${M} will never send email, change calendar events, or edit files without your permission. You can disconnect at any time.`}),(0,G.jsxs)(`div`,{className:`${s?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.35s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:ie,disabled:b||T.isPending,className:`${s?`h-9`:`h-11 text-base`}`,children:b||T.isPending?(0,G.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[(0,G.jsx)(d,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization...`]}):`Connect Google`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:i,disabled:b||T.isPending,className:`${s?`h-9`:`h-11 text-base`}`,children:`Skip for now`})]})]})})}function Ee({userName:e,assistantName:t,selectedGroupId:r,displayedAssistantNames:i,onUserNameChange:a,onAssistantNameChange:o,onGroupChange:s,onBack:c,onComplete:l,onSkip:d}){let f=v();return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col items-center ${f?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center ${c?`grid-cols-[auto_1fr_auto]`:``}`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[c?(0,G.jsx)(`button`,{type:`button`,onClick:c,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}):null,(0,G.jsx)(`h1`,{className:`text-center ${f?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Let's get to know each other.`}),c?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}):null]}),(0,G.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change these any time.`}),(0,G.jsxs)(`div`,{className:`${f?`mt-6`:`mt-8`} flex w-full flex-col ${f?`gap-4`:`gap-6`}`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(m,{label:`Your name`,placeholder:`Your name`,value:e,onChange:e=>a(e.target.value),className:H,fullWidth:!0}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(m,{label:`What should I go by?`,placeholder:`Assistant name`,value:t,onChange:e=>o(e.target.value),className:H,fullWidth:!0}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`A few to try`}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:i.map(e=>{let n=e===t;return(0,G.jsx)(`button`,{type:`button`,onClick:()=>o(e),"aria-pressed":n,className:`cursor-pointer rounded-full border px-3 py-1 text-label-small-default transition-colors ${n?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] text-[var(--content-secondary)] hover:bg-[var(--surface-base)]`}`,children:e},e)})})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Pick a vibe`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:U.map(e=>(0,G.jsx)(De,{group:e,isActive:r===e.id,onToggle:()=>s(r===e.id?null:e.id)},e.id))})]})]}),(0,G.jsxs)(`div`,{className:`${f?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:l,className:`${f?`h-9`:`h-11 text-base`}`,children:`Let's go`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:d,className:`${f?`h-9`:`h-11 text-base`}`,children:`Skip`})]})]})})}function De({group:e,isActive:t,onToggle:n}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":`${e.label}, ${e.descriptor}`,className:`flex cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 text-left transition-colors ${t?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default ${t?`text-[var(--content-inset)]`:`text-[var(--content-default)]`}`,children:e.descriptor}),(0,G.jsx)(`span`,{className:`text-body-small-default ${t?`text-[var(--content-inset)] opacity-60`:`text-[var(--content-tertiary)]`}`,children:e.tagline})]})}function Oe({userName:e,assistantName:t,displayedAssistantNames:r,onUserNameChange:i,onAssistantNameChange:a,onBack:o,onContinue:s,onSkip:c,currentStep:l,totalSteps:d}){return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center pb-4`,style:{paddingTop:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[o?(0,G.jsx)(n,{variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(u,{}),onClick:o,"aria-label":`Back`}):(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}),(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(be,{current:l,total:d})}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-4`,children:[(0,G.jsx)(`h1`,{className:`text-center text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Let's get to know each other.`}),(0,G.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change these any time.`}),(0,G.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-6`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(m,{label:`Your name`,placeholder:`Your name`,value:e,onChange:e=>i(e.target.value),className:H,fullWidth:!0}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(m,{label:`What should I go by?`,placeholder:`Assistant name`,value:t,onChange:e=>a(e.target.value),className:H,fullWidth:!0}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`A few to try`}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.map(e=>{let n=e===t;return(0,G.jsx)(`button`,{type:`button`,onClick:()=>a(e),"aria-pressed":n,className:`cursor-pointer rounded-full border px-3 py-1 text-label-small-default transition-colors ${n?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] text-[var(--content-secondary)] hover:bg-[var(--surface-base)]`}`,children:e},e)})})]})]})]}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:s,className:`h-11 text-base`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:c,className:`h-11 text-base`,children:`Skip`})]})]})})}var ke=[{id:`chatgpt`,label:`ChatGPT`,logoSrc:P(`/images/prior-assistants/chatgpt.svg`)},{id:`claude`,label:`Claude`,logoSrc:P(`/images/prior-assistants/claude.svg`)},{id:`openclaw`,label:`OpenClaw`,logoSrc:P(`/images/prior-assistants/openclaw.png`)},{id:`hermes`,label:`Hermes`,logoSrc:P(`/images/prior-assistants/hermes.png`)},{id:`manus`,label:`Manus`,logoSrc:P(`/images/prior-assistants/manus.svg`)},{id:`gemini`,label:`Gemini`,logoSrc:P(`/images/prior-assistants/gemini.svg`)},{id:`copilot`,label:`Copilot`,logoSrc:P(`/images/prior-assistants/copilot.svg`)}];function Ae({selectedAssistants:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),[s,l]=(0,W.useState)(()=>J(e)),[d,h]=(0,W.useState)(()=>s.length>0),g=(0,W.useRef)(Y(e));(0,W.useEffect)(()=>{let t=Y(e);if(t===g.current)return;let n=J(e);l(n),h(e=>e||n.length>0),g.current=t},[e]),(0,W.useEffect)(()=>{let n=new Set([...e].filter(e=>!e.startsWith(`other:`))),r=new Set;for(let e of s.split(`,`)){let t=e.trim();t&&(r.has(t)||(r.add(t),n.add(`other:${t}`)))}q(n,e)||(g.current=Y(n),t(n))},[s]);let _=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)},y=(0,W.useMemo)(()=>{let e=new Set;return s.split(`,`).map(e=>e.trim()).filter(t=>!t||e.has(t)?!1:(e.add(t),!0))},[s]),b=e.size===0?`Continue`:`Continue · ${e.size} selected`;return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center grid-cols-[auto_1fr_auto]`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Have you used any of these?`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`${o?`mt-3`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`If you've built anything with another assistant, I can help you bring it over.`}),(0,G.jsxs)(`div`,{className:`${o?`mt-4`:`mt-8`} grid w-full grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:[ke.map(t=>(0,G.jsx)(je,{assistant:t,selected:e.has(t.id),onToggle:()=>_(t.id)},t.id)),d?null:(0,G.jsx)(Me,{onClick:()=>h(!0)})]}),d?(0,G.jsx)(c,{padding:`md`,className:`mt-3 w-full border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_8%,transparent)]`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:`Something else`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>{h(!1),l(``)},"aria-label":`Dismiss custom assistants`,className:`ml-auto inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-md text-[var(--content-tertiary)] hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(p,{className:`h-3 w-3`,"aria-hidden":`true`})})]}),(0,G.jsx)(m,{"aria-label":`Other assistants`,placeholder:`e.g. Perplexity, Poe, Character.AI...`,value:s,onChange:e=>l(e.target.value),helperText:`Separate multiple assistants with commas`,className:H,fullWidth:!0}),y.length>0?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(e=>(0,G.jsx)(`span`,{className:`rounded-full bg-[var(--primary-base)] px-3 py-1 text-label-small-default text-[var(--content-inset)]`,children:e},e))}):null]})}):null,(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:b}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I haven't used any`})]})]})})}function q(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function J(e){return[...e].filter(e=>e.startsWith(`other:`)).map(e=>e.slice(6)).sort().join(`, `)}function Y(e){return[...e].filter(e=>e.startsWith(`other:`)).sort().join(`|`)}function je({assistant:e,selected:t,onToggle:n}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":e.label,className:`relative flex h-[88px] w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border p-2 transition-colors ${t?`border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_10%,transparent)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(Ne,{assistant:e,size:32}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:e.label}),t?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--primary-base)]`,children:(0,G.jsx)(l,{className:`h-2.5 w-2.5 text-[var(--content-inset)]`,"aria-hidden":`true`})}):null]})}function Me({onClick:e}){return(0,G.jsxs)(`button`,{type:`button`,onClick:e,"aria-label":`Something else`,className:`flex h-[88px] w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-2 transition-colors hover:bg-[var(--surface-base)]`,children:[(0,G.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,G.jsx)(R,{className:`h-4 w-4 text-[var(--content-secondary)]`,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:`Something else`})]})}function Ne({assistant:e,size:t}){if(e.logoSrc)return e.logoSrcDark?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`flex items-center justify-center dark:hidden`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})}),(0,G.jsx)(`span`,{className:`hidden items-center justify-center dark:flex`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrcDark,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})})]}):(0,G.jsx)(`span`,{className:`flex items-center justify-center`,style:{width:t,height:t},children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})});let n=e.label.slice(0,2).toUpperCase();return(0,G.jsx)(`span`,{className:`flex items-center justify-center rounded-full bg-[var(--surface-base)] text-label-small-default text-[var(--content-default)]`,style:{width:t,height:t},"aria-hidden":`true`,children:n})}function Pe({selectedTasks:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),s=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)};return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`What are you working on?`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`${o?`mt-2`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`Pick the one or two you do most — you can select more if it really is all of it.`}),(0,G.jsx)(`div`,{className:`${o?`mt-6`:`mt-8`} flex w-full flex-col ${o?`gap-1`:`gap-2`}`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:ce.map(t=>{let n=F[t.iconKey],r=e.has(t.id);return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>s(t.id),"aria-pressed":r,className:`group flex w-full cursor-pointer items-center ${o?`gap-2 p-3`:`gap-3 px-4 py-3`} rounded-lg border text-left transition-colors ${r?`border-[var(--primary-base)] bg-[var(--primary-base)]/10`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`div`,{className:`flex w-6 shrink-0 items-center justify-center text-[var(--content-secondary)]`,children:n?(0,G.jsx)(n,{className:`h-4 w-4`}):null}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:t.label}),(0,G.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:t.sublabel})]}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-md ${r?`bg-[var(--primary-base)]`:`border-[1.5px] border-[var(--border-element)]`}`,children:r?(0,G.jsx)(l,{className:`h-3 w-3 text-[var(--content-inset)]`}):null})]},t.id)})}),(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I'll set this up later`})]})]})})}var Fe=new Set([`gmail`,`google-calendar`,`google-drive`]),Ie=[{id:`gmail`,label:`Gmail`,logoSrc:P(`/images/integrations/gmail.svg`)},{id:`outlook`,label:`Outlook`,logoSrc:P(`/images/integrations/outlook.png`)},{id:`google-calendar`,label:`Google Calendar`,logoSrc:P(`/images/integrations/google-calendar.svg`)},{id:`slack`,label:`Slack`,logoSrc:P(`/images/integrations/slack.svg`)},{id:`notion`,label:`Notion`,logoSrc:P(`/images/integrations/notion.svg`)},{id:`linear`,label:`Linear`,logoSrc:P(`/images/integrations/linear-light-logo.svg`)},{id:`jira`,label:`Jira`,logoSrc:P(`/images/integrations/jira.svg`)},{id:`github`,label:`GitHub`,logoSrc:P(`/images/integrations/github.svg`),logoSrcDark:P(`/images/integrations/github-dark.svg`)},{id:`figma`,label:`Figma`,logoSrc:P(`/images/integrations/figma.svg`)},{id:`google-drive`,label:`Google Drive`,logoSrc:P(`/images/integrations/google-drive.svg`)},{id:`excel`,label:`Excel`,logoSrc:P(`/images/integrations/excel.svg`)},{id:`apple-notes`,label:`Apple Notes`,logoSrc:P(`/images/integrations/apple-notes.svg`)}];function Le(e){let t=e.map(e=>e.startsWith(`other:`)?e.slice(6):e);return Array.from(new Set(t)).sort()}function Re({selectedTools:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),[s,l]=(0,W.useState)(()=>ze(e)),[d,h]=(0,W.useState)(()=>s.length>0),g=(0,W.useRef)(Z(e));(0,W.useEffect)(()=>{let t=Z(e);if(t===g.current)return;let n=ze(e);l(n),h(e=>e||n.length>0),g.current=t},[e]),(0,W.useEffect)(()=>{let n=new Set([...e].filter(e=>!e.startsWith(`other:`))),r=new Set;for(let e of s.split(`,`)){let t=e.trim();t&&(r.has(t)||(r.add(t),n.add(`other:${t}`)))}X(n,e)||(g.current=Z(n),t(n))},[s]);let _=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)},y=(0,W.useMemo)(()=>{let e=new Set;return s.split(`,`).map(e=>e.trim()).filter(t=>!t||e.has(t)?!1:(e.add(t),!0))},[s]),b=e.size===0?`Continue`:`Continue · ${e.size} selected`;return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center ${r?`grid-cols-[auto_1fr_auto]`:``}`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[r?(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}):null,(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`What do you use?`}),r?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}):null]}),(0,G.jsx)(`p`,{className:`${o?`mt-3`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`This helps me tailor how I assist you. No connections needed — you can set those up later.`}),(0,G.jsxs)(`div`,{className:`grid w-full gap-2 ${o?`mt-4 grid-cols-4`:`mt-8 grid-cols-2 sm:grid-cols-3 md:grid-cols-4`}`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:[Ie.map(t=>(0,G.jsx)(Q,{tool:t,selected:e.has(t.id),onToggle:()=>_(t.id),electron:o},t.id)),d?null:(0,G.jsx)($,{onClick:()=>h(!0),electron:o})]}),d?(0,G.jsx)(c,{padding:o?`sm`:`md`,className:`mt-3 w-full border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_8%,transparent)]`,children:(0,G.jsxs)(`div`,{className:`flex flex-col ${o?`gap-2`:`gap-3`}`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:`Something else`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>{h(!1),l(``)},"aria-label":`Dismiss custom tools`,className:`ml-auto inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-md text-[var(--content-tertiary)] hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(p,{className:`h-3 w-3`,"aria-hidden":`true`})})]}),(0,G.jsx)(m,{"aria-label":`Other tools`,placeholder:`e.g. Trello, Basecamp, Asana...`,value:s,onChange:e=>l(e.target.value),helperText:`Separate multiple tools with commas`,className:H,fullWidth:!0}),y.length>0?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(e=>(0,G.jsx)(`span`,{className:`rounded-full bg-[var(--primary-base)] px-3 py-1 text-label-small-default text-[var(--content-inset)]`,children:e},e))}):null]})}):null,(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:b}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I'll set this up later`})]})]})})}function X(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ze(e){return[...e].filter(e=>e.startsWith(`other:`)).map(e=>e.slice(6)).sort().join(`, `)}function Z(e){return[...e].filter(e=>e.startsWith(`other:`)).sort().join(`|`)}function Q({tool:e,selected:t,onToggle:n,electron:r}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":e.label,className:`relative flex ${r?`h-[72px]`:`h-[88px]`} w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border p-2 transition-colors ${t?`border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_10%,transparent)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(Be,{tool:e,size:32}),(0,G.jsx)(`span`,{className:`${r?`w-full truncate`:`line-clamp-2`} text-center text-label-medium-default text-[var(--content-default)]`,children:e.label}),t?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--primary-base)]`,children:(0,G.jsx)(l,{className:`h-2.5 w-2.5 text-[var(--content-inset)]`,"aria-hidden":`true`})}):null]})}function $({onClick:e,electron:t}){return(0,G.jsxs)(`button`,{type:`button`,onClick:e,"aria-label":`Something else`,className:`flex ${t?`min-h-[72px]`:`h-[88px]`} w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-2 transition-colors hover:bg-[var(--surface-base)]`,children:[(0,G.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,G.jsx)(R,{className:`h-4 w-4 text-[var(--content-secondary)]`,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:`Something else`})]})}function Be({tool:e,size:t}){if(e.logoSrc)return e.logoSrcDark?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`flex items-center justify-center dark:hidden`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})}),(0,G.jsx)(`span`,{className:`hidden items-center justify-center dark:flex`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrcDark,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})})]}):(0,G.jsx)(`span`,{className:`flex items-center justify-center`,style:{width:t,height:t},children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})});let n=e.label.slice(0,2).toUpperCase();return(0,G.jsx)(`span`,{className:`flex items-center justify-center rounded-full bg-[var(--surface-base)] text-label-small-default text-[var(--content-default)]`,style:{width:t,height:t},"aria-hidden":`true`,children:n})}function Ve({selectedGroupId:e,onGroupChange:t,onBack:r,onContinue:i,onSkip:a,currentStep:o,totalSteps:s}){return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center pb-4`,style:{paddingTop:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(n,{variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(u,{}),onClick:r,"aria-label":`Back`}),(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(be,{current:o,total:s})}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-4`,children:[(0,G.jsx)(`h1`,{className:`w-full text-left text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`What's my vibe?`}),(0,G.jsx)(`p`,{className:`mt-2 w-full text-left text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change this any time.`}),(0,G.jsx)(`div`,{className:`mt-8 flex w-full flex-col gap-3`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:U.map(n=>{let r=e===n.id;return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>t(r?null:n.id),"aria-pressed":r,className:`flex cursor-pointer items-center justify-between rounded-xl border px-4 py-4 text-left transition-colors ${r?`border-[var(--content-default)] bg-[var(--surface-lift)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:n.descriptor}),(0,G.jsx)(`span`,{className:`flex h-5 w-5 items-center justify-center rounded-full border-2 transition-colors ${r?`border-[var(--content-default)]`:`border-[var(--content-disabled)]`}`,children:r&&(0,G.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[var(--content-default)]`})})]},n.id)})})]}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:i,className:`h-11 text-base`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`h-11 text-base`,children:`Skip`})]})]})})}function He(e){let[t,n]=(0,W.useState)(()=>(e??``).trim()),r=(0,W.useRef)(!1);return(0,W.useEffect)(()=>{if(r.current)return;let t=(e??``).trim();t&&n(e=>e||t)},[e]),{value:t,onChange:(0,W.useCallback)(e=>{r.current=!0,n(e)},[])}}var Ue=[`gmail`,`google-calendar`,`google-drive`],We=`experiment-activation-flow-2026-06-03`,Ge=`BOOTSTRAP-ACTIVATION-RAIL.md`;function Ke(e,t,n){return t?.initialMessage?t.initialMessage:n?ae(e):M}function qe(e){let{mode:t,recipe:n}=e,r=e.connectedScopes!==void 0,i;i=t===`native`?{tools:[],tasks:[],tone:e.tone,googleConnected:!1}:t===`paredDown`?{tools:r?[...Ue]:[],tasks:n?.tasks??[],tone:e.tone,googleConnected:r}:{tools:Le([...e.selectedTools]),tasks:[...e.selectedTasks].sort(),tone:e.tone},n&&(i.cohort=n.cohort,i.bootstrapTemplate=n.bootstrapTemplate,i.skills=n.skills),e.activationFlowEnabled&&(i.cohort=We,i.bootstrapTemplate=Ge);let a=e.userName.trim();a&&(i.userName=a);let o=e.occupation?.trim();o&&(i.occupation=o);let s=e.assistantName.trim();return s&&(i.assistantName=s),t===`paredDown`?r&&(i.googleScopes=e.connectedScopes):t===`control`&&(r?(i.googleConnected=!0,i.googleScopes=e.connectedScopes):e.googleConnected?(i.googleConnected=!0,i.googleScopes=e.googleScopes):i.googleConnected=!1),t===`control`&&e.selectedPriorAssistants.size>0&&(i.priorAssistants=Le([...e.selectedPriorAssistants])),i.initialMessage=Ke(i,e.activationFlowEnabled?null:n,e.selfIntroGreetingEnabled),i}function Je(e){return!e.localMode||e.platformSession===`present`?!0:e.platformSession===`unknown`&&e.hasCachedPlatformAssistant}function Ye(e){let{paredDown:t}=e;return[{id:`name`,funnelStep:V.nameVibe,enabled:!0},{id:`taskTone`,funnelStep:V.controlWorkType,enabled:!t},{id:`tools`,funnelStep:V.controlTools,enabled:!t},{id:`priorAssistants`,funnelStep:V.controlPriorAssistants,enabled:!t&&e.canOfferPriorAssistants},{id:`google`,funnelStep:t?V.gmailConnect:V.controlGmailConnect,enabled:e.canOfferGoogleStep&&(t||e.hasGoogleTool)},{id:`iosApp`,funnelStep:V.controlGetApp,enabled:!t&&e.showIOSAppStep}].filter(e=>e.enabled).map(({enabled:e,...t})=>t)}function Xe(){return[{id:`nativeName`,funnelStep:null},{id:`nativeVibe`,funnelStep:null}]}var Ze=`1`;function Qe(e){return e===`nativeVibe`||e===Ze?`nativeVibe`:null}function $e(e,t){let n=e.findIndex(e=>e.id===t);return n<0?null:e[n+1]?.id??null}function et(e,t){let n=e.findIndex(e=>e.id===t);return n<=0?null:e[n-1]?.id??null}function tt(){let e=r(),t=te(),n=O()&&D();return(0,W.useEffect)(()=>{!n&&!t&&e(E.onboarding.privacy,{replace:!0})},[n,t,e]),t||n}function nt(e,t){let n=e?`prechat_native_screen:${e}`:null,[r,i]=(0,W.useState)(()=>t?`nativeName`:`name`),a=(0,W.useCallback)(e=>{if(n)try{e===null?sessionStorage.removeItem(n):sessionStorage.setItem(n,e)}catch{}},[n]);return(0,W.useLayoutEffect)(()=>{if(n)try{let e=Qe(sessionStorage.getItem(n));e&&i(e)}catch{}},[n]),(0,W.useEffect)(()=>{t&&a(r===`nativeVibe`?`nativeVibe`:null)},[t,r,a]),{currentStep:r,setCurrentStep:i,clearPersistedStep:(0,W.useCallback)(()=>{a(null)},[a])}}var rt=3;function it(){let e=h();return e?.cloud===`vellum`?e.assistantId:_()[0]?.assistantId??null}function at(){let e=r(),[t]=i(),n=t.get(`preview`)===`true`,a=C.use.user(),s=x(),c=w(),l=a?.id??null,u=a?.firstName??``,d=a?.lastName??``,f=te(),p=y.use.activeAssistantId(),m=g(),h=k()&&!me(),_=A.use.stringFlags().preChatOnboardingExperiment20260606??`control`,v=(A.use.stringFlags().experimentActivationFlow20260603??`control`)===`variant-a`,ee=A.use.selfIntroGreeting(),T=he(_),D=ue()??T,O=D===fe.paredDown,ne=m?it():null,re=tt(),{currentStep:ae,setCurrentStep:M,clearPersistedStep:oe}=nt(l,f),N=C.use.platformSession(),P=S(N),[F,ce]=(0,W.useState)(()=>new Set),[le,de]=(0,W.useState)(()=>new Set),[pe,ge]=(0,W.useState)(()=>new Set),{value:I,onChange:L}=He(m&&!P?``:u||d),[R,z]=(0,W.useState)(null),[B]=(0,W.useState)(()=>ye()),[V,H]=(0,W.useState)(``),[U,be]=(0,W.useState)(!1),[Se,K]=(0,W.useState)([]),{data:we}=o({...se(),enabled:!c&&s&&(!m||P)}),{data:De,isLoading:ke}=o({queryKey:[`onboarding-recipe`,l],queryFn:xe,enabled:!c&&s&&!f&&!m,staleTime:1/0}),q=De??null,J=we?.id??p??ne,Y=Je({localMode:m,platformSession:N,hasCachedPlatformAssistant:ne!==null}),je=Y,Me=Y,Ne=async()=>{await b.checkAssistant(),e(`${E.assistant}?onboarding=1`,{replace:!0})};function Ie(e,t=D){n||_e(e,{userId:l,variant:ve(t)})}let Le=[...F].some(e=>Fe.has(e)),X=f?Xe():Ye({paredDown:O,canOfferPriorAssistants:Me,canOfferGoogleStep:n?!1:je,hasGoogleTool:Le,showIOSAppStep:h});function ze(t){if(n){e(-1);return}ie(qe({mode:f?`native`:O?`paredDown`:`control`,recipe:f?null:q,selectedTools:F,selectedTasks:le,selectedPriorAssistants:t?.selectedPriorAssistants??pe,tone:R??q?.tone??`grounded`,userName:I,assistantName:V,selfIntroGreetingEnabled:ee,activationFlowEnabled:f?void 0:v,googleConnected:U,googleScopes:Se,connectedScopes:t?.connectedScopes}));let r=V.trim();r&&j(r),f?(oe(),e(E.onboarding.privacy)):(b.markExpectingFirstMessage(),Ne())}let Z=(e,t)=>{e.funnelStep&&Ie(e.funnelStep);let n=$e(X,e.id);n?M(n):ze(t)},Q=e=>{let t=et(X,e.id);t&&M(t)};if(!re||ke)return null;let $=X.find(e=>e.id===ae)??X[0];return $?$.id===`nativeName`?(0,G.jsx)(Oe,{userName:I,assistantName:V,displayedAssistantNames:B,onUserNameChange:L,onAssistantNameChange:H,onContinue:()=>Z($),onSkip:()=>Z($),currentStep:0,totalSteps:rt}):$.id===`nativeVibe`?(0,G.jsx)(Ve,{selectedGroupId:R,onGroupChange:z,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($),currentStep:1,totalSteps:rt}):$.id===`name`?(0,G.jsx)(Ee,{userName:I,assistantName:V,selectedGroupId:R,displayedAssistantNames:B,onUserNameChange:L,onAssistantNameChange:H,onGroupChange:z,onComplete:()=>Z($),onSkip:()=>Z($)}):$.id===`taskTone`?(0,G.jsx)(Pe,{selectedTasks:le,onChange:de,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($)}):$.id===`tools`?(0,G.jsx)(Re,{selectedTools:F,onChange:ce,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($)}):$.id===`priorAssistants`?(0,G.jsx)(Ae,{selectedAssistants:pe,onChange:ge,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>{let e=new Set;ge(e),Z($,{selectedPriorAssistants:e})}}):$.id===`google`?J?(0,G.jsx)(Te,{assistantId:J,assistantName:V,onConnect:e=>{be(!0),K(e),Z($,{connectedScopes:e})},onSkip:()=>Z($),onBack:()=>Q($)}):null:$.id===`iosApp`?(0,G.jsx)(Ce,{onComplete:()=>Z($)}):null:null}function ot(){return(0,G.jsx)(at,{})}export{ot as PreChatRoute};
|
|
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{n as a}from"./QueryClientProvider-DKhXIxGb.js";import{t as o}from"./useQuery-B45lW1Kk.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./card-Bv5O5juh.js";import{t as l}from"./check-DFNrQERi.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import{t as d}from"./loader-circle-Cz7opInR.js";import{t as f}from"./pencil-CUIr0IFo.js";import{t as p}from"./x-CkSVp1Ok.js";import{t as m}from"./input-CoUmPnRU.js";import{l as h,p as g,s as _}from"./local-mode-Bskd5bsT.js";import{t as v}from"./is-electron-y5bNUVyG.js";import{n as y}from"./resolved-assistants-store-DAzPZ1eV.js";import{A as b,C as ee,a as x,j as S,n as C,o as w}from"./auth-store-65JKPW7C.js";import{t as T}from"./client.gen-DVfIRXUZ.js";import{m as te}from"./native-biometric-B2cBAQ1U.js";import{c as E}from"./routes-BXlWEOF0.js";import{i as D,s as O}from"./prefs-DNYLVDvB.js";import{a as k}from"./platform-detection-DGxL0AsS.js";import{t as A}from"./client-feature-flag-store-Ri-a_LuI.js";import{n as ne,t as re}from"./browser-Cnr7iqbJ.js";import{c as j,l as ie,n as ae,t as M}from"./prechat-BBwYr5Qb.js";import{Ct as oe,b as N,r as se}from"./react-query.gen-DV9K_z-o.js";import{t as P}from"./public-asset-WikBpVQd.js";import{H as F,V as ce,_ as le,_t as ue,an as de,dt as fe,en as pe,g as me,gt as he,h as ge,nn as I,on as L,pa as R,pt as _e,rn as z,tn as B,ut as V,vt as ve}from"./index-B4Qq7TL7.js";import{t as H}from"./onboarding-step-layout-Cup_f9lB.js";import{n as U,r as ye}from"./prechat-names-Cjl3JzzN.js";import{t as be}from"./step-indicator-dots-B-KCGh9e.js";var W=e(t(),1);async function xe(){try{let{data:e,response:t}=await T.get({url:`/v1/onboarding/recipe/`,throwOnError:!1});if(!t?.ok||!e)return null;let n=e;return typeof n.cohort!=`string`||!Array.isArray(n.tasks)||typeof n.tone!=`string`||typeof n.bootstrap_template!=`string`||typeof n.initial_message!=`string`||!Array.isArray(n.skills)||typeof n.skip_prechat!=`boolean`?null:{cohort:n.cohort,tasks:n.tasks,tone:n.tone,bootstrapTemplate:n.bootstrap_template,initialMessage:n.initial_message,skills:n.skills,skipPrechat:n.skip_prechat}}catch{return null}}var G=s(),Se=[{label:`Push notifications`,detail:`stay in the loop even when the browser is closed`},{label:`Biometric login`,detail:`Face ID & Touch ID for instant, secure access`},{label:`Native haptics`,detail:`tactile feedback that feels part of the device`},{label:`Home screen access`,detail:`launch your assistant with a single tap`}];function Ce({onComplete:e}){function t(){le(),ge(),e()}return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col items-center justify-center px-6 pb-40 text-center`,children:[(0,G.jsx)(`div`,{className:`mb-8 flex size-16 items-center justify-center rounded-2xl border`,style:{background:`var(--surface-overlay)`,borderColor:`var(--border-element)`,boxShadow:`0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04)`,animation:`fadeInUp 0.3s ease-out both`},children:(0,G.jsxs)(`svg`,{width:`28`,height:`28`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--content-default)`},"aria-hidden":!0,children:[(0,G.jsx)(`rect`,{x:`5`,y:`2`,width:`14`,height:`20`,rx:`3`}),(0,G.jsx)(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`18.01`})]})}),(0,G.jsx)(`p`,{className:`text-label-small-default mb-3 uppercase tracking-[0.2em]`,style:{color:`var(--content-tertiary)`,animation:`fadeInUp 0.3s ease-out 0.05s both`},children:`One more thing`}),(0,G.jsx)(`h1`,{className:`mb-3 text-3xl font-semibold tracking-tight`,style:{color:`var(--content-default)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Your assistant, in your pocket.`}),(0,G.jsx)(`p`,{className:`text-body-medium-lighter mb-10 max-w-sm`,style:{color:`var(--content-secondary)`,animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`The iOS app keeps your assistant a tap away — with push notifications, biometric login, and native haptics.`}),(0,G.jsx)(`div`,{className:`mb-10 w-full rounded-xl border px-5 py-4`,style:{background:`var(--surface-overlay)`,borderColor:`var(--border-element)`,animation:`fadeInUp 0.3s ease-out 0.2s both`},children:(0,G.jsx)(`ul`,{className:`space-y-4`,children:Se.map((e,t)=>(0,G.jsxs)(`li`,{className:`flex items-start gap-3`,style:{animation:`fadeInUp 0.3s ease-out ${.25+t*.05}s both`},children:[(0,G.jsx)(`span`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full`,style:{background:`var(--system-positive-weak)`},children:(0,G.jsx)(l,{size:12,style:{color:`var(--system-positive-strong)`}})}),(0,G.jsxs)(`span`,{className:`text-left`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e.label}),(0,G.jsxs)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[` — `,e.detail]})]})]},e.label))})}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.45s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:`Download on the App Store`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:e,className:`h-11 text-base`,children:`Continue in browser`})]})]})})}var K=`google`,we=[{id:`gmail`,label:`Gmail`,logoSrc:P(`/images/integrations/gmail.svg`)},{id:`google-calendar`,label:`Google Calendar`,logoSrc:P(`/images/integrations/google-calendar.svg`)},{id:`google-drive`,label:`Google Drive`,logoSrc:P(`/images/integrations/google-drive.svg`)}];function Te({assistantId:e,assistantName:t,onConnect:r,onSkip:i,onBack:o}){let s=v(),c=a(),l=te(),f=(0,W.useRef)(null),p=(0,W.useRef)(null),m=(0,W.useRef)(null),h=(0,W.useRef)(null),g=(0,W.useRef)(null),_=(0,W.useRef)(null),y=(0,W.useRef)(null),[b,x]=(0,W.useState)(!1),S=(0,W.useCallback)(()=>{p.current=null,x(!1)},[]),C=(0,W.useCallback)(()=>{g.current&&=(window.removeEventListener(`message`,g.current),null),_.current&&=(window.removeEventListener(`storage`,_.current),null)},[]),w=(0,W.useCallback)(()=>{f.current&&!f.current.closed&&f.current.close(),f.current=null,m.current&&=(clearInterval(m.current),null),h.current&&=(clearTimeout(h.current),null)},[]),T=oe();(0,W.useEffect)(()=>()=>{m.current&&clearInterval(m.current),h.current&&clearTimeout(h.current),f.current&&!f.current.closed&&f.current.close(),g.current&&window.removeEventListener(`message`,g.current),_.current&&window.removeEventListener(`storage`,_.current),y.current&&=(y.current(),null)},[]);let D=(0,W.useCallback)(async e=>{try{return(await c.fetchQuery({...N({path:{assistant_id:e}}),staleTime:0})).find(e=>e.provider===K&&e.connected)??null}catch{return null}},[c]),O=(0,W.useCallback)(async()=>{let e=p.current?.platformAssistantId;w(),S(),r((e?await D(e):null)?.scopes_granted??[])},[S,w,D,r]),k=(0,W.useCallback)(e=>{e.type===`vellum:oauth-complete`&&(!p.current||e.requestId!==p.current.requestId||(e.oauthStatus===`connected`?O():(w(),S())))},[S,w,O]),A=(0,W.useCallback)(e=>{let t=p.current;if(!t)return;let n=pe(e,window.location.origin,t.requestId);n&&k(n)},[k]),j=(0,W.useCallback)(e=>{let t=p.current;if(!t)return;let n=B(e,t.requestId);n&&(k(n),window.localStorage.removeItem(z(t.requestId)))},[k]);de((0,W.useCallback)(e=>{let t=p.current;t&&e.requestId===t.requestId&&k({type:`vellum:oauth-complete`,requestId:e.requestId,oauthStatus:e.oauthStatus,oauthProvider:e.oauthProvider,oauthCode:e.oauthCode})},[k]));let ie=(0,W.useCallback)(()=>{let t=crypto.randomUUID();if(C(),g.current=A,_.current=j,l){x(!0),(async()=>{let n;try{n=await ee(e)}catch{S();return}p.current={requestId:t,platformAssistantId:n},T.mutate({path:{assistant_id:n,provider:K},body:{requested_scopes:[],redirect_after_connect:`${E.account.oauth.popupComplete}?requestId=${t}&native=1`}},{onSuccess(e){re(e.connect_url)},onError(){S()}})})(),window.addEventListener(`message`,A),window.addEventListener(`storage`,j),y.current&&y.current();let n=ne(()=>{let e=p.current;if(!e){n(),y.current=null;return}(async()=>{let t=await D(e.platformAssistantId);p.current&&(t?await O():S(),C(),n(),y.current=null)})()});y.current=n;return}let n=window.open(``,`_blank`,`width=500,height=600`);if(n===null){C();return}f.current=n,x(!0),window.addEventListener(`message`,A),window.addEventListener(`storage`,j),m.current=setInterval(()=>{f.current&&f.current.closed&&p.current&&!h.current&&(h.current=setTimeout(async()=>{h.current=null;let e=p.current;if(!e)return;let t=window.localStorage.getItem(z(e.requestId));if(t)try{let n=JSON.parse(t);if(I(n,e.requestId)){k(n),window.localStorage.removeItem(z(e.requestId)),C();return}}catch{}let n=await D(e.platformAssistantId);p.current&&(n?await O():(w(),S()),C())},1e3))},100),(async()=>{let n;try{n=await ee(e)}catch{w(),S(),C();return}p.current={requestId:t,platformAssistantId:n},T.mutate({path:{assistant_id:n,provider:K},body:{requested_scopes:[],redirect_after_connect:`${E.account.oauth.popupComplete}?requestId=${t}`}},{onSuccess(e){f.current&&!f.current.closed?f.current.location.href=e.connect_url:p.current&&(w(),S(),C())},onError(){w(),S(),C()}})})()},[e,S,w,D,k,A,j,O,l,C,T]),ae=t||`your assistant`,M=t||`Your assistant`;return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col items-center ${s?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:o,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${s?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Connect Google`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`mt-4 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`If you use Google, ${ae} can use Gmail, Calendar, and Drive with your permission.`}),(0,G.jsx)(`div`,{className:`mt-6 flex items-stretch justify-center gap-3`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:we.map(e=>(0,G.jsxs)(`div`,{className:`flex w-24 flex-col items-center gap-2.5 rounded-2xl bg-[var(--surface-lift)] px-3 pb-3 pt-4`,children:[(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:28,height:28,className:`h-7 w-7 object-contain`,loading:`eager`}),(0,G.jsx)(`span`,{className:`text-center text-xs leading-tight text-[var(--content-tertiary)]`,children:e.label})]},e.id))}),(0,G.jsx)(`p`,{className:`mt-8 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.25s both`},children:`${M} will never send email, change calendar events, or edit files without your permission. You can disconnect at any time.`}),(0,G.jsxs)(`div`,{className:`${s?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.35s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:ie,disabled:b||T.isPending,className:`${s?`h-9`:`h-11 text-base`}`,children:b||T.isPending?(0,G.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[(0,G.jsx)(d,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization...`]}):`Connect Google`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:i,disabled:b||T.isPending,className:`${s?`h-9`:`h-11 text-base`}`,children:`Skip for now`})]})]})})}function Ee({userName:e,assistantName:t,selectedGroupId:r,displayedAssistantNames:i,onUserNameChange:a,onAssistantNameChange:o,onGroupChange:s,onBack:c,onComplete:l,onSkip:d}){let f=v();return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col items-center ${f?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center ${c?`grid-cols-[auto_1fr_auto]`:``}`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[c?(0,G.jsx)(`button`,{type:`button`,onClick:c,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}):null,(0,G.jsx)(`h1`,{className:`text-center ${f?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Let's get to know each other.`}),c?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}):null]}),(0,G.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change these any time.`}),(0,G.jsxs)(`div`,{className:`${f?`mt-6`:`mt-8`} flex w-full flex-col ${f?`gap-4`:`gap-6`}`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(m,{label:`Your name`,placeholder:`Your name`,value:e,onChange:e=>a(e.target.value),className:H,fullWidth:!0}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(m,{label:`What should I go by?`,placeholder:`Assistant name`,value:t,onChange:e=>o(e.target.value),className:H,fullWidth:!0}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`A few to try`}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:i.map(e=>{let n=e===t;return(0,G.jsx)(`button`,{type:`button`,onClick:()=>o(e),"aria-pressed":n,className:`cursor-pointer rounded-full border px-3 py-1 text-label-small-default transition-colors ${n?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] text-[var(--content-secondary)] hover:bg-[var(--surface-base)]`}`,children:e},e)})})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Pick a vibe`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:U.map(e=>(0,G.jsx)(De,{group:e,isActive:r===e.id,onToggle:()=>s(r===e.id?null:e.id)},e.id))})]})]}),(0,G.jsxs)(`div`,{className:`${f?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:l,className:`${f?`h-9`:`h-11 text-base`}`,children:`Let's go`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:d,className:`${f?`h-9`:`h-11 text-base`}`,children:`Skip`})]})]})})}function De({group:e,isActive:t,onToggle:n}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":`${e.label}, ${e.descriptor}`,className:`flex cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 text-left transition-colors ${t?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default ${t?`text-[var(--content-inset)]`:`text-[var(--content-default)]`}`,children:e.descriptor}),(0,G.jsx)(`span`,{className:`text-body-small-default ${t?`text-[var(--content-inset)] opacity-60`:`text-[var(--content-tertiary)]`}`,children:e.tagline})]})}function Oe({userName:e,assistantName:t,displayedAssistantNames:r,onUserNameChange:i,onAssistantNameChange:a,onBack:o,onContinue:s,onSkip:c,currentStep:l,totalSteps:d}){return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center pb-4`,style:{paddingTop:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[o?(0,G.jsx)(n,{variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(u,{}),onClick:o,"aria-label":`Back`}):(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}),(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(be,{current:l,total:d})}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-4`,children:[(0,G.jsx)(`h1`,{className:`text-center text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Let's get to know each other.`}),(0,G.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change these any time.`}),(0,G.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-6`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(m,{label:`Your name`,placeholder:`Your name`,value:e,onChange:e=>i(e.target.value),className:H,fullWidth:!0}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(m,{label:`What should I go by?`,placeholder:`Assistant name`,value:t,onChange:e=>a(e.target.value),className:H,fullWidth:!0}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`A few to try`}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.map(e=>{let n=e===t;return(0,G.jsx)(`button`,{type:`button`,onClick:()=>a(e),"aria-pressed":n,className:`cursor-pointer rounded-full border px-3 py-1 text-label-small-default transition-colors ${n?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] text-[var(--content-secondary)] hover:bg-[var(--surface-base)]`}`,children:e},e)})})]})]})]}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:s,className:`h-11 text-base`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:c,className:`h-11 text-base`,children:`Skip`})]})]})})}var ke=[{id:`chatgpt`,label:`ChatGPT`,logoSrc:P(`/images/prior-assistants/chatgpt.svg`)},{id:`claude`,label:`Claude`,logoSrc:P(`/images/prior-assistants/claude.svg`)},{id:`openclaw`,label:`OpenClaw`,logoSrc:P(`/images/prior-assistants/openclaw.png`)},{id:`hermes`,label:`Hermes`,logoSrc:P(`/images/prior-assistants/hermes.png`)},{id:`manus`,label:`Manus`,logoSrc:P(`/images/prior-assistants/manus.svg`)},{id:`gemini`,label:`Gemini`,logoSrc:P(`/images/prior-assistants/gemini.svg`)},{id:`copilot`,label:`Copilot`,logoSrc:P(`/images/prior-assistants/copilot.svg`)}];function Ae({selectedAssistants:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),[s,l]=(0,W.useState)(()=>J(e)),[d,h]=(0,W.useState)(()=>s.length>0),g=(0,W.useRef)(Y(e));(0,W.useEffect)(()=>{let t=Y(e);if(t===g.current)return;let n=J(e);l(n),h(e=>e||n.length>0),g.current=t},[e]),(0,W.useEffect)(()=>{let n=new Set([...e].filter(e=>!e.startsWith(`other:`))),r=new Set;for(let e of s.split(`,`)){let t=e.trim();t&&(r.has(t)||(r.add(t),n.add(`other:${t}`)))}q(n,e)||(g.current=Y(n),t(n))},[s]);let _=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)},y=(0,W.useMemo)(()=>{let e=new Set;return s.split(`,`).map(e=>e.trim()).filter(t=>!t||e.has(t)?!1:(e.add(t),!0))},[s]),b=e.size===0?`Continue`:`Continue · ${e.size} selected`;return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center grid-cols-[auto_1fr_auto]`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Have you used any of these?`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`${o?`mt-3`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`If you've built anything with another assistant, I can help you bring it over.`}),(0,G.jsxs)(`div`,{className:`${o?`mt-4`:`mt-8`} grid w-full grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:[ke.map(t=>(0,G.jsx)(je,{assistant:t,selected:e.has(t.id),onToggle:()=>_(t.id)},t.id)),d?null:(0,G.jsx)(Me,{onClick:()=>h(!0)})]}),d?(0,G.jsx)(c,{padding:`md`,className:`mt-3 w-full border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_8%,transparent)]`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:`Something else`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>{h(!1),l(``)},"aria-label":`Dismiss custom assistants`,className:`ml-auto inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-md text-[var(--content-tertiary)] hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(p,{className:`h-3 w-3`,"aria-hidden":`true`})})]}),(0,G.jsx)(m,{"aria-label":`Other assistants`,placeholder:`e.g. Perplexity, Poe, Character.AI...`,value:s,onChange:e=>l(e.target.value),helperText:`Separate multiple assistants with commas`,className:H,fullWidth:!0}),y.length>0?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(e=>(0,G.jsx)(`span`,{className:`rounded-full bg-[var(--primary-base)] px-3 py-1 text-label-small-default text-[var(--content-inset)]`,children:e},e))}):null]})}):null,(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:b}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I haven't used any`})]})]})})}function q(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function J(e){return[...e].filter(e=>e.startsWith(`other:`)).map(e=>e.slice(6)).sort().join(`, `)}function Y(e){return[...e].filter(e=>e.startsWith(`other:`)).sort().join(`|`)}function je({assistant:e,selected:t,onToggle:n}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":e.label,className:`relative flex h-[88px] w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border p-2 transition-colors ${t?`border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_10%,transparent)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(Ne,{assistant:e,size:32}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:e.label}),t?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--primary-base)]`,children:(0,G.jsx)(l,{className:`h-2.5 w-2.5 text-[var(--content-inset)]`,"aria-hidden":`true`})}):null]})}function Me({onClick:e}){return(0,G.jsxs)(`button`,{type:`button`,onClick:e,"aria-label":`Something else`,className:`flex h-[88px] w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-2 transition-colors hover:bg-[var(--surface-base)]`,children:[(0,G.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,G.jsx)(R,{className:`h-4 w-4 text-[var(--content-secondary)]`,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:`Something else`})]})}function Ne({assistant:e,size:t}){if(e.logoSrc)return e.logoSrcDark?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`flex items-center justify-center dark:hidden`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})}),(0,G.jsx)(`span`,{className:`hidden items-center justify-center dark:flex`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrcDark,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})})]}):(0,G.jsx)(`span`,{className:`flex items-center justify-center`,style:{width:t,height:t},children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})});let n=e.label.slice(0,2).toUpperCase();return(0,G.jsx)(`span`,{className:`flex items-center justify-center rounded-full bg-[var(--surface-base)] text-label-small-default text-[var(--content-default)]`,style:{width:t,height:t},"aria-hidden":`true`,children:n})}function Pe({selectedTasks:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),s=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)};return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`What are you working on?`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`${o?`mt-2`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`Pick the one or two you do most — you can select more if it really is all of it.`}),(0,G.jsx)(`div`,{className:`${o?`mt-6`:`mt-8`} flex w-full flex-col ${o?`gap-1`:`gap-2`}`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:ce.map(t=>{let n=F[t.iconKey],r=e.has(t.id);return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>s(t.id),"aria-pressed":r,className:`group flex w-full cursor-pointer items-center ${o?`gap-2 p-3`:`gap-3 px-4 py-3`} rounded-lg border text-left transition-colors ${r?`border-[var(--primary-base)] bg-[var(--primary-base)]/10`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`div`,{className:`flex w-6 shrink-0 items-center justify-center text-[var(--content-secondary)]`,children:n?(0,G.jsx)(n,{className:`h-4 w-4`}):null}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:t.label}),(0,G.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:t.sublabel})]}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-md ${r?`bg-[var(--primary-base)]`:`border-[1.5px] border-[var(--border-element)]`}`,children:r?(0,G.jsx)(l,{className:`h-3 w-3 text-[var(--content-inset)]`}):null})]},t.id)})}),(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I'll set this up later`})]})]})})}var Fe=new Set([`gmail`,`google-calendar`,`google-drive`]),Ie=[{id:`gmail`,label:`Gmail`,logoSrc:P(`/images/integrations/gmail.svg`)},{id:`outlook`,label:`Outlook`,logoSrc:P(`/images/integrations/outlook.png`)},{id:`google-calendar`,label:`Google Calendar`,logoSrc:P(`/images/integrations/google-calendar.svg`)},{id:`slack`,label:`Slack`,logoSrc:P(`/images/integrations/slack.svg`)},{id:`notion`,label:`Notion`,logoSrc:P(`/images/integrations/notion.svg`)},{id:`linear`,label:`Linear`,logoSrc:P(`/images/integrations/linear-light-logo.svg`)},{id:`jira`,label:`Jira`,logoSrc:P(`/images/integrations/jira.svg`)},{id:`github`,label:`GitHub`,logoSrc:P(`/images/integrations/github.svg`),logoSrcDark:P(`/images/integrations/github-dark.svg`)},{id:`figma`,label:`Figma`,logoSrc:P(`/images/integrations/figma.svg`)},{id:`google-drive`,label:`Google Drive`,logoSrc:P(`/images/integrations/google-drive.svg`)},{id:`excel`,label:`Excel`,logoSrc:P(`/images/integrations/excel.svg`)},{id:`apple-notes`,label:`Apple Notes`,logoSrc:P(`/images/integrations/apple-notes.svg`)}];function Le(e){let t=e.map(e=>e.startsWith(`other:`)?e.slice(6):e);return Array.from(new Set(t)).sort()}function Re({selectedTools:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),[s,l]=(0,W.useState)(()=>ze(e)),[d,h]=(0,W.useState)(()=>s.length>0),g=(0,W.useRef)(Z(e));(0,W.useEffect)(()=>{let t=Z(e);if(t===g.current)return;let n=ze(e);l(n),h(e=>e||n.length>0),g.current=t},[e]),(0,W.useEffect)(()=>{let n=new Set([...e].filter(e=>!e.startsWith(`other:`))),r=new Set;for(let e of s.split(`,`)){let t=e.trim();t&&(r.has(t)||(r.add(t),n.add(`other:${t}`)))}X(n,e)||(g.current=Z(n),t(n))},[s]);let _=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)},y=(0,W.useMemo)(()=>{let e=new Set;return s.split(`,`).map(e=>e.trim()).filter(t=>!t||e.has(t)?!1:(e.add(t),!0))},[s]),b=e.size===0?`Continue`:`Continue · ${e.size} selected`;return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center ${r?`grid-cols-[auto_1fr_auto]`:``}`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[r?(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}):null,(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`What do you use?`}),r?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}):null]}),(0,G.jsx)(`p`,{className:`${o?`mt-3`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`This helps me tailor how I assist you. No connections needed — you can set those up later.`}),(0,G.jsxs)(`div`,{className:`grid w-full gap-2 ${o?`mt-4 grid-cols-4`:`mt-8 grid-cols-2 sm:grid-cols-3 md:grid-cols-4`}`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:[Ie.map(t=>(0,G.jsx)(Q,{tool:t,selected:e.has(t.id),onToggle:()=>_(t.id),electron:o},t.id)),d?null:(0,G.jsx)($,{onClick:()=>h(!0),electron:o})]}),d?(0,G.jsx)(c,{padding:o?`sm`:`md`,className:`mt-3 w-full border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_8%,transparent)]`,children:(0,G.jsxs)(`div`,{className:`flex flex-col ${o?`gap-2`:`gap-3`}`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:`Something else`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>{h(!1),l(``)},"aria-label":`Dismiss custom tools`,className:`ml-auto inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-md text-[var(--content-tertiary)] hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(p,{className:`h-3 w-3`,"aria-hidden":`true`})})]}),(0,G.jsx)(m,{"aria-label":`Other tools`,placeholder:`e.g. Trello, Basecamp, Asana...`,value:s,onChange:e=>l(e.target.value),helperText:`Separate multiple tools with commas`,className:H,fullWidth:!0}),y.length>0?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(e=>(0,G.jsx)(`span`,{className:`rounded-full bg-[var(--primary-base)] px-3 py-1 text-label-small-default text-[var(--content-inset)]`,children:e},e))}):null]})}):null,(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:b}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I'll set this up later`})]})]})})}function X(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ze(e){return[...e].filter(e=>e.startsWith(`other:`)).map(e=>e.slice(6)).sort().join(`, `)}function Z(e){return[...e].filter(e=>e.startsWith(`other:`)).sort().join(`|`)}function Q({tool:e,selected:t,onToggle:n,electron:r}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":e.label,className:`relative flex ${r?`h-[72px]`:`h-[88px]`} w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border p-2 transition-colors ${t?`border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_10%,transparent)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(Be,{tool:e,size:32}),(0,G.jsx)(`span`,{className:`${r?`w-full truncate`:`line-clamp-2`} text-center text-label-medium-default text-[var(--content-default)]`,children:e.label}),t?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--primary-base)]`,children:(0,G.jsx)(l,{className:`h-2.5 w-2.5 text-[var(--content-inset)]`,"aria-hidden":`true`})}):null]})}function $({onClick:e,electron:t}){return(0,G.jsxs)(`button`,{type:`button`,onClick:e,"aria-label":`Something else`,className:`flex ${t?`min-h-[72px]`:`h-[88px]`} w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-2 transition-colors hover:bg-[var(--surface-base)]`,children:[(0,G.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,G.jsx)(R,{className:`h-4 w-4 text-[var(--content-secondary)]`,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:`Something else`})]})}function Be({tool:e,size:t}){if(e.logoSrc)return e.logoSrcDark?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`flex items-center justify-center dark:hidden`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})}),(0,G.jsx)(`span`,{className:`hidden items-center justify-center dark:flex`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrcDark,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})})]}):(0,G.jsx)(`span`,{className:`flex items-center justify-center`,style:{width:t,height:t},children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})});let n=e.label.slice(0,2).toUpperCase();return(0,G.jsx)(`span`,{className:`flex items-center justify-center rounded-full bg-[var(--surface-base)] text-label-small-default text-[var(--content-default)]`,style:{width:t,height:t},"aria-hidden":`true`,children:n})}function Ve({selectedGroupId:e,onGroupChange:t,onBack:r,onContinue:i,onSkip:a,currentStep:o,totalSteps:s}){return(0,G.jsx)(L,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center pb-4`,style:{paddingTop:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(n,{variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(u,{}),onClick:r,"aria-label":`Back`}),(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(be,{current:o,total:s})}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-4`,children:[(0,G.jsx)(`h1`,{className:`w-full text-left text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`What's my vibe?`}),(0,G.jsx)(`p`,{className:`mt-2 w-full text-left text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change this any time.`}),(0,G.jsx)(`div`,{className:`mt-8 flex w-full flex-col gap-3`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:U.map(n=>{let r=e===n.id;return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>t(r?null:n.id),"aria-pressed":r,className:`flex cursor-pointer items-center justify-between rounded-xl border px-4 py-4 text-left transition-colors ${r?`border-[var(--content-default)] bg-[var(--surface-lift)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:n.descriptor}),(0,G.jsx)(`span`,{className:`flex h-5 w-5 items-center justify-center rounded-full border-2 transition-colors ${r?`border-[var(--content-default)]`:`border-[var(--content-disabled)]`}`,children:r&&(0,G.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[var(--content-default)]`})})]},n.id)})})]}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:i,className:`h-11 text-base`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`h-11 text-base`,children:`Skip`})]})]})})}function He(e){let[t,n]=(0,W.useState)(()=>(e??``).trim()),r=(0,W.useRef)(!1);return(0,W.useEffect)(()=>{if(r.current)return;let t=(e??``).trim();t&&n(e=>e||t)},[e]),{value:t,onChange:(0,W.useCallback)(e=>{r.current=!0,n(e)},[])}}var Ue=[`gmail`,`google-calendar`,`google-drive`],We=`experiment-activation-flow-2026-06-03`,Ge=`BOOTSTRAP-ACTIVATION-RAIL.md`;function Ke(e,t,n){return t?.initialMessage?t.initialMessage:n?ae(e):M}function qe(e){let{mode:t,recipe:n}=e,r=e.connectedScopes!==void 0,i;i=t===`native`?{tools:[],tasks:[],tone:e.tone,googleConnected:!1}:t===`paredDown`?{tools:r?[...Ue]:[],tasks:n?.tasks??[],tone:e.tone,googleConnected:r}:{tools:Le([...e.selectedTools]),tasks:[...e.selectedTasks].sort(),tone:e.tone},n&&(i.cohort=n.cohort,i.bootstrapTemplate=n.bootstrapTemplate,i.skills=n.skills),e.activationFlowEnabled&&(i.cohort=We,i.bootstrapTemplate=Ge);let a=e.userName.trim();a&&(i.userName=a);let o=e.occupation?.trim();o&&(i.occupation=o);let s=e.assistantName.trim();return s&&(i.assistantName=s),t===`paredDown`?r&&(i.googleScopes=e.connectedScopes):t===`control`&&(r?(i.googleConnected=!0,i.googleScopes=e.connectedScopes):e.googleConnected?(i.googleConnected=!0,i.googleScopes=e.googleScopes):i.googleConnected=!1),t===`control`&&e.selectedPriorAssistants.size>0&&(i.priorAssistants=Le([...e.selectedPriorAssistants])),i.initialMessage=Ke(i,e.activationFlowEnabled?null:n,e.selfIntroGreetingEnabled),i}function Je(e){return!e.localMode||e.platformSession===`present`?!0:e.platformSession===`unknown`&&e.hasCachedPlatformAssistant}function Ye(e){let{paredDown:t}=e;return[{id:`name`,funnelStep:V.nameVibe,enabled:!0},{id:`taskTone`,funnelStep:V.controlWorkType,enabled:!t},{id:`tools`,funnelStep:V.controlTools,enabled:!t},{id:`priorAssistants`,funnelStep:V.controlPriorAssistants,enabled:!t&&e.canOfferPriorAssistants},{id:`google`,funnelStep:t?V.gmailConnect:V.controlGmailConnect,enabled:e.canOfferGoogleStep&&(t||e.hasGoogleTool)},{id:`iosApp`,funnelStep:V.controlGetApp,enabled:!t&&e.showIOSAppStep}].filter(e=>e.enabled).map(({enabled:e,...t})=>t)}function Xe(){return[{id:`nativeName`,funnelStep:null},{id:`nativeVibe`,funnelStep:null}]}var Ze=`1`;function Qe(e){return e===`nativeVibe`||e===Ze?`nativeVibe`:null}function $e(e,t){let n=e.findIndex(e=>e.id===t);return n<0?null:e[n+1]?.id??null}function et(e,t){let n=e.findIndex(e=>e.id===t);return n<=0?null:e[n-1]?.id??null}function tt(){let e=r(),t=te(),n=O()&&D();return(0,W.useEffect)(()=>{!n&&!t&&e(E.onboarding.privacy,{replace:!0})},[n,t,e]),t||n}function nt(e,t){let n=e?`prechat_native_screen:${e}`:null,[r,i]=(0,W.useState)(()=>t?`nativeName`:`name`),a=(0,W.useCallback)(e=>{if(n)try{e===null?sessionStorage.removeItem(n):sessionStorage.setItem(n,e)}catch{}},[n]);return(0,W.useLayoutEffect)(()=>{if(n)try{let e=Qe(sessionStorage.getItem(n));e&&i(e)}catch{}},[n]),(0,W.useEffect)(()=>{t&&a(r===`nativeVibe`?`nativeVibe`:null)},[t,r,a]),{currentStep:r,setCurrentStep:i,clearPersistedStep:(0,W.useCallback)(()=>{a(null)},[a])}}var rt=3;function it(){let e=h();return e?.cloud===`vellum`?e.assistantId:_()[0]?.assistantId??null}function at(){let e=r(),[t]=i(),n=t.get(`preview`)===`true`,a=C.use.user(),s=x(),c=w(),l=a?.id??null,u=a?.firstName??``,d=a?.lastName??``,f=te(),p=y.use.activeAssistantId(),m=g(),h=k()&&!me(),_=A.use.stringFlags().preChatOnboardingExperiment20260606??`control`,v=(A.use.stringFlags().experimentActivationFlow20260603??`control`)===`variant-a`,ee=A.use.selfIntroGreeting(),T=he(_),D=ue()??T,O=D===fe.paredDown,ne=m?it():null,re=tt(),{currentStep:ae,setCurrentStep:M,clearPersistedStep:oe}=nt(l,f),N=C.use.platformSession(),P=S(N),[F,ce]=(0,W.useState)(()=>new Set),[le,de]=(0,W.useState)(()=>new Set),[pe,ge]=(0,W.useState)(()=>new Set),{value:I,onChange:L}=He(m&&!P?``:u||d),[R,z]=(0,W.useState)(null),[B]=(0,W.useState)(()=>ye()),[V,H]=(0,W.useState)(``),[U,be]=(0,W.useState)(!1),[Se,K]=(0,W.useState)([]),{data:we}=o({...se(),enabled:!c&&s&&(!m||P)}),{data:De,isLoading:ke}=o({queryKey:[`onboarding-recipe`,l],queryFn:xe,enabled:!c&&s&&!f&&!m,staleTime:1/0}),q=De??null,J=we?.id??p??ne,Y=Je({localMode:m,platformSession:N,hasCachedPlatformAssistant:ne!==null}),je=Y,Me=Y,Ne=async()=>{await b.checkAssistant(),e(`${E.assistant}?onboarding=1`,{replace:!0})};function Ie(e,t=D){n||_e(e,{userId:l,variant:ve(t)})}let Le=[...F].some(e=>Fe.has(e)),X=f?Xe():Ye({paredDown:O,canOfferPriorAssistants:Me,canOfferGoogleStep:n?!1:je,hasGoogleTool:Le,showIOSAppStep:h});function ze(t){if(n){e(-1);return}ie(qe({mode:f?`native`:O?`paredDown`:`control`,recipe:f?null:q,selectedTools:F,selectedTasks:le,selectedPriorAssistants:t?.selectedPriorAssistants??pe,tone:R??q?.tone??`grounded`,userName:I,assistantName:V,selfIntroGreetingEnabled:ee,activationFlowEnabled:f?void 0:v,googleConnected:U,googleScopes:Se,connectedScopes:t?.connectedScopes}));let r=V.trim();r&&j(r),f?(oe(),e(E.onboarding.privacy)):(b.markExpectingFirstMessage(),Ne())}let Z=(e,t)=>{e.funnelStep&&Ie(e.funnelStep);let n=$e(X,e.id);n?M(n):ze(t)},Q=e=>{let t=et(X,e.id);t&&M(t)};if(!re||ke)return null;let $=X.find(e=>e.id===ae)??X[0];return $?$.id===`nativeName`?(0,G.jsx)(Oe,{userName:I,assistantName:V,displayedAssistantNames:B,onUserNameChange:L,onAssistantNameChange:H,onContinue:()=>Z($),onSkip:()=>Z($),currentStep:0,totalSteps:rt}):$.id===`nativeVibe`?(0,G.jsx)(Ve,{selectedGroupId:R,onGroupChange:z,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($),currentStep:1,totalSteps:rt}):$.id===`name`?(0,G.jsx)(Ee,{userName:I,assistantName:V,selectedGroupId:R,displayedAssistantNames:B,onUserNameChange:L,onAssistantNameChange:H,onGroupChange:z,onComplete:()=>Z($),onSkip:()=>Z($)}):$.id===`taskTone`?(0,G.jsx)(Pe,{selectedTasks:le,onChange:de,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($)}):$.id===`tools`?(0,G.jsx)(Re,{selectedTools:F,onChange:ce,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($)}):$.id===`priorAssistants`?(0,G.jsx)(Ae,{selectedAssistants:pe,onChange:ge,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>{let e=new Set;ge(e),Z($,{selectedPriorAssistants:e})}}):$.id===`google`?J?(0,G.jsx)(Te,{assistantId:J,assistantName:V,onConnect:e=>{be(!0),K(e),Z($,{connectedScopes:e})},onSkip:()=>Z($),onBack:()=>Q($)}):null:$.id===`iosApp`?(0,G.jsx)(Ce,{onComplete:()=>Z($)}):null:null}function ot(){return(0,G.jsx)(at,{})}export{ot as PreChatRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{n as i}from"./device-settings-BBwtGKJb.js";import{t as a}from"./react-DJZBPgpf.js";import{p as o}from"./auth-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{n as i}from"./device-settings-BBwtGKJb.js";import{t as a}from"./react-DJZBPgpf.js";import{p as o}from"./auth-store-65JKPW7C.js";var s=e(a(),1),c=`vellum:onboarding:selectedVersion`;function l(){return[o.use.shareAnalytics(),(0,s.useCallback)(e=>{o.getState().setShareAnalytics(e)},[])]}function u(){return[o.use.shareDiagnostics(),(0,s.useCallback)(e=>{o.getState().setShareDiagnostics(e)},[])]}function d(){return[o.use.tosAccepted(),(0,s.useCallback)(e=>{o.getState().setTosAccepted(e)},[])]}function f(){return[o.use.privacyConsent(),(0,s.useCallback)(e=>{o.getState().setPrivacyConsent(e)},[])]}function p(){return[o.use.analyticsConsentCurrent(),(0,s.useCallback)(e=>{o.getState().setAnalyticsConsentCurrent(e)},[])]}function m(){return[o.use.diagnosticsConsentCurrent(),(0,s.useCallback)(e=>{o.getState().setDiagnosticsConsentCurrent(e)},[])]}function h(){return o.getState().tosAccepted}function g(){return o.getState().privacyConsent}function _(){return o.getState().analyticsConsentCurrent}function v(){return o.getState().diagnosticsConsentCurrent}function y(){return o.getState().consentHydrated}function b(){return o.getState().shareAnalytics&&i(`shareAnalytics`,!0)}function x(){if(typeof window>`u`)return``;try{return n(c,``)}catch{return``}}function S(e){if(!(typeof window>`u`))try{e===``?t(c):r(c,e)}catch{}}export{x as a,p as c,l as d,u as f,g as i,m as l,S as m,y as n,b as o,d as p,v as r,h as s,_ as t,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,n,o as r,r as i,s as a}from"./device-settings-BBwtGKJb.js";import{t as o}from"./react-DJZBPgpf.js";import{F as s,t as c}from"./button-amTXFI-2.js";import{n as l}from"./QueryClientProvider-DKhXIxGb.js";import{t as u}from"./useQuery-B45lW1Kk.js";import{t as d}from"./useMutation-Lj4VunQV.js";import{t as f}from"./jsx-runtime-CVSDxk6A.js";import{t as p}from"./cn-C36Yvcac.js";import{t as m}from"./card-Bv5O5juh.js";import{t as h}from"./chevron-down-qD-re7AW.js";import{t as g}from"./chevron-right-DqqmezXC.js";import{t as _}from"./loader-circle-Cz7opInR.js";import{t as v}from"./pencil-CUIr0IFo.js";import{t as y}from"./x-CkSVp1Ok.js";import{t as b}from"./notice-DkcNAP8O.js";import{t as x}from"./tag-CV4v7fRF.js";import{t as S}from"./input-CoUmPnRU.js";import{t as C}from"./toggle-CDfguvUz.js";import{n as w}from"./toast-xTp-xwYL.js";import{t as T}from"./confirm-dialog-CSkhRFRk.js";import{t as E}from"./dropdown-ByHOpeOU.js";import{f as D,n as O,r as k}from"./auth-store-B8a9KLUt.js";import{t as A}from"./sdk.gen-CmKfVpgB.js";import{c as j,i as ee,m as te,n as M,o as N,r as ne,s as re,t as ie}from"./native-biometric-Dy5Vb7o0.js";import{c as ae,s as oe}from"./routes-DYcJgn9k.js";import{n as se,t as ce}from"./react-query.gen-GVQbBTEp.js";import{B as P,Bn as le,D as ue,Gr as F,Mn as de,Oi as I,R as fe,Rn as pe,S as L,Ur as R,Wr as z,b as B,x as me,y as V,yi as he,z as H,zn as ge}from"./index-CkKSY1-Q.js";import{t as U}from"./use-active-assistant-id-CGeH4Gl6.js";import{t as W}from"./detail-card-GPqFZVmX.js";import{t as G}from"./setting-row-imtQqr9o.js";var K=e(o(),1),q=f(),J=[{id:`accessibility`,type:`system`,sourceKind:`accessibility`,label:`Accessibility`,description:`Allows your assistant to click, type, and control apps on your behalf.`},{id:`screen`,type:`system`,sourceKind:`screen`,label:`Screen Recording`,description:`Allows your assistant to capture screen context during computer-use tasks.`},{id:`microphone`,type:`system`,sourceKind:`microphone`,label:`Microphone`,description:`Allows your assistant to capture audio for voice input and recordings.`},{id:`speechRecognition`,type:`system`,sourceKind:`speechRecognition`,label:`Speech Recognition`,description:`Allows your assistant to transcribe your speech into text on-device.`},{id:`notifications`,type:`system`,sourceKind:`notifications`,label:`Notifications`,description:`Allows your assistant to send macOS alerts for approvals, messages, and task updates.`}],_e=[{id:`notificationBadges`,type:`local`,label:`Notification Badges`,description:`Allows your assistant to show unseen conversation counts on the Dock icon.`}];function ve(){let[e,t]=(0,K.useState)(null);return{pendingKind:e,run:async(e,n)=>{t(e);try{await n()}catch{}finally{t(t=>t===e?null:t)}}}}function ye(){let[e,r]=(0,K.useState)(()=>n(`dockBadgesEnabled`,!0));return(0,K.useEffect)(()=>a(`dockBadgesEnabled`,()=>{r(n(`dockBadgesEnabled`,!0))}),[]),[e,e=>{r(e),t(`dockBadgesEnabled`,e),e||de(0)}]}function be({row:e,onToggle:t}){return(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(C,{checked:e.checked,disabled:e.disabled,"aria-label":e.label,onChange:()=>t(e.id)}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:()=>t(e.id),className:p(`block w-full text-left`,e.disabled?`cursor-not-allowed`:`cursor-pointer`),children:[(0,q.jsx)(`span`,{className:`block text-[14px] font-semibold leading-[18px] text-[var(--content-emphasised)]`,children:e.label}),(0,q.jsx)(`span`,{className:`mt-1 block text-[13px] font-medium leading-[18px] text-[var(--content-tertiary)]`,children:e.description})]}),e.error&&(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:e.error})]})]})}function xe(){return(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin rounded-full border-2 border-[var(--border-base)] border-t-[var(--content-tertiary)]`})}function Se({compact:e=!1}){let{state:t,loading:n,error:r,supported:i,refresh:a}=le(),{pendingKind:o,run:s}=ve(),[c,l]=ye(),u=(0,K.useMemo)(()=>{let e=new Map;if(!t)return e;for(let n of J){let r=t[n.sourceKind];r&&e.set(n.id,{meta:n,item:r})}return e},[t]),d=(0,K.useMemo)(()=>{let e=J.map(e=>{let t=u.get(e.id)?.item;return t?{id:e.id,label:e.label,description:e.description,checked:t.status===`granted`,disabled:o===e.id||t.status===`restricted`,...t.error?{error:t.error}:{}}:null}).filter(Boolean),t=_e.map(e=>({id:e.id,label:e.label,description:e.description,checked:c,disabled:o===e.id}));return[...e,...t]},[c,o,u]);if(!i)return null;let f=async(e,t)=>{t.status===`granted`||t.status===`denied`||!t.canRequest?await pe(e.sourceKind):await ge(e.sourceKind),await a()},p=e=>{let t=u.get(e);if(t){s(e,()=>f(t.meta,t.item));return}e===`notificationBadges`&&s(e,async()=>{l(!c)})};return(0,q.jsxs)(`section`,{className:`w-full rounded-[20px] border border-[var(--border-hover)] bg-[var(--surface-lift)] px-4 pb-3 pt-5`,children:[(0,q.jsx)(`h2`,{className:`text-[18px] font-semibold leading-[22px] text-[var(--content-emphasised)]`,children:`System Permissions`}),n&&d.length===0?(0,q.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,q.jsx)(xe,{}),`Checking permissions...`]}):(0,q.jsx)(`div`,{className:`mt-3 space-y-2`,children:d.map(e=>(0,q.jsx)(be,{row:e,onToggle:p},e.id))}),r&&(0,q.jsx)(`div`,{role:`alert`,className:`mt-6 rounded-lg border border-[color-mix(in_srgb,var(--system-negative-strong)_25%,transparent)] bg-[var(--system-negative-weak)] p-3 text-body-medium-lighter text-[var(--content-secondary)]`,children:r})]})}function Ce(){let e=F({platformHostedOnly:!0}),t=R(),n=z(),r=l(),{data:i,isLoading:a,isError:o}=u({...ce(),enabled:e===`full`&&t}),s=d({mutationFn:async e=>{let{data:t}=await A({body:{access_consented:e},throwOnError:!0});return t},onSuccess:e=>{se(r,void 0,e),w.success(e?.access_consented?`Admin data access enabled.`:`Admin data access disabled.`)},onError:()=>{w.error(`Failed to update log access consent.`)}});if(e===`gated`)return null;let c=e===`full`&&n,f=i?.access_consented??!1,p=e!==`full`||!t||a||o||s.isPending;return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Allow Staff Access`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-tertiary)]`,children:`When enabled, Vellum Staff will be able to access your assistant and its data for debugging purposes. It's suggested that you leave this off and only turn it on temporarily if you need Vellum Support's help in investigating an issue.`}),e===`full`&&o&&(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:`Failed to load consent setting.`})]}),(0,q.jsx)(`div`,{className:`flex items-center gap-2`,children:e===`disabled`?null:(0,q.jsxs)(q.Fragment,{children:[(s.isPending||c)&&(0,q.jsx)(_,{className:`h-4 w-4 animate-spin text-[var(--content-tertiary)]`}),(0,q.jsx)(C,{checked:f,disabled:p,onChange:()=>s.mutate(!f)})]})})]}),e===`disabled`&&(0,q.jsx)(ue,{className:`mt-3`,children:`Log in to the Vellum platform to manage admin data access.`})]})}function we(){let e=te(),[t,n]=(0,K.useState)(()=>ee()),[r,i]=(0,K.useState)(!1),[a,o]=(0,K.useState)(`Face ID`),[s,c]=(0,K.useState)(!1);if((0,K.useEffect)(()=>{e&&(ne().then(i),M().then(o))},[e]),!e||!r)return null;let l=async()=>{c(!0);try{if(t)N(!1),await ie(),n(!1);else{let e=j();e&&await re(e),N(!0),n(!0)}}finally{c(!1)}};return(0,q.jsx)(W,{title:`Security`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsxs)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:[`Use `,a,` for sign-in`]}),(0,q.jsxs)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-tertiary)]`,children:[`When your session expires, verify with `,a,` or your device passcode instead of signing in again.`]})]}),(0,q.jsx)(C,{checked:t,onChange:()=>void l(),disabled:s})]})})}function Y(){return(0,q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)] dark:bg-[var(--surface-lift)]`})}var X=V.map(e=>({value:e.id,label:e.label,icon:(0,q.jsx)(e.icon,{className:`h-3.5 w-3.5`})}));function Te(){let e=U(),t=l(),{data:n,isError:r}=u({queryKey:[`thresholds`,e],queryFn:()=>me(e),staleTime:3e4}),[i,a]=(0,K.useState)(`relaxed`),[o,s]=(0,K.useState)(`conservative`),[c,d]=(0,K.useState)(`strict`),[f,p]=(0,K.useState)(!1),_=(0,K.useRef)(!1),[v,y]=(0,K.useState)(!1),b=(0,K.useRef)(null),x=(0,K.useRef)(null);(0,K.useEffect)(()=>{!n||_.current||(a(B(n.interactive).id),s(B(n.autonomous).id),d(B(n.headless).id),y(!0))},[n]),(0,K.useEffect)(()=>()=>{b.current!==null&&(clearTimeout(b.current),b.current=null,x.current?.(),x.current=null)},[]);let S=(0,K.useCallback)((n,r,i)=>{if(!e||!v)return;let a=V.find(e=>e.id===n)?.riskThreshold,o=V.find(e=>e.id===r)?.riskThreshold,s=V.find(e=>e.id===i)?.riskThreshold;!a||!o||!s||L(e,{interactive:a,autonomous:o,headless:s}).then(()=>{t.invalidateQueries({queryKey:[`thresholds`,e]})}).catch(()=>{})},[e,v,t]),C=(0,K.useCallback)((e,t,n)=>{b.current!==null&&clearTimeout(b.current),x.current=()=>S(e,t,n),b.current=setTimeout(()=>{x.current?.(),b.current=null,x.current=null},500)},[S]),w=(0,K.useCallback)(e=>{_.current=!0,a(e),C(e,o,c)},[o,c,C]),T=(0,K.useCallback)(e=>{_.current=!0,s(e),C(i,e,c)},[i,c,C]),D=(0,K.useCallback)(e=>{_.current=!0,d(e),C(i,o,e)},[i,o,C]),O=V.find(e=>e.id===i),k=V.find(e=>e.id===o),A=V.find(e=>e.id===c),j=!e||!v;return(0,q.jsxs)(m,{children:[(0,q.jsx)(`h2`,{className:`text-title-medium text-[var(--content-default)]`,children:`Assistant Access`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Control which actions your assistant can take without asking first. Each action is classified by risk level — your access level determines which levels auto-approve. Trust Rules fine-tune this for specific actions by raising or lowering their risk.`}),r&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--system-negative-strong)]`,children:`Could not load threshold settings. Check your connection and reload.`}),(0,q.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Conversations`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When you're chatting with your assistant directly.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:i,onChange:w,options:X,disabled:j})}),O&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:O.description})]}),(0,q.jsx)(Y,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),className:`flex items-center gap-1 text-[var(--content-secondary)] hover:text-[var(--content-default)] transition-colors`,"aria-expanded":f,children:[f?(0,q.jsx)(h,{className:`h-4 w-4`}):(0,q.jsx)(g,{className:`h-4 w-4`}),(0,q.jsx)(`span`,{className:`text-body-medium-default`,children:`Advanced`})]}),(0,q.jsxs)(`div`,{className:f?`mt-4 space-y-4`:`hidden`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Background`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When your assistant acts without you — scheduled tasks, background jobs, and external triggers.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:o,onChange:T,options:X,disabled:j})}),k&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:k.description})]}),(0,q.jsx)(Y,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Headless`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When triggered externally with no interactive client.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:c,onChange:D,options:X,disabled:j})}),A&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:A.description})]})]})]})]})]})}var Z=e(s(),1),Ee=[`bash`,`file_read`,`file_write`,`file_edit`,`web_fetch`,`skill_load`],De=[{value:`low`,label:`Low`,description:`Auto-approve without prompting`},{value:`medium`,label:`Medium`,description:`Prompt before executing`},{value:`high`,label:`High`,description:`Always require explicit approval`}];function Oe({assistantId:e,existingRule:t,onClose:n,onSaved:r}){let i=(0,K.useRef)(null),[a,o]=(0,K.useState)(t.tool),[s,c]=(0,K.useState)(t.pattern),[l,u]=(0,K.useState)(t.risk),[d,f]=(0,K.useState)(t.description??``),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(null),_=s.trim(),v=_.length>0&&!p,x=(0,K.useCallback)(async n=>{if(n.preventDefault(),!v)return;let i=d.trim()||`${a} — ${_}`;m(!0),g(null);try{await P(e,t.id,{risk:l,description:i}),r()}catch(e){g(e instanceof Error?e.message:`Failed to save trust rule.`)}finally{m(!1)}},[e,v,d,t,r,l,a,_]);return(0,Z.createPortal)((0,q.jsx)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`trust-rule-form-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:(0,K.useCallback)(e=>{e.key===`Escape`&&n()},[n]),onClick:(0,K.useCallback)(e=>{e.target===i.current&&n()},[n]),children:(0,q.jsxs)(`div`,{className:`mx-4 flex max-h-[calc(100vh-2rem)] w-full max-w-md flex-col rounded-xl border border-[var(--border-base)] bg-[var(--surface-lift)] shadow-xl`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-[var(--border-base)] px-6 py-4`,children:[(0,q.jsx)(`h2`,{id:`trust-rule-form-title`,className:`text-title-medium text-[var(--content-default)]`,children:`Edit Trust Rule`}),(0,q.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close`,className:`rounded-lg p-1.5 text-[var(--content-tertiary)] transition-colors hover:bg-[var(--surface-base)] hover:text-[var(--content-default)]`,children:(0,q.jsx)(y,{className:`h-4 w-4`})})]}),(0,q.jsxs)(`form`,{onSubmit:e=>void x(e),className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-6 py-4`,children:[h&&(0,q.jsx)(b,{tone:`error`,children:h}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`trust-rule-tool`,className:`block text-body-medium-default text-[var(--content-default)]`,children:`Tool`}),(0,q.jsx)(`div`,{className:`mt-1`,children:(0,q.jsx)(E,{value:a,onChange:o,disabled:!0,options:Ee.map(e=>({value:e,label:e}))})})]}),(0,q.jsx)(S,{label:`Pattern`,type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., git *`,disabled:!0}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`block text-body-medium-default text-[var(--content-default)]`,children:`Risk Level`}),(0,q.jsx)(`div`,{className:`mt-2 flex gap-2`,children:De.map(e=>(0,q.jsxs)(`button`,{type:`button`,onClick:()=>u(e.value),className:`flex-1 rounded-lg border px-3 py-2 text-left text-body-small-default transition-colors ${l===e.value?e.value===`low`?`border-[var(--system-positive-strong)] bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`:e.value===`medium`?`border-[var(--system-warning-strong)] bg-[var(--system-warning-weak)] text-[var(--system-warning-strong)]`:`border-[var(--system-negative-strong)] bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`:`border-[var(--border-element)] text-[var(--content-default)] hover:bg-[var(--surface-base)]`}`,children:[(0,q.jsx)(`div`,{children:e.label}),(0,q.jsx)(`div`,{className:`mt-0.5 text-label-medium-default leading-tight opacity-70`,children:e.description})]},e.value))})]}),(0,q.jsx)(S,{label:`Description (optional)`,type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`${a} — ${_||`pattern`}`}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg border border-[var(--border-element)] bg-white px-4 py-2 text-body-medium-default text-[var(--content-default)] transition-colors hover:bg-[var(--surface-base)] dark:border-[var(--border-base)] dark:bg-[var(--surface-lift)] dark:hover:bg-[var(--ghost-hover)]`,children:`Cancel`}),(0,q.jsx)(`button`,{type:`submit`,disabled:!v,className:`rounded-lg bg-[var(--system-positive-strong)] px-4 py-2 text-body-medium-default text-white transition-colors hover:bg-[var(--system-positive-strong)] disabled:cursor-not-allowed disabled:opacity-50`,children:p?`Saving…`:`Save`})]})]})]})}),document.body)}function ke(e){return e.origin===`default`&&!e.userModified}function Ae(e,t){let n=new Set,r=[];for(let t of e)n.has(t.id)||(n.add(t.id),r.push(t));for(let e of t)n.has(e.id)||(n.add(e.id),r.push(e));return r.sort((e,t)=>e.tool===t.tool?e.description.localeCompare(t.description):e.tool.localeCompare(t.tool))}function je(e){switch(e){case`low`:return`positive`;case`medium`:return`warning`;case`high`:return`negative`}}function Q(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Me({assistantId:e,onClose:t}){let n=(0,K.useRef)(null),[r,i]=(0,K.useState)([]),[a,o]=(0,K.useState)(!0),[s,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(!1),g=(0,K.useCallback)(async t=>{if(t){let[t,n]=await Promise.all([H(e),H(e,{origin:`default`})]);return Ae(t,n)}return H(e)},[e]),_=(0,K.useCallback)(async()=>{o(!0);try{i(await g(m)),l(null)}catch(e){l(e instanceof Error?e.message:`Failed to load trust rules.`)}finally{o(!1)}},[g,m]);(0,K.useEffect)(()=>{let e=!1;return(async()=>{o(!0);try{let t=await g(m);e||(i(t),l(null))}catch(t){e||l(t instanceof Error?t.message:`Failed to load trust rules.`)}finally{e||o(!1)}})(),()=>{e=!0}},[g,m]);let y=(0,K.useCallback)(async()=>{if(f)try{await fe(e,f.id),_()}catch(e){l(e instanceof Error?e.message:`Failed to delete trust rule.`)}finally{p(null)}},[e,f,_]);return(0,Z.createPortal)((0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{ref:n,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`trust-rules-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:(0,K.useCallback)(e=>{e.key===`Escape`&&t()},[t]),onClick:(0,K.useCallback)(e=>{e.target===n.current&&t()},[t]),children:(0,q.jsxs)(`div`,{className:`mx-4 flex max-h-[80vh] w-full max-w-2xl flex-col rounded-xl border border-[var(--border-base)] bg-[var(--surface-lift)] shadow-xl`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-[var(--border-base)] px-6 py-4`,children:[(0,q.jsx)(`h2`,{id:`trust-rules-title`,className:`text-title-medium text-[var(--content-default)]`,children:`Trust Rules`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(C,{checked:m,onChange:h,label:`Show all defaults`}),(0,q.jsx)(c,{variant:`outlined`,onClick:t,children:`Done`})]})]}),(0,q.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-6 py-4`,children:[s&&(0,q.jsx)(`div`,{className:`mb-3`,children:(0,q.jsx)(b,{tone:`error`,children:s})}),a?(0,q.jsx)(`div`,{className:`flex h-48 items-center justify-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Loading…`}):r.length===0?(0,q.jsxs)(`div`,{className:`flex h-48 flex-col items-center justify-center gap-2 px-6 text-[var(--content-tertiary)]`,children:[(0,q.jsx)(I,{className:`h-8 w-8`}),(0,q.jsx)(`p`,{className:`max-w-xs text-center text-body-medium-lighter`,children:`No trust rules yet. Rules are created when you classify actions from permission prompts.`})]}):(0,q.jsx)(`ul`,{className:`divide-y divide-[var(--border-base)]`,children:r.map(e=>{let t=ke(e);return(0,q.jsxs)(`li`,{className:`flex items-start gap-3 py-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:e.tool}),(0,q.jsx)(x,{tone:je(e.risk),children:Q(e.risk)}),e.origin===`default`&&(0,q.jsx)(x,{tone:`neutral`,children:`Default`}),e.userModified&&(0,q.jsx)(x,{tone:`warning`,children:`Modified`})]}),(0,q.jsx)(`div`,{className:`mt-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:e.pattern}),e.description&&(0,q.jsx)(`div`,{className:`mt-0.5 truncate text-body-small-default text-[var(--content-tertiary)]`,children:e.description})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":`Edit ${e.tool} rule`,onClick:()=>d(e),className:`rounded-lg p-1.5 text-[var(--content-tertiary)] transition-colors hover:bg-[var(--surface-base)] hover:text-[var(--content-default)]`,children:(0,q.jsx)(v,{className:`h-4 w-4`})}),(!t||e.userModified)&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`Delete ${e.tool} rule`,onClick:()=>p(e),className:`rounded-lg p-1.5 text-[var(--system-negative-strong)] transition-colors hover:bg-[var(--system-negative-weak)]`,children:(0,q.jsx)(he,{className:`h-4 w-4`})})]})]},e.id)})})]})]})}),u&&(0,q.jsx)(Oe,{assistantId:e,existingRule:u,onClose:()=>d(null),onSaved:()=>{d(null),_()}}),(0,q.jsx)(T,{open:f!==null,title:`Delete Trust Rule?`,message:f?`Remove the ${Q(f.risk).toLowerCase()}-risk rule for ${f.tool} matching "${f.pattern}"?`:``,confirmLabel:`Delete`,cancelLabel:`Cancel`,destructive:!0,onConfirm:()=>void y(),onCancel:()=>p(null)})]}),document.body)}function Ne(){let e=U(),[t,n]=(0,K.useState)(!1);return(0,q.jsxs)(m,{children:[(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(I,{className:`mt-0.5 h-5 w-5 shrink-0 text-[var(--content-secondary)]`}),(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsx)(`h2`,{className:`text-title-medium text-[var(--content-default)]`,children:`Trust Rules`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Manage per-tool rules that control which actions auto-approve and which require your explicit permission.`})]}),(0,q.jsx)(c,{variant:`outlined`,onClick:()=>n(!0),children:`Manage`})]}),t&&(0,q.jsx)(Me,{assistantId:e,onClose:()=>n(!1)})]})}var Pe=[{value:`dontRetain`,label:`Don't retain`},{value:`oneHour`,label:`1 hour`},{value:`oneDay`,label:`1 day`},{value:`sevenDays`,label:`7 days`},{value:`thirtyDays`,label:`30 days`},{value:`ninetyDays`,label:`90 days`},{value:`keepForever`,label:`Keep forever`}],Fe=`thirtyDays`;function $(){return(0,q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)] dark:bg-[var(--surface-lift)]`})}function Ie(){let e=F({platformHostedOnly:!0}),t=k(),a=t,o=O.use.user()?.id??null,[s,c]=(0,K.useState)(()=>n(`shareAnalytics`,!0)),[l,u]=(0,K.useState)(()=>n(`shareDiagnostics`,!0)),[d,f]=(0,K.useState)(()=>i(`llmLogRetention`,Fe));return(0,q.jsxs)(`div`,{className:`space-y-4`,children:[(0,q.jsx)(we,{}),(0,q.jsx)(Se,{}),(0,q.jsx)(Ne,{}),(0,q.jsx)(Te,{}),(0,q.jsx)(W,{title:`Privacy`,subtitle:t?(0,q.jsxs)(q.Fragment,{children:[`View details about what data we collect and how it's used in our`,` `,(0,q.jsx)(`a`,{href:oe(ae.docs.legal.privacyPolicy),target:`_blank`,rel:`noreferrer`,className:`underline`,children:`privacy policy`}),`.`]}):void 0,children:(0,q.jsxs)(`div`,{className:`space-y-4`,children:[a&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(G,{label:`Share Analytics`,helperText:`Send aggregated product usage data`,checked:s,onChange:()=>{let e=!s;c(e),D(`share_analytics`,e,{userId:o,hasPlatformSession:t})},variant:`toggle-trailing`}),(0,q.jsx)($,{}),(0,q.jsx)(G,{label:`Share Diagnostics`,helperText:`Send crash reports, conversation traces, and session replay data`,checked:l,onChange:()=>{let e=!l;u(e),D(`share_diagnostics`,e,{userId:o,hasPlatformSession:t})},variant:`toggle-trailing`}),(0,q.jsx)($,{})]}),(0,q.jsx)(Ce,{}),e!==`gated`&&(0,q.jsx)($,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`llm-log-retention`,className:`block text-body-medium-default text-[var(--content-default)]`,children:`LLM Request Log Retention`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:d,onChange:e=>{f(e),r(`llmLogRetention`,e)},options:Pe})}),(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:`How long to keep LLM request and response logs on this device. These logs record the prompts and completions sent to model providers and are used for debugging. Shorter retention improves privacy; longer retention helps troubleshoot issues.`})]})]})})]})}export{Ie as PrivacyPage};
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,n,o as r,r as i,s as a}from"./device-settings-BBwtGKJb.js";import{t as o}from"./react-DJZBPgpf.js";import{F as s,t as c}from"./button-amTXFI-2.js";import{n as l}from"./QueryClientProvider-DKhXIxGb.js";import{t as u}from"./useQuery-B45lW1Kk.js";import{t as d}from"./useMutation-Lj4VunQV.js";import{t as f}from"./jsx-runtime-CVSDxk6A.js";import{t as p}from"./cn-C36Yvcac.js";import{t as m}from"./card-Bv5O5juh.js";import{t as h}from"./chevron-down-qD-re7AW.js";import{t as g}from"./chevron-right-DqqmezXC.js";import{t as _}from"./loader-circle-Cz7opInR.js";import{t as v}from"./pencil-CUIr0IFo.js";import{t as y}from"./x-CkSVp1Ok.js";import{t as b}from"./notice-DkcNAP8O.js";import{t as x}from"./tag-CV4v7fRF.js";import{t as S}from"./input-CoUmPnRU.js";import{t as C}from"./toggle-CDfguvUz.js";import{n as w}from"./toast-xTp-xwYL.js";import{t as T}from"./confirm-dialog-CSkhRFRk.js";import{t as E}from"./dropdown-ByHOpeOU.js";import{f as D,n as O,r as k}from"./auth-store-65JKPW7C.js";import{t as A}from"./sdk.gen-9Cdt87h5.js";import{c as j,i as ee,m as te,n as M,o as N,r as ne,s as re,t as ie}from"./native-biometric-B2cBAQ1U.js";import{c as ae,s as oe}from"./routes-BXlWEOF0.js";import{n as se,t as ce}from"./react-query.gen-DV9K_z-o.js";import{B as P,Bn as le,D as ue,Gr as F,Mn as de,Oi as I,R as fe,Rn as pe,S as L,Ur as R,Wr as z,b as B,x as me,y as V,yi as he,z as H,zn as ge}from"./index-B4Qq7TL7.js";import{t as U}from"./use-active-assistant-id-CGeH4Gl6.js";import{t as W}from"./detail-card-GPqFZVmX.js";import{t as G}from"./setting-row-imtQqr9o.js";var K=e(o(),1),q=f(),J=[{id:`accessibility`,type:`system`,sourceKind:`accessibility`,label:`Accessibility`,description:`Allows your assistant to click, type, and control apps on your behalf.`},{id:`screen`,type:`system`,sourceKind:`screen`,label:`Screen Recording`,description:`Allows your assistant to capture screen context during computer-use tasks.`},{id:`microphone`,type:`system`,sourceKind:`microphone`,label:`Microphone`,description:`Allows your assistant to capture audio for voice input and recordings.`},{id:`speechRecognition`,type:`system`,sourceKind:`speechRecognition`,label:`Speech Recognition`,description:`Allows your assistant to transcribe your speech into text on-device.`},{id:`notifications`,type:`system`,sourceKind:`notifications`,label:`Notifications`,description:`Allows your assistant to send macOS alerts for approvals, messages, and task updates.`}],_e=[{id:`notificationBadges`,type:`local`,label:`Notification Badges`,description:`Allows your assistant to show unseen conversation counts on the Dock icon.`}];function ve(){let[e,t]=(0,K.useState)(null);return{pendingKind:e,run:async(e,n)=>{t(e);try{await n()}catch{}finally{t(t=>t===e?null:t)}}}}function ye(){let[e,r]=(0,K.useState)(()=>n(`dockBadgesEnabled`,!0));return(0,K.useEffect)(()=>a(`dockBadgesEnabled`,()=>{r(n(`dockBadgesEnabled`,!0))}),[]),[e,e=>{r(e),t(`dockBadgesEnabled`,e),e||de(0)}]}function be({row:e,onToggle:t}){return(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(C,{checked:e.checked,disabled:e.disabled,"aria-label":e.label,onChange:()=>t(e.id)}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:()=>t(e.id),className:p(`block w-full text-left`,e.disabled?`cursor-not-allowed`:`cursor-pointer`),children:[(0,q.jsx)(`span`,{className:`block text-[14px] font-semibold leading-[18px] text-[var(--content-emphasised)]`,children:e.label}),(0,q.jsx)(`span`,{className:`mt-1 block text-[13px] font-medium leading-[18px] text-[var(--content-tertiary)]`,children:e.description})]}),e.error&&(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:e.error})]})]})}function xe(){return(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin rounded-full border-2 border-[var(--border-base)] border-t-[var(--content-tertiary)]`})}function Se({compact:e=!1}){let{state:t,loading:n,error:r,supported:i,refresh:a}=le(),{pendingKind:o,run:s}=ve(),[c,l]=ye(),u=(0,K.useMemo)(()=>{let e=new Map;if(!t)return e;for(let n of J){let r=t[n.sourceKind];r&&e.set(n.id,{meta:n,item:r})}return e},[t]),d=(0,K.useMemo)(()=>{let e=J.map(e=>{let t=u.get(e.id)?.item;return t?{id:e.id,label:e.label,description:e.description,checked:t.status===`granted`,disabled:o===e.id||t.status===`restricted`,...t.error?{error:t.error}:{}}:null}).filter(Boolean),t=_e.map(e=>({id:e.id,label:e.label,description:e.description,checked:c,disabled:o===e.id}));return[...e,...t]},[c,o,u]);if(!i)return null;let f=async(e,t)=>{t.status===`granted`||t.status===`denied`||!t.canRequest?await pe(e.sourceKind):await ge(e.sourceKind),await a()},p=e=>{let t=u.get(e);if(t){s(e,()=>f(t.meta,t.item));return}e===`notificationBadges`&&s(e,async()=>{l(!c)})};return(0,q.jsxs)(`section`,{className:`w-full rounded-[20px] border border-[var(--border-hover)] bg-[var(--surface-lift)] px-4 pb-3 pt-5`,children:[(0,q.jsx)(`h2`,{className:`text-[18px] font-semibold leading-[22px] text-[var(--content-emphasised)]`,children:`System Permissions`}),n&&d.length===0?(0,q.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,q.jsx)(xe,{}),`Checking permissions...`]}):(0,q.jsx)(`div`,{className:`mt-3 space-y-2`,children:d.map(e=>(0,q.jsx)(be,{row:e,onToggle:p},e.id))}),r&&(0,q.jsx)(`div`,{role:`alert`,className:`mt-6 rounded-lg border border-[color-mix(in_srgb,var(--system-negative-strong)_25%,transparent)] bg-[var(--system-negative-weak)] p-3 text-body-medium-lighter text-[var(--content-secondary)]`,children:r})]})}function Ce(){let e=F({platformHostedOnly:!0}),t=R(),n=z(),r=l(),{data:i,isLoading:a,isError:o}=u({...ce(),enabled:e===`full`&&t}),s=d({mutationFn:async e=>{let{data:t}=await A({body:{access_consented:e},throwOnError:!0});return t},onSuccess:e=>{se(r,void 0,e),w.success(e?.access_consented?`Admin data access enabled.`:`Admin data access disabled.`)},onError:()=>{w.error(`Failed to update log access consent.`)}});if(e===`gated`)return null;let c=e===`full`&&n,f=i?.access_consented??!1,p=e!==`full`||!t||a||o||s.isPending;return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Allow Staff Access`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-tertiary)]`,children:`When enabled, Vellum Staff will be able to access your assistant and its data for debugging purposes. It's suggested that you leave this off and only turn it on temporarily if you need Vellum Support's help in investigating an issue.`}),e===`full`&&o&&(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:`Failed to load consent setting.`})]}),(0,q.jsx)(`div`,{className:`flex items-center gap-2`,children:e===`disabled`?null:(0,q.jsxs)(q.Fragment,{children:[(s.isPending||c)&&(0,q.jsx)(_,{className:`h-4 w-4 animate-spin text-[var(--content-tertiary)]`}),(0,q.jsx)(C,{checked:f,disabled:p,onChange:()=>s.mutate(!f)})]})})]}),e===`disabled`&&(0,q.jsx)(ue,{className:`mt-3`,children:`Log in to the Vellum platform to manage admin data access.`})]})}function we(){let e=te(),[t,n]=(0,K.useState)(()=>ee()),[r,i]=(0,K.useState)(!1),[a,o]=(0,K.useState)(`Face ID`),[s,c]=(0,K.useState)(!1);if((0,K.useEffect)(()=>{e&&(ne().then(i),M().then(o))},[e]),!e||!r)return null;let l=async()=>{c(!0);try{if(t)N(!1),await ie(),n(!1);else{let e=j();e&&await re(e),N(!0),n(!0)}}finally{c(!1)}};return(0,q.jsx)(W,{title:`Security`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsxs)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:[`Use `,a,` for sign-in`]}),(0,q.jsxs)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-tertiary)]`,children:[`When your session expires, verify with `,a,` or your device passcode instead of signing in again.`]})]}),(0,q.jsx)(C,{checked:t,onChange:()=>void l(),disabled:s})]})})}function Y(){return(0,q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)] dark:bg-[var(--surface-lift)]`})}var X=V.map(e=>({value:e.id,label:e.label,icon:(0,q.jsx)(e.icon,{className:`h-3.5 w-3.5`})}));function Te(){let e=U(),t=l(),{data:n,isError:r}=u({queryKey:[`thresholds`,e],queryFn:()=>me(e),staleTime:3e4}),[i,a]=(0,K.useState)(`relaxed`),[o,s]=(0,K.useState)(`conservative`),[c,d]=(0,K.useState)(`strict`),[f,p]=(0,K.useState)(!1),_=(0,K.useRef)(!1),[v,y]=(0,K.useState)(!1),b=(0,K.useRef)(null),x=(0,K.useRef)(null);(0,K.useEffect)(()=>{!n||_.current||(a(B(n.interactive).id),s(B(n.autonomous).id),d(B(n.headless).id),y(!0))},[n]),(0,K.useEffect)(()=>()=>{b.current!==null&&(clearTimeout(b.current),b.current=null,x.current?.(),x.current=null)},[]);let S=(0,K.useCallback)((n,r,i)=>{if(!e||!v)return;let a=V.find(e=>e.id===n)?.riskThreshold,o=V.find(e=>e.id===r)?.riskThreshold,s=V.find(e=>e.id===i)?.riskThreshold;!a||!o||!s||L(e,{interactive:a,autonomous:o,headless:s}).then(()=>{t.invalidateQueries({queryKey:[`thresholds`,e]})}).catch(()=>{})},[e,v,t]),C=(0,K.useCallback)((e,t,n)=>{b.current!==null&&clearTimeout(b.current),x.current=()=>S(e,t,n),b.current=setTimeout(()=>{x.current?.(),b.current=null,x.current=null},500)},[S]),w=(0,K.useCallback)(e=>{_.current=!0,a(e),C(e,o,c)},[o,c,C]),T=(0,K.useCallback)(e=>{_.current=!0,s(e),C(i,e,c)},[i,c,C]),D=(0,K.useCallback)(e=>{_.current=!0,d(e),C(i,o,e)},[i,o,C]),O=V.find(e=>e.id===i),k=V.find(e=>e.id===o),A=V.find(e=>e.id===c),j=!e||!v;return(0,q.jsxs)(m,{children:[(0,q.jsx)(`h2`,{className:`text-title-medium text-[var(--content-default)]`,children:`Assistant Access`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Control which actions your assistant can take without asking first. Each action is classified by risk level — your access level determines which levels auto-approve. Trust Rules fine-tune this for specific actions by raising or lowering their risk.`}),r&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--system-negative-strong)]`,children:`Could not load threshold settings. Check your connection and reload.`}),(0,q.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Conversations`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When you're chatting with your assistant directly.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:i,onChange:w,options:X,disabled:j})}),O&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:O.description})]}),(0,q.jsx)(Y,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),className:`flex items-center gap-1 text-[var(--content-secondary)] hover:text-[var(--content-default)] transition-colors`,"aria-expanded":f,children:[f?(0,q.jsx)(h,{className:`h-4 w-4`}):(0,q.jsx)(g,{className:`h-4 w-4`}),(0,q.jsx)(`span`,{className:`text-body-medium-default`,children:`Advanced`})]}),(0,q.jsxs)(`div`,{className:f?`mt-4 space-y-4`:`hidden`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Background`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When your assistant acts without you — scheduled tasks, background jobs, and external triggers.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:o,onChange:T,options:X,disabled:j})}),k&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:k.description})]}),(0,q.jsx)(Y,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Headless`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When triggered externally with no interactive client.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:c,onChange:D,options:X,disabled:j})}),A&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:A.description})]})]})]})]})]})}var Z=e(s(),1),Ee=[`bash`,`file_read`,`file_write`,`file_edit`,`web_fetch`,`skill_load`],De=[{value:`low`,label:`Low`,description:`Auto-approve without prompting`},{value:`medium`,label:`Medium`,description:`Prompt before executing`},{value:`high`,label:`High`,description:`Always require explicit approval`}];function Oe({assistantId:e,existingRule:t,onClose:n,onSaved:r}){let i=(0,K.useRef)(null),[a,o]=(0,K.useState)(t.tool),[s,c]=(0,K.useState)(t.pattern),[l,u]=(0,K.useState)(t.risk),[d,f]=(0,K.useState)(t.description??``),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(null),_=s.trim(),v=_.length>0&&!p,x=(0,K.useCallback)(async n=>{if(n.preventDefault(),!v)return;let i=d.trim()||`${a} — ${_}`;m(!0),g(null);try{await P(e,t.id,{risk:l,description:i}),r()}catch(e){g(e instanceof Error?e.message:`Failed to save trust rule.`)}finally{m(!1)}},[e,v,d,t,r,l,a,_]);return(0,Z.createPortal)((0,q.jsx)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`trust-rule-form-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:(0,K.useCallback)(e=>{e.key===`Escape`&&n()},[n]),onClick:(0,K.useCallback)(e=>{e.target===i.current&&n()},[n]),children:(0,q.jsxs)(`div`,{className:`mx-4 flex max-h-[calc(100vh-2rem)] w-full max-w-md flex-col rounded-xl border border-[var(--border-base)] bg-[var(--surface-lift)] shadow-xl`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-[var(--border-base)] px-6 py-4`,children:[(0,q.jsx)(`h2`,{id:`trust-rule-form-title`,className:`text-title-medium text-[var(--content-default)]`,children:`Edit Trust Rule`}),(0,q.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close`,className:`rounded-lg p-1.5 text-[var(--content-tertiary)] transition-colors hover:bg-[var(--surface-base)] hover:text-[var(--content-default)]`,children:(0,q.jsx)(y,{className:`h-4 w-4`})})]}),(0,q.jsxs)(`form`,{onSubmit:e=>void x(e),className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-6 py-4`,children:[h&&(0,q.jsx)(b,{tone:`error`,children:h}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`trust-rule-tool`,className:`block text-body-medium-default text-[var(--content-default)]`,children:`Tool`}),(0,q.jsx)(`div`,{className:`mt-1`,children:(0,q.jsx)(E,{value:a,onChange:o,disabled:!0,options:Ee.map(e=>({value:e,label:e}))})})]}),(0,q.jsx)(S,{label:`Pattern`,type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., git *`,disabled:!0}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`block text-body-medium-default text-[var(--content-default)]`,children:`Risk Level`}),(0,q.jsx)(`div`,{className:`mt-2 flex gap-2`,children:De.map(e=>(0,q.jsxs)(`button`,{type:`button`,onClick:()=>u(e.value),className:`flex-1 rounded-lg border px-3 py-2 text-left text-body-small-default transition-colors ${l===e.value?e.value===`low`?`border-[var(--system-positive-strong)] bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`:e.value===`medium`?`border-[var(--system-warning-strong)] bg-[var(--system-warning-weak)] text-[var(--system-warning-strong)]`:`border-[var(--system-negative-strong)] bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`:`border-[var(--border-element)] text-[var(--content-default)] hover:bg-[var(--surface-base)]`}`,children:[(0,q.jsx)(`div`,{children:e.label}),(0,q.jsx)(`div`,{className:`mt-0.5 text-label-medium-default leading-tight opacity-70`,children:e.description})]},e.value))})]}),(0,q.jsx)(S,{label:`Description (optional)`,type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`${a} — ${_||`pattern`}`}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg border border-[var(--border-element)] bg-white px-4 py-2 text-body-medium-default text-[var(--content-default)] transition-colors hover:bg-[var(--surface-base)] dark:border-[var(--border-base)] dark:bg-[var(--surface-lift)] dark:hover:bg-[var(--ghost-hover)]`,children:`Cancel`}),(0,q.jsx)(`button`,{type:`submit`,disabled:!v,className:`rounded-lg bg-[var(--system-positive-strong)] px-4 py-2 text-body-medium-default text-white transition-colors hover:bg-[var(--system-positive-strong)] disabled:cursor-not-allowed disabled:opacity-50`,children:p?`Saving…`:`Save`})]})]})]})}),document.body)}function ke(e){return e.origin===`default`&&!e.userModified}function Ae(e,t){let n=new Set,r=[];for(let t of e)n.has(t.id)||(n.add(t.id),r.push(t));for(let e of t)n.has(e.id)||(n.add(e.id),r.push(e));return r.sort((e,t)=>e.tool===t.tool?e.description.localeCompare(t.description):e.tool.localeCompare(t.tool))}function je(e){switch(e){case`low`:return`positive`;case`medium`:return`warning`;case`high`:return`negative`}}function Q(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Me({assistantId:e,onClose:t}){let n=(0,K.useRef)(null),[r,i]=(0,K.useState)([]),[a,o]=(0,K.useState)(!0),[s,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(!1),g=(0,K.useCallback)(async t=>{if(t){let[t,n]=await Promise.all([H(e),H(e,{origin:`default`})]);return Ae(t,n)}return H(e)},[e]),_=(0,K.useCallback)(async()=>{o(!0);try{i(await g(m)),l(null)}catch(e){l(e instanceof Error?e.message:`Failed to load trust rules.`)}finally{o(!1)}},[g,m]);(0,K.useEffect)(()=>{let e=!1;return(async()=>{o(!0);try{let t=await g(m);e||(i(t),l(null))}catch(t){e||l(t instanceof Error?t.message:`Failed to load trust rules.`)}finally{e||o(!1)}})(),()=>{e=!0}},[g,m]);let y=(0,K.useCallback)(async()=>{if(f)try{await fe(e,f.id),_()}catch(e){l(e instanceof Error?e.message:`Failed to delete trust rule.`)}finally{p(null)}},[e,f,_]);return(0,Z.createPortal)((0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{ref:n,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`trust-rules-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:(0,K.useCallback)(e=>{e.key===`Escape`&&t()},[t]),onClick:(0,K.useCallback)(e=>{e.target===n.current&&t()},[t]),children:(0,q.jsxs)(`div`,{className:`mx-4 flex max-h-[80vh] w-full max-w-2xl flex-col rounded-xl border border-[var(--border-base)] bg-[var(--surface-lift)] shadow-xl`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-[var(--border-base)] px-6 py-4`,children:[(0,q.jsx)(`h2`,{id:`trust-rules-title`,className:`text-title-medium text-[var(--content-default)]`,children:`Trust Rules`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(C,{checked:m,onChange:h,label:`Show all defaults`}),(0,q.jsx)(c,{variant:`outlined`,onClick:t,children:`Done`})]})]}),(0,q.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-6 py-4`,children:[s&&(0,q.jsx)(`div`,{className:`mb-3`,children:(0,q.jsx)(b,{tone:`error`,children:s})}),a?(0,q.jsx)(`div`,{className:`flex h-48 items-center justify-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Loading…`}):r.length===0?(0,q.jsxs)(`div`,{className:`flex h-48 flex-col items-center justify-center gap-2 px-6 text-[var(--content-tertiary)]`,children:[(0,q.jsx)(I,{className:`h-8 w-8`}),(0,q.jsx)(`p`,{className:`max-w-xs text-center text-body-medium-lighter`,children:`No trust rules yet. Rules are created when you classify actions from permission prompts.`})]}):(0,q.jsx)(`ul`,{className:`divide-y divide-[var(--border-base)]`,children:r.map(e=>{let t=ke(e);return(0,q.jsxs)(`li`,{className:`flex items-start gap-3 py-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:e.tool}),(0,q.jsx)(x,{tone:je(e.risk),children:Q(e.risk)}),e.origin===`default`&&(0,q.jsx)(x,{tone:`neutral`,children:`Default`}),e.userModified&&(0,q.jsx)(x,{tone:`warning`,children:`Modified`})]}),(0,q.jsx)(`div`,{className:`mt-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:e.pattern}),e.description&&(0,q.jsx)(`div`,{className:`mt-0.5 truncate text-body-small-default text-[var(--content-tertiary)]`,children:e.description})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":`Edit ${e.tool} rule`,onClick:()=>d(e),className:`rounded-lg p-1.5 text-[var(--content-tertiary)] transition-colors hover:bg-[var(--surface-base)] hover:text-[var(--content-default)]`,children:(0,q.jsx)(v,{className:`h-4 w-4`})}),(!t||e.userModified)&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`Delete ${e.tool} rule`,onClick:()=>p(e),className:`rounded-lg p-1.5 text-[var(--system-negative-strong)] transition-colors hover:bg-[var(--system-negative-weak)]`,children:(0,q.jsx)(he,{className:`h-4 w-4`})})]})]},e.id)})})]})]})}),u&&(0,q.jsx)(Oe,{assistantId:e,existingRule:u,onClose:()=>d(null),onSaved:()=>{d(null),_()}}),(0,q.jsx)(T,{open:f!==null,title:`Delete Trust Rule?`,message:f?`Remove the ${Q(f.risk).toLowerCase()}-risk rule for ${f.tool} matching "${f.pattern}"?`:``,confirmLabel:`Delete`,cancelLabel:`Cancel`,destructive:!0,onConfirm:()=>void y(),onCancel:()=>p(null)})]}),document.body)}function Ne(){let e=U(),[t,n]=(0,K.useState)(!1);return(0,q.jsxs)(m,{children:[(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(I,{className:`mt-0.5 h-5 w-5 shrink-0 text-[var(--content-secondary)]`}),(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsx)(`h2`,{className:`text-title-medium text-[var(--content-default)]`,children:`Trust Rules`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Manage per-tool rules that control which actions auto-approve and which require your explicit permission.`})]}),(0,q.jsx)(c,{variant:`outlined`,onClick:()=>n(!0),children:`Manage`})]}),t&&(0,q.jsx)(Me,{assistantId:e,onClose:()=>n(!1)})]})}var Pe=[{value:`dontRetain`,label:`Don't retain`},{value:`oneHour`,label:`1 hour`},{value:`oneDay`,label:`1 day`},{value:`sevenDays`,label:`7 days`},{value:`thirtyDays`,label:`30 days`},{value:`ninetyDays`,label:`90 days`},{value:`keepForever`,label:`Keep forever`}],Fe=`thirtyDays`;function $(){return(0,q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)] dark:bg-[var(--surface-lift)]`})}function Ie(){let e=F({platformHostedOnly:!0}),t=k(),a=t,o=O.use.user()?.id??null,[s,c]=(0,K.useState)(()=>n(`shareAnalytics`,!0)),[l,u]=(0,K.useState)(()=>n(`shareDiagnostics`,!0)),[d,f]=(0,K.useState)(()=>i(`llmLogRetention`,Fe));return(0,q.jsxs)(`div`,{className:`space-y-4`,children:[(0,q.jsx)(we,{}),(0,q.jsx)(Se,{}),(0,q.jsx)(Ne,{}),(0,q.jsx)(Te,{}),(0,q.jsx)(W,{title:`Privacy`,subtitle:t?(0,q.jsxs)(q.Fragment,{children:[`View details about what data we collect and how it's used in our`,` `,(0,q.jsx)(`a`,{href:oe(ae.docs.legal.privacyPolicy),target:`_blank`,rel:`noreferrer`,className:`underline`,children:`privacy policy`}),`.`]}):void 0,children:(0,q.jsxs)(`div`,{className:`space-y-4`,children:[a&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(G,{label:`Share Analytics`,helperText:`Send aggregated product usage data`,checked:s,onChange:()=>{let e=!s;c(e),D(`share_analytics`,e,{userId:o,hasPlatformSession:t})},variant:`toggle-trailing`}),(0,q.jsx)($,{}),(0,q.jsx)(G,{label:`Share Diagnostics`,helperText:`Send crash reports, conversation traces, and session replay data`,checked:l,onChange:()=>{let e=!l;u(e),D(`share_diagnostics`,e,{userId:o,hasPlatformSession:t})},variant:`toggle-trailing`}),(0,q.jsx)($,{})]}),(0,q.jsx)(Ce,{}),e!==`gated`&&(0,q.jsx)($,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`llm-log-retention`,className:`block text-body-medium-default text-[var(--content-default)]`,children:`LLM Request Log Retention`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:d,onChange:e=>{f(e),r(`llmLogRetention`,e)},options:Pe})}),(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:`How long to keep LLM request and response logs on this device. These logs record the prompts and completions sent to model providers and are used for debugging. Shorter retention improves privacy; longer retention helps troubleshoot issues.`})]})]})})]})}export{Ie as PrivacyPage};
|
|
@@ -1 +1 @@
|
|
|
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{p as o}from"./local-mode-Bskd5bsT.js";import{t as s}from"./is-electron-y5bNUVyG.js";import{d as c,i as l,n as u}from"./auth-store-
|
|
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{p as o}from"./local-mode-Bskd5bsT.js";import{t as s}from"./is-electron-y5bNUVyG.js";import{d as c,i as l,n as u}from"./auth-store-65JKPW7C.js";import{m as d}from"./native-biometric-B2cBAQ1U.js";import{c as f}from"./routes-BXlWEOF0.js";import{f as p,p as m,u as h}from"./prefs-DNYLVDvB.js";import{t as g}from"./client-feature-flag-store-Ri-a_LuI.js";import{gt as _,ht as v,on as y,pt as b,ut as x,vt as S}from"./index-B4Qq7TL7.js";import{t as C}from"./step-indicator-dots-B-KCGh9e.js";import{n as w,t as T}from"./consent-controls-udcijSAB.js";var E=e(t(),1);function D({isNative:e,isLocalHatch:t}){return e||t?f.onboarding.hatching:f.onboarding.research}var O=a();function k(){let e=r(),[t]=i(),a=u.use.user()?.id??null,k=s(),A=d(),j=_(g.use.stringFlags().preChatOnboardingExperiment20260606??`control`),[M,N]=p(),[P,F]=m(),[I,L]=h(),R=l();(0,E.useEffect)(()=>{A||v()},[A]);let z=t.get(`preview`)===`true`,B=(0,E.useCallback)(e=>{},[]),V=z?B:N,H=z?B:F,U=z?B:L,W=(0,E.useCallback)(()=>{if(z){e(`${f.onboarding.prechat}?preview=true`);return}if(c({userId:a,tos:P,privacy:I,shareAnalytics:null,shareDiagnostics:M,hasPlatformSession:R}),!A){let e=S(j);b(x.privacyTos,{userId:a,variant:e})}let n=t.get(`hosting`),r=new URLSearchParams;n&&r.set(`hosting`,n);let i=r.toString();e(`${D({isNative:A,isLocalHatch:o()&&n!==null&&n!==`vellum-cloud`})}${i?`?${i}`:``}`)},[I,R,A,z,e,j,t,M,P,a]);return(0,O.jsx)(y,{children:(0,O.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${k?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[A&&(0,O.jsx)(`div`,{className:`mb-8 flex w-full justify-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:(0,O.jsx)(C,{current:2,total:3})}),(0,O.jsx)(`h1`,{className:k?`text-title-large`:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Before You Start`}),(0,O.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${k?`mt-3.5`:`mt-4`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Choose your privacy preferences. You can update these anytime in the Settings.`}),(0,O.jsx)(w,{electron:k,showAnalytics:!1,shareAnalytics:!1,shareDiagnostics:M,onShareAnalyticsChange:B,onShareDiagnosticsChange:V,className:`mt-8 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`}}),(0,O.jsx)(T,{electron:k,privacyConsent:I,tosAccepted:P,onPrivacyChange:U,onTosChange:H,className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`}}),(0,O.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${k?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.55s both`},children:[(0,O.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:!P||!I,onClick:W,className:k?void 0:`h-11 text-base`,children:`Start`}),(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:()=>e(-1),className:k?void 0:`h-11 text-base`,children:`Back`})]})]})})}export{k as PrivacyScreen};
|
package/dist/assets/{provider-callback-page-apRb9-js.js → provider-callback-page-BoO2JgZt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
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{d as r,h as i,t as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{p as s,w as c}from"./local-mode-Bskd5bsT.js";import{D as l,n as u}from"./auth-store-
|
|
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{d as r,h as i,t as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{p as s,w as c}from"./local-mode-Bskd5bsT.js";import{D as l,n as u}from"./auth-store-65JKPW7C.js";import{c as d}from"./api-Dfrm6N2I.js";import{S as f,_ as p}from"./native-biometric-B2cBAQ1U.js";import{c as m}from"./routes-BXlWEOF0.js";import{a as h,i as g}from"./login-flow-DYLpX6IU.js";import{n as _}from"./index-B4Qq7TL7.js";import{r as v,t as y}from"./account-shell-DaECsri2.js";var b=e(n(),1),x=o();function S(){let[e]=i(),n=r(),o=u.use.refreshSession(),S=e.get(`error`),[C,w]=(0,b.useState)(null),T=(0,b.useRef)(!1),E=e.get(`returnTo`),D=g(e);return(0,b.useEffect)(()=>{T.current||S||(T.current=!0,(async()=>{try{let t=await f(),r=p(t.ok&&!!t.data.user,t.ok?[]:t.flows??[]);switch(r.kind){case`authenticated`:{if(await o(),s())try{let e=await d();if(e.ok&&e.data.length>0&&(await c(e.data,l.getState().currentOrganizationId??void 0),!E)){n(m.assistant,{replace:!0});break}}catch{}let e=m.assistant,{destination:t,requiresFullPageNavigation:r}=h({returnTo:E,fallback:e,authIntent:D});r?window.location.href=t:n(t,{replace:!0});break}case`provider_signup`:{let t=e.get(`returnTo`);n(t?`${m.account.providerSignup}?returnTo=${encodeURIComponent(t)}`:m.account.providerSignup,{replace:!0});break}case`error`:w(r.message);break}}catch(e){t(e,{context:`provider_callback`}),w(`Something went wrong. Please try signing in again.`)}})())},[D,S,o,E,n,e]),S===`signup_closed`?(0,x.jsxs)(y,{children:[(0,x.jsx)(v,{title:`Signups are currently closed`,subtitle:`Join the community to request access or learn when signups reopen.`}),(0,x.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,x.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Join the community`}),(0,x.jsx)(a,{to:m.account.login,className:`text-sm font-medium text-[var(--content-emphasised)] hover:underline`,children:`Back to sign in`})]})]}):S||C?(0,x.jsxs)(y,{children:[(0,x.jsx)(v,{title:`Authentication failed`,subtitle:C??`Something went wrong during social sign-in. Please try again or use a different method.`}),(0,x.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,x.jsx)(a,{to:m.account.login,className:`inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Back to sign in`})})]}):(0,x.jsx)(y,{children:(0,x.jsx)(v,{title:`Completing sign-in...`,subtitle:`Please wait while we finish authenticating you.`})})}export{S as ProviderCallbackPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,h as r,t as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{n as o}from"./auth-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,h as r,t as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{n as o}from"./auth-store-65JKPW7C.js";import{C as s,T as c,x as l}from"./native-biometric-B2cBAQ1U.js";import{c as u}from"./routes-BXlWEOF0.js";import{a as d,o as f}from"./login-flow-DYLpX6IU.js";import{i as p,n as m,r as h,t as g}from"./account-shell-DaECsri2.js";import{t as _}from"./signup-shell-DCGARCES.js";var v=e(t(),1),y=a();function b(){let e=n(),[t]=r(),a=o.use.refreshSession(),b=t.get(`returnTo`),[x,S]=(0,v.useState)(``),[C,w]=(0,v.useState)(``),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(``),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(null),[N,P]=(0,v.useState)(!1),[F,I]=(0,v.useState)(!0),L=(0,v.useRef)(!1);(0,v.useEffect)(()=>{L.current||(L.current=!0,(async()=>{try{let t=await l();if(!t.ok){e(u.account.login,{replace:!0});return}S(t.data.user.email??``),w(t.data.user.username??``),E(t.data.user.first_name??``),O(t.data.user.last_name??``),I(!1)}catch{e(u.account.login,{replace:!0})}})())},[e]);let R=async()=>{let t=await c({email:x,username:C});if(!t.ok){if(s(t)){await a();let t=f(b,u.account.root);t.requiresFullPageNavigation?window.location.href=t.destination:e(t.destination);return}M(t.errors[0]?.message??`Failed to complete signup.`);return}await a();let n=d({returnTo:b,fallback:u.account.root,authIntent:`signup`});n.requiresFullPageNavigation?window.location.href=n.destination:e(n.destination)},z=async e=>{e.preventDefault(),M(null),P(!0);try{await R()}catch{M(`Something went wrong. Please try again.`)}finally{P(!1)}},B=async e=>{if(e.preventDefault(),k.trim()){M(null),P(!0);try{await R()}catch{M(`Something went wrong. Please try again.`)}finally{P(!1)}}};if(F)return(0,y.jsx)(g,{children:(0,y.jsx)(h,{title:`Completing signup...`,subtitle:`Please wait while we load your information.`})});if(x&&C){let e=k.trim().length>0&&!N;return(0,y.jsx)(_,{children:(0,y.jsxs)(`form`,{onSubmit:B,className:`signup-details__thread`,children:[(0,y.jsxs)(`h2`,{className:`signup-details__heading`,children:[`Almost there,`,(0,y.jsx)(`br`,{}),`one more detail`]}),j&&(0,y.jsx)(`p`,{className:`signup-details__error`,children:j}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`What should I call you? `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,placeholder:`First name`,value:T,readOnly:!0,disabled:!0})]}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`And your last name? `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,placeholder:`Last name`,value:D,readOnly:!0,disabled:!0})]}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`Your role `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,autoComplete:`organization-title`,placeholder:`e.g. Software Engineer`,value:k,onChange:e=>A(e.target.value),autoFocus:!0})]}),(0,y.jsx)(`div`,{className:`signup-details__step`,children:(0,y.jsx)(`button`,{type:`submit`,className:`signup-details__continue`,disabled:!e,children:N?`Setting up…`:`Continue →`})})]})})}return(0,y.jsxs)(g,{children:[(0,y.jsx)(h,{title:`Complete your account`,subtitle:`We need a few more details to finish setting up your account.`}),(0,y.jsxs)(m,{onSubmit:z,error:j,submitLabel:`Complete signup`,submittingLabel:`Completing...`,isSubmitting:N,footer:(0,y.jsx)(i,{to:u.account.login,className:`text-sm text-[var(--content-secondary)] hover:text-[var(--content-default)]`,children:`← Back to sign in`}),children:[(0,y.jsx)(p,{id:`email`,type:`email`,autoComplete:`email`,placeholder:`Email`,value:x,onChange:e=>S(e.target.value),required:!0}),(0,y.jsx)(p,{id:`username`,type:`text`,autoComplete:`username`,placeholder:`Username`,value:C,onChange:e=>w(e.target.value),required:!0})]})]})}export{b as ProviderSignupPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-y5bNUVyG.js";import{t as i}from"./public-asset-WikBpVQd.js";import{Aa as a}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-y5bNUVyG.js";import{t as i}from"./public-asset-WikBpVQd.js";import{Aa as a}from"./index-B4Qq7TL7.js";var o=e(t(),1);async function s(e){r()&&await window.vellum?.quickInput?.submit(e)}async function c(){r()&&await window.vellum?.quickInput?.dismiss()}var l=n();function u(){let[e,t]=(0,o.useState)(``),n=(0,o.useRef)(null);(0,o.useEffect)(()=>{n.current?.focus()},[]);let r=(0,o.useCallback)(n=>{n.preventDefault();let r=e.trim();r&&(s(r),t(``))},[e]),u=(0,o.useCallback)(e=>{e.key===`Escape`&&(e.preventDefault(),c())},[]);return(0,l.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center bg-transparent p-2`,children:(0,l.jsxs)(`form`,{onSubmit:r,className:`flex w-full items-center gap-3 rounded-2xl border border-[var(--border-default)] bg-[var(--surface-base)] px-4 py-3 shadow-lg`,children:[(0,l.jsx)(`img`,{src:i(`/vellum-logo.svg`),alt:`Vellum`,width:24,height:24,className:`shrink-0 dark:hidden`,draggable:!1}),(0,l.jsx)(`img`,{src:i(`/vellum-logo-white.svg`),alt:`Vellum`,width:24,height:24,className:`hidden shrink-0 dark:block`,draggable:!1}),(0,l.jsx)(`input`,{ref:n,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:u,placeholder:`Ask Vellum anything...`,className:`min-w-0 flex-1 bg-transparent text-sm text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,l.jsx)(`button`,{type:`submit`,disabled:!e.trim(),className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-[var(--surface-accent)] text-[var(--content-on-accent)] transition-opacity disabled:opacity-30`,children:(0,l.jsx)(a,{size:16})})]})})}export{u as QuickInputPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useMutation-Lj4VunQV.js";import{t}from"./queryOptions-BtNi-_9H.js";import{t as n}from"./infiniteQueryOptions-C6p49ZmI.js";import{t as r}from"./client.gen-DVfIRXUZ.js";import{A as i,At as a,Ct as ee,Dt as te,Et as ne,F as re,Ft as ie,G as ae,I as oe,It as se,L as ce,Lt as le,Mt as ue,Nt as de,O as fe,Ot as pe,Pt as me,Q as he,R as ge,S as _e,St as ve,T as ye,U as be,V as xe,W as Se,_ as Ce,_t as we,at as o,b as s,bt as c,c as l,dt as u,f as d,ft as f,g as p,gt as m,h,ht as g,it as _,j as v,jt as y,k as b,kt as x,lt as S,m as C,mt as w,n as T,nt as E,ot as D,pt as O,r as k,rt as Te,s as Ee,tt as De,ut as Oe,v as ke,vt as Ae,wt as je,x as Me,xt as Ne,y as Pe,yt as Fe}from"./sdk.gen-9Cdt87h5.js";var A=(e,t,n,i)=>{let a={_id:e,baseUrl:t?.baseUrl||(t?.client??r).getConfig().baseUrl};return n&&(a._infinite=n),i&&(a.tags=i),t?.body&&(a.body=t.body),t?.headers&&(a.headers=t.headers),t?.path&&(a.path=t.path),t?.query&&(a.query=t.query),[a]},j=e=>A(`assistantsList`,e),Ie=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ye({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:j(e)}),Le=(e,t)=>{let n={...e[0]};return t.body&&(n.body={...e[0].body,...t.body}),t.headers&&(n.headers={...e[0].headers,...t.headers}),t.path&&(n.path={...e[0].path,...t.path}),t.query&&(n.query={...e[0].query,...t.query}),n},Re=e=>A(`assistantsDoctorHistoryList`,e),ze=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Ee({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Re(e)}),Be=e=>A(`assistantsDoctorHistoryRetrieve`,e),Ve=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await l({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Be(e)}),He=e=>({mutationFn:async t=>{let{data:n}=await d({...e,...t,throwOnError:!0});return n}}),Ue=t=>e({...He(),...t}),M=e=>A(`assistantsDomainsList`,e),We=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await p({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:M(e)}),Ge=e=>({mutationFn:async t=>{let{data:n}=await C({...e,...t,throwOnError:!0});return n}}),Ke=e=>({mutationFn:async t=>{let{data:n}=await h({...e,...t,throwOnError:!0});return n}}),qe=e=>A(`assistantsDomainsVerificationStatusRetrieve`,e),Je=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Ce({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:qe(e)}),N=e=>A(`assistantsEmailAddressesList`,e),Ye=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await s({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:N(e)}),Xe=e=>({mutationFn:async t=>{let{data:n}=await ke({...e,...t,throwOnError:!0});return n}}),Ze=e=>({mutationFn:async t=>{let{data:n}=await Pe({...e,...t,throwOnError:!0});return n}}),P=e=>A(`assistantsEmailAddressesStatusRetrieve`,e),Qe=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Me({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:P(e)}),$e=e=>A(`assistantsEmailsList`,e),et=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await _e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:$e(e)}),tt=e=>({mutationFn:async t=>{let{data:n}=await i({...e,...t,throwOnError:!0});return n}}),nt=t=>e({...tt(),...t}),F=e=>A(`assistantsOauthConnectionsList`,e),I=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await fe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:F(e)}),rt=(e,t,n)=>e.setQueryData(I(t).queryKey,n),it=e=>({mutationFn:async t=>{let{data:n}=await b({...e,...t,throwOnError:!0});return n}}),L=t=>e({...it(),...t}),R=e=>A(`assistantsReleaseChannelRetrieve`,e),at=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ce({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:R(e)}),ot=e=>({mutationFn:async t=>{let{data:n}=await re({...e,...t,throwOnError:!0});return n}}),st=e=>({mutationFn:async t=>{let{data:n}=await oe({...e,...t,throwOnError:!0});return n}}),ct=e=>A(`assistantsSystemEventsList`,e,!0),lt=e=>n({queryFn:async({pageParam:t,queryKey:n,signal:r})=>{let i=Le(n,typeof t==`object`?t:{query:{offset:t}}),{data:a}=await ae({...e,...i,signal:r,throwOnError:!0});return a},queryKey:ct(e)}),z=e=>A(`assistantsRetrieve`,e),ut=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await xe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:z(e)}),dt=e=>A(`assistantsOperationalStatusDetailRead`,e),ft=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await v({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:dt(e)}),B=e=>({mutationFn:async t=>{let{data:n}=await ge({...e,...t,throwOnError:!0});return n}}),pt=t=>e({...B(),...t}),V=e=>A(`assistantsSleepPolicyDetailRead`,e),mt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Se({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:V(e)}),ht=e=>({mutationFn:async t=>{let{data:n}=await be({...e,...t,throwOnError:!0});return n}}),gt=t=>e({...ht(),...t}),H=e=>A(`assistantsUpgradePolicyDetailRead`,e),_t=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await he({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:H(e)}),vt=e=>A(`assistantsAccessConsentRetrieve`,e),U=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await T({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:vt(e)}),yt=(e,t,n)=>e.setQueryData(U(t).queryKey,n),bt=e=>A(`assistantsActiveRetrieve`,e),xt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await k({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:bt(e)}),St=e=>A(`featureFlagsClientFlagValuesRetrieve`,e),Ct=e=>({mutationFn:async t=>{let{data:n}=await De({...e,...t,throwOnError:!0});return n}}),W=e=>A(`organizationsBillingAutoTopUpRetrieve`,e),G=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await _({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:W(e)}),wt=(e,t,n)=>e.setQueryData(G(t).queryKey,n),Tt=e=>({mutationFn:async t=>{let{data:n}=await D({...e,...t,throwOnError:!0});return n}}),Et=e=>({mutationFn:async t=>{let{data:n}=await E({...e,...t,throwOnError:!0});return n}}),Dt=e=>({mutationFn:async t=>{let{data:n}=await Te({...e,...t,throwOnError:!0});return n}}),Ot=e=>({mutationFn:async t=>{let{data:n}=await o({...e,...t,throwOnError:!0});return n}}),kt=e=>A(`organizationsBillingInvoicesRetrieve`,e),K=e=>A(`organizationsBillingLowBalanceAlertRetrieve`,e),q=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await S({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:K(e)}),At=(e,t,n)=>e.setQueryData(q(t).queryKey,n),jt=e=>({mutationFn:async t=>{let{data:n}=await Oe({...e,...t,throwOnError:!0});return n}}),J=e=>A(`organizationsBillingPlansRetrieve`,e),Mt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await u({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:J(e)}),Nt=e=>({mutationFn:async t=>{let{data:n}=await f({...e,...t,throwOnError:!0});return n}}),Pt=t=>e({...Nt(),...t}),Y=e=>A(`organizationsBillingSubscriptionRetrieve`,e),Ft=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Ae({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Y(e)}),It=e=>({mutationFn:async t=>{let{data:n}=await O({...e,...t,throwOnError:!0});return n}}),Lt=e=>({mutationFn:async t=>{let{data:n}=await w({...e,...t,throwOnError:!0});return n}}),Rt=e=>({mutationFn:async t=>{let{data:n}=await g({...e,...t,throwOnError:!0});return n}}),X=e=>A(`organizationsBillingSubscriptionOnboardingRetrieve`,e),zt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await we({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:X(e)}),Bt=e=>({mutationFn:async t=>{let{data:n}=await m({...e,...t,throwOnError:!0});return n}}),Vt=e=>({mutationFn:async t=>{let{data:n}=await Fe({...e,...t,throwOnError:!0});return n}}),Z=e=>A(`organizationsBillingSummaryRetrieve`,e),Ht=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Ne({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Z(e)}),Ut=e=>({mutationFn:async t=>{let{data:n}=await c({...e,...t,throwOnError:!0});return n}}),Wt=t=>e({...Ut(),...t}),Gt=e=>({mutationFn:async t=>{let{data:n}=await ve({...e,...t,throwOnError:!0});return n}}),Kt=e=>A(`organizationsBillingUsageSeriesRetrieve`,e),qt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ee({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Kt(e)}),Jt=e=>A(`organizationsBillingUsageTotalsRetrieve`,e),Yt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await je({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Jt(e)}),Q=e=>A(`organizationsNotificationsList`,e),Xt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await te({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Q(e)}),Zt=e=>({mutationFn:async t=>{let{data:n}=await ne({...e,...t,throwOnError:!0});return n}}),Qt=e=>({mutationFn:async t=>{let{data:n}=await a({...e,...t,throwOnError:!0});return n}}),$t=e=>({mutationFn:async t=>{let{data:n}=await pe({...e,...t,throwOnError:!0});return n}}),en=e=>({mutationFn:async t=>{let{data:n}=await x({...e,...t,throwOnError:!0});return n}}),tn=e=>A(`organizationsNotificationsSummaryRetrieve`,e),nn=e=>A(`referralCodesMeRetrieve`,e),rn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await y({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:nn(e)}),an=e=>A(`releasesList`,e),on=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ue({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:an(e)}),sn=e=>({mutationFn:async t=>{let{data:n}=await de({...e,...t,throwOnError:!0});return n}}),cn=t=>e({...sn(),...t}),$=e=>A(`userMfaFactorsList`,e),ln=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await se({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:$(e)}),un=e=>({mutationFn:async t=>{let{data:n}=await me({...e,...t,throwOnError:!0});return n}}),dn=t=>e({...un(),...t}),fn=e=>({mutationFn:async t=>{let{data:n}=await ie({...e,...t,throwOnError:!0});return n}}),pn=t=>e({...fn(),...t}),mn=e=>({mutationFn:async t=>{let{data:n}=await le({...e,...t,throwOnError:!0});return n}}),hn=t=>e({...mn(),...t});export{Lt as $,z as A,pn as At,G as B,ft as C,nt as Ct,R as D,Wt as Dt,at as E,Pt as Et,H as F,kt as G,wt as H,St as I,At as J,q as K,Ct as L,V as M,ln as Mt,lt as N,$ as Nt,B as O,cn as Ot,_t as P,It as Q,Et as R,rt as S,L as St,st as T,gt as Tt,Ot as U,W as V,Tt as W,Mt as X,jt as Y,J as Z,et as _,Qt as _t,Ve as a,Y as at,I as b,on as bt,We as c,Z as ct,Xe as d,Yt as dt,Rt as et,Ze as f,Zt as ft,P as g,en as gt,Qe as h,$t as ht,ze as i,Ft as it,mt as j,hn as jt,ut as k,dn as kt,M as l,Gt as lt,N as m,Q as mt,yt as n,zt as nt,Ge as o,Vt as ot,Ye as p,Xt as pt,K as q,xt as r,X as rt,Ke as s,Ht as st,U as t,Bt as tt,Je as u,qt as ut,Ie as v,tn as vt,ot as w,pt as wt,F as x,Ue as xt,j as y,rn as yt,Dt as z};
|
|
@@ -1 +1 @@
|
|
|
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,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{c as o}from"./routes-
|
|
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,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{c as o}from"./routes-BXlWEOF0.js";import{t as s}from"./client-feature-flag-store-Ri-a_LuI.js";import{t as c}from"./conversation-store-CynXqAcO.js";import{t as l}from"./conversation-selection-CfSCgJxD.js";import{cn as u}from"./index-B4Qq7TL7.js";var d=e(t(),1),f=a(),p=[{claim:`Software engineer based in Austin, TX`,confidence:`confident`,sources:[`https://github.com/example-dev`]},{claim:`Product engineer at an early-stage AI startup`,confidence:`confident`,sources:[`https://example.com/team`]},{claim:`Maintains an open-source CLI tool for local LLM evaluation and tooling`,confidence:`confident`,sources:[`https://github.com/example-dev`,`https://example.com/project`]},{claim:`Primarily writes TypeScript and Go`,confidence:`confident`,sources:[`https://github.com/example-dev`]},{claim:`Came up through a coding bootcamp rather than a CS degree`,confidence:`maybe`,sources:[]}],m=[{suggestion:`I'll summarize this week's AI model releases for you`,prompt:`Summarize this week's AI model releases for me.`},{suggestion:`I'll draft a technical blog post from your latest notes`,prompt:`Draft a technical blog post from my latest notes.`},{suggestion:`I'll build you a tracker for competitor product launches`,prompt:`Build me a tracker for competitor product launches.`},{suggestion:`I'll analyze a CSV of metrics and surface the trends`,prompt:`Analyze a CSV of metrics for me and surface the trends.`}];function h(e){return`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&sz=64`}function g(){let e=r(),t=s.use.researchOnboarding(),[a,g]=(0,d.useState)(`results`),[_,v]=(0,d.useState)(()=>new Map),y=p.map((e,t)=>({fact:e,index:t}));return t?(0,f.jsxs)(`div`,{className:`relative h-screen w-screen`,children:[(0,f.jsx)(`div`,{className:`absolute left-1/2 top-3 z-50 flex -translate-x-1/2 gap-1 rounded-full border border-[var(--border-base)] bg-[var(--surface-lift)] p-1`,children:[`loading`,`results`,`empty`].map(e=>(0,f.jsx)(n,{variant:a===e?`primary`:`ghost`,size:`compact`,onClick:()=>g(e),children:e},e))}),(0,f.jsx)(u,{mode:a,loadingContent:(0,f.jsxs)(`div`,{className:`text-[var(--content-secondary)]`,children:[(0,f.jsx)(`p`,{className:`text-lg`,children:`Getting to know you…`}),(0,f.jsx)(`p`,{className:`text-body-medium-lighter`,children:`(mock — the live flow shows the search activity feed here)`})]}),items:y,removals:_,suggestions:m,resultsTitle:`Here's what I know about you. You can remove any that aren't true:`,showSuggestions:!0,canContinue:!0,resolveFavicon:h,onRemove:e=>v(t=>t.has(e)?t:new Map(t).set(e,null)),onSetReason:(e,t)=>v(n=>new Map(n).set(e,t)),onRestore:e=>v(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n}),onSuggestionClick:t=>{let n=l();c.getState().setActiveConversationId(n),e(`${o.conversation(n)}?prompt=${encodeURIComponent(t)}`)},onContinue:()=>e(o.assistant)})]}):(0,f.jsx)(i,{to:o.assistant,replace:!0})}export{g as ResearchMockPage};
|
package/dist/assets/{research-onboarding-route-CWQvTAZs.js → research-onboarding-route-CeTflgoE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
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-DMwzREGQ.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 O,p as k}from"./local-mode-Bskd5bsT.js";import{Bn as A,V as j,Vn as M,_n as N,et as ee,gn as te,xr as ne}from"./sdk.gen-CFgJ4K6f.js";import{r as re}from"./api-errors-CrWDzVca.js";import{A as ie,B as P,L as ae,R as F,n as oe,z as se}from"./auth-store-B8a9KLUt.js";import{a as ce,o as le,r as ue}from"./api-D2xHldt2.js";import{c as de}from"./routes-DYcJgn9k.js";import{n as I}from"./platform-detection-DJWRuZPt.js";import{c as fe,l as pe}from"./prechat-BBwYr5Qb.js";import{t as me}from"./browser-timezone-B2VEIYkv.js";import{c as L}from"./conversation-list-fetchers-_PUdRqRZ.js";import{i as he,n as ge,r as _e,t as ve}from"./research-onboarding-persistence-D_h0dT1o.js";import{A as ye,B as be,C as xe,D as Se,E as Ce,F as we,I as Te,L as Ee,M as De,N as Oe,O as R,P as ke,R as z,S as B,T as Ae,V,_ as je,a as Me,b as Ne,d as Pe,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 H,v as Ge,w as Ke,x as qe,y as Je}from"./proxy-Cadlowdl.js";import{t as Ye}from"./AnimatePresence-TZWSGjkI.js";import{t as U}from"./use-reduced-motion-BPBlq9_a.js";import{$ as Xe,Gt as Ze,Wt as Qe,Xt as $e,et as W,ft as et,ja as G,ji as tt,ln as nt,mt as rt,on as it,qt as at,sn as ot,un as st,ur as ct,xn as lt}from"./index-CkKSY1-Q.js";import{n as ut,t as dt}from"./onboarding-step-layout-Cup_f9lB.js";import{t as ft}from"./prechat-names-Cjl3JzzN.js";var pt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function mt(e,t){return De(e)?e[pt(0,e.length,t)]:e}var ht=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 gt(this.animations,`duration`)}get iterationDuration(){return gt(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 gt(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 _t=class extends ht{then(e,t){return this.finished.finally(e).then(()=>{})}};function vt(...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=Ce(i,a,o);return t?s(r):s}function yt(e,t){return e in t}var bt=class extends We{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(yt(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}},K=e(n(),1);function xt(e){let t=V(()=>B(e)),{isStatic:n}=(0,K.useContext)(Ue);if(n){let[,n]=(0,K.useState)(e);(0,K.useEffect)(()=>t.on(`change`,n),[])}return t}function St(e,t){let n=xt(t()),r=()=>n.set(t());return r(),be(()=>{let t=()=>Re.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),ye(r)}}),n}function Ct(e){qe.current=[],e();let t=St(qe.current,e);return qe.current=void 0,t}function wt(e,t,n,r){if(typeof e==`function`)return Ct(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Et(e,t,n,r);let i=typeof t==`function`?t:vt(t,n,r),a=Array.isArray(e)?Tt(e,i):Tt([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 Tt(e,t){let n=V(()=>[]);return St(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Et(e,t,n,r){let i=V(()=>Object.keys(n)),a=V(()=>({}));for(let o of i)a[o]=wt(e,t,n[o],r);return a}function Dt(e){e.values.forEach(e=>e.stop())}function Ot(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Ne(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Ot(e,t)})})}function kt(e,t){if(Array.isArray(t))return Ot(e,t);if(typeof t==`string`)return Ot(e,[t]);Ne(e,t)}function At(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){Te(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(je(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return Te(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{kt(e,n)})},stop(){t.forEach(e=>{Dt(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function jt(e){return typeof e==`object`&&!Array.isArray(e)}function Mt(e,t,n,r){return e==null?[]:typeof e==`string`&&jt(t)?Ie(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Nt(e,t,n){return e*(t+1)+n*t}function Pt(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 Ft(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(z(e,i),r--)}}function It(e,t,n,r,i,a){Ft(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ze(i,a,r[o]),easing:mt(n,o)})}function Lt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Rt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var zt=`easeInOut`,Bt=20;function Vt(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,Pt(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Pt(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Wt(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=xe(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&qt(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=ke(b));let r=R(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&&Ae(u,T),c.length===1&&c.unshift(null),m&&Ee(m<Bt,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Bt} or apply repeat at the sequence level instead.`),m&&m<Bt){let e=b>0?_/b:0;b=Nt(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`?Oe(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`:mt(f,e-1))}Lt(u,m,e)}let E=w+b;It(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Je(p)){let e=Ht(p,s);_(m,h,Ut(`default`,e))}else{let e=Mt(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Ht(r,s);for(let e in m)_(m[e],Gt(h,e),Ut(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Rt);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(we(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(zt)),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 Ht(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ut(e,t){return t[e]||(t[e]=[]),t[e]}function Wt(e){return Array.isArray(e)?e:[e]}function Gt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Kt=e=>typeof e==`number`,qt=e=>e.every(Kt);function Jt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Be(e)&&!He(e)?new Me(t):new Ve(t);n.mount(e),Pe.set(e,n)}function Yt(e){let t=new bt({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Pe.set(e,t)}function Xt(e,t){return Je(e)||typeof e==`number`||typeof e==`string`&&!jt(t)}function Zt(e,t,n,r){let i=[];if(Xt(e,t))i.push(Le(e,jt(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Mt(e,t,r),o=a.length;Te(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Jt:Yt;Pe.has(r)||s(r);let c=Pe.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 Qt(e,t,n){let r=[];return Vt(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=B(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:Se}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Zt(n,e,t))}),r}function $t(e){return Array.isArray(e)&&e.some(Array.isArray)}function en(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),$t(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Qt(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Zt(e,i,{...c,...r},t)}let l=new _t(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{z(t.animations,l)})),l}return i}var tn=en();function nn(){let e=V(At);return be(e.mount,[]),e}var rn=12;function an(e,t){let n=e.slice(0,rn).map(e=>`- ${e.name} — ${e.description}`).join(`
|
|
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-DMwzREGQ.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 O,p as k}from"./local-mode-Bskd5bsT.js";import{Bn as A,V as j,Vn as M,_n as N,et as ee,gn as te,xr as ne}from"./sdk.gen-CFgJ4K6f.js";import{r as re}from"./api-errors-CrWDzVca.js";import{A as ie,B as P,L as ae,R as F,n as oe,z as se}from"./auth-store-65JKPW7C.js";import{a as ce,o as le,r as ue}from"./api-Dfrm6N2I.js";import{c as de}from"./routes-BXlWEOF0.js";import{n as I}from"./platform-detection-DGxL0AsS.js";import{c as fe,l as pe}from"./prechat-BBwYr5Qb.js";import{t as me}from"./browser-timezone-B2VEIYkv.js";import{c as L}from"./conversation-list-fetchers-_PUdRqRZ.js";import{i as he,n as ge,r as _e,t as ve}from"./research-onboarding-persistence-D_h0dT1o.js";import{A as ye,B as be,C as xe,D as Se,E as Ce,F as we,I as Te,L as Ee,M as De,N as Oe,O as R,P as ke,R as z,S as B,T as Ae,V,_ as je,a as Me,b as Ne,d as Pe,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 H,v as Ge,w as Ke,x as qe,y as Je}from"./proxy-Cadlowdl.js";import{t as Ye}from"./AnimatePresence-TZWSGjkI.js";import{t as U}from"./use-reduced-motion-BPBlq9_a.js";import{$ as Xe,Gt as Ze,Wt as Qe,Xt as $e,et as W,ft as et,ja as G,ji as tt,ln as nt,mt as rt,on as it,qt as at,sn as ot,un as st,ur as ct,xn as lt}from"./index-B4Qq7TL7.js";import{n as ut,t as dt}from"./onboarding-step-layout-Cup_f9lB.js";import{t as ft}from"./prechat-names-Cjl3JzzN.js";var pt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function mt(e,t){return De(e)?e[pt(0,e.length,t)]:e}var ht=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 gt(this.animations,`duration`)}get iterationDuration(){return gt(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 gt(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 _t=class extends ht{then(e,t){return this.finished.finally(e).then(()=>{})}};function vt(...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=Ce(i,a,o);return t?s(r):s}function yt(e,t){return e in t}var bt=class extends We{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(yt(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}},K=e(n(),1);function xt(e){let t=V(()=>B(e)),{isStatic:n}=(0,K.useContext)(Ue);if(n){let[,n]=(0,K.useState)(e);(0,K.useEffect)(()=>t.on(`change`,n),[])}return t}function St(e,t){let n=xt(t()),r=()=>n.set(t());return r(),be(()=>{let t=()=>Re.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),ye(r)}}),n}function Ct(e){qe.current=[],e();let t=St(qe.current,e);return qe.current=void 0,t}function wt(e,t,n,r){if(typeof e==`function`)return Ct(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Et(e,t,n,r);let i=typeof t==`function`?t:vt(t,n,r),a=Array.isArray(e)?Tt(e,i):Tt([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 Tt(e,t){let n=V(()=>[]);return St(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Et(e,t,n,r){let i=V(()=>Object.keys(n)),a=V(()=>({}));for(let o of i)a[o]=wt(e,t,n[o],r);return a}function Dt(e){e.values.forEach(e=>e.stop())}function Ot(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Ne(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Ot(e,t)})})}function kt(e,t){if(Array.isArray(t))return Ot(e,t);if(typeof t==`string`)return Ot(e,[t]);Ne(e,t)}function At(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){Te(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(je(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return Te(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{kt(e,n)})},stop(){t.forEach(e=>{Dt(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function jt(e){return typeof e==`object`&&!Array.isArray(e)}function Mt(e,t,n,r){return e==null?[]:typeof e==`string`&&jt(t)?Ie(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Nt(e,t,n){return e*(t+1)+n*t}function Pt(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 Ft(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(z(e,i),r--)}}function It(e,t,n,r,i,a){Ft(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ze(i,a,r[o]),easing:mt(n,o)})}function Lt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Rt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var zt=`easeInOut`,Bt=20;function Vt(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,Pt(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Pt(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Wt(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=xe(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&qt(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=ke(b));let r=R(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&&Ae(u,T),c.length===1&&c.unshift(null),m&&Ee(m<Bt,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Bt} or apply repeat at the sequence level instead.`),m&&m<Bt){let e=b>0?_/b:0;b=Nt(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`?Oe(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`:mt(f,e-1))}Lt(u,m,e)}let E=w+b;It(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Je(p)){let e=Ht(p,s);_(m,h,Ut(`default`,e))}else{let e=Mt(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Ht(r,s);for(let e in m)_(m[e],Gt(h,e),Ut(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Rt);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(we(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(zt)),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 Ht(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ut(e,t){return t[e]||(t[e]=[]),t[e]}function Wt(e){return Array.isArray(e)?e:[e]}function Gt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Kt=e=>typeof e==`number`,qt=e=>e.every(Kt);function Jt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Be(e)&&!He(e)?new Me(t):new Ve(t);n.mount(e),Pe.set(e,n)}function Yt(e){let t=new bt({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Pe.set(e,t)}function Xt(e,t){return Je(e)||typeof e==`number`||typeof e==`string`&&!jt(t)}function Zt(e,t,n,r){let i=[];if(Xt(e,t))i.push(Le(e,jt(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Mt(e,t,r),o=a.length;Te(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Jt:Yt;Pe.has(r)||s(r);let c=Pe.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 Qt(e,t,n){let r=[];return Vt(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=B(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:Se}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Zt(n,e,t))}),r}function $t(e){return Array.isArray(e)&&e.some(Array.isArray)}function en(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),$t(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Qt(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Zt(e,i,{...c,...r},t)}let l=new _t(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{z(t.animations,l)})),l}return i}var tn=en();function nn(){let e=V(At);return be(e.mount,[]),e}var rn=12;function an(e,t){let n=e.slice(0,rn).map(e=>`- ${e.name} — ${e.description}`).join(`
|
|
2
2
|
`);return n?`
|
|
3
3
|
Capabilities you can offer me — specialized skillsets you can invoke on my behalf, not generic chat:
|
|
4
4
|
${n}
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-65JKPW7C.js";import{t as u}from"./return-to-ugSGJ0dm.js";import{c as d}from"./routes-BXlWEOF0.js";import{c as f,d as p,f as m,l as h,p as g,u as _}from"./prefs-DNYLVDvB.js";import{Oi as v,br as y,on as b}from"./index-B4Qq7TL7.js";import{n as x,t as S}from"./consent-controls-udcijSAB.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:q?P:null,shareDiagnostics:J?I:null,hasPlatformSession:k}),e(u(t.get(`returnTo`),d.assistant),{replace:!0})},[M,k,e,t,P,I,q,J,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};
|