@vellumai/web 0.12.4 → 0.12.5-dev.202609251017.e467a6c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (463) hide show
  1. package/dist/assets/{a2a-invite-BSzXL6i3.js → a2a-invite-CMMHBiy-.js} +1 -1
  2. package/dist/assets/{about-page-Ne3KY7p6.js → about-page-BB7-HGJd.js} +1 -1
  3. package/dist/assets/{account-page-DR4ueI-s.js → account-page-B3AhNrvG.js} +1 -1
  4. package/dist/assets/{account-shell-BCvjHT7j.js → account-shell-CH63d0FT.js} +1 -1
  5. package/dist/assets/acp-run-detail-panel-C4wpvX9E.js +3 -0
  6. package/dist/assets/activation-list-route-CeDp6f5H.js +1 -0
  7. package/dist/assets/{activity-redirect-page-BOS14fri.js → activity-redirect-page-DF57BDED.js} +1 -1
  8. package/dist/assets/activity-steps-panel-BksJ52Tr.js +1 -0
  9. package/dist/assets/{add-credits-modal-O1N2pbak.js → add-credits-modal-D7q5Ffk8.js} +1 -1
  10. package/dist/assets/add-credits-modal-DqSLgand.js +1 -0
  11. package/dist/assets/ai-page-DiSmAbhk.js +1 -0
  12. package/dist/assets/all-chats-page-route-BmBKd57L.js +1 -0
  13. package/dist/assets/android-billing-handoff-iZa2BMO_.js +1 -0
  14. package/dist/assets/animated-stat-square-C7OzP_a-.js +1 -0
  15. package/dist/assets/{api-key-screen-BD62ySmK.js → api-key-screen-DXUxlcW_.js} +1 -1
  16. package/dist/assets/app--CZi-eoZ.js +399 -0
  17. package/dist/assets/app-DFa5jRlV.css +2 -0
  18. package/dist/assets/{app-info-YYU2hCWc.js → app-info-BVPfn1o-.js} +1 -1
  19. package/dist/assets/archive-redirect-page-cT5j1h2R.js +1 -0
  20. package/dist/assets/assistant-handle-modal-DU_Bi5lj.js +1 -0
  21. package/dist/assets/assistant-inbox-DPTo53YN.js +1 -0
  22. package/dist/assets/assistant-inbox-Di7EBVwM.js +1 -0
  23. package/dist/assets/assistant-inbox-DlwqAvim.js +1 -0
  24. package/dist/assets/assistant-inbox-page-route-Dw4GCqM1.js +8 -0
  25. package/dist/assets/assistant-inbox-qd_s59_T.js +1 -0
  26. package/dist/assets/{assistant-inbox-upgrade-body-BC-REEBi.js → assistant-inbox-upgrade-body-CBD3c6AS.js} +1 -1
  27. package/dist/assets/{assistant-status-panel-uJMo_YOD.js → assistant-status-panel-Bs62PMa_.js} +1 -1
  28. package/dist/assets/auth-store-BEWaJpfT.js +1 -0
  29. package/dist/assets/{auth-welcome-screen-uOY9YbXG.js → auth-welcome-screen-Cf7g-gHo.js} +1 -1
  30. package/dist/assets/avatar-bundled-components-BFd94a0P.js +1 -0
  31. package/dist/assets/avatar-random-CxZqXUyu.js +2 -0
  32. package/dist/assets/{await-org-header-settled-dTqfGHq2.js → await-org-header-settled-nRYfVnwu.js} +1 -1
  33. package/dist/assets/background-task-detail-panel-CF6XbrmR.js +1 -0
  34. package/dist/assets/billing-page-CNpzPATR.js +3 -0
  35. package/dist/assets/{billing-redirect-page-DK5z_EZp.js → billing-redirect-page-Bqnd8dyK.js} +1 -1
  36. package/dist/assets/bookmarks-page-Keh2H3Nn.js +1 -0
  37. package/dist/assets/{bundle-confirm-page-Co72y9XS.js → bundle-confirm-page-BxltrwcH.js} +1 -1
  38. package/dist/assets/channel-transcript-panel-Bwft4mMS.js +1 -0
  39. package/dist/assets/{channels-CVJ5zeqt.js → channels-BGZqsCyH.js} +1 -1
  40. package/dist/assets/{channels-DhvDj55h.js → channels-CZ6bOgaK.js} +1 -1
  41. package/dist/assets/{channels-DBlx6QsN.js → channels-DTkJHg8Z.js} +1 -1
  42. package/dist/assets/{channels-RsZsrZWR.js → channels-Gl4ycvIi.js} +1 -1
  43. package/dist/assets/channels-page-route-DCcDWM0Z.js +1 -0
  44. package/dist/assets/chat-BTYwT-Iz.js +5 -0
  45. package/dist/assets/chat-CYQ7D6re.js +5 -0
  46. package/dist/assets/chat-Cap3ZeFn.js +5 -0
  47. package/dist/assets/chat-DBgqSGT1.js +5 -0
  48. package/dist/assets/chat-info-panel-B9qlEkS8.js +1 -0
  49. package/dist/assets/checkout-continuation-BvAhCXvm.js +1 -0
  50. package/dist/assets/checkout-page-CvFPqG8M.js +1 -0
  51. package/dist/assets/checkout-return-target-Di4-pUK2.js +1 -0
  52. package/dist/assets/command-palette-BCXZZBTF.js +1 -0
  53. package/dist/assets/command-palette-DVQnjo0j.js +1 -0
  54. package/dist/assets/{command-palette-window-page-DCE-g55A.js → command-palette-window-page-DJT_jivG.js} +1 -1
  55. package/dist/assets/common-BD7jAX3p.js +1 -0
  56. package/dist/assets/common-C6oFwvW0.js +1 -0
  57. package/dist/assets/common-ClKW2YC6.js +1 -0
  58. package/dist/assets/common-GD9uXbfP.js +1 -0
  59. package/dist/assets/{community-page-BJxApcxO.js → community-page-nHBkefsX.js} +1 -1
  60. package/dist/assets/{companion-accent-Cp2MmcWR.js → companion-accent-C7yt1eqa.js} +1 -1
  61. package/dist/assets/{companion-dock-zones-page-Zvhwz0Yz.js → companion-dock-zones-page-DeHzEbL5.js} +1 -1
  62. package/dist/assets/{companion-layout-cM6NtktC.js → companion-layout-BPcWtStb.js} +1 -1
  63. package/dist/assets/{companion-popover-D2taDck6.js → companion-popover-CiXhsUHZ.js} +1 -1
  64. package/dist/assets/companion-popover-page-Da3nHMcF.js +1 -0
  65. package/dist/assets/companion-surface-RWTMh6gR.js +1 -0
  66. package/dist/assets/companion-surface-page-CH4LFjA9.js +1 -0
  67. package/dist/assets/companion-tour-entry-jyMiJZCC.js +1 -0
  68. package/dist/assets/{companion-watch-frame-page-CIEEUVOP.js → companion-watch-frame-page-kV8Rrn1y.js} +1 -1
  69. package/dist/assets/{connect-page-CILP_iqJ.js → connect-page-DLcRu261.js} +1 -1
  70. package/dist/assets/{consent-controls-ole3UEoz.js → consent-controls-CH9h3kH3.js} +1 -1
  71. package/dist/assets/contacts-BTmOfEVL.js +1 -0
  72. package/dist/assets/contacts-Cxz-DyYF.js +1 -0
  73. package/dist/assets/contacts-DgC-8PHB.js +1 -0
  74. package/dist/assets/contacts-gateway-Cm56diW2.js +1 -0
  75. package/dist/assets/contacts-mijLgegD.js +1 -0
  76. package/dist/assets/contacts-page-route-_NGr_6oJ.js +1 -0
  77. package/dist/assets/{copy-button-CzMsh4gB.js → copy-button-dNWQd4Mv.js} +1 -1
  78. package/dist/assets/{credential-entry-page-CueibLp2.js → credential-entry-page-CkpYB_77.js} +1 -1
  79. package/dist/assets/credentials-page--0UkZN6l.js +1 -0
  80. package/dist/assets/csv-preview-BdRwzKAU.js +1 -0
  81. package/dist/assets/danger-zone-redirect-page-BuaT1_Qw.js +1 -0
  82. package/dist/assets/debug-page-BokSWqVH.js +4 -0
  83. package/dist/assets/deploy-dialogs-BkY6C0tR.js +1 -0
  84. package/dist/assets/deploy-dialogs-_Zy57TOa.js +1 -0
  85. package/dist/assets/desktop-preview-content-BCXkV_8I.js +2 -0
  86. package/dist/assets/{desktop-status-CG431FNc.js → desktop-status-COfQgYrK.js} +1 -1
  87. package/dist/assets/{desktop-viewer-DwehmMBT.js → desktop-viewer-DwP16UW2.js} +2 -2
  88. package/dist/assets/{detail-card-DaoCCbYV.js → detail-card-D4zKx03d.js} +1 -1
  89. package/dist/assets/{detail-panel-stop-button-CZfhwEjC.js → detail-panel-stop-button-BE40AoTZ.js} +1 -1
  90. package/dist/assets/detail-primitives-BFWcvOIj.js +1 -0
  91. package/dist/assets/developer-page-Cw8EPVEc.js +1 -0
  92. package/dist/assets/devices-redirect-page-D1L2kvRG.js +1 -0
  93. package/dist/assets/{dictation-overlay-page-DF-XpmHA.js → dictation-overlay-page-BXlKQvCD.js} +1 -1
  94. package/dist/assets/document-load-BEkIFq0U.js +1 -0
  95. package/dist/assets/{document-load-CcDODImt.js → document-load-CfYfynz3.js} +1 -1
  96. package/dist/assets/document-viewer-page-DHxU28bI.js +1 -0
  97. package/dist/assets/emails-page-BnVS4o6j.js +1 -0
  98. package/dist/assets/esm-5n5jSt3e.js +2 -0
  99. package/dist/assets/esm-B5HvNA2f.js +1 -0
  100. package/dist/assets/esm-BVAuvmyr.js +2 -0
  101. package/dist/assets/esm-CIgMNIdz.js +1 -0
  102. package/dist/assets/{esm-DwBaOLRL.js → esm-COgrn4oo.js} +2 -2
  103. package/dist/assets/esm-CvOYazPQ.js +2 -0
  104. package/dist/assets/{esm-C8UCMV_0.js → esm-DFoZ6rpj.js} +1 -1
  105. package/dist/assets/{esm-DWsMY4a8.js → esm-DPwp_tyY.js} +1 -1
  106. package/dist/assets/esm-DetZupO7.js +2 -0
  107. package/dist/assets/esm-DpDUzGbk.js +2 -0
  108. package/dist/assets/{file-diff-view-bwx_MkXN.js → file-diff-view-uNXZX_5q.js} +1 -1
  109. package/dist/assets/file-view-mode-C3psjEfg.js +3 -0
  110. package/dist/assets/general-page-qSzUCXnA.js +2 -0
  111. package/dist/assets/hatching-screen-DELFYI9c.js +1 -0
  112. package/dist/assets/home-BI-fzzA0.js +1 -0
  113. package/dist/assets/home-BZGFmZ0D.js +1 -0
  114. package/dist/assets/home-CM9kRnjx.js +1 -0
  115. package/dist/assets/home-D4Knhe9B.js +1 -0
  116. package/dist/assets/{hosting-screen-BA7wRb0n.js → hosting-screen-bqc6aMjj.js} +1 -1
  117. package/dist/assets/identity-page-route-BNKtl3k8.js +7 -0
  118. package/dist/assets/inspect-page-Cpa3np9U.js +8 -0
  119. package/dist/assets/integrations-page-HPwVt_3v.js +1 -0
  120. package/dist/assets/{intelligence-BuFYEa5r.js → intelligence-BMe5g8FT.js} +1 -1
  121. package/dist/assets/{intelligence-CRA2olQk.js → intelligence-D-kO_fqT.js} +1 -1
  122. package/dist/assets/{intelligence--e-W2Pdt.js → intelligence-DqSNtb4m.js} +1 -1
  123. package/dist/assets/{intelligence-Ctt6Qr1d.js → intelligence-TbEk4Dsd.js} +1 -1
  124. package/dist/assets/intelligence-layout-0GsEXK7p.js +1 -0
  125. package/dist/assets/intelligence-layout-slots-store-DMLutIHV.js +1 -0
  126. package/dist/assets/jszip.min-CDIVkZfG.js +2 -0
  127. package/dist/assets/keyboard-shortcuts-redirect-page-Bd7lXdXX.js +1 -0
  128. package/dist/assets/{latest-assistant-text-DFGZImdA.js → latest-assistant-text-DglgIj6y.js} +1 -1
  129. package/dist/assets/{library-detail-page-Db0s21ez.js → library-detail-page-B7pBRfoi.js} +1 -1
  130. package/dist/assets/library-page-L4W-xpt-.js +1 -0
  131. package/dist/assets/list-detail-navigation-ChFNCRwF.js +1 -0
  132. package/dist/assets/local-mode-DBz3KC1d.js +1 -0
  133. package/dist/assets/login-page-BGKAlYwF.js +1 -0
  134. package/dist/assets/logout-page-BZeFNpfr.js +1 -0
  135. package/dist/assets/{logs-layout-C0DDeC5h.js → logs-layout-BEspUUlK.js} +1 -1
  136. package/dist/assets/markdown-preview-DW1TFHKg.js +1 -0
  137. package/dist/assets/{media-preview-CVf1UuE9.js → media-preview-CqU6YsEJ.js} +1 -1
  138. package/dist/assets/memory-page-route-Z3ZXItT4.js +2 -0
  139. package/dist/assets/{memory-router-playground-page-BudLOTc4.js → memory-router-playground-page-CzpucJPF.js} +1 -1
  140. package/dist/assets/{message-files-panel-Qq9UEaxA.js → message-files-panel-EwakPRjB.js} +1 -1
  141. package/dist/assets/native-attachment-pickers-wJIRbAeJ.js +1 -0
  142. package/dist/assets/native-file-DZiM21tm.js +1 -0
  143. package/dist/assets/notifications-page-CR4fvshf.js +1 -0
  144. package/dist/assets/{oauth-complete-page-Cypawil4.js → oauth-complete-page-DxkshBx-.js} +1 -1
  145. package/dist/assets/{oauth-popup-complete-page-CWQF6Tbc.js → oauth-popup-complete-page-BAU5Za0n.js} +2 -2
  146. package/dist/assets/paired-platform-identity-DJwJC3jQ.js +1 -0
  147. package/dist/assets/{pairing-page-OjkCjTgJ.js → pairing-page-GUjtKhMu.js} +1 -1
  148. package/dist/assets/password-reset-page-oBo5k7hR.js +1 -0
  149. package/dist/assets/pdf-file-preview-C3aGfZwx.js +1 -0
  150. package/dist/assets/{peeking-eyes-B3XMFLXD.js → peeking-eyes-C3X1d6Jj.js} +1 -1
  151. package/dist/assets/permission-guide-page-BDQa9L53.js +1 -0
  152. package/dist/assets/permission-guide-page-D6FWkh5j.css +1 -0
  153. package/dist/assets/permission-setup-Bb_0U96E.js +1 -0
  154. package/dist/assets/personality-page-CcCZDENz.js +1 -0
  155. package/dist/assets/personality-page-DFFk9Pj1.js +1 -0
  156. package/dist/assets/personality-sliders-CzqyS7A4.js +1 -0
  157. package/dist/assets/plans-page-Bl8f11RI.js +1 -0
  158. package/dist/assets/{platform-loopback-page-Dr-fFIwU.js → platform-loopback-page-Bwg44Rey.js} +1 -1
  159. package/dist/assets/{plugin-detail-page-B3Rx7z27.js → plugin-detail-page-D69IH1B3.js} +1 -1
  160. package/dist/assets/{plugins-page-DN9rPLRn.js → plugins-page-CVRW2_Se.js} +1 -1
  161. package/dist/assets/plugins-surface-4C_D08UG.js +1 -0
  162. package/dist/assets/{preview-error-DB2rjYvO.js → preview-error-DxF2Tmoi.js} +1 -1
  163. package/dist/assets/privacy-page-oVABVdz3.js +1 -0
  164. package/dist/assets/{privacy-screen-grsFP0UO.js → privacy-screen-Y0AB3UYU.js} +1 -1
  165. package/dist/assets/profile-card-Dz4jh2RX.js +1 -0
  166. package/dist/assets/{provider-callback-page-g4qnXUAS.js → provider-callback-page-8Z8sN5CU.js} +1 -1
  167. package/dist/assets/{provider-key-CK86YQ0g.js → provider-key-CmM_Jfh9.js} +1 -1
  168. package/dist/assets/{provider-signup-page-Ce4IEtKF.js → provider-signup-page-DCuuyMbB.js} +1 -1
  169. package/dist/assets/{provisioning-targets-Csh2mGBG.js → provisioning-targets-CihW-82c.js} +1 -1
  170. package/dist/assets/{quick-input-page-BJ-kLGi7.js → quick-input-page-B1jsbN3h.js} +1 -1
  171. package/dist/assets/referral-modal-C2KWqPrB.js +1 -0
  172. package/dist/assets/referral-modal-DlLNHhaM.js +1 -0
  173. package/dist/assets/{rehype-katex-thSVJn2u.js → rehype-katex-DWUGzNKD.js} +3 -3
  174. package/dist/assets/{research-mock-page-bXHr3HJ1.js → research-mock-page-CH-n637O.js} +1 -1
  175. package/dist/assets/research-onboarding-route-D8XVAkoR.js +50 -0
  176. package/dist/assets/review-terms-screen-4Q7Q5PXO.js +1 -0
  177. package/dist/assets/routes-CyFL2-wp.js +1 -0
  178. package/dist/assets/schedules-4TEe3Tuj.js +1 -0
  179. package/dist/assets/schedules-page-BkYY8e4x.js +1 -0
  180. package/dist/assets/security-redirect-page-FzTFgwya.js +1 -0
  181. package/dist/assets/select-assistant-screen-CGZpmW1b.js +1 -0
  182. package/dist/assets/{self-hosted-servers-CJjUOVLQ.js → self-hosted-servers-BCp7q5Jm.js} +1 -1
  183. package/dist/assets/{service-form-controls-DwwYjgqa.js → service-form-controls-DdbS5OAS.js} +1 -1
  184. package/dist/assets/{setting-row-D7xTN4Nd.js → setting-row-BiK74hlg.js} +1 -1
  185. package/dist/assets/settings-B0hc8479.js +3 -0
  186. package/dist/assets/settings-BOMjAZEC.js +3 -0
  187. package/dist/assets/settings-C13E9nrT.js +3 -0
  188. package/dist/assets/settings-layout-ZhB2RisX.js +1 -0
  189. package/dist/assets/settings-tIlbF60d.js +3 -0
  190. package/dist/assets/share-feedback-modal-Cpmo1uuR.js +1 -0
  191. package/dist/assets/share-feedback-modal-D2mtB9LE.js +2 -0
  192. package/dist/assets/{sidebar-tree-CqElNW5F.js → sidebar-tree-CVZl8Tgn.js} +1 -1
  193. package/dist/assets/{signup-page-ZDm4OjY3.js → signup-page--rSmkruA.js} +1 -1
  194. package/dist/assets/{signup-shell-kgxV4p4a.js → signup-shell-DlfJxk7w.js} +1 -1
  195. package/dist/assets/skill-detail-page-Hn3SvTdx.js +2 -0
  196. package/dist/assets/skill-detail-panel-BP4SLqhj.js +1 -0
  197. package/dist/assets/{skill-removal-dialog-DfBhw0Lh.js → skill-removal-dialog-V-dA4mSf.js} +1 -1
  198. package/dist/assets/{skills-page-CamB2mns.js → skills-page-DRntcABj.js} +1 -1
  199. package/dist/assets/{sounds-page-Bj48pTCF.js → sounds-page-BQag2JVp.js} +1 -1
  200. package/dist/assets/{start-screen-DtUnAChR.js → start-screen-DXZfwRNY.js} +1 -1
  201. package/dist/assets/step-detail-header-C7ftV1QU.js +1 -0
  202. package/dist/assets/stt-language-picker-modal-BinBfL2G.js +1 -0
  203. package/dist/assets/subagent-detail-panel-BsXUxHJ9.js +1 -0
  204. package/dist/assets/superpowers-page-C3wK8jrZ.js +1 -0
  205. package/dist/assets/system-events-page-BhabIo6N.js +1 -0
  206. package/dist/assets/system-events-redirect-page-Cy3nFDli.js +1 -0
  207. package/dist/assets/tabular-grid-CWJbCvkG.js +4 -0
  208. package/dist/assets/teleport-gateway-client-C5sVee7e.js +1 -0
  209. package/dist/assets/{text-preview-CUqsudgl.js → text-preview-DarB6e-t.js} +1 -1
  210. package/dist/assets/{theme-stage-page-HhLVo3o6.js → theme-stage-page-Cegm2fmk.js} +1 -1
  211. package/dist/assets/{tiptap-document-editor-rY7Mbt4u.js → tiptap-document-editor-Dgqk7iz_.js} +5 -3
  212. package/dist/assets/tool-detail-panel-DxIHkPt4.js +16 -0
  213. package/dist/assets/tool-detail-panel-TzZcdTQN.js +1 -0
  214. package/dist/assets/{trait-cycle-row-C-mybyb7.js → trait-cycle-row-Dqu0P27v.js} +1 -1
  215. package/dist/assets/upgrade-cancel-page-BfLLWBrR.js +1 -0
  216. package/dist/assets/{upgrade-success-page-3efxDP6a.js → upgrade-success-page-Bq7QrpOB.js} +1 -1
  217. package/dist/assets/{usage-redirect-page-D4aGhmzR.js → usage-redirect-page-CJpHAGBB.js} +1 -1
  218. package/dist/assets/use-app-delete-xNFYxcdj.js +1 -0
  219. package/dist/assets/use-assistant-identity-details-B1Awc0ji.js +1 -0
  220. package/dist/assets/use-async-read-DcRLxtMN.js +1 -0
  221. package/dist/assets/use-checkout-dismiss-refresh-jQ3TBYKS.js +1 -0
  222. package/dist/assets/{use-edge-swipe-back-DjHkqNOJ.js → use-edge-swipe-back-Dc6KFeSJ.js} +1 -1
  223. package/dist/assets/{use-hotkey-recorder-OFYAQ-HC.js → use-hotkey-recorder-DmcwEQhK.js} +1 -1
  224. package/dist/assets/use-invite-link-dialog-BFYX67b2.js +1 -0
  225. package/dist/assets/use-plugins-list-DBn3mbVB.js +1 -0
  226. package/dist/assets/use-return-to-short-circuit-DpeEsJ7h.js +1 -0
  227. package/dist/assets/use-side-list-room-DCJYSksY.js +1 -0
  228. package/dist/assets/use-skill-actions-6xXlmgbJ.js +1 -0
  229. package/dist/assets/use-skill-detail-files-CmbXP01U.js +1 -0
  230. package/dist/assets/use-supports-credentials-settings-BTrxlFxg.js +1 -0
  231. package/dist/assets/use-transcript-message-by-id-DyxaLSdN.js +1 -0
  232. package/dist/assets/use-truncated-blob-text-D6z6oSIj.js +1 -0
  233. package/dist/assets/vendor-DLH51Vjf.js +129 -0
  234. package/dist/assets/voice-page-DBRy5mEX.js +1 -0
  235. package/dist/assets/{wake-detail-panel-CeBICW69.js → wake-detail-panel-PnXrTDs3.js} +1 -1
  236. package/dist/assets/{weather-forecast-display-ULwhP9mt.js → weather-forecast-display-7oemCHYr.js} +1 -1
  237. package/dist/assets/{web-BWLYaK7a.js → web-BlKAJber.js} +1 -1
  238. package/dist/assets/{web-oF09CLSz.js → web-BmoVVmPZ.js} +1 -1
  239. package/dist/assets/{web-BEVUSoB9.js → web-C2Y5uOI1.js} +1 -1
  240. package/dist/assets/{web-BBVXWl3M.js → web-CAi9YePi.js} +1 -1
  241. package/dist/assets/{web-BAiOHSei.js → web-D0qh5Vlp.js} +1 -1
  242. package/dist/assets/{web-BAt0F8Hi.js → web-D5UHHnMG.js} +1 -1
  243. package/dist/assets/{web-sMUe1qc9.js → web-DZvE04fg.js} +1 -1
  244. package/dist/assets/{web-Brmr3_xZ.js → web-Xy5dhNHF.js} +1 -1
  245. package/dist/assets/{web-BdTOO1Z3.js → web-vcW3se1t.js} +1 -1
  246. package/dist/assets/welcome-screen-CtU9w0--.js +1 -0
  247. package/dist/assets/workflow-detail-panel-CoJLEQuv.js +1 -0
  248. package/dist/assets/{workspace-BQkwQJkh.js → workspace-C9KC9iRh.js} +1 -1
  249. package/dist/assets/{workspace-CkPbNpj-.js → workspace-Ca5KeX1D.js} +1 -1
  250. package/dist/assets/{workspace-BO5I0IXW.js → workspace-CkvlMlZG.js} +1 -1
  251. package/dist/assets/{workspace-UoSuwY63.js → workspace-OBnbhjU7.js} +1 -1
  252. package/dist/assets/workspace-page-BxO4Td2a.js +1 -0
  253. package/dist/assets/workspace-page-DGL905Oc.css +1 -0
  254. package/dist/assets/xlsx-preview-5RzKRM0T.js +1 -0
  255. package/dist/images/integrations/wix-mcp.png +0 -0
  256. package/dist/index.html +3 -3
  257. package/package.json +1 -1
  258. package/dist/assets/acp-run-detail-panel-BA9xGUzb.js +0 -3
  259. package/dist/assets/activation-list-route-Br9gsfSd.js +0 -1
  260. package/dist/assets/activity-steps-panel-88l6Ei6w.js +0 -1
  261. package/dist/assets/add-credits-modal-0pYLUDo4.js +0 -1
  262. package/dist/assets/ai-page-DU0mYnYP.js +0 -1
  263. package/dist/assets/all-chats-page-route-CkFi0Q7K.js +0 -1
  264. package/dist/assets/android-billing-handoff-C06TxyLt.js +0 -1
  265. package/dist/assets/app-BNyW7BqZ.css +0 -2
  266. package/dist/assets/app-Qc-rYPt9.js +0 -392
  267. package/dist/assets/archive-redirect-page-AYY4xZby.js +0 -1
  268. package/dist/assets/assistant-handle-modal-BZJgqpG8.js +0 -1
  269. package/dist/assets/assistant-inbox-Bt58UfV-.js +0 -1
  270. package/dist/assets/assistant-inbox-C_kJlDrW.js +0 -1
  271. package/dist/assets/assistant-inbox-DcUz6DF5.js +0 -1
  272. package/dist/assets/assistant-inbox-pCy-s4Sf.js +0 -1
  273. package/dist/assets/assistant-inbox-page-route-B61doUw8.js +0 -8
  274. package/dist/assets/auth-store-FcZEUxA_.js +0 -1
  275. package/dist/assets/avatar-bundled-components-DcmDX83d.js +0 -1
  276. package/dist/assets/avatar-random-DxLJmo42.js +0 -2
  277. package/dist/assets/background-task-detail-panel-CBjRAdga.js +0 -1
  278. package/dist/assets/billing-page-CA6R2wjZ.js +0 -3
  279. package/dist/assets/bookmarks-page-DPEug6V3.js +0 -1
  280. package/dist/assets/channel-transcript-panel-B0cRZsgw.js +0 -1
  281. package/dist/assets/channels-page-route-V3Fk_Hzf.js +0 -1
  282. package/dist/assets/chat-BQddXCk9.js +0 -3
  283. package/dist/assets/chat-BZsmqRU3.js +0 -3
  284. package/dist/assets/chat-C6WWTxFu.js +0 -3
  285. package/dist/assets/chat-D7FyK_n_.js +0 -3
  286. package/dist/assets/chat-info-panel-Bv1Aet5S.js +0 -1
  287. package/dist/assets/checkout-continuation-c9cPR68T.js +0 -1
  288. package/dist/assets/checkout-page-Cq5DAqbf.js +0 -1
  289. package/dist/assets/checkout-return-target-CA5-Gi7-.js +0 -1
  290. package/dist/assets/command-palette-BUCV7aZK.js +0 -1
  291. package/dist/assets/command-palette-Drf-HDLE.js +0 -1
  292. package/dist/assets/common-C7iok8sT.js +0 -1
  293. package/dist/assets/common-CMLZe_W6.js +0 -1
  294. package/dist/assets/common-Dgnh0Njn.js +0 -1
  295. package/dist/assets/common-QPQ83NEi.js +0 -1
  296. package/dist/assets/companion-popover-page-DGS-UTTL.js +0 -1
  297. package/dist/assets/companion-surface-oVNh5kA4.js +0 -1
  298. package/dist/assets/companion-surface-page-CXiHLf2G.js +0 -1
  299. package/dist/assets/companion-tour-entry-CpXEfiiz.js +0 -1
  300. package/dist/assets/contacts-Cj3nM0Gh.js +0 -1
  301. package/dist/assets/contacts-D4q-Pkbe.js +0 -1
  302. package/dist/assets/contacts-DFOqWav8.js +0 -1
  303. package/dist/assets/contacts-DUVw_0SR.js +0 -1
  304. package/dist/assets/contacts-gateway-zkBOSVyx.js +0 -1
  305. package/dist/assets/contacts-page-route-GyaYbluM.js +0 -1
  306. package/dist/assets/credentials-page-DgmnWmph.js +0 -1
  307. package/dist/assets/csv-preview-CemRbf9W.js +0 -4
  308. package/dist/assets/danger-zone-redirect-page-BJ31hZvD.js +0 -1
  309. package/dist/assets/debug-page-CYN-HFc_.js +0 -4
  310. package/dist/assets/deploy-dialogs-C_aIE0ti.js +0 -1
  311. package/dist/assets/deploy-dialogs-DP0ls5p1.js +0 -1
  312. package/dist/assets/desktop-preview-content-BmkyExHH.js +0 -2
  313. package/dist/assets/detail-primitives-B2TDPtFR.js +0 -1
  314. package/dist/assets/developer-page-e5ZIJFP5.js +0 -1
  315. package/dist/assets/devices-redirect-page-Dq7s97Ga.js +0 -1
  316. package/dist/assets/document-load-88Gh0gTG.js +0 -1
  317. package/dist/assets/document-viewer-page-DiD-zvuQ.js +0 -1
  318. package/dist/assets/emails-page-6gtVUatK.js +0 -1
  319. package/dist/assets/esm-BIibMYYI.js +0 -2
  320. package/dist/assets/esm-C2UI3fJI.js +0 -1
  321. package/dist/assets/esm-CKmAcBkR.js +0 -2
  322. package/dist/assets/esm-Cdr0McT5.js +0 -2
  323. package/dist/assets/esm-DwZucAaM.js +0 -2
  324. package/dist/assets/esm-RkUhkAaB.js +0 -1
  325. package/dist/assets/esm-hIaXWbzt.js +0 -2
  326. package/dist/assets/file-editor-D0P-Gy-a.js +0 -1
  327. package/dist/assets/general-page-BZQ7yEvH.js +0 -2
  328. package/dist/assets/hatching-screen-DBprFgEA.js +0 -1
  329. package/dist/assets/home-BPS0f4TE.js +0 -1
  330. package/dist/assets/home-CQg1DdTP.js +0 -1
  331. package/dist/assets/home-D8aw_BU0.js +0 -1
  332. package/dist/assets/home-DNL59CrR.js +0 -1
  333. package/dist/assets/identity-page-route-BfgfhU08.js +0 -7
  334. package/dist/assets/inspect-page-CH3uVGix.js +0 -9
  335. package/dist/assets/integrations-page-0clh02lf.js +0 -1
  336. package/dist/assets/intelligence-layout-CC6J5rMH.js +0 -1
  337. package/dist/assets/intelligence-layout-slots-store-BrxvOjyS.js +0 -1
  338. package/dist/assets/keyboard-shortcuts-redirect-page-B1HB0ZJQ.js +0 -1
  339. package/dist/assets/library-page-CHncUGxN.js +0 -1
  340. package/dist/assets/local-mode-D_-1ec4p.js +0 -1
  341. package/dist/assets/login-page-D2uVokBF.js +0 -1
  342. package/dist/assets/logout-page-H2ViUr-T.js +0 -1
  343. package/dist/assets/markdown-preview-BJR1Lp-C.js +0 -1
  344. package/dist/assets/memory-page-route-BBFz1YiU.js +0 -2
  345. package/dist/assets/metric-card-lmiHO3PF.js +0 -1
  346. package/dist/assets/native-attachment-pickers-BhYBtKp-.js +0 -1
  347. package/dist/assets/native-file-D0FCYmrg.js +0 -1
  348. package/dist/assets/notifications-page-BmNyEMIk.js +0 -1
  349. package/dist/assets/paired-platform-identity-BqBlEtsv.js +0 -1
  350. package/dist/assets/password-reset-page-DakZp7KC.js +0 -1
  351. package/dist/assets/pdf-file-preview-BxCXMhqC.js +0 -1
  352. package/dist/assets/personality-page-BU6yPK14.js +0 -1
  353. package/dist/assets/personality-page-Dm9LQmBW.js +0 -1
  354. package/dist/assets/personality-sliders-Dehyaji_.js +0 -1
  355. package/dist/assets/plans-page-CAyi2Nxa.js +0 -1
  356. package/dist/assets/plugins-surface-CrFNy0ps.js +0 -1
  357. package/dist/assets/privacy-page-BcpCT1Vb.js +0 -1
  358. package/dist/assets/profile-card-BP9AMkh4.js +0 -1
  359. package/dist/assets/referral-modal-Bd_Bwh5m.js +0 -1
  360. package/dist/assets/referral-modal-Ts_6L7Jq.js +0 -1
  361. package/dist/assets/research-onboarding-route-BXcRnuIA.js +0 -50
  362. package/dist/assets/review-terms-screen-DZCb5jS5.js +0 -1
  363. package/dist/assets/routes-CpEsYa-V.js +0 -1
  364. package/dist/assets/schedules-EEPosYPL.js +0 -1
  365. package/dist/assets/schedules-page-Dqs-gg7s.js +0 -1
  366. package/dist/assets/security-redirect-page-BUtDM_HH.js +0 -1
  367. package/dist/assets/select-assistant-screen-BOubdStJ.js +0 -1
  368. package/dist/assets/settings-BINiGaSx.js +0 -3
  369. package/dist/assets/settings-BMnYDo1R.js +0 -3
  370. package/dist/assets/settings-DJn8gNBn.js +0 -3
  371. package/dist/assets/settings-divider-y1Y7piXi.js +0 -1
  372. package/dist/assets/settings-jhraG5hY.js +0 -3
  373. package/dist/assets/settings-layout-7t6GBbdu.js +0 -1
  374. package/dist/assets/share-feedback-modal-DnH2sXjE.js +0 -2
  375. package/dist/assets/share-feedback-modal-DuI0v7AI.js +0 -1
  376. package/dist/assets/skill-detail-page-nWwa0XFq.js +0 -2
  377. package/dist/assets/skill-detail-panel-9H7ft8ro.js +0 -1
  378. package/dist/assets/stt-language-picker-modal-Dgcq9xkd.js +0 -1
  379. package/dist/assets/subagent-detail-panel-U4m5BxZG.js +0 -1
  380. package/dist/assets/superpowers-page-WkwbyGXZ.js +0 -1
  381. package/dist/assets/system-events-page-Bw9HBTD3.js +0 -1
  382. package/dist/assets/system-events-redirect-page-BfQvezRk.js +0 -1
  383. package/dist/assets/tool-detail-panel-B9PQpvb8.js +0 -16
  384. package/dist/assets/tool-detail-panel-Bt4vBf09.js +0 -1
  385. package/dist/assets/upgrade-cancel-page-CfqBVU8V.js +0 -1
  386. package/dist/assets/use-app-delete-vuGBgQkn.js +0 -1
  387. package/dist/assets/use-assistant-identity-details-CrWNdPFJ.js +0 -1
  388. package/dist/assets/use-checkout-dismiss-refresh-BwT2zWIT.js +0 -1
  389. package/dist/assets/use-invite-link-dialog-CCACCzhi.js +0 -1
  390. package/dist/assets/use-plugins-list-D-azzToZ.js +0 -1
  391. package/dist/assets/use-return-to-short-circuit-CpUBlNYt.js +0 -1
  392. package/dist/assets/use-side-list-room-DoHREePf.js +0 -1
  393. package/dist/assets/use-skill-actions-DG-ZngUy.js +0 -1
  394. package/dist/assets/use-skill-detail-files-CHrwga8E.js +0 -1
  395. package/dist/assets/use-supports-credentials-settings-Bq6T6gWf.js +0 -1
  396. package/dist/assets/use-transcript-message-by-id-Bfbshp9w.js +0 -1
  397. package/dist/assets/use-truncated-blob-text-hsQUTRQS.js +0 -1
  398. package/dist/assets/vendor-DEhKVoiV.js +0 -127
  399. package/dist/assets/voice-page-DiAOJ_tF.js +0 -1
  400. package/dist/assets/welcome-screen-DgJPqZ2G.js +0 -1
  401. package/dist/assets/workflow-detail-panel-DmsjHIzU.js +0 -1
  402. package/dist/assets/workspace-page-DHnNp7n8.js +0 -1
  403. /package/dist/assets/{account-CbGEbks2.js → account-BkxBMG9Z.js} +0 -0
  404. /package/dist/assets/{account-CumXdfDs.js → account-D5JdUO7K.js} +0 -0
  405. /package/dist/assets/{account-DmCG0I7Y.js → account-DYG79724.js} +0 -0
  406. /package/dist/assets/{account-CFZslirV.js → account-OIF2BHH7.js} +0 -0
  407. /package/dist/assets/{activation-Bly8xYKj.js → activation-C91KPzrh.js} +0 -0
  408. /package/dist/assets/{activation-CV4BcpUb.js → activation-Dd7eAIHs.js} +0 -0
  409. /package/dist/assets/{activation-Cn5oNHNz.js → activation-ReimSfhn.js} +0 -0
  410. /package/dist/assets/{activation-tasks-Xby0ArJP.js → activation-tasks-D4dorV2v.js} +0 -0
  411. /package/dist/assets/{activation-tasks-CDweZ7KB.js → activation-tasks-efxGWsFw.js} +0 -0
  412. /package/dist/assets/{activation-DtrycgQA.js → activation-tasks-rViOqW7C.js} +0 -0
  413. /package/dist/assets/{activation-tasks-CixG0BPC.js → activation-tasks-wtMwJ0EV.js} +0 -0
  414. /package/dist/assets/{activation-tasks-DLwbX7H6.js → activation-yoBQ36AY.js} +0 -0
  415. /package/dist/assets/{app-types-oLaS-mTA.js → app-types-BoY_FOAH.js} +0 -0
  416. /package/dist/assets/{build.umd-BaRFq_Ke.js → build.umd-B0ATW5UM.js} +0 -0
  417. /package/dist/assets/{credential-requests-eqWotlgu.js → credential-requests-CmFaXPwz.js} +0 -0
  418. /package/dist/assets/{credential-requests-BeJ7dLjs.js → credential-requests-D3J3i5oa.js} +0 -0
  419. /package/dist/assets/{credential-requests-CF1Ijjel.js → credential-requests-gl4lfjL4.js} +0 -0
  420. /package/dist/assets/{credential-requests-LPv1X_JL.js → credential-requests-h908NRpv.js} +0 -0
  421. /package/dist/assets/{definitions-DgScTjwR.js → definitions-BUCExH-9.js} +0 -0
  422. /package/dist/assets/{definitions-BSvId-nJ.js → definitions-DpZNNWA7.js} +0 -0
  423. /package/dist/assets/{diff-rows-BqIfjsWM.js → diff-rows-D2cn4P1P.js} +0 -0
  424. /package/dist/assets/{emoji-catalog-data-BA5JcZe8.js → emoji-catalog-data-DsyEWO16.js} +0 -0
  425. /package/dist/assets/{format-countdown-D18PVUfL.js → format-countdown-l7vj-IPm.js} +0 -0
  426. /package/dist/assets/{is-record-M98oimiB.js → is-record-CNwRuI6a.js} +0 -0
  427. /package/dist/assets/{library-BIeEceZf.js → library-CFGvGWZt.js} +0 -0
  428. /package/dist/assets/{library-CGe-F8G4.js → library-CmSFUt9r.js} +0 -0
  429. /package/dist/assets/{library-BDlOjOSg.js → library-D26ezl8B.js} +0 -0
  430. /package/dist/assets/{library-Dq184-kl.js → library-Dv9w5D8Z.js} +0 -0
  431. /package/dist/assets/{link-click-IkiMmOF_.js → link-click-CR9uUEsb.js} +0 -0
  432. /package/dist/assets/{logs-CN-P4Dk3.js → logs-5jFWrQRx.js} +0 -0
  433. /package/dist/assets/{logs-kLiH3IW-.js → logs-BJTGRcSn.js} +0 -0
  434. /package/dist/assets/{logs-CM1ISsDq.js → logs-BPrpYBp7.js} +0 -0
  435. /package/dist/assets/{logs-vLJHUPMP.js → logs-BpX8Zuzb.js} +0 -0
  436. /package/dist/assets/{machine-sizes-BWbhowrp.js → machine-sizes-srbag24Q.js} +0 -0
  437. /package/dist/assets/{onboarding-EqfHzA5u.js → onboarding-B9_JitSg.js} +0 -0
  438. /package/dist/assets/{onboarding-DcqUEEaz.js → onboarding-BrS1fcVE.js} +0 -0
  439. /package/dist/assets/{onboarding-BW2dh5pt.js → onboarding-Cx2yoeE5.js} +0 -0
  440. /package/dist/assets/{onboarding-Cnq4igvs.js → onboarding-cBGAfB74.js} +0 -0
  441. /package/dist/assets/{onboarding-step-layout-WvEjfCnx.js → onboarding-step-layout-BsqZaEHR.js} +0 -0
  442. /package/dist/assets/{pdf-DgsCrxEh.js → pdf-_tTrkaWt.js} +0 -0
  443. /package/dist/assets/{plugin-attribution-LzmgCiDL.js → plugin-attribution-RBBRvghI.js} +0 -0
  444. /package/dist/assets/{radio-card-nav-CuptkxL2.js → radio-card-nav-Br8358Zh.js} +0 -0
  445. /package/dist/assets/{remote-web-CobukhvR.js → remote-web-42kFkA33.js} +0 -0
  446. /package/dist/assets/{remote-web-C3yUczL8.js → remote-web-CFPdQIeJ.js} +0 -0
  447. /package/dist/assets/{remote-web-DwpqtwUx.js → remote-web-DFX945w2.js} +0 -0
  448. /package/dist/assets/{remote-web-DCSDDZCE.js → remote-web-DkzrBzGi.js} +0 -0
  449. /package/dist/assets/{schedules-IzKLt3Kb.js → schedules-Bk7XGnqS.js} +0 -0
  450. /package/dist/assets/{schedules-C2TWanDm.js → schedules-CGU7CKaM.js} +0 -0
  451. /package/dist/assets/{schedules-DmPN1i2h.js → schedules-J687h0Fh.js} +0 -0
  452. /package/dist/assets/{schedules-DQk79n5p.js → schedules-JnprnWDo.js} +0 -0
  453. /package/dist/assets/{signup-onboarding-handoff-C8_xhSTf.js → signup-onboarding-handoff-BIo7lFvP.js} +0 -0
  454. /package/dist/assets/{skill-icon-DUIePVIz.js → skill-icon-CWKAcXVy.js} +0 -0
  455. /package/dist/assets/{status-badge-pill-Cc18wQfL.js → status-badge-pill-qGQ5gRiz.js} +0 -0
  456. /package/dist/assets/{terminal-giCEJEW0.js → terminal-BV6xg9ZA.js} +0 -0
  457. /package/dist/assets/{terminal-Dl-IbvuO.js → terminal-BjOF3LBT.js} +0 -0
  458. /package/dist/assets/{terminal-DXPsXc9Y.js → terminal-CYHsl1AH.js} +0 -0
  459. /package/dist/assets/{terminal-Cy7FbQYY.js → terminal-Cxm0NKaj.js} +0 -0
  460. /package/dist/assets/{usage-window-BQhWVCSl.js → usage-window-DJWFtBw1.js} +0 -0
  461. /package/dist/assets/{use-debounced-value-Dc_Camyk.js → use-debounced-value-CiNn3pzA.js} +0 -0
  462. /package/dist/assets/{xterm-DDBpEHv9.js → xterm-Pyzkt_-B.js} +0 -0
  463. /package/dist/assets/{xterm-addon-fit-RknS6doH.js → xterm-addon-fit-HaY_WHvm.js} +0 -0
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$C as t,$o as n,DC as r,MC as i,Mo as a,SS as o,Tu as s,YC as c,_C as l,_p as u,_s as d,af as f,bs as p,en as m,es as h,fC as g,fl as _,gC as v,gp as y,gs as b,hC as x,hl as S,hs as C,iS as w,ih as T,is as E,it as D,jv as O,km as k,ml as A,ms as j,ns as ee,nt as M,of as te,ot as ne,pl as re,ps as ie,rn as ae,rs as oe,rt as se,rw as ce,sC as le,sf as ue,tn as de,ts as fe,vC as pe,vs as N,wu as me,xS as P,yl as he,ys as F}from"./app--CZi-eoZ.js";import{$n as I,E as L,nr as ge}from"./vendor-DLH51Vjf.js";import{_ as _e,n as ve,r as R,t as ye,x as be}from"./react-B9IgSVeK.js";import{La as xe,fr as z}from"./icons-C0wyat6T.js";import{t as B}from"./detail-card-D4zKx03d.js";import{t as Se}from"./stt-language-picker-modal-BinBfL2G.js";import{t as Ce}from"./use-hotkey-recorder-DmcwEQhK.js";var V=e(be(),1),H=ye();function U({label:e,selected:t,recording:n=!1,onClick:r}){return(0,H.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,H.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,H.jsx)(`span`,{className:`text-[var(--content-default)]`,children:e})]})}function we(){let{t:e}=L(`settings`),{available:n,currentCode:r,configuredProviderId:i,selectLanguage:a,selecting:o}=D(M()),[s,c]=(0,V.useState)(!1);return n?(0,H.jsxs)(B,{title:e(`listeningLanguageCard.title`),subtitle:e(`listeningLanguageCard.subtitle`),children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`span`,{className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`,children:ne(r,i)}),(0,H.jsx)(t,{variant:`outlined`,onClick:()=>c(!0),className:`shrink-0`,children:e(`listeningLanguageCard.change`)})]}),(0,H.jsx)(Se,{open:s,onOpenChange:c,title:e(`listeningLanguageCard.title`),currentCode:r,configuredProviderId:i,selectLanguage:a,selecting:o})]}):null}var W=`flux`;function Te(e){return e===`vellum`}function Ee(e,t){let n=e?.trim().toLowerCase();return!n||n===`multi`||t===void 0?!0:t.includes(n.split(`-`)[0]??n)}function De(){let{t:e}=L(`settings`),t=ge(),n=T(),i=M(),[a,o]=(0,V.useState)(!1),{data:s}=I({...y({path:{assistant_id:i}}),enabled:n,staleTime:3e4}),c=s?.services?.stt,{data:l}=I({...k({path:{assistant_id:i}}),enabled:n,staleTime:5*6e4}),d=c?.roles?.liveVoice?.provider??c?.provider,f=l?.providers?.find(e=>e.id===d),p=f?.modelFamilies?.includes(W)??!1;if(!d||!p)return null;let m=Ee(c?.language,f?.turnDetectionLanguages),h=c?.roles?.liveVoice,g=h?h.model:c?.providers?.[d]?.model,_=g===void 0?Te(d)&&m:g===W,v=async n=>{o(!0);try{let{response:e}=await O({path:{assistant_id:i},body:{services:{stt:{roles:{liveVoice:{provider:d,model:n?W:f?.baseModelFamily}}}}},throwOnError:!1});if(!e?.ok)throw Error(String(e?.status??``));await t.invalidateQueries({queryKey:u({path:{assistant_id:i}})})}catch{x.error(e(`voicePage.turnDetectionFailed`))}finally{o(!1)}};return(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e(`voicePage.turnDetectionLabel`)}),(0,H.jsx)(`p`,{className:`text-body-small-lighter text-[var(--content-tertiary)]`,children:e(m?`voicePage.turnDetectionDescription`:`voicePage.turnDetectionLanguageUnsupported`)}),(0,H.jsx)(r,{checked:_,disabled:a||!m&&!_,onChange:e=>void v(e),"aria-label":e(`voicePage.turnDetectionLabel`)})]})}var G=`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,K=`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--system-negative-strong)]`,Oe=2;function q(e){let t=[];return e.ctrlKey&&t.push(`control`),e.altKey&&t.push(`option`),e.shiftKey&&t.push(`shift`),e.metaKey&&t.push(`command`),p(t)}function ke(){let{t:e}=L(`settings`),r=C(),i=n(e=>e.registered)===!1,[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(!1),[l,u]=(0,V.useState)([]),[d,p]=(0,V.useState)(!1),m=(0,V.useRef)(null),h=(0,V.useCallback)(async()=>{o((await f())?.inputMonitoring.status??null)},[]);(0,V.useEffect)(()=>{h();let e=setInterval(()=>{h()},2e3);return()=>{clearInterval(e)}},[h]);let g=(0,V.useCallback)(()=>{ue(`inputMonitoring`).then(h)},[h]),_=(0,V.useCallback)(()=>{te(`inputMonitoring`).then(h)},[h]),v=(0,V.useCallback)(e=>{b(e),c(!1),u([]),p(!1),e.kind!==`off`&&g()},[g]),y=(0,V.useCallback)(()=>{c(!0),u([]),p(!1),requestAnimationFrame(()=>{m.current?.focus()})},[]),x=(0,V.useCallback)(()=>{c(!1),u([]),p(!1)},[]),S=(0,V.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){x();return}u(q(e))},[x]),w=(0,V.useCallback)(e=>{if(s&&!(q(e).length>0)){if(l.length>=Oe){v({kind:`modifierOnly`,modifiers:l});return}u([]),p(!0)}},[v,l,s]);(0,V.useEffect)(()=>{if(!s)return;let e=e=>{m.current&&!m.current.contains(e.target)&&x()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[x,s]);let T=j(r),E=r.kind===`modifierOnly`&&!T,D=r.kind!==`off`,O=r.kind===`modifierOnly`&&r.modifiers.includes(`control`)&&r.modifiers.includes(`option`),k=a===`granted`;return(0,H.jsx)(B,{title:e(`voiceKeyCard.title`),subtitle:e(`voiceKeyCard.subtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{ref:m,tabIndex:s?0:-1,onKeyDown:s?S:void 0,onKeyUp:s?w:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[(0,H.jsx)(U,{label:e(`voiceKeyCard.fnLabel`),selected:T,onClick:()=>v(ie)}),s?(0,H.jsx)(U,{label:l.length>0?F(l):e(`voiceKeyCard.recordingPrompt`),selected:!0,recording:!0,onClick:x}):(0,H.jsx)(U,{label:r.kind===`modifierOnly`&&!T?F(r.modifiers):e(`voiceKeyCard.customLabel`),selected:E,onClick:y}),(0,H.jsx)(U,{label:e(`voiceKeyCard.offLabel`),selected:!D,onClick:()=>v({kind:`off`})})]}),d&&(0,H.jsxs)(`div`,{className:G,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.customHint`)})]}),D&&a!==null&&!k&&(0,H.jsxs)(`div`,{className:`flex flex-col items-start gap-2 pt-1`,children:[(0,H.jsxs)(`div`,{className:K,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.needsInputMonitoring`)})]}),(0,H.jsx)(t,{variant:`outlined`,onClick:_,children:e(`voiceKeyCard.allowInputMonitoring`)})]}),D&&k&&i&&(0,H.jsxs)(`div`,{className:K,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.refusedNote`)})]}),T&&(0,H.jsxs)(`div`,{className:G,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.fnDictationNote`)})]}),O&&(0,H.jsxs)(`div`,{className:G,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.voiceOverNote`)})]})]})})}function Ae({assistantId:e,open:t,onOpenChange:n}){return(0,H.jsx)(v.Root,{open:t,onOpenChange:n,children:(0,H.jsx)(v.Content,{size:`md`,children:(0,H.jsx)(je,{assistantId:e,onDone:()=>n(!1)})})})}function je({assistantId:e,onDone:n}){let{t:r}=L(),{available:i,currentModel:o,selectModel:s,selecting:c}=a(e);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(v.Header,{children:[(0,H.jsx)(v.Title,{children:r(`voicePickerModal.title`)}),i&&(0,H.jsx)(v.Description,{children:`Uses Vellum credits, through providers like ElevenLabs and Deepgram.`})]}),(0,H.jsx)(v.Body,{children:(0,H.jsx)(de,{assistantId:e,filterBySource:!0,value:o,onChange:s,autoScrollToSelected:!0})}),(0,H.jsxs)(v.Footer,{className:`items-center justify-between gap-3`,children:[(0,H.jsx)(se,{}),(0,H.jsx)(t,{variant:`primary`,onClick:n,disabled:c,className:`shrink-0`,children:r(`voicePickerModal.done`)})]})]})}function Me(){let{t:e}=L(`settings`),n=M(),{available:r,settled:i,voices:o,currentModel:s}=a(n),c=o.find(e=>e.model===s)??o[0],[l,u]=(0,V.useState)(!1),d=w.use.name(),f=d?e(`voicePickerCard.titleWithName`,{name:d}):e(`voicePickerCard.title`);return i?r&&c?(0,H.jsxs)(B,{title:f,subtitle:e(`voicePickerCard.creditsNote`),children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(m,{description:c.description,className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`}),(0,H.jsx)(t,{variant:`outlined`,onClick:()=>u(!0),className:`shrink-0`,children:e(`voicePickerCard.changeButton`)})]}),(0,H.jsx)(Ae,{assistantId:n,open:l,onOpenChange:u})]}):(0,H.jsx)(B,{title:f,children:(0,H.jsx)(ae,{})}):(0,H.jsx)(B,{title:f,children:(0,H.jsx)(le,{as:`span`,role:`status`,"aria-label":e(`voicePickerCard.loadingAria`),className:`block h-9 w-48`})})}var Ne=[{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.`}],Pe=`We recommend keeping both off to start. It feels more like a real conversation.`;function Fe(){let{t:e}=L();return(0,H.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 Ie({label:e,description:t,showBadge:n,checked:i,onChange:a}){return(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-1`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-body-medium-lighter text-[var(--content-default)]`,children:e}),n?(0,H.jsx)(Fe,{}):null]}),t?(0,H.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:t}):null]}),(0,H.jsx)(r,{checked:i,onChange:a,"aria-label":e})]})}function Le({showDescription:e=!1,showRecommendedBadge:t=!1}){let{t:n}=L(),r=s.use.showUserTranscript(),i=s.use.showAssistantTranscript(),a=s.use.setShowUserTranscript(),o=s.use.setShowAssistantTranscript(),c={showUserTranscript:{checked:r,onChange:a},showAssistantTranscript:{checked:i,onChange:o}},l=(e,t)=>n(e===`showUserTranscript`?`voiceTranscriptToggles.userTranscriptLabel`:`voiceTranscriptToggles.assistantTranscriptLabel`,t),u=(e,t)=>n(e===`showUserTranscript`?`voiceTranscriptToggles.userTranscriptDescription`:`voiceTranscriptToggles.assistantTranscriptDescription`,t);return(0,H.jsx)(H.Fragment,{children:Ne.map(n=>{let r=c[n.prefKey];return(0,H.jsx)(Ie,{label:l(n.prefKey,n.label),description:e?u(n.prefKey,n.description):void 0,showBadge:t,checked:r.checked,onChange:r.onChange},n.prefKey)})})}var J=`text-body-small-default text-[var(--content-tertiary)]`;function Re(){let[e]=_e(),t=e.get(`tab`);return t===`sounds`?(0,H.jsx)(R,{replace:!0,to:P.settings.sounds}):t===`services`?(0,H.jsx)(R,{replace:!0,to:P.settings.ai}):(0,H.jsx)(Y,{})}function Y(){let{t:e}=L(`settings`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,H.jsxs)(X,{heading:e(`voicePage.sectionOutputHeading`),description:e(`voicePage.sectionOutputDescription`),children:[(0,H.jsx)(Me,{}),(0,H.jsx)(ze,{})]}),(0,H.jsxs)(X,{heading:e(`voicePage.sectionInputHeading`),description:e(`voicePage.sectionInputDescription`),children:[(0,H.jsx)(Ve,{}),(0,H.jsx)(we,{}),he()?(0,H.jsx)(ke,{}):(0,H.jsx)(We,{}),(0,H.jsx)(Ge,{})]}),(0,H.jsx)(X,{heading:e(`voicePage.sectionCaptionsHeading`),children:(0,H.jsx)(Be,{})})]})}function ze(){let{t:e}=L(`settings`),{available:t}=a(M());return t?(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-1 text-body-small-lighter text-[var(--content-tertiary)]`,children:[(0,H.jsx)(z,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-quiet)]`}),(0,H.jsx)(`span`,{children:e(`voicePage.speechServicesBannerPrompt`)}),(0,H.jsxs)(ve,{to:`${P.settings.ai}#text-to-speech`,className:ce(i({tone:`quiet`}),`inline-flex items-center gap-1 text-[var(--content-secondary)] decoration-[var(--border-element)] underline-offset-2`),children:[e(`voicePage.speechServicesBannerLink`),(0,H.jsx)(xe,{className:`h-3 w-3`})]})]}):null}function X({heading:e,description:t,children:n}){return(0,H.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`h2`,{className:`text-label-medium-default uppercase tracking-wide text-[var(--content-tertiary)]`,children:e}),t&&(0,H.jsx)(`p`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:t})]}),n]})}function Be(){let{t:e}=L(`settings`);return(0,H.jsx)(B,{title:e(`voicePage.captionsTitle`),subtitle:e(`voicePage.captionsSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(Le,{showDescription:!0}),(0,H.jsx)(`p`,{className:`${J} pt-1`,children:e(`voicePage.captionsRecommendation`,Pe)})]})})}var Z=``;function Ve(){let{t:e}=L(`settings`),[n,r]=(0,V.useState)([]),[i,a]=(0,V.useState)(!1),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(()=>_()),u=(0,V.useCallback)(async()=>{if(!navigator.mediaDevices?.enumerateDevices)return;let e=await re();a(e.needsPermission),r(e.devices),s(e.known)},[]),d=(0,V.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});for(let t of e.getTracks())t.stop()}catch{}u()},[u]);(0,V.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,V.useMemo)(()=>{let t=n.map((t,n)=>({value:t.deviceId,label:t.label||e(`voicePage.microphoneFallbackLabel`,{index:n+1})})),r=c!==Z&&!t.some(e=>e.value===c);return[{value:null,label:e(`voicePage.systemDefault`)},...t,...r?[{value:c,label:e(o?`voicePage.savedMicrophoneNotConnected`:`voicePage.savedMicrophone`)}]:[]]},[n,c,o,e]),p=(0,V.useCallback)(e=>{l(e),A(e)},[]);(0,V.useEffect)(()=>S(()=>{l(_())}),[]);let m=c===Z?null:c;return(0,H.jsx)(B,{title:e(`voicePage.microphoneTitle`),subtitle:e(`voicePage.microphoneSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,H.jsx)(`div`,{className:`max-w-xs`,children:(0,H.jsx)(g,{options:f,value:m,onChange:p,onSelectNone:()=>p(Z),"aria-label":e(`voicePage.microphoneAriaLabel`)})}),i&&(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(t,{variant:`outlined`,onClick:d,children:e(`voicePage.allowMicrophoneAccess`)}),(0,H.jsx)(`span`,{className:J,children:e(`voicePage.grantMicrophoneAccessHint`)})]})]})})}var He=new Set([`Control`,`Alt`,`Shift`,`Meta`]),Q=`toggleVoice`,Ue=[{label:`Ctrl+Shift`,activator:{kind:`modifierOnly`,modifiers:[`control`,`shift`]}},{label:`Alt`,activator:{kind:`modifierOnly`,modifiers:[`option`]}}];function We(){let{t:e}=L(`settings`),t=o(),[n,i]=(0,V.useState)(()=>ee()),[a,s]=(0,V.useState)(!1),[l,u]=(0,V.useState)([]),[f,m]=(0,V.useState)(!1),g=(0,V.useRef)(null),_=(0,V.useMemo)(()=>{let e=fe();return[{label:d(e),activator:e}]},[]),v=n.kind!==`off`,y=(0,V.useCallback)(e=>{i(e),E(e),s(!1),u([]),m(!1)},[]),b=Ce({onBound:()=>y({kind:`off`})}),x=b.catalog.find(e=>e.key===Q)?.accelerator??``,S=b.recordingKey===Q,C=oe()?Ue:[],w=(0,V.useCallback)(e=>{y(e),b.removeHotkey(Q)},[b,y]),T=(0,V.useCallback)(()=>{y({kind:`off`}),b.removeHotkey(Q)},[b,y]),D=(0,V.useCallback)(()=>{s(!0),u([]),m(!1),requestAnimationFrame(()=>{g.current?.focus()})},[]),O=(0,V.useCallback)(()=>{s(!1),u([]),m(!1)},[]),k=(0,V.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},[]),A=(0,V.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){O();return}let t=k(e);if(He.has(e.key)){m(!1),u(p(t));return}if(t.length===0){m(!0);return}y({kind:`key`,label:e.key.length===1?e.key.toUpperCase():e.key,modifiers:p(t)})},[O,k,y]),j=(0,V.useCallback)(e=>{a&&k(e).length===0&&l.length>0&&(u([]),m(!0))},[k,a,l]);(0,V.useEffect)(()=>{if(!a)return;let e=e=>{g.current&&!g.current.contains(e.target)&&O()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[O,a]);let M=v&&!_.some(e=>N(e.activator,n));return t?(0,H.jsx)(B,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitleDesktop`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[C.map(e=>(0,H.jsx)(U,{label:e.label,selected:N(e.activator,n),onClick:()=>w(e.activator)},e.label)),(0,H.jsx)(U,{label:S?e(`voicePage.recordingPrompt`):x?(0,H.jsx)(c,{accelerator:x}):e(`voicePage.customKey`),selected:x!==``,recording:S,onClick:S?b.stopRecording:()=>b.startRecording(Q)}),(0,H.jsx)(U,{label:e(`voicePage.offKeyLabel`),selected:n.kind===`off`&&!x&&!S,onClick:T})]}),b.conflict?.key===Q&&(0,H.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voicePage.shortcutConflict`,{command:b.conflict.label})})]})]})}):(0,H.jsx)(B,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsx)(r,{checked:v,onChange:e=>{y(e?h():{kind:`off`})},label:e(`voicePage.enableVoiceShortcut`)}),v&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`span`,{className:J,children:e(`voicePage.activationKeyLabel`)}),(0,H.jsxs)(`div`,{ref:g,tabIndex:a?0:-1,onKeyDown:a?A:void 0,onKeyUp:a?j:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[_.map(e=>(0,H.jsx)(U,{label:e.label,selected:N(e.activator,n),onClick:()=>y(e.activator)},e.label)),a?(0,H.jsx)(U,{label:l.length>0?F(l):e(`voicePage.pressShortcut`),selected:!0,recording:!0,onClick:O}):(0,H.jsx)(U,{label:M?d(n):e(`voicePage.customKey`),selected:M,onClick:D})]}),f&&(0,H.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voicePage.shortcutChordHint`)})]}),v&&(0,H.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,children:[(0,H.jsx)(z,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voicePage.focusedTabNote`)})]})]})]})})}function Ge(){let{t:e}=L(`settings`),n=s.use.pauseBeforeReplyMs(),r=s.use.setPauseBeforeReplyMs(),i=s.use.interruptSensitivity(),a=s.use.setInterruptSensitivity(),o=(0,V.useMemo)(()=>[{value:`low`,label:e(`voicePage.interruptSensitivityLow`)},{value:`medium`,label:e(`voicePage.interruptSensitivityMedium`)},{value:`high`,label:e(`voicePage.interruptSensitivityHigh`)}],[e]),c=n!==null||i!==null;return(0,H.jsx)(B,{title:e(`voicePage.turnTakingTitle`),subtitle:e(`voicePage.turnTakingSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(De,{}),(0,H.jsx)($,{label:e(`voicePage.pauseBeforeReplyLabel`),description:e(`voicePage.pauseBeforeReplyDescription`),isDefault:n===null,children:(0,H.jsx)(`div`,{className:`max-w-xs`,children:(0,H.jsx)(l,{value:(n??1200)/1e3,onValueChange:e=>{typeof e==`number`&&r(Math.round(e*1e3))},min:500/1e3,max:me/1e3,step:.1,showValue:!0,formatValue:e=>`${(typeof e==`number`?e:e[0]).toFixed(1)}s`,"aria-label":e(`voicePage.pauseBeforeReplyAriaLabel`)})})}),(0,H.jsx)($,{label:e(`voicePage.interruptSensitivityLabel`),description:e(`voicePage.interruptSensitivityDescription`),isDefault:i===null,children:(0,H.jsx)(`div`,{className:`max-w-xs`,children:(0,H.jsx)(pe,{items:o,value:i??`medium`,onChange:a,ariaLabel:e(`voicePage.interruptSensitivityAriaLabel`)})})}),c&&(0,H.jsx)(`div`,{children:(0,H.jsx)(t,{variant:`outlined`,onClick:()=>{r(null),a(null)},children:e(`voicePage.resetToDefaults`)})})]})})}function $({label:e,description:t,isDefault:n,children:r}){let{t:i}=L(`settings`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e}),n&&(0,H.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,H.jsx)(`p`,{className:J,children:t}),r]})}export{Re as VoicePage};
@@ -1 +1 @@
1
- import{Dn as e,On as t,qn as n}from"./app-Qc-rYPt9.js";import{j as r}from"./vendor-DEhKVoiV.js";import{t as i}from"./react-B9IgSVeK.js";import{$ as a}from"./icons-C0wyat6T.js";var o=i();function s({payload:e,onClose:i}){let{t:s}=r(`chat`),u=t(e.body);return(0,o.jsx)(n,{Glyph:a,title:e.title||s(`wakeDetailPanel.title`),closeLabel:s(`wakeDetailPanel.closeAria`),closeVariant:`outlined`,onClose:i,children:(0,o.jsxs)(`dl`,{className:`flex flex-col gap-6`,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})}),e.metadata.length>0&&(0,o.jsx)(`div`,{className:`flex flex-col gap-6`,children:e.metadata.map(e=>(0,o.jsx)(l,{label:e.label,children:e.value},e.label))})]})})}function c({result:t}){let n=e(t);return n?(0,o.jsx)(`div`,{className:`flex flex-col gap-4`,children:n.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:t})}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};
1
+ import{Fn as e,Pn as t,tr as n}from"./app--CZi-eoZ.js";import{E as r}from"./vendor-DLH51Vjf.js";import{t as i}from"./react-B9IgSVeK.js";import{$ as a}from"./icons-C0wyat6T.js";var o=i();function s({payload:t,onClose:i}){let{t:s}=r(`chat`),u=e(t.body);return(0,o.jsx)(n,{Glyph:a,title:t.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})}),t.metadata.length>0&&(0,o.jsx)(`div`,{className:`flex flex-col gap-5`,children:t.metadata.map(e=>(0,o.jsx)(l,{label:e.label,children:e.value},e.label))})]})})}function c({result:e}){let n=t(e);return n?(0,o.jsx)(`div`,{className:`flex flex-col gap-4`,children:n.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};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ro as t,an as n,in as r,on as i,rn as a}from"./app-Qc-rYPt9.js";import{j as o}from"./vendor-DEhKVoiV.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 r=n(e.location);r&&typeof r.name==`string`&&(t=r.name)}if(!t)return null;let o=n(e.current),s=r(o?.temp)??r(e.currentTemp)??r(e.temperature)??r(e.temp),c=r(o?.feelsLike)??r(o?.feels_like)??r(o?.apparentTemperature)??r(e.feelsLike)??r(e.feels_like)??r(e.apparentTemperature),l=i(o?.condition)??i(e.condition),u=r(o?.humidity)??r(e.humidity),d=T(o?.wind??e.wind),f=r(o?.windSpeed)??r(o?.wind_speed)??r(e.windSpeed)??r(e.wind_speed)??d.speed,p=i(o?.windDirection)??i(o?.wind_direction)??i(e.windDirection)??i(e.wind_direction)??d.direction,m=n(e.units),h=i(m?.temperature)??i(o?.unit)??i(e.unit)??`F`,g=i(m?.speed)??i(e.windUnit)??i(e.wind_unit),_=a(e.hourly).map((e,t)=>({id:i(e.id)??String(t),time:i(e.time)??``,icon:i(e.icon)??i(e.condition)??`cloud.fill`,temp:r(e.tempC)??r(e.temp)??r(e.temperature),tempC:r(e.tempC)})),v=a([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:i(e.id)??String(t),day:i(e.day)??i(e.date),dayLabel:i(e.dayLabel)??i(e.date),icon:i(e.icon)??i(e.condition)??`cloud.fill`,low:r(e.low),high:r(e.high),lowC:r(e.lowC),highC:r(e.highC),precip:r(e.precip)??r(e.precipitation)??r(e.precipitationProbability),condition:i(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{Zo as t,cn as n,ln as r,on as i,sn as a}from"./app--CZi-eoZ.js";import{E as o}from"./vendor-DLH51Vjf.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 r=n(e.location);r&&typeof r.name==`string`&&(t=r.name)}if(!t)return null;let o=n(e.current),s=a(o?.temp)??a(e.currentTemp)??a(e.temperature)??a(e.temp),c=a(o?.feelsLike)??a(o?.feels_like)??a(o?.apparentTemperature)??a(e.feelsLike)??a(e.feels_like)??a(e.apparentTemperature),l=r(o?.condition)??r(e.condition),u=a(o?.humidity)??a(e.humidity),d=T(o?.wind??e.wind),f=a(o?.windSpeed)??a(o?.wind_speed)??a(e.windSpeed)??a(e.wind_speed)??d.speed,p=r(o?.windDirection)??r(o?.wind_direction)??r(e.windDirection)??r(e.wind_direction)??d.direction,m=n(e.units),h=r(m?.temperature)??r(o?.unit)??r(e.unit)??`F`,g=r(m?.speed)??r(e.windUnit)??r(e.wind_unit),_=i(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:a(e.tempC)??a(e.temp)??a(e.temperature),tempC:a(e.tempC)})),v=i([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:a(e.low),high:a(e.high),lowC:a(e.lowC),highC:a(e.highC),precip:a(e.precip)??a(e.precipitation)??a(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{D as e}from"./vendor-DEhKVoiV.js";var t=class extends e{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!(`Notification`in window)||!Notification.requestPermission)return!1;if(Notification.permission!==`granted`)try{new Notification(``)}catch(e){if(e instanceof Error&&e.name===`TypeError`)return!1}return!0}}async getDeliveredNotifications(){let e=[];for(let t of this.deliveredNotifications){let n={title:t.title,id:parseInt(t.tag),body:t.body};e.push(n)}return{notifications:e}}async removeDeliveredNotifications(e){for(let t of e.notifications){let e=this.deliveredNotifications.find(e=>e.tag===String(t.id));e?.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(let e of this.deliveredNotifications)e.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented(`Not implemented on web.`)}async deleteChannel(){throw this.unimplemented(`Not implemented on web.`)}async listChannels(){throw this.unimplemented(`Not implemented on web.`)}async schedule(e){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);for(let t of e.notifications)this.sendNotification(t);return{notifications:e.notifications.map(e=>({id:e.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented(`Not implemented on web.`)}async cancel(e){this.pending=this.pending.filter(t=>!e.notifications.find(e=>e.id===t.id))}async areEnabled(){let{display:e}=await this.checkPermissions();return{value:e===`granted`}}async changeExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async checkExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(e){switch(e){case`granted`:return`granted`;case`denied`:return`denied`;default:return`prompt`}}sendPending(){let e=[],t=new Date().getTime();for(let n of this.pending)n.schedule?.at&&n.schedule.at.getTime()<=t&&(this.buildNotification(n),e.push(n));this.pending=this.pending.filter(t=>!e.find(e=>e===t))}sendNotification(e){if(e.schedule?.at){let t=e.schedule.at.getTime()-new Date().getTime();this.pending.push(e),setTimeout(()=>{this.sendPending()},t);return}this.buildNotification(e)}buildNotification(e){let t=new Notification(e.title,{body:e.body,tag:String(e.id)});return t.addEventListener(`click`,this.onClick.bind(this,e),!1),t.addEventListener(`show`,this.onShow.bind(this,e),!1),t.addEventListener(`close`,()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(e){let t={actionId:`tap`,notification:e};this.notifyListeners(`localNotificationActionPerformed`,t)}onShow(e){this.notifyListeners(`localNotificationReceived`,e)}};export{t as LocalNotificationsWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";var t=class extends e{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!(`Notification`in window)||!Notification.requestPermission)return!1;if(Notification.permission!==`granted`)try{new Notification(``)}catch(e){if(e instanceof Error&&e.name===`TypeError`)return!1}return!0}}async getDeliveredNotifications(){let e=[];for(let t of this.deliveredNotifications){let n={title:t.title,id:parseInt(t.tag),body:t.body};e.push(n)}return{notifications:e}}async removeDeliveredNotifications(e){for(let t of e.notifications){let e=this.deliveredNotifications.find(e=>e.tag===String(t.id));e?.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(let e of this.deliveredNotifications)e.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented(`Not implemented on web.`)}async deleteChannel(){throw this.unimplemented(`Not implemented on web.`)}async listChannels(){throw this.unimplemented(`Not implemented on web.`)}async schedule(e){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);for(let t of e.notifications)this.sendNotification(t);return{notifications:e.notifications.map(e=>({id:e.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented(`Not implemented on web.`)}async cancel(e){this.pending=this.pending.filter(t=>!e.notifications.find(e=>e.id===t.id))}async areEnabled(){let{display:e}=await this.checkPermissions();return{value:e===`granted`}}async changeExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async checkExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(e){switch(e){case`granted`:return`granted`;case`denied`:return`denied`;default:return`prompt`}}sendPending(){let e=[],t=new Date().getTime();for(let n of this.pending)n.schedule?.at&&n.schedule.at.getTime()<=t&&(this.buildNotification(n),e.push(n));this.pending=this.pending.filter(t=>!e.find(e=>e===t))}sendNotification(e){if(e.schedule?.at){let t=e.schedule.at.getTime()-new Date().getTime();this.pending.push(e),setTimeout(()=>{this.sendPending()},t);return}this.buildNotification(e)}buildNotification(e){let t=new Notification(e.title,{body:e.body,tag:String(e.id)});return t.addEventListener(`click`,this.onClick.bind(this,e),!1),t.addEventListener(`show`,this.onShow.bind(this,e),!1),t.addEventListener(`close`,()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(e){let t={actionId:`tap`,notification:e};this.notifyListeners(`localNotificationActionPerformed`,t)}onShow(e){this.notifyListeners(`localNotificationReceived`,e)}};export{t as LocalNotificationsWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";function t(){let e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t=`unknown`,n=e?e.type||e.effectiveType:null;if(n&&typeof n==`string`)switch(n){case`bluetooth`:case`cellular`:t=`cellular`;break;case`none`:t=`none`;break;case`ethernet`:case`wifi`:case`wimax`:t=`wifi`;break;case`other`:case`unknown`:t=`unknown`;break;case`slow-2g`:case`2g`:case`3g`:t=`cellular`;break;case`4g`:t=`wifi`;break;default:break}return t}var n=class extends e{constructor(){super(),this.handleOnline=()=>{let e={connected:!0,connectionType:t()};this.notifyListeners(`networkStatusChange`,e)},this.handleOffline=()=>{this.notifyListeners(`networkStatusChange`,{connected:!1,connectionType:`none`})},typeof window<`u`&&(window.addEventListener(`online`,this.handleOnline),window.addEventListener(`offline`,this.handleOffline))}async getStatus(){if(!window.navigator)throw this.unavailable(`Browser does not support the Network Information API`);let e=window.navigator.onLine,n=t();return{connected:e,connectionType:e?n:`none`}}};new n;export{n as NetworkWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";function t(){let e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t=`unknown`,n=e?e.type||e.effectiveType:null;if(n&&typeof n==`string`)switch(n){case`bluetooth`:case`cellular`:t=`cellular`;break;case`none`:t=`none`;break;case`ethernet`:case`wifi`:case`wimax`:t=`wifi`;break;case`other`:case`unknown`:t=`unknown`;break;case`slow-2g`:case`2g`:case`3g`:t=`cellular`;break;case`4g`:t=`wifi`;break;default:break}return t}var n=class extends e{constructor(){super(),this.handleOnline=()=>{let e={connected:!0,connectionType:t()};this.notifyListeners(`networkStatusChange`,e)},this.handleOffline=()=>{this.notifyListeners(`networkStatusChange`,{connected:!1,connectionType:`none`})},typeof window<`u`&&(window.addEventListener(`online`,this.handleOnline),window.addEventListener(`offline`,this.handleOffline))}async getStatus(){if(!window.navigator)throw this.unavailable(`Browser does not support the Network Information API`);let e=window.navigator.onLine,n=t();return{connected:e,connectionType:e?n:`none`}}};new n;export{n as NetworkWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";var t=class extends e{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||`_blank`)}async close(){return new Promise((e,t)=>{this._lastWindow==null?t(`No active window to close!`):(this._lastWindow.close(),this._lastWindow=null,e())})}};new t;export{t as BrowserWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";var t=class extends e{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||`_blank`)}async close(){return new Promise((e,t)=>{this._lastWindow==null?t(`No active window to close!`):(this._lastWindow.close(),this._lastWindow=null,e())})}};new t;export{t as BrowserWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";import{n as t,t as n}from"./definitions-BSvId-nJ.js";var r=class extends e{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(e=n.Heavy){return e===n.Medium?[43]:e===n.Light?[20]:[61]}patternForNotification(e=t.Success){return e===t.Warning?[30,40,30,50,60]:e===t.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";import{n as t,t as n}from"./definitions-DpZNNWA7.js";var r=class extends e{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(e=n.Heavy){return e===n.Medium?[43]:e===n.Light?[20]:[61]}patternForNotification(e=t.Success){return e===t.Warning?[30,40,30,50,60]:e===t.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";var t=class extends e{async getSafeAreaInsets(){return{insets:{top:0,left:0,right:0,bottom:0}}}async getStatusBarHeight(){return{statusBarHeight:0}}setImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}unsetImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}};export{t as SafeAreaWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";var t=class extends e{async getSafeAreaInsets(){return{insets:{top:0,left:0,right:0,bottom:0}}}async getStatusBarHeight(){return{statusBarHeight:0}}setImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}unsetImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}};export{t as SafeAreaWeb};
@@ -1 +1 @@
1
- import{D as e,O as t}from"./vendor-DEhKVoiV.js";import{n}from"./definitions-DgScTjwR.js";function r(e){let t=e.split(`/`).filter(e=>e!==`.`),n=[];return t.forEach(e=>{e===`..`&&n.length>0&&n[n.length-1]!==`..`?n.pop():n.push(e)}),n.join(`/`)}function i(e,t){e=r(e),t=r(t);let n=e.split(`/`),i=t.split(`/`);return e!==t&&n.every((e,t)=>e===i[t])}var a=class r extends e{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME=`Disc`,this._writeCmds=[`add`,`put`,`delete`],this.downloadFile=async e=>{let n=t(e,e.webFetchExtra),r=await fetch(e.url,n),i;if(!e.progress)i=await r.blob();else if(!r?.body)i=new Blob;else{let t=r.body.getReader(),n=0,a=[],o=r.headers.get(`content-type`),s=parseInt(r.headers.get(`content-length`)||`0`,10);for(;;){let{done:r,value:i}=await t.read();if(r)break;a.push(i),n+=i?.length||0;let o={url:e.url,bytes:n,contentLength:s};this.notifyListeners(`progress`,o)}let c=new Uint8Array(n),l=0;for(let e of a)e!==void 0&&(c.set(e,l),l+=e.length);i=new Blob([c.buffer],{type:o||void 0})}return{path:(await this.writeFile({path:e.path,directory:e.directory??void 0,recursive:e.recursive??!1,data:i})).uri,blob:i}}}readFileInChunks(e,t){throw this.unavailable(`Method not implemented.`)}async initDb(){if(this._db!==void 0)return this._db;if(!(`indexedDB`in window))throw this.unavailable(`This browser doesn't support IndexedDB`);return new Promise((e,t)=>{let n=indexedDB.open(this.DB_NAME,this.DB_VERSION);n.onupgradeneeded=r.doUpgrade,n.onsuccess=()=>{this._db=n.result,e(n.result)},n.onerror=()=>t(n.error),n.onblocked=()=>{console.warn(`db blocked`)}})}static doUpgrade(e){let t=e.target.result;switch(e.oldVersion){default:t.objectStoreNames.contains(`FileStorage`)&&t.deleteObjectStore(`FileStorage`),t.createObjectStore(`FileStorage`,{keyPath:`path`}).createIndex(`by_folder`,`folder`)}}async dbRequest(e,t){let n=this._writeCmds.indexOf(e)===-1?`readonly`:`readwrite`;return this.initDb().then(r=>new Promise((i,a)=>{let o=r.transaction([`FileStorage`],n).objectStore(`FileStorage`)[e](...t);o.onsuccess=()=>i(o.result),o.onerror=()=>a(o.error)}))}async dbIndexRequest(e,t,n){let r=this._writeCmds.indexOf(t)===-1?`readonly`:`readwrite`;return this.initDb().then(i=>new Promise((a,o)=>{let s=i.transaction([`FileStorage`],r).objectStore(`FileStorage`).index(e)[t](...n);s.onsuccess=()=>a(s.result),s.onerror=()=>o(s.error)}))}getPath(e,t){let n=t===void 0?``:t.replace(/^[/]+|[/]+$/g,``),r=``;return e!==void 0&&(r+=`/`+e),t!==``&&(r+=`/`+n),r}async clear(){(await this.initDb()).transaction([`FileStorage`],`readwrite`).objectStore(`FileStorage`).clear()}async readFile(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0)throw Error(`File does not exist.`);return{data:n.content?n.content:``}}async writeFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=e.recursive,a=await this.dbRequest(`get`,[t]);if(a&&a.type===`directory`)throw Error(`The supplied path is a directory.`);let o=t.substr(0,t.lastIndexOf(`/`));if(await this.dbRequest(`get`,[o])===void 0){let t=o.indexOf(`/`,1);if(t!==-1){let n=o.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:i})}}if(!r&&!(n instanceof Blob)&&(n=n.indexOf(`,`)>=0?n.split(`,`)[1]:n,!this.isBase64String(n)))throw Error(`The supplied data is not valid base64 content.`);let s=Date.now(),c={path:t,folder:o,type:`file`,size:n instanceof Blob?n.size:n.length,ctime:s,mtime:s,content:n};return await this.dbRequest(`put`,[c]),{uri:c.path}}async appendFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=t.substr(0,t.lastIndexOf(`/`)),a=Date.now(),o=a,s=await this.dbRequest(`get`,[t]);if(s&&s.type===`directory`)throw Error(`The supplied path is a directory.`);if(await this.dbRequest(`get`,[i])===void 0){let t=i.indexOf(`/`,1);if(t!==-1){let n=i.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:!0})}}if(!r&&!this.isBase64String(n))throw Error(`The supplied data is not valid base64 content.`);if(s!==void 0){if(s.content instanceof Blob)throw Error(`The occupied entry contains a Blob object which cannot be appended to.`);n=s.content!==void 0&&!r?btoa(atob(s.content)+atob(n)):s.content+n,o=s.ctime}let c={path:t,folder:i,type:`file`,size:n.length,ctime:o,mtime:a,content:n};await this.dbRequest(`put`,[c])}async deleteFile(e){let t=this.getPath(e.directory,e.path);if(await this.dbRequest(`get`,[t])===void 0)throw Error(`File does not exist.`);if((await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)])).length!==0)throw Error(`Folder is not empty.`);await this.dbRequest(`delete`,[t])}async mkdir(e){let t=this.getPath(e.directory,e.path),n=e.recursive,r=t.substr(0,t.lastIndexOf(`/`)),i=(t.match(/\//g)||[]).length,a=await this.dbRequest(`get`,[r]),o=await this.dbRequest(`get`,[t]);if(i===1)throw Error(`Cannot create Root directory`);if(o!==void 0)throw Error(`Current directory does already exist.`);if(!n&&i!==2&&a===void 0)throw Error(`Parent directory must exist`);if(n&&i!==2&&a===void 0){let t=r.substr(r.indexOf(`/`,1));await this.mkdir({path:t,directory:e.directory,recursive:n})}let s=Date.now(),c={path:t,folder:r,type:`directory`,size:0,ctime:s,mtime:s};await this.dbRequest(`put`,[c])}async rmdir(e){let{path:t,directory:n,recursive:r}=e,i=this.getPath(n,t),a=await this.dbRequest(`get`,[i]);if(a===void 0)throw Error(`Folder does not exist.`);if(a.type!==`directory`)throw Error(`Requested path is not a directory`);let o=await this.readdir({path:t,directory:n});if(o.files.length!==0&&!r)throw Error(`Folder is not empty`);for(let e of o.files){let i=`${t}/${e.name}`;(await this.stat({path:i,directory:n})).type===`file`?await this.deleteFile({path:i,directory:n}):await this.rmdir({path:i,directory:n,recursive:r})}await this.dbRequest(`delete`,[i])}async readdir(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(e.path!==``&&n===void 0)throw Error(`Folder does not exist.`);let r=await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)]);return{files:await Promise.all(r.map(async e=>{let n=await this.dbRequest(`get`,[e]);return n===void 0&&(n=await this.dbRequest(`get`,[e+`/`])),{name:e.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}))}}async getUri(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);return n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),{uri:n?.path||t}}async stat(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),n===void 0)throw Error(`Entry does not exist.`);return{name:n.path.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:`granted`}}async checkPermissions(){return{publicStorage:`granted`}}async _copy(e,t=!1){let{toDirectory:r}=e,{to:a,from:o,directory:s}=e;if(!a||!o)throw Error(`Both to and from must be provided`);r||=s;let c=this.getPath(s,o),l=this.getPath(r,a);if(c===l)return{uri:l};if(i(c,l))throw Error(`To path cannot contain the from path`);let u;try{u=await this.stat({path:a,directory:r})}catch{let e=a.split(`/`);e.pop();let t=e.join(`/`);if(e.length>0&&(await this.stat({path:t,directory:r})).type!==`directory`)throw Error(`Parent directory of the to path is a file`)}if(u&&u.type===`directory`)throw Error(`Cannot overwrite a directory with a file`);let d=await this.stat({path:o,directory:s}),f=async(e,t,n)=>{let i=this.getPath(r,e),a=await this.dbRequest(`get`,[i]);a.ctime=t,a.mtime=n,await this.dbRequest(`put`,[a])},p=d.ctime?d.ctime:Date.now();switch(d.type){case`file`:{let e=await this.readFile({path:o,directory:s});t&&await this.deleteFile({path:o,directory:s});let i;!(e.data instanceof Blob)&&!this.isBase64String(e.data)&&(i=n.UTF8);let c=await this.writeFile({path:a,directory:r,data:e.data,encoding:i});return t&&await f(a,p,d.mtime),c}case`directory`:{if(u)throw Error(`Cannot move a directory over an existing object`);try{await this.mkdir({path:a,directory:r,recursive:!1}),t&&await f(a,p,d.mtime)}catch{}let e=(await this.readdir({path:o,directory:s})).files;for(let n of e)await this._copy({from:`${o}/${n.name}`,to:`${a}/${n.name}`,directory:s,toDirectory:r},t);t&&await this.rmdir({path:o,directory:s})}}return{uri:l}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}};a._debug=!0;export{a as FilesystemWeb};
1
+ import{C as e,S as t}from"./vendor-DLH51Vjf.js";import{n}from"./definitions-BUCExH-9.js";function r(e){let t=e.split(`/`).filter(e=>e!==`.`),n=[];return t.forEach(e=>{e===`..`&&n.length>0&&n[n.length-1]!==`..`?n.pop():n.push(e)}),n.join(`/`)}function i(e,t){e=r(e),t=r(t);let n=e.split(`/`),i=t.split(`/`);return e!==t&&n.every((e,t)=>e===i[t])}var a=class r extends t{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME=`Disc`,this._writeCmds=[`add`,`put`,`delete`],this.downloadFile=async t=>{let n=e(t,t.webFetchExtra),r=await fetch(t.url,n),i;if(!t.progress)i=await r.blob();else if(!r?.body)i=new Blob;else{let e=r.body.getReader(),n=0,a=[],o=r.headers.get(`content-type`),s=parseInt(r.headers.get(`content-length`)||`0`,10);for(;;){let{done:r,value:i}=await e.read();if(r)break;a.push(i),n+=i?.length||0;let o={url:t.url,bytes:n,contentLength:s};this.notifyListeners(`progress`,o)}let c=new Uint8Array(n),l=0;for(let e of a)e!==void 0&&(c.set(e,l),l+=e.length);i=new Blob([c.buffer],{type:o||void 0})}return{path:(await this.writeFile({path:t.path,directory:t.directory??void 0,recursive:t.recursive??!1,data:i})).uri,blob:i}}}readFileInChunks(e,t){throw this.unavailable(`Method not implemented.`)}async initDb(){if(this._db!==void 0)return this._db;if(!(`indexedDB`in window))throw this.unavailable(`This browser doesn't support IndexedDB`);return new Promise((e,t)=>{let n=indexedDB.open(this.DB_NAME,this.DB_VERSION);n.onupgradeneeded=r.doUpgrade,n.onsuccess=()=>{this._db=n.result,e(n.result)},n.onerror=()=>t(n.error),n.onblocked=()=>{console.warn(`db blocked`)}})}static doUpgrade(e){let t=e.target.result;switch(e.oldVersion){default:t.objectStoreNames.contains(`FileStorage`)&&t.deleteObjectStore(`FileStorage`),t.createObjectStore(`FileStorage`,{keyPath:`path`}).createIndex(`by_folder`,`folder`)}}async dbRequest(e,t){let n=this._writeCmds.indexOf(e)===-1?`readonly`:`readwrite`;return this.initDb().then(r=>new Promise((i,a)=>{let o=r.transaction([`FileStorage`],n).objectStore(`FileStorage`)[e](...t);o.onsuccess=()=>i(o.result),o.onerror=()=>a(o.error)}))}async dbIndexRequest(e,t,n){let r=this._writeCmds.indexOf(t)===-1?`readonly`:`readwrite`;return this.initDb().then(i=>new Promise((a,o)=>{let s=i.transaction([`FileStorage`],r).objectStore(`FileStorage`).index(e)[t](...n);s.onsuccess=()=>a(s.result),s.onerror=()=>o(s.error)}))}getPath(e,t){let n=t===void 0?``:t.replace(/^[/]+|[/]+$/g,``),r=``;return e!==void 0&&(r+=`/`+e),t!==``&&(r+=`/`+n),r}async clear(){(await this.initDb()).transaction([`FileStorage`],`readwrite`).objectStore(`FileStorage`).clear()}async readFile(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0)throw Error(`File does not exist.`);return{data:n.content?n.content:``}}async writeFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=e.recursive,a=await this.dbRequest(`get`,[t]);if(a&&a.type===`directory`)throw Error(`The supplied path is a directory.`);let o=t.substr(0,t.lastIndexOf(`/`));if(await this.dbRequest(`get`,[o])===void 0){let t=o.indexOf(`/`,1);if(t!==-1){let n=o.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:i})}}if(!r&&!(n instanceof Blob)&&(n=n.indexOf(`,`)>=0?n.split(`,`)[1]:n,!this.isBase64String(n)))throw Error(`The supplied data is not valid base64 content.`);let s=Date.now(),c={path:t,folder:o,type:`file`,size:n instanceof Blob?n.size:n.length,ctime:s,mtime:s,content:n};return await this.dbRequest(`put`,[c]),{uri:c.path}}async appendFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=t.substr(0,t.lastIndexOf(`/`)),a=Date.now(),o=a,s=await this.dbRequest(`get`,[t]);if(s&&s.type===`directory`)throw Error(`The supplied path is a directory.`);if(await this.dbRequest(`get`,[i])===void 0){let t=i.indexOf(`/`,1);if(t!==-1){let n=i.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:!0})}}if(!r&&!this.isBase64String(n))throw Error(`The supplied data is not valid base64 content.`);if(s!==void 0){if(s.content instanceof Blob)throw Error(`The occupied entry contains a Blob object which cannot be appended to.`);n=s.content!==void 0&&!r?btoa(atob(s.content)+atob(n)):s.content+n,o=s.ctime}let c={path:t,folder:i,type:`file`,size:n.length,ctime:o,mtime:a,content:n};await this.dbRequest(`put`,[c])}async deleteFile(e){let t=this.getPath(e.directory,e.path);if(await this.dbRequest(`get`,[t])===void 0)throw Error(`File does not exist.`);if((await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)])).length!==0)throw Error(`Folder is not empty.`);await this.dbRequest(`delete`,[t])}async mkdir(e){let t=this.getPath(e.directory,e.path),n=e.recursive,r=t.substr(0,t.lastIndexOf(`/`)),i=(t.match(/\//g)||[]).length,a=await this.dbRequest(`get`,[r]),o=await this.dbRequest(`get`,[t]);if(i===1)throw Error(`Cannot create Root directory`);if(o!==void 0)throw Error(`Current directory does already exist.`);if(!n&&i!==2&&a===void 0)throw Error(`Parent directory must exist`);if(n&&i!==2&&a===void 0){let t=r.substr(r.indexOf(`/`,1));await this.mkdir({path:t,directory:e.directory,recursive:n})}let s=Date.now(),c={path:t,folder:r,type:`directory`,size:0,ctime:s,mtime:s};await this.dbRequest(`put`,[c])}async rmdir(e){let{path:t,directory:n,recursive:r}=e,i=this.getPath(n,t),a=await this.dbRequest(`get`,[i]);if(a===void 0)throw Error(`Folder does not exist.`);if(a.type!==`directory`)throw Error(`Requested path is not a directory`);let o=await this.readdir({path:t,directory:n});if(o.files.length!==0&&!r)throw Error(`Folder is not empty`);for(let e of o.files){let i=`${t}/${e.name}`;(await this.stat({path:i,directory:n})).type===`file`?await this.deleteFile({path:i,directory:n}):await this.rmdir({path:i,directory:n,recursive:r})}await this.dbRequest(`delete`,[i])}async readdir(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(e.path!==``&&n===void 0)throw Error(`Folder does not exist.`);let r=await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)]);return{files:await Promise.all(r.map(async e=>{let n=await this.dbRequest(`get`,[e]);return n===void 0&&(n=await this.dbRequest(`get`,[e+`/`])),{name:e.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}))}}async getUri(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);return n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),{uri:n?.path||t}}async stat(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),n===void 0)throw Error(`Entry does not exist.`);return{name:n.path.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:`granted`}}async checkPermissions(){return{publicStorage:`granted`}}async _copy(e,t=!1){let{toDirectory:r}=e,{to:a,from:o,directory:s}=e;if(!a||!o)throw Error(`Both to and from must be provided`);r||=s;let c=this.getPath(s,o),l=this.getPath(r,a);if(c===l)return{uri:l};if(i(c,l))throw Error(`To path cannot contain the from path`);let u;try{u=await this.stat({path:a,directory:r})}catch{let e=a.split(`/`);e.pop();let t=e.join(`/`);if(e.length>0&&(await this.stat({path:t,directory:r})).type!==`directory`)throw Error(`Parent directory of the to path is a file`)}if(u&&u.type===`directory`)throw Error(`Cannot overwrite a directory with a file`);let d=await this.stat({path:o,directory:s}),f=async(e,t,n)=>{let i=this.getPath(r,e),a=await this.dbRequest(`get`,[i]);a.ctime=t,a.mtime=n,await this.dbRequest(`put`,[a])},p=d.ctime?d.ctime:Date.now();switch(d.type){case`file`:{let e=await this.readFile({path:o,directory:s});t&&await this.deleteFile({path:o,directory:s});let i;!(e.data instanceof Blob)&&!this.isBase64String(e.data)&&(i=n.UTF8);let c=await this.writeFile({path:a,directory:r,data:e.data,encoding:i});return t&&await f(a,p,d.mtime),c}case`directory`:{if(u)throw Error(`Cannot move a directory over an existing object`);try{await this.mkdir({path:a,directory:r,recursive:!1}),t&&await f(a,p,d.mtime)}catch{}let e=(await this.readdir({path:o,directory:s})).files;for(let n of e)await this._copy({from:`${o}/${n.name}`,to:`${a}/${n.name}`,directory:s,toDirectory:r},t);t&&await this.rmdir({path:o,directory:s})}}return{uri:l}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}};a._debug=!0;export{a as FilesystemWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";var t=class extends e{async canShare(){return typeof navigator>`u`||!navigator.share?{value:!1}:{value:!0}}async share(e){if(typeof navigator>`u`||!navigator.share)throw this.unavailable(`Share API not available in this browser`);return await navigator.share({title:e.title,text:e.text,url:e.url}),{}}};export{t as ShareWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";var t=class extends e{async canShare(){return typeof navigator>`u`||!navigator.share?{value:!1}:{value:!0}}async share(e){if(typeof navigator>`u`||!navigator.share)throw this.unavailable(`Share API not available in this browser`);return await navigator.share({title:e.title,text:e.text,url:e.url}),{}}};export{t as ShareWeb};
@@ -1 +1 @@
1
- import{D as e}from"./vendor-DEhKVoiV.js";var t=class extends e{async start(e){return new Promise(async(t,n)=>{await navigator.mediaDevices.getUserMedia({audio:!e.disableAudio,video:!0}).then(e=>{e.getTracks().forEach(e=>e.stop())}).catch(e=>{n(e)});let r=document.getElementById(`video`),i=document.getElementById(e.parent);if(r)n({message:`camera already started`});else{let r=document.createElement(`video`);r.id=`video`,r.setAttribute(`class`,e.className||``),e.position!==`rear`&&r.setAttribute(`style`,`-webkit-transform: scaleX(-1); transform: scaleX(-1);`);let a=navigator.userAgent.toLowerCase();if(a.includes(`safari`)&&!a.includes(`chrome`)&&(r.setAttribute(`autoplay`,`true`),r.setAttribute(`muted`,`true`),r.setAttribute(`playsinline`,`true`)),i.appendChild(r),navigator.mediaDevices?.getUserMedia){let i={video:{width:{ideal:e.width},height:{ideal:e.height}}};e.position===`rear`?(i.video.facingMode=`environment`,this.isBackCamera=!0):this.isBackCamera=!1,navigator.mediaDevices.getUserMedia(i).then(function(e){r.srcObject=e,r.play(),t()},e=>{n(e)})}}})}async startRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stopRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stop(){let e=document.getElementById(`video`);if(e){e.pause();let t=e.srcObject.getTracks();for(let e of t)e.stop();e.remove()}}async capture(e){return new Promise(t=>{let n=document.getElementById(`video`),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.videoWidth,r.height=n.videoHeight,this.isBackCamera||(i.translate(n.videoWidth,0),i.scale(-1,1)),i.drawImage(n,0,0,n.videoWidth,n.videoHeight);let a;a=e.quality==null?r.toDataURL(`image/png`).replace(`data:image/png;base64,`,``):r.toDataURL(`image/jpeg`,e.quality/100).replace(`data:image/jpeg;base64,`,``),t({value:a})})}async captureSample(e){return this.capture(e)}async getSupportedFlashModes(){throw Error(`getSupportedFlashModes not supported under the web platform`)}async setFlashMode(e){throw Error(`setFlashMode not supported under the web platform`)}async flip(){throw Error(`flip not supported under the web platform`)}async setOpacity(e){let t=document.getElementById(`video`);t&&e.opacity&&t.style.setProperty(`opacity`,e.opacity.toString())}async isCameraStarted(){throw this.unimplemented(`Not implemented on web.`)}};export{t as CameraPreviewWeb};
1
+ import{S as e}from"./vendor-DLH51Vjf.js";var t=class extends e{async start(e){return new Promise(async(t,n)=>{await navigator.mediaDevices.getUserMedia({audio:!e.disableAudio,video:!0}).then(e=>{e.getTracks().forEach(e=>e.stop())}).catch(e=>{n(e)});let r=document.getElementById(`video`),i=document.getElementById(e.parent);if(r)n({message:`camera already started`});else{let r=document.createElement(`video`);r.id=`video`,r.setAttribute(`class`,e.className||``),e.position!==`rear`&&r.setAttribute(`style`,`-webkit-transform: scaleX(-1); transform: scaleX(-1);`);let a=navigator.userAgent.toLowerCase();if(a.includes(`safari`)&&!a.includes(`chrome`)&&(r.setAttribute(`autoplay`,`true`),r.setAttribute(`muted`,`true`),r.setAttribute(`playsinline`,`true`)),i.appendChild(r),navigator.mediaDevices?.getUserMedia){let i={video:{width:{ideal:e.width},height:{ideal:e.height}}};e.position===`rear`?(i.video.facingMode=`environment`,this.isBackCamera=!0):this.isBackCamera=!1,navigator.mediaDevices.getUserMedia(i).then(function(e){r.srcObject=e,r.play(),t()},e=>{n(e)})}}})}async startRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stopRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stop(){let e=document.getElementById(`video`);if(e){e.pause();let t=e.srcObject.getTracks();for(let e of t)e.stop();e.remove()}}async capture(e){return new Promise(t=>{let n=document.getElementById(`video`),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.videoWidth,r.height=n.videoHeight,this.isBackCamera||(i.translate(n.videoWidth,0),i.scale(-1,1)),i.drawImage(n,0,0,n.videoWidth,n.videoHeight);let a;a=e.quality==null?r.toDataURL(`image/png`).replace(`data:image/png;base64,`,``):r.toDataURL(`image/jpeg`,e.quality/100).replace(`data:image/jpeg;base64,`,``),t({value:a})})}async captureSample(e){return this.capture(e)}async getSupportedFlashModes(){throw Error(`getSupportedFlashModes not supported under the web platform`)}async setFlashMode(e){throw Error(`setFlashMode not supported under the web platform`)}async flip(){throw Error(`flip not supported under the web platform`)}async setOpacity(e){let t=document.getElementById(`video`);t&&e.opacity&&t.style.setProperty(`opacity`,e.opacity.toString())}async isCameraStarted(){throw this.unimplemented(`Not implemented on web.`)}};export{t as CameraPreviewWeb};
@@ -0,0 +1 @@
1
+ import{Mi as e,bx as t,xS as n}from"./app--CZi-eoZ.js";import{E as r}from"./vendor-DLH51Vjf.js";import{f as i,t as a}from"./react-B9IgSVeK.js";import{t as o}from"./auth-welcome-screen-Cf7g-gHo.js";var s=a();function c(){let{t:a}=r(`onboarding`),c=i();return(0,s.jsx)(o,{secondary:{label:a(`welcome.continueWithoutAccount`),onSelect:()=>{t()?c(n.selectAssistant,e):c(n.onboarding.hosting,e)}}})}export{c as WelcomeScreen};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$C as t,HC as n,Xn as r,Zn as i,fu as a,ir as o,ki as s,mu as c,pu as l,qn as u,tr as d}from"./app--CZi-eoZ.js";import{E as f,d as p,f as m,s as h}from"./vendor-DLH51Vjf.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-C7OzP_a-.js";import{o as k,t as A}from"./detail-primitives-BFWcvOIj.js";import{t as j}from"./detail-panel-stop-button-BE40AoTZ.js";import{t as M}from"./status-badge-pill-qGQ5gRiz.js";var N=e(_(),1),P=g();function F({title:e,body:t,emptyText:r}){return(0,P.jsxs)(`div`,{children:[(0,P.jsx)(k,{as:`h3`,children:e}),t?(0,P.jsx)(A,{label:e,children:(0,P.jsx)(n,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:t})}):(0,P.jsx)(o,{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:c(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)(u,{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:t,components:a,onSelect:o}){let{t:s}=f(`chat`),c=t.label??`Subagent ${t.seq}`,l=t.promptSummary,u=r(`${e}:${t.seq}`);return(0,P.jsx)(`button`,{type:`button`,onClick:o,"aria-label":s(`workflowSubagentRow.openDetailsAria`,{title:c}),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:t.status}),a?(0,P.jsx)(i,{components:a,bodyShapeId:u.bodyShape,eyeStyleId:u.eyeStyle,colorId:u.color,size:16}):(0,P.jsx)(`div`,{style:{width:16,height:16,flexShrink:0},"aria-hidden":!0}),(0,P.jsx)(n,{variant:`body-medium-default`,title:c,className:`max-w-[60%] shrink-0 truncate text-[var(--content-default)]`,children:c}),l&&(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)(n,{variant:`body-medium-lighter`,title:l,className:`min-w-0 truncate text-[var(--content-tertiary)]`,children:l})]})]})})}function U({entry:e,onClose:c,onStop:l,onRequestJournal:u}){let{t:m}=f(`chat`),g=a(e.status),_=h(),v=e.label??e.runId,y=e.agentsSpawned||e.leaves.size,T=s(),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?r(`${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)(()=>{u?.(e.runId)},[e.runId,q,u]),(0,P.jsx)(d,{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)(n,{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)(n,{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)(t,{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)(i,{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&&l?(0,P.jsx)(j,{onStop:()=>l(e.runId),ariaLabel:m(`workflowDetailPanel.stopWorkflow`)}):void 0,closeLabel:m(`workflowDetailPanel.closeDetail`),onClose:c,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)(o,{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:`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={drawerTitle:`Archivos`},n={download:`Descargar`,downloading:`Descargando…`,downloadFailed:`No se pudo descargar. Inténtalo de nuevo.`,preview:`Vista previa`,source:`Código`,modifiedLabel:`Modificado:`,selectAFile:`Selecciona un archivo para verlo`,browseFiles:`Explorar archivos`,fileNotFound:`Archivo no encontrado`,saveFailed:`No se pudo guardar`,unknownSize:`Tamaño desconocido`,downloadAria:`Descargar {name}`},r={workspaceTree:e,workspaceBrowser:t,workspaceFileViewer:n};export{r as default,t as workspaceBrowser,n as workspaceFileViewer,e as workspaceTree};
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={drawerTitle:`檔案`},n={download:`下載`,downloading:`正在下載…`,downloadFailed:`下載失敗。請再試一次。`,preview:`預覽`,source:`來源`,modifiedLabel:`修改時間:`,selectAFile:`選取檔案以檢視`,browseFiles:`瀏覽檔案`,fileNotFound:`找不到檔案`,saveFailed:`儲存失敗`,unknownSize:`大小不明`,downloadAria:`下載 {name}`},r={workspaceTree:e,workspaceBrowser:t,workspaceFileViewer:n};export{r as default,t as workspaceBrowser,n as workspaceFileViewer,e as workspaceTree};
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={drawerTitle:`文件`},n={download:`下载`,downloading:`正在下载…`,downloadFailed:`下载失败。请重试。`,preview:`预览`,source:`源文件`,modifiedLabel:`修改时间:`,selectAFile:`选择一个文件以查看`,browseFiles:`浏览文件`,fileNotFound:`文件未找到`,saveFailed:`保存失败`,unknownSize:`大小未知`,downloadAria:`下载 {name}`},r={workspaceTree:e,workspaceBrowser:t,workspaceFileViewer:n};export{r as default,t as workspaceBrowser,n as workspaceFileViewer,e as workspaceTree};
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={drawerTitle:`Файлы`},n={download:`Скачать`,downloading:`Скачивание…`,downloadFailed:`Не удалось скачать. Повторите попытку.`,preview:`Просмотр`,source:`Исходник`,modifiedLabel:`Изменён:`,selectAFile:`Выбор файла для просмотра`,browseFiles:`Обзор файлов`,fileNotFound:`Файл не найден`,saveFailed:`Не удалось сохранить`,unknownSize:`Размер неизвестен`,downloadAria:`Скачать {name}`},r={workspaceTree:e,workspaceBrowser:t,workspaceFileViewer:n};export{r as default,t as workspaceBrowser,n as workspaceFileViewer,e as workspaceTree};
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{$C as t,Ay as n,Bn as r,Fy as i,Gh as a,HC as o,JC as s,Ja as c,KC as l,Kh as u,Ln as d,My as f,Ny as p,OC as m,Py as h,QC as g,RS as _,Rn as v,Ta as y,Vn as b,gC as x,jy as S,ky as C,mC as w,nt as T,pC as E,pr as D,wS as O,yi as k}from"./app--CZi-eoZ.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-DLH51Vjf.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-DCJYSksY.js";import{t as J}from"./format-file-size-Bcra_NZ3.js";import{t as Y}from"./intelligence-layout-slots-store-DMLutIHV.js";import{a as X,i as pe,n as me,r as he,t as ge}from"./file-view-mode-C3psjEfg.js";import{t as _e}from"./use-debounced-value-CiNn3pzA.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 S({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 D({assistantId:t,path:n,filename:r,showHidden:i})}catch{c(!0)}finally{o(!1)}},[t,n,r,i])}}function Ee({assistantId:e,path:n,name:r,showHidden:i}){let{t:a}=j(`workspace`),{isDownloading:o,error:s,download:c}=Te({assistantId:e,path:n,name:r,showHidden:i});return(0,Q.jsx)(t,{variant:`ghost`,size:`regular`,loading:o,iconOnly:(0,Q.jsx)(de,{"aria-hidden":!0}),onClick:()=>void c(),disabled:o,"aria-label":a(`workspaceFileViewer.downloadAria`,{name:r}),tooltip:a(s?`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:r,showHidden:i}){let{data:a,isLoading:o}=A({queryFn:async()=>{let r=await n({path:{assistant_id:e},query:{path:t,...i?{showHidden:`true`}:{}},parseAs:`blob`});if(r.error)throw r.error;return r.data},queryKey:[`assistantsWorkspaceFileContentRetrieve`,{assistantId:e,path:t,showHidden:i}],enabled:!!t}),[s,c]=(0,Z.useState)(null);return(0,Z.useEffect)(()=>{if(!a)return;let e=URL.createObjectURL(a);return c(e),()=>{URL.revokeObjectURL(e),c(null)}},[a]),o?(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)`}})}):s?r.startsWith(`image/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`img`,{src:s,alt:t.split(`/`).pop()??`image`,className:`max-h-[70vh] max-w-full rounded object-contain`})}):r.startsWith(`video/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`video`,{src:s,controls:!0,className:`max-h-[70vh] max-w-full rounded`})}):null:null}function ke({assistantId:e,path:n,name:r,mimeType:i,size:a,modifiedAt:o,showHidden:s}){let{t:c}=j(`workspace`),{isDownloading:l,error:u,download:d}=Te({assistantId:e,path:n,name:r,showHidden:s});return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:r,mimeType:i,size:a}),(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:r}),(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:i}),(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:J(a,c(`workspaceFileViewer.unknownSize`))}),o&&(0,Q.jsxs)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:[c(`workspaceFileViewer.modifiedLabel`),` `,new Date(o).toLocaleString(O())]})]}),(0,Q.jsx)(t,{variant:`outlined`,size:`compact`,loading:l,leftIcon:(0,Q.jsx)(de,{"aria-hidden":!0}),onClick:d,disabled:l,"aria-label":c(`workspaceFileViewer.downloadAria`,{name:r}),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:n,viewMode:a,onChangeViewMode:s,pickerAvailable:c=!1,pathRename:l,pathDelete:u}){let{t:d}=j(`workspace`),f=te(),{data:p,isLoading:m}=A({...we({path:{assistant_id:e},query:{path:t??``,showHidden:n}}),enabled:!!t}),[h,g]=(0,Z.useState)(null),[_,v]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{if(!l)return;let{from:e,to:t}=l,n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;g(e=>e==null?e:n(e)),v(e=>e==null?e:{...e,path:n(e.path)})},[l]),(0,Z.useEffect)(()=>{if(!u)return;let{path:e}=u,t=t=>t===e||t.startsWith(`${e}/`);g(e=>e!=null&&t(e)?null:e),v(e=>e!=null&&t(e.path)?null:e)},[u]);let y=h!=null&&h===t,x=p?.content??``,S=_?.path===t?_.content:x,C=()=>{g(null),v(null)},w=N({mutationFn:async({path:t,content:n})=>{let{error:r,response:a}=await i({path:{assistant_id:e},body:{path:t,content:n,encoding:`utf8`},throwOnError:!1});if(!a?.ok||r)throw Error(`Failed to save file`)},onSuccess:(e,t)=>{g(e=>e===t.path?null:e),v(e=>e?.path===t.path?null:e),f.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)(o,{variant:`body-large-lighter`,className:`text-[var(--content-tertiary)]`,children:d(`workspaceFileViewer.emptyTitle`)}),c?(0,Q.jsx)(o,{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)(o,{variant:`body-small-lighter`,className:`text-[var(--content-tertiary)]`,children:d(`workspaceFileViewer.selectAFile`)})]});if(m)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:d(`workspaceFileViewer.fileNotFound`)})});let D=p.mimeType??`application/octet-stream`,O=p.name??t.split(`/`).pop()??t,k=b(O,D),M=xe(O,D),P=p.content!=null&&!k&&!M,F=t?Ce(t):!0,I=y&&(0,Q.jsx)(he,{isDirty:T,isSaving:w.isPending,error:w.isError?d(`workspaceFileViewer.saveFailed`):null,onSave:E,onDiscard:C});if(k&&p.content!=null){let e=y?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:a,onChange:e=>{y&&C(),s(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(me,{content:e,fileName:O,mimeType:D,showEdit:!F&&a===`source`,isEditing:y,onToggleEdit:()=>y?C():g(t)}),a===`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)(r,{content:e})}):y?(0,Q.jsx)(pe,{value:S,onChange:e=>v({path:t,content:e}),onSave:E}):(0,Q.jsx)(X,{lineNumbers:c,whiteSpace:c?`pre`:`pre-wrap`,content:p.content,readOnly:F,onStartEdit:()=>g(t)})]}),I]})}if(M&&p.content!=null){let e=y?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:a,onChange:e=>{y&&C(),s(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(me,{content:a===`formatted`?n:e,downloadContent:e,fileName:O,mimeType:D,showEdit:!F&&a===`source`,isEditing:y,onToggleEdit:()=>y?C():g(t)}),a===`formatted`?(0,Q.jsx)(X,{content:n,readOnly:!0,whiteSpace:`pre`,lineNumbers:c}):y?(0,Q.jsx)(pe,{value:S,onChange:e=>v({path:t,content:e}),onSave:E}):(0,Q.jsx)(X,{lineNumbers:c,whiteSpace:c?`pre`:`pre-wrap`,content:p.content,readOnly:F,onStartEdit:()=>g(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:y?S:p.content??``,fileName:O,mimeType:D,showEdit:!F,isEditing:y,onToggleEdit:()=>y?C():g(t)}),y?(0,Q.jsx)(pe,{value:S,onChange:e=>v({path:t,content:e}),onSave:E}):(0,Q.jsx)(X,{lineNumbers:c,whiteSpace:c?`pre`:`pre-wrap`,content:p.content??``,readOnly:F,onStartEdit:()=>g(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:n})}),(0,Q.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,Q.jsx)(Oe,{assistantId:e,path:t,mimeType:D,showHidden:n})})]}):(0,Q.jsx)(ke,{assistantId:e,path:t,name:O,mimeType:D,size:p.size,modifiedAt:p.modifiedAt,showHidden:n})}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)(E.Root,{children:[(0,Q.jsx)(E.Trigger,{children:h}),(0,Q.jsxs)(E.Content,{children:[d&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(E.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)(E.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)(E.Separator,{})]}),(0,Q.jsx)(E.Item,{leftIcon:(0,Q.jsx)(R,{className:`h-3.5 w-3.5`}),onSelect:()=>s(m),children:u(`workspaceTree.delete`)}),(0,Q.jsx)(E.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=u(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:i}=A(v({assistantId:e,showHidden:n,recursive:!0})),a=(0,Z.useMemo)(()=>i?.truncated===void 0?void 0:{listings:Fe(i.entries),truncated:i.truncated,skipped:i.skipped??[]},[i]),o=(0,Z.useMemo)(()=>Pe(t,n),[t,n]),s=(0,Z.useCallback)(e=>{let t=new Map;return e.forEach((e,n)=>{e.data&&t.set(o[n],e.data.entries)}),{listings:t,isRootLoading:e[0]?.isLoading??!0}},[o]),c=P({queries:o.map(t=>v({assistantId:e,path:t,showHidden:n,includeDirSizes:r===`size`})),combine:s});return(0,Z.useMemo)(()=>{if(!a)return{listings:c.listings,isRootLoading:c.isRootLoading,searchScope:`open-folders`,isSearchIncomplete:!1};let e=new Map(a.listings);for(let[t,n]of c.listings)e.set(t,n);return{listings:e,isRootLoading:!1,searchScope:`workspace`,isSearchIncomplete:a.truncated||a.skipped.some(t=>!e.has(t))}},[a,c])}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 h({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:n,confirmLabel:r,pendingLabel:i,initialName:a,onCancel:o,onConfirm:s,pending:c,error:l}){let{t:u}=j(`workspace`),d=(0,Z.useRef)(null),[f,p]=(0,Z.useState)(a??``),h=f.trim(),g=h.length>0&&(/[/\\]/.test(h)||h===`.`||h===`..`),_=h.length>0&&!g&&!c;return(0,Q.jsx)(x.Root,{open:!0,onOpenChange:e=>{!e&&!c&&o()},children:(0,Q.jsx)(x.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||o()},children:(0,Q.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),_&&s(h)},children:[(0,Q.jsx)(x.Header,{children:(0,Q.jsx)(x.Title,{children:e})}),(0,Q.jsx)(x.Body,{children:(0,Q.jsx)(m,{ref:d,label:u(`workspaceTree.nameLabel`),value:f,onChange:e=>p(e.target.value),placeholder:n,errorText:l??(g?u(`workspaceTree.nameError`):void 0),autoComplete:`off`,spellCheck:!1,fullWidth:!0})}),(0,Q.jsxs)(x.Footer,{children:[(0,Q.jsx)(t,{type:`button`,variant:`outlined`,onClick:o,disabled:c,children:u(`workspaceTree.cancel`)}),(0,Q.jsx)(t,{type:`submit`,variant:`primary`,disabled:!_,children:c?i:r})]})]})})})}function Ue({assistantId:e,expandedPaths:n,selectedPath:r,showHidden:s,sortMode:c,onToggleExpand:l,onExpandPath:h,onSelectPath:v,onToggleShowHidden:y,onChangeSortMode:b,onPathDeleted:x,onPathRenamed:S,search:T,onSearchChange:E,presentation:D=`sidebar`}){let{t:O}=j(`workspace`),k=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(T,Be),ne=z.trim()!==``,re=(0,Z.useId)(),{listings:B,isRootLoading:ie,searchScope:V,isSearchIncomplete:oe}=Le({assistantId:e,expandedPaths:n,showHidden:s,sortMode:c}),H=ne?V===`open-folders`?O(`workspaceTree.searchScope`):oe?O(`workspaceTree.searchIncomplete`):null:null,U=(B.get(``)?.length??0)>0,W=(0,Z.useMemo)(()=>Ie({listings:B,expandedPaths:n,sortMode:c,query:z}),[B,n,c,z]),G=(0,Z.useCallback)(()=>{for(let e of[d,`assistantsWorkspaceFileRetrieve`,`assistantsWorkspaceFileContentRetrieve`])k.invalidateQueries({queryKey:[e]})},[k]),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:a}=t.kind===`file`?await i({path:{assistant_id:e},body:{path:n,content:``,encoding:`utf8`},throwOnError:!1}):await f({path:{assistant_id:e},body:{path:n},throwOnError:!1});if(r||!a?.ok)throw a?_(r,a):r;return{...t,path:n}},onSuccess:e=>{R(),G(),e.parentPath&&h(e.parentPath),e.kind===`file`?v(e.path):h(e.path)},onError:e=>{L(ze(e,`create`,O))}}),K=N({mutationFn:async t=>{let n=u(t.oldPath),r=a(t.oldPath),i=n?`${n}/${t.newName}`:t.newName;await Ve(e,n,t.newName,r);let{error:o,response:s}=await p({path:{assistant_id:e},body:{oldPath:t.oldPath,newPath:i},throwOnError:!1});if(o||!s?.ok)throw s?_(o,s):o;return{oldPath:t.oldPath,newPath:i}},onSuccess:({oldPath:e,newPath:t})=>{R(),G(),S(e,t)},onError:e=>{L(ze(e,`rename`,O))}}),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 C({path:{assistant_id:e},body:{path:t.path},throwOnError:!1});if(n||!r?.ok)throw r?_(n,r):n;return t},onSuccess:e=>{J(null),G(),x(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:[D===`sheet`?(0,Q.jsx)(g.Title,{className:`[--text-title-medium-size:18px] [--text-title-medium-weight:600]`,children:O(`workspaceTree.heading`)}):(0,Q.jsx)(o,{variant:`body-medium-default`,className:`text-[var(--content-secondary)]`,children:O(`workspaceTree.heading`)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,Q.jsx)(t,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:c===`size`?(0,Q.jsx)(ye,{"aria-hidden":!0}):(0,Q.jsx)(ve,{"aria-hidden":!0}),onClick:()=>b(c===`size`?`name`:`size`),"aria-label":O(c===`size`?`workspaceTree.sortByNameAria`:`workspaceTree.sortBySizeAria`),title:O(c===`size`?`workspaceTree.sortedBySizeTitle`:`workspaceTree.sortedByNameTitle`),tintColor:c===`size`?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(t,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:s?(0,Q.jsx)(se,{"aria-hidden":!0}):(0,Q.jsx)(ae,{"aria-hidden":!0}),onClick:y,"aria-pressed":s,"aria-label":O(s?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),title:O(s?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),tintColor:s?`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)(m,{type:`text`,value:T,onChange:e=>E(e.target.value),placeholder:O(`workspaceTree.searchPlaceholder`),"aria-label":O(`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`}),T&&(0,Q.jsx)(t,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(ce,{"aria-hidden":!0}),onClick:()=>E(``),"aria-label":O(`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:O(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:r===e.entry.path,presentation:D,onToggleExpand:l,onSelectPath:v,onRequestDelete:X,onRequestRename:de,onRequestCreate:ue},e.entry.path))}),P?.type===`create`&&(0,Q.jsx)(He,{title:P.kind===`file`?O(`workspaceTree.newFile`):O(`workspaceTree.newFolder`),placeholder:P.kind===`file`?`filename.md`:`folder-name`,confirmLabel:O(`workspaceTree.create`),pendingLabel:O(`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:O(`workspaceTree.rename`),placeholder:P.name,confirmLabel:O(`workspaceTree.rename`),pendingLabel:O(`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?O(`workspaceTree.deleteFolderTitle`):O(`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`,O)})]}),confirmLabel:Y.isPending?O(`workspaceTree.deleting`):O(`workspaceTree.delete`),destructive:!0,isPending:Y.isPending,onConfirm:()=>{q&&Y.mutate(q)},onCancel:()=>J(null)})]})}function We({open:e,onOpenChange:n,onSelectKind:r}){let{t:i}=j(`workspace`);return y()?(0,Q.jsxs)(g.Root,{open:e,onOpenChange:n,children:[(0,Q.jsx)(g.Trigger,{asChild:!0,children:(0,Q.jsx)(t,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(B,{"aria-hidden":!0}),"aria-label":i(`workspaceTree.createTriggerAria`),title:i(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(g.Content,{children:[(0,Q.jsx)(g.Header,{className:`sr-only`,children:(0,Q.jsx)(g.Title,{children:i(`workspaceTree.creatingHeading`)})}),(0,Q.jsxs)(g.Body,{className:`pt-0`,children:[(0,Q.jsx)(l,{icon:V,label:i(`workspaceTree.newFile`),onSelect:()=>r(`file`)}),(0,Q.jsx)(l,{icon:G,label:i(`workspaceTree.newFolder`),onSelect:()=>r(`folder`)})]})]})]}):(0,Q.jsxs)(s.Root,{open:e,onOpenChange:n,children:[(0,Q.jsx)(s.Trigger,{asChild:!0,children:(0,Q.jsx)(t,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(B,{"aria-hidden":!0}),"aria-label":i(`workspaceTree.createTriggerAria`),title:i(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(s.Content,{align:`end`,sideOffset:4,children:[(0,Q.jsx)(s.Item,{leftIcon:(0,Q.jsx)(V,{className:`h-3.5 w-3.5`}),onSelect:()=>r(`file`),children:i(`workspaceTree.newFile`)}),(0,Q.jsx)(s.Item,{leftIcon:(0,Q.jsx)(G,{className:`h-3.5 w-3.5`}),onSelect:()=>r(`folder`),children:i(`workspaceTree.newFolder`)})]})]})}function Ge({open:e,onClose:t,pickerId:n,triggerRef:r,children:i}){let{t:a}=j(`workspace`),o=k(),s=(0,Z.useRef)(null),l=c.use.registerBackOwner(),u=c.use.unregisterBackOwner();return(0,Z.useEffect)(()=>{if(e)return l(),u},[e,l,u]),(0,Q.jsx)(g.Root,{open:e,onOpenChange:e=>{e||t()},children:(0,Q.jsx)(g.Content,{ref:s,id:n,variant:`detail`,dragHandleLabel:a(`workspaceFilePicker.dismiss`),padded:!1,className:`workspace-file-picker`,overlayClassName:`workspace-file-picker-overlay`,style:{...o,"--bottom-sheet-bottom-inset":o.paddingBottom},"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault(),s.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!==s.current&&e.preventDefault()},children:i})})}function Ke({selectedPath:e,open:n,onOpen:r,pickerId:i,buttonRef:s}){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)(o,{variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:c(`workspaceFileTitle.eyebrow`)}),(0,Q.jsxs)(t,{ref:s,variant:`ghost`,onClick:r,"aria-haspopup":`dialog`,"aria-expanded":n,"aria-controls":n?i:void 0,"aria-describedby":`${i}-hint`,className:`workspace-file-title bg-[var(--surface-hover)]`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:e?a(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:`${i}-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 b(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}}
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{HC as t,IC as n,hr as r,yC as i}from"./app--CZi-eoZ.js";import{E as a}from"./vendor-DLH51Vjf.js";import{t as o,x as s}from"./react-B9IgSVeK.js";import{t as c}from"./preview-error-DxF2Tmoi.js";import{i as l,n as u,o as d,r as f,t as p}from"./tabular-grid-CWJbCvkG.js";import{t as m}from"./use-async-read-DcRLxtMN.js";import{t as h}from"./jszip.min-CDIVkZfG.js";var g=e(s(),1),_=e(h(),1),v=864e5,y=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,b=2958465,ee=b-1462,x=[`hours`,`minutes`,`seconds`],S={h:`hours`,m:`minutes`,s:`seconds`},C={kind:`none`},te=new Set([19,21,33,45,47]),ne=new Set([18,19]),re=[{condition:null,kind:C}];function ie(e){return e>=14&&e<=17||e>=27&&e<=31||e>=34&&e<=36||e>=50&&e<=58?{kind:`date`}:e===46?{kind:`elapsed`,from:`hours`,to:`seconds`}:e>=18&&e<=21||e===32||e===33||e===45||e===47?{kind:`time`,seconds:te.has(e),meridiem:ne.has(e)?`AM/PM`:null}:e===22?{kind:`datetime`,seconds:!1,meridiem:null}:C}var ae=/[\s:.,\-/]/;function oe(e,t,n){for(let r=t;r>=0&&r<e.length;r+=n){let t=e.charAt(r);if(t===`h`||t===`s`)return!0;if(!ae.test(t))return!1}return!1}var se=/^\[(h+|m+|s+)\]$/i,ce=/am\/pm|a\/p/g;function le(e){return x.find(t=>e.has(t))??`hours`}function ue(e){let t=`hours`;for(let n of x)e.has(n)&&(t=n);return t}function de(e){let t=[],n=!1,r=!1,i=0,a=0;for(;a<e.length;){let o=e.charAt(a);n?n=o!==`"`:r?r=o!==`]`:o===`\\`?a+=1:o===`"`?n=!0:o===`[`?r=!0:o===`;`&&(t.push(e.slice(i,a)),i=a+1),a+=1}return t.push(e.slice(i)),t}function fe(e){let t=new Set,n=e.replace(/"[^"]*"/g,``).replace(/\[[^\]]*\]/g,e=>{let n=se.exec(e);return n!==null&&t.add(S[n[1].charAt(0).toLowerCase()]),``}).replace(/[\\_*]./g,``).toLowerCase(),r=n.replace(ce,``);if(t.size>0){let e=new Set(t);for(let[t,n]of Object.entries(S))r.includes(t)&&e.add(n);return{kind:`elapsed`,from:le(t),to:ue(e)}}let i=n.match(ce)?.[0]??null,a=i===null?null:i===`a/p`?`A/P`:`AM/PM`,o=/[yd]/.test(r),s=a!==null||/[hs]/.test(r);for(let e of r.matchAll(/m+/g)){let t=e.index,n=t+e[0].length;oe(r,t-1,-1)||oe(r,n,1)?s=!0:o=!0}let c=/s/.test(r);return o?s?{kind:`datetime`,seconds:c,meridiem:a}:{kind:`date`}:s?{kind:`time`,seconds:c,meridiem:a}:C}var w=/\[(<=|>=|<>|<|>|=)(-?\d+(?:\.\d+)?)\]/;function pe(e){return de(e).map(e=>{let t=w.exec(e);return{condition:t===null?null:{operator:t[1],value:Number(t[2])},kind:fe(e.replace(w,``))}})}function me(e,t){switch(e.operator){case`<`:return t<e.value;case`<=`:return t<=e.value;case`>`:return t>e.value;case`>=`:return t>=e.value;case`<>`:return t!==e.value;default:return t===e.value}}function he(e,t){return e.some(e=>e.condition!==null)?(e.find(e=>e.condition!==null&&me(e.condition,t))??e.find(e=>e.condition===null)??e[e.length-1])?.kind??C:(t===0&&e.length>2?e[2]:e[0])?.kind??C}function T(e){let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)}function E(e,t){let n=e.children,r=[];for(let e=0;e<n.length;e+=1){let i=n.item(e);i!==null&&T(i.localName)===t&&r.push(i)}return r}function D(e,t){let n=e.children;for(let e=0;e<n.length;e+=1){let r=n.item(e);if(r!==null&&T(r.localName)===t)return r}}function O(e,t){if(T(e.localName)===t)return e;let n=e.children;for(let e=0;e<n.length;e+=1){let r=n.item(e),i=r===null?void 0:O(r,t);if(i!==void 0)return i}}function ge(e,t,n){let r=null;for(let i of Array.from(e.attributes))if(T(i.localName)===t){if(i.namespaceURI===n)return i.value;r??=i.value}return r}function k(e,t){let n=new DOMParser().parseFromString(e,`text/xml`);if(n.getElementsByTagName(`parsererror`).length>0)throw Error(`Malformed XML in ${t}`);return n.documentElement}var _e=64*1024*1024,ve=25e4,ye=101010256,be=22,xe=33639248,Se=46,A=65535,j=4294967295;function M(e,t,n){return t>=0&&t+4<=e.byteLength&&e.getUint32(t,!0)===n}function Ce(e,t){let n=t&255,r=t>>8&255,i=t>>16&255,a=t>>>24&255;for(let t=e.length-4;t>=0;--t)if(e[t]===n&&e[t+1]===r&&e[t+2]===i&&e[t+3]===a)return t;return-1}function we(e,t){let n=new Uint8Array(e),r=new DataView(e),i=Ce(n,ye);if(i<0||i+be>n.length)return null;let a=r.getUint32(i+12,!0),o=r.getUint32(i+16,!0);if(r.getUint16(i+4,!0)===A||r.getUint16(i+6,!0)===A||r.getUint16(i+8,!0)===A||r.getUint16(i+10,!0)===A||a===j||o===j)return t+1;let s=o+a;if(i<s)return null;let c=(M(r,i,xe)?0:i-s)+o,l=0;for(;c+Se<=n.length&&M(r,c,xe);){if(l+=1,l>t)return l;c+=Se+r.getUint16(c+28,!0)+r.getUint16(c+30,!0)+r.getUint16(c+32,!0)}return l}var Te=4*1024*1024,Ee=ve;function N(e){return e===`>`||e===`/`||/\s/.test(e)}function P(e){return!N(e)&&e!==`:`&&e!==`<`}var De={kind:`other`},F={kind:`pending`};function I(e,t,n){let r=t+1,i=r;for(;i<e.length&&P(e.charAt(i));)i+=1;if(i===e.length)return F;let a=i>r&&e.charAt(i)===`:`?e.slice(r,i+1):``,o=r+a.length,s=o+n.length;return e.length<=s?F:e.slice(o,s)!==n||!N(e.charAt(s))?De:{kind:`match`,prefix:a}}function Oe(e,t,n){if(e.charAt(t+1)!==`/`)return!1;let r=t+2,i=r;for(;i<e.length&&P(e.charAt(i));)i+=1;let a=i>r&&e.charAt(i)===`:`?i+1:r,o=a+n.length;return e.slice(a,o)===n&&N(e.charAt(o))}var ke=[{opens:`<![CDATA[`,closes:`]]>`},{opens:`<!--`,closes:`-->`},{opens:`<?`,closes:`?>`}],Ae={kind:`none`},L={kind:`pending`};function R(e,t){for(let{opens:n,closes:r}of ke){let i=e.length-t;if(i<n.length){if(e.startsWith(n.slice(0,i),t))return L;continue}if(e.startsWith(n,t)){let i=e.indexOf(r,t+n.length);return i<0?L:{kind:`skip`,to:i+r.length}}}return Ae}function z(e,t){let n=R(e,t);return n.kind===`none`?-1:n.kind===`skip`?n.to:e.length}function B(e,t,n){let r=e.indexOf(`<`,t);for(;r>=0;){let t=z(e,r);if(t>=0){r=e.indexOf(`<`,t);continue}if(Oe(e,r,n))return r;r=e.indexOf(`<`,r+1)}return e.length}function V(e,t,n){let r=H(e,t);if(r<0)return e.length;if(e.charAt(r-1)===`/`)return r+1;let i=B(e,t,n);if(i>=e.length)return e.length;let a=H(e,i);return a<0?e.length:a+1}function H(e,t){let n=``;for(let r=t+1;r<e.length;r+=1){let t=e.charAt(r);if(n!==``){t===n&&(n=``);continue}if(t===`"`||t===`'`){n=t;continue}if(t===`>`)return r}return-1}function U(e){let t=1;for(;t<e.length&&!N(e.charAt(t));)t+=1;return e.slice(1,t)}function W(e){let t=e.indexOf(`<`);for(;t>=0;){let n=z(e,t);if(n>=0){t=e.indexOf(`<`,n);continue}if(e.charAt(t+1)===`/`)return null;let r=H(e,t);if(r<0)return null;let i=e.slice(t,r+1);return{tag:i,name:U(i)}}return null}var je=new Map;function G(e,t){let n=je.get(t);n===void 0&&(n=RegExp(`\\s${t}\\s*=\\s*("[^"]*"|'[^']*')`),je.set(t,n));let r=n.exec(e);return r===null?null:r[1].slice(1,-1)}function Me(e,t){let n=[],r=t.container===void 0?1:2,i=[],a=``,o=``,s=t.container===void 0,c=0,l=0,u=0,d=e.indexOf(`<`);for(;d>=0;){let f=z(e,d);if(f>=0){d=e.indexOf(`<`,f);continue}let p=H(e,d);if(p<0)break;if(e.charAt(d+1)===`/`){let n=i.lastIndexOf(e.slice(d+2,p).trim());if(n>=0&&(i.length=n),s&&t.container!==void 0&&i.length<r)break;d=e.indexOf(`<`,p+1);continue}let m=e.charAt(p-1)!==`/`;if(t.container!==void 0&&!s&&i.length===1){let n=I(e,d,t.container);if(n.kind===`match`){if(a=e.slice(d,p+1),!m)break;o=`${n.prefix}${t.container}`,s=!0,i.push(o),d=e.indexOf(`<`,p+1);continue}}if(s&&i.length===r&&I(e,d,t.localName).kind===`match`){let r=e.slice(d,p+1),i=V(e,d,t.localName);c+=1,(t.keep===void 0||t.keep(r))&&(l+=1,u<t.limit&&(n.push(e.slice(d,i)),u+=1)),d=e.indexOf(`<`,i);continue}m&&i.push(U(e.slice(d,p+1))),d=e.indexOf(`<`,p+1)}return{body:a===``?n.join(``):`${a}${n.join(``)}${o===``?``:`</${o}>`}`,seen:c,matched:l,kept:u}}function K(e,t){let n=W(e),r=t.map(t=>Me(e,t)),i=r.map(({seen:e,matched:t,kept:n})=>({seen:e,matched:t,kept:n}));if(n===null)return{xml:null,results:i};if(n.tag.endsWith(`/>`))return{xml:n.tag,results:i};let a=r.map(e=>e.body).join(``);return{xml:`${n.tag}${a}</${n.name}>`,results:i}}function q(e,t,n){return new Promise((r,i)=>{let a=e.internalStream(`string`),o=``,s=[],c=0,l=!1,u=()=>{c!==0&&(o+=s.join(``),s=[],c=0)},d={resolve:e=>{l=!0,a.pause(),r(e)},reject:e=>{l=!0,a.pause(),i(e)}};a.on(`data`,e=>{l||(s.push(e),c+=e.length,!(c<n)&&(u(),t.onChunk(o,d)))}),a.on(`error`,e=>{l||(l=!0,i(e))}),a.on(`end`,()=>{l||(u(),t.onChunk(o,d),l||(l=!0,r(t.onEnd(o))))}),a.resume()})}function Ne(e,t,n){return q(e,{onChunk:(n,r)=>{n.length>t&&r.reject(Error(`${e.name} is too large to read`))},onEnd:e=>e},n)}function Pe(e,t,n,r,i){let a=0,o=0,s=0,c=-1,l=``,u=[...n],d=new Map,f=()=>n.map(e=>d.get(e)??`${l}${e}`);return q(e,{onChunk:(n,i)=>{for(;;){let e=n.indexOf(`<`,a);if(e===-1){a=n.length;break}let r=R(n,e);if(r.kind===`pending`){a=e;break}if(r.kind===`skip`){a=r.to;continue}let p=I(n,e,t.localName);if(p.kind===`pending`){a=e;break}if(a=e+1,p.kind===`other`){let r=!1;for(let t=0;t<u.length;t+=1){let i=u[t],a=I(n,e,i);if(a.kind===`match`){d.set(i,`${a.prefix}${i}`),u.splice(t,1),r=!1;break}a.kind===`pending`&&(r=!0)}if(r){a=e;break}if(t.budget!==void 0){let r=I(n,e,t.budget.localName);if(r.kind===`pending`){a=e;break}if(r.kind===`match`&&(s+=1,s>t.budget.limit&&o>=1)){let r=o>=2;i.resolve({xml:n.slice(0,r?c:e),truncated:!0,stillOpen:r?f():[`${l}${t.localName}`,...f()]});return}}continue}if(o+=1,c=e,l=p.prefix,o>t.limit){i.resolve({xml:n.slice(0,e),truncated:!0,stillOpen:f()});return}}if(!(n.length<=r)){if(o<2){i.reject(Error(`${e.name} is too large to read`));return}i.resolve({xml:n.slice(0,c),truncated:!0,stillOpen:f()})}},onEnd:e=>({xml:e,truncated:!1,stillOpen:[]})},i)}async function J(e,t,n,r){let i=e.file(t);return i===null?null:Ne(i,n,r)}function Fe(e){if(!e.truncated)return e.xml;let t=e.stillOpen.map(e=>`</${e}>`).join(``);return`${e.xml}${t}`}function Ie(e){let t=G(e,`state`);return t===`hidden`||t===`veryHidden`}function Le(e){return[{localName:`workbookPr`,limit:1},{localName:`sheet`,container:`sheets`,keep:e,limit:100}]}function Re(e,t){let n=K(e,Le(e=>!Ie(e))),r=n.results[1].matched>0?n:K(e,Le()),i=r.results[1].matched,a=r.xml===null?null:k(r.xml,t),o=a===null?void 0:O(a,`sheets`),s=(o===void 0?[]:E(o,`sheet`)).map(e=>({name:e.getAttribute(`name`)??``,relationshipId:ge(e,`id`,y)})),c=a===null?null:O(a,`workbookPr`)?.getAttribute(`date1904`)??null;return{sheets:s,sheetCount:i,date1904:c===`1`||c===`true`}}function ze(e,t){let n=[];for(let r of`${e}${t}`.split(`/`))if(!(r===``||r===`.`)){if(r===`..`){n.pop();continue}n.push(r)}return n.join(`/`)}function Be(e,t){let n=t;try{n=decodeURIComponent(t)}catch{}return n.startsWith(`/`)?ze(``,n.slice(1)):ze(e,n)}var Ve=`_rels/.rels`,He=`/officeDocument`,Y=`xl/workbook.xml`;function Ue(e){if(e===null)return Y;let t=K(e,[{localName:`Relationship`,keep:e=>{let t=G(e,`Type`);return t!==null&&t.endsWith(He)},limit:1}]);if(t.xml===null)return Y;let n=k(t.xml,Ve);for(let e of E(n,`Relationship`)){let t=e.getAttribute(`Target`);if(t!==null)return Be(``,t)}return Y}function X(e){return e.slice(0,e.lastIndexOf(`/`)+1)}function We(e){let t=X(e);return`${t}_rels/${e.slice(t.length)}.rels`}var Z=[`sharedStrings`,`styles`];function Ge(e,t,n,r){let i=new Map,a={sharedStrings:`${t}sharedStrings.xml`,styles:`${t}styles.xml`};if(e===null)return{targets:i,...a};let o=K(e,[{localName:`Relationship`,keep:e=>{let t=G(e,`Id`);if(t!==null&&r.has(t))return!0;let n=G(e,`Type`);return n!==null&&Z.some(e=>n.endsWith(`/${e}`))},limit:r.size+Z.length}]);if(o.xml===null)return{targets:i,...a};let s=k(o.xml,n);for(let e of E(s,`Relationship`)){let n=e.getAttribute(`Id`),r=e.getAttribute(`Target`);if(n===null||r===null)continue;let o=Be(t,r);i.set(n,o);let s=e.getAttribute(`Type`);if(s!==null)for(let e of Z)s.endsWith(`/${e}`)&&(a[e]=o)}return{targets:i,...a}}var Ke=64e3;function qe(e,t){if(e===null)return[];let n=K(e,[{localName:`numFmt`,container:`numFmts`,limit:Ke},{localName:`xf`,container:`cellXfs`,limit:Ke}]);if(n.xml===null)return[];let r=k(n.xml,t),i=new Map,a=O(r,`numFmts`);if(a!==void 0)for(let e of E(a,`numFmt`)){let t=Number(e.getAttribute(`numFmtId`)),n=e.getAttribute(`formatCode`);Number.isInteger(t)&&n!==null&&i.set(t,n)}let o=O(r,`cellXfs`);return o===void 0?[]:E(o,`xf`).map(e=>{let t=Number(e.getAttribute(`numFmtId`)??`0`),n=i.get(t);return n===void 0?[{condition:null,kind:ie(t)}]:pe(n)})}function Q(e){return String(e).padStart(2,`0`)}function Je(e,t){return t===null?Q(e):String(e%12==0?12:e%12)}function Ye(e,t){let n=e<12?`A`:`P`;return t===`A/P`?n:`${n}M`}function Xe(e,t){return e>=0&&e<=(t?ee:b)}function Ze(e,t,n){let r=n?Date.UTC(1904,0,1):Date.UTC(1899,11,30),i=!n&&e<60?e+1:e,a=r+Math.round(i*v),o=new Date(a),s=o.getUTCHours(),c=t.kind===`date`?null:t.meridiem,l=`${Je(s,c)}:${Q(o.getUTCMinutes())}`,u=t.kind===`date`||!t.seconds?l:`${l}:${Q(o.getUTCSeconds())}`,d=c===null?u:`${u} ${Ye(s,c)}`;if(t.kind===`time`)return d;let f=!n&&e>=60&&e<61?`1900-02-29`:`${o.getUTCFullYear()}-${Q(o.getUTCMonth()+1)}-${Q(o.getUTCDate())}`;return t.kind===`datetime`?`${f} ${d}`:f}var Qe=86400;function $e(e,t,n){let r=Math.round(e*Qe),i=[t===`hours`?Math.floor(r/3600):t===`minutes`?Math.floor(r/60):r];return t===`hours`&&n!==`hours`&&i.push(Math.floor(r/60)%60),n===`seconds`&&t!==`seconds`&&i.push(r%60),i.map(Q).join(`:`)}function et(e){let t=D(e,`v`);return t===void 0?null:t.textContent??``}function tt(e){if(e===void 0)return``;let t=``,n=e.children;for(let e=0;e<n.length;e+=1){let r=n.item(e);if(r===null)continue;let i=T(r.localName);if(i===`t`)t+=r.textContent??``;else if(i===`r`)for(let e of E(r,`t`))t+=e.textContent??``}return t}function nt(e,t,n){let r=e.getAttribute(`t`);if(r===`s`){let t=et(e);if(t===null||t===``)return``;let n=Number(t);return Number.isInteger(n)&&n>=0?n:``}if(r===`inlineStr`)return tt(D(e,`is`));let i=et(e),a=i!==null&&i!==``;if(!a){let t=D(e,`f`)?.textContent??``;if(t!==``)return`=${t}`}if(r===`b`)return i===`1`?`TRUE`:`FALSE`;if(r===`e`||r===`str`||r===`d`)return i??``;if(!a)return``;let o=Number(i);if(Number.isNaN(o))return i;let s=he(t[Number(e.getAttribute(`s`)??`0`)]??re,o);if(Xe(o,n)){if(s.kind===`elapsed`)return $e(o,s.from,s.to);if(s.kind!==`none`)return Ze(o,s,n)}return String(o)}function rt(e){if(e===null)return null;let t=0,n=0;for(let r of e){let e=r.toUpperCase().charCodeAt(0);if(e<65||e>90)break;t=t*26+(e-64),n+=1}return n===0?null:t-1}function it(e,t,n){let r=[],i=new Set,a=!1,o=O(e,`sheetData`);if(o===void 0)return{rows:r,truncated:a,sharedIndices:i};for(let e of E(o,`row`)){if(r.length>=5e3){a=!0;break}let o=Number(e.getAttribute(`r`));if(Number.isInteger(o)&&o>r.length+1){let e=Math.min(o-1,l);for(;r.length<e;)r.push([]);if(r.length>=5e3){a=!0;break}}let s=[],c=-1;for(let r of E(e,`c`)){if(c=rt(r.getAttribute(`r`))??c+1,c>=1e3){a=!0;continue}for(;s.length<c;)s.push(``);let e=nt(r,t,n);typeof e==`number`&&i.add(e),s[c]=e}r.push(s)}return{rows:r,truncated:a,sharedIndices:i}}var at=/^\$?([A-Za-z]+)\$?([0-9]+)$/;function ot(e){let t=E(e,`dimension`).find(t=>t.namespaceURI===e.namespaceURI);if(t===void 0)return null;let n=(t.getAttribute(`ref`)??``).split(`:`)[1]??``,r=at.exec(n),i=r===null?null:rt(r[1]),a=Number(r?.[2]??`0`);return i===null||!Number.isSafeInteger(a)||a===0?null:{rows:a,columns:i+1}}function st(e,t,n,r){let i=-1;for(let e of t)i=Math.max(i,e);let a=[],o=[],s=0,c=0,l=null,u=``,d=-1,f=-1,p=e=>({xml:l===null||u===``||a.length===0?null:`${l}${a.join(``)}${u}`,indices:o,absentFrom:e});return q(e,{onChunk:(e,r)=>{for(;;){let n=e.indexOf(`<`,s);if(n===-1){s=e.length;break}let m=R(e,n);if(m.kind===`pending`){s=n;break}if(m.kind===`skip`){s=m.to;continue}let h=I(e,n,`si`);if(h.kind===`pending`){s=n;break}if(s=n+1,h.kind!==`other`){if(l===null){l=e.slice(0,n);let t=W(l);u=t===null?``:`</${t.name}>`}if(d>=0&&(a.push(e.slice(d,V(e,d,`si`))),o.push(f),d=-1),t.has(c)&&(d=n,f=c),c+=1,d<0&&c>i){r.resolve(p(null));return}}}e.length>n&&r.resolve(p(d>=0?c-1:c))},onEnd:e=>(d>=0&&(a.push(e.slice(d,V(e,d,`si`))),o.push(f)),p(c))},r)}function ct(e,t){for(let n of e.keys()){if(e.size<=t)return;e.delete(n)}}function lt(e,t,n){let r=new Map,i=1/0,a=Promise.resolve();return o=>{let s=a.then(async()=>{let a=new Set;for(let e of o)!r.has(e)&&e<i&&a.add(e);let s=a.size===0?null:e.file(t);if(s===null)i=a.size===0?i:0;else{let e=await st(s,a,n.maxPartChars,n.streamBatchChars);if(e.xml!==null){let n=O(k(e.xml,t),`sst`);(n===void 0?[]:E(n,`si`)).forEach((t,n)=>{let i=e.indices[n];i!==void 0&&r.set(i,tt(t))})}e.absentFrom!==null&&(i=Math.min(i,e.absentFrom))}let c=new Map;for(let e of o){let t=r.get(e);t!==void 0&&c.set(e,t)}return ct(r,n.maxCachedStrings),c});return a=s.then(()=>void 0,()=>void 0),s}}function ut(e){let t=[],n=0,r=0,i=e.indexOf(`<`);for(;i>=0;){let a=z(e,i);if(a>=0){i=e.indexOf(`<`,a);continue}if(I(e,i,`row`).kind===`match`)r=0;else if(I(e,i,`c`).kind===`match`&&(r+=1,r>1e3)){let r=B(e,i,`row`);t.push(e.slice(n,i)),n=r,i=r}i=e.indexOf(`<`,i+1)}return t.length===0?{xml:e,dropped:!1}:(t.push(e.slice(n)),{xml:t.join(``),dropped:!0})}var dt=new Map;async function ft(e,t,n){let r=n===void 0?null:e.zip.file(n);if(r===null)throw Error(`Sheet "${t}" points at no worksheet part`);let i=await Pe(r,{localName:`row`,limit:l,budget:{localName:`c`,limit:ve}},[`sheetData`,`worksheet`],e.limits.maxPartChars,e.limits.streamBatchChars),a=ut(Fe(i)),o=k(a.xml,r.name),s=it(o,e.styleFormats,e.date1904),c=s.sharedIndices.size===0?dt:await e.sharedStrings(s.sharedIndices),u=!1,f=s.rows.map(e=>e.map(e=>{if(typeof e!=`number`)return e;let t=c.get(e);return t===void 0?(u=!0,``):t}));return{...d(f,f.reduce((e,t)=>Math.max(e,t.length),0),i.truncated||a.dropped||s.truncated||u),extent:ot(o)}}function pt(){let e=[],t=!1,n=()=>{let r=e.pop();if(r===void 0){t=!1;return}t=!0,(async()=>{try{r.resolve(await r.read())}catch(e){r.reject(e)}n()})()};return r=>{let i=null;return{grid:new Promise((a,o)=>{i={read:r,resolve:a,reject:o},e.push(i),t||n()}),prioritize:()=>{if(i===null)return;let t=e.indexOf(i);t<0||(e.splice(t,1),e.push(i))}}}}function mt(){let e=new Map,t=()=>{for(let[t,n]of e){if(e.size<=3)return;n.settled&&e.delete(t)}};return(n,r)=>{let i=e.get(n);if(i!==void 0)return e.delete(n),e.set(n,i),i.prioritize(),i.grid;let a=r(),o={grid:a.grid,settled:!1,prioritize:a.prioritize};e.set(n,o);let s=()=>{o.settled=!0,t()};return o.grid.then(s,s),t(),o.grid}}function ht(e,t,n,r,i,a){return()=>e(n,()=>t(()=>ft(r,i,a)))}async function gt(e,t={}){let n=t.maxPartChars??_e,r={maxPartChars:n,streamBatchChars:Math.min(t.streamBatchChars??Te,n),maxCachedStrings:t.maxCachedStrings??Ee},i=await e.arrayBuffer(),a=t.maxZipEntries??1e4,o=we(i,a);if(o!==null&&o>a)throw Error(`Not a workbook: it holds more than ${a} zip entries`);let s=await _.default.loadAsync(i),c=Ue(await J(s,Ve,r.maxPartChars,r.streamBatchChars)),l=await J(s,c,r.maxPartChars,r.streamBatchChars);if(l===null)throw Error(`Not a workbook: ${c} is missing`);let{sheets:u,sheetCount:d,date1904:f}=Re(l,c),p=We(c),m=Ge(await J(s,p,r.maxPartChars,r.streamBatchChars),X(c),p,new Set(u.map(e=>e.relationshipId).filter(e=>e!==null))),h={zip:s,styleFormats:qe(await J(s,m.styles,r.maxPartChars,r.streamBatchChars),m.styles),date1904:f,limits:r,sharedStrings:lt(s,m.sharedStrings,r)},g=mt(),v=pt();return{sheetCount:d,sheets:u.map((e,t)=>({name:e.name,read:ht(g,v,t,h,e.name,e.relationshipId===null?void 0:m.targets.get(e.relationshipId))}))}}var $=o(),_t={headers:null,rows:[],truncated:!1,extent:null};function vt(e){return e===void 0?Promise.resolve(_t):e.read()}var yt={plain:`xlsxPreview.summary`,truncated:`xlsxPreview.summaryTruncated`,columnsCut:`xlsxPreview.summaryColumnsCut`,rowsCut:`xlsxPreview.summaryRowsCut`,bothCut:`xlsxPreview.summaryBothCut`},bt={plain:`csvPreview.summary`,truncated:`csvPreview.summaryTruncated`,columnsCut:`xlsxPreview.countsColumnsCut`,rowsCut:`xlsxPreview.countsRowsCut`,bothCut:`xlsxPreview.countsBothCut`};function xt(e){let t=u(e),n={rows:e.rows.length,columns:t},r=e.extent;if(!e.truncated||r===null)return{shape:e.truncated?`truncated`:`plain`,values:n};let i=e.rows.length+(e.headers===null?0:1),a=r.rows>i,o=r.columns>t;return a&&o?{shape:`bothCut`,values:{rows:i,columns:t,totalRows:r.rows,totalColumns:r.columns}}:a?{shape:`rowsCut`,values:{rows:i,columns:t,total:r.rows}}:o?{shape:`columnsCut`,values:{rows:i,columns:t,total:r.columns}}:{shape:`truncated`,values:n}}function St({grid:e,readFailed:t,summary:n}){let{t:i}=a(`chat`);if(t)return(0,$.jsx)(f,{children:i(`xlsxPreview.sheetUnreadable`)});if(e===null)return(0,$.jsx)(r,{});if(u(e)===0&&e.truncated)return(0,$.jsx)(f,{children:i(`xlsxPreview.beyondPreviewLimit`)});let{extent:o,...s}=e;return(0,$.jsx)(p,{...s,emptyLabel:i(`xlsxPreview.emptySheet`),summary:n})}function Ct({sheets:e,sheetCount:r=e.length}){let{t:o}=a(`chat`),[s,c]=(0,g.useState)(0),l=(0,g.useId)(),d=r-e.length,f=Math.min(s,e.length-1),p=e[f],{value:h,failed:_}=m(p,vt);if(p===void 0)return null;let v=h===null||u(h)===0?null:xt(h),y=v===null?null:o(yt[v.shape],{sheet:p.name,...v.values}),b=v===null?null:o(bt[v.shape],v.values);return(0,$.jsx)(`div`,{className:`flex h-full min-h-0 flex-col`,children:e.length===1?(0,$.jsx)(St,{grid:h,readFailed:_,summary:y}):(0,$.jsxs)(i.Root,{value:String(f),onValueChange:e=>c(Number(e)),activationMode:`manual`,className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,$.jsx)(i.Panel,{value:String(f),"aria-describedby":b===null?void 0:l,className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,$.jsx)(St,{grid:h,readFailed:_,summary:null})},f),d>0?(0,$.jsx)(t,{as:`p`,variant:`label-small-default`,className:`shrink-0 px-4 py-1.5 text-[var(--content-tertiary)]`,children:o(`xlsxPreview.sheetsOmitted`,{count:d})}):null,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center border-t border-[var(--border-base)]`,children:[(0,$.jsx)(n,{orientation:`horizontal`,hideScrollBar:!0,className:`min-w-0 flex-1`,children:(0,$.jsx)(i.List,{"aria-label":o(`xlsxPreview.sheetsAria`),placement:`bottom`,className:`border-t-0 px-4`,children:e.map((e,t)=>(0,$.jsx)(i.Trigger,{value:String(t),title:e.name,className:`shrink-0`,children:(0,$.jsx)(`span`,{className:`block max-w-[12rem] truncate`,children:e.name})},t))})}),b===null?null:(0,$.jsx)(t,{as:`p`,variant:`label-small-default`,id:l,className:`max-w-[50%] shrink-0 truncate py-1.5 pr-4 pl-3 text-[var(--content-tertiary)]`,title:b,children:b})]})]})})}function wt({blob:e,filename:t}){let{value:n,failed:i}=m(e,gt);return i||n?.sheets.length===0?(0,$.jsx)(c,{filename:t}):n===null?(0,$.jsx)(r,{}):(0,$.jsx)(Ct,{sheets:n.sheets,sheetCount:n.sheetCount})}export{wt as XlsxPreview};
package/dist/index.html CHANGED
@@ -333,10 +333,10 @@
333
333
  </style>
334
334
  <script type="module" crossorigin src="/assistant/assets/rolldown-runtime-BM3Ffeng.js"></script>
335
335
  <script type="module" crossorigin src="/assistant/assets/react-B9IgSVeK.js"></script>
336
- <script type="module" crossorigin src="/assistant/assets/vendor-DEhKVoiV.js"></script>
336
+ <script type="module" crossorigin src="/assistant/assets/vendor-DLH51Vjf.js"></script>
337
337
  <script type="module" crossorigin src="/assistant/assets/icons-C0wyat6T.js"></script>
338
- <script type="module" crossorigin src="/assistant/assets/app-Qc-rYPt9.js"></script>
339
- <link rel="stylesheet" crossorigin href="/assistant/assets/app-BNyW7BqZ.css">
338
+ <script type="module" crossorigin src="/assistant/assets/app--CZi-eoZ.js"></script>
339
+ <link rel="stylesheet" crossorigin href="/assistant/assets/app-DFa5jRlV.css">
340
340
  <script>window.__VELLUM_CONFIG__={"webUrl":"https://www.vellum.ai","platformUrl":"https://platform.vellum.ai"}</script></head>
341
341
  <body>
342
342
  <!--
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/web",
3
- "version": "0.12.4",
3
+ "version": "0.12.5-dev.202609251017.e467a6c",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Pre-built web SPA for the Vellum Assistant",
@@ -1,3 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{AC as t,Bn as n,EC as r,Gn as i,Jn as a,Kn as o,Wn as s,_r as c,cC as l,gC as u,gr as d,hr as f,kn as p,lS as m,vr as h}from"./app-Qc-rYPt9.js";import{I as g,j as _}from"./vendor-DEhKVoiV.js";import{t as v,x as y}from"./react-B9IgSVeK.js";import{$ as b,$n as x,A as S,Ai as C,Br as w,Cr as T,D as E,Gi as D,Ha as ee,Ii as O,Ki as k,Nr as te,P as A,Va as ne,Ya as re,_t as ie,ha as j,kt as M,mi as ae,qi as N,vt as oe,zi as P}from"./icons-C0wyat6T.js";import{i as se,n as ce,r as F,t as I}from"./metric-card-lmiHO3PF.js";import{o as le}from"./detail-primitives-B2TDPtFR.js";import{t as ue}from"./file-diff-view-bwx_MkXN.js";import{t as de}from"./detail-panel-stop-button-CZfhwEjC.js";import{t as fe}from"./status-badge-pill-Cc18wQfL.js";var pe=re(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),L=e(y(),1),R=``;function z(e,t){switch(e){case`complete`:case`completed`:return`completed`;case`failed`:case`error`:return`error`;case void 0:return t;default:return`running`}}function B(e){return(e.messageId?.startsWith(`local-marker-`)??!1)||(e.content?.startsWith(`↻ Steering: `)??!1)}function V(e){let t=e??``;return t.startsWith(`↻ Steering: `)?t.slice(f.length):t}function H(e){let t=e[e.length-1];t&&(t.kind===`agent`||t.kind===`thinking`)&&!t.isComplete&&(e[e.length-1]={...t,isComplete:!0})}function U(e,t){if(t.updateType===`agent_message_chunk`&&B(t)){H(e),e.push({kind:`user`,id:t.messageId??`steer-${e.length}`,content:V(t.content)});return}switch(t.updateType){case`user_message_chunk`:{let n=t.messageId??R,r=V(t.content),i=e[e.length-1];i&&i.kind===`user`&&i.id===n?e[e.length-1]={...i,content:i.content+r}:(H(e),e.push({kind:`user`,id:n,content:r}));let a=e[e.length-1].content;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.kind===`user`&&n.id.startsWith(`local-marker-`)&&n.content===a){e.splice(t,1);break}}return}case`agent_message_chunk`:{let n=t.messageId??R,r=e[e.length-1];if(r&&r.kind===`agent`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}if(n!==R&&r&&r.kind===`agent`&&r.messageId===R&&!r.isComplete&&r.content===(t.content??``)){e[e.length-1]={...r,messageId:n};return}H(e),e.push({kind:`agent`,messageId:n,content:t.content??``,isComplete:!1});return}case`agent_thought_chunk`:{let n=t.messageId??R,r=e[e.length-1];if(r&&r.kind===`thinking`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}H(e),e.push({kind:`thinking`,messageId:n,content:t.content??``,isComplete:!1});return}case`tool_call`:{let n=t.toolCallId;if(n===void 0)return;H(e),e.push({kind:`tool`,toolCallId:n,title:t.toolTitle??``,toolKind:t.toolKind,status:z(t.toolStatus,`running`),content:t.content,locations:W(t),rawInput:t.rawInput,rawOutput:t.rawOutput});return}case`tool_call_update`:{let n=t.toolCallId;if(n===void 0)return;let r=e.findIndex(e=>e.kind===`tool`&&e.toolCallId===n);if(r===-1)return;let i=e[r],a=W(t);e[r]={...i,title:t.toolTitle??i.title,toolKind:t.toolKind??i.toolKind,status:z(t.toolStatus,i.status),content:t.content??i.content,locations:a??i.locations,rawInput:t.rawInput===void 0?i.rawInput:t.rawInput,rawOutput:t.rawOutput===void 0?i.rawOutput:t.rawOutput};return}case`plan`:{let n=me(t.content);if(n===null)return;let r=e.findIndex(e=>e.kind===`plan`),i={kind:`plan`,entries:n};r===-1?(H(e),e.push(i)):e[r]=i;return}}}function W(e){let t=e.locations;if(!Array.isArray(t))return;let n=[];for(let e of t){let t=e??{};typeof t.path==`string`&&n.push(typeof t.line==`number`?{path:t.path,line:t.line}:{path:t.path})}return n}function me(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}let n=Array.isArray(t)?t:Array.isArray(t?.entries)?t.entries:null;return n===null?null:n.map(e=>{let t=e??{},n=t.content??t.label??``;return{label:typeof n==`string`?n:String(n),checked:t.checked===!0||t.status===`completed`}})}function he(e){let t=[];for(let n of e)U(t,n);return t}function ge(e,t){if(e===t)return{kind:`identity`};if(e===null)return{kind:`first`};if(t.length<e.length)return{kind:`fallback`};for(let n=0;n<e.length;n++)if(e[n]!==t[n])return n===e.length-1&&t.length===e.length?{kind:`mutate-last`}:{kind:`fallback`};return t.length===e.length?{kind:`identity`}:{kind:`append`,from:e.length}}function _e(){let e=null,t=[];function n(n){return t=he(n),e=n,t}function r(r){let i=ge(e,r);switch(i.kind){case`identity`:return t;case`first`:return n(r);case`append`:{let n=t.slice();for(let e=i.from;e<r.length;e++)U(n,r[e]);return e=r,t=n,t}case`mutate-last`:case`fallback`:return n(r)}}return{project:r}}function ve(e){let t=(0,L.useRef)(null);return t.current??=_e(),t.current.project(e)}function G(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{let t=e.trimStart();return t.startsWith(`{`)||t.startsWith(`[`)?[]:[{type:`content`,text:e}]}let n=Array.isArray(t)?t:[t],r=[];for(let e of n){let t=ye(e);t&&r.push(t)}return r}function ye(e){if(typeof e!=`object`||!e)return null;let t=e;switch(t.type){case`content`:return{type:`content`,text:be(t.content)};case`diff`:return typeof t.path!=`string`||typeof t.newText!=`string`?null:{type:`diff`,path:t.path,newText:t.newText,...typeof t.oldText==`string`?{oldText:t.oldText}:{}};case`terminal`:{let e=xe(t);return e===void 0?{type:`terminal`}:{type:`terminal`,text:e}}default:return null}}function be(e){if(typeof e==`string`)return e;if(typeof e==`object`&&e){let t=e.text;if(typeof t==`string`)return t}return``}function xe(e){if(typeof e.text==`string`)return e.text;if(typeof e.output==`string`)return e.output;if(typeof e.content==`string`)return e.content;if(typeof e.content==`object`&&e.content!==null){let t=e.content.text;if(typeof t==`string`)return t}}function K(e){if(typeof e!=`object`||!e)return;let t=e.command;return typeof t==`string`?t:void 0}function q(e){return G(e).filter(e=>e.type===`content`||e.type===`terminal`).map(e=>`text`in e?e.text??``:``).filter(e=>e.length>0).join(`
2
- `)}function J(e){if(e!=null){if(typeof e==`string`)return e;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}}function Y(e,t){let n=new Map;for(let t of e)t.type===`diff`&&n.set(t.path,{path:t.path,newText:t.newText,...t.oldText===void 0?{}:{oldText:t.oldText}});for(let e of t??[])n.has(e.path)||n.set(e.path,{path:e.path});return Array.from(n.values())}var X=v();function Se({content:e,isComplete:t,assistantId:r}){return(0,X.jsxs)(`div`,{"data-testid":`acp-chat-agent-message`,className:`flex w-full flex-col items-start text-chat text-[var(--content-default)]`,children:[(0,X.jsx)(p,{content:e,assistantId:r}),!t&&(0,X.jsx)(n,{className:`mt-1`,"data-testid":`acp-chat-agent-streaming`})]})}function Ce({entries:e}){let{t}=_(`chat`);return e.length===0?null:(0,X.jsxs)(`div`,{"data-testid":`acp-chat-plan-block`,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,X.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5 text-[var(--content-tertiary)]`,children:[(0,X.jsx)(x,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,X.jsx)(u,{variant:`body-small-emphasised`,className:`text-inherit`,children:t(`acpChatPlanBlock.plan`)})]}),(0,X.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.map((e,t)=>(0,X.jsxs)(`li`,{"data-testid":`acp-chat-plan-entry`,"data-checked":e.checked,className:`flex items-start gap-2`,children:[e.checked?(0,X.jsx)(P,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}):(0,X.jsx)(C,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-disabled)]`}),(0,X.jsx)(`span`,{className:e.checked?`text-body-small-default text-[var(--content-tertiary)] line-through`:`text-body-small-default text-[var(--content-default)]`,children:e.label})]},t))})]})}function we(e){switch(e){case`max_tokens`:case`max_turn_requests`:return g(`chat:acpChatTerminalBlock.stoppedLimitReached`);case`refusal`:return g(`chat:acpChatTerminalBlock.refused`);case`cancelled`:return g(`chat:acpChatTerminalBlock.cancelled`);default:return g(`chat:acpChatTerminalBlock.completed`)}}function Te(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function Z({completedAt:e}){let{t}=_(`chat`);return e===void 0?null:(0,X.jsx)(`span`,{"data-testid":`acp-chat-terminal-time`,children:t(`acpChatTerminalBlock.atTime`,{time:Te(e)})})}function Ee({status:e,stopReason:t,error:n,completedAt:r}){let{t:i}=_(`chat`);if(h(e))return null;if(e===`failed`)return(0,X.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`failed`,className:`flex items-start gap-2 rounded-md bg-[var(--system-negative-weak)] px-3 py-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,X.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-terminal-failed-icon`,className:`flex h-[12px] w-4 shrink-0 items-center justify-center`,children:(0,X.jsx)(E,{className:`h-4 w-4`})}),(0,X.jsx)(`span`,{children:n??i(`acpChatTerminalBlock.runFailed`)})]});if(e===`cancelled`)return(0,X.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`cancelled`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,X.jsx)(O,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`}),(0,X.jsx)(`span`,{children:i(`acpChatTerminalBlock.cancelled`)}),(0,X.jsx)(Z,{completedAt:r})]});let a=we(t);return(0,X.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`completed`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,X.jsx)(P,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,X.jsx)(`span`,{children:a}),(0,X.jsx)(Z,{completedAt:r})]})}function De({showDot:e,isLast:t,children:n}){return(0,X.jsxs)(`div`,{className:`relative flex items-start gap-2${t?``:` pb-4`}`,children:[!t&&(0,X.jsx)(`div`,{"aria-hidden":!0,className:`absolute bottom-0 left-[6.5px] w-px bg-[var(--border-element)] ${e?`top-[16px]`:`top-0`}`}),e?(0,X.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-timeline-dot`,className:`flex h-[14px] w-[14px] shrink-0 items-center justify-center`,children:(0,X.jsx)(`span`,{className:`h-[5px] w-[5px] rounded-full bg-[var(--content-disabled)]`})}):(0,X.jsx)(`span`,{"aria-hidden":!0,className:`h-[14px] w-[14px] shrink-0`}),(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:n})]})}function Oe({content:e,isComplete:t,assistantId:r}){let[i,a]=(0,L.useState)(null),o=i??!t,s=e.trim().length>0,c=t?`Thought process`:`Thinking`,l=t?(0,X.jsx)(j,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,X.jsx)(n,{dotSize:5,className:`shrink-0`,"data-testid":`acp-chat-thinking-streaming`});return s?(0,X.jsxs)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:[(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":o,onClick:()=>a(!o),"data-testid":`acp-chat-thinking-toggle`,className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-secondary)]`,children:[o?(0,X.jsx)(N,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,X.jsx)(D,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),l,(0,X.jsx)(`span`,{children:c})]}),o&&(0,X.jsx)(`div`,{"data-testid":`acp-chat-thinking-body`,className:`mt-1.5 border-l-2 border-[var(--border-base)] pl-3 text-body-small-default text-[var(--content-tertiary)]`,children:(0,X.jsx)(p,{content:e,assistantId:r})})]}):(0,X.jsx)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:(0,X.jsxs)(`div`,{className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:[l,(0,X.jsx)(`span`,{children:c})]})})}var ke={running:`neutral`,completed:`positive`,error:`negative`,ended:`neutral`},Ae={running:`Running`,completed:`Completed`,error:`Failed`,ended:`Ended`},je={read:`Read file`,edit:`Edit file`,delete:`Delete file`,move:`Move file`,search:`Search`,execute:`Run command`,think:`Thinking`,fetch:`Fetch`,switch_mode:`Switch mode`},Me=`Tool call`,Ne={read:w,edit:pe,delete:S,move:te,search:oe,execute:A,think:j,fetch:T,switch_mode:M},Pe=new Set([`read`,`edit`,`delete`,`move`]);function Fe({toolKind:e}){return(0,X.jsx)(e&&Ne[e]||ae,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)]`})}function Q({label:e,value:t,testId:n}){return(0,X.jsxs)(`div`,{"data-testid":n,children:[(0,X.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-tertiary)]`,children:e}),(0,X.jsx)(`pre`,{className:`max-h-60 overflow-auto rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] p-2.5 font-mono text-body-small-default text-[var(--content-secondary)]`,children:t})]})}function Ie({block:e,isTerminal:t=!1,onOpenDiff:r,onOpenOutput:i}){let{t:a}=_(`chat`),[o,s]=(0,L.useState)(!1),c=(0,L.useMemo)(()=>G(e.content),[e.content]),d=(0,L.useMemo)(()=>q(e.content),[e.content]),f=(0,L.useMemo)(()=>d.split(`
3
- `).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith("```"))||`View output`,[d]),p=(0,L.useMemo)(()=>Y(c,e.locations),[c,e.locations]),m=t&&e.status===`running`?`ended`:e.status,h=m===`running`,g=e.toolKind&&je[e.toolKind]||Me,v=K(e.rawInput)??e.title,y=v&&v!==g&&(!Pe.has(e.toolKind??``)||p.length===0)?v:null,b=J(e.rawInput),x=J(e.rawOutput),S=b!==void 0||x!==void 0;return(0,X.jsxs)(`div`,{"data-testid":`acp-chat-tool-card`,"data-status":e.status,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Fe,{toolKind:e.toolKind}),(0,X.jsx)(u,{variant:`body-small-emphasised`,className:`min-w-0 flex-1 truncate text-[var(--content-default)]`,title:e.title,children:g}),(0,X.jsx)(l,{tone:ke[m],"data-testid":`acp-chat-tool-status`,children:Ae[m]}),h&&(0,X.jsx)(n,{className:`shrink-0`,"data-testid":`acp-chat-tool-running`})]}),y&&(0,X.jsx)(`div`,{"data-testid":`acp-chat-tool-detail`,className:`mt-1.5 font-mono text-body-small-default whitespace-pre-wrap break-words text-[var(--content-secondary)]`,children:y}),p.length>0&&(0,X.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:p.map(t=>{let n=t.oldText!==void 0||t.newText!==void 0,i=`flex max-w-full items-center gap-1.5 rounded-md border border-[var(--border-base)] bg-[var(--surface-base)] px-2 py-1 text-body-small-default text-[var(--content-secondary)]`;return n?(0,X.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-file-chip`,onClick:()=>r(e.toolCallId,t),title:t.path,className:`${i} cursor-pointer transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ring)]`,children:[(0,X.jsx)(w,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,X.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path):(0,X.jsxs)(`span`,{"data-testid":`acp-chat-tool-file-ref`,title:t.path,className:i,children:[(0,X.jsx)(w,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,X.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path)})}),d.length>0&&(0,X.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-output-open`,onClick:()=>i?.(e.toolCallId),className:`mt-2 flex w-full items-center gap-2 rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] px-2.5 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ring)]`,children:[(0,X.jsx)(A,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:f}),(0,X.jsx)(D,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`})]}),S&&(0,X.jsxs)(`div`,{className:`mt-2`,"data-testid":`acp-chat-tool-raw`,children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-raw-toggle`,"aria-expanded":o,onClick:()=>s(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-default)]`,children:[o?(0,X.jsx)(N,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,X.jsx)(D,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,X.jsx)(`span`,{children:a(o?`acpChatToolCard.hideRaw`:`acpChatToolCard.showRaw`)})]}),o&&(0,X.jsxs)(`div`,{className:`mt-1.5 flex flex-col gap-2`,children:[b!==void 0&&(0,X.jsx)(Q,{label:a(`acpChatToolCard.rawInput`),value:b,testId:`acp-chat-tool-raw-input`}),x!==void 0&&(0,X.jsx)(Q,{label:a(`acpChatToolCard.rawOutput`),value:x,testId:`acp-chat-tool-raw-output`})]})]})]})}function Le({content:e}){return(0,X.jsx)(`div`,{"data-testid":`acp-chat-user-turn`,className:`flex w-full justify-end`,children:(0,X.jsx)(`div`,{className:`max-w-[80%] rounded-lg bg-[var(--surface-lift)] px-4 py-3 whitespace-pre-wrap text-chat text-[var(--content-default)]`,children:e})})}function Re({model:e,options:t}){let{t:n}=_(`chat`),r=t?.find(t=>t.value===e)?.label??e;return(0,X.jsx)(ce,{icon:(0,X.jsx)(b,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),value:r,valueTitle:r,label:n(`acpRunChatView.modelLabel`)})}function ze({content:e,assistantId:t}){return(0,X.jsx)(`div`,{"data-testid":`acp-chat-command-output`,className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3 [&_pre]:!max-h-none`,children:(0,X.jsx)(p,{content:q(e),hardLineBreaks:!0,assistantId:t})})}var Be=80;function Ve(e){return e.scrollHeight-e.clientHeight-e.scrollTop<=Be}function He(e){let t=(0,L.useRef)(null),n=(0,L.useRef)(!0),[r,i]=(0,L.useState)(!1),a=(0,L.useCallback)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[]),o=(0,L.useCallback)(()=>{let e=t.current;if(!e)return;let r=Ve(e);n.current=r,i(e=>e===!r?e:!r)},[]),s=(0,L.useCallback)(()=>{n.current=!0,a(),i(!1)},[a]),c=(0,L.useCallback)(e=>{let r=t.current;r&&r.removeEventListener(`scroll`,o),t.current=e,e&&(e.addEventListener(`scroll`,o,{passive:!0}),n.current?e.scrollTop=e.scrollHeight:o())},[o]);return(0,L.useLayoutEffect)(()=>{n.current?a():o()},[e,a,o]),{scrollRef:c,showScrollToLatest:r,scrollToLatest:s}}function Ue(e,t){switch(e.kind){case`user`:return`user-${e.id||t}`;case`agent`:return`agent-${e.messageId||t}`;case`thinking`:return`thinking-${e.messageId||t}`;case`tool`:return`tool-${e.toolCallId}`;case`plan`:return`plan`}}var $=[];function We({entry:e,onClose:n,assistantId:i}){let{t:a}=_(`chat`),o=h(e.status),{model:s}=e,c=e.inputTokens!==void 0||e.outputTokens!==void 0,l=ve(d(t=>t.byId[e.acpSessionId]?.events??$)),[f,p]=(0,L.useState)(null),[m,g]=(0,L.useState)(e.acpSessionId);m!==e.acpSessionId&&(g(e.acpSessionId),p(null));let v=(0,L.useCallback)((e,t)=>p({kind:`diff`,toolCallId:e,path:t.path}),[]),y=(0,L.useCallback)(e=>p({kind:`output`,toolCallId:e}),[]),b=(0,L.useCallback)(()=>p(null),[]),x=(0,L.useMemo)(()=>f?l.find(e=>e.kind===`tool`&&e.toolCallId===f.toolCallId)??null:null,[f,l]),S=(0,L.useMemo)(()=>f?.kind!==`diff`||!x?null:Y(G(x.content),x.locations).find(e=>e.path===f.path)??null,[f,x]),C=f?.kind===`diff`?f.path:x?K(x.rawInput)??x.title??`Output`:`Output`,{scrollRef:w,showScrollToLatest:T,scrollToLatest:E}=He((0,L.useMemo)(()=>({blocks:l,status:e.status,completedAt:e.completedAt}),[l,e.status,e.completedAt])),O=!o;return(0,X.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden rounded-xl bg-[var(--surface-lift)]`,children:[f&&(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,X.jsx)(`button`,{type:`button`,onClick:b,title:e.agent,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,X.jsx)(u,{variant:`body-small-default`,as:`span`,children:e.agent})}),(0,X.jsx)(D,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,X.jsx)(u,{variant:`body-small-default`,as:`span`,title:C,className:`min-w-0 shrink truncate font-mono text-[var(--content-secondary)]`,children:C})]}),(0,X.jsx)(Ge,{entry:e,isRunning:o,onClose:n,showBack:!!f,onBack:b},`header-${e.acpSessionId}`),f?(0,X.jsx)(`div`,{className:`flex-1 overflow-y-auto px-5 py-5`,children:f.kind===`diff`?(0,X.jsx)(ue,{path:f.path,oldText:S?.oldText,newText:S?.newText}):(0,X.jsx)(ze,{content:x?.content,assistantId:i})}):(0,X.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,X.jsxs)(`div`,{ref:w,"data-testid":`acp-chat-conversation`,className:`flex h-full flex-col gap-4 overflow-y-auto px-5 py-5`,children:[(c||s!==void 0)&&(0,X.jsxs)(`div`,{className:t(`grid gap-3`,c?`grid-cols-2`:`grid-cols-1`),"data-testid":`acp-run-metrics`,children:[c&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(I,{icon:(0,X.jsx)(ee,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens??0,format:e=>F(Math.round(e)),label:a(`acpRunChatView.inputLabel`)}),(0,X.jsx)(I,{icon:(0,X.jsx)(se,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens??0,format:e=>F(Math.round(e)),label:a(`acpRunChatView.outputLabel`)})]}),s!==void 0&&(0,X.jsx)(`div`,{className:c?`col-span-2`:void 0,children:(0,X.jsx)(Re,{model:s,options:e.availableModels})})]}),(0,X.jsx)(Ke,{task:e.task}),(0,X.jsx)(`div`,{className:`flex flex-col`,"data-testid":`acp-chat-timeline`,children:l.map((e,t)=>(0,X.jsx)(De,{showDot:t===0||t===l.length-1||e.kind===`tool`||e.kind===`plan`,isLast:t===l.length-1,children:(0,X.jsx)(qe,{block:e,isTerminal:O,onOpenDiff:v,onOpenOutput:y,assistantId:i})},Ue(e,t)))}),!o&&(0,X.jsx)(Ee,{status:e.status,stopReason:e.stopReason,error:e.error,completedAt:e.completedAt})]}),T&&(0,X.jsx)(r,{shape:`pill`,variant:`outlined`,size:`compact`,iconOnly:(0,X.jsx)(ne,{}),onClick:E,"aria-label":a(`acpRunChatView.goToNewest`),tooltip:a(`acpRunChatView.goToNewest`),"data-testid":`acp-chat-scroll-to-latest`,className:`absolute bottom-3 left-1/2 -translate-x-1/2 shadow-md`})]}),o&&!f&&(0,X.jsx)(Je,{acpSessionId:e.acpSessionId},`steer-${e.acpSessionId}`)]})}function Ge({entry:e,isRunning:t,onClose:n,showBack:s=!1,onBack:l}){let{t:u}=_(`chat`),[d,f]=(0,L.useState)(!1),p=c(e.status,e.stopReason),h=(0,L.useCallback)(()=>{f(!0),i(e.acpSessionId).catch(e=>{f(!1),m(e,{context:`AcpRunChatView.stop`})})},[e.acpSessionId]);return(0,X.jsx)(a,{icon:(0,X.jsxs)(X.Fragment,{children:[s&&(0,X.jsx)(r,{variant:`outlined`,iconOnly:(0,X.jsx)(k,{}),onClick:l,"aria-label":u(`acpRunChatView.backToConversationAria`),tooltip:u(`acpRunChatView.backTooltip`),"data-testid":`acp-chat-diff-back`,className:`shrink-0`}),(0,X.jsx)(o,{agent:e.agent,className:`h-5 w-5 shrink-0`})]}),title:e.agent,headerTrailing:(0,X.jsx)(fe,{color:p.color,label:p.label}),headerActions:t?(0,X.jsx)(de,{onStop:h,ariaLabel:u(`acpRunChatView.stopRunAria`),disabled:d}):void 0,closeLabel:u(`acpRunChatView.closeRunDetail`),onClose:n})}function Ke({task:e}){let{t}=_(`chat`);return e?(0,X.jsxs)(`div`,{"data-testid":`acp-chat-objective`,children:[(0,X.jsx)(le,{as:`h3`,children:t(`acpRunChatView.objective`)}),(0,X.jsx)(u,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:e}),(0,X.jsx)(`div`,{className:`mt-4 h-px w-full bg-[var(--border-hover)]`})]}):null}function qe({block:e,isTerminal:t,onOpenDiff:n,onOpenOutput:r,assistantId:i}){switch(e.kind){case`user`:return(0,X.jsx)(Le,{content:e.content});case`agent`:return(0,X.jsx)(Se,{content:e.content,isComplete:e.isComplete||t,assistantId:i});case`thinking`:return(0,X.jsx)(Oe,{content:e.content,isComplete:e.isComplete||t,assistantId:i});case`tool`:return(0,X.jsx)(Ie,{block:e,isTerminal:t,onOpenDiff:n,onOpenOutput:r});case`plan`:return(0,X.jsx)(Ce,{entries:e.entries})}}function Je({acpSessionId:e}){let{t}=_(`chat`),[n,i]=(0,L.useState)(``),[a,o]=(0,L.useState)(!1);return(0,X.jsx)(`form`,{onSubmit:(0,L.useCallback)(t=>{t.preventDefault();let r=n.trim();if(!r||a)return;o(!0);let c=d.getState().appendLocalMarker({acpSessionId:e,content:`${f}${r}`});s(e,r).then(()=>i(``)).catch(t=>{c&&d.getState().removeLocalMarker({acpSessionId:e,markerId:c}),m(t,{context:`AcpRunChatView.steer`})}).finally(()=>o(!1))},[n,a,e]),"data-testid":`acp-chat-steer-form`,className:`sticky bottom-0 z-10 shrink-0 border-t border-[var(--border-hover)] bg-[var(--surface-lift)] px-5 py-3`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-[var(--surface-base)] px-3 py-2`,children:[(0,X.jsx)(`input`,{type:`text`,value:n,onChange:e=>i(e.target.value),placeholder:t(`acpRunChatView.steerPlaceholder`),disabled:a,"aria-label":t(`acpRunChatView.steerAria`),className:`text-body-medium-default min-w-0 flex-1 bg-transparent text-[color:var(--content-default)] placeholder:text-[color:var(--content-tertiary)] focus:outline-none disabled:opacity-50`}),(0,X.jsx)(r,{type:`submit`,variant:`primary`,size:`compact`,iconOnly:(0,X.jsx)(ie,{}),disabled:a||n.trim()===``,"aria-label":t(`acpRunChatView.sendSteerAria`),className:`shrink-0`})]})})}function Ye({entry:e,onClose:t,assistantId:n}){return(0,X.jsx)(We,{entry:e,onClose:t,assistantId:n})}export{Ye as AcpRunDetailPanel};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ai as t,Ib as n,Oi as r,a as i,c as a,d as o,eS as s,ki as c,s as l,xl as u}from"./app-Qc-rYPt9.js";import{j as d}from"./vendor-DEhKVoiV.js";import{f,r as p,t as m,x as h}from"./react-B9IgSVeK.js";var g=e(h(),1),_=m();function v(){let e=f(),{t:m}=d(`activation`),h=n.use.activeAssistantId(),v=r(),y=t(),{data:b}=c(),{starters:x,items:S}=o(v??``),{launch:C,pendingTaskIds:w}=a(v??``),T=(0,g.useMemo)(()=>[...x,...S],[x,S]),E=(0,g.useCallback)(async t=>{l(await C(t),m,t=>{u(e,t)})},[C,e,m]);return v===null?y?(0,_.jsx)(p,{to:s.assistant,replace:!0}):null:(0,_.jsx)(i,{tasks:T,progress:b?.tasks,pendingTaskIds:w,onLaunch:e=>{E(e)},onOpenConversation:t=>{u(e,t)},assistantId:h??void 0})}export{v as ActivationListRoute};