@vellumai/web 0.12.4-dev.202609232017.d454a3d → 0.12.4-dev.202609232115.73e8b74
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-CGlLL7FD.js → a2a-invite-B4CyuLjf.js} +1 -1
- package/dist/assets/{about-page-CSvPSU_G.js → about-page-CsuJK_Ma.js} +1 -1
- package/dist/assets/{account-page-lVCT4G62.js → account-page-Bgm-hMw0.js} +1 -1
- package/dist/assets/{account-shell-BDEdRhG8.js → account-shell-D0mtEmNE.js} +1 -1
- package/dist/assets/acp-run-detail-panel-CViRJef6.js +3 -0
- package/dist/assets/{activation-list-route-CCNuOmdP.js → activation-list-route-C8sNFH9k.js} +1 -1
- package/dist/assets/{activity-redirect-page-lY81h76l.js → activity-redirect-page-9AIAF6Cd.js} +1 -1
- package/dist/assets/activity-steps-panel-D9YxOjxa.js +1 -0
- package/dist/assets/add-credits-modal-_YJTQAL0.js +1 -0
- package/dist/assets/{add-credits-modal-DqsnXSI8.js → add-credits-modal-bZqIcj8Q.js} +1 -1
- package/dist/assets/ai-page-B-K9_9QT.js +1 -0
- package/dist/assets/all-chats-page-route-CX0_HOel.js +1 -0
- package/dist/assets/android-billing-handoff-C6bvESMN.js +1 -0
- package/dist/assets/animated-stat-square-BwJ3jZTp.js +1 -0
- package/dist/assets/{api-key-screen-CDGSjpnd.js → api-key-screen-DI76hQB8.js} +1 -1
- package/dist/assets/app-BcXqNg4_.js +392 -0
- package/dist/assets/app-hw35VYTL.css +2 -0
- package/dist/assets/{app-info-BawZskBT.js → app-info-DG4ww7QK.js} +1 -1
- package/dist/assets/archive-redirect-page-Cf5iC70x.js +1 -0
- package/dist/assets/assistant-handle-modal-Bc6yOkCf.js +1 -0
- package/dist/assets/assistant-inbox-page-route-DBrDToLY.js +8 -0
- package/dist/assets/{assistant-inbox-upgrade-body-DHMR6hH0.js → assistant-inbox-upgrade-body-C51JYfde.js} +1 -1
- package/dist/assets/{assistant-status-panel-DOlJ93cQ.js → assistant-status-panel-5I0FYNtT.js} +1 -1
- package/dist/assets/auth-store-CE7kATa8.js +1 -0
- package/dist/assets/{auth-welcome-screen-BUvvFRis.js → auth-welcome-screen-CWL37isS.js} +1 -1
- package/dist/assets/avatar-bundled-components-CFuA9DnW.js +1 -0
- package/dist/assets/avatar-random-DDGRsi1k.js +2 -0
- package/dist/assets/{await-org-header-settled-CC7rx_Bw.js → await-org-header-settled-34Kl-jQ7.js} +1 -1
- package/dist/assets/background-task-detail-panel-B6EdSnLU.js +1 -0
- package/dist/assets/billing-page-BU-lg2am.js +3 -0
- package/dist/assets/{billing-redirect-page-BfRTdQ3V.js → billing-redirect-page-DKeb7sZt.js} +1 -1
- package/dist/assets/{bookmarks-page-0b9jj7vt.js → bookmarks-page-CxsqGKWt.js} +1 -1
- package/dist/assets/{bundle-confirm-page-DrtiQvu_.js → bundle-confirm-page-sxWN1w4H.js} +1 -1
- package/dist/assets/channel-transcript-panel-DmEZuNl8.js +1 -0
- package/dist/assets/channels-page-route-coV6aC-A.js +1 -0
- package/dist/assets/chat-info-panel-D0YRnetf.js +1 -0
- package/dist/assets/{checkout-continuation-BVzbG-jC.js → checkout-continuation-cpWBzucE.js} +1 -1
- package/dist/assets/{checkout-page-Bs9CsQ03.js → checkout-page-x_YlqEBN.js} +1 -1
- package/dist/assets/checkout-return-target-7l_utrfO.js +1 -0
- package/dist/assets/{command-palette-DS0ZU2MK.js → command-palette-CP8u7IgC.js} +1 -1
- package/dist/assets/command-palette-IJTojBxi.js +1 -0
- package/dist/assets/{command-palette-window-page-CakDCF9X.js → command-palette-window-page-ZL48KB11.js} +1 -1
- package/dist/assets/{community-page-BYZfQYFA.js → community-page-BKm5oOOq.js} +1 -1
- package/dist/assets/{companion-accent-BfHMs8NP.js → companion-accent-T2Y0zMX-.js} +1 -1
- package/dist/assets/{companion-dock-zones-page-U_HfSXVB.js → companion-dock-zones-page-CBaT2Xrg.js} +1 -1
- package/dist/assets/{companion-layout-BqUI5QLM.js → companion-layout-DFl1kbtU.js} +1 -1
- package/dist/assets/{companion-popover-Cu897zA3.js → companion-popover-DAswUdSr.js} +1 -1
- package/dist/assets/companion-popover-page-2AyXBWDL.js +1 -0
- package/dist/assets/{companion-surface-cTuFmvgX.js → companion-surface-Odj37uqu.js} +1 -1
- package/dist/assets/companion-surface-page-BTClJbRZ.js +1 -0
- package/dist/assets/{companion-tour-entry-CE3c1kuA.js → companion-tour-entry-DyvvIoz9.js} +1 -1
- package/dist/assets/{companion-watch-frame-page-ClFS9QQF.js → companion-watch-frame-page-qHAYLPXz.js} +1 -1
- package/dist/assets/{connect-page-DTVq3CaL.js → connect-page-v9ra_N24.js} +1 -1
- package/dist/assets/{consent-controls-BGZLqpgG.js → consent-controls-aHg4YJK7.js} +1 -1
- package/dist/assets/contacts-gateway-oZcs2p9w.js +1 -0
- package/dist/assets/contacts-page-route-CQz3QeEo.js +1 -0
- package/dist/assets/{copy-button-U0vHGP4b.js → copy-button-DFJkfL6m.js} +1 -1
- package/dist/assets/{credential-entry-page-DFXrK9FN.js → credential-entry-page-CJ3zP7LV.js} +1 -1
- package/dist/assets/credentials-page-19IRPf3P.js +1 -0
- package/dist/assets/{csv-preview-Csd6usnK.js → csv-preview-Dpb7hCX2.js} +2 -2
- package/dist/assets/danger-zone-redirect-page-XWsb9RiH.js +1 -0
- package/dist/assets/debug-page-Jhh8_Ost.js +4 -0
- package/dist/assets/deploy-dialogs-B6d_VExz.js +1 -0
- package/dist/assets/deploy-dialogs-CMDwWjT6.js +1 -0
- package/dist/assets/{desktop-preview-content-3aG6j4nC.js → desktop-preview-content-CRW6CYYZ.js} +2 -2
- package/dist/assets/{desktop-status-C46X8onO.js → desktop-status-BgVH65v4.js} +1 -1
- package/dist/assets/{desktop-viewer-DWqyJ4gR.js → desktop-viewer-D7Hwlwwt.js} +2 -2
- package/dist/assets/{detail-card-BvnDkFue.js → detail-card-Bav4AP9u.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-7isQptp1.js → detail-panel-stop-button-BXHcz4Ub.js} +1 -1
- package/dist/assets/{detail-primitives-DjpKsedk.js → detail-primitives-DV1LUqyp.js} +1 -1
- package/dist/assets/developer-page-Dimhj_Wl.js +1 -0
- package/dist/assets/devices-redirect-page-7nIsyr3I.js +1 -0
- package/dist/assets/{dictation-overlay-page-CPBSdbQ5.js → dictation-overlay-page-BwG9T0XO.js} +1 -1
- package/dist/assets/{document-load-CiwxrEw1.js → document-load-BD3n9NiD.js} +1 -1
- package/dist/assets/document-load-CWMiQMlX.js +1 -0
- package/dist/assets/document-viewer-page-DLbZNxOP.js +1 -0
- package/dist/assets/{emails-page-DIcrgQ8U.js → emails-page-9hUpUiKc.js} +1 -1
- package/dist/assets/{file-diff-view-CRzJlsKR.js → file-diff-view-Vu0BVUBc.js} +1 -1
- package/dist/assets/file-view-mode-BnS3LIZ-.js +3 -0
- package/dist/assets/general-page-C1w0z1d3.js +2 -0
- package/dist/assets/hatching-screen-Cmb3ashN.js +1 -0
- package/dist/assets/{hosting-screen-SxaaflCH.js → hosting-screen-D5U4w1oF.js} +1 -1
- package/dist/assets/identity-page-route-F1_0exSe.js +7 -0
- package/dist/assets/{inspect-page-DC8W42sz.js → inspect-page-DjaBd8Dh.js} +5 -5
- package/dist/assets/integrations-page-Di3B_nLV.js +1 -0
- package/dist/assets/intelligence-layout-KALOEqoX.js +1 -0
- package/dist/assets/intelligence-layout-slots-store-DBTArMrt.js +1 -0
- package/dist/assets/keyboard-shortcuts-redirect-page-CtOvIMaq.js +1 -0
- package/dist/assets/{latest-assistant-text-CAp_klrO.js → latest-assistant-text-BTwIvBap.js} +1 -1
- package/dist/assets/{library-detail-page-CvWRrQI-.js → library-detail-page-C1jiTtOp.js} +1 -1
- package/dist/assets/library-page-B25cou7T.js +1 -0
- package/dist/assets/local-mode-Dn1zxby0.js +1 -0
- package/dist/assets/login-page-C7SkVtZC.js +1 -0
- package/dist/assets/logout-page-Bh8qc8RN.js +1 -0
- package/dist/assets/{logs-layout-BBtWbgh6.js → logs-layout-B8xZWltM.js} +1 -1
- package/dist/assets/{markdown-preview-DHexa2zP.js → markdown-preview-C6mVmdPy.js} +1 -1
- package/dist/assets/{media-preview-SxkbGgUZ.js → media-preview-ntMKRw7P.js} +1 -1
- package/dist/assets/memory-page-route-DGElnJNA.js +2 -0
- package/dist/assets/{memory-router-playground-page-S3Wn_1FR.js → memory-router-playground-page-CMRLIpNW.js} +1 -1
- package/dist/assets/{message-files-panel-6ycms7cg.js → message-files-panel-DV6s0gQs.js} +1 -1
- package/dist/assets/native-attachment-pickers-Cb9BeS0b.js +1 -0
- package/dist/assets/native-file-CTR90FeX.js +1 -0
- package/dist/assets/notifications-page-CYJRZTeX.js +1 -0
- package/dist/assets/{oauth-complete-page-C2zArr2t.js → oauth-complete-page-slx0Hgj8.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-CcTNgdNG.js → oauth-popup-complete-page-DzLaGxif.js} +1 -1
- package/dist/assets/paired-platform-identity-BWy2q93U.js +1 -0
- package/dist/assets/{pairing-page-BngVf3cL.js → pairing-page-oq-BHsp9.js} +1 -1
- package/dist/assets/password-reset-page-C24Od2TJ.js +1 -0
- package/dist/assets/{pdf-file-preview-DTFRV_iL.js → pdf-file-preview-DAh2D_aQ.js} +1 -1
- package/dist/assets/permission-guide-page-BhHwzr5P.js +1 -0
- package/dist/assets/permission-guide-page-D6FWkh5j.css +1 -0
- package/dist/assets/{permission-setup-C-uBMRp5.js → permission-setup-SqdOe-Hd.js} +1 -1
- package/dist/assets/{personality-page-Bet0Vc4i.js → personality-page-CWzpxPuk.js} +1 -1
- package/dist/assets/{personality-page-B5AxPLsX.js → personality-page-DuVaAIdd.js} +1 -1
- package/dist/assets/personality-sliders-Cc7Y1tYd.js +1 -0
- package/dist/assets/plans-page-WKA3H4Z7.js +1 -0
- package/dist/assets/{platform-loopback-page-ByKXI_-0.js → platform-loopback-page-5n2BN_-i.js} +1 -1
- package/dist/assets/{plugin-detail-page--N_CKGVi.js → plugin-detail-page-Ds8ceFvT.js} +1 -1
- package/dist/assets/{plugins-page-Chk68TCf.js → plugins-page-DDCD3Dqs.js} +1 -1
- package/dist/assets/plugins-surface-tYpPhDt0.js +1 -0
- package/dist/assets/{preview-error-2zx6HC73.js → preview-error-BNEHJVe7.js} +1 -1
- package/dist/assets/privacy-page-8WuGJQ2e.js +1 -0
- package/dist/assets/privacy-screen-Ydl3Pm5x.js +1 -0
- package/dist/assets/{profile-card-xvlUoLRQ.js → profile-card-CWKRpN67.js} +1 -1
- package/dist/assets/{provider-callback-page-3eQbkD2V.js → provider-callback-page-CXma-eGi.js} +1 -1
- package/dist/assets/{provider-key-BHpigYef.js → provider-key-BV8hYHAY.js} +1 -1
- package/dist/assets/{provider-signup-page-D04DJ9Nx.js → provider-signup-page-D5dT8zlA.js} +1 -1
- package/dist/assets/{quick-input-page-B9AgpFus.js → quick-input-page-COSOOPVe.js} +1 -1
- package/dist/assets/referral-modal-Dp-m9bCW.js +1 -0
- package/dist/assets/referral-modal-RWP4XJVP.js +1 -0
- package/dist/assets/{research-mock-page-CPfIZeMS.js → research-mock-page-BNtbCzos.js} +1 -1
- package/dist/assets/research-onboarding-route-B3fMO2ea.js +50 -0
- package/dist/assets/{review-terms-screen-Bpqi0VmJ.js → review-terms-screen-DKhdHHRq.js} +1 -1
- package/dist/assets/routes-B2jEapR8.js +1 -0
- package/dist/assets/schedules-Dk6DklG6.js +1 -0
- package/dist/assets/schedules-page-BBtyCr0c.js +1 -0
- package/dist/assets/security-redirect-page-Dw3zC8zH.js +1 -0
- package/dist/assets/select-assistant-screen-xaiR-RFR.js +1 -0
- package/dist/assets/{self-hosted-servers-D_gbZnLh.js → self-hosted-servers-C4WeoF_w.js} +1 -1
- package/dist/assets/service-form-controls-MUXqVY5y.js +1 -0
- package/dist/assets/{setting-row-FJRljBcb.js → setting-row-7xJez7VT.js} +1 -1
- package/dist/assets/settings-CbY6hAcY.js +3 -0
- package/dist/assets/settings-Cf8iAKkJ.js +3 -0
- package/dist/assets/settings-D3QV0PxI.js +3 -0
- package/dist/assets/settings-DQYzC3ZM.js +3 -0
- package/dist/assets/settings-layout-mx-gKliC.js +1 -0
- package/dist/assets/share-feedback-modal-DB8yvW1E.js +2 -0
- package/dist/assets/share-feedback-modal-J9iDE6Fj.js +1 -0
- package/dist/assets/{sidebar-tree-C4JCeK46.js → sidebar-tree-CLvBZZRZ.js} +1 -1
- package/dist/assets/{signup-page-CiG9eVIb.js → signup-page-BTpxTyIq.js} +1 -1
- package/dist/assets/{signup-shell-DFBJDVEs.js → signup-shell-CoG73jWw.js} +1 -1
- package/dist/assets/{skill-detail-page-itO5Ixfb.js → skill-detail-page-BoWT7kZI.js} +2 -2
- package/dist/assets/skill-detail-panel-DhvXiOrE.js +1 -0
- package/dist/assets/{skill-removal-dialog-CuDFb58p.js → skill-removal-dialog-D0g8heBY.js} +1 -1
- package/dist/assets/{skills-page-CJu8sxWG.js → skills-page-CUA79QBi.js} +1 -1
- package/dist/assets/{sounds-page-Byt8Wq13.js → sounds-page-D0bW2n6O.js} +1 -1
- package/dist/assets/{start-screen-Cq8no9IO.js → start-screen-BWtkDofn.js} +1 -1
- package/dist/assets/{step-detail-header-DjTw7-bq.js → step-detail-header-cMcp1wkW.js} +1 -1
- package/dist/assets/stt-language-picker-modal-BV-QTu7_.js +1 -0
- package/dist/assets/subagent-detail-panel-DOpmHM0z.js +1 -0
- package/dist/assets/superpowers-page-DilJcD1K.js +1 -0
- package/dist/assets/{system-events-page-Ci0UJEE9.js → system-events-page-a7uGdHfl.js} +1 -1
- package/dist/assets/system-events-redirect-page-DxV_3qZx.js +1 -0
- package/dist/assets/{teleport-gateway-client-CP2wdw8w.js → teleport-gateway-client-Ohi1dE-N.js} +1 -1
- package/dist/assets/{text-preview-BJrxVKxN.js → text-preview-B3JGuchH.js} +1 -1
- package/dist/assets/{theme-stage-page-CeJdLW9W.js → theme-stage-page-C-WrWnNL.js} +1 -1
- package/dist/assets/{tiptap-document-editor-CSBV9sw8.js → tiptap-document-editor-DxcvNAD2.js} +1 -1
- package/dist/assets/tool-detail-panel-3qQYSadb.js +16 -0
- package/dist/assets/tool-detail-panel-DNISAkIt.js +1 -0
- package/dist/assets/{trait-cycle-row-DfueQQMt.js → trait-cycle-row-CRPUwkPd.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-CrrSxMSE.js → upgrade-cancel-page-CM23P5sG.js} +1 -1
- package/dist/assets/{upgrade-success-page-CeTyb4vR.js → upgrade-success-page-CwU0STDG.js} +1 -1
- package/dist/assets/{usage-redirect-page-MKWttFmw.js → usage-redirect-page-DuGg9ihZ.js} +1 -1
- package/dist/assets/use-app-delete-LGPKVyQS.js +1 -0
- package/dist/assets/use-assistant-identity-details-OLYUdfQd.js +1 -0
- package/dist/assets/use-checkout-dismiss-refresh-BLB5BaOf.js +1 -0
- package/dist/assets/use-edge-swipe-back-Dueio9pD.js +1 -0
- package/dist/assets/{use-hotkey-recorder-DJOMQg1W.js → use-hotkey-recorder-CoPbiIMN.js} +1 -1
- package/dist/assets/use-invite-link-dialog-B2h8yVqm.js +1 -0
- package/dist/assets/use-plugins-list-CkvXGG9K.js +1 -0
- package/dist/assets/use-return-to-short-circuit-DIkvmgyp.js +1 -0
- package/dist/assets/use-side-list-room-7HhxA4TR.js +1 -0
- package/dist/assets/{use-skill-actions-B9BwMri_.js → use-skill-actions-DTkyf7Ws.js} +1 -1
- package/dist/assets/{use-skill-detail-files-D8Iih4_O.js → use-skill-detail-files-CZkDMiHE.js} +1 -1
- package/dist/assets/use-supports-credentials-settings-bOBG2G_q.js +1 -0
- package/dist/assets/{use-transcript-message-by-id-CjJRbasj.js → use-transcript-message-by-id-5y7epVj4.js} +1 -1
- package/dist/assets/voice-page-C5VoBU7s.js +1 -0
- package/dist/assets/{wake-detail-panel-qYO4scs9.js → wake-detail-panel-Deb0YI3w.js} +1 -1
- package/dist/assets/{weather-forecast-display-CTH6IuYs.js → weather-forecast-display-1oy5xgMD.js} +1 -1
- package/dist/assets/{welcome-screen-CBtGQmKK.js → welcome-screen-DdeSuqb2.js} +1 -1
- package/dist/assets/workflow-detail-panel-DyK2JLY7.js +1 -0
- package/dist/assets/{workspace-D7wmXoCZ.js → workspace-D3zXycM9.js} +1 -1
- package/dist/assets/{workspace-CHpuNOz8.js → workspace-DBdJJFv1.js} +1 -1
- package/dist/assets/{workspace-DkFKAMgl.js → workspace-DEyW7hRw.js} +1 -1
- package/dist/assets/{workspace-DQkqLSyt.js → workspace-Pqj10WV1.js} +1 -1
- package/dist/assets/workspace-page-DC1A5Uyw.js +1 -0
- package/dist/assets/workspace-page-DGL905Oc.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/acp-run-detail-panel-CSw4GEbt.js +0 -3
- package/dist/assets/activity-steps-panel-JKOQx26M.js +0 -1
- package/dist/assets/add-credits-modal-C1ELWPIe.js +0 -1
- package/dist/assets/ai-page-CM7stM-Q.js +0 -1
- package/dist/assets/all-chats-page-route-rqugQT_U.js +0 -1
- package/dist/assets/android-billing-handoff-Cw8mF7gh.js +0 -1
- package/dist/assets/app-Dd_9UR26.css +0 -2
- package/dist/assets/app-QAMKu5su.js +0 -392
- package/dist/assets/archive-redirect-page-txrfduoe.js +0 -1
- package/dist/assets/assistant-handle-modal-1c4X9Bcy.js +0 -1
- package/dist/assets/assistant-inbox-page-route-DWZcBy0g.js +0 -8
- package/dist/assets/auth-store-BWfCNZNF.js +0 -1
- package/dist/assets/avatar-bundled-components-Ci_Ou96E.js +0 -1
- package/dist/assets/avatar-random-FQSkqszy.js +0 -2
- package/dist/assets/background-task-detail-panel-EfgiP7sB.js +0 -1
- package/dist/assets/billing-page-BlvZknX2.js +0 -3
- package/dist/assets/channel-transcript-panel-BpXtkDXi.js +0 -1
- package/dist/assets/channels-page-route-DdavjaK9.js +0 -1
- package/dist/assets/chat-info-panel-DbazKHFU.js +0 -1
- package/dist/assets/checkout-return-target-2mpvO7XX.js +0 -1
- package/dist/assets/command-palette-CPwNHszR.js +0 -1
- package/dist/assets/companion-popover-page-YuiYxNNx.js +0 -1
- package/dist/assets/companion-surface-page-XSaavpab.js +0 -1
- package/dist/assets/contacts-gateway-BcK6hGiJ.js +0 -1
- package/dist/assets/contacts-page-route-DXBooLAC.js +0 -1
- package/dist/assets/credentials-page-BRxSDZlH.js +0 -1
- package/dist/assets/danger-zone-redirect-page-Ce6wZdAB.js +0 -1
- package/dist/assets/debug-page-Bk96nbB2.js +0 -4
- package/dist/assets/deploy-dialogs-CSpTMk85.js +0 -1
- package/dist/assets/deploy-dialogs-JaWhHvs7.js +0 -1
- package/dist/assets/developer-page-CLj74m8h.js +0 -1
- package/dist/assets/devices-redirect-page-nh1BqbEM.js +0 -1
- package/dist/assets/document-load-Cdvvlnpu.js +0 -1
- package/dist/assets/document-viewer-page-2WFUwcHK.js +0 -1
- package/dist/assets/file-view-mode-BuFFalWv.js +0 -1
- package/dist/assets/general-page-OXoIqil9.js +0 -2
- package/dist/assets/hatching-screen-BcJQnFGw.js +0 -1
- package/dist/assets/identity-page-route-BWffNKyU.js +0 -7
- package/dist/assets/integrations-page-BCqQk4U-.js +0 -1
- package/dist/assets/intelligence-layout-MyUKiQMA.js +0 -1
- package/dist/assets/intelligence-layout-slots-store-D03O5fEh.js +0 -1
- package/dist/assets/keyboard-shortcuts-redirect-page-hddyrkKV.js +0 -1
- package/dist/assets/library-page-DzoqDOEF.js +0 -1
- package/dist/assets/local-mode-DIUg2nag.js +0 -1
- package/dist/assets/login-page-BpGudtvv.js +0 -1
- package/dist/assets/logout-page-pmpik7En.js +0 -1
- package/dist/assets/memory-page-route-B2W-PZGL.js +0 -2
- package/dist/assets/metric-card-DU33Vhw1.js +0 -1
- package/dist/assets/native-attachment-pickers-CnjSEj4d.js +0 -1
- package/dist/assets/native-file-C6olCW4R.js +0 -1
- package/dist/assets/notifications-page-GhE44I8L.js +0 -1
- package/dist/assets/paired-platform-identity-BHPLmn0a.js +0 -1
- package/dist/assets/password-reset-page-j4H_Mqt-.js +0 -1
- package/dist/assets/permission-guide-page-BP9-QJDZ.css +0 -1
- package/dist/assets/permission-guide-page-BypjhQzg.js +0 -1
- package/dist/assets/personality-sliders-Drrzmkwv.js +0 -1
- package/dist/assets/plans-page-WugpZt5R.js +0 -1
- package/dist/assets/plugins-surface-CKmUMSUY.js +0 -1
- package/dist/assets/privacy-page-mKZhDn4X.js +0 -1
- package/dist/assets/privacy-screen-Critbzg6.js +0 -1
- package/dist/assets/referral-modal-Bhu8VZSD.js +0 -1
- package/dist/assets/referral-modal-CLE0haGy.js +0 -1
- package/dist/assets/research-onboarding-route-BKq1zxPa.js +0 -50
- package/dist/assets/routes-CQWC61wF.js +0 -1
- package/dist/assets/schedules-BD6hUvpN.js +0 -1
- package/dist/assets/schedules-page-EVLUt4yF.js +0 -1
- package/dist/assets/security-redirect-page-CDjb8lOF.js +0 -1
- package/dist/assets/select-assistant-screen-B-B6K0n7.js +0 -1
- package/dist/assets/service-form-controls-xZcf__vn.js +0 -1
- package/dist/assets/settings-D-_w8DwA.js +0 -3
- package/dist/assets/settings-D8lN8Vsm.js +0 -3
- package/dist/assets/settings-Dc9DCdf_.js +0 -3
- package/dist/assets/settings-DhrdLW0D.js +0 -3
- package/dist/assets/settings-layout-B_6v8_uF.js +0 -1
- package/dist/assets/share-feedback-modal-CwP6VgEj.js +0 -1
- package/dist/assets/share-feedback-modal-CzLodkGl.js +0 -2
- package/dist/assets/skill-detail-panel-CiZS2a6h.js +0 -1
- package/dist/assets/stt-language-picker-modal-BxenaiFJ.js +0 -1
- package/dist/assets/subagent-detail-panel-mnzfioDA.js +0 -1
- package/dist/assets/superpowers-page-2Anjob7B.js +0 -1
- package/dist/assets/system-events-redirect-page-CobCx0f2.js +0 -1
- package/dist/assets/tool-detail-panel-GZJ7vvd-.js +0 -16
- package/dist/assets/tool-detail-panel-pZuGL3fC.js +0 -1
- package/dist/assets/use-app-delete-C9-vSsiT.js +0 -1
- package/dist/assets/use-assistant-identity-details-fPr__Bo9.js +0 -1
- package/dist/assets/use-checkout-dismiss-refresh-B7nK2Gwr.js +0 -1
- package/dist/assets/use-edge-swipe-back-DKrGooxr.js +0 -1
- package/dist/assets/use-invite-link-dialog-DKhBBQk4.js +0 -1
- package/dist/assets/use-plugins-list-BO2Czcaq.js +0 -1
- package/dist/assets/use-return-to-short-circuit-oTA9Lyv0.js +0 -1
- package/dist/assets/use-side-list-room-CZgh8I9b.js +0 -1
- package/dist/assets/use-supports-credentials-settings-BsTP1kzP.js +0 -1
- package/dist/assets/voice-page-1KS7K_pn.js +0 -1
- package/dist/assets/workflow-detail-panel-iKN8wQ0S.js +0 -1
- package/dist/assets/workspace-page-DiO4NIFz.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cn as t,
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cn as t,DC as n,LC as r,TC as i,Td as a,ch as o,dS as s,lh as c,oh as l,wC as u,wd as d}from"./app-BcXqNg4_.js";import{$n as f,E as p,nr as m}from"./vendor-DwMhK7fD.js";import{f as h,r as g,t as _,x as v}from"./react-B9IgSVeK.js";import{Ui as y,Yn as b,zi as x}from"./icons-C0wyat6T.js";var S=e(v(),1),C=_(),w=1e3,T=1e4,E=2500;function D(){let{t:e}=p(`settings`),n=c({platformHostedOnly:!0}),_=l(),v=o(),y=n===`full`&&_,b=h(),x=m(),[D,M]=(0,S.useState)(!1);(0,S.useEffect)(()=>{x.invalidateQueries({queryKey:a()})},[x]);let{data:N,isError:P}=f({...d(),enabled:y,refetchInterval:e=>e.state.data?.plan_id===`pro`||D?!1:w,refetchIntervalInBackground:!1}),F=y?N:void 0,I=y?P:!1;(0,S.useEffect)(()=>{if(!y)return;let e=setTimeout(()=>M(!0),T);return()=>clearTimeout(e)},[y]);let L=F?.plan_id===`pro`;(0,S.useEffect)(()=>{if(!L)return;let e=setTimeout(()=>{b(s.settings.usageBilling,{replace:!0})},E);return()=>clearTimeout(e)},[L,b]);let R=()=>b(s.settings.usageBilling,{replace:!0});return n===`gated`?(0,C.jsx)(g,{replace:!0,to:s.settings.general}):n===`disabled`?(0,C.jsx)(`div`,{className:`max-w-4xl space-y-6`,children:(0,C.jsx)(t,{children:e(`upgradeSuccessPage.platformLoginNotice`)})}):!y&&!v?(0,C.jsxs)(`div`,{className:`max-w-4xl space-y-6`,children:[(0,C.jsx)(u,{tone:`warning`,children:e(`upgradeSuccessPage.cantConfirmUpgrade`)}),(0,C.jsx)(`div`,{className:`flex justify-end`,children:(0,C.jsx)(r,{variant:`primary`,"data-testid":`upgrade-success-go-to-billing`,onClick:R,children:e(`upgradeSuccessPage.goToBilling`)})})]}):(0,C.jsx)(`div`,{className:`max-w-4xl space-y-6`,children:(0,C.jsxs)(i,{padding:`lg`,children:[L?(0,C.jsx)(k,{}):I?(0,C.jsx)(j,{}):D?(0,C.jsx)(A,{}):(0,C.jsx)(O,{}),(L||I||D)&&(0,C.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,C.jsx)(r,{variant:L||I?`primary`:`outlined`,"data-testid":`upgrade-success-go-to-billing`,onClick:R,children:e(`upgradeSuccessPage.goToBilling`)})})]})})}function O(){let{t:e}=p(`settings`);return(0,C.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,C.jsx)(b,{className:`h-6 w-6 animate-spin text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,C.jsx)(n,{variant:`title-small`,as:`h1`,children:e(`upgradeSuccessPage.finalizingTitle`)}),(0,C.jsx)(n,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:e(`upgradeSuccessPage.finalizingBody`)})]})}function k(){let{t:e}=p(`settings`);return(0,C.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,C.jsx)(x,{className:`h-8 w-8 text-[var(--system-positive-strong)]`,"aria-hidden":`true`}),(0,C.jsx)(n,{variant:`title-small`,as:`h1`,children:e(`upgradeSuccessPage.welcomeTitle`)}),(0,C.jsx)(n,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:e(`upgradeSuccessPage.successBody`)})]})}function A(){let{t:e}=p(`settings`);return(0,C.jsx)(u,{tone:`warning`,children:e(`upgradeSuccessPage.processingFallback`)})}function j(){let{t:e}=p(`settings`);return(0,C.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,C.jsx)(y,{className:`h-8 w-8 text-[var(--system-negative-strong)]`,"aria-hidden":`true`}),(0,C.jsx)(n,{variant:`title-small`,as:`h1`,children:e(`upgradeSuccessPage.fetchErrorTitle`)}),(0,C.jsx)(n,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:e(`upgradeSuccessPage.fetchErrorBody`)})]})}export{D as UpgradeSuccessPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dS as e}from"./app-BcXqNg4_.js";import{_ as t,r as n,t as r}from"./react-B9IgSVeK.js";var i=r();function a(){let[r]=t(),a=new URLSearchParams(r);return a.set(`tab`,`usage`),(0,i.jsx)(n,{replace:!0,to:`${e.settings.usage}?${a.toString()}`})}export{a as UsageRedirectPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Lh as t,Pr as n,hv as r,iC as i,rC as a,tp as o}from"./app-BcXqNg4_.js";import{E as s,j as c,nr as l}from"./vendor-DwMhK7fD.js";import{t as u,x as d}from"./react-B9IgSVeK.js";var f=u();function p({app:e,isDeleting:t,onConfirm:n,onCancel:r}){let{t:i}=s();return(0,f.jsx)(a,{open:e!==null,title:i(`deleteAppDialog.title`),message:e?i(`deleteAppDialog.message`,{name:e.name}):``,confirmLabel:i(t?`deleteAppDialog.deleting`:`deleteAppDialog.delete`),destructive:!0,onConfirm:n,onCancel:r})}var m=e(d(),1);function h(e,t,{exported:r,failed:i}){let{id:a,name:o}=t,s=(0,m.useRef)(!1);return(0,m.useCallback)(async()=>{if(!s.current){s.current=!0;try{await n(e,{id:a,name:o},{exported:r,failed:i})}finally{s.current=!1}}},[e,a,o,r,i])}function g(e){let n=l(),[a,s]=(0,m.useState)(null),[u,d]=(0,m.useState)(!1);return{pendingDelete:a,isDeleting:u,requestDelete:s,confirmDelete:(0,m.useCallback)(async()=>{if(!(!a||u)){d(!0);try{await r({path:{assistant_id:e,id:a.id},throwOnError:!0}),t(e,a.id),n.invalidateQueries({queryKey:o({path:{assistant_id:e}})}),s(null)}catch(e){i.error(e instanceof Error?e.message:c(`useAppDelete.deleteFailed`))}finally{d(!1)}}},[a,u,e,n]),cancelDelete:(0,m.useCallback)(()=>{u||s(null)},[u])}}export{h as n,p as r,g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ev as e,Sv as t,Vc as n,Xv as r,Zv as i,bS as a,b_ as o,rv as s}from"./app-BcXqNg4_.js";import{$n as c}from"./vendor-DwMhK7fD.js";import{i as l,n as u,t as d}from"./latest-assistant-text-BTwIvBap.js";var f=[{id:s.companionCoworker,leftKey:`personalityAxes.companionCoworker.left`,rightKey:`personalityAxes.companionCoworker.right`},{id:s.genzBoomer,leftKey:`personalityAxes.genzBoomer.left`,rightKey:`personalityAxes.genzBoomer.right`},{id:s.executeCollaborate,leftKey:`personalityAxes.executeCollaborate.left`,rightKey:`personalityAxes.executeCollaborate.right`},{id:s.playfulSerious,leftKey:`personalityAxes.playfulSerious.left`,rightKey:`personalityAxes.playfulSerious.right`},{id:s.politeUnfiltered,leftKey:`personalityAxes.politeUnfiltered.left`,rightKey:`personalityAxes.politeUnfiltered.right`}],p=50,m=1500,h=12e4,g=e=>new Promise(t=>setTimeout(t,e));async function _({assistantId:n,content:o,title:s,context:c}){let f,p=!1;try{let t=await e({path:{assistant_id:n},body:{conversationType:`background`,title:s},throwOnError:!1});if(f=t.data?.id,!t.response?.ok||!f)return!1;let a=u({conversationId:f,content:o,transport:`vellum`});if(!(await i({path:{assistant_id:n},body:a,throwOnError:!1})).response?.ok)return!1;let c=Date.now()+h,_=``,v=0,y=!1;for(;Date.now()<c;){await g(m);let e=await r({path:{assistant_id:n},query:{conversationId:f},throwOnError:!1}),t=d(e.data?.messages??[]);if(t&&(v=t===_?v+1:0,_=t),e.data?.processing===!0&&(y=!0),l({processing:e.data?.processing,sawProcessing:y,hasReply:t.length>0,stableReads:v})){p=!0;break}}}catch(e){a(e,{context:c})}finally{if(f)try{await t({path:{assistant_id:n,id:f},throwOnError:!1})}catch(e){a(e,{context:`${c}_archive`})}}return p}function v(e){return[`assistant-identity-details`,e]}function y(e){return c({queryKey:v(e),queryFn:async()=>{let[t,r]=await Promise.all([n(e),o(e).catch(()=>({ok:!1,status:0,error:{}}))]);return{identity:t,createdAt:r.ok?r.data.created:null}}})}export{p as a,f as i,y as n,_ as r,v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Bd as t,Cd as n,DC as r,Di as i,Ei as a,Jm as o,Kb as s,Kl as c,Ku as l,LC as u,Lu as d,Ny as f,Od as p,Py as m,Qy as h,Sd as g,Td as _,Ti as v,Tu as y,Vu as b,Wi as x,Wo as S,Xy as C,_d as w,aC as T,bd as E,dS as D,dv as O,iC as k,i_ as A,lC as j,mC as M,qi as N,qn as P,rC as ee,tC as F,t_ as te,uC as I,vd as ne,wC as re,wc as L,wd as ie,wu as ae,xd as oe,yd as se,yu as ce,zd as le}from"./app-BcXqNg4_.js";import{$n as R,E as z,Xn as ue,cr as de,j as B,nr as V,or as fe}from"./vendor-DwMhK7fD.js";import{f as pe,t as me,x as H}from"./react-B9IgSVeK.js";import{D as he,Ji as ge,Ra as _e,Ui as ve,Vn as ye,Ya as U,fr as be,pi as W,xr as G,zi as xe}from"./icons-C0wyat6T.js";import{c as Se,i as K,l as Ce,n as we,r as q,t as Te}from"./machine-sizes-CMoW5pTp.js";import{a as Ee,i as De,n as Oe,r as ke,t as Ae}from"./provisioning-targets-C2xXAoS3.js";var je=U(`computer`,[[`rect`,{width:`14`,height:`8`,x:`5`,y:`2`,rx:`2`,key:`wc9tft`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6 18h2`,key:`rwmk9e`}],[`path`,{d:`M12 18h6`,key:`aqd8w3`}]]),J=e(H(),1),Y=me();function Me({icon:e}){return(0,Y.jsx)(`span`,{className:`flex h-11 w-11 items-center justify-center rounded-full`,style:{backgroundColor:`color-mix(in oklab, var(--system-negative-strong) 12%, transparent)`},children:(0,Y.jsx)(e,{className:`h-5 w-5`,style:{color:`var(--system-negative-strong)`},"aria-hidden":`true`})})}var Ne={fontFamily:`var(--font-serif)`,fontSize:`32px`,fontWeight:400,lineHeight:1.2,letterSpacing:`0.64px`};function Pe({title:e,subtitle:t}){return(0,Y.jsxs)(`header`,{className:`flex flex-col items-center gap-2 pt-12 text-center`,children:[(0,Y.jsx)(`h2`,{className:`text-[var(--content-emphasised)]`,style:Ne,children:e}),t&&(0,Y.jsx)(`p`,{className:`text-[14px] font-normal text-[var(--content-secondary)]`,children:t})]})}var Fe=[{bodyShape:`star`,eyeStyle:`curious`,color:`yellow`,size:103,position:`-left-[28px] -top-[33px]`,rotate:180},{bodyShape:`star`,eyeStyle:`curious`,color:`orange`,size:109,position:`left-[63%] -top-[62px] -translate-x-1/2`,rotate:-8},{bodyShape:`blob`,eyeStyle:`grumpy`,color:`green`,size:76,position:`-right-[25px] top-[60px]`,rotate:1},{bodyShape:`stack`,eyeStyle:`gentle`,color:`purple`,size:110,position:`-left-[39px] top-[74%]`,rotate:0},{bodyShape:`urchin`,eyeStyle:`goofy`,color:`pink`,size:137,position:`-right-[42px] -bottom-[40px]`,rotate:180},{bodyShape:`sprout`,eyeStyle:`curious`,color:`orange`,size:72,position:`left-[37%] -bottom-[22px] -translate-x-1/2`,rotate:0}],Ie=[{bodyShape:`star`,eyeStyle:`curious`,color:`yellow`,size:103,position:`-left-[28px] -top-[33px]`,rotate:180},{bodyShape:`star`,eyeStyle:`curious`,color:`orange`,size:109,position:`left-[63%] -top-[62px] -translate-x-1/2`,rotate:-8},{bodyShape:`blob`,eyeStyle:`grumpy`,color:`green`,size:76,position:`-right-[25px] top-[60px]`,rotate:1}];function Le({variant:e=`full`}){let t=v();return t?(0,Y.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`creature-corners`,className:`pointer-events-none absolute inset-0 select-none`,children:(e===`top`?Ie:Fe).map((e,n)=>(0,Y.jsx)(`span`,{className:`absolute ${e.position}`,style:{rotate:`${e.rotate}deg`},children:(0,Y.jsx)(P,{components:t,bodyShapeId:e.bodyShape,eyeStyleId:e.eyeStyle,colorId:e.color,size:e.size})},n))}):null}var Re={waitingStatus:`Upgrading your assistant…`,snagStatus:`We hit a snag upgrading your assistant`,snagCaption:`Retry in the background and we'll keep working on your upgrade.`,confirmingStatus:`Confirming your upgrade…`,confirmTimeoutStatus:`Still confirming your upgrade`,confirmTimeoutCaption:`Your payment went through safely. This can take a minute.`,backgroundConfirmMessage:`Your assistant is still upgrading. Chatting won't be available until it finishes. You can keep waiting here, or continue and we'll let you know when it's ready.`,backgroundExitToast:`Your upgrade continues in the background.`,backgroundRetryToast:`We'll retry your upgrade in the background.`,completeSubtitle:`Enjoy the new found power.`,fetchErrorBody:`We hit a problem checking your subscription. Your upgrade may still be processing. Return to billing to refresh.`},X={waitingStatus:`Updating your assistant…`,snagStatus:`We hit a snag updating your assistant`,snagCaption:`Retry in the background and we'll keep working on your plan change.`,confirmingStatus:`Confirming your plan change…`,confirmTimeoutStatus:`Still confirming your plan change`,confirmTimeoutCaption:`Your plan change was submitted. This can take a minute.`,backgroundConfirmMessage:`Your assistant is still updating. Chatting won't be available until it finishes. You can keep waiting here, or continue and we'll let you know when it's ready.`,backgroundExitToast:`Your plan change continues in the background.`,backgroundRetryToast:`We'll retry your plan change in the background.`,completeSubtitle:`Your plan changes are live.`,fetchErrorBody:`We hit a problem checking your subscription. Your plan change may still be processing. Return to billing to refresh.`},Z={upgrade:Re,downgrade:X,change:X};function ze(e=`upgrade`){return Z[e]}function Be(e,t=!0){let{data:n}=R({...ce(),enabled:t&&e==null}),{data:r}=R({...l({path:{id:e??``}}),enabled:t&&e!=null});return e==null?n:r}function Ve({assistantId:e,direction:t}){let n=pe(),{t:r}=z(`settings`),i=Be(e,o())?.name||r(`completeState.assistantFallbackName`);return(0,Y.jsxs)(`div`,{className:`relative flex min-h-[320px] flex-col items-center justify-center overflow-hidden px-8 pb-16 [animation:onboarding-step-in_350ms_ease-out] motion-reduce:[animation:none]`,children:[(0,Y.jsx)(Le,{variant:`full`}),(0,Y.jsxs)(`div`,{className:`relative flex w-full flex-col items-center`,children:[(0,Y.jsx)(Pe,{title:r(`completeState.title`),subtitle:ze(t).completeSubtitle}),(0,Y.jsx)(`div`,{className:`mt-10 flex w-full flex-col items-center gap-10`,children:(0,Y.jsx)(u,{variant:`primary`,"data-testid":`onboarding-complete-return`,onClick:()=>{e!=null&&te(e),n(D.assistant,{replace:!0})},children:r(`completeState.returnTo`,{assistantName:i})})})]})]})}function Q(e=!0,t){let n=Be(t,e),r=t??n?.id,{data:i,isError:a,isFetching:o,dataUpdatedAt:s,errorUpdatedAt:c}=R({...ae({path:{assistant_id:r??``}}),enabled:e&&!!r});return{assistant:n,assistantId:r,domains:i,domainsError:a,domainsFetching:o,domainsUpdatedAt:s,domainsErrorUpdatedAt:c}}var He=1e3,Ue=1e4,We=2500,Ge=2e3,Ke=1e4,qe=[`machine_size`,`subdomain`,`non_field_errors`],Je={subdomain_taken:`That subdomain is already taken. Try another.`,assistant_already_has_domain:`Your assistant already has a custom domain.`,no_assistant_to_attach_domain:`We couldn't find an assistant to attach this domain to.`,exceeds_machine_tier:`That machine size isn't available on your plan.`,provisioning_submission_failed:`We couldn't queue your upgrade just now. Try again in a moment.`,no_active_pro:`We couldn't confirm your Pro plan yet. Try again in a moment.`,no_provisionable_assistants:`We couldn't find an assistant to upgrade yet. Try again in a moment.`},Ye={provisioning_submission_failed:`We couldn't queue your plan change just now. Try again in a moment.`,no_provisionable_assistants:`We couldn't find an assistant to update yet. Try again in a moment.`};function Xe(e,t,n=`upgrade`){if(e&&typeof e==`object`){let t=e;if(typeof t.error==`string`){let e=(n===`upgrade`?void 0:Ye[t.error])??Je[t.error];if(e)return e}for(let e of qe){let n=t[e];if(Array.isArray(n)&&typeof n[0]==`string`)return n[0]}if(typeof t.detail==`string`)return t.detail}return t}var Ze=`h-8 rounded-lg border border-[var(--border-element)] bg-[var(--field-bg)] px-2.5 text-[14px] text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none transition-[border-color] duration-150 focus:border-[var(--border-active)] disabled:cursor-not-allowed disabled:opacity-60`,Qe=`text-[11px] font-medium text-[var(--content-secondary)]`;function $e({onExit:e,machineBusy:t=!1,assistantId:r}){let{t:i}=z(`settings`),a=V(),o=x.use.emailRootDomain(),{assistant:s,assistantId:c,domains:l}=Q(!0,r),f=l?.results[0],[p,m]=(0,J.useState)(``),[h,g]=(0,J.useState)(`hi`),[_,v]=(0,J.useState)(!1);(0,J.useEffect)(()=>{if(!_){if(f){m(f.subdomain),v(!0);return}!s?.handle||p||(m(s.handle),v(!0))}},[s?.handle,f,_,p]);let[b,S]=(0,J.useState)(null),[C,w]=(0,J.useState)(!1),D=ue(E()),O=!!f||C,k=D.isPending||C;return(0,J.useEffect)(()=>{if(!C)return;let t=setTimeout(e,800);return()=>clearTimeout(t)},[C,e]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(T.Body,{className:`animate-[onboarding-step-in_350ms_ease-out] space-y-6 pb-0 motion-reduce:animate-none`,children:[(0,Y.jsx)(Le,{variant:`top`}),(0,Y.jsx)(Pe,{title:i(`domainStep.title`),subtitle:i(`domainStep.subtitle`)}),(0,Y.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`label`,{htmlFor:`onboarding-email-prefix`,className:Qe,children:i(`domainStep.prefixLabel`)}),(0,Y.jsx)(`input`,{id:`onboarding-email-prefix`,value:h,onChange:e=>g(e.target.value.toLowerCase().trim()),disabled:k||O,readOnly:O,placeholder:i(`domainStep.emailUsernamePlaceholder`),className:`${Ze} w-24`})]}),(0,Y.jsx)(`span`,{className:`flex h-8 items-center text-[var(--content-secondary)]`,children:`@`}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsx)(`label`,{htmlFor:`onboarding-email-handle`,className:Qe,children:i(`domainStep.handleLabel`)}),(0,Y.jsx)(`input`,{id:`onboarding-email-handle`,value:p,onChange:e=>{m(e.target.value.toLowerCase().trim()),b&&S(null)},disabled:k||O,readOnly:O,autoFocus:!0,placeholder:i(`domainStep.subdomainExamplePlaceholder`),"aria-invalid":!!b,className:`${Ze} w-full min-w-0`})]}),(0,Y.jsxs)(`span`,{className:`flex h-8 shrink-0 items-center text-[14px] text-[var(--content-tertiary)]`,children:[`.`,o]})]}),b&&(0,Y.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:b}),O&&(0,Y.jsx)(`p`,{className:`text-body-small-lighter text-[var(--content-tertiary)]`,children:i(`domainStep.domainLockedMessage`)})]}),t&&!O&&(0,Y.jsx)(re,{tone:`neutral`,children:i(`domainStep.machineBusyNotice`)}),!O&&(0,Y.jsx)(re,{tone:`info`,className:`border-transparent bg-[var(--surface-active)]`,children:(0,Y.jsx)(`span`,{className:`font-medium text-[var(--content-tertiary)]`,children:i(`domainStep.handleImmutableNotice`)})}),C?(0,Y.jsx)(re,{tone:`success`,children:i(`domainStep.domainSetRedirecting`)}):null]}),(0,Y.jsx)(T.Footer,{className:`items-center pt-6`,children:O?(0,Y.jsx)(u,{variant:`primary`,"data-testid":`onboarding-domain-continue`,onClick:e,children:i(`domainStep.continue`)}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(u,{variant:`outlined`,"data-testid":`onboarding-domain-skip`,disabled:k,onClick:()=>{k||D.mutate({body:{skipped:!0}},{onSuccess:e,onError:()=>e()})},children:i(`domainStep.skip`)}),(0,Y.jsx)(u,{variant:`primary`,"data-testid":`onboarding-domain-set`,disabled:!p||k||t,onClick:()=>{k||t||!p||D.mutate({body:{subdomain:p,...h?{email_username:h}:{}}},{onSuccess:()=>{S(null),w(!0),a.invalidateQueries({queryKey:d()}),a.invalidateQueries({queryKey:y({path:{assistant_id:c??``}})}),a.invalidateQueries({queryKey:n()})},onError:e=>{S(Xe(e,i(`domainStep.registerSubdomainFailed`)))}})},children:i(`domainStep.next`)})]})})]})}function et({onGoToBilling:e,direction:t}){let{t:n}=z(`settings`);return(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-10 text-center`,children:[(0,Y.jsx)(Me,{icon:ve}),(0,Y.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Y.jsx)(r,{variant:`title-small`,as:`h1`,children:n(`errorStates.fetchErrorTitle`)}),(0,Y.jsx)(r,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:ze(t).fetchErrorBody})]}),(0,Y.jsx)(u,{variant:`primary`,"data-testid":`onboarding-go-to-billing`,onClick:e,children:n(`errorStates.goToBilling`)})]})}function tt(e){let{targets:t,fromSnapshot:n,machineFloor:r,credits:i}=e,a=[];return t.machineSize==null?r!=null&&n.machineSize!=null&&n.machineSize!==r&&a.push({key:`machine`,label:`Machine`,from:K[n.machineSize],to:K[r]}):n.machineSize!==t.machineSize&&a.push({key:`machine`,label:`Machine`,from:n.machineSize==null?void 0:K[n.machineSize],to:K[t.machineSize]}),t.storageGib!=null&&(n.storageGib==null||t.storageGib>n.storageGib)&&a.push({key:`storage`,label:`Storage`,from:n.storageGib==null?void 0:`${n.storageGib} GB`,to:`${t.storageGib} GB`}),i!=null&&a.push({key:`credits`,label:i.label??`Credits`,from:i.from,to:i.to}),a}var nt=220;function $({items:e,visible:t=!0,toWord:n,className:r=``,testId:i=`upgrade-metrics`}){let[a,o]=(0,J.useState)(!1);(0,J.useEffect)(()=>{let e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)},[]);let s=t&&a;return(0,Y.jsx)(`div`,{"aria-hidden":!t,"data-testid":i,"data-visible":t?`true`:`false`,className:`flex flex-col items-center gap-3 md:flex-row md:items-stretch md:gap-0 ${r}`,children:e.map((e,t)=>(0,Y.jsxs)(`div`,{"data-testid":e.key?`chip-${e.key}`:void 0,className:`flex flex-col items-center gap-1 px-6 transition-[opacity,transform] duration-500 ease-out motion-reduce:transition-none ${s?`translate-y-0 opacity-100`:`translate-y-2 opacity-0`} ${t>0?`md:border-l md:border-[var(--border-subtle)]`:``}`,style:{transitionDelay:s?`${t*nt}ms`:`0ms`},children:[(0,Y.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-[0.08em] text-[var(--content-tertiary)]`,children:e.label}),(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5 whitespace-nowrap text-[var(--content-emphasised)]`,style:{fontFamily:`var(--font-serif)`,fontSize:`20px`,lineHeight:1.2},children:[e.from!=null&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`text-[var(--content-tertiary)]`,children:e.from}),n&&(0,Y.jsx)(`span`,{className:`sr-only`,children:n}),(0,Y.jsx)(_e,{className:`size-3.5 text-[var(--content-tertiary)]`,"aria-hidden":`true`})]}),(0,Y.jsx)(`span`,{children:e.to}),e.landed&&(0,Y.jsx)(ge,{"data-testid":`chip-check`,className:`size-3.5 text-[var(--system-positive-strong)]`,"aria-hidden":`true`}),e.status&&(0,Y.jsx)(`span`,{className:`sr-only`,children:e.status})]})]},e.key??e.label))})}var rt=48;function it(e,t,n,r,i){let a=i*i,o=a*i;return .5*(2*t+(-e+n)*i+(2*e-5*t+4*n-r)*a+(-e+3*t-3*n+r)*o)}function at(e,t,n){let r=e.map(e=>({x:e.fx*t,y:e.fy*n,size:e.fs*n})),i=[],a=[],o=[],s=[],c=[],l=[],u=0;for(let e=0;e<r.length-1;e++){let t=r[Math.max(0,e-1)],n=r[e],c=r[e+1],l=r[Math.min(r.length-1,e+2)],d=e===r.length-2?rt+1:rt;for(let e=0;e<d;e++){let r=e/rt,d=it(t.x,n.x,c.x,l.x,r),f=it(t.y,n.y,c.y,l.y,r);i.length>0&&(u+=Math.hypot(d-i[i.length-1],f-a[a.length-1])),i.push(d),a.push(f),o.push(n.size+(c.size-n.size)*r),s.push(u)}}for(let e=0;e<i.length;e++){let t=Math.max(0,e-1),n=Math.min(i.length-1,e+1),r=i[n]-i[t],o=a[n]-a[t],s=Math.hypot(r,o)||1;c.push(r/s),l.push(o/s)}return{length:u,at:e=>{let t=Math.min(u,Math.max(0,e)),n=0,r=s.length-1;for(;n<r;){let e=n+r>>1;s[e]<t?n=e+1:r=e}let d=Math.max(1,n),f=d-1,p=s[d]-s[f]||1,m=(t-s[f])/p,h=c[f]+(c[d]-c[f])*m,g=l[f]+(l[d]-l[f])*m,_=Math.hypot(h,g)||1;return{x:i[f]+(i[d]-i[f])*m,y:a[f]+(a[d]-a[f])*m,tx:h/_,ty:g/_,size:o[f]+(o[d]-o[f])*m}}}}function ot(e,t){if(t<=0)return 0;let n=e%t;return n<0?n+t:n}function st(e,t){let n=[],r=0;for(;r<e.length;)n.push(r),r+=Math.max(1,e.at(r).size*t);return n}var ct={around:[{fx:.2,fy:-.16,fs:.02},{fx:.23,fy:0,fs:.024},{fx:.34,fy:.12,fs:.03},{fx:.52,fy:.19,fs:.037},{fx:.7,fy:.26,fs:.046},{fx:.85,fy:.4,fs:.058},{fx:.88,fy:.56,fs:.074},{fx:.76,fy:.71,fs:.095},{fx:.56,fy:.82,fs:.12},{fx:.4,fy:.93,fs:.15},{fx:.3,fy:1.08,fs:.185},{fx:.24,fy:1.28,fs:.22}],below:[{fx:1.16,fy:0,fs:.03},{fx:.95,fy:.06,fs:.036},{fx:.68,fy:.16,fs:.048},{fx:.4,fy:.3,fs:.065},{fx:.22,fy:.47,fs:.09},{fx:.32,fy:.64,fs:.125},{fx:.56,fy:.8,fs:.17},{fx:.58,fy:.98,fs:.22},{fx:.46,fy:1.22,fs:.27},{fx:.36,fy:1.5,fs:.3}]},lt={around:.24,below:.32},ut=.95,dt=.95,ft=1,pt=8,mt=20260922,ht=50;function gt({className:e=``,layout:t=`around`,flow:n=`down`,speed:r=1,lanes:o=3,paused:s=!1}){let c=v(),l=(0,J.useRef)(null),u=(0,J.useRef)({flow:n,speed:r,paused:s});return(0,J.useEffect)(()=>{u.current={flow:n,speed:r,paused:s}},[n,r,s]),(0,J.useEffect)(()=>{let e=l.current;if(!e||!c)return;let n=e.getContext(`2d`);if(!n)return;let r=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,s=0,d=0,f=null,p=1/0,m=[],h=0,g=new Map,_=(e,t)=>{let n=Math.max(1,Math.round(t/pt))*pt,r=`${e.bodyIdx}-${e.eyeIdx}-${e.colorIdx}-${n}`,i=g.get(r);if(i!==void 0)return i;let o=a(c,e.bodyIdx,e.eyeIdx,e.colorIdx,n);return g.set(r,o),o},v=()=>{let r=e.getBoundingClientRect();if(r.width===0||r.height===0||Math.abs(r.width-s)<1&&Math.abs(r.height-d)<1)return;let a=f,l=m.map(e=>e.distance);s=r.width,d=r.height;let u=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(s*u),e.height=Math.round(d*u),n.setTransform(u,0,0,u,0,0),f=at(ct[t],s,d),p=d*lt[t];let h=i(mt),g=e=>(h()*2-1)*e,_=-1;if(m=[],st(f,ut).forEach((e,t)=>{let n=t%2==0?0:.5;for(let t=0;t<o;t++){let r=Math.floor(h()*c.colors.length);r===_&&(r=(r+1)%c.colors.length),_=r,m.push({distance:e,lane:t-(o-1)/2+n,jitterAlong:g(.08),jitterAcross:g(.12),sizeScale:.85+h()*.3,rotate:g(10)*Math.PI/180,phase:h()*Math.PI*2,bodyIdx:Math.floor(h()*c.bodyShapes.length),eyeIdx:Math.floor(h()*c.eyeStyles.length),colorIdx:r})}}),a&&a.length>0){let e=f.length/a.length;m.forEach((t,n)=>{let r=l[n];r!==void 0&&(t.distance=ot(r*e,f.length))})}},y=e=>{if(!f)return;let t=h?Math.min(ht,e-h):0;h=e;let{flow:i,speed:a,paused:o}=u.current,c=r||o?0:(i===`down`?1:-1)*a*ft*(t/1e3);n.clearRect(0,0,s,d);for(let t of m){if(c!==0){let e=f.at(t.distance).size;t.distance=ot(t.distance+c*e,f.length)}let i=f.at(t.distance),a=Math.min(p,i.size*t.sizeScale),o=(t.lane*dt+t.jitterAcross)*i.size,s=t.jitterAlong*i.size,l=i.x+i.ty*o+i.tx*s,u=i.y-i.tx*o+i.ty*s,d=_(t,a);if(!d)continue;let m=r?0:Math.sin(e*.001+t.phase)*1.4,h=r?0:Math.sin(e*8e-4+t.phase*2)*.025;n.save(),n.translate(l,u+m),n.rotate(t.rotate+h),n.drawImage(d,-a/2,-a/2,a,a),n.restore()}};v();let b=new ResizeObserver(()=>{v(),r&&y(performance.now())});b.observe(e);let x=0;if(r)y(performance.now());else{let e=t=>{y(t),x=requestAnimationFrame(e)};x=requestAnimationFrame(e)}return()=>{cancelAnimationFrame(x),b.disconnect()}},[c,o,t]),(0,Y.jsx)(`canvas`,{ref:l,"aria-hidden":`true`,"data-testid":`upgrade-stream`,className:`pointer-events-none block h-full w-full ${e}`})}function _t(e,t){if(t!=null)return e?.credit_tiers?.find(e=>e.tier===t)}function vt(e){let t=e?.match(/^credits_(\d+)$/)?.[1];return t==null?null:Number(t)}function yt(e){let t=o(),{data:n}=R({...w(),enabled:t&&e});return n?.plans.find(e=>e.id===`pro`)}function bt(e,t){return t==null?0:_t(e,t)?.credits_usd??vt(t)}function xt(e,t){return t==null?null:_t(e,t)?.label}function St(e){let t=yt(e!=null);if(e==null||t==null)return null;let n,r;if(e.kind===`package`){let i=t.packages.find(t=>t.key===e.packageKey),a=_t(t,i?.credit_tier);n=i?.credits_usd??a?.credits_usd,r=i?.usage_label??a?.label??void 0}else{let i=_t(t,e.creditTier);n=i?.credits_usd,r=i?.label}return n==null?null:{fromLabel:null,toLabel:r}}function Ct(e){let t=yt(e!=null);return e==null||bt(t,e.fromTier)==null||bt(t,e.toTier)==null?null:{fromLabel:xt(t,e.fromTier),toLabel:xt(t,e.toTier)}}function wt(e,t){let[n,r]=(0,J.useState)(e),i=(0,J.useRef)(0);return(0,J.useEffect)(()=>{i.current=performance.now()},[]),(0,J.useEffect)(()=>{if(t<=0||e===n)return;let a=t-(performance.now()-i.current);if(a<=0){i.current=performance.now(),r(e);return}let o=setTimeout(()=>{i.current=performance.now(),r(e)},a);return()=>clearTimeout(o)},[e,n,t]),t<=0?e:n}var Tt=`#ffffff`;function Et({status:e,caption:t}){return(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5`,children:[(0,Y.jsx)(`h1`,{className:`text-[var(--content-emphasised)]`,style:Ne,children:e}),t&&(0,Y.jsx)(r,{variant:`body-medium-lighter`,as:`p`,className:`max-w-sm text-[var(--content-secondary)]`,children:t})]})}function Dt(e,t){return e===`credits`?!0:t?.[e]===!0}function Ot(e,t){if(e==null)return null;let n=t(`provisioningState.noExtraUsage`),r=e.toLabel===null?n:e.toLabel;return r==null?null:{label:t(`provisioningState.usageLabel`),from:e.fromLabel===null?n:e.fromLabel,to:r}}function kt({intent:e,creditsChange:t,targets:n,fromSnapshot:r,machineFloor:i,landed:a,allDone:o=!1,creditsOnly:s=!1}){let{t:c}=z(`settings`),l=St(e),u=Ct(t),d=tt({targets:n,fromSnapshot:r,machineFloor:i,credits:Ot(l??u,c)}),f=s?d.filter(e=>e.key===`credits`):d,p=f.filter(e=>o||Dt(e.key,a)).map(e=>e.label).join(`, `),[m]=(0,J.useState)(p),h=p===m?``:c(`provisioningState.dimensionsComplete`,{dimensions:p});return f.length===0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)($,{items:f.map(e=>{let t=o||Dt(e.key,a);return{key:e.key,label:e.label,from:e.from??null,to:e.to,landed:t,status:c(t?`provisioningState.statusComplete`:`provisioningState.statusPending`)}}),testId:`resource-chips`,toWord:c(`provisioningState.srOnlyTo`)}),(0,Y.jsx)(`p`,{"aria-live":`polite`,className:`sr-only`,"data-testid":`chip-announcement`,children:h})]})}function At({intent:e}){let{t}=z(`settings`),n=St(e.kind===`custom`?e:null);if(e.kind===`package`){let n=e.packageKey.charAt(0).toUpperCase()+e.packageKey.slice(1);return(0,Y.jsx)($,{testId:`resource-chips`,items:[{key:`package`,label:t(`provisioningState.packageLabel`),from:null,to:n}]})}let r=[];return e.machineTier!=null&&r.push({key:`machine`,label:t(`provisioningState.machineLabel`),from:null,to:we[e.machineTier]??e.machineTier}),e.storageTier!=null&&r.push({key:`storage`,label:t(`provisioningState.storageLabel`),from:null,to:e.storageTier.toUpperCase()}),e.creditTier!=null&&n?.toLabel!=null&&r.push({key:`credits`,label:t(`provisioningState.usageLabel`),from:null,to:n.toLabel}),r.length===0?null:(0,Y.jsx)($,{testId:`resource-chips`,items:r})}function jt({state:e,direction:t,softWaiting:n,intent:r,creditsChange:i,targets:a,fromSnapshot:o,machineFloor:s,landed:l,celebrating:d,onCelebrationEnd:f,escapeAvailable:p,onEscape:m,onPhaseChange:h,kickError:g,confirm:_,dwellMs:v=We,phaseMinMs:y=900}){let{t:b}=z(`settings`),x=ze(t),S=(0,J.useRef)(f);(0,J.useEffect)(()=>{S.current=f},[f]);let C=wt(e,y),w=C===`DONE`||C===`NOT_APPLICABLE`,T=C===`RESIZING`?`WAITING`:C,E=(0,J.useRef)(h);(0,J.useEffect)(()=>{E.current=h},[h]),(0,J.useEffect)(()=>{E.current?.(C)},[C]);let D=d&&w;(0,J.useEffect)(()=>{if(!D)return;let e=setTimeout(()=>S.current(),v);return()=>clearTimeout(e)},[D,v]);let O=c(),k=C===`STALLED`,A=(0,Y.jsx)(`div`,{className:`relative z-10 flex w-full flex-col items-center gap-6 [animation:onboarding-step-in_420ms_ease-out] motion-reduce:[animation:none]`,children:N()},T);if(O)return(0,Y.jsxs)(`div`,{"data-testid":`provisioning-takeover`,"data-theme":`light`,className:`relative flex h-full min-h-[420px] w-full flex-col overflow-hidden text-center`,style:{backgroundColor:Tt},children:[(0,Y.jsx)(`div`,{className:`px-6 pb-8 pt-16`,children:A}),(0,Y.jsx)(`div`,{className:`relative min-h-0 flex-1`,children:(0,Y.jsx)(gt,{className:`absolute inset-0`,layout:`below`,paused:k})})]});return(0,Y.jsxs)(`div`,{"data-testid":`provisioning-takeover`,"data-theme":`light`,className:`relative flex h-full min-h-[420px] w-full flex-col items-center justify-center overflow-hidden px-6 py-10 text-center`,style:{backgroundColor:Tt},children:[(0,Y.jsx)(gt,{className:`absolute inset-0`,layout:`around`,paused:k}),(0,Y.jsx)(`div`,{className:`relative z-10 mr-[16%] flex w-full max-w-2xl flex-col items-center`,children:A})]});function j(e=b(`provisioningState.continueInBackground`)){return p?(0,Y.jsx)(u,{variant:`ghost`,"data-testid":`provisioning-escape`,onClick:m,children:e}):null}function M({allDone:e=!1,creditsOnly:t=!1}={}){return(0,Y.jsx)(kt,{intent:r,creditsChange:i,targets:a,fromSnapshot:o,machineFloor:s,landed:l,allDone:e,creditsOnly:t})}function N(){if(C===`CONFIRMING`)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Et,{status:x.confirmingStatus,caption:b(`provisioningState.confirmingCaption`)}),r&&(0,Y.jsx)(At,{intent:r}),j()]});if(C===`WAITING`||C===`RESIZING`)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Et,{status:x.waitingStatus,caption:b(n?`provisioningState.waitingCaptionLong`:`provisioningState.waitingCaptionShort`)}),M(),j()]});if(C===`DONE`)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Et,{status:b(`provisioningState.allDoneStatus`)}),M({allDone:!0})]});if(C===`NOT_APPLICABLE`)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Et,{status:b(`provisioningState.planReadyStatus`)}),M({allDone:!0,creditsOnly:!0})]});if(C===`STALLED`){let e=g!=null;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Et,{status:e?x.snagStatus:b(`provisioningState.takingLongerStatus`),caption:e?Xe(g,x.snagCaption,t):b(`provisioningState.stalledCaption`)}),M(),e?j(b(`provisioningState.retryInBackground`)):j()]})}return C===`CONFIRM_TIMEOUT`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Et,{status:x.confirmTimeoutStatus,caption:x.confirmTimeoutCaption}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,Y.jsx)(u,{variant:`outlined`,"data-testid":`onboarding-go-to-billing`,onClick:_.onGoToBilling,children:b(`provisioningState.goToBilling`)}),(0,Y.jsx)(u,{variant:`primary`,"data-testid":`onboarding-retry`,onClick:_.onRetry,children:b(`provisioningState.tryAgain`)})]})]}):null}}function Mt(e){let{planId:t,targets:n,actuals:r,initialActuals:i,resizeOperationInFlight:a,sawOperation:o,msSinceWatchStart:s,confirmExpired:c,serverVerdict:l=null,statusObservedSinceTargetsMet:u=!0,targetsProveNoop:d=!0}=e;if(t!==`pro`)return{state:c?`CONFIRM_TIMEOUT`:`CONFIRMING`,softWaiting:!1};let f=o||a,p=l===`started`||l===`in_progress`,m=o||d&&u;if(!a){let e=p?m:f||l===`already_done`||i!=null&&!Ee(n,i);if(Ee(n,r)){if(e)return{state:`DONE`,softWaiting:!1};if(!p&&(d||l===`not_applicable`))return{state:`NOT_APPLICABLE`,softWaiting:!1}}else{if(l===`already_done`)return{state:`DONE`,softWaiting:!1};if(l===`not_applicable`)return{state:`NOT_APPLICABLE`,softWaiting:!1}}}return s!=null&&s>=9e4?{state:`STALLED`,softWaiting:!1}:f||l===`started`||l===`in_progress`?{state:`RESIZING`,softWaiting:!1}:{state:`WAITING`,softWaiting:s!=null&&s>=3e4}}var Nt=2e3,Pt=1e3,Ft=[`DONE`,`NOT_APPLICABLE`,`CONFIRM_TIMEOUT`],It={assistantId:null,machine:null,storage:null};function Lt({open:e,canLowerResources:t=!1,verdictRecheckMs:r=Ke}){let i=V(),a=o(),[s,c]=(0,J.useState)(!1),[u,d]=(0,J.useState)(0),[f,p]=(0,J.useState)(null),[m,h]=(0,J.useState)(null),[v,y]=(0,J.useState)(null),[x,S]=(0,J.useState)(null),[C,w]=(0,J.useState)(null),[T,E]=(0,J.useState)(null),[D,O]=(0,J.useState)(It),[k,j]=(0,J.useState)(null),[M,N]=(0,J.useState)(!1),P=(0,J.useRef)(!1),ee=(0,J.useRef)(!1),F=(0,J.useRef)(0),[te,I]=(0,J.useState)(!1),[ne,re]=(0,J.useState)(null),[L,ae]=(0,J.useState)(null),[se,le]=(0,J.useState)(null),[z,B]=(0,J.useState)(()=>Date.now()),[pe,me]=(0,J.useState)(!0);(0,J.useEffect)(()=>{e||(c(!1),d(0),p(null),h(null),y(null),I(!1),re(null),ae(null),le(null),me(!0),S(null),w(null),E(null),O(It),j(null),N(!1),P.current=!1,ee.current=!1,F.current+=1)},[e]),(0,J.useEffect)(()=>{e&&(p(Date.now()),i.invalidateQueries({queryKey:_()}),i.invalidateQueries({queryKey:n()}))},[e,i]);let H=m!=null,he=R({...ie(),refetchInterval:e=>e.state.data?.plan_id===`pro`||s?!1:He,refetchIntervalInBackground:!1,enabled:e&&a&&!H}),ge=(f!=null&&he.dataUpdatedAt>=f?he.data?.plan_id:null)??null;(0,J.useEffect)(()=>{if(!e||H||ge!==`pro`)return;let t=Date.now();h(t),B(t)},[e,H,ge]),(0,J.useEffect)(()=>{if(!e||H)return;let t=setTimeout(()=>c(!0),Ue);return()=>clearTimeout(t)},[e,H,u]);let _e=(0,J.useCallback)(()=>{c(!1),d(e=>e+1),A.getState().fetchOrganizations(),i.invalidateQueries({queryKey:_()})},[i]),ve=(0,J.useCallback)(()=>{let e=Date.now();y(e),B(e)},[]),{mutate:ye}=ue(oe()),U=(0,J.useCallback)(e=>{let t=F.current;ye({},{onSuccess:n=>{t===F.current&&(j(null),Oe(n)?ee.current?j({error:n.reason??`no_active_pro`}):(ee.current=!0,N(!0),e===`escape`&&ve()):(S(n.state),e===`escape`&&ve()))},onError:e=>{t===F.current&&j(e)}})},[ye,ve]);(0,J.useEffect)(()=>{!e||!a||!H||P.current||(P.current=!0,U(`auto`))},[e,a,H,U]),(0,J.useEffect)(()=>{if(!M)return;let e=F.current,t=setTimeout(()=>{N(!1),e===F.current&&U(`auto`)},Ge);return()=>clearTimeout(t)},[M,U]);let be=(0,J.useCallback)(()=>U(`escape`),[U]),W=R({...g(),enabled:e&&a&&H}),G=pe?Nt:!1,xe=R({...ce(),enabled:e&&a&&H,refetchInterval:e=>e.state.data?.id==null?G:!1,retry:!1}),K=H&&f!=null&&W.dataUpdatedAt>=f,we=K&&!W.isPending&&!W.isFetching,q=(K?W.data?.primary_assistant_id:null)??(W.isPending?null:xe.data?.id??null),je=R({...l({path:{id:q??`unresolved`}}),enabled:e&&a&&H&&q!=null,refetchInterval:G,retry:!1}),Y=b({path:{id:q??`unresolved`}}),Me=R({...Y,enabled:e&&a&&H&&q!=null,refetchInterval:G,retry:!1}),Ne=(0,J.useRef)(0),[Pe,Fe]=(0,J.useState)(0),Ie=de(Y.queryKey);(0,J.useEffect)(()=>i.getQueryCache().subscribe(t=>{if(!(t.type!==`updated`||t.query.queryHash!==Ie)){if(t.action.type===`fetch`)Ne.current+=1;else if(t.action.type===`success`&&!t.action.manual){let n=Ne.current,r=e&&ke(t.action.data);fe.schedule(()=>{Fe(n),r&&(I(!0),re(q))})}}}),[i,Ie,e,q]);let Le=ke(Me.data),Re=ne===q,X=W.data,Z=(0,J.useMemo)(()=>X?{machineSize:Se(X.max_machine_tier),storageGib:X.selected_storage_gib??null}:null,[X]),ze=X!=null&&X.max_machine_tier==null?Te:null,Be=X?X.domain_setup_available&&X.primary_assistant_id!=null:void 0,Ve=je.data,Q=(0,J.useMemo)(()=>Ve?{machineSize:Ve.machine_size??null,storageGib:Ve.provisioned_storage_gib??null}:null,[Ve]),We=se===q,qe=(0,J.useMemo)(()=>{let e=Ae(Z,Q),t=Z?.machineSize??ze;if(t==null)return e;let n=Q?.machineSize??null;if(n==null)return{...e,machine:!1};let r=(We?L?.machineSize:null)??n,i=Ce(t)<Ce(r);return{...e,machine:i?Ce(n)<=Ce(t):Ce(n)>=Ce(t)}},[Z,Q,L,We,ze]),Je=Ee(Z,Q),Ye=T===q;(0,J.useEffect)(()=>{e&&(Je?(w(e=>e!=null&&Ye?e:Date.now()),E(q)):(w(null),E(null)))},[e,Je,q,Ye]);let Xe=D.assistantId===q;(0,J.useEffect)(()=>{if(!e)return;let t=Ne.current;O(e=>{let n=e.assistantId===q?e:It,r=qe.machine?n.machine??t:null,i=qe.storage?n.storage??t:null;return e.assistantId===q&&e.machine===r&&e.storage===i?e:{assistantId:q,machine:r,storage:i}})},[e,qe,q]);let Ze=(0,J.useMemo)(()=>{let e=De(Me.data),t=e=>e!=null&&Xe&&Pe>e;return{machine:qe.machine&&!e.machine&&t(D.machine),storage:qe.storage&&!e.storage&&t(D.storage)}},[qe,D,Xe,Pe,Me.data]);(0,J.useEffect)(()=>{!e||!Q||L!=null&&We||(ae(Q),le(q))},[e,Q,q,L,We]);let Qe=v??m,$e=Qe==null?null:Math.max(0,z-Qe),et=!t,{state:tt,softWaiting:nt}=Mt({planId:H?`pro`:ge,targets:Z,actuals:Q,initialActuals:We?L:null,resizeOperationInFlight:Le,sawOperation:te&&Re,msSinceWatchStart:$e,confirmExpired:s,serverVerdict:x,statusObservedSinceTargetsMet:C!=null&&Ye&&Me.dataUpdatedAt>C,targetsProveNoop:et}),$=Ft.includes(tt),rt=e&&H&&!$;(0,J.useEffect)(()=>{me(rt)},[rt]),(0,J.useEffect)(()=>{if(!e||!H||$)return;let t=setInterval(()=>B(Date.now()),Pt);return()=>clearInterval(t)},[e,H,$]);let it=!et&&(x===`started`||x===`in_progress`)&&!(te&&Re);return(0,J.useEffect)(()=>{if(!e||!H||$||!it)return;let t=setInterval(()=>U(`auto`),r);return()=>clearInterval(t)},[e,H,$,it,r,U]),{state:tt,softWaiting:nt,targets:Z,actualsSnapshot:L,machineFloor:ze,landed:Ze,assistantId:q,domainStepAvailable:Be,onboardingSettled:we,confirmError:!H&&he.isError,targetsError:H&&W.isError&&(!X||!K),escapeEligible:$e!=null&&$e>=6e4,retryConfirm:_e,kickProvisioning:be,kickError:k}}var Rt=200,zt=380;function Bt(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}var Vt=e=>e===`WAITING`||e===`RESIZING`||e===`STALLED`,Ht=e=>e===`DONE`||e===`NOT_APPLICABLE`,Ut={machineSize:null,storageGib:null};function Wt({open:e,onClose:t,dwellMs:n,phaseMinMs:r,mode:i=`checkout`,resizeContext:a}){let{t:o}=z(`settings`),s=i===`resize`,c=V(),l=pe(),u=O.use.assistantInbox(),[d,f]=(0,J.useState)(`provisioning`),[p,m]=(0,J.useState)(`idle`),g=(0,J.useRef)([]),[_,v]=(0,J.useState)(null),[b,x]=(0,J.useState)(null),[S,w]=(0,J.useState)(null),[E,A]=(0,J.useState)(!1),j=s?a?.direction:void 0,M=ze(j),N=Lt({open:e,canLowerResources:s?a?.canLowerResources===!0:!1});(0,J.useEffect)(()=>{if(e){v(s?null:h()),w(e=>e??Date.now());return}g.current.forEach(clearTimeout),g.current=[],f(`provisioning`),m(`idle`),x(null),w(null),A(!1)},[e,s]),(0,J.useEffect)(()=>()=>{g.current.forEach(clearTimeout)},[]),(0,J.useEffect)(()=>{d===`complete`&&C()},[d]);let P=Vt(N.state),F=Ht(b??N.state),{targets:te,assistantId:I,domainStepAvailable:ne,onboardingSettled:re}=N,L=s?a?.fromSnapshot:void 0,ie=N.actualsSnapshot,ae={machineSize:L?.machineSize??ie?.machineSize??null,storageGib:L?.storageGib??ie?.storageGib??null},oe=s&&ne===!0,{domains:se,domainsError:ce,domainsFetching:le,domainsUpdatedAt:R,domainsErrorUpdatedAt:ue}=Q(e&&oe,I),de=(se?.results.length??0)>0,B=(0,J.useRef)(null);(0,J.useEffect)(()=>{if(!e){B.current=null;return}!oe||I==null||B.current!==I&&(B.current=I,c.invalidateQueries({queryKey:y({path:{assistant_id:I}})}))},[e,oe,I,c]);let fe=!le&&(S!=null&&R>=S||S!=null&&!!ce&&ue>=S),[me,H]=(0,J.useState)(!1),he=re&&(!oe||fe);(0,J.useEffect)(()=>{if(!e){H(!1);return}he&&H(!0)},[e,he]);let ge=(0,J.useCallback)(()=>{C(),t(),l(D.assistantInbox,{replace:!0})},[l,t]),_e=(0,J.useCallback)(()=>{let e=s?ne===!0&&!de?`domain`:`complete`:ne===!1?`complete`:`domain`;if(e===`domain`&&u){ge();return}if(Bt()){f(e);return}m(`covering`),g.current.push(setTimeout(()=>{f(e),m(`revealing`),g.current.push(setTimeout(()=>m(`idle`),zt))},Rt))},[ne,s,de,u,ge]),ve=(0,J.useCallback)(()=>{A(!0)},[]),ye=(0,J.useCallback)(()=>{N.kickProvisioning(),k.info(N.kickError==null?M.backgroundExitToast:M.backgroundRetryToast),A(!1),t()},[N,t,M]),U=(0,J.useCallback)(()=>{A(!1)},[]),be=d===`provisioning`&&(N.confirmError||N.targetsError),W=d===`provisioning`&&!be,G=W&&!F,xe=`transition-[background-color] duration-300 ease-out${W?` bg-white p-0`:``}`,Se=W?`[animation:fadeIn_0.45s_ease-out_both]`:p===`revealing`?`[animation:fadeInUp_0.42s_ease-out_0.12s_both]`:`[animation:fadeIn_0.25s_ease-out_both]`;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(T.Root,{open:e,onOpenChange:e=>{e||t()},children:(0,Y.jsxs)(T.Content,{size:`md`,hideCloseButton:d!==`complete`,dismissOnOverlayClick:!G,onEscapeKeyDown:G?e=>e.preventDefault():void 0,onInteractOutside:G?e=>e.preventDefault():void 0,overlayClassName:xe,className:W?`overflow-y-auto inset-0 max-w-none w-screen h-screen max-h-none rounded-none border-0`:`overflow-hidden`,children:[(0,Y.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col motion-reduce:[animation:none] ${Se}`,children:K()},d),p!==`idle`&&(0,Y.jsx)(`div`,{"aria-hidden":!0,"data-testid":`takeover-exit-sheet`,className:`pointer-events-none fixed inset-0 z-50 ${p===`covering`?`[animation:fadeIn_200ms_ease-in_both]`:`[animation:fadeIn_380ms_ease-out_both_reverse]`}`,style:{backgroundColor:`#ffffff`}})]})}),(0,Y.jsx)(ee,{open:E&&P,title:o(`billingOnboardingModal.backgroundConfirmTitle`),message:M.backgroundConfirmMessage,confirmLabel:o(`billingOnboardingModal.backgroundConfirmContinue`),cancelLabel:o(`billingOnboardingModal.backgroundConfirmKeepWaiting`),onConfirm:ye,onCancel:U})]});function K(){return d===`provisioning`?N.confirmError||N.targetsError?(0,Y.jsx)(et,{onGoToBilling:t,direction:j}):(0,Y.jsx)(jt,{state:N.state,direction:j,softWaiting:N.softWaiting,intent:_,creditsChange:s?a?.credits:void 0,targets:te??Ut,fromSnapshot:ae,machineFloor:N.machineFloor,landed:N.landed,celebrating:me,onCelebrationEnd:_e,escapeAvailable:P&&N.escapeEligible,onEscape:ve,onPhaseChange:x,kickError:N.kickError,confirm:{onRetry:N.retryConfirm,onGoToBilling:t},dwellMs:n,phaseMinMs:r}):d===`domain`?(0,Y.jsx)($e,{machineBusy:P,assistantId:I,onExit:()=>f(`complete`)}):(0,Y.jsx)(Ve,{assistantId:I,direction:j})}}function Gt(e){return e!=null&&!e.customized}function Kt(e){return Gt(e)?e.name:`Custom`}var qt=[`mighty`,`super`,`ultra`],Jt=[`free`,...qt];function Yt(e){return Jt.indexOf(e)}function Xt(e,t){if(e===null)return`upgrade`;let n=Yt(e),r=Yt(t);return n===-1||r===-1?`upgrade`:r===n?`current`:r<n?`downgrade`:`upgrade`}function Zt(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>qt.indexOf(e.key)-qt.indexOf(t.key));if(!t)return n[0];let r=n.findIndex(e=>e.key===t);return r===-1?n[0]:r>=n.length-1?null:n[r+1]}var Qt=[`too_expensive`,`missing_features`,`switched_service`,`unused`,`too_complex`,`low_quality`,`customer_service`,`other`],$t={too_expensive:`cancelReasonSurvey.optionTooExpensive`,missing_features:`cancelReasonSurvey.optionMissingFeatures`,switched_service:`cancelReasonSurvey.optionSwitchedService`,unused:`cancelReasonSurvey.optionUnused`,too_complex:`cancelReasonSurvey.optionTooComplex`,low_quality:`cancelReasonSurvey.optionLowQuality`,customer_service:`cancelReasonSurvey.optionCustomerService`,other:`cancelReasonSurvey.optionOther`},en=1e3,tn={feedback:null,comment:``};function nn(e){return e.feedback!=null}function rn(e){let t=e.feedback===`other`?e.comment.trim():``;return{feedback:e.feedback,comment:t||null}}function an({value:e,onChange:t,disabled:n}){let{t:i}=z(`settings`);return(0,Y.jsxs)(`div`,{className:`mt-5 space-y-3`,"data-testid":`cancel-reason-survey`,children:[(0,Y.jsx)(r,{as:`p`,variant:`body-medium-default`,children:i(`cancelReasonSurvey.title`)}),(0,Y.jsx)(I,{value:e.feedback??``,onValueChange:n=>t({...e,feedback:n===``?null:n}),name:`cancel-reason`,disabled:n,"aria-label":i(`cancelReasonSurvey.title`),children:Qt.map(e=>(0,Y.jsx)(j,{value:e,label:i($t[e])},e))}),e.feedback===`other`?(0,Y.jsx)(M,{label:i(`cancelReasonSurvey.otherLabel`),placeholder:i(`cancelReasonSurvey.otherPlaceholder`),value:e.comment,onChange:n=>t({...e,comment:n.target.value}),maxLength:en,rows:3,disabled:n,fullWidth:!0,"data-testid":`cancel-reason-comment`}):null]})}var on={free:{bodyShape:`ninja`,eyeStyle:`angry`,color:`yellow`},mighty:{bodyShape:`cloud`,eyeStyle:`grumpy`,color:`green`},super:{bodyShape:`urchin`,eyeStyle:`goofy`,color:`teal`},ultra:{bodyShape:`sprout`,eyeStyle:`curious`,color:`orange`}};function sn({tier:e,size:t=40}){let n=on[e]??on.free,r=v();return(0,Y.jsx)(`div`,{"aria-hidden":!0,className:`inline-flex shrink-0`,children:r?(0,Y.jsx)(P,{components:r,bodyShapeId:n.bodyShape,colorId:n.color,size:t}):(0,Y.jsx)(`div`,{style:{width:t,height:t}})})}var cn={free:{tagline:`Get to know your assistant.`,cta:`Start Free`,priceCaption:`Forever`},mighty:{tagline:`More capacity for consistent use.`,cta:`Power Up`,priceCaption:`Billed monthly`,recommended:!0},super:{tagline:`Do more, think less about the how.`,cta:`Go Super`,priceCaption:`Billed monthly`,extraFeatures:[`Assistant email and subdomain`]},ultra:{tagline:`Your second brain, running full speed.`,cta:`Unleash Ultra`,priceCaption:`Billed monthly`,extraFeatures:[`Assistant email and subdomain`]}};function ln(e){return cn[e]}function un(e){return`Downgrade to ${e}`}function dn(e){let t=e/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}function fn(e){return`${dn(e)}/mo`}function pn(e){return`${dn(e)}/month`}function mn(e){return`${e>0?`+`:`−`}${dn(Math.abs(e))}/mo`}function hn(e){return`${e} GB storage`}function gn(e){return`${dn(e*100)} of bundled credits`}var _n=`Small`;function vn(e){return e?.machine_size?K[e.machine_size]??e.machine_size:_n}function yn(e,t){let n=ln(e.key)?.extraFeatures??[];return[{icon:je,label:`${vn(e)} Machine`},{icon:G,label:`${e.storage_gib} GB Storage`},{icon:W,label:t},...n.map(e=>({icon:ye,label:e}))]}function bn(){return[{icon:je,label:`${_n} Machine`},{icon:G,label:`4 GB Storage`},{icon:W,label:`Pay as you go credits`}]}function xn(e,t=[]){let n=e?.credits_usd??0,r=e?.storage_gib??4,i=q[e?.machine_size??`small`];return[`${vn(e)} machine${i?` (${i})`:``}`,hn(r),e?.usage_label??gn(n),...t]}var Sn={machine:`Configurable machine size`,storage:`Configurable storage`,credits:`Pay-as-you-go and bundled credits`};function Cn(e,t){let n=[`${e.machineTier?we[e.machineTier]??t.machine_tiers.find(t=>t.tier===e.machineTier)?.label??e.machineTier:_n} Machine`];if(e.storageGib!=null&&n.push(`${e.storageGib} GB`),e.creditTier!=null){let r=_t(t,e.creditTier)?.label,i=vt(e.creditTier);n.push(r??(i==null?`Credit bundle`:`${i} credits/mo`))}return n}function wn(e,t){let n=new Set([Sn.machine]);return e.storageGib!=null&&n.add(Sn.storage),e.creditTier!=null&&n.add(Sn.credits),[...Cn(e,t),...t.included_features.filter(e=>!n.has(e))]}function Tn(e){return e.disabled===!0}function En({machineTiers:e,storageTiers:t,selectedMachineTier:n,selectedStorageTier:i,onMachineTierChange:a,onStorageTierChange:o,currentMachinePriceCents:s,currentStoragePriceCents:c}){let{t:l}=z(`settings`),u=(0,J.useMemo)(()=>e.map(e=>{let t=we[e.tier]??e.label,n=s==null?l(`tierPicker.priceAddon`,{price:fn(e.price_cents)}):e.price_cents===s?l(`tierPicker.priceCurrent`,{price:fn(e.price_cents)}):mn(e.price_cents-s);return{value:e.tier,label:l(`tierPicker.machineOption`,{label:t,priceLabel:n}),disabled:Tn(e)}}),[e,s,l]),d=(0,J.useMemo)(()=>t.map(e=>{let t=c==null?l(`tierPicker.priceAddon`,{price:fn(e.price_cents)}):e.price_cents===c?l(`tierPicker.priceCurrent`,{price:fn(e.price_cents)}):mn(e.price_cents-c);return{value:e.tier,label:l(`tierPicker.storageOption`,{gib:e.storage_gib,priceLabel:t}),disabled:Tn(e)}}),[t,c,l]);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(r,{as:`p`,variant:`label-small-default`,className:`text-[var(--content-secondary)]`,children:l(`tierPicker.machineLabel`)}),(0,Y.jsx)(`span`,{title:l(`tierPicker.machineTooltip`),children:(0,Y.jsx)(be,{className:`h-3 w-3 text-[var(--content-tertiary)]`})})]}),(0,Y.jsx)(F,{"aria-label":l(`tierPicker.machineAriaLabel`),placeholder:l(`tierPicker.machinePlaceholder`),value:n??``,onChange:a,options:u})]}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(r,{as:`p`,variant:`label-small-default`,className:`text-[var(--content-secondary)]`,children:l(`tierPicker.storageLabel`)}),(0,Y.jsx)(`span`,{title:l(`tierPicker.storageTooltip`),children:(0,Y.jsx)(be,{className:`h-3 w-3 text-[var(--content-tertiary)]`})})]}),(0,Y.jsx)(F,{"aria-label":l(`tierPicker.storageAriaLabel`),placeholder:l(`tierPicker.storagePlaceholder`),value:i??``,onChange:o,options:d})]})]})}var Dn=new Set([`active`,`trialing`,`past_due`]);function On(e){return e.plan_id!==`base`&&e.cancel_at_period_end!==!0&&!e.cancel_at&&e.status!=null&&Dn.has(e.status)}function kn(e){return e?.status!=null&&Dn.has(e.status)}var An=[`target_plan_id`,`confirm`,`machine_tier`,`storage_tier`,`credit_tier`,`package`,`non_field_errors`];function jn(e,t){if(e&&typeof e==`object`){for(let t of An)if(t in e){let n=e[t];if(Array.isArray(n)&&typeof n[0]==`string`)return n[0]}if(`detail`in e&&typeof e.detail==`string`)return e.detail}return t}function Mn(e,t){let n=e.filter(e=>!Tn(e));return t!==null&&n.some(e=>e.tier===t)?t:n[0]?.tier??null}function Nn(e,t,n){return t===void 0?n:t!==null&&(t===n||e.some(e=>e.tier===t))?t:null}function Pn(e){return e.length?Math.min(...e.map(e=>e.price_cents)):0}function Fn(){let e=V();return async t=>{try{let n=await t.mutateAsync();return await e.invalidateQueries({queryKey:_()}),t.onSuccess(n),n}catch(e){return k.error(jn(e,t.errorFallback()),{id:t.errorToastId}),null}}}var In=`billing-portal-return-snapshot`;function Ln(e){try{sessionStorage.removeItem(In),sessionStorage.setItem(In,JSON.stringify(e))}catch{}}function Rn(){if(typeof sessionStorage>`u`)return null;try{let e=sessionStorage.getItem(In);if(!e)return null;let t=JSON.parse(e);return typeof t.cancel_at_period_end!=`boolean`||typeof t.plan_id!=`string`?null:{cancel_at_period_end:t.cancel_at_period_end,cancel_at:t.cancel_at??null,plan_id:t.plan_id}}catch{return null}}function zn(){try{sessionStorage.removeItem(In)}catch{}}function Bn(e){return e?{cancel_at_period_end:e.cancel_at_period_end,cancel_at:e.cancel_at??null,plan_id:e.plan_id}:null}function Vn(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:`numeric`,month:`long`,day:`numeric`})}function Hn(e){return e?e.cancel_at??e.current_period_end??null:null}function Un(e){let t=V();return(0,J.useEffect)(()=>m(()=>{t.invalidateQueries(ie())}),[t]),le({onSuccess:t=>{e&&Ln(e),f(t.portal_url)},onError:()=>{k.error(B(`settings:useBillingPortalSession.openError`),{id:`billing-portal-session-error`})}})}function Wn(){let e=t(),n=Fn();return{cancelSubscription:t=>n({mutateAsync:()=>e.mutateAsync({body:t}),onSuccess:e=>{let t=e.cancel_at?Vn(e.cancel_at):B(`settings:useCancelSubscription.endOfBillingPeriod`);k.info(B(`settings:useCancelSubscription.canceledToast`,{date:t}),{id:`subscription-cancel`})},errorToastId:`subscription-cancel-error`,errorFallback:()=>B(`settings:useCancelSubscription.cancelFailedToast`)}),isPending:e.isPending}}function Gn(e){return Promise.all([e.invalidateQueries({queryKey:_()}),e.invalidateQueries({queryKey:ne()}),e.invalidateQueries({queryKey:n()}),e.invalidateQueries({queryKey:p()})])}function Kn({enabled:e=!0}={}){let t=V(),{t:n}=z(`settings`),[r,i]=(0,J.useState)(null),a=(0,J.useRef)(!1),[s,c]=(0,J.useState)(!1),l=o(),u=e&&l,d=R({...ie(),enabled:u}),f=d.data,p=f!=null&&f.plan_id!==`base`,m=R({...g(),enabled:u&&p}),h=R({...w(),enabled:u&&p}).data?.plans.find(e=>e.id===`pro`)?.machine_tiers??[],_=e=>h.find(t=>t.tier===e)?.price_cents??null,v=ue(se()),y={machineTier:m.data?.max_machine_tier??null,storageTier:m.data?.selected_storage_tier??null,storageGib:m.data?.selected_storage_gib??null,creditTier:f?.selected_credit_tier??null,hasPlatformFee:f?.has_platform_fee??!0},b=f!=null&&f.plan_id!==`base`&&f.status!=null&&Dn.has(f.status)&&f.cancel_at_period_end!==!0&&!f.cancel_at,x=!p||!m.isPending,S=!p||m.isSuccess&&m.data!=null&&!m.isFetching&&m.dataUpdatedAt>=d.dataUpdatedAt,C=s||v.isPending,T=async(e,t=y)=>{if(a.current)return null;a.current=!0,c(!0);try{return await E(e,t)}finally{a.current=!1,c(!1)}},E=async(e,r)=>{i(null);let a=e=>(i(e),k.error(e),null),[o,s]=await Promise.all([d.refetch(),m.refetch()]),c=o.data,l=s.data;if(o.isError||s.isError||c==null||l==null)return a(n(`customPlanModal.changeFailed`));let u={machineTier:l.max_machine_tier??null,storageTier:l.selected_storage_tier??null,storageGib:l.selected_storage_gib??null,creditTier:c.selected_credit_tier??null,hasPlatformFee:c.has_platform_fee??!0},f={machineTier:e.machineTier===r.machineTier?u.machineTier:e.machineTier,storageTier:e.storageTier===r.storageTier&&u.storageTier!=null?u.storageTier:e.storageTier,creditTier:e.creditTier===r.creditTier?u.creditTier:e.creditTier},p=f.machineTier!==u.machineTier,h=f.storageTier!==u.storageTier,g=f.creditTier!==u.creditTier,y=!u.hasPlatformFee,b=_(f.machineTier),x=_(u.machineTier),S=p&&b!=null&&x!=null&&b<x;if(!p&&!h&&!g&&!y)return{needsResize:!1,creditChanged:!1};let C;try{C=(await v.mutateAsync({body:{machine_tier:f.machineTier,storage_tier:f.storageTier,credit_tier:f.creditTier}})).status}catch(e){return a(jn(e,n(`customPlanModal.changeFailed`)))}return await Gn(t),C===`no_op`?{needsResize:!1,creditChanged:!1}:{needsResize:h||p&&!S,creditChanged:g}};return{changeTiers:T,isPending:C,error:r,current:y,eligible:b,currentReady:x,currentKnown:S,primaryAssistantId:S?m.data?.primary_assistant_id??null:null}}function qn(){let e=V(),{t}=z(`settings`),n=ue(se());return{changePackage:async r=>{try{let t=await n.mutateAsync({body:{package:r}});return await Gn(e),t}catch(e){return k.error(jn(e,t(`customPlanModal.changeFailed`))),null}},isPending:n.isPending}}function Jn({className:e,"data-testid":t,children:n}){return(0,Y.jsx)(`div`,{"aria-hidden":!0,"data-testid":t,className:S(`flex size-[52px] shrink-0 items-center justify-center rounded-xl`,e),children:n})}var Yn=32;function Xn(){let e=s.use.activeAssistantId(),{components:t,traits:n,customImageUrl:r,isLoading:i}=L(e);return(0,Y.jsx)(Jn,{"data-testid":`assistant-avatar-tile`,className:`bg-[var(--surface-active)]`,children:e!=null&&!i?(0,Y.jsx)(N,{components:t,traits:n,customImageUrl:r,size:Yn}):null})}var Zn=`Billed monthly · prorated difference charged today`,Qn=`Billed monthly · prorated difference charged today or credited next invoice`,$n=`Billed monthly · prorated credit on your next invoice`,er=`Your machine downsizes now and your storage stays. No refund.`,tr=`Continue`,nr=`The plan includes`,rr=`Your plan will include`;function ir(e,t,n){let r=n?ln(n)?.tagline??``:``;switch(e){case`downgrade`:return{title:un(t),subtitle:``,priceCaption:$n,checklistHeading:rr,note:er,confirmLabel:un(t),destructive:!0};case`switch`:return{title:`Switch to ${t}`,subtitle:r,priceCaption:Qn,checklistHeading:nr,note:``,confirmLabel:tr,destructive:!1};default:return{title:`Upgrade to ${t}`,subtitle:r,priceCaption:Zn,checklistHeading:nr,note:``,confirmLabel:tr,destructive:!1}}}function ar({open:e,relation:t,packageName:n,targetPackage:i,pending:a,onCancel:o,onConfirm:s}){let{t:c}=z(`settings`),l=(0,J.useRef)(null),d=(0,J.useId)(),f=ir(t,n,i?.key??null),p=i?{price:fn(i.total_price_cents),highlights:xn(i,ln(i.key)?.extraFeatures??[])}:null,m=f.subtitle,h=f.note?{"aria-describedby":d}:m?{}:{"aria-describedby":void 0};return(0,Y.jsx)(T.Root,{open:e,onOpenChange:e=>{!e&&!a&&o()},children:(0,Y.jsxs)(T.Content,{size:`sm`,hideCloseButton:!0,className:`gap-4 p-4 max-w-[421px]`,onOpenAutoFocus:e=>{e.preventDefault(),l.current?.focus()},...h,children:[(0,Y.jsxs)(T.Header,{className:`flex-row items-center gap-3 p-0 pb-2`,children:[f.destructive?(0,Y.jsx)(Jn,{"data-testid":`package-switch-warning-tile`,className:`bg-[var(--system-negative-weak)]`,children:(0,Y.jsx)(he,{className:`size-6 text-[var(--system-negative-strong)]`})}):(0,Y.jsx)(Xn,{}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsx)(T.Title,{className:`text-title-small text-[var(--content-emphasised)] [&>span]:whitespace-normal`,children:f.title}),m?(0,Y.jsx)(T.Description,{className:`mt-0 text-body-medium-default text-[var(--content-tertiary)]`,children:m}):null]})]}),p?(0,Y.jsxs)(T.Body,{className:`flex flex-col gap-4 p-0`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,Y.jsx)(r,{as:`p`,variant:`title-large`,className:`text-[var(--content-default)]`,children:p.price}),(0,Y.jsx)(r,{as:`p`,variant:`label-medium-default`,className:`leading-[15px] text-[var(--content-tertiary)]`,children:f.priceCaption})]}),(0,Y.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,Y.jsx)(r,{as:`p`,variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:f.checklistHeading}),(0,Y.jsx)(`ul`,{className:`flex flex-col gap-2`,children:p.highlights.map(e=>(0,Y.jsxs)(`li`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(xe,{className:`size-4 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0}),(0,Y.jsx)(r,{as:`span`,variant:`body-medium-default`,className:`text-[var(--content-default)]`,children:e})]},e))})]}):null,f.note?(0,Y.jsx)(r,{id:d,as:`p`,variant:`body-medium-default`,className:`text-[var(--content-secondary)]`,children:f.note}):null,(0,Y.jsxs)(T.Footer,{className:`flex-col gap-4 p-0`,children:[(0,Y.jsx)(u,{fullWidth:!0,variant:f.destructive?`danger`:`primary`,onClick:s,disabled:a,"data-testid":`confirm-package-switch-button`,children:f.confirmLabel}),(0,Y.jsx)(u,{ref:l,fullWidth:!0,variant:`ghost`,onClick:o,disabled:a,children:c(`packageSwitchConfirmModal.cancel`)})]})]})})}function or(){let e=V();(0,J.useEffect)(()=>m(()=>{Gn(e)}),[e])}export{fn as A,Gt as B,wn as C,yn as D,vn as E,an as F,Q as G,Kt as H,tn as I,Be as K,nn as L,hn as M,ln as N,mn as O,sn as P,rn as R,Tn as S,bn as T,Xt as U,Zt as V,Wt as W,On as _,Gn as a,Mn as b,zn as c,Rn as d,Un as f,kn as g,jn as h,Kn as i,pn as j,dn as k,Vn as l,Dn as m,ar as n,Wn as o,Fn as p,je as q,qn as r,Bn as s,or as t,Hn as u,Pn as v,Cn as w,En as x,Nn as y,qt as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ja as t,Mi as n,Ua as r,Va as i,Wa as a}from"./app-BcXqNg4_.js";import{x as o}from"./react-B9IgSVeK.js";var s=e(o(),1),c=.25;function l(e){e.style.transition=``,e.style.transform=``,e.style.willChange=``,e.style.opacity=``}function u({containerRef:e,onBack:o,enabled:u,navKey:d,prefetchHref:f}){let p=(0,s.useRef)(o);(0,s.useLayoutEffect)(()=>{p.current=o},[o]);let m=(0,s.useRef)(f);(0,s.useLayoutEffect)(()=>{m.current=f},[f]);let h=(0,s.useRef)(!1),g=(0,s.useRef)(new Set),_=(0,s.useRef)(!1),v=i.use.registerBackOwner(),y=i.use.unregisterBackOwner();(0,s.useEffect)(()=>{if(u)return v(),y},[u,v,y]),(0,s.useEffect)(()=>{_.current=!1;let t=g.current;return()=>{_.current=!0;for(let e of t)clearTimeout(e);t.clear();let n=e.current;n&&l(n)}},[e]);let b=(e,t)=>{let n=setTimeout(()=>{g.current.delete(n),_.current||e()},t);g.current.add(n)},x=(e,t)=>{e.style.transform=t===0?``:`translateX(${t}px)`},S=e=>{e.style.transition=`transform 200ms ${t}`,x(e,0);let n=()=>{e.removeEventListener(`transitionend`,n),l(e)};e.addEventListener(`transitionend`,n,{once:!0}),b(()=>l(e),250)},C=e=>{e.style.transition=`transform 150ms ${t}`,x(e,window.innerWidth);let n=!1,r=()=>{if(n||_.current)return;n=!0,e.removeEventListener(`transitionend`,r);let t=-(window.innerWidth*c);e.style.transition=`none`,e.style.transform=`translateX(${t}px)`,e.style.opacity=`0`,e.offsetWidth,h.current=!0,p.current(),b(()=>{h.current&&(h.current=!1,l(e))},400)};e.addEventListener(`transitionend`,r,{once:!0}),b(r,200)};a({enabled:u,onConfirm:()=>{n(m.current);let t=e.current;t&&(t.style.transition=`none`,t.style.willChange=`transform`)},onMove:(t,n)=>{let i=e.current;i&&x(i,r(t,n))},onCommit:()=>{let t=e.current;if(!t){p.current();return}C(t)},onCancel:t=>{let n=e.current;n&&(t?S(n):l(n))}}),(0,s.useLayoutEffect)(()=>{if(!h.current)return;h.current=!1;let n=e.current;if(!n)return;let r=!1,i=()=>{r||(r=!0,n.removeEventListener(`transitionend`,i),l(n))};n.style.transition=`transform 200ms ${t}, opacity 200ms ${t}`,n.style.transform=``,n.style.opacity=``,n.addEventListener(`transitionend`,i,{once:!0});let a=setTimeout(i,250);return()=>{clearTimeout(a),n.removeEventListener(`transitionend`,i),l(n)}},[d,e])}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{fg as t,ha as n,ma as r,pa as i}from"./app-BcXqNg4_.js";import{x as a}from"./react-B9IgSVeK.js";var o=e(a(),1),s={ArrowUp:`Up`,ArrowDown:`Down`,ArrowLeft:`Left`,ArrowRight:`Right`,Enter:`Return`,NumpadEnter:`Return`,Space:`Space`,Tab:`Tab`,Escape:`Escape`,Backspace:`Backspace`,Delete:`Delete`,Insert:`Insert`,Home:`Home`,End:`End`,PageUp:`PageUp`,PageDown:`PageDown`,Minus:`-`,Equal:`=`,BracketLeft:`[`,BracketRight:`]`,Backslash:`\\`,Semicolon:`;`,Quote:`'`,Backquote:"`",Comma:`,`,Period:`.`,Slash:`/`},c=new Set([`MetaLeft`,`MetaRight`,`ControlLeft`,`ControlRight`,`AltLeft`,`AltRight`,`ShiftLeft`,`ShiftRight`]),l=e=>{let t=e.code;return c.has(t)?null:/^Key[A-Z]$/.test(t)?t.slice(3):/^Digit[0-9]$/.test(t)?t.slice(5):/^Numpad[0-9]$/.test(t)?`num${t.slice(6)}`:/^F[0-9]{1,2}$/.test(t)?t:s[t]??null},u=(e,t=`macos`)=>{let n=l(e);if(n===null)return null;let r=[];return t===`windows`||t===`linux`?(e.ctrlKey&&r.push(`CmdOrCtrl`),e.metaKey&&r.push(`Super`)):(e.metaKey&&r.push(`CmdOrCtrl`),e.ctrlKey&&r.push(`Control`)),e.altKey&&r.push(`Alt`),e.shiftKey&&r.push(`Shift`),[...r,n].join(`+`)},d={macos:new Set([`Command`,`Cmd`,`CommandOrControl`]),windows:new Set([`Control`,`Ctrl`,`CommandOrControl`]),linux:new Set([`Control`,`Ctrl`,`CommandOrControl`])},f=(e,t=`macos`)=>{let n=d[t],r=e.split(`+`).map(e=>n.has(e)?`CmdOrCtrl`:e),i=r.pop()??``;return[...new Set(r)].sort().concat(i).join(`+`)},p=(e,t,n,r=`macos`)=>{if(n===``)return null;let i=f(n,r);return e.find(e=>e.key!==t&&e.accelerator!==``&&f(e.accelerator,r)===i)??null};function m(e){let a=e?.onBound,[s,c]=(0,o.useState)([]),[l,d]=(0,o.useState)(null),[f,m]=(0,o.useState)(null),h=(0,o.useCallback)(()=>{i().then(c)},[]);(0,o.useEffect)(()=>(h(),r(c)),[h]);let g=(0,o.useCallback)(()=>{d(null),m(null)},[]);return(0,o.useEffect)(()=>{if(l===null)return;let e=e=>{if(e.preventDefault(),e.stopPropagation(),e.code===`Escape`){g();return}let r=t()??`macos`,i=u(e,r);if(i===null)return;let o=p(s,l,i,r);if(o!==null){m({key:l,label:o.label});return}n(l,i).then(()=>{a?.(l),h()}).catch(()=>{h()}),g()};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[l,s,a,h,g]),{catalog:s,recordingKey:l,conflict:f,startRecording:(0,o.useCallback)(e=>{m(null),d(e)},[]),stopRecording:g,resetHotkey:(0,o.useCallback)(e=>{let r=p(s,e,s.find(t=>t.key===e)?.defaultAccelerator??``,t()??`macos`);if(r!==null){d(null),m({key:e,label:r.label});return}g(),n(e,null).then(h)},[s,h,g]),removeHotkey:(0,o.useCallback)(e=>{g(),n(e,``).then(h)},[h,g])}}export{m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{DC as t,Dy as n,Fp as r,Ga as i,Ha as a,LC as o,aC as s,iC as c,pC as l,yp as u}from"./app-BcXqNg4_.js";import{E as d,Xn as f,nr as p}from"./vendor-DwMhK7fD.js";import{t as m,x as h}from"./react-B9IgSVeK.js";import{Fn as g,Ji as _,Yn as v,i as y,li as b,tr as x}from"./icons-C0wyat6T.js";import{t as S}from"./a2a-invite-B4CyuLjf.js";var C=e(h(),1),w=m(),T=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`);function E({open:e,onClose:t,children:n,title:r}){let{t:s}=d(),c=(0,C.useRef)(null),l=(0,C.useRef)(null),u=(0,C.useRef)(t);(0,C.useEffect)(()=>{u.current=t});let{dragOffset:f,isDragging:p,onTouchStart:m,onTouchMove:h,onTouchEnd:g,onTouchCancel:_}=a({enabled:e,onSwipeLeft:t});return i(e),(0,C.useEffect)(()=>{if(!e)return;l.current?.focus();let t=e=>{if(e.key===`Escape`&&!e.defaultPrevented){e.preventDefault(),u.current();return}if(e.key!==`Tab`||!c.current)return;let t=c.current.querySelectorAll(T),n=t[0],r=t[t.length-1];if(!n||!r){e.preventDefault();return}let i=document.activeElement,a=c.current.contains(i);e.shiftKey?(!a||i===n)&&(e.preventDefault(),r.focus()):(!a||i===r)&&(e.preventDefault(),n.focus())};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e]),e?(0,w.jsxs)(`div`,{ref:c,className:`fixed inset-0`,style:{zIndex:40},role:`dialog`,"aria-modal":`true`,"aria-label":r,children:[(0,w.jsx)(`button`,{type:`button`,"aria-label":s(`sideListDrawer.closeSidebarAria`),className:`absolute inset-0 h-full w-full cursor-default`,style:{background:`rgba(0, 0, 0, 0.4)`,zIndex:40},onClick:t}),(0,w.jsxs)(`aside`,{className:`relative flex h-full w-[80vw] max-w-xs flex-col shadow-xl`,style:{background:`var(--surface-lift)`,borderRight:`1px solid var(--border-base)`,zIndex:50,paddingTop:`var(--safe-area-inset-top, env(safe-area-inset-top, 0px))`,paddingBottom:`var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))`,paddingLeft:`var(--safe-area-inset-left, env(safe-area-inset-left, 0px))`,transform:`translateX(${f}px)`,transition:p?`none`:`transform 200ms ease-out`,touchAction:`pan-y`},onTouchStart:m,onTouchMove:h,onTouchEnd:g,onTouchCancel:_,children:[(0,w.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b px-4 py-3`,style:{borderColor:`var(--border-base)`},children:[(0,w.jsx)(`span`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:r}),(0,w.jsx)(o,{ref:l,type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,w.jsx)(y,{"aria-hidden":!0}),onClick:t,"aria-label":s(`sideListDrawer.closeAria`),tintColor:`var(--content-tertiary)`})]}),(0,w.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:n})]})]}):null}function D({onClick:e}){let{t}=d();return(0,w.jsx)(o,{type:`button`,variant:`ghost`,iconOnly:(0,w.jsx)(g,{"aria-hidden":!0}),onClick:e,"aria-label":t(`sideListDrawer.openSidebarAria`),tintColor:`var(--content-secondary)`})}function O(e){return t=>{c.error(t instanceof Error?t.message:e)}}function k(e){let t=e-Date.now();if(t<=0)return`Expired`;let n=Math.ceil(t/(1e3*60*60*24));return n===1?`Expires in 1 day`:`Expires in ${n} days`}function A({open:e,assistantId:i,onClose:a}){let{t:c}=d(),{copy:u,copied:p,reset:m}=n({errorMessage:`Couldn't copy the invite link.`}),h=(0,C.useRef)(!1),g=f({...r({path:{assistant_id:i}})}),y=(0,C.useRef)(g.mutate);(0,C.useLayoutEffect)(()=>{y.current=g.mutate});let x=(0,C.useRef)(g.reset);(0,C.useLayoutEffect)(()=>{x.current=g.reset}),(0,C.useEffect)(()=>{e&&!h.current&&y.current({path:{assistant_id:i}}),h.current=e},[e,i]);let T=(0,C.useCallback)(()=>{x.current(),m(),a()},[a,m]),E=g.isSuccess&&g.data.token?S({senderAssistantId:i,token:g.data.token}):``;return(0,w.jsx)(s.Root,{open:e,onOpenChange:e=>{e||T()},children:(0,w.jsxs)(s.Content,{size:`sm`,children:[(0,w.jsx)(s.Header,{children:(0,w.jsx)(s.Title,{children:c(`generateInviteLinkDialog.title`)})}),(0,w.jsx)(s.Body,{children:g.isPending?(0,w.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[(0,w.jsx)(v,{className:`h-4 w-4 animate-spin`}),c(`generateInviteLinkDialog.creating`)]}):g.isError?(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsx)(`p`,{role:`alert`,className:`!m-0 text-body-medium-lighter`,style:{color:`var(--system-negative-strong)`},children:c(`generateInviteLinkDialog.createFailed`)}),(0,w.jsx)(o,{variant:`outlined`,onClick:()=>g.mutate({path:{assistant_id:i}}),children:c(`generateInviteLinkDialog.tryAgain`)})]}):g.isSuccess?(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(t,{variant:`body-medium-lighter`,style:{color:`var(--content-secondary)`},children:c(`generateInviteLinkDialog.shareHint`)}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(l,{type:`text`,readOnly:!0,value:E,fullWidth:!0,wrapperClassName:`flex-1`,className:`font-mono`,onFocus:e=>e.currentTarget.select()}),(0,w.jsx)(`button`,{type:`button`,onClick:()=>u(E),"aria-label":c(`generateInviteLinkDialog.copyAriaLabel`),className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-[var(--border-base)] hover:bg-[var(--surface-hover)]`,children:p?(0,w.jsx)(_,{className:`h-4 w-4`}):(0,w.jsx)(b,{className:`h-4 w-4`})})]}),g.data.expiresAt!=null&&(0,w.jsx)(t,{variant:`body-small-default`,style:{color:`var(--content-tertiary)`},children:k(g.data.expiresAt)})]}):null}),(0,w.jsx)(s.Footer,{children:(0,w.jsx)(o,{variant:`outlined`,onClick:T,children:c(`generateInviteLinkDialog.done`)})})]})})}function j({onClick:e}){let{t}=d();return(0,w.jsx)(o,{variant:`outlined`,size:`compact`,leftIcon:(0,w.jsx)(x,{className:`h-3.5 w-3.5`}),onClick:e,children:t(`shareConnectionLinkButton.label`)})}function M(e){let t=p(),[n,r]=(0,C.useState)(!1);return{isOpen:n,open:(0,C.useCallback)(()=>{r(!0)},[]),close:(0,C.useCallback)(()=>{r(!1),t.invalidateQueries({queryKey:u({path:{assistant_id:e}})})},[t,e])}}export{E as a,O as i,j as n,D as o,A as r,M as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$p as t,Ic as n,Vm as r,Wo as i,em as a,iC as o,kg as s,ny as c,rr as l,ty as u,zm as d}from"./app-BcXqNg4_.js";import{$n as f,E as p,j as m,nr as h}from"./vendor-DwMhK7fD.js";import{t as g,x as _}from"./react-B9IgSVeK.js";var v=e(_(),1),y=g(),b={sm:`h-7 w-7`,md:`h-8 w-8 text-3xl`};function x({external:e=!1,icon:t,iconUrl:n,iconSrc:r,size:a=`sm`,className:o}){let[s,c]=(0,v.useState)(!1),l=r??n;(0,v.useEffect)(()=>{c(!1)},[l]);let u=t||(e?`📦`:`🧩`),d=!!l&&!s;return(0,y.jsx)(`span`,{className:i(`flex shrink-0 items-center justify-center`,b[a],o),children:d?(0,y.jsx)(`img`,{src:l,alt:``,"aria-hidden":!0,loading:`lazy`,className:`h-full w-full object-contain`,onError:()=>c(!0)}):u})}function S(e){return e!==void 0&&e.startsWith(`https://`)}function C(e,t){let n=e.map(e=>({name:e.name,description:e.description??void 0,status:`installed`,external:void 0,version:e.version??void 0,path:e.path,issues:e.issues,enabled:e.enabled,icon:e.icon,hasIcon:e.hasIcon,iconVersion:e.iconVersion})),r=new Set(n.map(e=>e.name)),i=t.filter(e=>!r.has(e.name)).map(e=>({name:e.name,description:e.description,status:`available`,external:!0,path:e.path,...S(e.icon)?{iconUrl:e.icon}:{icon:e.icon}}));return[...n,...i]}function w(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description].some(e=>e?.toLowerCase().includes(n)):!0}function T(e){return[...e].sort((e,t)=>{let n=e.status===`installed`;return n===(t.status===`installed`)?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):n?-1:1})}function E(e,t){switch(t){case`all`:return e;case`available`:return e.filter(e=>e.status===`available`);case`installed`:return e.filter(e=>e.status===`installed`);case`active`:return e.filter(e=>e.status===`installed`&&e.enabled!==!1);case`off`:return e.filter(e=>e.status===`installed`&&e.enabled===!1)}}function D(e){return e?e.slice(0,7):`unknown`}var O=`plugin.uninstall.mcp_oauth_credentials_unchecked`;function k(e,t){for(let n of e??[])o.warning(t(n===O?`pluginToast.mcpOAuthCredentialsUnchecked`:`pluginToast.cleanupWarning`))}function A(e,t){let{t:r}=p(`intelligence`),i=h(),a=d({onSuccess:(a,o)=>{let s=o.path.name;n(i,e,s),t?.onRemoved?.(s),t?.announceWarnings!==!1&&k(a?.warnings,r)},onError:(e,n)=>{t?.onRemoveError?.(n.path.name,e)}}),o=a.mutate;return{remove:(0,v.useCallback)(t=>{o({path:{assistant_id:e,name:t}})},[e,o]),isRemoving:a.isPending,isRemoveError:a.isError}}function j(e,t,i){let{t:a}=p(`intelligence`),s=h(),c=r({onSuccess:()=>{n(s,e,t),i?.onInstalled?.(),i?.announceInstall!==!1&&o.success(a(`pluginToast.installed`,{name:t||a(`pluginToast.pluginFallback`)}))}}),l=A(e,{onRemoved:()=>i?.onRemoved?.()});return{install:()=>{c.mutate({path:{assistant_id:e},body:{name:t}})},installAsync:()=>c.mutateAsync({path:{assistant_id:e},body:{name:t}}),remove:()=>{l.remove(t)},isInstalling:c.isPending,isRemoving:l.isRemoving,isInstallError:c.isError,isRemoveError:l.isRemoveError}}var M=`0.10.5`;function N(){return s(M)}function P(e,t,n,r){let i=N(),{data:a}=f({queryKey:[`pluginIcon`,e,t,r],queryFn:async()=>{let{data:n,error:r}=await u({path:{assistant_id:e,name:t},parseAs:`blob`,throwOnError:!1});if(r||!(n instanceof Blob))throw Error(`Failed to load plugin icon`);return n},enabled:!!(i&&n&&r),staleTime:1/0,retry:!1}),[o,s]=(0,v.useState)(void 0);return(0,v.useEffect)(()=>{if(!a){s(void 0);return}let e=URL.createObjectURL(a);return s(e),()=>{URL.revokeObjectURL(e)}},[a]),o}var F=300*1e3,I=[],L=[],R=`system`;async function z(e,t,n){let r=await c({path:{assistant_id:e},query:{q:void 0,category:t},signal:n,throwOnError:!1});if(r.response?.status===404)return{plugins:[]};if(!r.response?.ok)throw Error(m(`usePluginsList.failureMessage`,{ns:`intelligence`}));return r.data??{plugins:[]}}function B(e,t){let[n,r]=(0,v.useState)({assistantId:e,latched:!1}),i=n.assistantId===e?n.latched:!1;return n.assistantId!==e&&r({assistantId:e,latched:!1}),(0,v.useEffect)(()=>{t&&r(t=>t.assistantId===e&&t.latched?t:{assistantId:e,latched:!0})},[e,t]),i||t}function V(e,n=null,r=!0){let i=n??void 0,o=f({queryKey:t({path:{assistant_id:e},query:{q:void 0,category:i}}),queryFn:({signal:t})=>z(e,i,t),enabled:!!e&&r,staleTime:F}),s=f({...l(e),enabled:!!e&&r&&n!==null}),c=f({...a({path:{assistant_id:e},query:{q:void 0}}),enabled:!!e&&r,staleTime:F}),u=(0,v.useMemo)(()=>{let e=n===null?o.data?.plugins:s.data?.plugins??o.data?.plugins;return new Set((e??I).map(e=>e.name))},[n,s.data?.plugins,o.data?.plugins]),d=(0,v.useMemo)(()=>{let e=o.data?.plugins??I,t=c.data?.matches??L;return T(C(e,(n===null?t:t.filter(e=>(e.category??`system`)===n)).filter(e=>!u.has(e.name))))},[o.data?.plugins,c.data?.matches,n,u]),p=n===null?o.data:s.data,m=B(e,p?.categoryCounts!==void 0),g=B(e,(p?.plugins??I).some(e=>e.enabled!==void 0)),_=h(),y=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(y.current===e||!c.isSuccess)return;let n=p?.plugins;if(!n?.length)return;let r=new Map((c.data?.matches??L).map(e=>[e.name,e.category]));n.some(e=>{let t=r.get(e.name);return t!=null&&t!==`system`&&(e.category??`system`)===`system`})&&(y.current=e,_.invalidateQueries({queryKey:t({path:{assistant_id:e},query:{q:void 0}})}))},[e,c.isSuccess,c.data?.matches,p?.plugins,_]),{items:d,isLoading:o.isLoading,catalogLoading:c.isLoading,isError:o.isError,installedLoaded:o.data!==void 0,isFetching:o.isFetching||c.isFetching,catalogError:c.isError,categorySupported:m,pluginToggleSupported:g,installedCategoryCounts:p?.categoryCounts,installedPlugins:p?.plugins??I,installedTotal:p?.totalCount,catalogMatches:c.data?.matches??L,unfilteredInstalledNames:u}}export{A as a,w as c,j as i,D as l,V as n,k as o,P as r,E as s,R as t,x as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$c as t,Qc as n,_h as r,dS as i,hh as a,pb as o,rl as s,uh as c}from"./app-BcXqNg4_.js";import{E as l}from"./vendor-DwMhK7fD.js";import{_ as u,r as d,t as f,x as p}from"./react-B9IgSVeK.js";import{Yn as m}from"./icons-C0wyat6T.js";var h=f();function g(){let{t:e}=l(`account`);return(0,h.jsx)(m,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`,"aria-label":e(`authWaitSpinner.loading`)})}var _=e(p(),1);function v({to:e}){let t=n(e);return(0,_.useEffect)(()=>{t&&s(e)},[t,e]),t?null:(0,h.jsx)(d,{to:e,replace:!0})}function y(){let[e]=u(),n=a(),s=r(),l=c(),d=e.get(`returnTo`),f=o(d,i.assistant);if(!d)return{kind:`proceed`,returnTo:null};if(s)return{kind:`wait`};if(!n)return{kind:`proceed`,returnTo:f};if(t(f)){if(l===`pending`)return{kind:`wait`};if(l===`disabled`)return{kind:`proceed`,returnTo:f}}return{kind:`redirect`,node:(0,h.jsx)(v,{to:f})}}export{g as n,y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Aa as t,ka as n}from"./app-BcXqNg4_.js";import{x as r}from"./react-B9IgSVeK.js";var i=e(r(),1),a=640;function o(){let{ref:e,size:r}=n(),o=r.w<=0,s=t(o),c=(o?s.w:r.w)>=a,[l,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{c&&u(!1)},[c]),{paneRef:e,hasRoomForList:c,drawerOpen:l,openDrawer:(0,i.useCallback)(()=>u(!0),[]),closeDrawer:(0,i.useCallback)(()=>u(!1),[])}}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{DS as t,Hm as n,TC as r,TS as i,gy as a,h as o,wS as s,yC as c}from"./app-BcXqNg4_.js";import{E as l,Xn as u,j as d,nr as f}from"./vendor-DwMhK7fD.js";import{t as p,x as m}from"./react-B9IgSVeK.js";import{Cr as h,P as g,Pt as _,Ya as v,b as y,ha as b}from"./icons-C0wyat6T.js";var x=v(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),S=e(m(),1),C=p(),w={vellum:x,clawhub:h,skillssh:g,custom:y,"assistant-memory":b};function T(e,t){switch(e){case`vellum`:return`Vellum`;case`clawhub`:return`Clawhub`;case`skillssh`:return`skills.sh`;case`custom`:return t(`skillOriginBadge.custom`);case`assistant-memory`:return t(`skillOriginBadge.assistantMemory`)}}function E({origin:e}){let{t}=l(`intelligence`),n=e in w?{label:T(e,t),icon:w[e]}:{label:e.replace(/-/g,` `),icon:_};return(0,C.jsx)(c,{tone:`neutral`,leftIcon:(0,S.createElement)(n.icon),className:`capitalize`,children:n.label})}function D(e){return e.kind===`installed`||e.kind===`bundled`}function O(e){return e.kind===`catalog`}function k({icon:e,iconColor:t=`var(--content-tertiary)`,title:n,subtitle:i,children:a}){return(0,C.jsx)(r.Root,{children:(0,C.jsxs)(r.Body,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,C.jsx)(e,{className:`mb-3 h-8 w-8`,style:{color:t},"aria-hidden":!0}),(0,C.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:n}),(0,C.jsx)(`p`,{className:`mt-1 max-w-sm text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:i}),a]})})}async function A(e,n,r){let{data:o,error:c,response:l}=await a({path:{assistant_id:e},body:r?{slug:n,version:r}:{slug:n},throwOnError:!1}),u=d(`installSkill.failureMessage`,{ns:`intelligence`});if(i(l,c,u),!l.ok)throw new s(l.status,t(c,l,u));return o??{ok:!0}}function j(e,{onRemoved:t}={}){let r=f(),[i,a]=(0,S.useState)(null),[s,c]=(0,S.useState)(null),[l,d]=(0,S.useState)(null),p=(0,S.useCallback)(()=>{o(r,e)},[e,r]),m=u({mutationFn:t=>A(e,t),onMutate:e=>a(e),onSettled:()=>{a(null),p()}}),h=n({onMutate:e=>c(e.path.id),onSuccess:()=>{t?.()},onSettled:()=>{c(null),p()}}),g=(0,S.useCallback)(e=>{m.mutate(e.slug??e.id)},[m]),_=(0,S.useCallback)(e=>{d(e)},[]),v=(0,S.useCallback)(()=>{l&&(h.mutate({path:{assistant_id:e,id:l.id}}),d(null))},[e,l,h]),y=(0,S.useCallback)(()=>{d(null)},[]);return{handleInstall:g,handleRemove:_,isInstallingSkill:(0,S.useCallback)(e=>i===(e.slug??e.id),[i]),isRemovingSkill:(0,S.useCallback)(e=>s===e.id,[s]),skillPendingRemoval:l,confirmRemove:v,cancelRemove:y}}export{E as a,D as i,k as n,x as o,O as r,j as t};
|
package/dist/assets/{use-skill-detail-files-D8Iih4_O.js → use-skill-detail-files-CZkDMiHE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Wo as t,_C as n,dS as r,lm as i,um as a}from"./app-BcXqNg4_.js";import{$n as o,E as s}from"./vendor-DwMhK7fD.js";import{n as c,t as l,x as u}from"./react-B9IgSVeK.js";import{Ra as d}from"./icons-C0wyat6T.js";var f=l();function p({skill:e,className:i,onNavigate:a}){let{t:o}=s();return e.origin!==`assistant-memory`||!e.sourceConversationId?null:(0,f.jsxs)(c,{to:r.conversation(e.sourceConversationId),onClick:a,className:t(n({tone:`quiet`}),`inline-flex w-fit items-center gap-1 text-body-small-default text-[var(--content-tertiary)]`,i),children:[o(`skillLineageLink.label`),(0,f.jsx)(d,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0})]})}var m=e(u(),1);function h(e,t){return t??e.find(e=>e.name===`SKILL.md`)?.path??null}function g(e,t){let[n,r]=(0,m.useState)(null),s=o({...a({path:{assistant_id:e??``,id:t}}),select:e=>e??null,enabled:!!e}),c=(0,m.useMemo)(()=>s.data?.files??[],[s.data]),l=(0,m.useMemo)(()=>c.find(e=>e.name===`SKILL.md`),[c]),u=h(c,n),d=o({...i({path:{assistant_id:e??``,id:t},query:{path:u??``}}),select:e=>e??null,enabled:!!(e&&u)});return{fileEntries:c,skillMd:l,selectedPath:n,setSelectedPath:r,activePath:u,activeFile:c.find(e=>e.path===u),isFilesLoading:s.isLoading,isFilesPending:s.isPending,fileContent:d.data?.content??null,isBinary:!!d.data?.isBinary,isContentLoading:d.isLoading,isContentPending:d.isPending}}export{p as n,g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Og as e}from"./app-BcXqNg4_.js";var t=`0.10.8`;function n(n){return e(t,n)}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Er as t,
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Er as t,wh as n}from"./app-BcXqNg4_.js";import{x as r}from"./react-B9IgSVeK.js";var i=e(r(),1);function a(e){let r=t();return(0,i.useMemo)(()=>{if(e)return r.find(t=>n(t).includes(e))},[r,e])}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$t as t,Jm as n,Jo as r,Jx as i,Ko as a,LC as o,NC as s,To as c,VC as l,XS as u,Xd as d,Xo as f,Yd as p,Yo as m,Zd as h,Zo as g,_C as _,aC as v,al as y,at as b,cs as x,dS as S,dl as C,ds as w,en as T,fC as E,fS as D,fs as O,hu as k,iC as A,il as j,ls as M,mu as N,nn as P,nt as ee,oC as te,ol as ne,op as re,os as ie,ps as F,qo as ae,rt as oe,sC as se,sl as ce,sp as le,ss as ue,tC as de,tt as I,us as L,xv as fe,ym as pe}from"./app-BcXqNg4_.js";import{$n as R,E as z,nr as me}from"./vendor-DwMhK7fD.js";import{_ as he,n as ge,r as B,t as _e,x as ve}from"./react-B9IgSVeK.js";import{La as ye,fr as V}from"./icons-C0wyat6T.js";import{t as H}from"./detail-card-Bav4AP9u.js";import{t as be}from"./stt-language-picker-modal-BV-QTu7_.js";import{t as xe}from"./use-hotkey-recorder-CoPbiIMN.js";var U=e(ve(),1),W=_e();function G({label:e,selected:t,recording:n=!1,onClick:r}){return(0,W.jsxs)(`button`,{type:`button`,onClick:r,className:[`inline-flex items-center gap-2 rounded-lg border px-3 py-1.5 text-body-medium-lighter transition-colors`,`border-[var(--border-subtle)]`,t?`bg-[var(--surface-active)]`:`bg-[var(--surface-lift)] hover:bg-[var(--surface-hover)]`,n?`animate-pulse`:``].filter(Boolean).join(` `),children:[(0,W.jsx)(`span`,{className:[`inline-block h-2.5 w-2.5 rounded-full border`,t?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)]`].join(` `)}),(0,W.jsx)(`span`,{className:`text-[var(--content-default)]`,children:e})]})}function Se(){let{t:e}=z(`settings`),{available:t,currentCode:n,configuredProviderId:r,selectLanguage:i,selecting:a}=oe(I()),[s,c]=(0,U.useState)(!1);return t?(0,W.jsxs)(H,{title:e(`listeningLanguageCard.title`),subtitle:e(`listeningLanguageCard.subtitle`),children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsx)(`span`,{className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`,children:b(n,r)}),(0,W.jsx)(o,{variant:`outlined`,onClick:()=>c(!0),className:`shrink-0`,children:e(`listeningLanguageCard.change`)})]}),(0,W.jsx)(be,{open:s,onOpenChange:c,title:e(`listeningLanguageCard.title`),currentCode:n,configuredProviderId:r,selectLanguage:i,selecting:a})]}):null}var K=`flux`;function Ce(e){return e===`vellum`}function we(e,t){let n=e?.trim().toLowerCase();return!n||n===`multi`||t===void 0?!0:t.includes(n.split(`-`)[0]??n)}function Te(){let{t:e}=z(`settings`),t=me(),r=n(),i=I(),[a,o]=(0,U.useState)(!1),{data:s}=R({...re({path:{assistant_id:i}}),enabled:r,staleTime:3e4}),c=s?.services?.stt,{data:l}=R({...pe({path:{assistant_id:i}}),enabled:r,staleTime:5*6e4}),u=c?.roles?.liveVoice?.provider??c?.provider,d=l?.providers?.find(e=>e.id===u),f=d?.modelFamilies?.includes(K)??!1;if(!u||!f)return null;let p=we(c?.language,d?.turnDetectionLanguages),m=c?.roles?.liveVoice,h=m?m.model:c?.providers?.[u]?.model,g=h===void 0?Ce(u)&&p:h===K,_=async n=>{o(!0);try{let{response:e}=await fe({path:{assistant_id:i},body:{services:{stt:{roles:{liveVoice:{provider:u,model:n?K:d?.baseModelFamily}}}}},throwOnError:!1});if(!e?.ok)throw Error(String(e?.status??``));await t.invalidateQueries({queryKey:le({path:{assistant_id:i}})})}catch{A.error(e(`voicePage.turnDetectionFailed`))}finally{o(!1)}};return(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e(`voicePage.turnDetectionLabel`)}),(0,W.jsx)(`p`,{className:`text-body-small-lighter text-[var(--content-tertiary)]`,children:e(p?`voicePage.turnDetectionDescription`:`voicePage.turnDetectionLanguageUnsupported`)}),(0,W.jsx)(E,{checked:g,disabled:a||!p&&!g,onChange:e=>void _(e),"aria-label":e(`voicePage.turnDetectionLabel`)})]})}var q=`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,J=`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--system-negative-strong)]`,Ee=2;function Y(e){let t=[];return e.ctrlKey&&t.push(`control`),e.altKey&&t.push(`option`),e.shiftKey&&t.push(`shift`),e.metaKey&&t.push(`command`),F(t)}function De(){let{t:e}=z(`settings`),t=x(),n=a(e=>e.registered)===!1,[r,i]=(0,U.useState)(null),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)([]),[f,m]=(0,U.useState)(!1),g=(0,U.useRef)(null),_=(0,U.useCallback)(async()=>{i((await p())?.inputMonitoring.status??null)},[]);(0,U.useEffect)(()=>{_();let e=setInterval(()=>{_()},2e3);return()=>{clearInterval(e)}},[_]);let v=(0,U.useCallback)(()=>{h(`inputMonitoring`).then(_)},[_]),y=(0,U.useCallback)(()=>{d(`inputMonitoring`).then(_)},[_]),b=(0,U.useCallback)(e=>{M(e),c(!1),u([]),m(!1),e.kind!==`off`&&v()},[v]),S=(0,U.useCallback)(()=>{c(!0),u([]),m(!1),requestAnimationFrame(()=>{g.current?.focus()})},[]),C=(0,U.useCallback)(()=>{c(!1),u([]),m(!1)},[]),w=(0,U.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){C();return}u(Y(e))},[C]),T=(0,U.useCallback)(e=>{if(s&&!(Y(e).length>0)){if(l.length>=Ee){b({kind:`modifierOnly`,modifiers:l});return}u([]),m(!0)}},[b,l,s]);(0,U.useEffect)(()=>{if(!s)return;let e=e=>{g.current&&!g.current.contains(e.target)&&C()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[C,s]);let E=ue(t),D=t.kind===`modifierOnly`&&!E,k=t.kind!==`off`,A=t.kind===`modifierOnly`&&t.modifiers.includes(`control`)&&t.modifiers.includes(`option`),j=r===`granted`;return(0,W.jsx)(H,{title:e(`voiceKeyCard.title`),subtitle:e(`voiceKeyCard.subtitle`),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{ref:g,tabIndex:s?0:-1,onKeyDown:s?w:void 0,onKeyUp:s?T:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[(0,W.jsx)(G,{label:e(`voiceKeyCard.fnLabel`),selected:E,onClick:()=>b(ie)}),s?(0,W.jsx)(G,{label:l.length>0?O(l):e(`voiceKeyCard.recordingPrompt`),selected:!0,recording:!0,onClick:C}):(0,W.jsx)(G,{label:t.kind===`modifierOnly`&&!E?O(t.modifiers):e(`voiceKeyCard.customLabel`),selected:D,onClick:S}),(0,W.jsx)(G,{label:e(`voiceKeyCard.offLabel`),selected:!k,onClick:()=>b({kind:`off`})})]}),f&&(0,W.jsxs)(`div`,{className:q,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voiceKeyCard.customHint`)})]}),k&&r!==null&&!j&&(0,W.jsxs)(`div`,{className:`flex flex-col items-start gap-2 pt-1`,children:[(0,W.jsxs)(`div`,{className:J,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voiceKeyCard.needsInputMonitoring`)})]}),(0,W.jsx)(o,{variant:`outlined`,onClick:y,children:e(`voiceKeyCard.allowInputMonitoring`)})]}),k&&j&&n&&(0,W.jsxs)(`div`,{className:J,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voiceKeyCard.refusedNote`)})]}),E&&(0,W.jsxs)(`div`,{className:q,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voiceKeyCard.fnDictationNote`)})]}),A&&(0,W.jsxs)(`div`,{className:q,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voiceKeyCard.voiceOverNote`)})]})]})})}function Oe({assistantId:e,open:t,onOpenChange:n}){return(0,W.jsx)(v.Root,{open:t,onOpenChange:n,children:(0,W.jsx)(v.Content,{size:`md`,children:(0,W.jsx)(ke,{assistantId:e,onDone:()=>n(!1)})})})}function ke({assistantId:e,onDone:t}){let{t:n}=z(),{available:r,currentModel:i,selectModel:a,selecting:s}=c(e);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(v.Header,{children:[(0,W.jsx)(v.Title,{children:n(`voicePickerModal.title`)}),r&&(0,W.jsx)(v.Description,{children:`Uses Vellum credits, through providers like ElevenLabs and Deepgram.`})]}),(0,W.jsx)(v.Body,{children:(0,W.jsx)(T,{assistantId:e,filterBySource:!0,value:i,onChange:a,autoScrollToSelected:!0})}),(0,W.jsxs)(v.Footer,{className:`items-center justify-between gap-3`,children:[(0,W.jsx)(ee,{}),(0,W.jsx)(o,{variant:`primary`,onClick:t,disabled:s,className:`shrink-0`,children:n(`voicePickerModal.done`)})]})]})}function Ae(){let{t:e}=z(`settings`),n=I(),{available:r,settled:a,voices:s,currentModel:l}=c(n),d=s.find(e=>e.model===l)??s[0],[f,p]=(0,U.useState)(!1),m=i.use.name(),h=m?e(`voicePickerCard.titleWithName`,{name:m}):e(`voicePickerCard.title`);return a?r&&d?(0,W.jsxs)(H,{title:h,subtitle:e(`voicePickerCard.creditsNote`),children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsx)(t,{description:d.description,className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`}),(0,W.jsx)(o,{variant:`outlined`,onClick:()=>p(!0),className:`shrink-0`,children:e(`voicePickerCard.changeButton`)})]}),(0,W.jsx)(Oe,{assistantId:n,open:f,onOpenChange:p})]}):(0,W.jsx)(H,{title:h,children:(0,W.jsx)(P,{})}):(0,W.jsx)(H,{title:h,children:(0,W.jsx)(u,{as:`span`,role:`status`,"aria-label":e(`voicePickerCard.loadingAria`),className:`block h-9 w-48`})})}var je=[{prefKey:`showUserTranscript`,label:`Show the words you say`,description:`Live transcription while you speak.`},{prefKey:`showAssistantTranscript`,label:`Show the words the assistant says`,description:`Text alongside the spoken response.`}],Me=`We recommend keeping both off to start. It feels more like a real conversation.`;function Ne(){let{t:e}=z();return(0,W.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:e(`voiceTranscriptToggles.recommendedOff`)})}function Pe({label:e,description:t,showBadge:n,checked:r,onChange:i}){return(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-1`,children:[(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`truncate text-body-medium-lighter text-[var(--content-default)]`,children:e}),n?(0,W.jsx)(Ne,{}):null]}),t?(0,W.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:t}):null]}),(0,W.jsx)(E,{checked:r,onChange:i,"aria-label":e})]})}function Fe({showDescription:e=!1,showRecommendedBadge:t=!1}){let{t:n}=z(),r=k.use.showUserTranscript(),i=k.use.showAssistantTranscript(),a=k.use.setShowUserTranscript(),o=k.use.setShowAssistantTranscript(),s={showUserTranscript:{checked:r,onChange:a},showAssistantTranscript:{checked:i,onChange:o}},c=(e,t)=>n(e===`showUserTranscript`?`voiceTranscriptToggles.userTranscriptLabel`:`voiceTranscriptToggles.assistantTranscriptLabel`,t),l=(e,t)=>n(e===`showUserTranscript`?`voiceTranscriptToggles.userTranscriptDescription`:`voiceTranscriptToggles.assistantTranscriptDescription`,t);return(0,W.jsx)(W.Fragment,{children:je.map(n=>{let r=s[n.prefKey];return(0,W.jsx)(Pe,{label:c(n.prefKey,n.label),description:e?l(n.prefKey,n.description):void 0,showBadge:t,checked:r.checked,onChange:r.onChange},n.prefKey)})})}var X=`text-body-small-default text-[var(--content-tertiary)]`;function Ie(){let[e]=he(),t=e.get(`tab`);return t===`sounds`?(0,W.jsx)(B,{replace:!0,to:S.settings.sounds}):t===`services`?(0,W.jsx)(B,{replace:!0,to:S.settings.ai}):(0,W.jsx)(Le,{})}function Le(){let{t:e}=z(`settings`);return(0,W.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,W.jsxs)(Z,{heading:e(`voicePage.sectionOutputHeading`),description:e(`voicePage.sectionOutputDescription`),children:[(0,W.jsx)(Ae,{}),(0,W.jsx)(Re,{})]}),(0,W.jsxs)(Z,{heading:e(`voicePage.sectionInputHeading`),description:e(`voicePage.sectionInputDescription`),children:[(0,W.jsx)(Be,{}),(0,W.jsx)(Se,{}),C()?(0,W.jsx)(De,{}):(0,W.jsx)(Ue,{}),(0,W.jsx)(We,{})]}),(0,W.jsx)(Z,{heading:e(`voicePage.sectionCaptionsHeading`),children:(0,W.jsx)(ze,{})})]})}function Re(){let{t:e}=z(`settings`),{available:t}=c(I());return t?(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-1 text-body-small-lighter text-[var(--content-tertiary)]`,children:[(0,W.jsx)(V,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-quiet)]`}),(0,W.jsx)(`span`,{children:e(`voicePage.speechServicesBannerPrompt`)}),(0,W.jsxs)(ge,{to:`${S.settings.ai}#text-to-speech`,className:l(_({tone:`quiet`}),`inline-flex items-center gap-1 text-[var(--content-secondary)] decoration-[var(--border-element)] underline-offset-2`),children:[e(`voicePage.speechServicesBannerLink`),(0,W.jsx)(ye,{className:`h-3 w-3`})]})]}):null}function Z({heading:e,description:t,children:n}){return(0,W.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h2`,{className:`text-label-medium-default uppercase tracking-wide text-[var(--content-tertiary)]`,children:e}),t&&(0,W.jsx)(`p`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:t})]}),n]})}function ze(){let{t:e}=z(`settings`);return(0,W.jsx)(H,{title:e(`voicePage.captionsTitle`),subtitle:e(`voicePage.captionsSubtitle`),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsx)(Fe,{showDescription:!0}),(0,W.jsx)(`p`,{className:`${X} pt-1`,children:e(`voicePage.captionsRecommendation`,Me)})]})})}var Q=``;function Be(){let{t:e}=z(`settings`),[t,n]=(0,U.useState)([]),[r,i]=(0,U.useState)(!1),[a,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(()=>j()),u=(0,U.useCallback)(async()=>{if(!navigator.mediaDevices?.enumerateDevices)return;let e=await y();i(e.needsPermission),n(e.devices),s(e.known)},[]),d=(0,U.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});for(let t of e.getTracks())t.stop()}catch{}u()},[u]);(0,U.useEffect)(()=>{u();let e=navigator.mediaDevices;if(!e?.addEventListener)return;let t=()=>void u();return e.addEventListener(`devicechange`,t),()=>e.removeEventListener(`devicechange`,t)},[u]);let f=(0,U.useMemo)(()=>{let n=t.map((t,n)=>({value:t.deviceId,label:t.label||e(`voicePage.microphoneFallbackLabel`,{index:n+1})})),r=c!==Q&&!n.some(e=>e.value===c);return[{value:null,label:e(`voicePage.systemDefault`)},...n,...r?[{value:c,label:e(a?`voicePage.savedMicrophoneNotConnected`:`voicePage.savedMicrophone`)}]:[]]},[t,c,a,e]),p=(0,U.useCallback)(e=>{l(e),ne(e)},[]);(0,U.useEffect)(()=>ce(()=>{l(j())}),[]);let m=c===Q?null:c;return(0,W.jsx)(H,{title:e(`voicePage.microphoneTitle`),subtitle:e(`voicePage.microphoneSubtitle`),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,W.jsx)(`div`,{className:`max-w-xs`,children:(0,W.jsx)(de,{options:f,value:m,onChange:p,onSelectNone:()=>p(Q),"aria-label":e(`voicePage.microphoneAriaLabel`)})}),r&&(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(o,{variant:`outlined`,onClick:d,children:e(`voicePage.allowMicrophoneAccess`)}),(0,W.jsx)(`span`,{className:X,children:e(`voicePage.grantMicrophoneAccessHint`)})]})]})})}var Ve=new Set([`Control`,`Alt`,`Shift`,`Meta`]),$=`toggleVoice`,He=[{label:`Ctrl+Shift`,activator:{kind:`modifierOnly`,modifiers:[`control`,`shift`]}},{label:`Alt`,activator:{kind:`modifierOnly`,modifiers:[`option`]}}];function Ue(){let{t:e}=z(`settings`),t=D(),[n,i]=(0,U.useState)(()=>m()),[a,o]=(0,U.useState)(!1),[c,l]=(0,U.useState)([]),[u,d]=(0,U.useState)(!1),p=(0,U.useRef)(null),h=(0,U.useMemo)(()=>{let e=r();return[{label:L(e),activator:e}]},[]),_=n.kind!==`off`,v=(0,U.useCallback)(e=>{i(e),g(e),o(!1),l([]),d(!1)},[]),y=xe({onBound:()=>v({kind:`off`})}),b=y.catalog.find(e=>e.key===$)?.accelerator??``,x=y.recordingKey===$,S=f()?He:[],C=(0,U.useCallback)(e=>{v(e),y.removeHotkey($)},[y,v]),T=(0,U.useCallback)(()=>{v({kind:`off`}),y.removeHotkey($)},[y,v]),k=(0,U.useCallback)(()=>{o(!0),l([]),d(!1),requestAnimationFrame(()=>{p.current?.focus()})},[]),A=(0,U.useCallback)(()=>{o(!1),l([]),d(!1)},[]),j=(0,U.useCallback)(e=>{let t=[];return e.ctrlKey&&t.push(`control`),e.altKey&&t.push(`option`),e.shiftKey&&t.push(`shift`),e.metaKey&&t.push(`command`),t},[]),M=(0,U.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){A();return}let t=j(e);if(Ve.has(e.key)){d(!1),l(F(t));return}if(t.length===0){d(!0);return}v({kind:`key`,label:e.key.length===1?e.key.toUpperCase():e.key,modifiers:F(t)})},[A,j,v]),N=(0,U.useCallback)(e=>{a&&j(e).length===0&&c.length>0&&(l([]),d(!0))},[j,a,c]);(0,U.useEffect)(()=>{if(!a)return;let e=e=>{p.current&&!p.current.contains(e.target)&&A()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[A,a]);let P=_&&!h.some(e=>w(e.activator,n));return t?(0,W.jsx)(H,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitleDesktop`),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[S.map(e=>(0,W.jsx)(G,{label:e.label,selected:w(e.activator,n),onClick:()=>C(e.activator)},e.label)),(0,W.jsx)(G,{label:x?e(`voicePage.recordingPrompt`):b?(0,W.jsx)(s,{accelerator:b}):e(`voicePage.customKey`),selected:b!==``,recording:x,onClick:x?y.stopRecording:()=>y.startRecording($)}),(0,W.jsx)(G,{label:e(`voicePage.offKeyLabel`),selected:n.kind===`off`&&!b&&!x,onClick:T})]}),y.conflict?.key===$&&(0,W.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voicePage.shortcutConflict`,{command:y.conflict.label})})]})]})}):(0,W.jsx)(H,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitle`),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,W.jsx)(E,{checked:_,onChange:e=>{v(e?ae():{kind:`off`})},label:e(`voicePage.enableVoiceShortcut`)}),_&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsx)(`span`,{className:X,children:e(`voicePage.activationKeyLabel`)}),(0,W.jsxs)(`div`,{ref:p,tabIndex:a?0:-1,onKeyDown:a?M:void 0,onKeyUp:a?N:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[h.map(e=>(0,W.jsx)(G,{label:e.label,selected:w(e.activator,n),onClick:()=>v(e.activator)},e.label)),a?(0,W.jsx)(G,{label:c.length>0?O(c):e(`voicePage.pressShortcut`),selected:!0,recording:!0,onClick:A}):(0,W.jsx)(G,{label:P?L(n):e(`voicePage.customKey`),selected:P,onClick:k})]}),u&&(0,W.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voicePage.shortcutChordHint`)})]}),_&&(0,W.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,children:[(0,W.jsx)(V,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,W.jsx)(`span`,{children:e(`voicePage.focusedTabNote`)})]})]})]})})}function We(){let{t:e}=z(`settings`),t=k.use.pauseBeforeReplyMs(),n=k.use.setPauseBeforeReplyMs(),r=k.use.interruptSensitivity(),i=k.use.setInterruptSensitivity(),a=(0,U.useMemo)(()=>[{value:`low`,label:e(`voicePage.interruptSensitivityLow`)},{value:`medium`,label:e(`voicePage.interruptSensitivityMedium`)},{value:`high`,label:e(`voicePage.interruptSensitivityHigh`)}],[e]),s=t!==null||r!==null;return(0,W.jsx)(H,{title:e(`voicePage.turnTakingTitle`),subtitle:e(`voicePage.turnTakingSubtitle`),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,W.jsx)(Te,{}),(0,W.jsx)(Ge,{label:e(`voicePage.pauseBeforeReplyLabel`),description:e(`voicePage.pauseBeforeReplyDescription`),isDefault:t===null,children:(0,W.jsx)(`div`,{className:`max-w-xs`,children:(0,W.jsx)(te,{value:(t??1200)/1e3,onValueChange:e=>{typeof e==`number`&&n(Math.round(e*1e3))},min:500/1e3,max:N/1e3,step:.1,showValue:!0,formatValue:e=>`${(typeof e==`number`?e:e[0]).toFixed(1)}s`,"aria-label":e(`voicePage.pauseBeforeReplyAriaLabel`)})})}),(0,W.jsx)(Ge,{label:e(`voicePage.interruptSensitivityLabel`),description:e(`voicePage.interruptSensitivityDescription`),isDefault:r===null,children:(0,W.jsx)(`div`,{className:`max-w-xs`,children:(0,W.jsx)(se,{items:a,value:r??`medium`,onChange:i,ariaLabel:e(`voicePage.interruptSensitivityAriaLabel`)})})}),s&&(0,W.jsx)(`div`,{children:(0,W.jsx)(o,{variant:`outlined`,onClick:()=>{n(null),i(null)},children:e(`voicePage.resetToDefaults`)})})]})})}function Ge({label:e,description:t,isDefault:n,children:r}){let{t:i}=z(`settings`);return(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e}),n&&(0,W.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:i(`voicePage.defaultBadge`)})]}),(0,W.jsx)(`p`,{className:X,children:t}),r]})}export{Ie as VoicePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Mn as e,Zn as t,jn as n}from"./app-
|
|
1
|
+
import{Mn as e,Zn as t,jn as n}from"./app-BcXqNg4_.js";import{E as r}from"./vendor-DwMhK7fD.js";import{t as i}from"./react-B9IgSVeK.js";import{$ as a}from"./icons-C0wyat6T.js";var o=i();function s({payload:n,onClose:i}){let{t:s}=r(`chat`),u=e(n.body);return(0,o.jsx)(t,{Glyph:a,title:n.title||s(`wakeDetailPanel.title`),closeLabel:s(`wakeDetailPanel.closeAria`),closeVariant:`outlined`,onClose:i,children:(0,o.jsxs)(`dl`,{className:`flex flex-col gap-5`,children:[u.workflow&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.workflow`),children:u.workflow}),u.runStatus&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.runStatus`),children:(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:u.runStatus})}),u.result&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.result`),children:(0,o.jsx)(c,{result:u.result})}),u.rest&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.details`),children:(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:u.rest})}),n.metadata.length>0&&(0,o.jsx)(`div`,{className:`flex flex-col gap-5`,children:n.metadata.map(e=>(0,o.jsx)(l,{label:e.label,children:e.value},e.label))})]})})}function c({result:e}){let t=n(e);return t?(0,o.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map((e,t)=>(0,o.jsx)(`div`,{className:t>0?`flex flex-col gap-2 border-t border-[var(--border-hover)] pt-4`:`flex flex-col gap-2`,children:e.map(e=>(0,o.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,o.jsx)(`span`,{className:`text-label-medium-default text-[var(--content-tertiary)]`,children:e.key}),(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e.value})]},e.key))},t))}):(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e})}function l({label:e,children:t}){return(0,o.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,o.jsx)(`dt`,{className:`text-label-medium-default text-[var(--content-tertiary)]`,children:e}),(0,o.jsx)(`dd`,{className:`text-body-medium-default text-[var(--content-default)]`,children:t})]})}export{s as WakeDetailPanel};
|
package/dist/assets/{weather-forecast-display-CTH6IuYs.js → weather-forecast-display-1oy5xgMD.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Uo as t,an as n,cn as r,on as i,sn as a}from"./app-QAMKu5su.js";import{E as o}from"./vendor-DwMhK7fD.js";import{t as s,x as c}from"./react-B9IgSVeK.js";import{Ci as l,Si as u,V as d,_i as f,bi as p,c as m,ni as h,tt as g,vi as _,vn as v,xi as y}from"./icons-C0wyat6T.js";var b=e(c(),1),x={"sun.max.fill":{icon:d,className:`text-orange-500`},"cloud.sun.fill":{icon:_,className:`text-amber-400`},"moon.fill":{icon:v,className:`text-blue-400`},"cloud.moon.fill":{icon:y,className:`text-blue-400`},"cloud.fill":{icon:f,className:`text-stone-400`},"cloud.rain.fill":{icon:p,className:`text-blue-400`},snowflake:{icon:g,className:`text-blue-300`},"cloud.bolt.fill":{icon:u,className:`text-orange-500`},"cloud.fog.fill":{icon:l,className:`text-stone-400`}},S={sunny:{icon:d,className:`text-orange-500`},clear:{icon:d,className:`text-orange-500`},"partly cloudy":{icon:_,className:`text-amber-400`},"mostly sunny":{icon:_,className:`text-amber-400`},cloudy:{icon:f,className:`text-stone-400`},overcast:{icon:f,className:`text-stone-400`},rainy:{icon:p,className:`text-blue-400`},rain:{icon:p,className:`text-blue-400`},drizzle:{icon:p,className:`text-blue-400`},snow:{icon:g,className:`text-blue-300`},snowy:{icon:g,className:`text-blue-300`},thunderstorm:{icon:u,className:`text-orange-500`},thunder:{icon:u,className:`text-orange-500`},foggy:{icon:l,className:`text-stone-400`},fog:{icon:l,className:`text-stone-400`},mist:{icon:l,className:`text-stone-400`},hazy:{icon:l,className:`text-stone-400`},night:{icon:v,className:`text-blue-400`},"mainly clear":{icon:d,className:`text-orange-500`},"mostly cloudy":{icon:f,className:`text-stone-400`},breezy:{icon:m,className:`text-stone-400`},windy:{icon:m,className:`text-stone-400`},cool:{icon:f,className:`text-stone-400`},warm:{icon:d,className:`text-orange-500`},hot:{icon:d,className:`text-orange-500`},cold:{icon:g,className:`text-blue-300`},"cold snap":{icon:g,className:`text-blue-300`},"warm, mostly sunny":{icon:_,className:`text-amber-400`},"cooler, breezy":{icon:m,className:`text-stone-400`}},C={icon:f,className:`text-stone-400`};function w(e){let t=x[e];if(t)return t;let n=e.toLowerCase(),r=S[n];if(r)return r;for(let[e,t]of Object.entries(S))if(n.includes(e))return t;return C}function T(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function E(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=a(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let o=a(e.current),s=i(o?.temp)??i(e.currentTemp)??i(e.temperature)??i(e.temp),c=i(o?.feelsLike)??i(o?.feels_like)??i(o?.apparentTemperature)??i(e.feelsLike)??i(e.feels_like)??i(e.apparentTemperature),l=r(o?.condition)??r(e.condition),u=i(o?.humidity)??i(e.humidity),d=T(o?.wind??e.wind),f=i(o?.windSpeed)??i(o?.wind_speed)??i(e.windSpeed)??i(e.wind_speed)??d.speed,p=r(o?.windDirection)??r(o?.wind_direction)??r(e.windDirection)??r(e.wind_direction)??d.direction,m=a(e.units),h=r(m?.temperature)??r(o?.unit)??r(e.unit)??`F`,g=r(m?.speed)??r(e.windUnit)??r(e.wind_unit),_=n(e.hourly).map((e,t)=>({id:r(e.id)??String(t),time:r(e.time)??``,icon:r(e.icon)??r(e.condition)??`cloud.fill`,temp:i(e.tempC)??i(e.temp)??i(e.temperature),tempC:i(e.tempC)})),v=n([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:r(e.id)??String(t),day:r(e.day)??r(e.date),dayLabel:r(e.dayLabel)??r(e.date),icon:r(e.icon)??r(e.condition)??`cloud.fill`,low:i(e.low),high:i(e.high),lowC:i(e.lowC),highC:i(e.highC),precip:i(e.precip)??i(e.precipitation)??i(e.precipitationProbability),condition:r(e.condition)}));return{location:t,currentTemp:s,feelsLike:c,condition:l,humidity:u,windSpeed:f,windDirection:p,windUnit:g,unit:h,hourly:_.length>0?_:void 0,forecast:v.length>0?v:void 0}}function D(e){return e*9/5+32}function O(e){return(e-32)*5/9}function k(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=O(e)),!t&&n&&(r=D(e)),`${Math.round(r)}`}function A(e,t,n){return e.tempC===void 0?e.temp===void 0?null:k(e.temp,t,n):k(e.tempC,!1,n)}function j(e,t,n){return e.lowC===void 0?k(e.low,t,n):k(e.lowC,!1,n)}function M(e,t,n){return e.highC===void 0?k(e.high,t,n):k(e.highC,!1,n)}var N=s();function P({icon:e,size:t=20}){let{icon:n,className:r}=w(e);return(0,N.jsx)(n,{width:t,height:t,className:r})}function F({useFahrenheit:e,onToggle:n}){let{t:r}=o(`chat`);return(0,N.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:t(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`),children:r(`weatherForecastDisplay.fahrenheit`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:t(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`),children:r(`weatherForecastDisplay.celsius`)})]})}function I({data:e,sourceIsFahrenheit:t,useFahrenheit:n,onToggle:r}){let{t:i}=o(`chat`),a=e.location,s=k(e.currentTemp,t,n),c=k(e.feelsLike,t,n),l=n?`F`:`C`,u=e.forecast?.[0],d=u?M(u,t,n):null,f=u?j(u,t,n):null,p=null;return e.windSpeed!==void 0&&(p=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(p=`${e.windDirection} ${p}`)),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:a}),s!==null&&(0,N.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[s,`°`,l]}),e.condition&&(0,N.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,N.jsx)(F,{useFahrenheit:n,onToggle:r})]}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[c!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:i(`weatherForecastDisplay.feelsLike`,{temp:c})}),d!==null&&f!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:i(`weatherForecastDisplay.highLow`,{high:d,low:f})}),p&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(m,{width:12,height:12}),p]}),e.humidity!==void 0&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(h,{width:12,height:12}),e.humidity,`%`]})]})]})}function L({hourly:e,sourceIsFahrenheit:t,useFahrenheit:n}){let{t:r}=o(`chat`);return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,i)=>{let a=e.time.toLowerCase()===`now`,o=A(e,t,n);return(0,N.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,N.jsx)(`span`,{className:a?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:a?r(`weatherForecastDisplay.now`):e.time}),(0,N.jsx)(P,{icon:e.icon,size:18}),o!==null&&(0,N.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[o,`°`]})]},e.id??i)})})})}function R({forecast:e,currentTemp:n,sourceIsFahrenheit:r,useFahrenheit:i}){let{globalMin:a,globalMax:o}=(0,b.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),s=o-a||1;return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,c)=>{let l=e.dayLabel??e.day??`Day ${c+1}`,u=l.toLowerCase()===`today`,d=j(e,r,i),f=M(e,r,i),p=e.precip,m=e.lowC??e.low??a,h=e.highC??e.high??o,g=(m-a)/s*100,_=(h-a)/s*100,v=Math.max(_-g,2),y=null;if(u&&n!==void 0){let t=(e.lowC!==void 0||e.highC!==void 0)&&r?(n-32)*5/9:n;y=h===m?50:(Math.max(m,Math.min(h,t))-m)/(h-m)*100}return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:t(`w-12 shrink-0 truncate text-body-small-default`,u?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`),children:l}),(0,N.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,N.jsx)(P,{icon:e.icon,size:16}),p!==void 0&&p>0&&(0,N.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(p),`%`]})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:d===null?`--`:`${d}°`}),(0,N.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,N.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${g}%`,width:`${v}%`}}),y!==null&&(0,N.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${g+y/100*v}%`}})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:f===null?`--`:`${f}°`})]},e.id??c)})})})}function z({templateData:e,fallback:t}){let n=(0,b.useMemo)(()=>E(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,b.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,N.jsxs)(`div`,{className:`mt-3`,children:[(0,N.jsx)(I,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,N.jsx)(L,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,N.jsx)(R,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{z as WeatherForecastDisplay};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Wo as t,an as n,cn as r,on as i,sn as a}from"./app-BcXqNg4_.js";import{E as o}from"./vendor-DwMhK7fD.js";import{t as s,x as c}from"./react-B9IgSVeK.js";import{Ci as l,Si as u,V as d,_i as f,bi as p,c as m,ni as h,tt as g,vi as _,vn as v,xi as y}from"./icons-C0wyat6T.js";var b=e(c(),1),x={"sun.max.fill":{icon:d,className:`text-orange-500`},"cloud.sun.fill":{icon:_,className:`text-amber-400`},"moon.fill":{icon:v,className:`text-blue-400`},"cloud.moon.fill":{icon:y,className:`text-blue-400`},"cloud.fill":{icon:f,className:`text-stone-400`},"cloud.rain.fill":{icon:p,className:`text-blue-400`},snowflake:{icon:g,className:`text-blue-300`},"cloud.bolt.fill":{icon:u,className:`text-orange-500`},"cloud.fog.fill":{icon:l,className:`text-stone-400`}},S={sunny:{icon:d,className:`text-orange-500`},clear:{icon:d,className:`text-orange-500`},"partly cloudy":{icon:_,className:`text-amber-400`},"mostly sunny":{icon:_,className:`text-amber-400`},cloudy:{icon:f,className:`text-stone-400`},overcast:{icon:f,className:`text-stone-400`},rainy:{icon:p,className:`text-blue-400`},rain:{icon:p,className:`text-blue-400`},drizzle:{icon:p,className:`text-blue-400`},snow:{icon:g,className:`text-blue-300`},snowy:{icon:g,className:`text-blue-300`},thunderstorm:{icon:u,className:`text-orange-500`},thunder:{icon:u,className:`text-orange-500`},foggy:{icon:l,className:`text-stone-400`},fog:{icon:l,className:`text-stone-400`},mist:{icon:l,className:`text-stone-400`},hazy:{icon:l,className:`text-stone-400`},night:{icon:v,className:`text-blue-400`},"mainly clear":{icon:d,className:`text-orange-500`},"mostly cloudy":{icon:f,className:`text-stone-400`},breezy:{icon:m,className:`text-stone-400`},windy:{icon:m,className:`text-stone-400`},cool:{icon:f,className:`text-stone-400`},warm:{icon:d,className:`text-orange-500`},hot:{icon:d,className:`text-orange-500`},cold:{icon:g,className:`text-blue-300`},"cold snap":{icon:g,className:`text-blue-300`},"warm, mostly sunny":{icon:_,className:`text-amber-400`},"cooler, breezy":{icon:m,className:`text-stone-400`}},C={icon:f,className:`text-stone-400`};function w(e){let t=x[e];if(t)return t;let n=e.toLowerCase(),r=S[n];if(r)return r;for(let[e,t]of Object.entries(S))if(n.includes(e))return t;return C}function T(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function E(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=a(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let o=a(e.current),s=i(o?.temp)??i(e.currentTemp)??i(e.temperature)??i(e.temp),c=i(o?.feelsLike)??i(o?.feels_like)??i(o?.apparentTemperature)??i(e.feelsLike)??i(e.feels_like)??i(e.apparentTemperature),l=r(o?.condition)??r(e.condition),u=i(o?.humidity)??i(e.humidity),d=T(o?.wind??e.wind),f=i(o?.windSpeed)??i(o?.wind_speed)??i(e.windSpeed)??i(e.wind_speed)??d.speed,p=r(o?.windDirection)??r(o?.wind_direction)??r(e.windDirection)??r(e.wind_direction)??d.direction,m=a(e.units),h=r(m?.temperature)??r(o?.unit)??r(e.unit)??`F`,g=r(m?.speed)??r(e.windUnit)??r(e.wind_unit),_=n(e.hourly).map((e,t)=>({id:r(e.id)??String(t),time:r(e.time)??``,icon:r(e.icon)??r(e.condition)??`cloud.fill`,temp:i(e.tempC)??i(e.temp)??i(e.temperature),tempC:i(e.tempC)})),v=n([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:r(e.id)??String(t),day:r(e.day)??r(e.date),dayLabel:r(e.dayLabel)??r(e.date),icon:r(e.icon)??r(e.condition)??`cloud.fill`,low:i(e.low),high:i(e.high),lowC:i(e.lowC),highC:i(e.highC),precip:i(e.precip)??i(e.precipitation)??i(e.precipitationProbability),condition:r(e.condition)}));return{location:t,currentTemp:s,feelsLike:c,condition:l,humidity:u,windSpeed:f,windDirection:p,windUnit:g,unit:h,hourly:_.length>0?_:void 0,forecast:v.length>0?v:void 0}}function D(e){return e*9/5+32}function O(e){return(e-32)*5/9}function k(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=O(e)),!t&&n&&(r=D(e)),`${Math.round(r)}`}function A(e,t,n){return e.tempC===void 0?e.temp===void 0?null:k(e.temp,t,n):k(e.tempC,!1,n)}function j(e,t,n){return e.lowC===void 0?k(e.low,t,n):k(e.lowC,!1,n)}function M(e,t,n){return e.highC===void 0?k(e.high,t,n):k(e.highC,!1,n)}var N=s();function P({icon:e,size:t=20}){let{icon:n,className:r}=w(e);return(0,N.jsx)(n,{width:t,height:t,className:r})}function F({useFahrenheit:e,onToggle:n}){let{t:r}=o(`chat`);return(0,N.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:t(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`),children:r(`weatherForecastDisplay.fahrenheit`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:t(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`),children:r(`weatherForecastDisplay.celsius`)})]})}function I({data:e,sourceIsFahrenheit:t,useFahrenheit:n,onToggle:r}){let{t:i}=o(`chat`),a=e.location,s=k(e.currentTemp,t,n),c=k(e.feelsLike,t,n),l=n?`F`:`C`,u=e.forecast?.[0],d=u?M(u,t,n):null,f=u?j(u,t,n):null,p=null;return e.windSpeed!==void 0&&(p=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(p=`${e.windDirection} ${p}`)),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:a}),s!==null&&(0,N.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[s,`°`,l]}),e.condition&&(0,N.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,N.jsx)(F,{useFahrenheit:n,onToggle:r})]}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[c!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:i(`weatherForecastDisplay.feelsLike`,{temp:c})}),d!==null&&f!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:i(`weatherForecastDisplay.highLow`,{high:d,low:f})}),p&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(m,{width:12,height:12}),p]}),e.humidity!==void 0&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(h,{width:12,height:12}),e.humidity,`%`]})]})]})}function L({hourly:e,sourceIsFahrenheit:t,useFahrenheit:n}){let{t:r}=o(`chat`);return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,i)=>{let a=e.time.toLowerCase()===`now`,o=A(e,t,n);return(0,N.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,N.jsx)(`span`,{className:a?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:a?r(`weatherForecastDisplay.now`):e.time}),(0,N.jsx)(P,{icon:e.icon,size:18}),o!==null&&(0,N.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[o,`°`]})]},e.id??i)})})})}function R({forecast:e,currentTemp:n,sourceIsFahrenheit:r,useFahrenheit:i}){let{globalMin:a,globalMax:o}=(0,b.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),s=o-a||1;return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,c)=>{let l=e.dayLabel??e.day??`Day ${c+1}`,u=l.toLowerCase()===`today`,d=j(e,r,i),f=M(e,r,i),p=e.precip,m=e.lowC??e.low??a,h=e.highC??e.high??o,g=(m-a)/s*100,_=(h-a)/s*100,v=Math.max(_-g,2),y=null;if(u&&n!==void 0){let t=(e.lowC!==void 0||e.highC!==void 0)&&r?(n-32)*5/9:n;y=h===m?50:(Math.max(m,Math.min(h,t))-m)/(h-m)*100}return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:t(`w-12 shrink-0 truncate text-body-small-default`,u?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`),children:l}),(0,N.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,N.jsx)(P,{icon:e.icon,size:16}),p!==void 0&&p>0&&(0,N.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(p),`%`]})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:d===null?`--`:`${d}°`}),(0,N.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,N.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${g}%`,width:`${v}%`}}),y!==null&&(0,N.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${g+y/100*v}%`}})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:f===null?`--`:`${f}°`})]},e.id??c)})})})}function z({templateData:e,fallback:t}){let n=(0,b.useMemo)(()=>E(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,b.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,N.jsxs)(`div`,{className:`mt-3`,children:[(0,N.jsx)(I,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,N.jsx)(L,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,N.jsx)(R,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{z as WeatherForecastDisplay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Oi as e,dS as t,ux as n}from"./app-BcXqNg4_.js";import{E as r}from"./vendor-DwMhK7fD.js";import{f as i,t as a}from"./react-B9IgSVeK.js";import{t as o}from"./auth-welcome-screen-CWL37isS.js";var s=a();function c(){let{t:a}=r(`onboarding`),c=i();return(0,s.jsx)(o,{secondary:{label:a(`welcome.continueWithoutAccount`),onSelect:()=>{n()?c(t.selectAssistant,e):c(t.onboarding.hosting,e)}}})}export{c as WelcomeScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{DC as t,Kn as n,LC as r,Ti as i,Wn as a,Zn as o,au as s,er as c,iu as l,qn as u,ru as d}from"./app-BcXqNg4_.js";import{E as f,d as p,f as m,s as h}from"./vendor-DwMhK7fD.js";import{t as g,x as _}from"./react-B9IgSVeK.js";import{Aa as v,D as y,Gi as b,Ha as x,Ki as S,o as C,y as w,zi as T}from"./icons-C0wyat6T.js";import{n as E,r as D,t as O}from"./animated-stat-square-BwJ3jZTp.js";import{o as k,t as A}from"./detail-primitives-DV1LUqyp.js";import{t as j}from"./detail-panel-stop-button-BXHcz4Ub.js";import{t as M}from"./status-badge-pill-qGQ5gRiz.js";var N=e(_(),1),P=g();function F({title:e,body:n,emptyText:r}){return(0,P.jsxs)(`div`,{children:[(0,P.jsx)(k,{as:`h3`,children:e}),n?(0,P.jsx)(A,{label:e,children:(0,P.jsx)(t,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:n})}):(0,P.jsx)(c,{placement:`section`,children:r})]})}function I({leaf:e}){let{t}=f(`chat`),n=e.status===`running`?t(`workflowLeafDetail.running`):t(`workflowLeafDetail.noResultSummary`);return(0,P.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,P.jsx)(O,{icon:(0,P.jsx)(x,{}),target:e.inputTokens??0,format:e=>E(Math.round(e)),label:t(`workflowLeafDetail.input`)}),(0,P.jsx)(O,{icon:(0,P.jsx)(D,{}),target:e.outputTokens??0,format:e=>E(Math.round(e)),label:t(`workflowLeafDetail.output`)})]}),(0,P.jsx)(F,{title:t(`workflowLeafDetail.prompt`),body:e.promptSummary,emptyText:t(`workflowLeafDetail.noPromptSummary`)}),(0,P.jsx)(F,{title:t(`workflowLeafDetail.result`),body:e.resultSummary,emptyText:n})]})}function L({status:e}){return(0,P.jsx)(M,{color:l(e),label:s(e)})}function R(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:return`var(--system-negative-strong)`;case`cancelled`:return`var(--content-secondary)`;default:return`var(--primary-base)`}}function z(e){switch(e){case`completed`:return`Completed`;case`failed`:return`Failed`;case`cancelled`:return`Cancelled`;default:return`Running`}}function B({status:e}){return(0,P.jsx)(M,{color:R(e),label:z(e)})}function V({status:e}){let{t}=f(`chat`),n=h(),r=`h-3.5 w-3.5 shrink-0`,i;return i=e===`running`?(0,P.jsx)(a,{className:`shrink-0`,dotSize:4,gap:2}):e===`completed`?(0,P.jsx)(T,{className:r,style:{color:`var(--system-positive-strong)`}}):e===`failed`?(0,P.jsx)(y,{className:r,style:{color:`var(--system-negative-strong)`}}):(0,P.jsx)(v,{className:r,style:{color:`var(--content-secondary)`},role:`img`,"aria-label":t(`workflowSubagentRow.cancelledAria`)}),(0,P.jsx)(m,{mode:`wait`,initial:!1,children:(0,P.jsx)(p.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:n?{duration:0}:{duration:.15,ease:[.16,1,.3,1]},className:`flex shrink-0 items-center`,children:i},e)})}function H({runId:e,leaf:r,components:i,onSelect:a}){let{t:o}=f(`chat`),s=r.label??`Subagent ${r.seq}`,c=r.promptSummary,l=n(`${e}:${r.seq}`);return(0,P.jsx)(`button`,{type:`button`,onClick:a,"aria-label":o(`workflowSubagentRow.openDetailsAria`,{title:s}),className:`flex w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] px-2 py-1.5 text-left transition-colors hover:bg-[var(--surface-overlay)]`,children:(0,P.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,P.jsx)(V,{status:r.status}),i?(0,P.jsx)(u,{components:i,bodyShapeId:l.bodyShape,eyeStyleId:l.eyeStyle,colorId:l.color,size:16}):(0,P.jsx)(`div`,{style:{width:16,height:16,flexShrink:0},"aria-hidden":!0}),(0,P.jsx)(t,{variant:`body-medium-default`,title:s,className:`max-w-[60%] shrink-0 truncate text-[var(--content-default)]`,children:s}),c&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-[var(--content-tertiary)] opacity-10`,children:`|`}),(0,P.jsx)(t,{variant:`body-medium-lighter`,title:c,className:`min-w-0 truncate text-[var(--content-tertiary)]`,children:c})]})]})})}function U({entry:e,onClose:a,onStop:s,onRequestJournal:l}){let{t:m}=f(`chat`),g=d(e.status),_=h(),v=e.label??e.runId,y=e.agentsSpawned||e.leaves.size,T=i(),A=[...e.leaves.values()].sort((e,t)=>e.seq-t.seq),[M,F]=(0,N.useState)(null),[R,z]=(0,N.useState)(e.runId);R!==e.runId&&(z(e.runId),F(null));let V=M==null?void 0:e.leaves.get(M),U=V?n(`${e.runId}:${V.seq}`):void 0,W=(0,N.useCallback)(()=>F(null),[]),G=V?V.label??`Subagent ${V.seq}`:``,K=V?G:v,q=g?`live`:`final`;return(0,N.useEffect)(()=>{l?.(e.runId)},[e.runId,q,l]),(0,P.jsx)(o,{headerAbove:V&&(0,P.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:W,title:v,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,P.jsx)(t,{variant:`body-small-default`,as:`span`,children:v})}),(0,P.jsx)(b,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,P.jsx)(t,{variant:`body-small-default`,as:`span`,title:G,className:`min-w-0 shrink truncate text-[var(--content-secondary)]`,children:G})]}),icon:(0,P.jsxs)(P.Fragment,{children:[V&&(0,P.jsx)(r,{variant:`outlined`,iconOnly:(0,P.jsx)(S,{}),onClick:W,"aria-label":m(`workflowDetailPanel.backToSubagentsAria`),tooltip:m(`workflowDetailPanel.back`),className:`shrink-0`}),V?T&&U?(0,P.jsx)(u,{components:T,bodyShapeId:U.bodyShape,eyeStyleId:U.eyeStyle,colorId:U.color,size:32}):(0,P.jsx)(`div`,{style:{width:32,height:32,flexShrink:0},"aria-hidden":!0}):(0,P.jsx)(C,{className:`h-5 w-5 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0})]}),title:K,headerTrailing:V?(0,P.jsx)(B,{status:V.status}):(0,P.jsx)(L,{status:e.status}),headerActions:g&&s?(0,P.jsx)(j,{onStop:()=>s(e.runId),ariaLabel:m(`workflowDetailPanel.stopWorkflow`)}):void 0,closeLabel:m(`workflowDetailPanel.closeDetail`),onClose:a,children:(0,P.jsx)(p.div,{className:`flex flex-col gap-5`,initial:{opacity:0},animate:{opacity:1},transition:_?{duration:0}:{duration:.18,ease:[.16,1,.3,1]},children:V?(0,P.jsx)(I,{leaf:V}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,P.jsx)(O,{icon:(0,P.jsx)(x,{}),target:e.inputTokens,format:e=>E(Math.round(e)),label:m(`workflowDetailPanel.input`)}),(0,P.jsx)(O,{icon:(0,P.jsx)(D,{}),target:e.outputTokens,format:e=>E(Math.round(e)),label:m(`workflowDetailPanel.output`)}),(0,P.jsx)(O,{icon:(0,P.jsx)(w,{}),target:y,format:e=>E(Math.round(e)),label:m(`workflowDetailPanel.agents`)})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(k,{as:`h3`,children:m(`workflowDetailPanel.subagents`)}),A.length===0?(0,P.jsx)(c,{placement:`section`,children:m(`workflowDetailPanel.noSubagentsYet`)}):(0,P.jsx)(`div`,{className:`flex flex-col gap-1`,children:A.map(t=>(0,P.jsx)(H,{runId:e.runId,leaf:t,components:T,onSelect:()=>F(t.seq)},t.seq))})]})]})},V?String(V.seq):`list`)})}export{U as WorkflowDetailPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={heading:`文件`,newFile:`新建文件`,newFolder:`新建文件夹`,delete:`删除`,rename:`重命名`,renaming:`正在重命名…`,create:`创建`,creating:`正在创建…`,creatingHeading:`新建`,createTriggerAria:`创建新文件或文件夹`,createTriggerTitle:`新建文件或文件夹`,nameLabel:`名称`,nameError:`请输入不含斜杠的单个文件或文件夹名称。`,nameTaken:`此文件夹中已存在“{name}”。`,createFailed:`创建失败。请检查名称后重试。`,renameFailed:`重命名失败。请检查名称后重试。`,deleteFailed:`删除失败。请重试。`,cancel:`取消`,sortByNameAria:`按名称排序`,sortBySizeAria:`按大小排序`,sortedBySizeTitle:`已按大小排序,切换为按名称排序`,sortedByNameTitle:`已按名称排序,切换为按大小排序`,hideHiddenAria:`隐藏隐藏文件`,showHiddenAria:`显示隐藏文件`,searchPlaceholder:`搜索文件`,clearSearchAria:`清除搜索`,noFilesFound:`未找到文件`,searchScope:`正在搜索已展开的文件夹`,noSearchMatches:`已展开的文件夹中没有匹配项`,searchIncomplete:`部分文件夹未被搜索。展开文件夹即可在其中搜索。`,noMatches:`没有匹配项`,deleteFolderTitle:`删除文件夹`,deleteFileTitle:`删除文件`,deleteFileMessage:`确定要删除 <name>{name}</name> 吗?此操作无法撤消。`,deleteFolderMessage:`确定要删除 <name>{name}</name> 及其所有内容吗?此操作无法撤消。`,deleting:`正在删除…`},t={
|
|
1
|
+
var e={heading:`文件`,newFile:`新建文件`,newFolder:`新建文件夹`,delete:`删除`,rename:`重命名`,renaming:`正在重命名…`,create:`创建`,creating:`正在创建…`,creatingHeading:`新建`,createTriggerAria:`创建新文件或文件夹`,createTriggerTitle:`新建文件或文件夹`,nameLabel:`名称`,nameError:`请输入不含斜杠的单个文件或文件夹名称。`,nameTaken:`此文件夹中已存在“{name}”。`,createFailed:`创建失败。请检查名称后重试。`,renameFailed:`重命名失败。请检查名称后重试。`,deleteFailed:`删除失败。请重试。`,cancel:`取消`,sortByNameAria:`按名称排序`,sortBySizeAria:`按大小排序`,sortedBySizeTitle:`已按大小排序,切换为按名称排序`,sortedByNameTitle:`已按名称排序,切换为按大小排序`,hideHiddenAria:`隐藏隐藏文件`,showHiddenAria:`显示隐藏文件`,searchPlaceholder:`搜索文件`,clearSearchAria:`清除搜索`,noFilesFound:`未找到文件`,searchScope:`正在搜索已展开的文件夹`,noSearchMatches:`已展开的文件夹中没有匹配项`,searchIncomplete:`部分文件夹未被搜索。展开文件夹即可在其中搜索。`,noMatches:`没有匹配项`,deleteFolderTitle:`删除文件夹`,deleteFileTitle:`删除文件`,deleteFileMessage:`确定要删除 <name>{name}</name> 吗?此操作无法撤消。`,deleteFolderMessage:`确定要删除 <name>{name}</name> 及其所有内容吗?此操作无法撤消。`,deleting:`正在删除…`},t={download:`下载`,downloading:`正在下载…`,downloadFailed:`下载失败。请重试。`,modifiedLabel:`修改时间:`,selectAFile:`选择一个文件以查看`,fileNotFound:`文件未找到`,saveFailed:`保存失败`,unknownSize:`大小未知`,downloadAria:`下载 {name}`,emptyTitle:`尚未打开任何文件`,emptyHint:`点击上方的<strong>选择文件</strong> <arrow/>`},n={eyebrow:`工作区`,chooseFile:`选择文件`,openHint:`打开文件列表`},r={dismiss:`关闭文件列表`},i={workspaceTree:e,workspaceFileViewer:t,workspaceFileTitle:n,workspaceFilePicker:r};export{i as default,r as workspaceFilePicker,n as workspaceFileTitle,t as workspaceFileViewer,e as workspaceTree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={heading:`Файлы`,newFile:`Новый файл`,newFolder:`Новая папка`,delete:`Удалить`,rename:`Переименовать`,renaming:`Переименование…`,create:`Создать`,creating:`Создание…`,creatingHeading:`Создать`,createTriggerAria:`Создать файл или папку`,createTriggerTitle:`Новый файл или папка`,nameLabel:`Имя`,nameError:`Имя одного файла или папки без слэшей.`,nameTaken:`«{name}» уже есть в этой папке.`,createFailed:`Не удалось создать. Проверьте имя и повторите попытку.`,renameFailed:`Не удалось переименовать. Проверьте имя и повторите попытку.`,deleteFailed:`Не удалось удалить. Повторите попытку.`,cancel:`Отмена`,sortByNameAria:`Сортировать по имени`,sortBySizeAria:`Сортировать по размеру`,sortedBySizeTitle:`Сортировка по размеру, переключить на имя`,sortedByNameTitle:`Сортировка по имени, переключить на размер`,hideHiddenAria:`Скрыть скрытые файлы`,showHiddenAria:`Показать скрытые файлы`,searchPlaceholder:`Поиск файлов`,clearSearchAria:`Очистить поиск`,noFilesFound:`Файлы не найдены`,searchScope:`Поиск в открытых папках`,noSearchMatches:`В открытых папках ничего не найдено`,searchIncomplete:`Некоторые папки не участвуют в поиске. Откройте папку, чтобы искать в ней.`,noMatches:`Совпадений нет`,deleteFolderTitle:`Удалить папку`,deleteFileTitle:`Удалить файл`,deleteFileMessage:`Точно удалить <name>{name}</name>? Это нельзя отменить.`,deleteFolderMessage:`Точно удалить <name>{name}</name> и всё содержимое? Это нельзя отменить.`,deleting:`Удаление…`},t={
|
|
1
|
+
var e={heading:`Файлы`,newFile:`Новый файл`,newFolder:`Новая папка`,delete:`Удалить`,rename:`Переименовать`,renaming:`Переименование…`,create:`Создать`,creating:`Создание…`,creatingHeading:`Создать`,createTriggerAria:`Создать файл или папку`,createTriggerTitle:`Новый файл или папка`,nameLabel:`Имя`,nameError:`Имя одного файла или папки без слэшей.`,nameTaken:`«{name}» уже есть в этой папке.`,createFailed:`Не удалось создать. Проверьте имя и повторите попытку.`,renameFailed:`Не удалось переименовать. Проверьте имя и повторите попытку.`,deleteFailed:`Не удалось удалить. Повторите попытку.`,cancel:`Отмена`,sortByNameAria:`Сортировать по имени`,sortBySizeAria:`Сортировать по размеру`,sortedBySizeTitle:`Сортировка по размеру, переключить на имя`,sortedByNameTitle:`Сортировка по имени, переключить на размер`,hideHiddenAria:`Скрыть скрытые файлы`,showHiddenAria:`Показать скрытые файлы`,searchPlaceholder:`Поиск файлов`,clearSearchAria:`Очистить поиск`,noFilesFound:`Файлы не найдены`,searchScope:`Поиск в открытых папках`,noSearchMatches:`В открытых папках ничего не найдено`,searchIncomplete:`Некоторые папки не участвуют в поиске. Откройте папку, чтобы искать в ней.`,noMatches:`Совпадений нет`,deleteFolderTitle:`Удалить папку`,deleteFileTitle:`Удалить файл`,deleteFileMessage:`Точно удалить <name>{name}</name>? Это нельзя отменить.`,deleteFolderMessage:`Точно удалить <name>{name}</name> и всё содержимое? Это нельзя отменить.`,deleting:`Удаление…`},t={download:`Скачать`,downloading:`Скачивание…`,downloadFailed:`Не удалось скачать. Повторите попытку.`,modifiedLabel:`Изменён:`,selectAFile:`Выбор файла для просмотра`,fileNotFound:`Файл не найден`,saveFailed:`Не удалось сохранить`,unknownSize:`Размер неизвестен`,downloadAria:`Скачать {name}`,emptyTitle:`Пока ничего не открыто`,emptyHint:`Нажмите <strong>Выбрать файл</strong> выше <arrow/>`},n={eyebrow:`Рабочая область`,chooseFile:`Выбрать файл`,openHint:`Открывает список файлов`},r={dismiss:`Закрыть список файлов`},i={workspaceTree:e,workspaceFileViewer:t,workspaceFileTitle:n,workspaceFilePicker:r};export{i as default,r as workspaceFilePicker,n as workspaceFileTitle,t as workspaceFileViewer,e as workspaceTree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={heading:`Archivos`,newFile:`Nuevo archivo`,newFolder:`Nueva carpeta`,delete:`Eliminar`,rename:`Cambiar el nombre`,renaming:`Cambiando el nombre…`,create:`Crear`,creating:`Creando…`,creatingHeading:`Crear`,createTriggerAria:`Crear un archivo o una carpeta`,createTriggerTitle:`Nuevo archivo o carpeta`,nameLabel:`Nombre`,nameError:`Escribe el nombre de un solo archivo o carpeta, sin barras.`,nameTaken:`«{name}» ya existe en esta carpeta.`,createFailed:`No se pudo crear. Revisa el nombre e inténtalo de nuevo.`,renameFailed:`No se pudo cambiar el nombre. Revisa el nombre e inténtalo de nuevo.`,deleteFailed:`No se pudo eliminar. Inténtalo de nuevo.`,cancel:`Cancelar`,sortByNameAria:`Ordenar por nombre`,sortBySizeAria:`Ordenar por tamaño`,sortedBySizeTitle:`Ordenado por tamaño, cambiar a nombre`,sortedByNameTitle:`Ordenado por nombre, cambiar a tamaño`,hideHiddenAria:`Ocultar los archivos ocultos`,showHiddenAria:`Mostrar los archivos ocultos`,searchPlaceholder:`Buscar archivos`,clearSearchAria:`Borrar la búsqueda`,noFilesFound:`No se han encontrado archivos`,searchScope:`Buscando en las carpetas abiertas`,noSearchMatches:`No hay coincidencias en las carpetas abiertas`,searchIncomplete:`Algunas carpetas no se incluyen en la búsqueda. Abre una carpeta para buscar dentro de ella.`,noMatches:`No hay coincidencias`,deleteFolderTitle:`Eliminar la carpeta`,deleteFileTitle:`Eliminar el archivo`,deleteFileMessage:`¿Seguro que quieres eliminar <name>{name}</name>? Esto no se puede deshacer.`,deleteFolderMessage:`¿Seguro que quieres eliminar <name>{name}</name> y todo su contenido? Esto no se puede deshacer.`,deleting:`Eliminando…`},t={
|
|
1
|
+
var e={heading:`Archivos`,newFile:`Nuevo archivo`,newFolder:`Nueva carpeta`,delete:`Eliminar`,rename:`Cambiar el nombre`,renaming:`Cambiando el nombre…`,create:`Crear`,creating:`Creando…`,creatingHeading:`Crear`,createTriggerAria:`Crear un archivo o una carpeta`,createTriggerTitle:`Nuevo archivo o carpeta`,nameLabel:`Nombre`,nameError:`Escribe el nombre de un solo archivo o carpeta, sin barras.`,nameTaken:`«{name}» ya existe en esta carpeta.`,createFailed:`No se pudo crear. Revisa el nombre e inténtalo de nuevo.`,renameFailed:`No se pudo cambiar el nombre. Revisa el nombre e inténtalo de nuevo.`,deleteFailed:`No se pudo eliminar. Inténtalo de nuevo.`,cancel:`Cancelar`,sortByNameAria:`Ordenar por nombre`,sortBySizeAria:`Ordenar por tamaño`,sortedBySizeTitle:`Ordenado por tamaño, cambiar a nombre`,sortedByNameTitle:`Ordenado por nombre, cambiar a tamaño`,hideHiddenAria:`Ocultar los archivos ocultos`,showHiddenAria:`Mostrar los archivos ocultos`,searchPlaceholder:`Buscar archivos`,clearSearchAria:`Borrar la búsqueda`,noFilesFound:`No se han encontrado archivos`,searchScope:`Buscando en las carpetas abiertas`,noSearchMatches:`No hay coincidencias en las carpetas abiertas`,searchIncomplete:`Algunas carpetas no se incluyen en la búsqueda. Abre una carpeta para buscar dentro de ella.`,noMatches:`No hay coincidencias`,deleteFolderTitle:`Eliminar la carpeta`,deleteFileTitle:`Eliminar el archivo`,deleteFileMessage:`¿Seguro que quieres eliminar <name>{name}</name>? Esto no se puede deshacer.`,deleteFolderMessage:`¿Seguro que quieres eliminar <name>{name}</name> y todo su contenido? Esto no se puede deshacer.`,deleting:`Eliminando…`},t={download:`Descargar`,downloading:`Descargando…`,downloadFailed:`No se pudo descargar. Inténtalo de nuevo.`,modifiedLabel:`Modificado:`,selectAFile:`Selecciona un archivo para verlo`,fileNotFound:`Archivo no encontrado`,saveFailed:`No se pudo guardar`,unknownSize:`Tamaño desconocido`,downloadAria:`Descargar {name}`,emptyTitle:`Aún no hay nada abierto`,emptyHint:`Toca <strong>Elegir un archivo</strong> arriba <arrow/>`},n={eyebrow:`Espacio de trabajo`,chooseFile:`Elegir un archivo`,openHint:`Abre la lista de archivos`},r={dismiss:`Cerrar la lista de archivos`},i={workspaceTree:e,workspaceFileViewer:t,workspaceFileTitle:n,workspaceFilePicker:r};export{i as default,r as workspaceFilePicker,n as workspaceFileTitle,t as workspaceFileViewer,e as workspaceTree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={heading:`檔案`,newFile:`新增檔案`,newFolder:`新增資料夾`,delete:`刪除`,rename:`重新命名`,renaming:`正在重新命名…`,create:`建立`,creating:`正在建立…`,creatingHeading:`建立新項目`,createTriggerAria:`建立新檔案或資料夾`,createTriggerTitle:`新檔案或資料夾`,nameLabel:`名稱`,nameError:`請輸入不含斜線的單一檔案或資料夾名稱。`,nameTaken:`此資料夾中已有「{name}」。`,createFailed:`建立失敗。請檢查名稱後再試一次。`,renameFailed:`重新命名失敗。請檢查名稱後再試一次。`,deleteFailed:`刪除失敗。請再試一次。`,cancel:`取消`,sortByNameAria:`依名稱排序`,sortBySizeAria:`依大小排序`,sortedBySizeTitle:`已依大小排序,切換為依名稱排序`,sortedByNameTitle:`已依名稱排序,切換為依大小排序`,hideHiddenAria:`隱藏隱藏檔案`,showHiddenAria:`顯示隱藏檔案`,searchPlaceholder:`搜尋檔案`,clearSearchAria:`清除搜尋`,noFilesFound:`找不到檔案`,searchScope:`正在搜尋已展開的資料夾`,noSearchMatches:`已展開的資料夾中沒有相符項目`,searchIncomplete:`部分資料夾未納入搜尋。展開資料夾即可在其中搜尋。`,noMatches:`沒有相符項目`,deleteFolderTitle:`刪除資料夾`,deleteFileTitle:`刪除檔案`,deleteFileMessage:`您確定要刪除 <name>{name}</name> 嗎?此操作無法復原。`,deleteFolderMessage:`您確定要刪除 <name>{name}</name> 及其所有內容嗎?此操作無法復原。`,deleting:`正在刪除…`},t={
|
|
1
|
+
var e={heading:`檔案`,newFile:`新增檔案`,newFolder:`新增資料夾`,delete:`刪除`,rename:`重新命名`,renaming:`正在重新命名…`,create:`建立`,creating:`正在建立…`,creatingHeading:`建立新項目`,createTriggerAria:`建立新檔案或資料夾`,createTriggerTitle:`新檔案或資料夾`,nameLabel:`名稱`,nameError:`請輸入不含斜線的單一檔案或資料夾名稱。`,nameTaken:`此資料夾中已有「{name}」。`,createFailed:`建立失敗。請檢查名稱後再試一次。`,renameFailed:`重新命名失敗。請檢查名稱後再試一次。`,deleteFailed:`刪除失敗。請再試一次。`,cancel:`取消`,sortByNameAria:`依名稱排序`,sortBySizeAria:`依大小排序`,sortedBySizeTitle:`已依大小排序,切換為依名稱排序`,sortedByNameTitle:`已依名稱排序,切換為依大小排序`,hideHiddenAria:`隱藏隱藏檔案`,showHiddenAria:`顯示隱藏檔案`,searchPlaceholder:`搜尋檔案`,clearSearchAria:`清除搜尋`,noFilesFound:`找不到檔案`,searchScope:`正在搜尋已展開的資料夾`,noSearchMatches:`已展開的資料夾中沒有相符項目`,searchIncomplete:`部分資料夾未納入搜尋。展開資料夾即可在其中搜尋。`,noMatches:`沒有相符項目`,deleteFolderTitle:`刪除資料夾`,deleteFileTitle:`刪除檔案`,deleteFileMessage:`您確定要刪除 <name>{name}</name> 嗎?此操作無法復原。`,deleteFolderMessage:`您確定要刪除 <name>{name}</name> 及其所有內容嗎?此操作無法復原。`,deleting:`正在刪除…`},t={download:`下載`,downloading:`正在下載…`,downloadFailed:`下載失敗。請再試一次。`,modifiedLabel:`修改時間:`,selectAFile:`選取檔案以檢視`,fileNotFound:`找不到檔案`,saveFailed:`儲存失敗`,unknownSize:`大小不明`,downloadAria:`下載 {name}`,emptyTitle:`尚未開啟任何檔案`,emptyHint:`點選上方的<strong>選擇檔案</strong> <arrow/>`},n={eyebrow:`工作區`,chooseFile:`選擇檔案`,openHint:`開啟檔案清單`},r={dismiss:`關閉檔案清單`},i={workspaceTree:e,workspaceFileViewer:t,workspaceFileTitle:n,workspaceFilePicker:r};export{i as default,r as workspaceFilePicker,n as workspaceFileTitle,t as workspaceFileViewer,e as workspaceTree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cy as t,DC as n,Fh as r,Fn as i,IC as a,Ih as o,LC as s,Ln as c,MC as l,OS as u,Pn as d,Rn as f,Sy as p,Ty as m,Va as h,aC as g,by as _,hi as v,jC as y,lr as b,mS as x,nC as S,pC as C,rC as w,tt as T,va as E,wy as D,xy as O,yy as k}from"./app-BcXqNg4_.js";import{$n as A,E as j,O as ee,Qn as M,Xn as N,er as P,nr as te}from"./vendor-DwMhK7fD.js";import{_ as F,t as I,x as L}from"./react-B9IgSVeK.js";import{A as R,Br as z,Gi as ne,Ia as re,Lt as B,Rr as ie,Ur as V,Xr as ae,Ya as oe,Yn as H,Yr as se,Zt as U,g as W,i as ce,jr as G,kr as le,mr as K,qi as ue,ri as de,vt as fe}from"./icons-C0wyat6T.js";import{t as q}from"./use-side-list-room-7HhxA4TR.js";import{t as J}from"./format-file-size-Bcra_NZ3.js";import{t as Y}from"./intelligence-layout-slots-store-DBTArMrt.js";import{a as X,i as pe,n as me,r as he,t as ge}from"./file-view-mode-BnS3LIZ-.js";import{t as _e}from"./use-debounced-value-DS3f___V.js";var ve=oe(`arrow-down-a-z`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]]),ye=oe(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),Z=e(L(),1);function be(e){if(!e)return``;let t=e.indexOf(`;`);return(t===-1?e:e.slice(0,t)).trim()}function xe(e,t){return be(t)===`application/json`?!0:(e??``).toLowerCase().endsWith(`.json`)}function Se(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Ce(e){return e.split(`/`).some(e=>e.startsWith(`.`))}function we(e){return M({queryFn:async()=>{let{data:t,error:n}=await O({path:e.path,query:{path:e.query.path,...e.query.showHidden?{showHidden:`true`}:{}}});if(n)throw n;return t},queryKey:[`assistantsWorkspaceFileRetrieve`,e]})}var Q=I();function Te(e){let{assistantId:t,path:n,name:r,showHidden:i}=e,[a,o]=(0,Z.useState)(!1),[s,c]=(0,Z.useState)(!1);return{isDownloading:a,error:s,download:(0,Z.useCallback)(async()=>{c(!1),o(!0);try{await b({assistantId:t,path:n,filename:r,showHidden:i})}catch{c(!0)}finally{o(!1)}},[t,n,r,i])}}function Ee({assistantId:e,path:t,name:n,showHidden:r}){let{t:i}=j(`workspace`),{isDownloading:a,error:o,download:c}=Te({assistantId:e,path:t,name:n,showHidden:r});return(0,Q.jsx)(s,{variant:`ghost`,size:`regular`,loading:a,iconOnly:(0,Q.jsx)(de,{"aria-hidden":!0}),onClick:()=>void c(),disabled:a,"aria-label":i(`workspaceFileViewer.downloadAria`,{name:n}),tooltip:i(o?`workspaceFileViewer.downloadFailed`:`workspaceFileViewer.download`)})}function De({mimeType:e}){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim(),r=z;return n.startsWith(`image/`)?r=K:n.startsWith(`video/`)?r=W:!n.startsWith(`text/`)&&n!==`application/json`&&n!==`application/octet-stream`&&(r=ie),(0,Q.jsx)(`span`,{"data-slot":`workspace-file-icon`,className:`flex h-5 w-5 shrink-0 items-center justify-center rounded`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 10%, transparent)`},children:(0,Q.jsx)(r,{className:`h-3.5 w-3.5`,style:{color:`var(--content-default)`}})})}function $({name:e,mimeType:t,size:n,rightContent:r}){return(0,Q.jsxs)(`div`,{"data-slot":`workspace-file-header`,className:`flex items-center justify-between gap-3 border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(De,{mimeType:t}),(0,Q.jsx)(`span`,{"data-slot":`workspace-file-name`,className:`truncate text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),n!=null&&(0,Q.jsx)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:J(n)})]}),r&&(0,Q.jsx)(`div`,{className:`shrink-0`,children:r})]})}function Oe({assistantId:e,path:t,mimeType:n,showHidden:r}){let{data:i,isLoading:a}=A({queryFn:async()=>{let n=await _({path:{assistant_id:e},query:{path:t,...r?{showHidden:`true`}:{}},parseAs:`blob`});if(n.error)throw n.error;return n.data},queryKey:[`assistantsWorkspaceFileContentRetrieve`,{assistantId:e,path:t,showHidden:r}],enabled:!!t}),[o,s]=(0,Z.useState)(null);return(0,Z.useEffect)(()=>{if(!i)return;let e=URL.createObjectURL(i);return s(e),()=>{URL.revokeObjectURL(e),s(null)}},[i]),a?(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(H,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):o?n.startsWith(`image/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`img`,{src:o,alt:t.split(`/`).pop()??`image`,className:`max-h-[70vh] max-w-full rounded object-contain`})}):n.startsWith(`video/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`video`,{src:o,controls:!0,className:`max-h-[70vh] max-w-full rounded`})}):null:null}function ke({assistantId:e,path:t,name:n,mimeType:r,size:i,modifiedAt:a,showHidden:o}){let{t:c}=j(`workspace`),{isDownloading:l,error:u,download:d}=Te({assistantId:e,path:t,name:n,showHidden:o});return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:n,mimeType:r,size:i}),(0,Q.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,Q.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border p-6 text-center`,style:{borderColor:`var(--border-base)`,backgroundColor:`var(--surface-lift)`},children:[(0,Q.jsx)(ie,{className:`mx-auto h-10 w-10`,style:{color:`var(--content-tertiary)`}}),(0,Q.jsx)(`p`,{className:`mt-3 text-body-medium-default`,style:{color:`var(--content-default)`},children:n}),(0,Q.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:r}),(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:J(i,c(`workspaceFileViewer.unknownSize`))}),a&&(0,Q.jsxs)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:[c(`workspaceFileViewer.modifiedLabel`),` `,new Date(a).toLocaleString(x())]})]}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,loading:l,leftIcon:(0,Q.jsx)(de,{"aria-hidden":!0}),onClick:d,disabled:l,"aria-label":c(`workspaceFileViewer.downloadAria`,{name:n}),className:`mt-4`,children:c(l?`workspaceFileViewer.downloading`:`workspaceFileViewer.download`)}),u&&(0,Q.jsx)(`p`,{className:`mt-2 text-body-small-default`,style:{color:`var(--system-negative-strong)`},children:c(`workspaceFileViewer.downloadFailed`)})]})})]})}function Ae({assistantId:e,selectedPath:t,showHidden:r,viewMode:i,onChangeViewMode:a,pickerAvailable:o=!1,pathRename:s,pathDelete:l}){let{t:u}=j(`workspace`),d=te(),{data:p,isLoading:h}=A({...we({path:{assistant_id:e},query:{path:t??``,showHidden:r}}),enabled:!!t}),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{if(!s)return;let{from:e,to:t}=s,n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;_(e=>e==null?e:n(e)),y(e=>e==null?e:{...e,path:n(e.path)})},[s]),(0,Z.useEffect)(()=>{if(!l)return;let{path:e}=l,t=t=>t===e||t.startsWith(`${e}/`);_(e=>e!=null&&t(e)?null:e),y(e=>e!=null&&t(e.path)?null:e)},[l]);let b=g!=null&&g===t,x=p?.content??``,S=v?.path===t?v.content:x,C=()=>{_(null),y(null)},w=N({mutationFn:async({path:t,content:n})=>{let{error:r,response:i}=await m({path:{assistant_id:e},body:{path:t,content:n,encoding:`utf8`},throwOnError:!1});if(!i?.ok||r)throw Error(`Failed to save file`)},onSuccess:(e,t)=>{_(e=>e===t.path?null:e),y(e=>e?.path===t.path?null:e),d.invalidateQueries({queryKey:[`assistantsWorkspaceFileRetrieve`]})}}),T=S!==x,E=(0,Z.useCallback)(()=>{t&&T&&!w.isPending&&w.mutate({path:t,content:S})},[t,T,w,S]);if(!t)return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3.5 px-10 text-center`,children:[(0,Q.jsx)(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-[14px] bg-[color-mix(in_srgb,var(--content-default)_6%,transparent)]`,children:(0,Q.jsx)(z,{className:`h-5 w-4 text-[var(--content-secondary)]`,"aria-hidden":!0})}),(0,Q.jsx)(n,{variant:`body-large-lighter`,className:`text-[var(--content-tertiary)]`,children:u(`workspaceFileViewer.emptyTitle`)}),o?(0,Q.jsx)(n,{variant:`body-small-lighter`,className:`text-[var(--content-disabled)] [--text-body-small-lighter-size:13px]`,children:(0,Q.jsx)(ee,{ns:`workspace`,i18nKey:`workspaceFileViewer.emptyHint`,components:{strong:(0,Q.jsx)(`strong`,{className:`font-medium text-[var(--content-secondary)]`}),arrow:(0,Q.jsx)(re,{className:`ml-1 inline h-3 w-3`,"aria-hidden":!0})}})}):(0,Q.jsx)(n,{variant:`body-small-lighter`,className:`text-[var(--content-tertiary)]`,children:u(`workspaceFileViewer.selectAFile`)})]});if(h)return(0,Q.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Q.jsx)(H,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})});if(!p)return(0,Q.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Q.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:u(`workspaceFileViewer.fileNotFound`)})});let D=p.mimeType??`application/octet-stream`,O=p.name??t.split(`/`).pop()??t,k=f(O,D),M=xe(O,D),P=p.content!=null&&!k&&!M,F=t?Ce(t):!0,I=b&&(0,Q.jsx)(he,{isDirty:T,isSaving:w.isPending,error:w.isError?u(`workspaceFileViewer.saveFailed`):null,onSave:E,onDiscard:C});if(k&&p.content!=null){let e=b?S:p.content;return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:O,mimeType:D,size:p.size,rightContent:(0,Q.jsx)(ge,{mode:i,onChange:e=>{b&&C(),a(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(me,{content:e,fileName:O,mimeType:D,showEdit:!F&&i===`source`,isEditing:b,onToggleEdit:()=>b?C():_(t)}),i===`formatted`?(0,Q.jsx)(`div`,{"data-slot":`workspace-file-preview`,className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Q.jsx)(c,{content:e})}):b?(0,Q.jsx)(pe,{value:S,onChange:e=>y({path:t,content:e}),onSave:E}):(0,Q.jsx)(X,{lineNumbers:o,whiteSpace:o?`pre`:`pre-wrap`,content:p.content,readOnly:F,onStartEdit:()=>_(t)})]}),I]})}if(M&&p.content!=null){let e=b?S:p.content,n=Se(e);return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:O,mimeType:D,size:p.size,rightContent:(0,Q.jsx)(ge,{mode:i,onChange:e=>{b&&C(),a(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(me,{content:i===`formatted`?n:e,downloadContent:e,fileName:O,mimeType:D,showEdit:!F&&i===`source`,isEditing:b,onToggleEdit:()=>b?C():_(t)}),i===`formatted`?(0,Q.jsx)(X,{content:n,readOnly:!0,whiteSpace:`pre`,lineNumbers:o}):b?(0,Q.jsx)(pe,{value:S,onChange:e=>y({path:t,content:e}),onSave:E}):(0,Q.jsx)(X,{lineNumbers:o,whiteSpace:o?`pre`:`pre-wrap`,content:p.content,readOnly:F,onStartEdit:()=>_(t)})]}),I]})}return P?(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:O,mimeType:D,size:p.size}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(me,{content:b?S:p.content??``,fileName:O,mimeType:D,showEdit:!F,isEditing:b,onToggleEdit:()=>b?C():_(t)}),b?(0,Q.jsx)(pe,{value:S,onChange:e=>y({path:t,content:e}),onSave:E}):(0,Q.jsx)(X,{lineNumbers:o,whiteSpace:o?`pre`:`pre-wrap`,content:p.content??``,readOnly:F,onStartEdit:()=>_(t)})]}),I]}):D.startsWith(`image/`)||D.startsWith(`video/`)?(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:O,mimeType:D,size:p.size,rightContent:(0,Q.jsx)(Ee,{assistantId:e,path:t,name:O,showHidden:r})}),(0,Q.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,Q.jsx)(Oe,{assistantId:e,path:t,mimeType:D,showHidden:r})})]}):(0,Q.jsx)(ke,{assistantId:e,path:t,name:O,mimeType:D,size:p.size,modifiedAt:p.modifiedAt,showHidden:r})}function je({entry:e}){let t={color:`var(--content-tertiary)`};return e.type===`directory`?(0,Q.jsx)(le,{className:`h-4 w-4 shrink-0`,style:t}):e.mimeType?.startsWith(`image/`)?(0,Q.jsx)(K,{className:`h-4 w-4 shrink-0`,style:t}):e.mimeType?.startsWith(`video/`)?(0,Q.jsx)(W,{className:`h-4 w-4 shrink-0`,style:t}):(0,Q.jsx)(z,{className:`h-4 w-4 shrink-0`,style:t})}var Me=(0,Z.memo)(function({entry:e,depth:t,isExpanded:n,isSelected:r,presentation:i=`sidebar`,onToggleExpand:a,onSelectPath:o,onRequestDelete:s,onRequestRename:c,onRequestCreate:l}){let{t:u}=j(`workspace`),d=e.type===`directory`,f=e.name.startsWith(`.`),p=!Ce(e.path),m={path:e.path,name:e.name,isDirectory:d},h=(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>d?a(e.path):o(e.path),"aria-expanded":d?n:void 0,"aria-current":!d&&r?`true`:void 0,"data-slot":`workspace-tree-row`,className:`flex w-full items-center gap-1.5 px-2 py-1 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)] active:bg-[var(--surface-active)]`,style:{paddingLeft:`${t*(i===`sheet`?28:14)+(i===`sheet`?6:8)}px`,paddingRight:`8px`,color:f&&!r?`var(--content-tertiary)`:`var(--content-default)`,backgroundColor:r?`color-mix(in oklab, var(--primary-base) 12%, transparent)`:void 0,opacity:f&&!r?.7:1},children:[d?(0,Q.jsx)(ne,{className:`h-3 w-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none`,style:{color:`var(--content-tertiary)`,transform:n?`rotate(90deg)`:void 0},"aria-hidden":!0}):(0,Q.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,Q.jsx)(je,{entry:e}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),e.size!==null&&(0,Q.jsx)(`span`,{className:`shrink-0 text-label-medium-default tabular-nums`,style:{color:`var(--content-tertiary)`},children:J(e.size)})]});return p?(0,Q.jsxs)(S.Root,{children:[(0,Q.jsx)(S.Trigger,{children:h}),(0,Q.jsxs)(S.Content,{children:[d&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(S.Item,{leftIcon:(0,Q.jsx)(V,{className:`h-3.5 w-3.5`}),onSelect:()=>l({kind:`file`,parentPath:e.path}),children:u(`workspaceTree.newFile`)}),(0,Q.jsx)(S.Item,{leftIcon:(0,Q.jsx)(G,{className:`h-3.5 w-3.5`}),onSelect:()=>l({kind:`folder`,parentPath:e.path}),children:u(`workspaceTree.newFolder`)}),(0,Q.jsx)(S.Separator,{})]}),(0,Q.jsx)(S.Item,{leftIcon:(0,Q.jsx)(R,{className:`h-3.5 w-3.5`}),onSelect:()=>s(m),children:u(`workspaceTree.delete`)}),(0,Q.jsx)(S.Item,{leftIcon:(0,Q.jsx)(U,{className:`h-3.5 w-3.5`}),onSelect:()=>c(m),children:u(`workspaceTree.rename`)})]})]}):h});function Ne(e,t){if(t===`name`)return e;let n=e.slice();return n.sort((e,t)=>{let n=e.size??null,r=t.size??null;return n===null&&r===null?(e.name??``).localeCompare(t.name??``):n===null?1:r===null?-1:n===r?(e.name??``).localeCompare(t.name??``):r-n}),n}function Pe(e,t){let n=[``];for(let r of e){if(!t&&Ce(r))continue;let i=r.split(`/`),a=!0;for(let t=1;t<i.length;t++)if(!e.has(i.slice(0,t).join(`/`))){a=!1;break}a&&n.push(r)}return n}function Fe(e){let t=new Map;for(let n of e){let e=o(n.path),r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function Ie({listings:e,expandedPaths:t,sortMode:n,query:r}){let i=r.trim().toLowerCase();function a(r,o){let s=e.get(r);if(!s)return[];let c=[];for(let e of Ne(s,n)){let n=e.type===`directory`,r=n&&t.has(e.path),s=r||n&&i!==``?a(e.path,o+1):[];(i===``||e.name.toLowerCase().includes(i)||s.length>0)&&c.push({entry:e,depth:o,isExpanded:r||s.length>0},...s)}return c}return a(``,0)}function Le({assistantId:e,expandedPaths:t,showHidden:n,sortMode:r}){let{data:a}=A(i({assistantId:e,showHidden:n,recursive:!0})),o=(0,Z.useMemo)(()=>a?.truncated===void 0?void 0:{listings:Fe(a.entries),truncated:a.truncated,skipped:a.skipped??[]},[a]),s=(0,Z.useMemo)(()=>Pe(t,n),[t,n]),c=(0,Z.useCallback)(e=>{let t=new Map;return e.forEach((e,n)=>{e.data&&t.set(s[n],e.data.entries)}),{listings:t,isRootLoading:e[0]?.isLoading??!0}},[s]),l=P({queries:s.map(t=>i({assistantId:e,path:t,showHidden:n,includeDirSizes:r===`size`})),combine:c});return(0,Z.useMemo)(()=>{if(!o)return{listings:l.listings,isRootLoading:l.isRootLoading,searchScope:`open-folders`,isSearchIncomplete:!1};let e=new Map(o.listings);for(let[t,n]of l.listings)e.set(t,n);return{listings:e,isRootLoading:!1,searchScope:`workspace`,isSearchIncomplete:o.truncated||o.skipped.some(t=>!e.has(t))}},[o,l])}var Re=class extends Error{takenName;constructor(e){super(`Workspace entry name is taken: ${e}`),this.name=`WorkspaceNameTakenError`,this.takenName=e}};function ze(e,t,n){if(e instanceof Re)return n(`workspaceTree.nameTaken`,{name:e.takenName});switch(t){case`create`:return n(`workspaceTree.createFailed`);case`rename`:return n(`workspaceTree.renameFailed`);case`delete`:return n(`workspaceTree.deleteFailed`)}}var Be=200;async function Ve(e,t,n,r){let i=n.toLowerCase(),a=r?.toLowerCase(),{data:o}=await D({path:{assistant_id:e},query:t?{path:t}:{}});if(o?.entries?.some(e=>{let t=e.name.toLowerCase();return t===i&&t!==a}))throw new Re(n)}function He({title:e,placeholder:t,confirmLabel:n,pendingLabel:r,initialName:i,onCancel:a,onConfirm:o,pending:c,error:l}){let{t:u}=j(`workspace`),d=(0,Z.useRef)(null),[f,p]=(0,Z.useState)(i??``),m=f.trim(),h=m.length>0&&(/[/\\]/.test(m)||m===`.`||m===`..`),_=m.length>0&&!h&&!c;return(0,Q.jsx)(g.Root,{open:!0,onOpenChange:e=>{!e&&!c&&a()},children:(0,Q.jsx)(g.Content,{size:`sm`,hideCloseButton:!0,"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault();let t=d.current;t&&(t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(0,t.value.length)}))},onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),c||a()},children:(0,Q.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),_&&o(m)},children:[(0,Q.jsx)(g.Header,{children:(0,Q.jsx)(g.Title,{children:e})}),(0,Q.jsx)(g.Body,{children:(0,Q.jsx)(C,{ref:d,label:u(`workspaceTree.nameLabel`),value:f,onChange:e=>p(e.target.value),placeholder:t,errorText:l??(h?u(`workspaceTree.nameError`):void 0),autoComplete:`off`,spellCheck:!1,fullWidth:!0})}),(0,Q.jsxs)(g.Footer,{children:[(0,Q.jsx)(s,{type:`button`,variant:`outlined`,onClick:a,disabled:c,children:u(`workspaceTree.cancel`)}),(0,Q.jsx)(s,{type:`submit`,variant:`primary`,disabled:!_,children:c?r:n})]})]})})})}function Ue({assistantId:e,expandedPaths:i,selectedPath:c,showHidden:l,sortMode:f,onToggleExpand:h,onExpandPath:g,onSelectPath:_,onToggleShowHidden:v,onChangeSortMode:y,onPathDeleted:b,onPathRenamed:x,search:S,onSearchChange:T,presentation:E=`sidebar`}){let{t:D}=j(`workspace`),O=te(),[A,M]=(0,Z.useState)(!1),[P,F]=(0,Z.useState)(null),[I,L]=(0,Z.useState)(null),R=(0,Z.useCallback)(()=>{F(null),L(null)},[]),z=_e(S,Be),ne=z.trim()!==``,re=(0,Z.useId)(),{listings:B,isRootLoading:ie,searchScope:V,isSearchIncomplete:oe}=Le({assistantId:e,expandedPaths:i,showHidden:l,sortMode:f}),H=ne?V===`open-folders`?D(`workspaceTree.searchScope`):oe?D(`workspaceTree.searchIncomplete`):null:null,U=(B.get(``)?.length??0)>0,W=(0,Z.useMemo)(()=>Ie({listings:B,expandedPaths:i,sortMode:f,query:z}),[B,i,f,z]),G=(0,Z.useCallback)(()=>{for(let e of[d,`assistantsWorkspaceFileRetrieve`,`assistantsWorkspaceFileContentRetrieve`])O.invalidateQueries({queryKey:[e]})},[O]),le=N({mutationFn:async t=>{let n=t.parentPath?`${t.parentPath}/${t.name}`:t.name;await Ve(e,t.parentPath,t.name);let{error:r,response:i}=t.kind===`file`?await m({path:{assistant_id:e},body:{path:n,content:``,encoding:`utf8`},throwOnError:!1}):await p({path:{assistant_id:e},body:{path:n},throwOnError:!1});if(r||!i?.ok)throw i?u(r,i):r;return{...t,path:n}},onSuccess:e=>{R(),G(),e.parentPath&&g(e.parentPath),e.kind===`file`?_(e.path):g(e.path)},onError:e=>{L(ze(e,`create`,D))}}),K=N({mutationFn:async n=>{let i=o(n.oldPath),a=r(n.oldPath),s=i?`${i}/${n.newName}`:n.newName;await Ve(e,i,n.newName,a);let{error:c,response:l}=await t({path:{assistant_id:e},body:{oldPath:n.oldPath,newPath:s},throwOnError:!1});if(c||!l?.ok)throw l?u(c,l):c;return{oldPath:n.oldPath,newPath:s}},onSuccess:({oldPath:e,newPath:t})=>{R(),G(),x(e,t)},onError:e=>{L(ze(e,`rename`,D))}}),ue=(0,Z.useCallback)(e=>{L(null),F({type:`create`,...e})},[]),de=(0,Z.useCallback)(e=>{L(null),F({type:`rename`,path:e.path,name:e.name})},[]),[q,J]=(0,Z.useState)(null),Y=N({mutationFn:async t=>{let{error:n,response:r}=await k({path:{assistant_id:e},body:{path:t.path},throwOnError:!1});if(n||!r?.ok)throw r?u(n,r):n;return t},onSuccess:e=>{J(null),G(),b(e.path)}}),X=(0,Z.useCallback)(e=>{Y.reset(),J(e)},[Y]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{"data-slot":`workspace-tree-header`,className:`flex shrink-0 items-center justify-between border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[E===`sheet`?(0,Q.jsx)(a.Title,{className:`[--text-title-medium-size:18px] [--text-title-medium-weight:600]`,children:D(`workspaceTree.heading`)}):(0,Q.jsx)(n,{variant:`body-medium-default`,className:`text-[var(--content-secondary)]`,children:D(`workspaceTree.heading`)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,Q.jsx)(s,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:f===`size`?(0,Q.jsx)(ye,{"aria-hidden":!0}):(0,Q.jsx)(ve,{"aria-hidden":!0}),onClick:()=>y(f===`size`?`name`:`size`),"aria-label":D(f===`size`?`workspaceTree.sortByNameAria`:`workspaceTree.sortBySizeAria`),title:D(f===`size`?`workspaceTree.sortedBySizeTitle`:`workspaceTree.sortedByNameTitle`),tintColor:f===`size`?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(s,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:l?(0,Q.jsx)(se,{"aria-hidden":!0}):(0,Q.jsx)(ae,{"aria-hidden":!0}),onClick:v,"aria-pressed":l,"aria-label":D(l?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),title:D(l?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),tintColor:l?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(We,{open:A,onOpenChange:M,onSelectKind:e=>{M(!1),ue({kind:e,parentPath:``})}})]})]}),(0,Q.jsxs)(`div`,{"data-slot":`workspace-tree-search`,className:`shrink-0 px-3 py-2`,children:[(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(C,{type:`text`,value:S,onChange:e=>T(e.target.value),placeholder:D(`workspaceTree.searchPlaceholder`),"aria-label":D(`workspaceTree.searchPlaceholder`),leftIcon:(0,Q.jsx)(fe,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),"aria-describedby":H?re:void 0,fullWidth:!0,spellCheck:!1,autoComplete:`off`}),S&&(0,Q.jsx)(s,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(ce,{"aria-hidden":!0}),onClick:()=>T(``),"aria-label":D(`workspaceTree.clearSearchAria`),className:`absolute right-1.5 top-1/2 -translate-y-1/2`,tintColor:`var(--content-tertiary)`})]}),H&&(0,Q.jsx)(`span`,{id:re,className:`mt-1 block text-body-small-default text-[var(--content-tertiary)]`,children:H})]}),(0,Q.jsx)(`div`,{"data-slot":`workspace-tree-list`,className:`min-h-0 flex-1 overflow-y-auto py-1`,children:ie?(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,Q.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`,style:{color:`var(--content-tertiary)`}})}):!U||W.length===0?(0,Q.jsx)(`p`,{className:`px-3 py-4 text-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:D(U?V===`workspace`?`workspaceTree.noMatches`:`workspaceTree.noSearchMatches`:`workspaceTree.noFilesFound`)}):W.map(e=>(0,Q.jsx)(Me,{entry:e.entry,depth:e.depth,isExpanded:e.isExpanded,isSelected:c===e.entry.path,presentation:E,onToggleExpand:h,onSelectPath:_,onRequestDelete:X,onRequestRename:de,onRequestCreate:ue},e.entry.path))}),P?.type===`create`&&(0,Q.jsx)(He,{title:P.kind===`file`?D(`workspaceTree.newFile`):D(`workspaceTree.newFolder`),placeholder:P.kind===`file`?`filename.md`:`folder-name`,confirmLabel:D(`workspaceTree.create`),pendingLabel:D(`workspaceTree.creating`),onCancel:R,onConfirm:e=>{L(null),le.mutate({kind:P.kind,parentPath:P.parentPath,name:e})},pending:le.isPending,error:I},`create-${P.kind}-${P.parentPath}`),P?.type===`rename`&&(0,Q.jsx)(He,{title:D(`workspaceTree.rename`),placeholder:P.name,confirmLabel:D(`workspaceTree.rename`),pendingLabel:D(`workspaceTree.renaming`),initialName:P.name,onCancel:R,onConfirm:e=>{if(e===P.name){R();return}L(null),K.mutate({oldPath:P.path,newName:e})},pending:K.isPending,error:I},`rename-${P.path}`),(0,Q.jsx)(w,{open:q!==null,title:q?.isDirectory?D(`workspaceTree.deleteFolderTitle`):D(`workspaceTree.deleteFileTitle`),message:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ee,{i18nKey:q?.isDirectory?`workspaceTree.deleteFolderMessage`:`workspaceTree.deleteFileMessage`,ns:`workspace`,values:{name:q?.name??``},components:{name:(0,Q.jsx)(`span`,{style:{color:`var(--content-default)`}})}}),Y.error&&(0,Q.jsx)(`span`,{className:`mt-2 block`,style:{color:`var(--system-negative-strong)`},children:ze(Y.error,`delete`,D)})]}),confirmLabel:Y.isPending?D(`workspaceTree.deleting`):D(`workspaceTree.delete`),destructive:!0,isPending:Y.isPending,onConfirm:()=>{q&&Y.mutate(q)},onCancel:()=>J(null)})]})}function We({open:e,onOpenChange:t,onSelectKind:n}){let{t:r}=j(`workspace`);return E()?(0,Q.jsxs)(a.Root,{open:e,onOpenChange:t,children:[(0,Q.jsx)(a.Trigger,{asChild:!0,children:(0,Q.jsx)(s,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(B,{"aria-hidden":!0}),"aria-label":r(`workspaceTree.createTriggerAria`),title:r(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(a.Content,{children:[(0,Q.jsx)(a.Header,{className:`sr-only`,children:(0,Q.jsx)(a.Title,{children:r(`workspaceTree.creatingHeading`)})}),(0,Q.jsxs)(a.Body,{className:`pt-0`,children:[(0,Q.jsx)(y,{icon:V,label:r(`workspaceTree.newFile`),onSelect:()=>n(`file`)}),(0,Q.jsx)(y,{icon:G,label:r(`workspaceTree.newFolder`),onSelect:()=>n(`folder`)})]})]})]}):(0,Q.jsxs)(l.Root,{open:e,onOpenChange:t,children:[(0,Q.jsx)(l.Trigger,{asChild:!0,children:(0,Q.jsx)(s,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(B,{"aria-hidden":!0}),"aria-label":r(`workspaceTree.createTriggerAria`),title:r(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(l.Content,{align:`end`,sideOffset:4,children:[(0,Q.jsx)(l.Item,{leftIcon:(0,Q.jsx)(V,{className:`h-3.5 w-3.5`}),onSelect:()=>n(`file`),children:r(`workspaceTree.newFile`)}),(0,Q.jsx)(l.Item,{leftIcon:(0,Q.jsx)(G,{className:`h-3.5 w-3.5`}),onSelect:()=>n(`folder`),children:r(`workspaceTree.newFolder`)})]})]})}function Ge({open:e,onClose:t,pickerId:n,triggerRef:r,children:i}){let{t:o}=j(`workspace`),s=v(),c=(0,Z.useRef)(null),l=h.use.registerBackOwner(),u=h.use.unregisterBackOwner();return(0,Z.useEffect)(()=>{if(e)return l(),u},[e,l,u]),(0,Q.jsx)(a.Root,{open:e,onOpenChange:e=>{e||t()},children:(0,Q.jsx)(a.Content,{ref:c,id:n,variant:`detail`,dragHandleLabel:o(`workspaceFilePicker.dismiss`),padded:!1,className:`workspace-file-picker`,overlayClassName:`workspace-file-picker-overlay`,style:{...s,"--bottom-sheet-bottom-inset":s.paddingBottom},"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})},onCloseAutoFocus:e=>{e.preventDefault(),r.current?.focus({preventScroll:!0})},onEscapeKeyDown:e=>{let t=e.target instanceof Element?e.target.closest(`[role="dialog"]`):null;t&&t!==c.current&&e.preventDefault()},children:i})})}function Ke({selectedPath:e,open:t,onOpen:i,pickerId:a,buttonRef:o}){let{t:c}=j(`workspace`);return(0,Q.jsxs)(`div`,{className:`mx-auto flex min-w-0 max-w-[min(32rem,calc(100vw-136px))] flex-col items-center gap-1.5`,children:[(0,Q.jsx)(n,{variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:c(`workspaceFileTitle.eyebrow`)}),(0,Q.jsxs)(s,{ref:o,variant:`ghost`,onClick:i,"aria-haspopup":`dialog`,"aria-expanded":t,"aria-controls":t?a:void 0,"aria-describedby":`${a}-hint`,className:`workspace-file-title bg-[var(--surface-hover)]`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:e?r(e):c(`workspaceFileTitle.chooseFile`)}),(0,Q.jsx)(ue,{className:`h-3.5 w-3.5 shrink-0`,strokeWidth:2.2,"aria-hidden":!0})]}),(0,Q.jsx)(`span`,{id:`${a}-hint`,className:`sr-only`,children:c(`workspaceFileTitle.openHint`)})]})}function qe(e){let t=e.split(`/`),n=new Set;for(let e=1;e<t.length;e++)n.add(t.slice(0,e).join(`/`));return n}function Je(e){return f(e??``,void 0)?`formatted`:`source`}function Ye({assistantId:e}){let[t,n]=F(),[r,i]=(0,Z.useState)(()=>{let e=t.get(`file`);return e?qe(e):new Set}),[a,o]=(0,Z.useState)(()=>t.get(`file`)),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(()=>t.get(`sort`)===`size`?`size`:`name`),[d,f]=(0,Z.useState)(()=>Je(t.get(`file`))),p=(0,Z.useCallback)(e=>{i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),m=(0,Z.useCallback)(e=>{i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[]),{paneRef:h,hasRoomForList:g,drawerOpen:_,openDrawer:v,closeDrawer:y}=q(),[b,x]=(0,Z.useState)(``),S=(0,Z.useId)(),C=(0,Z.useRef)(null),w=Y.use.setHeaderTitle();(0,Z.useEffect)(()=>(w(g?null:(0,Q.jsx)(Ke,{selectedPath:a,open:_,onOpen:v,pickerId:S,buttonRef:C})),()=>w(null)),[g,a,_,v,S,w]);let T=(0,Z.useCallback)(e=>{o(e),f(Je(e)),x(``),y()},[y]);(0,Z.useEffect)(()=>{let e=t.get(`file`);e&&(T(e),i(t=>{let n=new Set(t);for(let t of qe(e))n.add(t);return n.size===t.size?t:n}),n(e=>{let t=new URLSearchParams(e);return t.delete(`file`),t},{replace:!0}))},[t,n,T]);let[E,D]=(0,Z.useState)(null),O=(0,Z.useCallback)(e=>{let t=t=>t===e||t.startsWith(`${e}/`);o(e=>e!==null&&t(e)?null:e),i(e=>{let n=new Set([...e].filter(e=>!t(e)));return n.size===e.size?e:n}),D({path:e})},[]),[k,A]=(0,Z.useState)(null),j={assistantId:e,expandedPaths:r,selectedPath:a,showHidden:s,sortMode:l,onToggleExpand:p,onExpandPath:m,onSelectPath:T,onToggleShowHidden:()=>c(e=>!e),onChangeSortMode:u,onPathDeleted:O,onPathRenamed:(0,Z.useCallback)((e,t)=>{let n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;o(e=>e===null?e:n(e)),i(e=>{let t=!1,r=new Set;for(let i of e){let e=n(i);e!==i&&(t=!0),r.add(e)}return t?r:e}),A({from:e,to:t})},[]),search:b,onSearchChange:x};return(0,Q.jsxs)(`div`,{ref:h,className:`flex h-full min-h-0 flex-col gap-4`,children:[g?null:(0,Q.jsx)(Ge,{open:_,onClose:y,pickerId:S,triggerRef:C,children:(0,Q.jsx)(Ue,{...j,presentation:`sheet`})}),(0,Q.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-4 ${g?`grid-cols-[320px_1fr]`:`grid-cols-1`}`,children:[g?(0,Q.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Q.jsx)(Ue,{...j})}):null,(0,Q.jsx)(`div`,{className:`workspace-viewer-card flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,"data-compact":!g,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Q.jsx)(Ae,{assistantId:e,selectedPath:a,showHidden:s,viewMode:d,onChangeViewMode:f,pickerAvailable:!g,pathRename:k,pathDelete:E})})]})]})}function Xe(){return(0,Q.jsx)(Ye,{assistantId:T()})}export{Xe as WorkspacePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.workspace-file-title:focus-visible{outline:2px solid var(--ring);outline-offset:2px}[data-slot=chat-layout-header]:has(.workspace-file-title){padding:6px 14px 18px}[data-slot=chat-layout-header]:has(.workspace-file-title) a{background:var(--surface-hover);width:44px;height:44px}[data-slot=chat-layout-header]:has(.workspace-file-title) a svg{width:18px;height:18px}.workspace-file-title{border-radius:16px;min-width:0;max-width:100%;height:auto;min-height:34px;padding:6px 12px 6px 14px;font-size:16px;font-weight:500;line-height:20px;transition:background-color .2s,color .2s}.workspace-viewer-card[data-compact=true]{border-radius:18px}.workspace-viewer-card[data-compact=true] [data-slot=workspace-file-header]{flex-shrink:0;padding:12px 12px 12px 14px}.workspace-viewer-card[data-compact=true] [data-slot=workspace-file-icon]{border-radius:6px;width:22px;height:22px}.workspace-viewer-card[data-compact=true] [data-slot=workspace-file-name]{font-size:15px;font-weight:500}.workspace-viewer-card[data-compact=true] [data-slot=workspace-file-preview]{padding:18px 20px}.workspace-viewer-card[data-compact=true] [data-slot=markdown-message]{font-size:14.5px;line-height:1.5}.workspace-viewer-card[data-compact=true] [data-slot=markdown-message] h1{letter-spacing:-.01em;font-size:24px;font-weight:500}.workspace-viewer-card[data-compact=true] [data-slot=markdown-message] h2{font-size:18px;font-weight:500}.workspace-viewer-card[data-compact=true] [data-slot=markdown-message] hr{margin-block:18px}.workspace-viewer-card[data-compact=true] [data-slot=markdown-message] :not(pre)>code{background:color-mix(in srgb, var(--content-default) 7%, transparent);border-radius:4px;padding:1px 5px;font-size:12.5px}.workspace-viewer-card[data-compact=true] [data-slot=source-pre]{padding:16px 18px;font-size:12.5px;line-height:1.65}.workspace-file-picker[data-slot=bottom-sheet-content][data-variant=detail]{animation-duration:.38s;animation-timing-function:cubic-bezier(.32,.72,0,1)}.workspace-file-picker-overlay[data-slot=bottom-sheet-overlay][data-variant=detail]{background:#0000008c;animation-duration:.3s;animation-timing-function:ease}.workspace-file-picker>[data-slot=bottom-sheet-content-inner]{height:calc(78% + var(--bottom-sheet-bottom-inset,0px));padding-inline:14px;box-shadow:0 -12px 40px #00000080}.workspace-file-picker [data-slot=bottom-sheet-drag-handle]{height:30px;margin-inline:-14px}.workspace-file-picker [data-slot=bottom-sheet-drag-handle]>div{background:color-mix(in srgb, var(--content-default) 25%, transparent);border-radius:3px;width:38px;height:5px}.workspace-file-picker [data-slot=workspace-tree-header]{border:0;padding:2px 4px 10px}.workspace-file-picker [data-slot=workspace-tree-header] button{width:40px;height:40px}.workspace-file-picker [data-slot=workspace-tree-header] button svg{width:18px;height:18px}.workspace-file-picker [data-slot=workspace-tree-search]{padding:0 0 8px}.workspace-file-picker [data-slot=input]{background:color-mix(in srgb, var(--content-default) 6%, transparent);border-color:#0000;border-radius:12px;height:42px;padding-left:41px;padding-right:44px;font-size:15px}.workspace-file-picker [data-testid=input-left-icon]{left:14px}.workspace-file-picker [data-slot=input]:focus-visible{border-color:var(--border-active)}.workspace-file-picker [data-testid=input-left-icon] svg{width:17px;height:17px}.workspace-file-picker [data-slot=workspace-tree-list]{overscroll-behavior:contain;padding:0 0 24px}.workspace-file-picker [data-slot=workspace-tree-row]{border-radius:10px;gap:12px;min-height:44px;font-size:15px}@media (prefers-reduced-motion:reduce){.workspace-file-title{transition:none}}
|
package/dist/index.html
CHANGED
|
@@ -335,8 +335,8 @@
|
|
|
335
335
|
<script type="module" crossorigin src="/assistant/assets/react-B9IgSVeK.js"></script>
|
|
336
336
|
<script type="module" crossorigin src="/assistant/assets/vendor-DwMhK7fD.js"></script>
|
|
337
337
|
<script type="module" crossorigin src="/assistant/assets/icons-C0wyat6T.js"></script>
|
|
338
|
-
<script type="module" crossorigin src="/assistant/assets/app-
|
|
339
|
-
<link rel="stylesheet" crossorigin href="/assistant/assets/app-
|
|
338
|
+
<script type="module" crossorigin src="/assistant/assets/app-BcXqNg4_.js"></script>
|
|
339
|
+
<link rel="stylesheet" crossorigin href="/assistant/assets/app-hw35VYTL.css">
|
|
340
340
|
<script>window.__VELLUM_CONFIG__={"webUrl":"https://www.vellum.ai","platformUrl":"https://platform.vellum.ai"}</script></head>
|
|
341
341
|
<body>
|
|
342
342
|
<!--
|